@graphrefly/graphrefly 0.23.0 → 0.25.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-NZMBRXQV.js → chunk-5DJTTKX3.js} +11 -13
- package/dist/chunk-5DJTTKX3.js.map +1 -0
- package/dist/{chunk-PNUZM7PC.js → chunk-EVR6UFUV.js} +6 -6
- package/dist/{chunk-HVBX5KIW.js → chunk-H4RVA4VE.js} +2 -2
- package/dist/{chunk-32N5A454.js → chunk-HWPIFSW2.js} +2 -2
- package/dist/chunk-HWPIFSW2.js.map +1 -0
- package/dist/{chunk-XTLYW4FR.js → chunk-IAHGTNOZ.js} +6 -4
- package/dist/{chunk-XTLYW4FR.js.map → chunk-IAHGTNOZ.js.map} +1 -1
- package/dist/{chunk-CWYPA63G.js → chunk-L2GLW2U7.js} +69 -2
- package/dist/chunk-L2GLW2U7.js.map +1 -0
- package/dist/{chunk-2GQLMQVJ.js → chunk-MW4VAKAO.js} +3 -3
- package/dist/{chunk-JFONSPNF.js → chunk-PY4XCDLR.js} +2 -2
- package/dist/{chunk-263BEJJO.js → chunk-QOWVNWOC.js} +3 -3
- package/dist/{chunk-PX6PDUJ5.js → chunk-TKE3JGOH.js} +491 -19
- package/dist/chunk-TKE3JGOH.js.map +1 -0
- package/dist/{chunk-XRFJJ2IU.js → chunk-XOFWRC73.js} +3 -3
- package/dist/compat/nestjs/index.cjs +10 -12
- package/dist/compat/nestjs/index.cjs.map +1 -1
- package/dist/compat/nestjs/index.d.cts +6 -6
- package/dist/compat/nestjs/index.d.ts +6 -6
- package/dist/compat/nestjs/index.js +9 -9
- package/dist/core/index.cjs +10 -12
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +3 -3
- package/dist/extra/index.cjs +78 -12
- 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 +6 -4
- package/dist/graph/index.cjs +10 -12
- package/dist/graph/index.cjs.map +1 -1
- package/dist/graph/index.d.cts +5 -5
- package/dist/graph/index.d.ts +5 -5
- package/dist/graph/index.js +4 -4
- package/dist/{graph-CEO2FkLY.d.ts → graph-B6NFqv3z.d.ts} +3 -3
- package/dist/{graph-BtdSRHUc.d.cts → graph-D-3JIQme.d.cts} +3 -3
- package/dist/{index-BFGjXbiP.d.cts → index-AMWewNDe.d.cts} +2 -2
- package/dist/{index-BUj3ASVe.d.cts → index-BJB7t9gg.d.cts} +10 -24
- package/dist/{index-DSPc5rkv.d.ts → index-C-TXEa7C.d.ts} +10 -24
- package/dist/{index-CkElcUY6.d.ts → index-CYkjxu3s.d.ts} +2 -2
- package/dist/{index-B0tfuXwV.d.cts → index-Ch0IpIO0.d.cts} +32 -5
- package/dist/{index-C59uSJAH.d.cts → index-DKE1EATr.d.cts} +224 -4
- package/dist/{index-DgscL7v0.d.ts → index-DiobMNwE.d.ts} +3 -3
- package/dist/{index-RXN94sHK.d.ts → index-Ds23Wvou.d.ts} +32 -5
- package/dist/{index-BPlWVAKY.d.cts → index-J7Kc0oIQ.d.cts} +3 -3
- package/dist/{index-jEtF4N7L.d.ts → index-OXImXMq6.d.ts} +224 -4
- package/dist/index.cjs +570 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.js +23 -31
- package/dist/index.js.map +1 -1
- package/dist/{meta-3QjzotRv.d.ts → meta-CnkLA_43.d.ts} +1 -1
- package/dist/{meta-B-Lbs4-O.d.cts → meta-DWbkoq1s.d.cts} +1 -1
- package/dist/{node-C7PD3sn9.d.cts → node-B-f-Lu-k.d.cts} +15 -13
- package/dist/{node-C7PD3sn9.d.ts → node-B-f-Lu-k.d.ts} +15 -13
- package/dist/{observable-axpzv1K2.d.cts → observable-DBnrwcar.d.cts} +1 -1
- package/dist/{observable-EyO-moQY.d.ts → observable-uP-wy_uK.d.ts} +1 -1
- package/dist/patterns/reactive-layout/index.cjs +498 -28
- package/dist/patterns/reactive-layout/index.cjs.map +1 -1
- package/dist/patterns/reactive-layout/index.d.cts +5 -5
- package/dist/patterns/reactive-layout/index.d.ts +5 -5
- package/dist/patterns/reactive-layout/index.js +20 -8
- package/dist/{storage-DIgAr7M_.d.cts → storage-BuTdpCI1.d.cts} +1 -1
- package/dist/{storage-CHT5WE9m.d.ts → storage-F2X1U1x0.d.ts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-32N5A454.js.map +0 -1
- package/dist/chunk-CWYPA63G.js.map +0 -1
- package/dist/chunk-NZMBRXQV.js.map +0 -1
- package/dist/chunk-PX6PDUJ5.js.map +0 -1
- /package/dist/{chunk-PNUZM7PC.js.map → chunk-EVR6UFUV.js.map} +0 -0
- /package/dist/{chunk-HVBX5KIW.js.map → chunk-H4RVA4VE.js.map} +0 -0
- /package/dist/{chunk-2GQLMQVJ.js.map → chunk-MW4VAKAO.js.map} +0 -0
- /package/dist/{chunk-JFONSPNF.js.map → chunk-PY4XCDLR.js.map} +0 -0
- /package/dist/{chunk-263BEJJO.js.map → chunk-QOWVNWOC.js.map} +0 -0
- /package/dist/{chunk-XRFJJ2IU.js.map → chunk-XOFWRC73.js.map} +0 -0
package/dist/core/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as Actor, C as COMPLETE, c as COMPLETE_MSG, d as COMPLETE_ONLY_BATCH, D as DATA, e as DEFAULT_ACTOR, f as DIRTY, g as DIRTY_MSG, h as DIRTY_ONLY_BATCH, i as DepRecord, E as ERROR, F as FnCtx, G as GlobalInspectorEvent, j as GlobalInspectorHook, k as GraphReFlyConfig, l as GuardAction, m as GuardDenied, n as GuardDeniedDetails, H as HashFn, I as INVALIDATE, o as INVALIDATE_MSG, p as INVALIDATE_ONLY_BATCH, M as Message, q as MessageContext, r as MessageTypeRegistration, s as MessageTypeRegistrationInput, t as Messages, N as Node, b as NodeActions, u as NodeCtx, v as NodeDescribeKind, w as NodeFn, x as NodeFnCleanup, y as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, a as NodeOptions, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, P as NodeVersionInfo, Q as OnMessageHandler, R as OnSubscribeHandler, S as PAUSE, T as PolicyAllow, U as PolicyDeny, V as PolicyRuleData, W as RESOLVED, X as RESOLVED_MSG, Y as RESOLVED_ONLY_BATCH, Z as RESUME, _ as START, $ as START_MSG, a0 as SubscribeContext, a1 as TEARDOWN, a2 as TEARDOWN_MSG, a3 as TEARDOWN_ONLY_BATCH, a4 as V0, a5 as V1, a6 as VersioningLevel, a7 as VersioningOptions, a8 as accessHintForGuard, a9 as advanceVersion, aa as configure, ab as createVersioning, ac as defaultConfig, ad as defaultHash, ae as isV1, af as node, ag as normalizeActor, ah as policy, ai as policyFromRules, aj as registerBuiltins } from '../node-
|
|
2
|
-
export { A as AutoTrackOptions, D as DerivedFn, a as DynamicFn, E as EffectFn, P as PipeOperator, b as ProducerFn, T as TrackFn, c as autoTrackNode, d as batch, e as derived, f as downWithBatch, g as dynamicNode, h as effect, j as isBatching, m as monotonicNs, p as pipe, k as producer, s as state, w as wallClockNs } from '../index-
|
|
3
|
-
export { D as DescribeDetail, a as DescribeField, b as DescribeNodeOutput, r as resolveDescribeFields } from '../meta-
|
|
1
|
+
export { A as Actor, C as COMPLETE, c as COMPLETE_MSG, d as COMPLETE_ONLY_BATCH, D as DATA, e as DEFAULT_ACTOR, f as DIRTY, g as DIRTY_MSG, h as DIRTY_ONLY_BATCH, i as DepRecord, E as ERROR, F as FnCtx, G as GlobalInspectorEvent, j as GlobalInspectorHook, k as GraphReFlyConfig, l as GuardAction, m as GuardDenied, n as GuardDeniedDetails, H as HashFn, I as INVALIDATE, o as INVALIDATE_MSG, p as INVALIDATE_ONLY_BATCH, M as Message, q as MessageContext, r as MessageTypeRegistration, s as MessageTypeRegistrationInput, t as Messages, N as Node, b as NodeActions, u as NodeCtx, v as NodeDescribeKind, w as NodeFn, x as NodeFnCleanup, y as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, a as NodeOptions, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, P as NodeVersionInfo, Q as OnMessageHandler, R as OnSubscribeHandler, S as PAUSE, T as PolicyAllow, U as PolicyDeny, V as PolicyRuleData, W as RESOLVED, X as RESOLVED_MSG, Y as RESOLVED_ONLY_BATCH, Z as RESUME, _ as START, $ as START_MSG, a0 as SubscribeContext, a1 as TEARDOWN, a2 as TEARDOWN_MSG, a3 as TEARDOWN_ONLY_BATCH, a4 as V0, a5 as V1, a6 as VersioningLevel, a7 as VersioningOptions, a8 as accessHintForGuard, a9 as advanceVersion, aa as configure, ab as createVersioning, ac as defaultConfig, ad as defaultHash, ae as isV1, af as node, ag as normalizeActor, ah as policy, ai as policyFromRules, aj as registerBuiltins } from '../node-B-f-Lu-k.cjs';
|
|
2
|
+
export { A as AutoTrackOptions, D as DerivedFn, a as DynamicFn, E as EffectFn, P as PipeOperator, b as ProducerFn, T as TrackFn, c as autoTrackNode, d as batch, e as derived, f as downWithBatch, g as dynamicNode, h as effect, j as isBatching, m as monotonicNs, p as pipe, k as producer, s as state, w as wallClockNs } from '../index-BJB7t9gg.cjs';
|
|
3
|
+
export { D as DescribeDetail, a as DescribeField, b as DescribeNodeOutput, r as resolveDescribeFields } from '../meta-DWbkoq1s.cjs';
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as Actor, C as COMPLETE, c as COMPLETE_MSG, d as COMPLETE_ONLY_BATCH, D as DATA, e as DEFAULT_ACTOR, f as DIRTY, g as DIRTY_MSG, h as DIRTY_ONLY_BATCH, i as DepRecord, E as ERROR, F as FnCtx, G as GlobalInspectorEvent, j as GlobalInspectorHook, k as GraphReFlyConfig, l as GuardAction, m as GuardDenied, n as GuardDeniedDetails, H as HashFn, I as INVALIDATE, o as INVALIDATE_MSG, p as INVALIDATE_ONLY_BATCH, M as Message, q as MessageContext, r as MessageTypeRegistration, s as MessageTypeRegistrationInput, t as Messages, N as Node, b as NodeActions, u as NodeCtx, v as NodeDescribeKind, w as NodeFn, x as NodeFnCleanup, y as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, a as NodeOptions, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, P as NodeVersionInfo, Q as OnMessageHandler, R as OnSubscribeHandler, S as PAUSE, T as PolicyAllow, U as PolicyDeny, V as PolicyRuleData, W as RESOLVED, X as RESOLVED_MSG, Y as RESOLVED_ONLY_BATCH, Z as RESUME, _ as START, $ as START_MSG, a0 as SubscribeContext, a1 as TEARDOWN, a2 as TEARDOWN_MSG, a3 as TEARDOWN_ONLY_BATCH, a4 as V0, a5 as V1, a6 as VersioningLevel, a7 as VersioningOptions, a8 as accessHintForGuard, a9 as advanceVersion, aa as configure, ab as createVersioning, ac as defaultConfig, ad as defaultHash, ae as isV1, af as node, ag as normalizeActor, ah as policy, ai as policyFromRules, aj as registerBuiltins } from '../node-
|
|
2
|
-
export { A as AutoTrackOptions, D as DerivedFn, a as DynamicFn, E as EffectFn, P as PipeOperator, b as ProducerFn, T as TrackFn, c as autoTrackNode, d as batch, e as derived, f as downWithBatch, g as dynamicNode, h as effect, j as isBatching, m as monotonicNs, p as pipe, k as producer, s as state, w as wallClockNs } from '../index-
|
|
3
|
-
export { D as DescribeDetail, a as DescribeField, b as DescribeNodeOutput, r as resolveDescribeFields } from '../meta-
|
|
1
|
+
export { A as Actor, C as COMPLETE, c as COMPLETE_MSG, d as COMPLETE_ONLY_BATCH, D as DATA, e as DEFAULT_ACTOR, f as DIRTY, g as DIRTY_MSG, h as DIRTY_ONLY_BATCH, i as DepRecord, E as ERROR, F as FnCtx, G as GlobalInspectorEvent, j as GlobalInspectorHook, k as GraphReFlyConfig, l as GuardAction, m as GuardDenied, n as GuardDeniedDetails, H as HashFn, I as INVALIDATE, o as INVALIDATE_MSG, p as INVALIDATE_ONLY_BATCH, M as Message, q as MessageContext, r as MessageTypeRegistration, s as MessageTypeRegistrationInput, t as Messages, N as Node, b as NodeActions, u as NodeCtx, v as NodeDescribeKind, w as NodeFn, x as NodeFnCleanup, y as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, a as NodeOptions, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, P as NodeVersionInfo, Q as OnMessageHandler, R as OnSubscribeHandler, S as PAUSE, T as PolicyAllow, U as PolicyDeny, V as PolicyRuleData, W as RESOLVED, X as RESOLVED_MSG, Y as RESOLVED_ONLY_BATCH, Z as RESUME, _ as START, $ as START_MSG, a0 as SubscribeContext, a1 as TEARDOWN, a2 as TEARDOWN_MSG, a3 as TEARDOWN_ONLY_BATCH, a4 as V0, a5 as V1, a6 as VersioningLevel, a7 as VersioningOptions, a8 as accessHintForGuard, a9 as advanceVersion, aa as configure, ab as createVersioning, ac as defaultConfig, ad as defaultHash, ae as isV1, af as node, ag as normalizeActor, ah as policy, ai as policyFromRules, aj as registerBuiltins } from '../node-B-f-Lu-k.js';
|
|
2
|
+
export { A as AutoTrackOptions, D as DerivedFn, a as DynamicFn, E as EffectFn, P as PipeOperator, b as ProducerFn, T as TrackFn, c as autoTrackNode, d as batch, e as derived, f as downWithBatch, g as dynamicNode, h as effect, j as isBatching, m as monotonicNs, p as pipe, k as producer, s as state, w as wallClockNs } from '../index-C-TXEa7C.js';
|
|
3
|
+
export { D as DescribeDetail, a as DescribeField, b as DescribeNodeOutput, r as resolveDescribeFields } from '../meta-CnkLA_43.js';
|
package/dist/core/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-QOWVNWOC.js";
|
|
2
2
|
import {
|
|
3
3
|
resolveDescribeFields
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-H4RVA4VE.js";
|
|
5
5
|
import {
|
|
6
6
|
COMPLETE,
|
|
7
7
|
COMPLETE_MSG,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
registerBuiltins,
|
|
53
53
|
state,
|
|
54
54
|
wallClockNs
|
|
55
|
-
} from "../chunk-
|
|
55
|
+
} from "../chunk-5DJTTKX3.js";
|
|
56
56
|
export {
|
|
57
57
|
COMPLETE,
|
|
58
58
|
COMPLETE_MSG,
|
package/dist/extra/index.cjs
CHANGED
|
@@ -100,6 +100,7 @@ __export(extra_exports, {
|
|
|
100
100
|
fromPromise: () => fromPromise,
|
|
101
101
|
fromPulsar: () => fromPulsar,
|
|
102
102
|
fromRabbitMQ: () => fromRabbitMQ,
|
|
103
|
+
fromRaf: () => fromRaf,
|
|
103
104
|
fromRedisStream: () => fromRedisStream,
|
|
104
105
|
fromSSE: () => fromSSE,
|
|
105
106
|
fromSqlite: () => fromSqlite,
|
|
@@ -1766,37 +1767,35 @@ var NodeImpl = class _NodeImpl {
|
|
|
1766
1767
|
// --- Emit pipeline ---
|
|
1767
1768
|
/**
|
|
1768
1769
|
* @internal The unified dispatch waist — one call = one wave.
|
|
1770
|
+
* See `GRAPHREFLY-SPEC.md` §1.3.1 for protocol context — the stages
|
|
1771
|
+
* below are the implementation order.
|
|
1769
1772
|
*
|
|
1770
1773
|
* Pipeline stages, in order:
|
|
1771
1774
|
*
|
|
1772
|
-
* 1.
|
|
1773
|
-
* 2. Terminal filter — post-COMPLETE/ERROR only TEARDOWN/INVALIDATE
|
|
1775
|
+
* 1. Terminal filter — post-COMPLETE/ERROR only TEARDOWN/INVALIDATE
|
|
1774
1776
|
* still propagate so graph teardown and cache-clear still work.
|
|
1775
|
-
*
|
|
1777
|
+
* 2. Tier sort (stable) — the batch can be in any order when it
|
|
1776
1778
|
* arrives; the walker downstream (`downWithBatch`) assumes
|
|
1777
1779
|
* ascending tier monotone, and so does `_updateState`'s tier-3
|
|
1778
1780
|
* slice walk. This is the single source of truth for ordering.
|
|
1779
|
-
*
|
|
1781
|
+
* 3. Synthetic DIRTY prefix — if a tier-3 payload is present, no
|
|
1780
1782
|
* DIRTY is already in the batch, and the node isn't already in
|
|
1781
1783
|
* `"dirty"` status, prepend `[DIRTY]` after any tier-0 START
|
|
1782
1784
|
* entries. Guarantees spec §1.3.1 (DIRTY precedes DATA within
|
|
1783
1785
|
* the same batch) uniformly across every entry point.
|
|
1784
|
-
*
|
|
1786
|
+
* 4. PAUSE/RESUME lock bookkeeping (C0) — update `_pauseLocks`,
|
|
1785
1787
|
* derive `_paused`, filter unknown-lockId RESUME, replay
|
|
1786
1788
|
* bufferAll buffer on final lock release.
|
|
1787
|
-
*
|
|
1789
|
+
* 5. Meta TEARDOWN fan-out — notify meta children before
|
|
1788
1790
|
* `_updateState`'s TEARDOWN branch calls `_deactivate`. Hoisted
|
|
1789
1791
|
* out of the walk to keep `_updateState` re-entrance-free.
|
|
1790
|
-
*
|
|
1792
|
+
* 6. `_updateState` — walk the batch in tier order, advancing
|
|
1791
1793
|
* `_cached` / `_status` / `_versioning` and running equals
|
|
1792
1794
|
* substitution on tier-3 DATA (§3.5.1). Returns
|
|
1793
1795
|
* `{finalMessages, equalsError?}`.
|
|
1794
|
-
*
|
|
1796
|
+
* 7. `downWithBatch` dispatch (or bufferAll capture if paused with
|
|
1795
1797
|
* `pausable: "resumeAll"`).
|
|
1796
|
-
*
|
|
1797
|
-
*
|
|
1798
|
-
* `node.down` / `node.emit` / `actions.down` / `actions.emit` all
|
|
1799
|
-
* converge here — the unified `_emit` waist (spec §1.3.1).
|
|
1798
|
+
* 8. Recursive ERROR emission if equals threw mid-walk.
|
|
1800
1799
|
*/
|
|
1801
1800
|
_emit(messages) {
|
|
1802
1801
|
if (messages.length === 0) return;
|
|
@@ -2473,6 +2472,72 @@ function fromTimer(ms, opts) {
|
|
|
2473
2472
|
return cleanup;
|
|
2474
2473
|
}, sourceOpts2(rest));
|
|
2475
2474
|
}
|
|
2475
|
+
function fromRaf(opts) {
|
|
2476
|
+
const { signal, ...rest } = opts ?? {};
|
|
2477
|
+
return producer((a) => {
|
|
2478
|
+
let done = false;
|
|
2479
|
+
let rafId;
|
|
2480
|
+
let fallbackTimer;
|
|
2481
|
+
let abortListenerAdded = false;
|
|
2482
|
+
let visibilityListenerAdded = false;
|
|
2483
|
+
const raf = typeof requestAnimationFrame === "function" ? requestAnimationFrame : void 0;
|
|
2484
|
+
const caf = typeof cancelAnimationFrame === "function" ? cancelAnimationFrame : void 0;
|
|
2485
|
+
const doc = typeof document !== "undefined" ? document : void 0;
|
|
2486
|
+
const clearPending = () => {
|
|
2487
|
+
if (rafId !== void 0 && caf) caf(rafId);
|
|
2488
|
+
if (fallbackTimer !== void 0) clearTimeout(fallbackTimer);
|
|
2489
|
+
rafId = void 0;
|
|
2490
|
+
fallbackTimer = void 0;
|
|
2491
|
+
};
|
|
2492
|
+
const cleanup = () => {
|
|
2493
|
+
done = true;
|
|
2494
|
+
clearPending();
|
|
2495
|
+
if (abortListenerAdded) {
|
|
2496
|
+
signal?.removeEventListener("abort", onAbort);
|
|
2497
|
+
abortListenerAdded = false;
|
|
2498
|
+
}
|
|
2499
|
+
if (visibilityListenerAdded && doc) {
|
|
2500
|
+
doc.removeEventListener("visibilitychange", onVisibilityChange);
|
|
2501
|
+
visibilityListenerAdded = false;
|
|
2502
|
+
}
|
|
2503
|
+
};
|
|
2504
|
+
const onAbort = () => {
|
|
2505
|
+
if (done) return;
|
|
2506
|
+
cleanup();
|
|
2507
|
+
a.down([[ERROR, signal.reason]]);
|
|
2508
|
+
};
|
|
2509
|
+
const tick = (now) => {
|
|
2510
|
+
if (done) return;
|
|
2511
|
+
a.emit(now);
|
|
2512
|
+
scheduleNext();
|
|
2513
|
+
};
|
|
2514
|
+
const scheduleNext = () => {
|
|
2515
|
+
if (done) return;
|
|
2516
|
+
if (raf && (!doc || doc.visibilityState !== "hidden")) {
|
|
2517
|
+
rafId = raf(tick);
|
|
2518
|
+
} else {
|
|
2519
|
+
fallbackTimer = setTimeout(() => tick(performance.now()), 16);
|
|
2520
|
+
}
|
|
2521
|
+
};
|
|
2522
|
+
const onVisibilityChange = () => {
|
|
2523
|
+
if (done) return;
|
|
2524
|
+
clearPending();
|
|
2525
|
+
scheduleNext();
|
|
2526
|
+
};
|
|
2527
|
+
if (signal?.aborted) {
|
|
2528
|
+
onAbort();
|
|
2529
|
+
return cleanup;
|
|
2530
|
+
}
|
|
2531
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
2532
|
+
abortListenerAdded = signal !== void 0;
|
|
2533
|
+
if (doc && raf) {
|
|
2534
|
+
doc.addEventListener("visibilitychange", onVisibilityChange);
|
|
2535
|
+
visibilityListenerAdded = true;
|
|
2536
|
+
}
|
|
2537
|
+
scheduleNext();
|
|
2538
|
+
return cleanup;
|
|
2539
|
+
}, sourceOpts2(rest));
|
|
2540
|
+
}
|
|
2476
2541
|
function fromCron(expr, opts) {
|
|
2477
2542
|
const schedule = parseCron(expr);
|
|
2478
2543
|
const { tickMs: tickOpt, output, ...rest } = opts ?? {};
|
|
@@ -9689,6 +9754,7 @@ function workerSelf(target, opts) {
|
|
|
9689
9754
|
fromPromise,
|
|
9690
9755
|
fromPulsar,
|
|
9691
9756
|
fromRabbitMQ,
|
|
9757
|
+
fromRaf,
|
|
9692
9758
|
fromRedisStream,
|
|
9693
9759
|
fromSSE,
|
|
9694
9760
|
fromSqlite,
|