@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
@@ -2,10 +2,10 @@ import {
2
2
  GRAPH_META_SEGMENT,
3
3
  Graph,
4
4
  reachable
5
- } from "./chunk-2OTXEZQO.js";
5
+ } from "./chunk-VQWLA6XQ.js";
6
6
  import {
7
7
  __export
8
- } from "./chunk-UG2QZMRN.js";
8
+ } from "./chunk-4F2ZFD5L.js";
9
9
 
10
10
  // src/graph/index.ts
11
11
  var graph_exports = {};
@@ -104,4 +104,4 @@ export {
104
104
  replayWAL,
105
105
  graph_exports
106
106
  };
107
- //# sourceMappingURL=chunk-U5HFZGAQ.js.map
107
+ //# sourceMappingURL=chunk-IXTW3BIO.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Graph
3
- } from "./chunk-2OTXEZQO.js";
3
+ } from "./chunk-VQWLA6XQ.js";
4
4
  import {
5
5
  DATA,
6
6
  INVALIDATE,
@@ -10,7 +10,7 @@ import {
10
10
  emitWithBatch,
11
11
  monotonicNs,
12
12
  state
13
- } from "./chunk-UG2QZMRN.js";
13
+ } from "./chunk-4F2ZFD5L.js";
14
14
 
15
15
  // src/patterns/reactive-layout/index.ts
16
16
  var reactive_layout_exports = {};
@@ -1094,4 +1094,4 @@ export {
1094
1094
  reactiveBlockLayout,
1095
1095
  reactive_layout_exports
1096
1096
  };
1097
- //# sourceMappingURL=chunk-3WACHRHV.js.map
1097
+ //# sourceMappingURL=chunk-JYRHO63K.js.map
@@ -7,10 +7,10 @@ import {
7
7
  reactiveLog,
8
8
  toMessages$,
9
9
  toObservable
10
- } from "./chunk-5WXTWOD7.js";
10
+ } from "./chunk-X732W3QA.js";
11
11
  import {
12
12
  Graph
13
- } from "./chunk-2OTXEZQO.js";
13
+ } from "./chunk-VQWLA6XQ.js";
14
14
  import {
15
15
  COMPLETE,
16
16
  DATA,
@@ -28,7 +28,7 @@ import {
28
28
  policy,
29
29
  state,
30
30
  wallClockNs
31
- } from "./chunk-UG2QZMRN.js";
31
+ } from "./chunk-4F2ZFD5L.js";
32
32
 
33
33
  // src/compat/nestjs/index.ts
34
34
  var nestjs_exports = {};
@@ -1369,4 +1369,4 @@ export {
1369
1369
  GraphReflyModule,
1370
1370
  nestjs_exports
1371
1371
  };
1372
- //# sourceMappingURL=chunk-PZCDQD2U.js.map
1372
+ //# sourceMappingURL=chunk-NULSP7U4.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  describeNode,
3
3
  resolveDescribeFields
4
- } from "./chunk-OHUECHWY.js";
4
+ } from "./chunk-6OLNYOGU.js";
5
5
  import {
6
6
  COMPLETE,
7
7
  DATA,
@@ -16,7 +16,7 @@ import {
16
16
  messageTier,
17
17
  monotonicNs,
18
18
  state
19
- } from "./chunk-UG2QZMRN.js";
19
+ } from "./chunk-4F2ZFD5L.js";
20
20
 
21
21
  // src/graph/graph.ts
22
22
  var PATH_SEP = "::";
@@ -1902,4 +1902,4 @@ export {
1902
1902
  Graph,
1903
1903
  reachable
1904
1904
  };
1905
- //# sourceMappingURL=chunk-2OTXEZQO.js.map
1905
+ //# sourceMappingURL=chunk-VQWLA6XQ.js.map
@@ -11,7 +11,7 @@ import {
11
11
  producer,
12
12
  state,
13
13
  wallClockNs
14
- } from "./chunk-UG2QZMRN.js";
14
+ } from "./chunk-4F2ZFD5L.js";
15
15
 
16
16
  // src/extra/observable.ts
17
17
  import { Observable } from "rxjs";
@@ -778,4 +778,4 @@ export {
778
778
  reactiveLog,
779
779
  logSlice
780
780
  };
781
- //# sourceMappingURL=chunk-5WXTWOD7.js.map
781
+ //# sourceMappingURL=chunk-X732W3QA.js.map
@@ -5,7 +5,7 @@ import {
5
5
  describeNode,
6
6
  metaSnapshot,
7
7
  resolveDescribeFields
8
- } from "./chunk-OHUECHWY.js";
8
+ } from "./chunk-6OLNYOGU.js";
9
9
  import {
10
10
  CLEANUP_RESULT,
11
11
  COMPLETE,
@@ -49,7 +49,7 @@ import {
49
49
  propagatesToMeta,
50
50
  state,
51
51
  wallClockNs
52
- } from "./chunk-UG2QZMRN.js";
52
+ } from "./chunk-4F2ZFD5L.js";
53
53
 
54
54
  // src/core/index.ts
55
55
  var core_exports = {};
@@ -159,4 +159,4 @@ export {
159
159
  bridge,
160
160
  core_exports
161
161
  };
