@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.
Files changed (75) hide show
  1. package/dist/{chunk-4APC3AFN.js → chunk-2PORF4RP.js} +22 -49
  2. package/dist/chunk-2PORF4RP.js.map +1 -0
  3. package/dist/{chunk-QVYZD65U.js → chunk-646OG3PO.js} +10 -38
  4. package/dist/chunk-646OG3PO.js.map +1 -0
  5. package/dist/{chunk-H243FWYP.js → chunk-BV3TPSBK.js} +1 -2
  6. package/dist/chunk-BV3TPSBK.js.map +1 -0
  7. package/dist/chunk-EBNKJULL.js +231 -0
  8. package/dist/chunk-EBNKJULL.js.map +1 -0
  9. package/dist/{chunk-XQ4UMAU7.js → chunk-F2ULI3Q3.js} +2 -2
  10. package/dist/{chunk-CRACCCJY.js → chunk-IHJHBADD.js} +29 -5
  11. package/dist/chunk-IHJHBADD.js.map +1 -0
  12. package/dist/{chunk-YW6LFCFS.js → chunk-R6OHUUYB.js} +3 -3
  13. package/dist/{chunk-2ZICUAUJ.js → chunk-XJ6EMQ22.js} +10 -12
  14. package/dist/chunk-XJ6EMQ22.js.map +1 -0
  15. package/dist/{chunk-GKRKDYNT.js → chunk-YXROQFXZ.js} +3 -3
  16. package/dist/compat/nestjs/index.cjs +38 -42
  17. package/dist/compat/nestjs/index.cjs.map +1 -1
  18. package/dist/compat/nestjs/index.d.cts +4 -4
  19. package/dist/compat/nestjs/index.d.ts +4 -4
  20. package/dist/compat/nestjs/index.js +7 -7
  21. package/dist/core/index.cjs +0 -1
  22. package/dist/core/index.cjs.map +1 -1
  23. package/dist/core/index.d.cts +2 -2
  24. package/dist/core/index.d.ts +2 -2
  25. package/dist/core/index.js +3 -3
  26. package/dist/extra/index.cjs +27 -79
  27. package/dist/extra/index.cjs.map +1 -1
  28. package/dist/extra/index.d.cts +4 -4
  29. package/dist/extra/index.d.ts +4 -4
  30. package/dist/extra/index.js +3 -3
  31. package/dist/graph/index.cjs +151 -5
  32. package/dist/graph/index.cjs.map +1 -1
  33. package/dist/graph/index.d.cts +3 -3
  34. package/dist/graph/index.d.ts +3 -3
  35. package/dist/graph/index.js +10 -6
  36. package/dist/{graph-BXIK5Dq5.d.ts → graph-Dc-P9BVm.d.ts} +15 -3
  37. package/dist/{graph-BhADtuFU.d.cts → graph-fCsaaVIa.d.cts} +15 -3
  38. package/dist/{index-BkToATim.d.ts → index-4OIX-q0C.d.cts} +88 -3
  39. package/dist/{index-DSp5R3Xq.d.ts → index-BBVBYPxr.d.cts} +4 -4
  40. package/dist/{index-BNB0KjKe.d.ts → index-BmoUvOGN.d.ts} +1 -1
  41. package/dist/{index-DBhLjWSV.d.cts → index-ClaKZFPl.d.cts} +100 -31
  42. package/dist/{index-Wa8jXne6.d.cts → index-D7y9Q8W4.d.ts} +88 -3
  43. package/dist/{index-Dqemj9q0.d.cts → index-DWq0P9T6.d.ts} +4 -4
  44. package/dist/{index-fYObbpUw.d.ts → index-DhXznWyH.d.ts} +2 -2
  45. package/dist/{index-DANO9Gg7.d.cts → index-DlGMf_Qe.d.cts} +2 -2
  46. package/dist/{index-CKyYg4IP.d.ts → index-N704txAA.d.ts} +100 -31
  47. package/dist/{index-DKIyo4Bq.d.cts → index-YlOH1Gw6.d.cts} +1 -1
  48. package/dist/index.cjs +302 -231
  49. package/dist/index.cjs.map +1 -1
  50. package/dist/index.d.cts +71 -41
  51. package/dist/index.d.ts +71 -41
  52. package/dist/index.js +131 -151
  53. package/dist/index.js.map +1 -1
  54. package/dist/{meta-CrZUQAJ6.d.cts → meta-BV4pj9ML.d.cts} +6 -0
  55. package/dist/{meta-CrZUQAJ6.d.ts → meta-BV4pj9ML.d.ts} +6 -0
  56. package/dist/observable-Cz-AWhwR.d.cts +42 -0
  57. package/dist/observable-DCqlwGyl.d.ts +42 -0
  58. package/dist/patterns/reactive-layout/index.cjs +26 -3
  59. package/dist/patterns/reactive-layout/index.cjs.map +1 -1
  60. package/dist/patterns/reactive-layout/index.d.cts +3 -3
  61. package/dist/patterns/reactive-layout/index.d.ts +3 -3
  62. package/dist/patterns/reactive-layout/index.js +4 -4
  63. package/package.json +1 -1
  64. package/dist/chunk-2ZICUAUJ.js.map +0 -1
  65. package/dist/chunk-4APC3AFN.js.map +0 -1
  66. package/dist/chunk-CRACCCJY.js.map +0 -1
  67. package/dist/chunk-H243FWYP.js.map +0 -1
  68. package/dist/chunk-QVYZD65U.js.map +0 -1
  69. package/dist/chunk-ZHTHUX5D.js +0 -107
  70. package/dist/chunk-ZHTHUX5D.js.map +0 -1
  71. package/dist/reactive-log-ChbpUrY2.d.cts +0 -137
  72. package/dist/reactive-log-DV--7BWd.d.ts +0 -137
  73. /package/dist/{chunk-XQ4UMAU7.js.map → chunk-F2ULI3Q3.js.map} +0 -0
  74. /package/dist/{chunk-YW6LFCFS.js.map → chunk-R6OHUUYB.js.map} +0 -0
  75. /package/dist/{chunk-GKRKDYNT.js.map → chunk-YXROQFXZ.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- export { A as Actor, C as CLEANUP_RESULT, d as COMPLETE, e as CleanupResult, D as DATA, f as DEFAULT_ACTOR, g as DIRTY, h as DescribeDetail, i as DescribeField, j as DescribeNodeOutput, E as ERROR, G as GuardAction, k as GuardDenied, l as GuardDeniedDetails, H as HashFn, I as INVALIDATE, M as Message, m as Messages, N as Node, b as NodeActions, n as NodeDescribeKind, c as NodeFn, o as NodeGuard, a as NodeOptions, p as NodeSink, q as NodeStatus, r as NodeTransportOptions, s as NodeVersionInfo, O as OnMessageHandler, P as PAUSE, t as PolicyAllow, u as PolicyDeny, v as PolicyRuleData, R as RESOLVED, w as RESUME, S as SubscribeHints, T as TEARDOWN, V as V0, x as V1, y as VersioningLevel, z as VersioningOptions, B as accessHintForGuard, F as advanceVersion, J as cleanupResult, K as createVersioning, L as defaultHash, Q as describeNode, U as isKnownMessageType, W as isPhase2Message, X as isTerminalMessage, Y as isV1, Z as knownMessageTypes, _ as messageTier, $ as metaSnapshot, a0 as node, a1 as normalizeActor, a2 as policy, a3 as policyFromRules, a4 as propagatesToMeta, a5 as resolveDescribeFields } from '../meta-CrZUQAJ6.cjs';
2
- export { B as BridgeOptions, D as DEFAULT_DOWN, a as DownStrategy, b as DynGet, c as DynamicNodeFn, d as DynamicNodeImpl, e as DynamicNodeOptions, P as PipeOperator, R as ResettableTimer, f as batch, g as bridge, h as derived, j as downWithBatch, k as dynamicNode, l as effect, m as isBatching, n as monotonicNs, p as partitionForBatch, o as pipe, q as producer, s as state, w as wallClockNs } from '../index-DKIyo4Bq.cjs';
1
+ export { A as Actor, C as CLEANUP_RESULT, d as COMPLETE, e as CleanupResult, D as DATA, f as DEFAULT_ACTOR, g as DIRTY, h as DescribeDetail, i as DescribeField, j as DescribeNodeOutput, E as ERROR, G as GuardAction, k as GuardDenied, l as GuardDeniedDetails, H as HashFn, I as INVALIDATE, M as Message, m as Messages, N as Node, b as NodeActions, n as NodeDescribeKind, c as NodeFn, o as NodeGuard, a as NodeOptions, p as NodeSink, q as NodeStatus, r as NodeTransportOptions, s as NodeVersionInfo, O as OnMessageHandler, P as PAUSE, t as PolicyAllow, u as PolicyDeny, v as PolicyRuleData, R as RESOLVED, w as RESUME, S as SubscribeHints, T as TEARDOWN, V as V0, x as V1, y as VersioningLevel, z as VersioningOptions, B as accessHintForGuard, F as advanceVersion, J as cleanupResult, K as createVersioning, L as defaultHash, Q as describeNode, U as isKnownMessageType, W as isPhase2Message, X as isTerminalMessage, Y as isV1, Z as knownMessageTypes, _ as messageTier, $ as metaSnapshot, a0 as node, a1 as normalizeActor, a2 as policy, a3 as policyFromRules, a4 as propagatesToMeta, a5 as resolveDescribeFields } from '../meta-BV4pj9ML.cjs';
2
+ export { B as BridgeOptions, D as DEFAULT_DOWN, a as DownStrategy, b as DynGet, c as DynamicNodeFn, d as DynamicNodeImpl, e as DynamicNodeOptions, P as PipeOperator, R as ResettableTimer, f as batch, g as bridge, h as derived, j as downWithBatch, k as dynamicNode, l as effect, m as isBatching, n as monotonicNs, p as partitionForBatch, o as pipe, q as producer, s as state, w as wallClockNs } from '../index-YlOH1Gw6.cjs';
@@ -1,2 +1,2 @@
1
- export { A as Actor, C as CLEANUP_RESULT, d as COMPLETE, e as CleanupResult, D as DATA, f as DEFAULT_ACTOR, g as DIRTY, h as DescribeDetail, i as DescribeField, j as DescribeNodeOutput, E as ERROR, G as GuardAction, k as GuardDenied, l as GuardDeniedDetails, H as HashFn, I as INVALIDATE, M as Message, m as Messages, N as Node, b as NodeActions, n as NodeDescribeKind, c as NodeFn, o as NodeGuard, a as NodeOptions, p as NodeSink, q as NodeStatus, r as NodeTransportOptions, s as NodeVersionInfo, O as OnMessageHandler, P as PAUSE, t as PolicyAllow, u as PolicyDeny, v as PolicyRuleData, R as RESOLVED, w as RESUME, S as SubscribeHints, T as TEARDOWN, V as V0, x as V1, y as VersioningLevel, z as VersioningOptions, B as accessHintForGuard, F as advanceVersion, J as cleanupResult, K as createVersioning, L as defaultHash, Q as describeNode, U as isKnownMessageType, W as isPhase2Message, X as isTerminalMessage, Y as isV1, Z as knownMessageTypes, _ as messageTier, $ as metaSnapshot, a0 as node, a1 as normalizeActor, a2 as policy, a3 as policyFromRules, a4 as propagatesToMeta, a5 as resolveDescribeFields } from '../meta-CrZUQAJ6.js';
2
- export { B as BridgeOptions, D as DEFAULT_DOWN, a as DownStrategy, b as DynGet, c as DynamicNodeFn, d as DynamicNodeImpl, e as DynamicNodeOptions, P as PipeOperator, R as ResettableTimer, f as batch, g as bridge, h as derived, j as downWithBatch, k as dynamicNode, l as effect, m as isBatching, n as monotonicNs, p as partitionForBatch, o as pipe, q as producer, s as state, w as wallClockNs } from '../index-BNB0KjKe.js';
1
+ export { A as Actor, C as CLEANUP_RESULT, d as COMPLETE, e as CleanupResult, D as DATA, f as DEFAULT_ACTOR, g as DIRTY, h as DescribeDetail, i as DescribeField, j as DescribeNodeOutput, E as ERROR, G as GuardAction, k as GuardDenied, l as GuardDeniedDetails, H as HashFn, I as INVALIDATE, M as Message, m as Messages, N as Node, b as NodeActions, n as NodeDescribeKind, c as NodeFn, o as NodeGuard, a as NodeOptions, p as NodeSink, q as NodeStatus, r as NodeTransportOptions, s as NodeVersionInfo, O as OnMessageHandler, P as PAUSE, t as PolicyAllow, u as PolicyDeny, v as PolicyRuleData, R as RESOLVED, w as RESUME, S as SubscribeHints, T as TEARDOWN, V as V0, x as V1, y as VersioningLevel, z as VersioningOptions, B as accessHintForGuard, F as advanceVersion, J as cleanupResult, K as createVersioning, L as defaultHash, Q as describeNode, U as isKnownMessageType, W as isPhase2Message, X as isTerminalMessage, Y as isV1, Z as knownMessageTypes, _ as messageTier, $ as metaSnapshot, a0 as node, a1 as normalizeActor, a2 as policy, a3 as policyFromRules, a4 as propagatesToMeta, a5 as resolveDescribeFields } from '../meta-BV4pj9ML.js';
2
+ export { B as BridgeOptions, D as DEFAULT_DOWN, a as DownStrategy, b as DynGet, c as DynamicNodeFn, d as DynamicNodeImpl, e as DynamicNodeOptions, P as PipeOperator, R as ResettableTimer, f as batch, g as bridge, h as derived, j as downWithBatch, k as dynamicNode, l as effect, m as isBatching, n as monotonicNs, p as partitionForBatch, o as pipe, q as producer, s as state, w as wallClockNs } from '../index-BmoUvOGN.js';
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_DOWN,
3
3
  bridge
4
- } from "../chunk-YW6LFCFS.js";
4
+ } from "../chunk-R6OHUUYB.js";
5
5
  import {
6
6
  ResettableTimer
7
7
  } from "../chunk-WZ2Z2CRV.js";
