informa 3.1.1 → 4.0.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.
- package/README.md +171 -184
- package/dist/EnumerableWeakSet.d.ts +10 -0
- package/dist/EnumerableWeakSet.d.ts.map +1 -0
- package/dist/EnumerableWeakSet.js +44 -0
- package/dist/EnumerableWeakSet.js.map +1 -0
- package/dist/high.d.ts +2 -3
- package/dist/high.d.ts.map +1 -1
- package/dist/high.js +1 -2
- package/dist/high.js.map +1 -1
- package/dist/internals.d.ts +3 -0
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +4 -1
- package/dist/internals.js.map +1 -1
- package/dist/low.d.ts +16 -0
- package/dist/low.d.ts.map +1 -1
- package/dist/low.js +150 -0
- package/dist/low.js.map +1 -1
- package/dist/quirks/array.d.ts +4 -3
- package/dist/quirks/array.d.ts.map +1 -1
- package/dist/quirks/array.js +163 -75
- package/dist/quirks/array.js.map +1 -1
- package/dist/quirks/basestatified.d.ts +24 -2
- package/dist/quirks/basestatified.d.ts.map +1 -1
- package/dist/quirks/basestatified.js +240 -91
- package/dist/quirks/basestatified.js.map +1 -1
- package/dist/quirks/basestatified.test.d.ts +9 -0
- package/dist/quirks/basestatified.test.d.ts.map +1 -0
- package/dist/quirks/basestatified.test.js +291 -0
- package/dist/quirks/basestatified.test.js.map +1 -0
- package/dist/quirks/map.d.ts.map +1 -1
- package/dist/quirks/map.js +1 -0
- package/dist/quirks/map.js.map +1 -1
- package/dist/quirks/set.d.ts.map +1 -1
- package/dist/quirks/set.js +1 -0
- package/dist/quirks/set.js.map +1 -1
- package/dist/test.js +2 -6
- package/dist/test.js.map +1 -1
- package/package.json +1 -1
- package/src/EnumerableWeakSet.ts +46 -0
- package/src/high.ts +2 -3
- package/src/internals.ts +4 -0
- package/src/low.ts +120 -1
- package/src/quirks/array.ts +168 -92
- package/src/quirks/basestatified.test.ts +375 -0
- package/src/quirks/basestatified.ts +289 -125
- package/src/quirks/map.ts +3 -1
- package/src/quirks/set.ts +3 -1
- package/src/test.ts +13 -15
|
@@ -1,111 +1,260 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
3
|
+
exports.statifyClass = statifyClass;
|
|
4
|
+
const EnumerableWeakMap_js_1 = require("../EnumerableWeakMap.js");
|
|
5
|
+
const EnumerableWeakSet_js_1 = require("../EnumerableWeakSet.js");
|
|
5
6
|
const internals_js_1 = require("../internals.js");
|
|
6
7
|
const low_js_1 = require("../low.js");
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
8
|
+
// Classes whose instances have been constructed but not yet field-instrumented.
|
|
9
|
+
const pendingAssemblies = new EnumerableWeakSet_js_1.EnumerableWeakSet();
|
|
10
|
+
// Map from a still-pending child instance → list of (parentMetadata, prop) pairs
|
|
11
|
+
// that need hook() called once the child is reconciled.
|
|
12
|
+
const deferredHooks = new EnumerableWeakMap_js_1.EnumerableWeakMap();
|
|
13
|
+
// One shim proxy per outermost constructor (new.target).
|
|
14
|
+
const shimCache = new WeakMap();
|
|
15
|
+
function getPrototypeChainDescriptor(obj, prop) {
|
|
16
|
+
let curr = obj;
|
|
17
|
+
while (curr !== null) {
|
|
18
|
+
const desc = Object.getOwnPropertyDescriptor(curr, prop);
|
|
19
|
+
if (desc)
|
|
20
|
+
return desc;
|
|
21
|
+
curr = Object.getPrototypeOf(curr);
|
|
22
|
+
}
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
const shimHandler = {
|
|
26
|
+
get(target, prop, recv) {
|
|
27
|
+
// Always signal that this object is statified.
|
|
28
|
+
if (prop === internals_js_1.statifySealKey)
|
|
29
|
+
return true;
|
|
30
|
+
if ((0, internals_js_1.getGlobalStateMode)() === "extract-proxy-path") {
|
|
31
|
+
// Root-level exit: this instance IS the stateRoot.
|
|
32
|
+
if (prop === internals_js_1.exitProxySymbol) {
|
|
33
|
+
return { path: [], stateRoot: recv };
|
|
26
34
|
}
|
|
27
|
-
if
|
|
28
|
-
|
|
35
|
+
// Safety net: reconcile if somehow still pending at extraction time.
|
|
36
|
+
if (pendingAssemblies.has(recv)) {
|
|
37
|
+
reconcileInstance(recv);
|
|
29
38
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
// Forward to extract() so the path is captured.
|
|
40
|
+
// Own accessor properties on recv are already handling extract-proxy-path
|
|
41
|
+
// themselves; the shim is only reached for prototype-level props.
|
|
42
|
+
return (0, low_js_1.extract)(Reflect.get(target, prop, recv), recv, [prop]);
|
|
43
|
+
}
|
|
44
|
+
return Reflect.get(target, prop, recv);
|
|
45
|
+
},
|
|
46
|
+
set(target, prop, newVal, recv) {
|
|
47
|
+
// This trap fires only when `prop` is NOT an own property of `recv`.
|
|
48
|
+
// That covers:
|
|
49
|
+
// (a) Pre-reconciliation field initializer writes → create own data prop.
|
|
50
|
+
// (b) Prototype accessor writes (e.g. `get state()` / `set state()`).
|
|
51
|
+
// (c) Genuinely new dynamic property additions.
|
|
52
|
+
//
|
|
53
|
+
// Own accessor properties installed by reconcileInstance are handled
|
|
54
|
+
// by their own setters and never reach here.
|
|
55
|
+
// Check for a prototype-level accessor setter BEFORE calling Reflect.set.
|
|
56
|
+
const protoDesc = getPrototypeChainDescriptor(target, prop);
|
|
57
|
+
// Delegate the actual assignment.
|
|
58
|
+
const result = Reflect.set(target, prop, newVal, recv);
|
|
59
|
+
// If this was a prototype accessor write and the instance has metadata,
|
|
60
|
+
// emit replacement events so subscribers fire.
|
|
61
|
+
if (result && protoDesc?.set && internals_js_1.metadataMap.has(recv)) {
|
|
33
62
|
const stateMetadata = (0, internals_js_1.getMetadataOf)(recv);
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
63
|
+
stateMetadata.emit("replaceProp", newVal, prop);
|
|
64
|
+
const ee = stateMetadata.eventEmitterAtPathMaybe([prop]);
|
|
65
|
+
if (ee) {
|
|
66
|
+
ee.emit("replace", newVal);
|
|
67
|
+
(0, low_js_1.emitDescendantPathEvents)(stateMetadata, [prop], newVal, true);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return result;
|
|
71
|
+
},
|
|
72
|
+
has(target, prop) {
|
|
73
|
+
if (prop === internals_js_1.statifySealKey || prop === internals_js_1.exitProxySymbol)
|
|
74
|
+
return true;
|
|
75
|
+
return Reflect.has(target, prop);
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
function getOrCreateShim(ctor) {
|
|
79
|
+
const cached = shimCache.get(ctor);
|
|
80
|
+
if (cached)
|
|
81
|
+
return cached;
|
|
82
|
+
// shimTarget's [[Prototype]] = ctor.prototype, so the full chain is:
|
|
83
|
+
// instance → shim → shimTarget → ctor.prototype → … → Superclass.prototype
|
|
84
|
+
// This preserves instanceof for all classes in the chain.
|
|
85
|
+
const shimTarget = Object.create(ctor.prototype);
|
|
86
|
+
const shim = new Proxy(shimTarget, shimHandler);
|
|
87
|
+
shimCache.set(ctor, shim);
|
|
88
|
+
return shim;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Converts all enumerable, configurable own data properties of `instance` into
|
|
92
|
+
* accessor-backed reactive properties connected to `instance`'s StateMetadata.
|
|
93
|
+
*
|
|
94
|
+
* Idempotent: returns immediately if the instance is not in pendingAssemblies.
|
|
95
|
+
*/
|
|
96
|
+
function reconcileInstance(instance) {
|
|
97
|
+
if (!pendingAssemblies.has(instance))
|
|
98
|
+
return;
|
|
99
|
+
pendingAssemblies.delete(instance);
|
|
100
|
+
// Drain any deferred hooks where this instance was the pending child.
|
|
101
|
+
const deferred = deferredHooks.get(instance);
|
|
102
|
+
if (deferred) {
|
|
103
|
+
deferredHooks.delete(instance);
|
|
104
|
+
const childMetadata = (0, internals_js_1.getMetadataOf)(instance);
|
|
105
|
+
for (const { metadata: parentMetadata, prop } of deferred) {
|
|
106
|
+
(0, low_js_1.hook)(parentMetadata, prop, childMetadata);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
// Metadata was installed eagerly in ExtractionShimBase's constructor.
|
|
110
|
+
const metadata = (0, internals_js_1.getMetadataOf)(instance);
|
|
111
|
+
const isArray = Array.isArray(instance);
|
|
112
|
+
const props = [
|
|
113
|
+
...Object.getOwnPropertyNames(instance),
|
|
114
|
+
...Object.getOwnPropertySymbols(instance),
|
|
115
|
+
];
|
|
116
|
+
for (const prop of props) {
|
|
117
|
+
// Skip Informa internal symbols.
|
|
118
|
+
if (prop === internals_js_1.statifySealKey || prop === internals_js_1.exitProxySymbol)
|
|
119
|
+
continue;
|
|
120
|
+
// Skip array numeric indices — managed by the array's own push/pop/splice overrides.
|
|
121
|
+
if (isArray && typeof prop === "string" && Number.isInteger(Number(prop)))
|
|
122
|
+
continue;
|
|
123
|
+
const desc = Object.getOwnPropertyDescriptor(instance, prop);
|
|
124
|
+
// Non-configurable: cannot be redefined; leave non-reactive.
|
|
125
|
+
// Note: these properties retain their value but won't participate in the
|
|
126
|
+
// observable graph. This is intentional and tested.
|
|
127
|
+
if (!desc.configurable)
|
|
128
|
+
continue;
|
|
129
|
+
// Existing accessor (get/set): do not double-wrap.
|
|
130
|
+
if ("get" in desc || "set" in desc)
|
|
131
|
+
continue;
|
|
132
|
+
// ---- Instrument this configurable data property ----
|
|
133
|
+
let value = desc.value;
|
|
134
|
+
// Hook the initial value if it is itself statified.
|
|
135
|
+
if (value != null &&
|
|
136
|
+
typeof value === "object" &&
|
|
137
|
+
(0, internals_js_1.isStatified)(value)) {
|
|
138
|
+
if (pendingAssemblies.has(value)) {
|
|
139
|
+
// The nested value is itself pending (constructed during this constructor
|
|
140
|
+
// but not yet reconciled — its metadata doesn't exist yet). Defer the
|
|
141
|
+
// hook: it will be wired once reconcileInstance runs for that child.
|
|
142
|
+
deferredHooks.getOrInsertComputed(value, () => []).push({ metadata, prop });
|
|
40
143
|
}
|
|
41
144
|
else {
|
|
42
|
-
|
|
145
|
+
(0, low_js_1.hook)(metadata, prop, (0, internals_js_1.getMetadataOf)(value));
|
|
43
146
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
147
|
+
}
|
|
148
|
+
Object.defineProperty(instance, prop, {
|
|
149
|
+
get() {
|
|
150
|
+
if ((0, internals_js_1.getGlobalStateMode)() === "extract-proxy-path") {
|
|
151
|
+
return (0, low_js_1.extract)(value, this, [prop]);
|
|
152
|
+
}
|
|
153
|
+
return value;
|
|
154
|
+
},
|
|
155
|
+
set(next) {
|
|
156
|
+
const old = value;
|
|
157
|
+
value = next;
|
|
158
|
+
if (old !== next) {
|
|
159
|
+
if (old != null &&
|
|
160
|
+
typeof old === "object" &&
|
|
161
|
+
(0, internals_js_1.isStatified)(old)) {
|
|
162
|
+
(0, low_js_1.unhook)(metadata, prop, (0, internals_js_1.getMetadataOf)(old));
|
|
59
163
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
maybeEventEmitterAtPath.emit("replace", newVal);
|
|
65
|
-
}
|
|
66
|
-
maybeEventEmitterAtPath.emit("set", newVal);
|
|
67
|
-
(0, low_js_1.emitDescendantPathEvents)(stateMetadata, [prop], newVal, had);
|
|
164
|
+
if (next != null &&
|
|
165
|
+
typeof next === "object" &&
|
|
166
|
+
(0, internals_js_1.isStatified)(next)) {
|
|
167
|
+
(0, low_js_1.hook)(metadata, prop, (0, internals_js_1.getMetadataOf)(next));
|
|
68
168
|
}
|
|
169
|
+
(0, low_js_1.emitCollectionTransition)(old, next);
|
|
69
170
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
171
|
+
// Enter the existing replacement machinery — same path as statifyObject's
|
|
172
|
+
// set trap in low.ts. "listen → replace → fire" is preserved because this
|
|
173
|
+
// accessor is installed before any external mutation can reach the field.
|
|
174
|
+
metadata.emit("replaceProp", next, prop);
|
|
175
|
+
const ee = metadata.eventEmitterAtPathMaybe([prop]);
|
|
176
|
+
if (ee) {
|
|
177
|
+
ee.emit("replace", next);
|
|
178
|
+
(0, low_js_1.emitDescendantPathEvents)(metadata, [prop], next, true);
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
enumerable: desc.enumerable ?? true,
|
|
182
|
+
configurable: true,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
// Selector/stateRoot identity: verified correct. Every on*()/off*() call goes
|
|
186
|
+
// through selectorToRootAndPath(), which fires preExtractionHooks() before
|
|
187
|
+
// entering extract-proxy-path mode. The preExtractionHook registered below
|
|
188
|
+
// reconciles all pending instances first — so by the time the selector function
|
|
189
|
+
// runs, every pending `this.x` field is already an accessor that returns
|
|
190
|
+
// extract(value, this, ['x']). Path chains like `() => this.a.b.c` are therefore
|
|
191
|
+
// built up correctly, and stateRoot is the raw instance, which is the same object
|
|
192
|
+
// keyed in metadataMap. No re-mapping needed.
|
|
85
193
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
//
|
|
91
|
-
|
|
194
|
+
// Before selectorToRootAndPath enters extract-proxy-path mode it calls all
|
|
195
|
+
// registered hooks. This hook reconciles every pending instance so that their
|
|
196
|
+
// own data properties are already accessor-backed when the selector runs.
|
|
197
|
+
(0, low_js_1.registerPreExtractionHook)(() => {
|
|
198
|
+
// Snapshot: reconcileInstance removes from pendingAssemblies, which mutates
|
|
199
|
+
// the set during iteration — take a copy first.
|
|
200
|
+
const snapshot = [...pendingAssemblies];
|
|
201
|
+
for (const instance of snapshot) {
|
|
202
|
+
reconcileInstance(instance);
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
/**
|
|
206
|
+
* Wraps a user-defined class factory in the Informa observable lifecycle.
|
|
207
|
+
*
|
|
208
|
+
* Usage:
|
|
209
|
+
* ```ts
|
|
210
|
+
* const MyClass = statifyClass(
|
|
211
|
+
* (Base) => class MyClass extends Base {
|
|
212
|
+
* name = "default";
|
|
213
|
+
* constructor(name: string) { super(); this.name = name; }
|
|
214
|
+
* },
|
|
215
|
+
* Object,
|
|
216
|
+
* );
|
|
217
|
+
* ```
|
|
218
|
+
*
|
|
219
|
+
* Construction lifecycle:
|
|
220
|
+
* 1. ExtractionShimBase constructor runs → metadata installed, shim set as prototype.
|
|
221
|
+
* 2. UserSubclass field initializers run → own data properties created on instance.
|
|
222
|
+
* 3. UserSubclass constructor body runs.
|
|
223
|
+
* 4. Instance is in pendingAssemblies (field instrumentation deferred).
|
|
224
|
+
* 5. On first `on()`/`off()` call → registerPreExtractionHook fires → reconcileInstance
|
|
225
|
+
* converts own data properties to reactive accessor-backed properties.
|
|
226
|
+
*/
|
|
227
|
+
function statifyClass(makeSubclass, Superclass) {
|
|
228
|
+
// ExtractionShimBase sits between Superclass and the user's class.
|
|
229
|
+
// Its constructor:
|
|
230
|
+
// - Installs StateMetadata on the instance eagerly (so subclasses like
|
|
231
|
+
// StatifiedArray can call getMetadataOf() from their constructor bodies).
|
|
232
|
+
// - Marks the instance as pending for lazy field instrumentation.
|
|
233
|
+
// - Inserts the shim proxy as the instance's [[Prototype]], enabling
|
|
234
|
+
// statifySealKey / exitProxySymbol / extract-proxy-path handling.
|
|
235
|
+
//
|
|
236
|
+
// Guard: in nested statifyClass chains (e.g. statifyClass(..., A) where A
|
|
237
|
+
// was itself produced by statifyClass), multiple ExtractionShimBase
|
|
238
|
+
// constructors run. The guard ensures setup happens exactly once — at the
|
|
239
|
+
// innermost (deepest) ExtractionShimBase call.
|
|
240
|
+
class ExtractionShimBase extends Superclass {
|
|
92
241
|
constructor(...args) {
|
|
93
242
|
super(...args);
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
243
|
+
if (!pendingAssemblies.has(this)) {
|
|
244
|
+
(0, internals_js_1.setMetadataOf)(this, new low_js_1.StateMetadata());
|
|
245
|
+
pendingAssemblies.add(this);
|
|
246
|
+
}
|
|
247
|
+
// Always update the shim to match the outermost constructor (new.target).
|
|
248
|
+
// In nested chains the innermost ExtractionShimBase sets the shim first;
|
|
249
|
+
// subsequent (shallower) ones overwrite it with the same value since
|
|
250
|
+
// new.target propagates as the outermost class throughout the chain.
|
|
251
|
+
const ctor = (new.target ?? ExtractionShimBase);
|
|
252
|
+
Reflect.setPrototypeOf(this, getOrCreateShim(ctor));
|
|
104
253
|
}
|
|
105
254
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
255
|
+
// Invoke the user's factory with the shim base, then return the result.
|
|
256
|
+
// No outer Statified wrapper is needed: field instrumentation is lazy,
|
|
257
|
+
// triggered by registerPreExtractionHook before any selectorToRootAndPath call.
|
|
258
|
+
return makeSubclass(ExtractionShimBase);
|
|
109
259
|
}
|
|
110
|
-
exports.BaseStatified = makeStatified(Object);
|
|
111
260
|
//# sourceMappingURL=basestatified.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basestatified.js","sourceRoot":"","sources":["../../src/quirks/basestatified.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"basestatified.js","sourceRoot":"","sources":["../../src/quirks/basestatified.ts"],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E;YAC1E,yEAAyE;YACzE,qEAAqE;YACrE,qEAAqE;YACrE,MAAM,IAAI,GAAG,CAAC,IAAI,MAAM,IAAI,kBAAkB,CAAa,CAAC;YAC5D,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;QACtD,CAAC;KACF;IAED,wEAAwE;IACxE,uEAAuE;IACvE,gFAAgF;IAChF,OAAO,YAAY,CACjB,kBAA+C,CACiB,CAAC;AACrE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Acceptance tests for statifyClass / makeStatified / BaseStatified.
|
|
3
|
+
*
|
|
4
|
+
* Run with: npx tsx src/quirks/basestatified.test.ts
|
|
5
|
+
*
|
|
6
|
+
* Uses Node.js built-in assert — no test framework required.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=basestatified.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basestatified.test.d.ts","sourceRoot":"","sources":["../../src/quirks/basestatified.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|