@graphrefly/graphrefly 0.11.0 → 0.12.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 (37) hide show
  1. package/dist/{chunk-UG2QZMRN.js → chunk-4F2ZFD5L.js} +2 -1
  2. package/dist/{chunk-OHUECHWY.js → chunk-6OLNYOGU.js} +2 -2
  3. package/dist/{chunk-2VHNCFGG.js → chunk-BRPCN2HJ.js} +46 -17
  4. package/dist/chunk-BRPCN2HJ.js.map +1 -0
  5. package/dist/{chunk-U5HFZGAQ.js → chunk-IXTW3BIO.js} +3 -3
  6. package/dist/{chunk-3WACHRHV.js → chunk-JYRHO63K.js} +3 -3
  7. package/dist/{chunk-PZCDQD2U.js → chunk-NULSP7U4.js} +4 -4
  8. package/dist/{chunk-2OTXEZQO.js → chunk-VQWLA6XQ.js} +3 -3
  9. package/dist/{chunk-5WXTWOD7.js → chunk-X732W3QA.js} +2 -2
  10. package/dist/{chunk-FMVFRP7L.js → chunk-XWMTVV2D.js} +3 -3
  11. package/dist/compat/nestjs/index.js +7 -7
  12. package/dist/core/index.js +3 -3
  13. package/dist/extra/index.cjs +42 -14
  14. package/dist/extra/index.cjs.map +1 -1
  15. package/dist/extra/index.d.cts +1 -1
  16. package/dist/extra/index.d.ts +1 -1
  17. package/dist/extra/index.js +5 -5
  18. package/dist/graph/index.js +4 -4
  19. package/dist/{index-Bbgvinsi.d.ts → index-CiAqgfFg.d.ts} +14 -10
  20. package/dist/{index-DpZozxaJ.d.cts → index-CthwPnHQ.d.cts} +14 -10
  21. package/dist/index.cjs +230 -18
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +75 -5
  24. package/dist/index.d.ts +75 -5
  25. package/dist/index.js +198 -14
  26. package/dist/index.js.map +1 -1
  27. package/dist/patterns/reactive-layout/index.js +4 -4
  28. package/package.json +1 -1
  29. package/dist/chunk-2VHNCFGG.js.map +0 -1
  30. /package/dist/{chunk-UG2QZMRN.js.map → chunk-4F2ZFD5L.js.map} +0 -0
  31. /package/dist/{chunk-OHUECHWY.js.map → chunk-6OLNYOGU.js.map} +0 -0
  32. /package/dist/{chunk-U5HFZGAQ.js.map → chunk-IXTW3BIO.js.map} +0 -0
  33. /package/dist/{chunk-3WACHRHV.js.map → chunk-JYRHO63K.js.map} +0 -0
  34. /package/dist/{chunk-PZCDQD2U.js.map → chunk-NULSP7U4.js.map} +0 -0
  35. /package/dist/{chunk-2OTXEZQO.js.map → chunk-VQWLA6XQ.js.map} +0 -0
  36. /package/dist/{chunk-5WXTWOD7.js.map → chunk-X732W3QA.js.map} +0 -0
  37. /package/dist/{chunk-FMVFRP7L.js.map → chunk-XWMTVV2D.js.map} +0 -0
@@ -1632,6 +1632,7 @@ export {
1632
1632
  createVersioning,
1633
1633
  advanceVersion,
1634
1634
  isV1,
1635
+ NO_VALUE,
1635
1636
  CLEANUP_RESULT,
1636
1637
  cleanupResult,
1637
1638
  NodeImpl,
@@ -1644,4 +1645,4 @@ export {
1644
1645
  effect,
1645
1646
  pipe
1646
1647
  };
1647
- //# sourceMappingURL=chunk-UG2QZMRN.js.map
1648
+ //# sourceMappingURL=chunk-4F2ZFD5L.js.map
@@ -2,7 +2,7 @@ import {
2
2
  DynamicNodeImpl,
3
3
  NodeImpl,
4
4
  accessHintForGuard
5
- } from "./chunk-UG2QZMRN.js";
5
+ } from "./chunk-4F2ZFD5L.js";
6
6
 
7
7
  // src/core/meta.ts
8
8
  function resolveDescribeFields(detail, fields) {
@@ -102,4 +102,4 @@ export {
102
102
  metaSnapshot,
103
103
  describeNode
104
104
  };
105
- //# sourceMappingURL=chunk-OHUECHWY.js.map
105
+ //# sourceMappingURL=chunk-6OLNYOGU.js.map
@@ -32,7 +32,7 @@ import {
32
32
  toArray,
33
33
  toMessages$,
34
34
  toObservable
35
- } from "./chunk-5WXTWOD7.js";
35
+ } from "./chunk-X732W3QA.js";
36
36
  import {
37
37
  ResettableTimer
38
38
  } from "./chunk-WZ2Z2CRV.js";
