effectable 0.1.0

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.
Files changed (124) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +157 -0
  3. package/build/LICENSE +21 -0
  4. package/build/bootstrap/bootstrap.d.ts +32 -0
  5. package/build/bootstrap/bootstrap.d.ts.map +1 -0
  6. package/build/bootstrap/bootstrap.js +179 -0
  7. package/build/bootstrap/bootstrap.js.map +1 -0
  8. package/build/bootstrap/index.d.ts +9 -0
  9. package/build/bootstrap/index.d.ts.map +1 -0
  10. package/build/bootstrap/index.js +14 -0
  11. package/build/bootstrap/index.js.map +1 -0
  12. package/build/bootstrap/types.d.ts +105 -0
  13. package/build/bootstrap/types.d.ts.map +1 -0
  14. package/build/bootstrap/types.js +26 -0
  15. package/build/bootstrap/types.js.map +1 -0
  16. package/build/component/Component.d.ts +126 -0
  17. package/build/component/Component.d.ts.map +1 -0
  18. package/build/component/Component.js +123 -0
  19. package/build/component/Component.js.map +1 -0
  20. package/build/component/GraphRuntime.d.ts +457 -0
  21. package/build/component/GraphRuntime.d.ts.map +1 -0
  22. package/build/component/GraphRuntime.js +1168 -0
  23. package/build/component/GraphRuntime.js.map +1 -0
  24. package/build/component/constants.d.ts +1 -0
  25. package/build/component/constants.d.ts.map +1 -0
  26. package/build/component/constants.js +2 -0
  27. package/build/component/constants.js.map +1 -0
  28. package/build/component/context.d.ts +199 -0
  29. package/build/component/context.d.ts.map +1 -0
  30. package/build/component/context.js +262 -0
  31. package/build/component/context.js.map +1 -0
  32. package/build/component/graphRuntime.constants.d.ts +13 -0
  33. package/build/component/graphRuntime.constants.d.ts.map +1 -0
  34. package/build/component/graphRuntime.constants.js +15 -0
  35. package/build/component/graphRuntime.constants.js.map +1 -0
  36. package/build/component/h.d.ts +48 -0
  37. package/build/component/h.d.ts.map +1 -0
  38. package/build/component/h.js +72 -0
  39. package/build/component/h.js.map +1 -0
  40. package/build/component/index.d.ts +19 -0
  41. package/build/component/index.d.ts.map +1 -0
  42. package/build/component/index.js +39 -0
  43. package/build/component/index.js.map +1 -0
  44. package/build/component/lifecycle.d.ts +179 -0
  45. package/build/component/lifecycle.d.ts.map +1 -0
  46. package/build/component/lifecycle.js +367 -0
  47. package/build/component/lifecycle.js.map +1 -0
  48. package/build/component/refs.d.ts +105 -0
  49. package/build/component/refs.d.ts.map +1 -0
  50. package/build/component/refs.js +128 -0
  51. package/build/component/refs.js.map +1 -0
  52. package/build/component/types.d.ts +169 -0
  53. package/build/component/types.d.ts.map +1 -0
  54. package/build/component/types.js +40 -0
  55. package/build/component/types.js.map +1 -0
  56. package/build/connect/connect.d.ts +31 -0
  57. package/build/connect/connect.d.ts.map +1 -0
  58. package/build/connect/connect.js +500 -0
  59. package/build/connect/connect.js.map +1 -0
  60. package/build/connect/index.d.ts +8 -0
  61. package/build/connect/index.d.ts.map +1 -0
  62. package/build/connect/index.js +11 -0
  63. package/build/connect/index.js.map +1 -0
  64. package/build/connect/types.d.ts +90 -0
  65. package/build/connect/types.d.ts.map +1 -0
  66. package/build/connect/types.js +8 -0
  67. package/build/connect/types.js.map +1 -0
  68. package/build/index.d.ts +26 -0
  69. package/build/index.d.ts.map +1 -0
  70. package/build/index.js +60 -0
  71. package/build/index.js.map +1 -0
  72. package/build/runtime/BusDecorators.d.ts +113 -0
  73. package/build/runtime/BusDecorators.d.ts.map +1 -0
  74. package/build/runtime/BusDecorators.js +302 -0
  75. package/build/runtime/BusDecorators.js.map +1 -0
  76. package/build/runtime/CommandBus.d.ts +43 -0
  77. package/build/runtime/CommandBus.d.ts.map +1 -0
  78. package/build/runtime/CommandBus.js +65 -0
  79. package/build/runtime/CommandBus.js.map +1 -0
  80. package/build/runtime/EventBus.d.ts +50 -0
  81. package/build/runtime/EventBus.d.ts.map +1 -0
  82. package/build/runtime/EventBus.js +90 -0
  83. package/build/runtime/EventBus.js.map +1 -0
  84. package/build/runtime/HandleRegistry.d.ts +143 -0
  85. package/build/runtime/HandleRegistry.d.ts.map +1 -0
  86. package/build/runtime/HandleRegistry.js +244 -0
  87. package/build/runtime/HandleRegistry.js.map +1 -0
  88. package/build/runtime/QueryBus.d.ts +43 -0
  89. package/build/runtime/QueryBus.d.ts.map +1 -0
  90. package/build/runtime/QueryBus.js +65 -0
  91. package/build/runtime/QueryBus.js.map +1 -0
  92. package/build/runtime/index.d.ts +13 -0
  93. package/build/runtime/index.d.ts.map +1 -0
  94. package/build/runtime/index.js +32 -0
  95. package/build/runtime/index.js.map +1 -0
  96. package/build/runtime/types.d.ts +79 -0
  97. package/build/runtime/types.d.ts.map +1 -0
  98. package/build/runtime/types.js +8 -0
  99. package/build/runtime/types.js.map +1 -0
  100. package/build/store/createStore.d.ts +36 -0
  101. package/build/store/createStore.d.ts.map +1 -0
  102. package/build/store/createStore.js +131 -0
  103. package/build/store/createStore.js.map +1 -0
  104. package/build/store/index.d.ts +14 -0
  105. package/build/store/index.d.ts.map +1 -0
  106. package/build/store/index.js +39 -0
  107. package/build/store/index.js.map +1 -0
  108. package/build/store/middleware.d.ts +38 -0
  109. package/build/store/middleware.d.ts.map +1 -0
  110. package/build/store/middleware.js +99 -0
  111. package/build/store/middleware.js.map +1 -0
  112. package/build/store/selector.d.ts +62 -0
  113. package/build/store/selector.d.ts.map +1 -0
  114. package/build/store/selector.js +226 -0
  115. package/build/store/selector.js.map +1 -0
  116. package/build/store/semanticStateTree.d.ts +91 -0
  117. package/build/store/semanticStateTree.d.ts.map +1 -0
  118. package/build/store/semanticStateTree.js +263 -0
  119. package/build/store/semanticStateTree.js.map +1 -0
  120. package/build/store/types.d.ts +259 -0
  121. package/build/store/types.d.ts.map +1 -0
  122. package/build/store/types.js +28 -0
  123. package/build/store/types.js.map +1 -0
  124. package/package.json +109 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GraphRuntime.js","sourceRoot":"","sources":["../../src/component/GraphRuntime.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;AAm+C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Root":"","sources":["../../src/component/constants.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/component/constants.ts"],"names":[],"mappings":""}
