@graphrefly/graphrefly 0.15.0 → 0.17.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-4APC3AFN.js → chunk-2PORF4RP.js} +22 -49
- package/dist/chunk-2PORF4RP.js.map +1 -0
- package/dist/{chunk-QVYZD65U.js → chunk-646OG3PO.js} +10 -38
- package/dist/chunk-646OG3PO.js.map +1 -0
- package/dist/{chunk-H243FWYP.js → chunk-BV3TPSBK.js} +1 -2
- package/dist/chunk-BV3TPSBK.js.map +1 -0
- package/dist/chunk-EBNKJULL.js +231 -0
- package/dist/chunk-EBNKJULL.js.map +1 -0
- package/dist/{chunk-XQ4UMAU7.js → chunk-F2ULI3Q3.js} +2 -2
- package/dist/{chunk-CRACCCJY.js → chunk-IHJHBADD.js} +29 -5
- package/dist/chunk-IHJHBADD.js.map +1 -0
- package/dist/{chunk-YW6LFCFS.js → chunk-R6OHUUYB.js} +3 -3
- package/dist/{chunk-2ZICUAUJ.js → chunk-XJ6EMQ22.js} +10 -12
- package/dist/chunk-XJ6EMQ22.js.map +1 -0
- package/dist/{chunk-GKRKDYNT.js → chunk-YXROQFXZ.js} +3 -3
- package/dist/compat/nestjs/index.cjs +38 -42
- 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 +0 -1
- 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 +3 -3
- package/dist/extra/index.cjs +27 -79
- 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 +3 -3
- package/dist/graph/index.cjs +151 -5
- 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 +10 -6
- package/dist/{graph-BXIK5Dq5.d.ts → graph-Dc-P9BVm.d.ts} +15 -3
- package/dist/{graph-BhADtuFU.d.cts → graph-fCsaaVIa.d.cts} +15 -3
- package/dist/{index-BkToATim.d.ts → index-4OIX-q0C.d.cts} +88 -3
- package/dist/{index-DSp5R3Xq.d.ts → index-BBVBYPxr.d.cts} +4 -4
- package/dist/{index-BNB0KjKe.d.ts → index-BmoUvOGN.d.ts} +1 -1
- package/dist/{index-DBhLjWSV.d.cts → index-ClaKZFPl.d.cts} +100 -31
- package/dist/{index-Wa8jXne6.d.cts → index-D7y9Q8W4.d.ts} +88 -3
- package/dist/{index-Dqemj9q0.d.cts → index-DWq0P9T6.d.ts} +4 -4
- package/dist/{index-fYObbpUw.d.ts → index-DhXznWyH.d.ts} +2 -2
- package/dist/{index-DANO9Gg7.d.cts → index-DlGMf_Qe.d.cts} +2 -2
- package/dist/{index-CKyYg4IP.d.ts → index-N704txAA.d.ts} +100 -31
- package/dist/{index-DKIyo4Bq.d.cts → index-YlOH1Gw6.d.cts} +1 -1
- package/dist/index.cjs +302 -231
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +71 -41
- package/dist/index.d.ts +71 -41
- package/dist/index.js +131 -151
- package/dist/index.js.map +1 -1
- package/dist/{meta-CrZUQAJ6.d.cts → meta-BV4pj9ML.d.cts} +6 -0
- package/dist/{meta-CrZUQAJ6.d.ts → meta-BV4pj9ML.d.ts} +6 -0
- package/dist/observable-Cz-AWhwR.d.cts +42 -0
- package/dist/observable-DCqlwGyl.d.ts +42 -0
- package/dist/patterns/reactive-layout/index.cjs +26 -3
- 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/package.json +1 -1
- package/dist/chunk-2ZICUAUJ.js.map +0 -1
- package/dist/chunk-4APC3AFN.js.map +0 -1
- package/dist/chunk-CRACCCJY.js.map +0 -1
- package/dist/chunk-H243FWYP.js.map +0 -1
- package/dist/chunk-QVYZD65U.js.map +0 -1
- package/dist/chunk-ZHTHUX5D.js +0 -107
- package/dist/chunk-ZHTHUX5D.js.map +0 -1
- package/dist/reactive-log-ChbpUrY2.d.cts +0 -137
- package/dist/reactive-log-DV--7BWd.d.ts +0 -137
- /package/dist/{chunk-XQ4UMAU7.js.map → chunk-F2ULI3Q3.js.map} +0 -0
- /package/dist/{chunk-YW6LFCFS.js.map → chunk-R6OHUUYB.js.map} +0 -0
- /package/dist/{chunk-GKRKDYNT.js.map → chunk-YXROQFXZ.js.map} +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
bumpVersion,
|
|
3
2
|
cached,
|
|
4
3
|
createWatermarkController,
|
|
5
4
|
empty,
|
|
@@ -27,12 +26,11 @@ import {
|
|
|
27
26
|
replay,
|
|
28
27
|
share,
|
|
29
28
|
shareReplay,
|
|
30
|
-
snapshotEqualsVersion,
|
|
31
29
|
throwError,
|
|
32
30
|
toArray,
|
|
33
31
|
toMessages$,
|
|
34
32
|
toObservable
|
|
35
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-646OG3PO.js";
|
|
36
34
|
import {
|
|
37
35
|
ResettableTimer
|
|
38
36
|
} from "./chunk-WZ2Z2CRV.js";
|
|
@@ -60,7 +58,7 @@ import {
|
|
|
60
58
|
producer,
|
|
61
59
|
state,
|
|
62
60
|
wallClockNs
|
|
63
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-BV3TPSBK.js";
|
|
64
62
|
|
|
65
63
|
// src/extra/index.ts
|
|
66
64
|
var extra_exports = {};
|
|
@@ -5241,9 +5239,6 @@ var throttleTime = throttle;
|
|
|
5241
5239
|
var catchError = rescue;
|
|
5242
5240
|
|
|
5243
5241
|
// src/extra/reactive-map.ts
|
|
5244
|
-
function emptySnapshot() {
|
|
5245
|
-
return { version: 0, value: { map: /* @__PURE__ */ new Map() } };
|
|
5246
|
-
}
|
|
5247
5242
|
function isExpired(e, now) {
|
|
5248
5243
|
return e.expiresAt !== void 0 && now >= e.expiresAt;
|
|
5249
5244
|
}
|
|
@@ -5257,12 +5252,12 @@ function buildMap(store, now) {
|
|
|
5257
5252
|
function reactiveMap(options = {}) {
|
|
5258
5253
|
const { name, maxSize, defaultTtl, ...nodeOpts } = options;
|
|
5259
5254
|
const store = /* @__PURE__ */ new Map();
|
|
5260
|
-
|
|
5261
|
-
const n = state(current, {
|
|
5255
|
+
const n = state(/* @__PURE__ */ new Map(), {
|
|
5262
5256
|
...nodeOpts,
|
|
5263
5257
|
name,
|
|
5264
5258
|
describeKind: "state",
|
|
5265
|
-
equals:
|
|
5259
|
+
equals: (a, b) => a === b
|
|
5260
|
+
// identity; pushSnapshot always creates a new Map
|
|
5266
5261
|
});
|
|
5267
5262
|
function pruneExpiredInternal() {
|
|
5268
5263
|
const now = monotonicNs();
|
|
@@ -5287,11 +5282,9 @@ function reactiveMap(options = {}) {
|
|
|
5287
5282
|
pruneExpiredInternal();
|
|
5288
5283
|
const now = monotonicNs();
|
|
5289
5284
|
const map2 = buildMap(store, now);
|
|
5290
|
-
const nv = n.v;
|
|
5291
|
-
current = bumpVersion(current, { map: map2 }, nv ? { id: nv.id, version: nv.version } : void 0);
|
|
5292
5285
|
batch(() => {
|
|
5293
5286
|
n.down([[DIRTY]]);
|
|
5294
|
-
n.down([[DATA,
|
|
5287
|
+
n.down([[DATA, map2]]);
|
|
5295
5288
|
});
|
|
5296
5289
|
}
|
|
5297
5290
|
function touchLru(key) {
|
|
@@ -5301,7 +5294,7 @@ function reactiveMap(options = {}) {
|
|
|
5301
5294
|
store.set(key, e);
|
|
5302
5295
|
}
|
|
5303
5296
|
const bundle = {
|
|
5304
|
-
|
|
5297
|
+
entries: n,
|
|
5305
5298
|
get(key) {
|
|
5306
5299
|
const now = monotonicNs();
|
|
5307
5300
|
const e = store.get(key);
|
|
@@ -5398,13 +5391,11 @@ function keepalive(node2) {
|
|
|
5398
5391
|
node2.subscribe(() => void 0);
|
|
5399
5392
|
}
|
|
5400
5393
|
function mapFromSnapshot(snapshot) {
|
|
5401
|
-
if (
|
|
5402
|
-
return snapshot.value.map ?? /* @__PURE__ */ new Map();
|
|
5403
|
-
}
|
|
5394
|
+
if (snapshot instanceof Map) return snapshot;
|
|
5404
5395
|
return /* @__PURE__ */ new Map();
|
|
5405
5396
|
}
|
|
5406
5397
|
function asReadonlyMap(store) {
|
|
5407
|
-
return mapFromSnapshot(store.
|
|
5398
|
+
return mapFromSnapshot(store.entries.get());
|
|
5408
5399
|
}
|
|
5409
5400
|
function applyExtraction(store, extraction) {
|
|
5410
5401
|
if (!Array.isArray(extraction.upsert)) {
|
|
@@ -5432,7 +5423,7 @@ function distill(source, extractFn, opts) {
|
|
|
5432
5423
|
if (opts.evict) {
|
|
5433
5424
|
const evictionKeys = dynamicNode((get) => {
|
|
5434
5425
|
const out = [];
|
|
5435
|
-
const snapshot = mapFromSnapshot(get(store.
|
|
5426
|
+
const snapshot = mapFromSnapshot(get(store.entries));
|
|
5436
5427
|
for (const [key, mem] of snapshot) {
|
|
5437
5428
|
const verdict = opts.evict(key, mem);
|
|
5438
5429
|
if (isNodeLike(verdict)) {
|
|
@@ -5462,7 +5453,7 @@ function distill(source, extractFn, opts) {
|
|
|
5462
5453
|
applyExtraction(store, extraction);
|
|
5463
5454
|
});
|
|
5464
5455
|
}
|
|
5465
|
-
const compact = derived([store.
|
|
5456
|
+
const compact = derived([store.entries, contextNode], ([snapshot, context]) => {
|
|
5466
5457
|
const entries = [...mapFromSnapshot(snapshot).entries()].map(([key, value]) => ({
|
|
5467
5458
|
key,
|
|
5468
5459
|
value,
|
|
@@ -5480,7 +5471,7 @@ function distill(source, extractFn, opts) {
|
|
|
5480
5471
|
}
|
|
5481
5472
|
return packed;
|
|
5482
5473
|
});
|
|
5483
|
-
const size = derived([store.
|
|
5474
|
+
const size = derived([store.entries], ([snapshot]) => mapFromSnapshot(snapshot).size);
|
|
5484
5475
|
keepalive(compact);
|
|
5485
5476
|
keepalive(size);
|
|
5486
5477
|
return { store, compact, size };
|
|
@@ -5517,9 +5508,6 @@ function pubsub() {
|
|
|
5517
5508
|
}
|
|
5518
5509
|
|
|
5519
5510
|
// src/extra/reactive-index.ts
|
|
5520
|
-
function emptySnapshot2() {
|
|
5521
|
-
return { version: 0, value: { rows: [] } };
|
|
5522
|
-
}
|
|
5523
5511
|
function rowKey(row) {
|
|
5524
5512
|
return [row.secondary, row.primary];
|
|
5525
5513
|
}
|
|
@@ -5565,31 +5553,25 @@ function keepaliveDerived(n) {
|
|
|
5565
5553
|
function reactiveIndex(options = {}) {
|
|
5566
5554
|
const { name } = options;
|
|
5567
5555
|
const buf = [];
|
|
5568
|
-
|
|
5569
|
-
const ordered = state(current, {
|
|
5556
|
+
const ordered = state([], {
|
|
5570
5557
|
name,
|
|
5571
5558
|
describeKind: "state",
|
|
5572
|
-
equals:
|
|
5559
|
+
equals: (a, b) => a === b
|
|
5573
5560
|
});
|
|
5574
5561
|
const byPrimary = derived(
|
|
5575
5562
|
[ordered],
|
|
5576
5563
|
([s]) => {
|
|
5577
|
-
const rows = s
|
|
5564
|
+
const rows = s;
|
|
5578
5565
|
return byPrimaryMap(rows);
|
|
5579
5566
|
},
|
|
5580
5567
|
{ initial: /* @__PURE__ */ new Map(), describeKind: "derived" }
|
|
5581
5568
|
);
|
|
5582
5569
|
keepaliveDerived(byPrimary);
|
|
5583
5570
|
function pushSnapshot() {
|
|
5584
|
-
const
|
|
5585
|
-
current = bumpVersion(
|
|
5586
|
-
current,
|
|
5587
|
-
{ rows: [...buf] },
|
|
5588
|
-
ov ? { id: ov.id, version: ov.version } : void 0
|
|
5589
|
-
);
|
|
5571
|
+
const snapshot = [...buf];
|
|
5590
5572
|
batch(() => {
|
|
5591
5573
|
ordered.down([[DIRTY]]);
|
|
5592
|
-
ordered.down([[DATA,
|
|
5574
|
+
ordered.down([[DATA, snapshot]]);
|
|
5593
5575
|
});
|
|
5594
5576
|
}
|
|
5595
5577
|
return {
|
|
@@ -5620,28 +5602,19 @@ function reactiveIndex(options = {}) {
|
|
|
5620
5602
|
}
|
|
5621
5603
|
|
|
5622
5604
|
// src/extra/reactive-list.ts
|
|
5623
|
-
function emptySnapshot3() {
|
|
5624
|
-
return { version: 0, value: { items: [] } };
|
|
5625
|
-
}
|
|
5626
5605
|
function reactiveList(initial, options = {}) {
|
|
5627
5606
|
const { name } = options;
|
|
5628
5607
|
const buf = initial ? [...initial] : [];
|
|
5629
|
-
|
|
5630
|
-
const items = state(current, {
|
|
5608
|
+
const items = state(buf.length > 0 ? [...buf] : [], {
|
|
5631
5609
|
name,
|
|
5632
5610
|
describeKind: "state",
|
|
5633
|
-
equals:
|
|
5611
|
+
equals: (a, b) => a === b
|
|
5634
5612
|
});
|
|
5635
5613
|
function pushSnapshot() {
|
|
5636
|
-
const
|
|
5637
|
-
current = bumpVersion(
|
|
5638
|
-
current,
|
|
5639
|
-
{ items: [...buf] },
|
|
5640
|
-
iv ? { id: iv.id, version: iv.version } : void 0
|
|
5641
|
-
);
|
|
5614
|
+
const snapshot = [...buf];
|
|
5642
5615
|
batch(() => {
|
|
5643
5616
|
items.down([[DIRTY]]);
|
|
5644
|
-
items.down([[DATA,
|
|
5617
|
+
items.down([[DATA, snapshot]]);
|
|
5645
5618
|
});
|
|
5646
5619
|
}
|
|
5647
5620
|
return {
|
|
@@ -6294,4 +6267,4 @@ export {
|
|
|
6294
6267
|
workerSelf,
|
|
6295
6268
|
extra_exports
|
|
6296
6269
|
};
|
|
6297
|
-
//# sourceMappingURL=chunk-
|
|
6270
|
+
//# sourceMappingURL=chunk-2PORF4RP.js.map
|