@@ -42,6 +42,7 @@ import {
42
42
  DIRTY,
43
43
  ERROR,
44
44
  INVALIDATE,
45
+ NO_VALUE,
45
46
  PAUSE,
46
47
  RESOLVED,
47
48
  RESUME,
@@ -59,7 +60,7 @@ import {
59
60
  producer,
60
61
  state,
61
62
  wallClockNs
62
- } from "./chunk-UG2QZMRN.js";
63
+ } from "./chunk-4F2ZFD5L.js";
63
64
 
64
65
  // src/extra/index.ts
65
66
  var extra_exports = {};
@@ -142,7 +143,6 @@ __export(extra_exports, {
142
143
  fromTimer: () => fromTimer,
143
144
  fromWebSocket: () => fromWebSocket,
144
145
  fromWebhook: () => fromWebhook,
145
- gate: () => gate,
146
146
  globToRegExp: () => globToRegExp,
147
147
  interval: () => interval,
148
148
  last: () => last,
@@ -221,6 +221,7 @@ __export(extra_exports, {
221
221
  toWebSocket: () => toWebSocket,
222
222
  tokenBucket: () => tokenBucket,
223
223
  tokenTracker: () => tokenTracker,
224
+ valve: () => valve,
224
225
  verifiable: () => verifiable,
225
226
  window: () => window,
226
227
  windowCount: () => windowCount,
@@ -4701,30 +4702,58 @@ function throttle(source, ms, opts) {
4701
4702
  );
4702
4703
  }
4703
4704
  function sample(source, notifier, opts) {
4705
+ let lastSourceValue = NO_VALUE;
4706
+ let terminated = false;
4707
+ let sourceCompleted = false;
4704
4708
  return node([source, notifier], () => void 0, {
4705
4709
  ...operatorOpts2(opts),
4706
4710
  completeWhenDepsComplete: false,
4711
+ onResubscribe: opts?.resubscribable === true ? () => {
4712
+ lastSourceValue = NO_VALUE;
4713
+ terminated = false;
4714
+ sourceCompleted = false;
4715
+ } : void 0,
4707
4716
  onMessage(msg, i, a) {
4717
+ if (terminated) return true;
4708
4718
  const t = msg[0];
4709
- if (t === ERROR) {
4719
+ const tier = messageTier(t);
4720
+ if (tier >= 3) {
4721
+ if (t === ERROR) {
4722
+ terminated = true;
4723
+ a.down([msg]);
4724
+ return true;
4725
+ }
4726
+ if (t === COMPLETE) {
4727
+ if (i === 0) {
4728
+ sourceCompleted = true;
4729
+ lastSourceValue = NO_VALUE;
4730
+ return true;
4731
+ }
4732
+ terminated = true;
4733
+ a.down([msg]);
4734
+ return true;
4735
+ }
4710
4736
  a.down([msg]);
4711
4737
  return true;
4712
4738
  }
4713
- if (t === COMPLETE) {
4739
+ if (i === 0) {
4740
+ if (t === DATA) {
4741
+ lastSourceValue = msg[1];
4742
+ return true;
4743
+ }
4744
+ if (t === DIRTY || t === RESOLVED) return true;
4714
4745
  a.down([msg]);
4715
4746
  return true;
4716
4747
  }
4717
- if (i === 1 && t === DATA) {
4718
- a.emit(source.get());
4719
- return true;
4720
- }
4721
- if (i === 1 && t === RESOLVED) {
4722
- return true;
4723
- }
4724
- if (i === 0) {
4748
+ if (t === DATA) {
4749
+ if (lastSourceValue !== NO_VALUE && !sourceCompleted) {
4750
+ a.emit(lastSourceValue);
4751
+ }
4725
4752
  return true;
4726
4753
  }
4727
- return false;
4754
+ if (t === RESOLVED) return true;
4755
+ a.down([msg]);
4756
+ return true;
4728
4757
  }
4729
4758
  });
4730
4759
  }
@@ -5191,7 +5220,7 @@ function rescue(source, recover, opts) {
5191
5220
  }
5192
5221
  });
5193
5222
  }
5194
- function gate(source, control, opts) {
5223
+ function valve(source, control, opts) {
5195
5224
  return node(
5196
5225
  [source, control],
5197
5226
  (_deps, a) => {
@@ -6245,7 +6274,7 @@ export {
6245
6274
  repeat,
6246
6275
  pausable,
6247
6276
  rescue,
6248
- gate,
6277
+ valve,
6249
6278
  combineLatest,
6250
6279
  debounceTime,
6251
6280
  throttleTime,
@@ -6265,4 +6294,4 @@ export {
6265
6294
  workerSelf,
6266
6295
  extra_exports
6267
6296
  };
6268
- //# sourceMappingURL=chunk-2VHNCFGG.js.map
6297
+ //# sourceMappingURL=chunk-BRPCN2HJ.js.map