@oasys/oecs 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +208 -14
- package/README.md +198 -145
- package/dist/core/ecs/access_check.d.cts +3 -3
- package/dist/core/ecs/access_check.d.ts +3 -3
- package/dist/core/ecs/archetype.d.cts +103 -43
- package/dist/core/ecs/archetype.d.ts +103 -43
- package/dist/core/ecs/archetype.d.ts.map +1 -1
- package/dist/core/ecs/archetype_graph.d.cts +8 -8
- package/dist/core/ecs/archetype_graph.d.ts +8 -8
- package/dist/core/ecs/archetype_graph.d.ts.map +1 -1
- package/dist/core/ecs/builtin_relations.d.cts +1 -1
- package/dist/core/ecs/builtin_relations.d.ts +1 -1
- package/dist/core/ecs/command_log.d.cts +4 -4
- package/dist/core/ecs/command_log.d.ts +4 -4
- package/dist/core/ecs/command_log.d.ts.map +1 -1
- package/dist/core/ecs/component.d.cts +4 -4
- package/dist/core/ecs/component.d.ts +4 -4
- package/dist/core/ecs/deferred_commands.d.cts +1 -1
- package/dist/core/ecs/deferred_commands.d.ts +1 -1
- package/dist/core/ecs/deferred_commands.d.ts.map +1 -1
- package/dist/core/ecs/ecs.d.cts +85 -43
- package/dist/core/ecs/ecs.d.ts +85 -43
- package/dist/core/ecs/ecs.d.ts.map +1 -1
- package/dist/core/ecs/ecs_memory.d.cts +15 -15
- package/dist/core/ecs/ecs_memory.d.ts +15 -15
- package/dist/core/ecs/ecs_memory.d.ts.map +1 -1
- package/dist/core/ecs/entity_allocator.d.cts +6 -6
- package/dist/core/ecs/entity_allocator.d.ts +6 -6
- package/dist/core/ecs/entity_allocator.d.ts.map +1 -1
- package/dist/core/ecs/event.d.cts +2 -2
- package/dist/core/ecs/event.d.ts +2 -2
- package/dist/core/ecs/event_registry.d.cts +1 -1
- package/dist/core/ecs/event_registry.d.ts +1 -1
- package/dist/core/ecs/event_registry.d.ts.map +1 -1
- package/dist/core/ecs/facades.d.cts +15 -15
- package/dist/core/ecs/facades.d.ts +15 -15
- package/dist/core/ecs/facades.d.ts.map +1 -1
- package/dist/core/ecs/frame_trace.d.cts +2 -2
- package/dist/core/ecs/frame_trace.d.ts +2 -2
- package/dist/core/ecs/host_commands.d.cts +12 -12
- package/dist/core/ecs/host_commands.d.ts +12 -12
- package/dist/core/ecs/host_commands.d.ts.map +1 -1
- package/dist/core/ecs/index.d.cts +1 -1
- package/dist/core/ecs/index.d.ts +1 -1
- package/dist/core/ecs/index.d.ts.map +1 -1
- package/dist/core/ecs/observer.d.cts +9 -9
- package/dist/core/ecs/observer.d.ts +9 -9
- package/dist/core/ecs/observer.d.ts.map +1 -1
- package/dist/core/ecs/query.d.cts +91 -70
- package/dist/core/ecs/query.d.ts +91 -70
- package/dist/core/ecs/query.d.ts.map +1 -1
- package/dist/core/ecs/ref.d.cts +53 -1
- package/dist/core/ecs/ref.d.ts +53 -1
- package/dist/core/ecs/ref.d.ts.map +1 -1
- package/dist/core/ecs/relation.d.cts +15 -15
- package/dist/core/ecs/relation.d.ts +15 -15
- package/dist/core/ecs/relation.d.ts.map +1 -1
- package/dist/core/ecs/relation_service.d.cts +14 -14
- package/dist/core/ecs/relation_service.d.ts +14 -14
- package/dist/core/ecs/relation_service.d.ts.map +1 -1
- package/dist/core/ecs/resource.d.cts +1 -1
- package/dist/core/ecs/resource.d.ts +1 -1
- package/dist/core/ecs/resource_registry.d.cts +2 -2
- package/dist/core/ecs/resource_registry.d.ts +2 -2
- package/dist/core/ecs/resume.d.cts +3 -3
- package/dist/core/ecs/resume.d.ts +3 -3
- package/dist/core/ecs/resume.d.ts.map +1 -1
- package/dist/core/ecs/schedule.d.cts +22 -9
- package/dist/core/ecs/schedule.d.ts +22 -9
- package/dist/core/ecs/schedule.d.ts.map +1 -1
- package/dist/core/ecs/snapshot_service.d.cts +3 -3
- package/dist/core/ecs/snapshot_service.d.ts +3 -3
- package/dist/core/ecs/sparse_store.d.cts +6 -6
- package/dist/core/ecs/sparse_store.d.ts +6 -6
- package/dist/core/ecs/sparse_store.d.ts.map +1 -1
- package/dist/core/ecs/store.d.cts +189 -110
- package/dist/core/ecs/store.d.ts +189 -110
- package/dist/core/ecs/store.d.ts.map +1 -1
- package/dist/core/ecs/store_layout_listener.d.cts +2 -2
- package/dist/core/ecs/store_layout_listener.d.ts +2 -2
- package/dist/core/ecs/system.d.cts +8 -8
- package/dist/core/ecs/system.d.ts +8 -8
- package/dist/core/ecs/system.d.ts.map +1 -1
- package/dist/core/ecs/utils/error.d.cts +7 -0
- package/dist/core/ecs/utils/error.d.ts +7 -0
- package/dist/core/ecs/utils/error.d.ts.map +1 -1
- package/dist/core/store/action_ring.d.cts +7 -8
- package/dist/core/store/action_ring.d.ts +7 -8
- package/dist/core/store/action_ring.d.ts.map +1 -1
- package/dist/core/store/allocator.d.cts +58 -35
- package/dist/core/store/allocator.d.ts +58 -35
- package/dist/core/store/allocator.d.ts.map +1 -1
- package/dist/core/store/buffer_backed_column.d.cts +5 -6
- package/dist/core/store/buffer_backed_column.d.ts +5 -6
- package/dist/core/store/buffer_backed_column.d.ts.map +1 -1
- package/dist/core/store/column_store.d.cts +23 -23
- package/dist/core/store/column_store.d.ts +23 -23
- package/dist/core/store/column_store.d.ts.map +1 -1
- package/dist/core/store/command_dispatch.d.cts +1 -1
- package/dist/core/store/command_dispatch.d.ts +1 -1
- package/dist/core/store/command_ring.d.cts +6 -7
- package/dist/core/store/command_ring.d.ts +6 -7
- package/dist/core/store/command_ring.d.ts.map +1 -1
- package/dist/core/store/descriptor.d.cts +2 -2
- package/dist/core/store/descriptor.d.ts +2 -2
- package/dist/core/store/entity_index.d.cts +3 -3
- package/dist/core/store/entity_index.d.ts +3 -3
- package/dist/core/store/event_ring.d.cts +7 -7
- package/dist/core/store/event_ring.d.ts +7 -7
- package/dist/core/store/extend.d.cts +2 -2
- package/dist/core/store/extend.d.ts +2 -2
- package/dist/core/store/extend.d.ts.map +1 -1
- package/dist/core/store/grow.d.cts +1 -1
- package/dist/core/store/grow.d.ts +1 -1
- package/dist/core/store/grow.d.ts.map +1 -1
- package/dist/core/store/header.d.cts +9 -9
- package/dist/core/store/header.d.ts +9 -9
- package/dist/core/store/header.d.ts.map +1 -1
- package/dist/core/store/layout_ops.d.cts +25 -7
- package/dist/core/store/layout_ops.d.ts +25 -7
- package/dist/core/store/layout_ops.d.ts.map +1 -1
- package/dist/core/store/state_hash.d.cts +3 -3
- package/dist/core/store/state_hash.d.ts +3 -3
- package/dist/extensions/editor/editor.d.cts +4 -4
- package/dist/extensions/editor/editor.d.ts +4 -4
- package/dist/extensions/editor/editor.d.ts.map +1 -1
- package/dist/extensions/editor/field_handle.d.cts +1 -1
- package/dist/extensions/editor/field_handle.d.ts +1 -1
- package/dist/extensions/editor/index.d.cts +2 -2
- package/dist/extensions/editor/index.d.ts +2 -2
- package/dist/extensions/editor/index.development.js +4 -4
- package/dist/extensions/editor/index.js +4 -4
- package/dist/extensions/reactive/ecs_sync.d.cts +4 -4
- package/dist/extensions/reactive/ecs_sync.d.ts +4 -4
- package/dist/extensions/reactive/index.d.cts +4 -4
- package/dist/extensions/reactive/index.d.ts +4 -4
- package/dist/extensions/reactive/index.development.js +3 -3
- package/dist/extensions/reactive/index.js +3 -3
- package/dist/extensions/solid/index.d.cts +1 -1
- package/dist/extensions/solid/index.d.ts +1 -1
- package/dist/extensions/solid/index.development.js +1 -1
- package/dist/extensions/solid/index.js +1 -1
- package/dist/extensions/solid/kernel_solid.d.cts +1 -1
- package/dist/extensions/solid/kernel_solid.d.ts +1 -1
- package/dist/extensions/solid/kernel_solid.d.ts.map +1 -1
- package/dist/{host_commands-BI8pEmjH.js → host_commands-BlR3oZ3x.js} +473 -393
- package/dist/host_commands-C2cpU3yC.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.development.cjs +1 -1
- package/dist/index.development.js +3345 -2963
- package/dist/index.js +1496 -1131
- package/dist/{internal-BMDgWZbt.js → internal-BoxWl4dG.js} +410 -330
- package/dist/internal-CGBEwfeB.cjs +2 -0
- package/dist/internal.cjs +1 -1
- package/dist/internal.development.cjs +1 -1
- package/dist/internal.development.js +1 -1
- package/dist/internal.js +1 -1
- package/dist/primitives.development.js +1 -1
- package/dist/primitives.js +1 -1
- package/dist/reactive/index.d.cts +2 -2
- package/dist/reactive/index.d.ts +2 -2
- package/dist/reactive/index.development.js +1 -1
- package/dist/reactive/index.js +1 -1
- package/dist/reactive/kernel.d.cts +5 -5
- package/dist/reactive/kernel.d.ts +5 -5
- package/dist/reactive/shallow.d.cts +1 -1
- package/dist/reactive/shallow.d.ts +1 -1
- package/dist/{shallow-DfnAm9vG.js → shallow-Bs39EPh1.js} +1 -1
- package/dist/{shallow-9S1pY_Iw.js → shallow-CiFC70Dz.js} +1 -1
- package/dist/{shared-BU1Cd40h.js → shared-B4v0L1cw.js} +41 -35
- package/dist/shared-DU78k0pU.cjs +1 -0
- package/dist/shared.cjs +1 -1
- package/dist/shared.d.cts +1 -1
- package/dist/shared.d.ts +1 -1
- package/dist/shared.development.cjs +1 -1
- package/dist/shared.development.js +1 -1
- package/dist/shared.js +1 -1
- package/dist/type_primitives/typed_arrays/typed_arrays.d.cts +2 -2
- package/dist/type_primitives/typed_arrays/typed_arrays.d.ts +2 -2
- package/dist/{typed_arrays-BcXcnzB4.js → typed_arrays-DIVwVy5_.js} +1 -1
- package/dist/version.d.cts +2 -2
- package/dist/version.d.ts +2 -2
- package/package.json +1 -1
- package/dist/host_commands-CxhpzMx9.cjs +0 -1
- package/dist/internal-LiTSB_tG.cjs +0 -2
- package/dist/shared-BymrGTyR.cjs +0 -1
|
@@ -5,7 +5,7 @@ export declare const FNV1A_OFFSET_BASIS = 2166136261;
|
|
|
5
5
|
export declare const FNV1A_PRIME = 16777619;
|
|
6
6
|
/** One FNV-1a round folding a single **byte** (the low 8 bits of `b`) into the
|
|
7
7
|
* running `hash`: `hash = imul((hash ^ (b & 0xff)) >>> 0, PRIME) >>> 0`. The
|
|
8
|
-
* single canonical definition of the byte step
|
|
8
|
+
* single canonical definition of the byte step — reused by `fnv1a32`
|
|
9
9
|
* here, by the sparse-store `schemaFingerprint`, and by the server determinism
|
|
10
10
|
* byte/u32 folds, so the constants and the round live in exactly one place.
|
|
11
11
|
*
|
|
@@ -16,7 +16,7 @@ export declare function fnv1aStep(hash: number, b: number): number;
|
|
|
16
16
|
/** One FNV-1a round folding a full 32-bit **word** into `hash` — the whole word
|
|
17
17
|
* xored at once, not four byte rounds. A coarser fold than per-byte FNV-1a, but
|
|
18
18
|
* equally deterministic and ~4× cheaper, which is why `Store.stateHash` folds
|
|
19
|
-
* its columns this way
|
|
19
|
+
* its columns this way. This is the canonical word-step definition its
|
|
20
20
|
* cold sparse/relation folds call; its hot dense-column inner loop inlines this
|
|
21
21
|
* exact step for speed and must stay in sync. Same `>>> 0` reasoning as
|
|
22
22
|
* `fnv1aStep`. */
|
|
@@ -30,7 +30,7 @@ export declare function fnv1aStepWord(hash: number, word: number): number;
|
|
|
30
30
|
export declare function fnv1a32(bytes: Uint8Array): number;
|
|
31
31
|
/** FNV-1a 32-bit hash of the entire SAB region — header + descriptors +
|
|
32
32
|
* column bytes. The canonical state identifier for cross-replay determinism
|
|
33
|
-
* checks
|
|
33
|
+
* checks.
|
|
34
34
|
*
|
|
35
35
|
* The snapshot view is zero-copy (`snapshotColumnStore` is a view, not a
|
|
36
36
|
* copy), so this is one scan over the live SAB with no allocation. */
|
|
@@ -5,7 +5,7 @@ export declare const FNV1A_OFFSET_BASIS = 2166136261;
|
|
|
5
5
|
export declare const FNV1A_PRIME = 16777619;
|
|
6
6
|
/** One FNV-1a round folding a single **byte** (the low 8 bits of `b`) into the
|
|
7
7
|
* running `hash`: `hash = imul((hash ^ (b & 0xff)) >>> 0, PRIME) >>> 0`. The
|
|
8
|
-
* single canonical definition of the byte step
|
|
8
|
+
* single canonical definition of the byte step — reused by `fnv1a32`
|
|
9
9
|
* here, by the sparse-store `schemaFingerprint`, and by the server determinism
|
|
10
10
|
* byte/u32 folds, so the constants and the round live in exactly one place.
|
|
11
11
|
*
|
|
@@ -16,7 +16,7 @@ export declare function fnv1aStep(hash: number, b: number): number;
|
|
|
16
16
|
/** One FNV-1a round folding a full 32-bit **word** into `hash` — the whole word
|
|
17
17
|
* xored at once, not four byte rounds. A coarser fold than per-byte FNV-1a, but
|
|
18
18
|
* equally deterministic and ~4× cheaper, which is why `Store.stateHash` folds
|
|
19
|
-
* its columns this way
|
|
19
|
+
* its columns this way. This is the canonical word-step definition its
|
|
20
20
|
* cold sparse/relation folds call; its hot dense-column inner loop inlines this
|
|
21
21
|
* exact step for speed and must stay in sync. Same `>>> 0` reasoning as
|
|
22
22
|
* `fnv1aStep`. */
|
|
@@ -30,7 +30,7 @@ export declare function fnv1aStepWord(hash: number, word: number): number;
|
|
|
30
30
|
export declare function fnv1a32(bytes: Uint8Array): number;
|
|
31
31
|
/** FNV-1a 32-bit hash of the entire SAB region — header + descriptors +
|
|
32
32
|
* column bytes. The canonical state identifier for cross-replay determinism
|
|
33
|
-
* checks
|
|
33
|
+
* checks.
|
|
34
34
|
*
|
|
35
35
|
* The snapshot view is zero-copy (`snapshotColumnStore` is a view, not a
|
|
36
36
|
* copy), so this is one scan over the live SAB with no allocation. */
|
|
@@ -131,14 +131,14 @@ export declare class Editor {
|
|
|
131
131
|
undo: number;
|
|
132
132
|
redo: number;
|
|
133
133
|
};
|
|
134
|
-
/** `true` when `undo()` would do something — allocation-free
|
|
134
|
+
/** `true` when `undo()` would do something — allocation-free. */
|
|
135
135
|
get canUndo(): boolean;
|
|
136
|
-
/** `true` when `redo()` would do something — allocation-free
|
|
136
|
+
/** `true` when `redo()` would do something — allocation-free. */
|
|
137
137
|
get canRedo(): boolean;
|
|
138
138
|
/**
|
|
139
139
|
* Subscribe to undo/redo-stack changes: fires after every commit, undo,
|
|
140
140
|
* redo, and clear — the push signal an "Undo (3)" affordance needs instead
|
|
141
|
-
* of polling `depths()` per frame
|
|
141
|
+
* of polling `depths()` per frame. Returns an unsubscribe function.
|
|
142
142
|
* Callbacks run synchronously in subscription order; read `canUndo` /
|
|
143
143
|
* `canRedo` / `depths()` inside.
|
|
144
144
|
*/
|
|
@@ -146,7 +146,7 @@ export declare class Editor {
|
|
|
146
146
|
private notify;
|
|
147
147
|
/** Read one committed `(entity, component, field)` slot through the reader
|
|
148
148
|
* this editor was constructed with — the default read for `fieldHandle`
|
|
149
|
-
* when no channel thunk is supplied
|
|
149
|
+
* when no channel thunk is supplied. */
|
|
150
150
|
committedField(entityId: EntityID, def: ComponentDef, field: string): number | undefined;
|
|
151
151
|
/**
|
|
152
152
|
* The pending value the editor believes for a field that the committed read
|
|
@@ -131,14 +131,14 @@ export declare class Editor {
|
|
|
131
131
|
undo: number;
|
|
132
132
|
redo: number;
|
|
133
133
|
};
|
|
134
|
-
/** `true` when `undo()` would do something — allocation-free
|
|
134
|
+
/** `true` when `undo()` would do something — allocation-free. */
|
|
135
135
|
get canUndo(): boolean;
|
|
136
|
-
/** `true` when `redo()` would do something — allocation-free
|
|
136
|
+
/** `true` when `redo()` would do something — allocation-free. */
|
|
137
137
|
get canRedo(): boolean;
|
|
138
138
|
/**
|
|
139
139
|
* Subscribe to undo/redo-stack changes: fires after every commit, undo,
|
|
140
140
|
* redo, and clear — the push signal an "Undo (3)" affordance needs instead
|
|
141
|
-
* of polling `depths()` per frame
|
|
141
|
+
* of polling `depths()` per frame. Returns an unsubscribe function.
|
|
142
142
|
* Callbacks run synchronously in subscription order; read `canUndo` /
|
|
143
143
|
* `canRedo` / `depths()` inside.
|
|
144
144
|
*/
|
|
@@ -146,7 +146,7 @@ export declare class Editor {
|
|
|
146
146
|
private notify;
|
|
147
147
|
/** Read one committed `(entity, component, field)` slot through the reader
|
|
148
148
|
* this editor was constructed with — the default read for `fieldHandle`
|
|
149
|
-
* when no channel thunk is supplied
|
|
149
|
+
* when no channel thunk is supplied. */
|
|
150
150
|
committedField(entityId: EntityID, def: ComponentDef, field: string): number | undefined;
|
|
151
151
|
/**
|
|
152
152
|
* The pending value the editor believes for a field that the committed read
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../src/extensions/editor/editor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,OAAO,KAAK,EACX,YAAY,EACZ,eAAe,EACf,eAAe,EACf,QAAQ,EACR,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAEhB,YAAY,EACZ,MAAM,gBAAgB,CAAC;AAExB;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;AAEvG;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IACjC,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;CACzC;AAiBD;;;;;;;GAOG;AACH,qBAAa,kBAAkB;IAU7B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM;IAVxB;;;;qFAIiF;IACjF,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6B;IAEpD,gBAAgB;gBAEE,SAAS,EAAE,WAAW,EACtB,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IAK7C,OAAO,KAAK,IAAI,GAEf;IAED;;;;;OAKG;IACH,KAAK,CAAC,IAAI,SAAS,SAAS,YAAY,EAAE,EACzC,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,EAC9B,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GACtC,IAAI;IA0BP;;;;;;OAMG;IACH,OAAO,CAAC,IAA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;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;IAIxC,iEAAiE;IACjE,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,iEAAiE;IACjE,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAQpC,OAAO,CAAC,MAAM;IAId;;4CAEwC;IACxC,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIxF;;;;;;;;;;;;;;OAcG;IACH,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAkBzF,iFAAiF;IACjF,OAAO,CAAC,MAAM;IAad,wEAAwE;IACxE,OAAO,CAAC,WAAW;CAOnB"}
|
|
@@ -31,7 +31,7 @@ export interface FieldHandle {
|
|
|
31
31
|
* `() => sync.map.get(entityId)?.x`); `set` routes through `editor.setField`, so the
|
|
32
32
|
* edit is queued, batched, and undoable.
|
|
33
33
|
*
|
|
34
|
-
* `read` is optional
|
|
34
|
+
* `read` is optional: omitted, the handle reads through the editor's own
|
|
35
35
|
* committed-channel reader (`editor.committedField`). That default is correct
|
|
36
36
|
* but NOT reactive — supply the channel thunk when the handle's `value` must
|
|
37
37
|
* subscribe inside a tracking scope.
|
|
@@ -31,7 +31,7 @@ export interface FieldHandle {
|
|
|
31
31
|
* `() => sync.map.get(entityId)?.x`); `set` routes through `editor.setField`, so the
|
|
32
32
|
* edit is queued, batched, and undoable.
|
|
33
33
|
*
|
|
34
|
-
* `read` is optional
|
|
34
|
+
* `read` is optional: omitted, the handle reads through the editor's own
|
|
35
35
|
* committed-channel reader (`editor.committedField`). That default is correct
|
|
36
36
|
* but NOT reactive — supply the channel thunk when the handle's `value` must
|
|
37
37
|
* subscribe inside a tracking scope.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The host write seam's EDITOR layer
|
|
2
|
+
* The host write seam's EDITOR layer — layer 2 of the seam.
|
|
3
3
|
*
|
|
4
4
|
* Reified undo/redo + the inspector field-handle, built on the shipped typed
|
|
5
|
-
* `HostCommandQueue
|
|
5
|
+
* `HostCommandQueue`. Application policy, so it lives here in
|
|
6
6
|
* `engine-extensions`, not engine core — and it pulls NO third-party / framework
|
|
7
7
|
* dependency (the field-handle reads through a caller-supplied thunk).
|
|
8
8
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The host write seam's EDITOR layer
|
|
2
|
+
* The host write seam's EDITOR layer — layer 2 of the seam.
|
|
3
3
|
*
|
|
4
4
|
* Reified undo/redo + the inspector field-handle, built on the shipped typed
|
|
5
|
-
* `HostCommandQueue
|
|
5
|
+
* `HostCommandQueue`. Application policy, so it lives here in
|
|
6
6
|
* `engine-extensions`, not engine core — and it pulls NO third-party / framework
|
|
7
7
|
* dependency (the field-handle reads through a caller-supplied thunk).
|
|
8
8
|
*
|
|
@@ -152,18 +152,18 @@ class u {
|
|
|
152
152
|
depths() {
|
|
153
153
|
return { undo: this.undoStack.length, redo: this.redoStack.length };
|
|
154
154
|
}
|
|
155
|
-
/** `true` when `undo()` would do something — allocation-free
|
|
155
|
+
/** `true` when `undo()` would do something — allocation-free. */
|
|
156
156
|
get canUndo() {
|
|
157
157
|
return this.undoStack.length > 0;
|
|
158
158
|
}
|
|
159
|
-
/** `true` when `redo()` would do something — allocation-free
|
|
159
|
+
/** `true` when `redo()` would do something — allocation-free. */
|
|
160
160
|
get canRedo() {
|
|
161
161
|
return this.redoStack.length > 0;
|
|
162
162
|
}
|
|
163
163
|
/**
|
|
164
164
|
* Subscribe to undo/redo-stack changes: fires after every commit, undo,
|
|
165
165
|
* redo, and clear — the push signal an "Undo (3)" affordance needs instead
|
|
166
|
-
* of polling `depths()` per frame
|
|
166
|
+
* of polling `depths()` per frame. Returns an unsubscribe function.
|
|
167
167
|
* Callbacks run synchronously in subscription order; read `canUndo` /
|
|
168
168
|
* `canRedo` / `depths()` inside.
|
|
169
169
|
*/
|
|
@@ -178,7 +178,7 @@ class u {
|
|
|
178
178
|
}
|
|
179
179
|
/** Read one committed `(entity, component, field)` slot through the reader
|
|
180
180
|
* this editor was constructed with — the default read for `fieldHandle`
|
|
181
|
-
* when no channel thunk is supplied
|
|
181
|
+
* when no channel thunk is supplied. */
|
|
182
182
|
committedField(t, e, s) {
|
|
183
183
|
return this.readField(t, e, s);
|
|
184
184
|
}
|
|
@@ -152,18 +152,18 @@ class u {
|
|
|
152
152
|
depths() {
|
|
153
153
|
return { undo: this.undoStack.length, redo: this.redoStack.length };
|
|
154
154
|
}
|
|
155
|
-
/** `true` when `undo()` would do something — allocation-free
|
|
155
|
+
/** `true` when `undo()` would do something — allocation-free. */
|
|
156
156
|
get canUndo() {
|
|
157
157
|
return this.undoStack.length > 0;
|
|
158
158
|
}
|
|
159
|
-
/** `true` when `redo()` would do something — allocation-free
|
|
159
|
+
/** `true` when `redo()` would do something — allocation-free. */
|
|
160
160
|
get canRedo() {
|
|
161
161
|
return this.redoStack.length > 0;
|
|
162
162
|
}
|
|
163
163
|
/**
|
|
164
164
|
* Subscribe to undo/redo-stack changes: fires after every commit, undo,
|
|
165
165
|
* redo, and clear — the push signal an "Undo (3)" affordance needs instead
|
|
166
|
-
* of polling `depths()` per frame
|
|
166
|
+
* of polling `depths()` per frame. Returns an unsubscribe function.
|
|
167
167
|
* Callbacks run synchronously in subscription order; read `canUndo` /
|
|
168
168
|
* `canRedo` / `depths()` inside.
|
|
169
169
|
*/
|
|
@@ -178,7 +178,7 @@ class u {
|
|
|
178
178
|
}
|
|
179
179
|
/** Read one committed `(entity, component, field)` slot through the reader
|
|
180
180
|
* this editor was constructed with — the default read for `fieldHandle`
|
|
181
|
-
* when no channel thunk is supplied
|
|
181
|
+
* when no channel thunk is supplied. */
|
|
182
182
|
committedField(t, e, s) {
|
|
183
183
|
return this.readField(t, e, s);
|
|
184
184
|
}
|
|
@@ -141,14 +141,14 @@ export interface SingletonSyncOptions<V extends object = Record<string, number>>
|
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
143
143
|
* Sync ONE singleton entity's single-component state into a `reactiveStruct`,
|
|
144
|
-
* keyless — the singleton/resource shape
|
|
144
|
+
* keyless — the singleton/resource shape. This is how heterogeneous
|
|
145
145
|
* ephemeral UI state (net status + latency, FPS/mem, wave timer, hovered hex) joins
|
|
146
146
|
* the same reactive view as per-entity components: model it as components on a
|
|
147
147
|
* reserved singleton entity (the flecs / Unity-DOTS "singleton-as-entity" model)
|
|
148
148
|
* and read it through per-field channels — NOT a separate reactive-resource
|
|
149
149
|
* subsystem. Resources stay non-reactive internal singletons.
|
|
150
150
|
*
|
|
151
|
-
* It reuses the entity-grain
|
|
151
|
+
* It reuses the entity-grain component observer verbatim, filtered to the
|
|
152
152
|
* one target eid: an `onSet` (or seed `onAdd`) republishes the entity's field values
|
|
153
153
|
* into the struct via per-field setters. The per-field `Object.is` eq means an
|
|
154
154
|
* unchanged field writes nothing — "equal write → 0 renders" — and per-field signals
|
|
@@ -162,7 +162,7 @@ export interface SingletonSyncOptions<V extends object = Record<string, number>>
|
|
|
162
162
|
* `syncFieldsToMap`. Project a subset to channel only what the UI reads.
|
|
163
163
|
*
|
|
164
164
|
* A `reactiveStruct` has a fixed field set and no `delete`, so the map adapter's
|
|
165
|
-
* delete-on-disable
|
|
165
|
+
* delete-on-disable has no struct analog: `onRemove`/`onDisable`
|
|
166
166
|
* **reset the fields to the channel's declared initial values** (`onSet` skips
|
|
167
167
|
* disabled entities), `onEnable` republishes. The defaults are the channel's own
|
|
168
168
|
* initials — the eager `into` struct's declared values (e.g. `NetStats.latency = -1`),
|
|
@@ -190,7 +190,7 @@ export interface SingletonArraySyncOptions<T> {
|
|
|
190
190
|
}
|
|
191
191
|
/**
|
|
192
192
|
* Sync ONE singleton entity's component into a `reactiveArray`, one slot per field
|
|
193
|
-
* in `fields` order
|
|
193
|
+
* in `fields` order — the ORDERED sibling of `syncSingletonToStruct`,
|
|
194
194
|
* for positional UI state (the army slots). On every change to the component it
|
|
195
195
|
* `reconcile`s the array from the field values: a slot whose value is unchanged keeps
|
|
196
196
|
* its reference (structural sharing), only changed slots wake. `onRemove`/`onDisable`
|
|
@@ -141,14 +141,14 @@ export interface SingletonSyncOptions<V extends object = Record<string, number>>
|
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
143
143
|
* Sync ONE singleton entity's single-component state into a `reactiveStruct`,
|
|
144
|
-
* keyless — the singleton/resource shape
|
|
144
|
+
* keyless — the singleton/resource shape. This is how heterogeneous
|
|
145
145
|
* ephemeral UI state (net status + latency, FPS/mem, wave timer, hovered hex) joins
|
|
146
146
|
* the same reactive view as per-entity components: model it as components on a
|
|
147
147
|
* reserved singleton entity (the flecs / Unity-DOTS "singleton-as-entity" model)
|
|
148
148
|
* and read it through per-field channels — NOT a separate reactive-resource
|
|
149
149
|
* subsystem. Resources stay non-reactive internal singletons.
|
|
150
150
|
*
|
|
151
|
-
* It reuses the entity-grain
|
|
151
|
+
* It reuses the entity-grain component observer verbatim, filtered to the
|
|
152
152
|
* one target eid: an `onSet` (or seed `onAdd`) republishes the entity's field values
|
|
153
153
|
* into the struct via per-field setters. The per-field `Object.is` eq means an
|
|
154
154
|
* unchanged field writes nothing — "equal write → 0 renders" — and per-field signals
|
|
@@ -162,7 +162,7 @@ export interface SingletonSyncOptions<V extends object = Record<string, number>>
|
|
|
162
162
|
* `syncFieldsToMap`. Project a subset to channel only what the UI reads.
|
|
163
163
|
*
|
|
164
164
|
* A `reactiveStruct` has a fixed field set and no `delete`, so the map adapter's
|
|
165
|
-
* delete-on-disable
|
|
165
|
+
* delete-on-disable has no struct analog: `onRemove`/`onDisable`
|
|
166
166
|
* **reset the fields to the channel's declared initial values** (`onSet` skips
|
|
167
167
|
* disabled entities), `onEnable` republishes. The defaults are the channel's own
|
|
168
168
|
* initials — the eager `into` struct's declared values (e.g. `NetStats.latency = -1`),
|
|
@@ -190,7 +190,7 @@ export interface SingletonArraySyncOptions<T> {
|
|
|
190
190
|
}
|
|
191
191
|
/**
|
|
192
192
|
* Sync ONE singleton entity's component into a `reactiveArray`, one slot per field
|
|
193
|
-
* in `fields` order
|
|
193
|
+
* in `fields` order — the ORDERED sibling of `syncSingletonToStruct`,
|
|
194
194
|
* for positional UI state (the army slots). On every change to the component it
|
|
195
195
|
* `reconcile`s the array from the field values: a slot whose value is unchanged keeps
|
|
196
196
|
* its reference (structural sharing), only changed slots wake. `onRemove`/`onDisable`
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The production ECS→UI reactive bridge
|
|
2
|
+
* The production ECS→UI reactive bridge.
|
|
3
3
|
*
|
|
4
|
-
* Drains the engine's own change detection (
|
|
5
|
-
* the
|
|
4
|
+
* Drains the engine's own change detection (component observers, riding
|
|
5
|
+
* the per-row dirty list) into a `reactiveMap` — publishing O(changed),
|
|
6
6
|
* not O(all), each tick. Declarative selection + closure projection (the Bevy
|
|
7
7
|
* `ExtractComponent` / WatermelonDB `observeWithColumns` shape):
|
|
8
8
|
* - `syncComponentToMap(def, project)` — one component, grain `"entity"`/`"column"`.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* For singleton/ephemeral UI state (net status+latency, FPS/mem, wave timer), model
|
|
13
13
|
* it as a component on a reserved singleton entity and read it keyless via per-field
|
|
14
|
-
* channels
|
|
14
|
+
* channels — NOT a separate reactive-resource subsystem:
|
|
15
15
|
* - `syncSingletonToStruct(def, eid, [fields])` — one singleton entity → `reactiveStruct`.
|
|
16
16
|
* - `syncSingletonToArray(def, eid, [fields])` — one singleton entity → `reactiveArray` (ordered slots).
|
|
17
17
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The production ECS→UI reactive bridge
|
|
2
|
+
* The production ECS→UI reactive bridge.
|
|
3
3
|
*
|
|
4
|
-
* Drains the engine's own change detection (
|
|
5
|
-
* the
|
|
4
|
+
* Drains the engine's own change detection (component observers, riding
|
|
5
|
+
* the per-row dirty list) into a `reactiveMap` — publishing O(changed),
|
|
6
6
|
* not O(all), each tick. Declarative selection + closure projection (the Bevy
|
|
7
7
|
* `ExtractComponent` / WatermelonDB `observeWithColumns` shape):
|
|
8
8
|
* - `syncComponentToMap(def, project)` — one component, grain `"entity"`/`"column"`.
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* For singleton/ephemeral UI state (net status+latency, FPS/mem, wave timer), model
|
|
13
13
|
* it as a component on a reserved singleton entity and read it keyless via per-field
|
|
14
|
-
* channels
|
|
14
|
+
* channels — NOT a separate reactive-resource subsystem:
|
|
15
15
|
* - `syncSingletonToStruct(def, eid, [fields])` — one singleton entity → `reactiveStruct`.
|
|
16
16
|
* - `syncSingletonToArray(def, eid, [fields])` — one singleton entity → `reactiveArray` (ordered slots).
|
|
17
17
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as f, u as _ } from "../../kernel-Cz2Kxlwl.js";
|
|
2
|
-
import { r as m, s as E, a as p, b as w } from "../../shallow-
|
|
2
|
+
import { r as m, s as E, a as p, b as w } from "../../shallow-CiFC70Dz.js";
|
|
3
3
|
class v {
|
|
4
4
|
constructor(n) {
|
|
5
5
|
this.def = n;
|
|
@@ -64,7 +64,7 @@ function A(l, n, s, r = {}) {
|
|
|
64
64
|
},
|
|
65
65
|
onAdd: (i, t) => y(i, t),
|
|
66
66
|
onRemove: (i) => c.delete(i),
|
|
67
|
-
// Disable = soft remove from the channel; enable = re-add
|
|
67
|
+
// Disable = soft remove from the channel; enable = re-add. The
|
|
68
68
|
// column sweep is bounded by enabled rows, so a disabled row would never
|
|
69
69
|
// refresh — drop it on disable, republish on enable.
|
|
70
70
|
onDisable: (i) => c.delete(i),
|
|
@@ -113,7 +113,7 @@ function M(l, n, s, r = {}) {
|
|
|
113
113
|
onAdd: g,
|
|
114
114
|
onRemove: o,
|
|
115
115
|
// Disabling any joined component soft-removes the entity from the
|
|
116
|
-
// channel; enabling re-evaluates membership and republishes
|
|
116
|
+
// channel; enabling re-evaluates membership and republishes. A
|
|
117
117
|
// disable fires once per carried joined component — `dropRow` is
|
|
118
118
|
// idempotent, and `publishIfMember` re-checks the full join.
|
|
119
119
|
onDisable: o,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as f, u as _ } from "../../kernel-DgyrLFjW.js";
|
|
2
|
-
import { r as m, s as E, a as p, b as w } from "../../shallow-
|
|
2
|
+
import { r as m, s as E, a as p, b as w } from "../../shallow-Bs39EPh1.js";
|
|
3
3
|
class v {
|
|
4
4
|
constructor(n) {
|
|
5
5
|
this.def = n;
|
|
@@ -64,7 +64,7 @@ function A(l, n, s, r = {}) {
|
|
|
64
64
|
},
|
|
65
65
|
onAdd: (i, t) => y(i, t),
|
|
66
66
|
onRemove: (i) => c.delete(i),
|
|
67
|
-
// Disable = soft remove from the channel; enable = re-add
|
|
67
|
+
// Disable = soft remove from the channel; enable = re-add. The
|
|
68
68
|
// column sweep is bounded by enabled rows, so a disabled row would never
|
|
69
69
|
// refresh — drop it on disable, republish on enable.
|
|
70
70
|
onDisable: (i) => c.delete(i),
|
|
@@ -113,7 +113,7 @@ function M(l, n, s, r = {}) {
|
|
|
113
113
|
onAdd: g,
|
|
114
114
|
onRemove: o,
|
|
115
115
|
// Disabling any joined component soft-removes the entity from the
|
|
116
|
-
// channel; enabling re-evaluates membership and republishes
|
|
116
|
+
// channel; enabling re-evaluates membership and republishes. A
|
|
117
117
|
// disable fires once per carried joined component — `dropRow` is
|
|
118
118
|
// idempotent, and `publishIfMember` re-checks the full join.
|
|
119
119
|
onDisable: o,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `@oasys/oecs/solid` — the SolidJS adapter plugin for oecs's reactive
|
|
3
|
-
* kernel (`@oasys/oecs/reactive` / `../../reactive
|
|
3
|
+
* kernel (`@oasys/oecs/reactive` / `../../reactive`).
|
|
4
4
|
*/
|
|
5
5
|
export { fromKernel, fromKernelMap, fromKernelStruct, fromKernelArray, type KernelMapView } from './kernel_solid.cjs';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `@oasys/oecs/solid` — the SolidJS adapter plugin for oecs's reactive
|
|
3
|
-
* kernel (`@oasys/oecs/reactive` / `../../reactive
|
|
3
|
+
* kernel (`@oasys/oecs/reactive` / `../../reactive`).
|
|
4
4
|
*/
|
|
5
5
|
export { fromKernel, fromKernelMap, fromKernelStruct, fromKernelArray, type KernelMapView } from './kernel_solid.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -19,7 +19,7 @@ function h(e) {
|
|
|
19
19
|
has: (n, r) => s.has(r),
|
|
20
20
|
ownKeys: () => o,
|
|
21
21
|
getOwnPropertyDescriptor: (n, r) => s.has(r) ? { get: () => t[r](), enumerable: !0, configurable: !0 } : void 0,
|
|
22
|
-
// Read surface only (`Readonly<T
|
|
22
|
+
// Read surface only (`Readonly<T>`) — mirrors the kernel
|
|
23
23
|
// struct proxy's trap so a JS-side assignment fails loudly instead of
|
|
24
24
|
// sticking a non-reactive value on the hidden target.
|
|
25
25
|
set: (n, r) => {
|
|
@@ -19,7 +19,7 @@ function m(e) {
|
|
|
19
19
|
has: (n, r) => s.has(r),
|
|
20
20
|
ownKeys: () => o,
|
|
21
21
|
getOwnPropertyDescriptor: (n, r) => s.has(r) ? { get: () => t[r](), enumerable: !0, configurable: !0 } : void 0,
|
|
22
|
-
// Read surface only (`Readonly<T
|
|
22
|
+
// Read surface only (`Readonly<T>`) — mirrors the kernel
|
|
23
23
|
// struct proxy's trap so a JS-side assignment fails loudly instead of
|
|
24
24
|
// sticking a non-reactive value on the hidden target.
|
|
25
25
|
set: (n, r) => !1
|
|
@@ -26,7 +26,7 @@ export declare function fromKernelMap<K, V>(map: ReactiveMap<K, V>): KernelMapVi
|
|
|
26
26
|
* `view.field` in a Solid scope tracks that field alone (one `fromKernel` per
|
|
27
27
|
* field), so a change to one field re-renders only its readers. Completes the
|
|
28
28
|
* `fromKernel` / `fromKernelMap` / `fromKernelStruct` trio — the read side for the
|
|
29
|
-
* singleton/ephemeral UI state `syncSingletonToStruct` publishes
|
|
29
|
+
* singleton/ephemeral UI state `syncSingletonToStruct` publishes. The
|
|
30
30
|
* field set is read once from the (enumerable) struct proxy; call inside a component
|
|
31
31
|
* or `root` so each field's `onCleanup` has an owner. The kernel struct's per-field
|
|
32
32
|
* `eq` and batching carry through `fromKernel` unchanged.
|
|
@@ -26,7 +26,7 @@ export declare function fromKernelMap<K, V>(map: ReactiveMap<K, V>): KernelMapVi
|
|
|
26
26
|
* `view.field` in a Solid scope tracks that field alone (one `fromKernel` per
|
|
27
27
|
* field), so a change to one field re-renders only its readers. Completes the
|
|
28
28
|
* `fromKernel` / `fromKernelMap` / `fromKernelStruct` trio — the read side for the
|
|
29
|
-
* singleton/ephemeral UI state `syncSingletonToStruct` publishes
|
|
29
|
+
* singleton/ephemeral UI state `syncSingletonToStruct` publishes. The
|
|
30
30
|
* field set is read once from the (enumerable) struct proxy; call inside a component
|
|
31
31
|
* or `root` so each field's `onCleanup` has an owner. The kernel struct's per-field
|
|
32
32
|
* `eq` and batching carry through `fromKernel` unchanged.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kernel_solid.d.ts","sourceRoot":"","sources":["../../../src/extensions/solid/kernel_solid.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"kernel_solid.d.ts","sourceRoot":"","sources":["../../../src/extensions/solid/kernel_solid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAA2B,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EAAa,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGjF;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAI5D;AAED,kEAAkE;AAClE,MAAM,WAAW,aAAa,CAAC,CAAC,EAAE,CAAC;IAClC,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACtC;;;uCAGmC;IACnC,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;CACtC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAK/E;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAgCnF;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAEhF"}
|