createEntityStore — Svelte 5 runes binding for a single entity.
Subscribes to graphStore from @prometheus-ags/entity-graph-core
and exposes reactive $state-backed properties. Svelte 5 runes mode
allows reactive state outside components via plain objects with $state
fields; we use the imperative API ($state.raw snapshot + assignment)
because this file is compiled outside a .svelte component. We accomplish
true rune reactivity by using a plain Svelte-compatible reactive class
backed by the $state rune via a wrapper approach that works in .ts files.
Architecture: this module ONLY reads the graph and calls fetchEntity /
registerSubscriber / unregisterSubscriber from core. It NEVER writes to
the graph directly (Component → hook/store → graph layering rule).
createEntityStore — Svelte 5 runes binding for a single entity.
Subscribes to
graphStorefrom@prometheus-ags/entity-graph-coreand exposes reactive$state-backed properties. Svelte 5 runes mode allows reactive state outside components via plain objects with$statefields; we use the imperative API ($state.rawsnapshot + assignment) because this file is compiled outside a.sveltecomponent. We accomplish true rune reactivity by using a plain Svelte-compatible reactive class backed by the$staterune via a wrapper approach that works in.tsfiles.Architecture: this module ONLY reads the graph and calls
fetchEntity/registerSubscriber/unregisterSubscriberfrom core. It NEVER writes to the graph directly (Component → hook/store → graph layering rule).