@@ -9,7 +9,7 @@ import {
9
9
  describeNode,
10
10
  metaSnapshot,
11
11
  resolveDescribeFields
12
- } from "../chunk-XQ4UMAU7.js";
12
+ } from "../chunk-F2ULI3Q3.js";
13
13
  import {
14
14
  CLEANUP_RESULT,
15
15
  COMPLETE,
@@ -52,7 +52,7 @@ import {
52
52
  propagatesToMeta,
53
53
  state,
54
54
  wallClockNs
55
- } from "../chunk-H243FWYP.js";
55
+ } from "../chunk-BV3TPSBK.js";
56
56
  export {
57
57
  CLEANUP_RESULT,
58
58
  COMPLETE,
@@ -953,7 +953,6 @@ var NodeImpl = class {
953
953
  this._downInternal(wasDirty ? [[RESOLVED]] : [[DIRTY], [RESOLVED]]);
954
954
  return;
955
955
  }
956
- this._cached = value;
957
956
  this._downInternal(wasDirty ? [[DATA, value]] : [[DIRTY], [DATA, value]]);
958
957
  }
959
958
  _runFn() {
@@ -7205,25 +7204,7 @@ var debounceTime = debounce;
7205
7204
  var throttleTime = throttle;
7206
7205
  var catchError = rescue;
7207
7206
 
7208
- // src/extra/reactive-base.ts
7209
- function snapshotEqualsVersion(a, b) {
7210
- if (typeof a !== "object" || a == null || typeof b !== "object" || b == null) {
7211
- return Object.is(a, b);
7212
- }
7213
- if (!("version" in a) || !("version" in b)) return Object.is(a, b);
7214
- return a.version === b.version;
7215
- }
7216
- function bumpVersion(current, nextValue, v0) {
7217
- if (v0 != null) {
7218
- return { version: current.version + 1, value: nextValue, v0 };
7219
- }
7220
- return { version: current.version + 1, value: nextValue };
7221
- }
7222
-
7223
7207
  // src/extra/reactive-map.ts
7224
- function emptySnapshot() {
7225
- return { version: 0, value: { map: /* @__PURE__ */ new Map() } };
7226
- }
7227
7208
  function isExpired(e, now) {
7228
7209
  return e.expiresAt !== void 0 && now >= e.expiresAt;
7229
7210
  }
@@ -7237,12 +7218,12 @@ function buildMap(store, now) {
7237
7218
  function reactiveMap(options = {}) {
7238
7219
  const { name, maxSize, defaultTtl, ...nodeOpts } = options;
7239
7220
  const store = /* @__PURE__ */ new Map();
7240
- let current = emptySnapshot();
7241
- const n = state(current, {
7221
+ const n = state(/* @__PURE__ */ new Map(), {
7242
7222
  ...nodeOpts,
7243
7223
  name,
7244
7224
  describeKind: "state",
7245
- equals: snapshotEqualsVersion
7225
+ equals: (a, b) => a === b
7226
+ // identity; pushSnapshot always creates a new Map
7246
7227
  });
7247
7228
  function pruneExpiredInternal() {
7248
7229
  const now = monotonicNs();
@@ -7267,11 +7248,9 @@ function reactiveMap(options = {}) {
7267
7248
  pruneExpiredInternal();
7268
7249
  const now = monotonicNs();
7269
7250
  const map2 = buildMap(store, now);
7270
- const nv = n.v;
7271
- current = bumpVersion(current, { map: map2 }, nv ? { id: nv.id, version: nv.version } : void 0);
7272
7251
  batch(() => {
7273
7252
  n.down([[DIRTY]]);
7274
- n.down([[DATA, current]]);
7253
+ n.down([[DATA, map2]]);
7275
7254
  });
7276
7255
  }
7277
7256
  function touchLru(key) {
@@ -7281,7 +7260,7 @@ function reactiveMap(options = {}) {
7281
7260
  store.set(key, e);
7282
7261
  }
7283
7262
  const bundle = {
7284
- node: n,
7263
+ entries: n,
7285
7264
  get(key) {
7286
7265
  const now = monotonicNs();
7287
7266
  const e = store.get(key);
@@ -7378,13 +7357,11 @@ function keepalive(node2) {
7378
7357
  node2.subscribe(() => void 0);
7379
7358
  }
7380
7359
  function mapFromSnapshot(snapshot) {
7381
- if (typeof snapshot === "object" && snapshot !== null && "value" in snapshot && typeof snapshot.value === "object" && snapshot.value !== null && "map" in snapshot.value) {
7382
- return snapshot.value.map ?? /* @__PURE__ */ new Map();
7383
- }
7360
+ if (snapshot instanceof Map) return snapshot;
7384
7361
  return /* @__PURE__ */ new Map();
7385
7362
  }
7386
7363
  function asReadonlyMap(store) {
7387
- return mapFromSnapshot(store.node.get());
7364
+ return mapFromSnapshot(store.entries.get());
7388
7365
  }
7389
7366
  function applyExtraction(store, extraction) {
7390
7367
  if (!Array.isArray(extraction.upsert)) {
@@ -7412,7 +7389,7 @@ function distill(source, extractFn, opts) {
7412
7389
  if (opts.evict) {
7413
7390
  const evictionKeys = dynamicNode((get) => {
7414
7391
  const out = [];
7415
- const snapshot = mapFromSnapshot(get(store.node));
7392
+ const snapshot = mapFromSnapshot(get(store.entries));
7416
7393
  for (const [key, mem] of snapshot) {
7417
7394
  const verdict = opts.evict(key, mem);
7418
7395
  if (isNodeLike(verdict)) {
@@ -7442,7 +7419,7 @@ function distill(source, extractFn, opts) {
7442
7419
  applyExtraction(store, extraction);
7443
7420
  });
7444
7421
  }
7445
- const compact = derived([store.node, contextNode], ([snapshot, context]) => {
7422
+ const compact = derived([store.entries, contextNode], ([snapshot, context]) => {
7446
7423
  const entries = [...mapFromSnapshot(snapshot).entries()].map(([key, value]) => ({
7447
7424
  key,
7448
7425
  value,
@@ -7460,7 +7437,7 @@ function distill(source, extractFn, opts) {
7460
7437
  }
7461
7438
  return packed;
7462
7439
  });
7463
- const size = derived([store.node], ([snapshot]) => mapFromSnapshot(snapshot).size);
7440
+ const size = derived([store.entries], ([snapshot]) => mapFromSnapshot(snapshot).size);
7464
7441
  keepalive(compact);
7465
7442
  keepalive(size);
7466
7443
  return { store, compact, size };
@@ -7568,9 +7545,6 @@ function pubsub() {
7568
7545
  }
7569
7546
 
7570
7547
  // src/extra/reactive-index.ts
7571
- function emptySnapshot2() {
7572
- return { version: 0, value: { rows: [] } };
7573
- }
7574
7548
  function rowKey(row) {
7575
7549
  return [row.secondary, row.primary];
7576
7550
  }
@@ -7616,31 +7590,25 @@ function keepaliveDerived(n) {
7616
7590
  function reactiveIndex(options = {}) {
7617
7591
  const { name } = options;
7618
7592
  const buf = [];
7619
- let current = emptySnapshot2();
7620
- const ordered = state(current, {
7593
+ const ordered = state([], {
7621
7594
  name,
7622
7595
  describeKind: "state",
7623
- equals: snapshotEqualsVersion
7596
+ equals: (a, b) => a === b
7624
7597
  });
7625
7598
  const byPrimary = derived(
7626
7599
  [ordered],
7627
7600
  ([s]) => {
7628
- const rows = s.value.rows;
7601
+ const rows = s;
7629
7602
  return byPrimaryMap(rows);
7630
7603
  },
7631
7604
  { initial: /* @__PURE__ */ new Map(), describeKind: "derived" }
7632
7605
  );
7633
7606
  keepaliveDerived(byPrimary);
7634
7607
  function pushSnapshot() {
7635
- const ov = ordered.v;
7636
- current = bumpVersion(
7637
- current,
7638
- { rows: [...buf] },
7639
- ov ? { id: ov.id, version: ov.version } : void 0
7640
- );
7608
+ const snapshot = [...buf];
7641
7609
  batch(() => {
7642
7610
  ordered.down([[DIRTY]]);
7643
- ordered.down([[DATA, current]]);
7611
+ ordered.down([[DATA, snapshot]]);
7644
7612
  });
7645
7613
  }
7646
7614
  return {
@@ -7671,28 +7639,19 @@ function reactiveIndex(options = {}) {
7671
7639
  }
7672
7640
 
7673
7641
  // src/extra/reactive-list.ts
7674
- function emptySnapshot3() {
7675
- return { version: 0, value: { items: [] } };
7676
- }
7677
7642
  function reactiveList(initial, options = {}) {
7678
7643
  const { name } = options;
7679
7644
  const buf = initial ? [...initial] : [];
7680
- let current = buf.length > 0 ? { version: 1, value: { items: [...buf] } } : emptySnapshot3();
7681
- const items = state(current, {
7645
+ const items = state(buf.length > 0 ? [...buf] : [], {
7682
7646
  name,
7683
7647
  describeKind: "state",
7684
- equals: snapshotEqualsVersion
7648
+ equals: (a, b) => a === b
7685
7649
  });
7686
7650
  function pushSnapshot() {
7687
- const iv = items.v;
7688
- current = bumpVersion(
7689
- current,
7690
- { items: [...buf] },
7691
- iv ? { id: iv.id, version: iv.version } : void 0
7692
- );
7651
+ const snapshot = [...buf];
7693
7652
  batch(() => {
7694
7653
  items.down([[DIRTY]]);
7695
- items.down([[DATA, current]]);
7654
+ items.down([[DATA, snapshot]]);
7696
7655
  });
7697
7656
  }
7698
7657
  return {
@@ -7729,9 +7688,6 @@ function reactiveList(initial, options = {}) {
7729
7688
  }
7730
7689
 
7731
7690
  // src/extra/reactive-log.ts
7732
- function emptySnapshot4() {
7733
- return { version: 0, value: { entries: [] } };
7734
- }
7735
7691
  function keepaliveDerived2(n) {
7736
7692
  return n.subscribe(() => {
7737
7693
  });
@@ -7745,22 +7701,16 @@ function reactiveLog(initial, options = {}) {
7745
7701
  if (maxSize !== void 0 && buf.length > maxSize) {
7746
7702
  buf.splice(0, buf.length - maxSize);
7747
7703
  }
7748
- let current = buf.length > 0 ? { version: 1, value: { entries: [...buf] } } : emptySnapshot4();
7749
- const entries = state(current, {
7704
+ const entries = state(buf.length > 0 ? [...buf] : [], {
7750
7705
  name,
7751
7706
  describeKind: "state",
7752
- equals: snapshotEqualsVersion
7707
+ equals: (a, b) => a === b
7753
7708
  });
7754
7709
  function pushSnapshot() {
7755
- const ev = entries.v;
7756
- current = bumpVersion(
7757
- current,
7758
- { entries: [...buf] },
7759
- ev ? { id: ev.id, version: ev.version } : void 0
7760
- );
7710
+ const snapshot = [...buf];
7761
7711
  batch(() => {
7762
7712
  entries.down([[DIRTY]]);
7763
- entries.down([[DATA, current]]);
7713
+ entries.down([[DATA, snapshot]]);
7764
7714
  });
7765
7715
  }
7766
7716
  function trimBuf() {
@@ -7803,13 +7753,12 @@ function reactiveLog(initial, options = {}) {
7803
7753
  if (n < 0) {
7804
7754
  throw new RangeError("n must be >= 0");
7805
7755
  }
7806
- const snap = entries.get();
7807
- const e = snap.value.entries;
7756
+ const e = entries.get();
7808
7757
  const init = n === 0 ? [] : e.slice(Math.max(0, e.length - n));
7809
7758
  const out = derived(
7810
7759
  [entries],
7811
7760
  ([s]) => {
7812
- const list = s.value.entries;
7761
+ const list = s;
7813
7762
  return n === 0 ? [] : list.slice(Math.max(0, list.length - n));
7814
7763
  },
7815
7764
  { initial: init, describeKind: "derived" }
@@ -7824,13 +7773,12 @@ function logSlice(log, start, stop) {
7824
7773
  if (start < 0) {
7825
7774
  throw new RangeError("start must be >= 0");
7826
7775
  }
7827
- const snap = log.entries.get();
7828
- const e = snap.value.entries;
7776
+ const e = log.entries.get();
7829
7777
  const init = stop === void 0 ? e.slice(start) : e.slice(start, stop);
7830
7778
  const out = derived(
7831
7779
  [log.entries],
7832
7780
  ([s]) => {
7833
- const list = s.value.entries;
7781
+ const list = s;
7834
7782
  return stop === void 0 ? list.slice(start) : list.slice(start, stop);
7835
7783
  },
7836
7784
  { initial: init, describeKind: "derived" }