@@ -0,0 +1,199 @@
1
+ /**
2
+ * **Context** machinery (dependency injection down the component tree): passes dependencies
3
+ * without threading props through every level (prop drilling).
4
+ *
5
+ * **Data flow**
6
+ * 1. {@link createContext} — declares a typed {@link ContextToken}.
7
+ * 2. {@link ContextProvider} in the virtual node tree extends {@link ContextScope}.
8
+ * 3. {@link UseContext} marks class fields; during materialization {@link injectContextFields}
9
+ * fills them from the scope (after instance creation, before startup).
10
+ *
11
+ * **Conventions**
12
+ * - Tokens are always typed; the scope key is `token.key` ({@link ContextToken.key}).
13
+ * - Context is for infrastructure / cross-cutting dependencies, not a substitute for explicit domain contracts.
14
+ * - No provider and no `defaultValue` on the token — {@link readFromScope} and {@link injectContextFields}
15
+ * throw (missing required provider).
16
+ * - {@link GraphRuntime} inherits scope from parent to children when materializing nodes.
17
+ *
18
+ * @module Effectable/component/context
19
+ */
20
+ import { Component } from './Component';
21
+ import type { VirtualServiceNode } from './types';
22
+ /**
23
+ * Unique context token: identifier of type `T` in {@link ContextScope}.
24
+ * Created only via {@link createContext}; two calls with the same `displayName` yield different `key`s.
25
+ * For a process-wide singleton token, store the `createContext` result in a module constant.
26
+ *
27
+ * @template T type of the value stored in scope for this token
28
+ */
29
+ export interface ContextToken<T> {
30
+ /** Human-readable name (logs, error messages); preferably unique in the project. */
31
+ readonly displayName: string;
32
+ /**
33
+ * Value when there is no entry in scope: used by {@link readFromScope}.
34
+ * If `undefined` and there is no scope entry — reading is a tree configuration error.
35
+ */
36
+ readonly defaultValue: T | undefined;
37
+ /** Internal entry key in {@link ContextScope} (do not mix with foreign `symbol`s). */
38
+ readonly key: symbol;
39
+ }
40
+ /**
41
+ * Immutable snapshot of “token → value” bindings for the current tree node.
42
+ * Keys are `ContextToken.key`; values are cast to the token type on read.
43
+ * Extended only by creating a new map ({@link extendScope}, {@link ContextProvider.applyToScope}).
44
+ */
45
+ export type ContextScope = ReadonlyMap<symbol, unknown>;
46
+ /**
47
+ * Initial scope before the first {@link ContextProvider}: empty map.
48
+ * Root runtime usually starts with this reference and accumulates layers down the tree.
49
+ */
50
+ export declare const EMPTY_CONTEXT_SCOPE: ContextScope;
51
+ /**
52
+ * Declares a new {@link ContextToken}: factory for later use in
53
+ * {@link ContextProvider} and {@link UseContext}.
54
+ *
55
+ * @template T value type in scope
56
+ * @param {string} displayName - name for logs and `Symbol(displayName)`; keep it stable across refactors
57
+ * @param {T} [defaultValue] - fallback if no {@link ContextProvider} node placed the token in scope
58
+ * @returns {ContextToken<T>} token with a unique {@link ContextToken.key}
59
+ * @example
60
+ * const DB_CONTEXT = createContext<DatabaseService>('DB_CONTEXT');
61
+ * const CLOCK_CONTEXT = createContext<Clock>('CLOCK_CONTEXT', new SystemClock());
62
+ */
63
+ export declare function createContext<T>(displayName: string, defaultValue?: T): ContextToken<T>;
64
+ /**
65
+ * Returns a **new** {@link ContextScope} with entry `token.key → value`, without mutating `scope`.
66
+ * Writing the same key again overwrites the value in the returned map (last provider wins).
67
+ *
68
+ * @template T value type consistent with the token
69
+ * @param {ContextScope} scope - source scope (often the parent's)
70
+ * @param {ContextToken<T>} token - token under which the value is stored
71
+ * @param {T} value - dependency instance for the subtree
72
+ * @returns {ContextScope} new scope to pass to child nodes
73
+ */
74
+ export declare function extendScope<T>(scope: ContextScope, token: ContextToken<T>, value: T): ContextScope;
75
+ /**
76
+ * Reads the value for `token` from `scope`: first the entry at `token.key`, otherwise {@link ContextToken.defaultValue}.
77
+ * Used for field injection and in code that needs explicit scope access without a decorator.
78
+ *
79
+ * @template T expected value type
80
+ * @param {ContextScope} scope - node scope at read time
81
+ * @param {ContextToken<T>} token - requested token
82
+ * @returns {T} value from scope or the token default
83
+ * @throws {Error} if the key is missing in scope and the token has no `defaultValue` (no provider up the tree)
84
+ */
85
+ export declare function readFromScope<T>(scope: ContextScope, token: ContextToken<T>): T;
86
+ /**
87
+ * Props of a {@link ContextProvider} node: what to put into the child {@link ContextScope}.
88
+ * The shape of `value` differs by array form (one pair vs array of pairs) — see {@link ContextProvider.applyToScope}.
89
+ */
90
+ export interface ContextProviderProps {
91
+ /**
92
+ * Either a single pair `[token, value]`, or an array of pairs `[[t1, v1], [t2, v2], ...]`.
93
+ * Do not mix “one pair” and “array of pairs” in one value — distinguished by `Array.isArray(value[0])`.
94
+ *
95
+ * @example One token
96
+ * { value: [DB_CONTEXT, dbInstance] }
97
+ * @example Multiple tokens
98
+ * { value: [[DB_CONTEXT, db], [CLOCK_CONTEXT, clock]] }
99
+ */
100
+ value: [ContextToken<unknown>, unknown] | Array<[ContextToken<unknown>, unknown]>;
101
+ }
102
+ /**
103
+ * Virtual node with no UI of its own: only extends {@link ContextScope} for descendants.
104
+ * Runtime calls {@link applyToScope} during materialization and passes the result to child nodes.
105
+ * Provider detection without `instanceof`: {@link IS_CONTEXT_PROVIDER} is set on the prototype.
106
+ *
107
+ * @example
108
+ * compose() {
109
+ * return h(ContextProvider, { value: [DB_CONTEXT, this.db] }, [
110
+ * h(DeepChild, {})
111
+ * ]);
112
+ * }
113
+ */
114
+ export declare class ContextProvider extends Component<Record<string, unknown>, ContextProviderProps> {
115
+ /**
116
+ * @param {ContextProviderProps} props - token–value pairs for the subtree
117
+ */
118
+ constructor(props: ContextProviderProps);
119
+ /**
120
+ * Builds the child scope: copies `parentScope` and overlays entries from {@link ContextProviderProps.value}.
121
+ * Pair order in the array matters on token collision — the last pair wins.
122
+ *
123
+ * For multiple pairs: one parent copy only if `parentScope` is non-empty; when `size === 0`
124
+ * build a fresh `Map` without `new Map(parentScope)` (avoids an extra entry walk).
125
+ * A single pair in array form — delegates to {@link extendScope} (same path as one pair in props).
126
+ *
127
+ * @param {ContextScope} parentScope - scope inherited from ancestors
128
+ * @returns {ContextScope} scope for this provider's child components
129
+ */
130
+ applyToScope(parentScope: ContextScope): ContextScope;
131
+ /**
132
+ * The provider does not render children itself — that is done by the parent's compose/h;
133
+ * the node exists only to participate in scope computation.
134
+ *
135
+ * @returns {null} no child virtual nodes
136
+ */
137
+ compose(): VirtualServiceNode[] | null;
138
+ }
139
+ /**
140
+ * Marker on {@link ContextProvider.prototype}: fast “is this a provider?” check without `instanceof`
141
+ * (hot-path optimization in the runtime). Declared before {@link Object.defineProperty}, which hangs the flag on the prototype.
142
+ */
143
+ export declare const IS_CONTEXT_PROVIDER: unique symbol;
144
+ /**
145
+ * Metadata key on the constructor: array of {@link ContextFieldMeta} for fields with {@link UseContext}.
146
+ * Filled by the decorator when the class loads.
147
+ */
148
+ export declare const CONTEXT_FIELDS_META_KEY: unique symbol;
149
+ /**
150
+ * Marker on the constructor: `true` if the class has at least one {@link UseContext} field.
151
+ * Lets {@link injectContextFields} exit immediately for “pure” components without extra walks.
152
+ */
153
+ export declare const HAS_CONTEXT_FIELDS_KEY: unique symbol;
154
+ /**
155
+ * Metadata record for one field marked with {@link UseContext}: what and from where to fill.
156
+ */
157
+ export interface ContextFieldMeta {
158
+ /** Property key on the instance (as in the class declaration). */
159
+ propertyKey: string | symbol;
160
+ /** Token; the actual value is taken via {@link readFromScope} in {@link injectContextFields}. */
161
+ token: ContextToken<unknown>;
162
+ }
163
+ /**
164
+ * **Field** decorator for a {@link Component} class: after instance creation the runtime assigns
165
+ * to the property the result of {@link readFromScope} for the given token and the node's current scope.
166
+ * Metadata accumulates under {@link CONTEXT_FIELDS_META_KEY}; class field order is assignment order.
167
+ *
168
+ * @template T field type (must match the token value type)
169
+ * @param {ContextToken<T>} token - which context to inject
170
+ * @returns {PropertyDecorator} standard Stage 3 property decorator
171
+ * @example
172
+ * class DeepChild extends Component {
173
+ * @UseContext(DB_CONTEXT) private db!: DatabaseService;
174
+ * }
175
+ */
176
+ export declare function UseContext<T>(token: ContextToken<T>): PropertyDecorator;
177
+ /**
178
+ * Snapshot of metadata collected by the {@link UseContext} decorator for the given constructor.
179
+ * If the decorator was never applied — returns an empty array.
180
+ *
181
+ * @param {{ [CONTEXT_FIELDS_META_KEY]?: ContextFieldMeta[] }} componentClass - component constructor
182
+ * @returns {ContextFieldMeta[]} logical field list (external array mutations are discouraged)
183
+ */
184
+ export declare function getContextFields(componentClass: {
185
+ [CONTEXT_FIELDS_META_KEY]?: ContextFieldMeta[];
186
+ }): ContextFieldMeta[];
187
+ /**
188
+ * Fills all {@link UseContext} fields: for each {@link ContextFieldMeta} entry calls
189
+ * {@link readFromScope} and assigns the instance property. When {@link HAS_CONTEXT_FIELDS_KEY}
190
+ * is absent on the constructor, exits without work (fast path).
191
+ * Called by the runtime after `new Component(...)` and before user startup.
192
+ *
193
+ * @param {object} instance - already created component instance
194
+ * @param {ContextScope} scope - scope computed for this node (including ancestor providers)
195
+ * @returns {void}
196
+ * @throws {Error} see {@link readFromScope} — required token missing from scope
197
+ */
198
+ export declare function injectContextFields(instance: object, scope: ContextScope): void;
199
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/component/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAMlD;;;;;;GAMG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,oFAAoF;IACpF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;IACrC,sFAAsF;IACtF,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAExD;;;GAGG;AAC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AG,MAAM,CAAC;IAC7B,iGAAiG;IACjG,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;CAC9B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAG,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAsBxE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,cAAc,EAAE;IAAE,CAAC,uBAAuB,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAAE,GACjE,gBAAgB,EAAE,CAEpB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,YAAY,GAClB,IAAI,CAoCN"}
@@ -0,0 +1,262 @@
1
+ "use strict";
2
+ /**
3
+ * **Context** machinery (dependency injection down the component tree): passes dependencies
4
+ * without threading props through every level (prop drilling).
5
+ *
6
+ * **Data flow**
7
+ * 1. {@link createContext} — declares a typed {@link ContextToken}.
8
+ * 2. {@link ContextProvider} in the virtual node tree extends {@link ContextScope}.
9
+ * 3. {@link UseContext} marks class fields; during materialization {@link injectContextFields}
10
+ * fills them from the scope (after instance creation, before startup).
11
+ *
12
+ * **Conventions**
13
+ * - Tokens are always typed; the scope key is `token.key` ({@link ContextToken.key}).
14
+ * - Context is for infrastructure / cross-cutting dependencies, not a substitute for explicit domain contracts.
15
+ * - No provider and no `defaultValue` on the token — {@link readFromScope} and {@link injectContextFields}
16
+ * throw (missing required provider).
17
+ * - {@link GraphRuntime} inherits scope from parent to children when materializing nodes.
18
+ *
19
+ * @module Effectable/component/context
20
+ */
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.HAS_CONTEXT_FIELDS_KEY = exports.CONTEXT_FIELDS_META_KEY = exports.IS_CONTEXT_PROVIDER = exports.ContextProvider = exports.EMPTY_CONTEXT_SCOPE = void 0;
23
+ exports.createContext = createContext;
24
+ exports.extendScope = extendScope;
25
+ exports.readFromScope = readFromScope;
26
+ exports.UseContext = UseContext;
27
+ exports.getContextFields = getContextFields;
28
+ exports.injectContextFields = injectContextFields;
29
+ const Component_1 = require("./Component");
30
+ /**
31
+ * Initial scope before the first {@link ContextProvider}: empty map.
32
+ * Root runtime usually starts with this reference and accumulates layers down the tree.
33
+ */
34
+ exports.EMPTY_CONTEXT_SCOPE = new Map();
35
+ /**
36
+ * Declares a new {@link ContextToken}: factory for later use in
37
+ * {@link ContextProvider} and {@link UseContext}.
38
+ *
39
+ * @template T value type in scope
40
+ * @param {string} displayName - name for logs and `Symbol(displayName)`; keep it stable across refactors
41
+ * @param {T} [defaultValue] - fallback if no {@link ContextProvider} node placed the token in scope
42
+ * @returns {ContextToken<T>} token with a unique {@link ContextToken.key}
43
+ * @example
44
+ * const DB_CONTEXT = createContext<DatabaseService>('DB_CONTEXT');
45
+ * const CLOCK_CONTEXT = createContext<Clock>('CLOCK_CONTEXT', new SystemClock());
46
+ */
47
+ function createContext(displayName, defaultValue) {
48
+ return {
49
+ displayName,
50
+ defaultValue,
51
+ key: Symbol(displayName),
52
+ };
53
+ }
54
+ /**
55
+ * Returns a **new** {@link ContextScope} with entry `token.key → value`, without mutating `scope`.
56
+ * Writing the same key again overwrites the value in the returned map (last provider wins).
57
+ *
58
+ * @template T value type consistent with the token
59
+ * @param {ContextScope} scope - source scope (often the parent's)
60
+ * @param {ContextToken<T>} token - token under which the value is stored
61
+ * @param {T} value - dependency instance for the subtree
62
+ * @returns {ContextScope} new scope to pass to child nodes
63
+ */
64
+ function extendScope(scope, token, value) {
65
+ const next = new Map(scope);
66
+ next.set(token.key, value);
67
+ return next;
68
+ }
69
+ /**
70
+ * Reads the value for `token` from `scope`: first the entry at `token.key`, otherwise {@link ContextToken.defaultValue}.
71
+ * Used for field injection and in code that needs explicit scope access without a decorator.
72
+ *
73
+ * @template T expected value type
74
+ * @param {ContextScope} scope - node scope at read time
75
+ * @param {ContextToken<T>} token - requested token
76
+ * @returns {T} value from scope or the token default
77
+ * @throws {Error} if the key is missing in scope and the token has no `defaultValue` (no provider up the tree)
78
+ */
79
+ function readFromScope(scope, token) {
80
+ if (scope.has(token.key)) {
81
+ return scope.get(token.key);
82
+ }
83
+ if (token.defaultValue !== undefined) {
84
+ return token.defaultValue;
85
+ }
86
+ throw new Error(`[Effectable] Context token "${token.displayName}" is not provided. ` +
87
+ 'Make sure that a ContextProvider with this token exists higher in the component tree.');
88
+ }
89
+ /**
90
+ * Virtual node with no UI of its own: only extends {@link ContextScope} for descendants.
91
+ * Runtime calls {@link applyToScope} during materialization and passes the result to child nodes.
92
+ * Provider detection without `instanceof`: {@link IS_CONTEXT_PROVIDER} is set on the prototype.
93
+ *
94
+ * @example
95
+ * compose() {
96
+ * return h(ContextProvider, { value: [DB_CONTEXT, this.db] }, [
97
+ * h(DeepChild, {})
98
+ * ]);
99
+ * }
100
+ */
101
+ class ContextProvider extends Component_1.Component {
102
+ /**
103
+ * @param {ContextProviderProps} props - token–value pairs for the subtree
104
+ */
105
+ constructor(props) {
106
+ super(props);
107
+ }
108
+ /**
109
+ * Builds the child scope: copies `parentScope` and overlays entries from {@link ContextProviderProps.value}.
110
+ * Pair order in the array matters on token collision — the last pair wins.
111
+ *
112
+ * For multiple pairs: one parent copy only if `parentScope` is non-empty; when `size === 0`
113
+ * build a fresh `Map` without `new Map(parentScope)` (avoids an extra entry walk).
114
+ * A single pair in array form — delegates to {@link extendScope} (same path as one pair in props).
115
+ *
116
+ * @param {ContextScope} parentScope - scope inherited from ancestors
117
+ * @returns {ContextScope} scope for this provider's child components
118
+ */
119
+ applyToScope(parentScope) {
120
+ const { value } = this.props;
121
+ if (Array.isArray(value) && Array.isArray(value[0])) {
122
+ const pairs = value;
123
+ const n = pairs.length;
124
+ if (n === 1) {
125
+ const p = pairs[0];
126
+ return extendScope(parentScope, p[0], p[1]);
127
+ }
128
+ let next;
129
+ if (parentScope.size === 0) {
130
+ next = new Map();
131
+ }
132
+ else {
133
+ next = new Map(parentScope);
134
+ }
135
+ for (let i = 0; i < n; i += 1) {
136
+ const p = pairs[i];
137
+ next.set(p[0].key, p[1]);
138
+ }
139
+ return next;
140
+ }
141
+ // Single pair: [token, value]
142
+ const [token, val] = value;
143
+ return extendScope(parentScope, token, val);
144
+ }
145
+ /**
146
+ * The provider does not render children itself — that is done by the parent's compose/h;
147
+ * the node exists only to participate in scope computation.
148
+ *
149
+ * @returns {null} no child virtual nodes
150
+ */
151
+ compose() {
152
+ return null;
153
+ }
154
+ }
155
+ exports.ContextProvider = ContextProvider;
156
+ /**
157
+ * Marker on {@link ContextProvider.prototype}: fast “is this a provider?” check without `instanceof`
158
+ * (hot-path optimization in the runtime). Declared before {@link Object.defineProperty}, which hangs the flag on the prototype.
159
+ */
160
+ exports.IS_CONTEXT_PROVIDER = Symbol('effectable:is_context_provider');
161
+ // Symbol flag on prototype for O(1) detection instead of instanceof (1.90x on negative path)
162
+ Object.defineProperty(ContextProvider.prototype, exports.IS_CONTEXT_PROVIDER, {
163
+ value: true,
164
+ writable: false,
165
+ enumerable: false,
166
+ configurable: false,
167
+ });
168
+ // ---------------------------------------------------------------------------
169
+ // @UseContext decorator
170
+ // ---------------------------------------------------------------------------
171
+ /**
172
+ * Metadata key on the constructor: array of {@link ContextFieldMeta} for fields with {@link UseContext}.
173
+ * Filled by the decorator when the class loads.
174
+ */
175
+ exports.CONTEXT_FIELDS_META_KEY = Symbol('effectable:context_fields');
176
+ /**
177
+ * Marker on the constructor: `true` if the class has at least one {@link UseContext} field.
178
+ * Lets {@link injectContextFields} exit immediately for “pure” components without extra walks.
179
+ */
180
+ exports.HAS_CONTEXT_FIELDS_KEY = Symbol('effectable:has_context_fields');
181
+ /**
182
+ * **Field** decorator for a {@link Component} class: after instance creation the runtime assigns
183
+ * to the property the result of {@link readFromScope} for the given token and the node's current scope.
184
+ * Metadata accumulates under {@link CONTEXT_FIELDS_META_KEY}; class field order is assignment order.
185
+ *
186
+ * @template T field type (must match the token value type)
187
+ * @param {ContextToken<T>} token - which context to inject
188
+ * @returns {PropertyDecorator} standard Stage 3 property decorator
189
+ * @example
190
+ * class DeepChild extends Component {
191
+ * @UseContext(DB_CONTEXT) private db!: DatabaseService;
192
+ * }
193
+ */
194
+ function UseContext(token) {
195
+ return function (target, propertyKey) {
196
+ const constructor = target.constructor;
197
+ if (!Array.isArray(constructor[exports.CONTEXT_FIELDS_META_KEY])) {
198
+ constructor[exports.CONTEXT_FIELDS_META_KEY] = [];
199
+ }
200
+ // Set the fast-path flag when registering the first field
201
+ if (!constructor[exports.HAS_CONTEXT_FIELDS_KEY]) {
202
+ constructor[exports.HAS_CONTEXT_FIELDS_KEY] = true;
203
+ }
204
+ const existing = constructor[exports.CONTEXT_FIELDS_META_KEY];
205
+ if (existing !== undefined) {
206
+ existing.push({ propertyKey, token: token });
207
+ }
208
+ };
209
+ }
210
+ /**
211
+ * Snapshot of metadata collected by the {@link UseContext} decorator for the given constructor.
212
+ * If the decorator was never applied — returns an empty array.
213
+ *
214
+ * @param {{ [CONTEXT_FIELDS_META_KEY]?: ContextFieldMeta[] }} componentClass - component constructor
215
+ * @returns {ContextFieldMeta[]} logical field list (external array mutations are discouraged)
216
+ */
217
+ function getContextFields(componentClass) {
218
+ return componentClass[exports.CONTEXT_FIELDS_META_KEY] ?? [];
219
+ }
220
+ /**
221
+ * Fills all {@link UseContext} fields: for each {@link ContextFieldMeta} entry calls
222
+ * {@link readFromScope} and assigns the instance property. When {@link HAS_CONTEXT_FIELDS_KEY}
223
+ * is absent on the constructor, exits without work (fast path).
224
+ * Called by the runtime after `new Component(...)` and before user startup.
225
+ *
226
+ * @param {object} instance - already created component instance
227
+ * @param {ContextScope} scope - scope computed for this node (including ancestor providers)
228
+ * @returns {void}
229
+ * @throws {Error} see {@link readFromScope} — required token missing from scope
230
+ */
231
+ function injectContextFields(instance, scope) {
232
+ const constructor = instance.constructor;
233
+ // Fast-path: most HFT components do not use @UseContext (1.68x at 80% pure)
234
+ if (!constructor[exports.HAS_CONTEXT_FIELDS_KEY]) {
235
+ return;
236
+ }
237
+ const fields = constructor[exports.CONTEXT_FIELDS_META_KEY];
238
+ const target = instance;
239
+ const n = fields.length;
240
+ // Tight for-index loop without iterator allocation + inline single Map.get
241
+ // (13_EXP4 / P010, 1.37x incremental — part of the overall sync fast-path stack).
242
+ for (let i = 0; i < n; i++) {
243
+ const meta = fields[i];
244
+ const token = meta.token;
245
+ const v = scope.get(token.key);
246
+ if (v !== undefined) {
247
+ target[meta.propertyKey] = v;
248
+ }
249
+ else if (scope.has(token.key)) {
250
+ // Rare case: token is actually present with value undefined.
251
+ target[meta.propertyKey] = undefined;
252
+ }
253
+ else if (token.defaultValue !== undefined) {
254
+ target[meta.propertyKey] = token.defaultValue;
255
+ }
256
+ else {
257
+ throw new Error(`[Effectable] Context token "${token.displayName}" is not provided. ` +
258
+ 'Make sure that a ContextProvider with this token exists higher in the component tree.');
259
+ }
260
+ }
261
+ }
262
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/component/context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;AAqDH,sCASC;AAYD,kCAQC;AAYD,sCAaC;AA4JD,gCAsBC;AASD,4CAIC;AAaD,kDAuCC;AA5VD,2CAAwC;AAiCxC;;;GAGG;AACU,QAAA,mBAAmB,GAAiB,IAAI,GAAG,EAAE,CAAC;AAE3D;;;;;;;;;;;GAWG;AACH,SAAgB,aAAa,CAC3B,WAAmB,EACnB,YAAgB;IAEhB,OAAO;QACL,WAAW;QACX,YAAY;QACZ,GAAG,EAAE,MAAM,CAAC,WAAW,CAAC;KACzB,CAAC;AACJ,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,WAAW,CACzB,KAAmB,EACnB,KAAsB,EACtB,KAAQ;IAER,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;IAC5B,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,EA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M,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAE/B,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;YACpB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAC/B,CAAC;aAAM,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YAChC,6DAA6D;YAC7D,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;QACvC,CAAC;aAAM,IAAI,KAAK,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;YAC5C,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC;QAChD,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CACb,+BAA+B,KAAK,CAAC,WAAW,qBAAqB;gBACrE,uFAAuF,CACxF,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * GraphRuntime constants: dirty-flush anti-loop limits.
3
+ *
4
+ * @module Effectable/component/graphRuntime.constants
5
+ */
6
+ /**
7
+ * Maximum consecutive `flushDirtyFibers` passes in one microtask chain
8
+ * (each pass that leaves dirty work schedules the next).
9
+ * On overflow the queue is cleared and the error is forwarded to `onAutoReconcileError`.
10
+ */
11
+ export declare const GRAPH_RUNTIME_MAX_DIRTY_FLUSH_PASSES: 50;
12
+ export type GraphRuntimeMaxDirtyFlushPasses = typeof GRAPH_RUNTIME_MAX_DIRTY_FLUSH_PASSES;
13
+ //# sourceMappingURL=graphRuntime.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphRuntime.constants.d.ts","sourceRoot":"","sources":["../../src/component/graphRuntime.constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,EAAG,EAAW,CAAC;AAEhE,MAAM,MAAM,+BAA+B,GAAG,OAAO,oCAAoC,CAAC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /**
3
+ * GraphRuntime constants: dirty-flush anti-loop limits.
4
+ *
5
+ * @module Effectable/component/graphRuntime.constants
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.GRAPH_RUNTIME_MAX_DIRTY_FLUSH_PASSES = void 0;
9
+ /**
10
+ * Maximum consecutive `flushDirtyFibers` passes in one microtask chain
11
+ * (each pass that leaves dirty work schedules the next).
12
+ * On overflow the queue is cleared and the error is forwarded to `onAutoReconcileError`.
13
+ */
14
+ exports.GRAPH_RUNTIME_MAX_DIRTY_FLUSH_PASSES = 50;
15
+ //# sourceMappingURL=graphRuntime.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphRuntime.constants.js","sourceRoot":"","sources":["../../src/component/graphRuntime.constants.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH;;;;GAIG;AACU,QAAA,oCAAoC,GAAG,EAAW,CAAC"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * VirtualServiceNode factory for declarative component tree composition.
3
+ * Declarative element factory for a backend runtime graph (virtual service nodes).
4
+ *
5
+ * h() describes topology with no side effects — no network calls,
6
+ * subscriptions, or handler registration inside an h() call.
7
+ *
8
+ * @module Effectable/component/h
9
+ */
10
+ import type { ComponentConstructor, RefObject, VirtualServiceNode } from './types';
11
+ /** Empty props: `Record<string, never>` — omit the second argument to `h`. */
12
+ type EmptyProps = Record<string, never>;
13
+ /**
14
+ * Creates a VirtualServiceNode — a declarative node description for GraphRuntime.
15
+ *
16
+ * Overloads:
17
+ * - h(type) — node with empty props (`Record<string, never>`), without `{}`
18
+ * - h(type, props) — node without ref/children/key
19
+ * - h(type, props, key) — node with key only (for dynamic lists)
20
+ * - h(type, props, children) — node with children
21
+ * - h(type, props, children, key) — node with children and key
22
+ * - h(type, props, ref) — node with ref
23
+ * - h(type, props, ref, key) — node with ref and key
24
+ * - h(type, props, ref, children) — node with ref and children
25
+ * - h(type, props, ref, children, key) — node with ref, children, and key
26
+ *
27
+ * `key` — stable identity key for diffing dynamic lists.
28
+ * Detected via `typeof === 'string'` in any free positional slot.
29
+ *
30
+ * @param {new (props: P) => Component<unknown, P>} type - component class
31
+ * @param {P} [props] - component props; omit for empty props
32
+ * @param {RefObject<unknown> | VirtualServiceNode[] | string | undefined} refOrChildrenOrKey - ref, children, or key
33
+ * @param {VirtualServiceNode[] | string | undefined} childrenOrKey - children or key
34
+ * @param {string | undefined} maybeKey - explicit key (when ref and children slots are already used)
35
+ * @returns {VirtualServiceNode<P>} virtual node
36
+ * @example
37
+ * h(SharedClientServiceComponent)
38
+ * h(OrderService, { symbol: 'BTCUSDT' })
39
+ * h(OrderService, { symbol: 'BTCUSDT' }, ordersRef)
40
+ * h(ContextProvider, { value: [DB_CONTEXT, db] }, [h(DeepChild)])
41
+ * h(Parent, undefined, parentRef, [h(Child)])
42
+ * h(PairMonitor, { pair: 'BTCUSDT' }, 'btc')
43
+ * h(PairMonitor, { pair: 'BTCUSDT' }, parentRef, [h(Child)], 'btc')
44
+ */
45
+ export declare function h(type: ComponentConstructor<EmptyProps>): VirtualServiceNode<EmptyProps>;
46
+ export declare function h<P>(type: ComponentConstructor<P>, props: P, refOrChildrenOrKey?: RefObject<unknown> | VirtualServiceNode[] | string, childrenOrKey?: VirtualServiceNode[] | string, maybeKey?: string): VirtualServiceNode<P>;
47
+ export {};
48
+ //# sourceMappingURL=h.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"h.d.ts","sourceRoot":"","sources":["../../src/component/h.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAUnF,8EAA8E;AAC9E,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,CAAC,CACf,IAAI,EAAE,oBAAoB,CAAC,UAAU,CAAC,GACrC,kBAAkB,CAAC,UAAU,CAAC,CAAC;AAClC,wBAAgB,CAAC,CAAC,CAAC,EACjB,IAAI,EAAE,oBAAoB,CAAC,CAAC,CAAC,EAC7B,KAAK,EAAE,CAAC,EACR,kBAAkB,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,GAAG,kBAAkB,EAAE,GAAG,MAAM,EACvE,aAAa,CAAC,EAAE,kBAAkB,EAAE,GAAG,MAAM,EAC7C,QAAQ,CAAC,EAAE,MAAM,GAChB,kBAAkB,CAAC,CAAC,CAAC,CAAC"}