@graphrefly/graphrefly 0.11.0 → 0.13.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/dist/{chunk-FMVFRP7L.js → chunk-5RN7NBNG.js} +5 -5
- package/dist/{chunk-UG2QZMRN.js → chunk-6B2ZCCNN.js} +40 -39
- package/dist/chunk-6B2ZCCNN.js.map +1 -0
- package/dist/{chunk-2VHNCFGG.js → chunk-H4UFM6WD.js} +46 -17
- package/dist/chunk-H4UFM6WD.js.map +1 -0
- package/dist/{chunk-PZCDQD2U.js → chunk-HA6QMDKQ.js} +4 -4
- package/dist/{chunk-5WXTWOD7.js → chunk-KNGOJEYP.js} +2 -2
- package/dist/{chunk-OHUECHWY.js → chunk-PFMXKG4Y.js} +2 -2
- package/dist/{chunk-U5HFZGAQ.js → chunk-QOGWU5K7.js} +3 -3
- package/dist/{chunk-3WACHRHV.js → chunk-UPC5OEB5.js} +17 -17
- package/dist/chunk-UPC5OEB5.js.map +1 -0
- package/dist/{chunk-2OTXEZQO.js → chunk-UQI4GAHD.js} +3 -3
- package/dist/compat/nestjs/index.cjs +37 -37
- package/dist/compat/nestjs/index.cjs.map +1 -1
- package/dist/compat/nestjs/index.d.cts +4 -4
- package/dist/compat/nestjs/index.d.ts +4 -4
- package/dist/compat/nestjs/index.js +7 -7
- package/dist/core/index.cjs +39 -39
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +5 -5
- package/dist/extra/index.cjs +79 -51
- package/dist/extra/index.cjs.map +1 -1
- package/dist/extra/index.d.cts +4 -4
- package/dist/extra/index.d.ts +4 -4
- package/dist/extra/index.js +5 -5
- package/dist/graph/index.cjs +37 -37
- package/dist/graph/index.cjs.map +1 -1
- package/dist/graph/index.d.cts +3 -3
- package/dist/graph/index.d.ts +3 -3
- package/dist/graph/index.js +4 -4
- package/dist/{graph-DXT95WZ3.d.ts → graph-BXIK5Dq5.d.ts} +1 -1
- package/dist/{graph-BE10ujU9.d.cts → graph-BhADtuFU.d.cts} +1 -1
- package/dist/{index-QfbXNW1N.d.cts → index-BNB0KjKe.d.ts} +24 -21
- package/dist/{index-C0_7g9sj.d.ts → index-BkToATim.d.ts} +1 -1
- package/dist/{index-Bbgvinsi.d.ts → index-CKyYg4IP.d.ts} +17 -13
- package/dist/{index-CCvzN5GB.d.cts → index-DANO9Gg7.d.cts} +2 -2
- package/dist/{index-DpZozxaJ.d.cts → index-DBhLjWSV.d.cts} +17 -13
- package/dist/{index-Dzdm20sx.d.ts → index-DKIyo4Bq.d.cts} +24 -21
- package/dist/{index-53cDGX7F.d.ts → index-DSp5R3Xq.d.ts} +3 -3
- package/dist/{index-aBZ2RoP0.d.cts → index-Dqemj9q0.d.cts} +3 -3
- package/dist/{index-nRulwTr-.d.cts → index-Wa8jXne6.d.cts} +1 -1
- package/dist/{index-B10Q0sQB.d.ts → index-fYObbpUw.d.ts} +2 -2
- package/dist/index.cjs +283 -71
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +85 -15
- package/dist/index.d.ts +85 -15
- package/dist/index.js +200 -16
- package/dist/index.js.map +1 -1
- package/dist/{meta-BcuDhtwu.d.cts → meta-CrZUQAJ6.d.cts} +1 -1
- package/dist/{meta-BcuDhtwu.d.ts → meta-CrZUQAJ6.d.ts} +1 -1
- package/dist/patterns/reactive-layout/index.cjs +50 -50
- package/dist/patterns/reactive-layout/index.cjs.map +1 -1
- package/dist/patterns/reactive-layout/index.d.cts +3 -3
- package/dist/patterns/reactive-layout/index.d.ts +3 -3
- package/dist/patterns/reactive-layout/index.js +4 -4
- package/dist/{reactive-log-OULQssZg.d.cts → reactive-log-ChbpUrY2.d.cts} +2 -2
- package/dist/{reactive-log-Cu0VdqkT.d.ts → reactive-log-DV--7BWd.d.ts} +2 -2
- package/package.json +1 -1
- package/dist/chunk-2VHNCFGG.js.map +0 -1
- package/dist/chunk-3WACHRHV.js.map +0 -1
- package/dist/chunk-UG2QZMRN.js.map +0 -1
- /package/dist/{chunk-FMVFRP7L.js.map → chunk-5RN7NBNG.js.map} +0 -0
- /package/dist/{chunk-PZCDQD2U.js.map → chunk-HA6QMDKQ.js.map} +0 -0
- /package/dist/{chunk-5WXTWOD7.js.map → chunk-KNGOJEYP.js.map} +0 -0
- /package/dist/{chunk-OHUECHWY.js.map → chunk-PFMXKG4Y.js.map} +0 -0
- /package/dist/{chunk-U5HFZGAQ.js.map → chunk-QOGWU5K7.js.map} +0 -0
- /package/dist/{chunk-2OTXEZQO.js.map → chunk-UQI4GAHD.js.map} +0 -0
|
@@ -447,12 +447,12 @@ function partitionForBatch(messages) {
|
|
|
447
447
|
}
|
|
448
448
|
return { immediate, deferred, terminal };
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function downWithBatch(sink, messages, phase = 2, options) {
|
|
451
451
|
if (messages.length === 0) {
|
|
452
452
|
return;
|
|
453
453
|
}
|
|
454
454
|
if (options?.strategy === "sequential") {
|
|
455
|
-
|
|
455
|
+
_downSequential(sink, messages, phase);
|
|
456
456
|
return;
|
|
457
457
|
}
|
|
458
458
|
const queue = phase === 3 ? pendingPhase3 : pendingPhase2;
|
|
@@ -460,61 +460,61 @@ function emitWithBatch(emit, messages, phase = 2, options) {
|
|
|
460
460
|
const t = messages[0][0];
|
|
461
461
|
if (t === DATA || t === RESOLVED) {
|
|
462
462
|
if (isBatching()) {
|
|
463
|
-
queue.push(() =>
|
|
463
|
+
queue.push(() => sink(messages));
|
|
464
464
|
} else {
|
|
465
|
-
|
|
465
|
+
sink(messages);
|
|
466
466
|
}
|
|
467
467
|
} else if (isTerminalMessage(t)) {
|
|
468
468
|
if (isBatching()) {
|
|
469
|
-
queue.push(() =>
|
|
469
|
+
queue.push(() => sink(messages));
|
|
470
470
|
} else {
|
|
471
|
-
|
|
471
|
+
sink(messages);
|
|
472
472
|
}
|
|
473
473
|
} else {
|
|
474
|
-
|
|
474
|
+
sink(messages);
|
|
475
475
|
}
|
|
476
476
|
return;
|
|
477
477
|
}
|
|
478
478
|
const { immediate, deferred, terminal } = partitionForBatch(messages);
|
|
479
479
|
if (immediate.length > 0) {
|
|
480
|
-
|
|
480
|
+
sink(immediate);
|
|
481
481
|
}
|
|
482
482
|
if (isBatching()) {
|
|
483
483
|
if (deferred.length > 0) {
|
|
484
|
-
queue.push(() =>
|
|
484
|
+
queue.push(() => sink(deferred));
|
|
485
485
|
}
|
|
486
486
|
if (terminal.length > 0) {
|
|
487
|
-
queue.push(() =>
|
|
487
|
+
queue.push(() => sink(terminal));
|
|
488
488
|
}
|
|
489
489
|
} else {
|
|
490
490
|
if (deferred.length > 0) {
|
|
491
|
-
|
|
491
|
+
sink(deferred);
|
|
492
492
|
}
|
|
493
493
|
if (terminal.length > 0) {
|
|
494
|
-
|
|
494
|
+
sink(terminal);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function _downSequential(sink, messages, phase = 2) {
|
|
499
499
|
const dataQueue = phase === 3 ? pendingPhase3 : pendingPhase2;
|
|
500
500
|
for (const msg of messages) {
|
|
501
501
|
const tier = messageTier(msg[0]);
|
|
502
502
|
if (tier === 2) {
|
|
503
503
|
if (isBatching()) {
|
|
504
504
|
const m = msg;
|
|
505
|
-
dataQueue.push(() =>
|
|
505
|
+
dataQueue.push(() => sink([m]));
|
|
506
506
|
} else {
|
|
507
|
-
|
|
507
|
+
sink([msg]);
|
|
508
508
|
}
|
|
509
509
|
} else if (tier >= 3) {
|
|
510
510
|
if (isBatching()) {
|
|
511
511
|
const m = msg;
|
|
512
|
-
pendingPhase3.push(() =>
|
|
512
|
+
pendingPhase3.push(() => sink([m]));
|
|
513
513
|
} else {
|
|
514
|
-
|
|
514
|
+
sink([msg]);
|
|
515
515
|
}
|
|
516
516
|
} else {
|
|
517
|
-
|
|
517
|
+
sink([msg]);
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
520
|
}
|
|
@@ -764,7 +764,7 @@ var NodeImpl = class {
|
|
|
764
764
|
_singleDepSinks = /* @__PURE__ */ new WeakSet();
|
|
765
765
|
_upstreamUnsubs = [];
|
|
766
766
|
_actions;
|
|
767
|
-
|
|
767
|
+
_boundDownToSinks;
|
|
768
768
|
_inspectorHook;
|
|
769
769
|
_versioning;
|
|
770
770
|
_hashFn;
|
|
@@ -811,7 +811,7 @@ var NodeImpl = class {
|
|
|
811
811
|
},
|
|
812
812
|
emit(value) {
|
|
813
813
|
self._manualEmitUsed = true;
|
|
814
|
-
self.
|
|
814
|
+
self._downAutoValue(value);
|
|
815
815
|
},
|
|
816
816
|
up(messages) {
|
|
817
817
|
self._upInternal(messages);
|
|
@@ -819,7 +819,7 @@ var NodeImpl = class {
|
|
|
819
819
|
};
|
|
820
820
|
this.down = this.down.bind(this);
|
|
821
821
|
this.up = this.up.bind(this);
|
|
822
|
-
this.
|
|
822
|
+
this._boundDownToSinks = this._downToSinks.bind(this);
|
|
823
823
|
}
|
|
824
824
|
get name() {
|
|
825
825
|
return this._registryName ?? this._optsName;
|
|
@@ -925,12 +925,12 @@ var NodeImpl = class {
|
|
|
925
925
|
if (sinkMessages[i][0] !== DIRTY) filtered.push(sinkMessages[i]);
|
|
926
926
|
}
|
|
927
927
|
if (filtered.length > 0) {
|
|
928
|
-
|
|
928
|
+
downWithBatch(this._boundDownToSinks, filtered);
|
|
929
929
|
}
|
|
930
930
|
return;
|
|
931
931
|
}
|
|
932
932
|
}
|
|
933
|
-
|
|
933
|
+
downWithBatch(this._boundDownToSinks, sinkMessages);
|
|
934
934
|
}
|
|
935
935
|
subscribe(sink, hints) {
|
|
936
936
|
if (hints?.actor != null && this._guard != null) {
|
|
@@ -1017,7 +1017,7 @@ var NodeImpl = class {
|
|
|
1017
1017
|
this._disconnectUpstream();
|
|
1018
1018
|
}
|
|
1019
1019
|
// --- Private methods (prototype, _ prefix) ---
|
|
1020
|
-
|
|
1020
|
+
_downToSinks(messages) {
|
|
1021
1021
|
if (this._sinks == null) return;
|
|
1022
1022
|
if (typeof this._sinks === "function") {
|
|
1023
1023
|
this._sinks(messages);
|
|
@@ -1079,7 +1079,7 @@ var NodeImpl = class {
|
|
|
1079
1079
|
_canSkipDirty() {
|
|
1080
1080
|
return this._sinkCount === 1 && this._singleDepSinkCount === 1;
|
|
1081
1081
|
}
|
|
1082
|
-
|
|
1082
|
+
_downAutoValue(value) {
|
|
1083
1083
|
const wasDirty = this._status === "dirty";
|
|
1084
1084
|
let unchanged;
|
|
1085
1085
|
try {
|
|
@@ -1132,7 +1132,7 @@ var NodeImpl = class {
|
|
|
1132
1132
|
this._cleanup = out.cleanup;
|
|
1133
1133
|
if (this._manualEmitUsed) return;
|
|
1134
1134
|
if ("value" in out) {
|
|
1135
|
-
this.
|
|
1135
|
+
this._downAutoValue(out.value);
|
|
1136
1136
|
}
|
|
1137
1137
|
return;
|
|
1138
1138
|
}
|
|
@@ -1142,7 +1142,7 @@ var NodeImpl = class {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
if (this._manualEmitUsed) return;
|
|
1144
1144
|
if (out === void 0) return;
|
|
1145
|
-
this.
|
|
1145
|
+
this._downAutoValue(out);
|
|
1146
1146
|
} catch (err) {
|
|
1147
1147
|
const errMsg = err instanceof Error ? err.message : String(err);
|
|
1148
1148
|
const wrapped = new Error(`Node "${this.name}": fn threw: ${errMsg}`, { cause: err });
|
|
@@ -2150,7 +2150,7 @@ var DynamicNodeImpl = class {
|
|
|
2150
2150
|
_singleDepSinks = /* @__PURE__ */ new WeakSet();
|
|
2151
2151
|
// Actions object (for onMessage handler)
|
|
2152
2152
|
_actions;
|
|
2153
|
-
|
|
2153
|
+
_boundDownToSinks;
|
|
2154
2154
|
// Mutable state
|
|
2155
2155
|
_cached = NO_VALUE;
|
|
2156
2156
|
_status = "disconnected";
|
|
@@ -2197,7 +2197,7 @@ var DynamicNodeImpl = class {
|
|
|
2197
2197
|
self._downInternal(messages);
|
|
2198
2198
|
},
|
|
2199
2199
|
emit(value) {
|
|
2200
|
-
self.
|
|
2200
|
+
self._downAutoValue(value);
|
|
2201
2201
|
},
|
|
2202
2202
|
up(messages) {
|
|
2203
2203
|
for (const dep of self._deps) {
|
|
@@ -2205,7 +2205,7 @@ var DynamicNodeImpl = class {
|
|
|
2205
2205
|
}
|
|
2206
2206
|
}
|
|
2207
2207
|
};
|
|
2208
|
-
this.
|
|
2208
|
+
this._boundDownToSinks = this._downToSinks.bind(this);
|
|
2209
2209
|
}
|
|
2210
2210
|
get name() {
|
|
2211
2211
|
return this._registryName ?? this._optsName;
|
|
@@ -2285,12 +2285,12 @@ var DynamicNodeImpl = class {
|
|
|
2285
2285
|
if (sinkMessages[i][0] !== DIRTY) filtered.push(sinkMessages[i]);
|
|
2286
2286
|
}
|
|
2287
2287
|
if (filtered.length > 0) {
|
|
2288
|
-
|
|
2288
|
+
downWithBatch(this._boundDownToSinks, filtered);
|
|
2289
2289
|
}
|
|
2290
2290
|
return;
|
|
2291
2291
|
}
|
|
2292
2292
|
}
|
|
2293
|
-
|
|
2293
|
+
downWithBatch(this._boundDownToSinks, sinkMessages);
|
|
2294
2294
|
}
|
|
2295
2295
|
_canSkipDirty() {
|
|
2296
2296
|
return this._sinkCount === 1 && this._singleDepSinkCount === 1;
|
|
@@ -2366,7 +2366,7 @@ var DynamicNodeImpl = class {
|
|
|
2366
2366
|
this._disconnect();
|
|
2367
2367
|
}
|
|
2368
2368
|
// --- Private methods ---
|
|
2369
|
-
|
|
2369
|
+
_downToSinks(messages) {
|
|
2370
2370
|
if (this._sinks == null) return;
|
|
2371
2371
|
if (typeof this._sinks === "function") {
|
|
2372
2372
|
this._sinks(messages);
|
|
@@ -2420,7 +2420,7 @@ var DynamicNodeImpl = class {
|
|
|
2420
2420
|
}
|
|
2421
2421
|
}
|
|
2422
2422
|
}
|
|
2423
|
-
|
|
2423
|
+
_downAutoValue(value) {
|
|
2424
2424
|
const wasDirty = this._status === "dirty";
|
|
2425
2425
|
let unchanged;
|
|
2426
2426
|
try {
|
|
@@ -2480,7 +2480,7 @@ var DynamicNodeImpl = class {
|
|
|
2480
2480
|
const result = this._fn(get);
|
|
2481
2481
|
this._rewire(trackedDeps);
|
|
2482
2482
|
if (result === void 0) return;
|
|
2483
|
-
this.
|
|
2483
|
+
this._downAutoValue(result);
|
|
2484
2484
|
} catch (err) {
|
|
2485
2485
|
this._downInternal([[ERROR, err]]);
|
|
2486
2486
|
}
|
|
@@ -2544,14 +2544,14 @@ var DynamicNodeImpl = class {
|
|
|
2544
2544
|
this._dirtyBits.add(index);
|
|
2545
2545
|
this._settledBits.delete(index);
|
|
2546
2546
|
if (this._dirtyBits.size === 1) {
|
|
2547
|
-
|
|
2547
|
+
downWithBatch(this._boundDownToSinks, [[DIRTY]]);
|
|
2548
2548
|
}
|
|
2549
2549
|
continue;
|
|
2550
2550
|
}
|
|
2551
2551
|
if (t === DATA || t === RESOLVED) {
|
|
2552
2552
|
if (!this._dirtyBits.has(index)) {
|
|
2553
2553
|
this._dirtyBits.add(index);
|
|
2554
|
-
|
|
2554
|
+
downWithBatch(this._boundDownToSinks, [[DIRTY]]);
|
|
2555
2555
|
}
|
|
2556
2556
|
this._settledBits.add(index);
|
|
2557
2557
|
if (this._allDirtySettled()) {
|