162
- //# sourceMappingURL=chunk-FMVFRP7L.js.map
162
+ //# sourceMappingURL=chunk-XWMTVV2D.js.map
@@ -31,19 +31,19 @@ import {
31
31
  getNodeToken,
32
32
  observeSSE,
33
33
  observeSubscription
34
- } from "../../chunk-PZCDQD2U.js";
35
- import "../../chunk-FMVFRP7L.js";
36
- import "../../chunk-U5HFZGAQ.js";
34
+ } from "../../chunk-NULSP7U4.js";
35
+ import "../../chunk-XWMTVV2D.js";
36
+ import "../../chunk-IXTW3BIO.js";
37
37
  import {
38
38
  observeGraph$,
39
39
  observeNode$,
40
40
  toMessages$,
41
41
  toObservable
42
- } from "../../chunk-5WXTWOD7.js";
42
+ } from "../../chunk-X732W3QA.js";
43
43
  import "../../chunk-WZ2Z2CRV.js";
44
- import "../../chunk-2OTXEZQO.js";
45
- import "../../chunk-OHUECHWY.js";
46
- import "../../chunk-UG2QZMRN.js";
44
+ import "../../chunk-VQWLA6XQ.js";
45
+ import "../../chunk-6OLNYOGU.js";
46
+ import "../../chunk-4F2ZFD5L.js";
47
47
  export {
48
48
  ACTOR_KEY,
49
49
  COMMAND_HANDLERS,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_DOWN,
3
3
  bridge
4
- } from "../chunk-FMVFRP7L.js";
4
+ } from "../chunk-XWMTVV2D.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-OHUECHWY.js";
12
+ } from "../chunk-6OLNYOGU.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-UG2QZMRN.js";
55
+ } from "../chunk-4F2ZFD5L.js";
56
56
  export {
57
57
  CLEANUP_RESULT,
58
58
  COMPLETE,
@@ -98,7 +98,6 @@ __export(extra_exports, {
98
98
  fromTimer: () => fromTimer,
99
99
  fromWebSocket: () => fromWebSocket,
100
100
  fromWebhook: () => fromWebhook,
101
- gate: () => gate,
102
101
  globToRegExp: () => globToRegExp,
103
102
  interval: () => interval,
104
103
  last: () => last,
@@ -177,6 +176,7 @@ __export(extra_exports, {
177
176
  toWebSocket: () => toWebSocket,
178
177
  tokenBucket: () => tokenBucket,
179
178
  tokenTracker: () => tokenTracker,
179
+ valve: () => valve,
180
180
  verifiable: () => verifiable,
181
181
  window: () => window,
182
182
  windowCount: () => windowCount,
@@ -6668,30 +6668,58 @@ function throttle(source, ms, opts) {
6668
6668
  );
6669
6669
  }
6670
6670
  function sample(source, notifier, opts) {
6671
+ let lastSourceValue = NO_VALUE;
6672
+ let terminated = false;
6673
+ let sourceCompleted = false;
6671
6674
  return node([source, notifier], () => void 0, {
6672
6675
  ...operatorOpts3(opts),
6673
6676
  completeWhenDepsComplete: false,
6677
+ onResubscribe: opts?.resubscribable === true ? () => {
6678
+ lastSourceValue = NO_VALUE;
6679
+ terminated = false;
6680
+ sourceCompleted = false;
6681
+ } : void 0,
6674
6682
  onMessage(msg, i, a) {
6683
+ if (terminated) return true;
6675
6684
  const t = msg[0];
6676
- if (t === ERROR) {
6685
+ const tier = messageTier(t);
6686
+ if (tier >= 3) {
6687
+ if (t === ERROR) {
6688
+ terminated = true;
6689
+ a.down([msg]);
6690
+ return true;
6691
+ }
6692
+ if (t === COMPLETE) {
6693
+ if (i === 0) {
6694
+ sourceCompleted = true;
6695
+ lastSourceValue = NO_VALUE;
6696
+ return true;
6697
+ }
6698
+ terminated = true;
6699
+ a.down([msg]);
6700
+ return true;
6701
+ }
6677
6702
  a.down([msg]);
6678
6703
  return true;
6679
6704
  }
6680
- if (t === COMPLETE) {
6705
+ if (i === 0) {
6706
+ if (t === DATA) {
6707
+ lastSourceValue = msg[1];
6708
+ return true;
6709
+ }
6710
+ if (t === DIRTY || t === RESOLVED) return true;
6681
6711
  a.down([msg]);
6682
6712
  return true;
6683
6713
  }
6684
- if (i === 1 && t === DATA) {
6685
- a.emit(source.get());
6686
- return true;
6687
- }
6688
- if (i === 1 && t === RESOLVED) {
6689
- return true;
6690
- }
6691
- if (i === 0) {
6714
+ if (t === DATA) {
6715
+ if (lastSourceValue !== NO_VALUE && !sourceCompleted) {
6716
+ a.emit(lastSourceValue);
6717
+ }
6692
6718
  return true;
6693
6719
  }
6694
- return false;
6720
+ if (t === RESOLVED) return true;
6721
+ a.down([msg]);
6722
+ return true;
6695
6723
  }
6696
6724
  });
6697
6725
  }
@@ -7158,7 +7186,7 @@ function rescue(source, recover, opts) {
7158
7186
  }
7159
7187
  });
7160
7188
  }
7161
- function gate(source, control, opts) {
7189
+ function valve(source, control, opts) {
7162
7190
  return node(
7163
7191
  [source, control],
7164
7192
  (_deps, a) => {
@@ -8368,7 +8396,6 @@ function workerSelf(target, opts) {
8368
8396
  fromTimer,
8369
8397
  fromWebSocket,
8370
8398
  fromWebhook,
8371
- gate,
8372
8399
  globToRegExp,
8373
8400
  interval,
8374
8401
  last,
@@ -8447,6 +8474,7 @@ function workerSelf(target, opts) {
8447
8474
  toWebSocket,
8448
8475
  tokenBucket,
8449
8476
  tokenTracker,
8477
+ valve,
8450
8478
  verifiable,
8451
8479
  window,
8452
8480
  windowCount,