Expand description
Reactive named-value store backing bind-text="..." markup attributes and <for each="..."> iteration.
Wave-D status: Signals is now a thin #[deprecated] wrapper kept for
external embedders that still hold Res<Signals> references. Internal lumen
systems (apply_text_bindings, apply_checked_bindings, …) read and write
through PropertyStore directly - that’s the canonical typed reactive
store. The wrapper’s set mirrors writes into PropertyStore via
push_external_property so the next tick’s
crate::property_store::drain_external_properties pass commits them, and
get reads from the local HashMap populated by mirror-back when an
external write lands.
Signalsholds scalarStringvalues keyed by name (back-compat only).ArraySignalsholds ordered vectors of record-shaped maps keyed by name.- Scripts populate both via
signal_set/signal_array_set, stringified at the boundary. - Each tick, the
Bind*and reconciler systems pull fromPropertyStore(post wave-D) and copy into bound components or spawn/despawn<for>children.
Structs§
- Array
Signals - Reactive array store paired with
Signals; ordered vectors ofArrayItemkeyed by name. Written throughScriptCommand::SetArray; the reconciler system spawns/despawns markup children to match the stored vector. - Signals
Deprecated - Legacy reactive named-value store. Deprecated as of wave-D - internal lumen
systems now read/write through
PropertyStorekeyed onPropertyKey::Global.
Enums§
- External
Mutation - One enqueued mutation applied by
drain_external_signalson the next tick. Values are pre-stringified.
Functions§
- apply_
checked_ bindings - Copies
PropertyStore[Global(name)]intoToggleable::checkedfor everyBindCheckedentity. RecognisesBooldirectly plus the canonical"true"/"1"string aliases for back-compat. - apply_
disabled_ bindings - Copies
PropertyStore[Global(name)]into the presence of theDisabledmarker for everyBindDisabledentity: truthy inserts, falsy removes. RecognisesBoolplus the canonical"true"/"1"string aliases viaget_global_bool. A missing signal leaves the entity untouched (its spawn-timedisabledattribute keeps authority until the signal exists). - apply_
scroll_ bindings - Parses
PropertyStore[Global(name)]asf32and writes it into the verticalScrollOffsetof everyBindScroll+Scrollentity (W6 T6). - apply_
text_ bindings - Copies
PropertyStore[Global(name)]intoTextContentfor everyBindTextentity. Entities whose property has no entry keep their existing text. - apply_
theme_ class_ to_ root Deprecated - Legacy theme application path - superseded by the W1.6 split of
style_manager_to_signal(producer) +apply_theme_signal_to_root_classes(consumer). Retained as a#[deprecated]thin wrapper so external callers that explicitly registered this system keep compiling; new registrations should use the split pair instead. - apply_
theme_ signal_ to_ root_ classes - Consumer half of the W1.6 theme-notify path: reads
PropertyStore::dirty_peekforPropertyKey::Global("__theme__")and appliestheme-light/theme-darkto every root entity’scrate::components::LumenClasses. - apply_
value_ bindings - Parses
PropertyStore[Global(name)]asf32and writes it intoSliderValue::value(clamped to[min, max]) for everyBindValueentity. Unparseable values are skipped. - clear_
signal_ dirty - Clears the legacy
Signals::dirtyset at the end ofcrate::tick::TickStage::A11ySync. Argument isOption<ResMut<Signals>>so the system no-ops when theSignalsresource is absent. Post wave-D the canonical dirty queue lives onPropertyStoreand is cleared bycrate::property_store::clear_property_store_dirty. - drain_
external_ signals - Per-tick system that drains queued external Array / Clear mutations into
ArraySignals. Scalar signal writes were routed throughpush_external_propertyin wave-D and are committed toPropertyStorebycrate::property_store::drain_external_properties; only the legacy Array path remains here. - init_
external_ signals - Idempotently initialises the external signal channel. Safe to call multiple times.
- mirror_
property_ store_ globals_ to_ signals - Per-tick mirror that copies the latest
PropertyStoreglobal string cells back into the legacySignalsmap. Runs incrate::tick::TickStage::Systemsafterdrain_external_propertiesso any write that landed on PropertyStore directly (typed setters, ECS-side writes, FFI typed pushes) is visible to readers that still consultRes<Signals>. - os_
theme_ to_ signal Deprecated - Pre-W4.6 alias retained as a thin wrapper so any external scheduler
that explicitly named the system keeps compiling. New callers should
use
style_manager_to_signal. - push_
external_ array - Sends an array mutation from any thread. Returns
falsewhen the channel has disconnected. Array signals stay on the legacyExternalMutationpath untilArraySignalsmigrates toPropertyStore. - push_
external_ clear - Sends a clear mutation from any thread. Returns
falsewhen the channel has disconnected. The scalar half routes throughpush_external_property(empty string); the array half stays on the legacy channel. - push_
external_ signal - Sends a scalar signal write from any thread. Wave-D: routes through
push_external_propertyso the value lands typed inPropertyStoreunderPropertyKey::Global(name)on the next tick. - push_
scroll_ to_ signal - Pushes the settled vertical
ScrollOffsetback into the matchingPropertyStoreentry for everyBindScrollentity (W6 T6, the two-way half). - push_
slider_ to_ signal - Pushes
SliderValue::valueback into the matchingPropertyStoreentry for everyBindValueentity withChanged<SliderValue>. Writes the stringified value so the existing<if>/ interpolation paths keep working. - push_
textinput_ to_ signal - Pushes the latest
TextContentback into the matchingPropertyStoreentry for every entity carrying bothBindTextandcrate::components::TextInput. Filtered byChanged<TextContent>so the push only fires on user edits. - push_
toggle_ to_ signal - Pushes
Toggleable::checkedback into the matchingPropertyStoreentry for everyBindCheckedentity withChanged<Toggleable>. Writes the canonical"true"/"false"string variant so the wave-D<if eq="true">body comparator andSignals::get_boolcallers keep recognising it. Spawn-tick rows (is_added()) are skipped: the freshly-inserted component carries the widget’s spawn default, not a user edit, and pushing it would clobber a script’ssignal(name, default)initial publish (authored markup attrs seed the store separately, if-absent, at spawn). - style_
manager_ to_ signal - Producer half of the W1.6 theme-notify path: on every
Changed<StyleManager>tick, writes"dark"/"light"intoPropertyStoreunder the__theme__global key based oncrate::components::StyleManager::effective_dark.
Type Aliases§
- Array
Item - One row of a reactive array; field name -> stringified value.