@graphrefly/graphrefly 0.26.0 → 0.27.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/ai-CaR_912Q.d.cts +1033 -0
- package/dist/ai-WlRltJV7.d.ts +1033 -0
- package/dist/audit-ClmqGOCx.d.cts +245 -0
- package/dist/audit-DRlSzBu9.d.ts +245 -0
- package/dist/{chunk-JYXEWPH4.js → chunk-APFNLIRG.js} +2 -2
- package/dist/chunk-AT5LKYNL.js +395 -0
- package/dist/chunk-AT5LKYNL.js.map +1 -0
- package/dist/{chunk-AMCG74RZ.js → chunk-BQ6RQQFF.js} +215 -2128
- package/dist/chunk-BQ6RQQFF.js.map +1 -0
- package/dist/{chunk-IZYUSJC7.js → chunk-DST5DKZS.js} +6 -4
- package/dist/{chunk-IZYUSJC7.js.map → chunk-DST5DKZS.js.map} +1 -1
- package/dist/{chunk-LCE3GF5P.js → chunk-GTE6PWRZ.js} +2 -2
- package/dist/{chunk-RB6QPHJ7.js → chunk-J2VBW3DZ.js} +2 -93
- package/dist/chunk-J2VBW3DZ.js.map +1 -0
- package/dist/{chunk-FQMKGR6L.js → chunk-JWBCY4NC.js} +3 -3
- package/dist/chunk-K2AUJHVP.js +2251 -0
- package/dist/chunk-K2AUJHVP.js.map +1 -0
- package/dist/chunk-NC6S43JJ.js +456 -0
- package/dist/chunk-NC6S43JJ.js.map +1 -0
- package/dist/chunk-OFVJBJXR.js +98 -0
- package/dist/chunk-OFVJBJXR.js.map +1 -0
- package/dist/{chunk-6LDQFTYS.js → chunk-OU5CQKNW.js} +2 -2
- package/dist/{chunk-THTWHNU4.js → chunk-PF7GRZMW.js} +5 -5
- package/dist/chunk-RNHBMHKA.js +1665 -0
- package/dist/chunk-RNHBMHKA.js.map +1 -0
- package/dist/{chunk-SN4YWWYO.js → chunk-WBZOVTYK.js} +11 -11
- package/dist/chunk-WKNUIZOY.js +354 -0
- package/dist/chunk-WKNUIZOY.js.map +1 -0
- package/dist/{chunk-ZQMEI34O.js → chunk-X3VMZYBT.js} +3 -3
- package/dist/chunk-X5R3GL6H.js +525 -0
- package/dist/chunk-X5R3GL6H.js.map +1 -0
- package/dist/compat/index.d.cts +14 -14
- package/dist/compat/index.d.ts +14 -14
- package/dist/compat/index.js +17 -16
- package/dist/compat/jotai/index.d.cts +2 -2
- package/dist/compat/jotai/index.d.ts +2 -2
- package/dist/compat/nanostores/index.d.cts +2 -2
- package/dist/compat/nanostores/index.d.ts +2 -2
- package/dist/compat/nestjs/index.d.cts +6 -6
- package/dist/compat/nestjs/index.d.ts +6 -6
- package/dist/compat/nestjs/index.js +7 -6
- package/dist/compat/react/index.d.cts +2 -2
- package/dist/compat/react/index.d.ts +2 -2
- package/dist/compat/solid/index.d.cts +2 -2
- package/dist/compat/solid/index.d.ts +2 -2
- package/dist/compat/svelte/index.d.cts +2 -2
- package/dist/compat/svelte/index.d.ts +2 -2
- package/dist/compat/vue/index.d.cts +2 -2
- package/dist/compat/vue/index.d.ts +2 -2
- package/dist/compat/zustand/index.d.cts +5 -5
- package/dist/compat/zustand/index.d.ts +5 -5
- package/dist/compat/zustand/index.js +3 -3
- package/dist/composite-C7PcQvcs.d.cts +303 -0
- package/dist/composite-aUCvjZVR.d.ts +303 -0
- package/dist/core/index.d.cts +4 -3
- package/dist/core/index.d.ts +4 -3
- package/dist/{demo-shell-DEp-nMTl.d.ts → demo-shell-BDkOptd6.d.ts} +2 -2
- package/dist/{demo-shell-26p5fVxn.d.cts → demo-shell-Crid1WdR.d.cts} +2 -2
- package/dist/extra/index.d.cts +5 -4
- package/dist/extra/index.d.ts +5 -4
- package/dist/extra/index.js +68 -62
- package/dist/extra/sources.d.cts +1 -1
- package/dist/extra/sources.d.ts +1 -1
- package/dist/graph/index.d.cts +5 -5
- package/dist/graph/index.d.ts +5 -5
- package/dist/graph/index.js +3 -3
- package/dist/{graph-DQ69XU0g.d.ts → graph-CCwGKLCm.d.ts} +4 -4
- package/dist/{graph-6tZ5jEzr.d.cts → graph-DNCrvZSn.d.cts} +4 -4
- package/dist/{index-qldRdbQw.d.ts → index-3lsddbbS.d.ts} +1 -1
- package/dist/{index-Bxb5ZYc9.d.cts → index-B1tloyhO.d.cts} +1 -1
- package/dist/{index-eJ6T_qGM.d.ts → index-B6D3QNSA.d.ts} +2 -2
- package/dist/{index-B4MP_8V_.d.cts → index-B6EhDnjH.d.cts} +1 -1
- package/dist/{index-CmnuOibw.d.ts → index-B9B7_HEY.d.ts} +1 -1
- package/dist/{index-BeIdBfcb.d.cts → index-BHlKbUwO.d.cts} +16 -315
- package/dist/{index-CuYwdKO-.d.ts → index-BPVt8kqc.d.ts} +3 -3
- package/dist/index-BaSM3aYt.d.ts +195 -0
- package/dist/{index-BjI6ty9z.d.ts → index-BuEoe-Qu.d.ts} +9 -9
- package/dist/{index-DdD5MVDL.d.ts → index-BwfLUNw4.d.ts} +16 -315
- package/dist/{index-QBpffFW-.d.cts → index-ByQxazQJ.d.cts} +1 -1
- package/dist/{index-xdGjv0nO.d.ts → index-C0svESO4.d.ts} +1 -1
- package/dist/{index-BW1z3BN9.d.ts → index-C8oil6M6.d.ts} +3 -3
- package/dist/{index-C8mdwMXc.d.cts → index-CI3DprxP.d.cts} +3 -3
- package/dist/{index-CUwyr1Kk.d.cts → index-CO8uBlUh.d.cts} +2 -2
- package/dist/{index-DrISNAOm.d.ts → index-CxFrXH4m.d.ts} +1 -1
- package/dist/{index-BEfE8H_G.d.cts → index-D8wS_PeY.d.cts} +9 -9
- package/dist/{index-CUyrtuOf.d.cts → index-DO_6JN9Z.d.cts} +1 -1
- package/dist/index-DVGiGFGT.d.cts +195 -0
- package/dist/{index-DFhjO4Gg.d.cts → index-DYme44FM.d.cts} +1 -1
- package/dist/{index-_oMEWlDq.d.cts → index-DlLp-2Xn.d.cts} +3 -3
- package/dist/{index-CPgZ5wRl.d.ts → index-Dzk2hrlR.d.ts} +1 -1
- package/dist/{index-Bd_fwmLf.d.cts → index-VHqptjhu.d.cts} +1 -1
- package/dist/{index-CDAjUFIv.d.ts → index-VdHQMPy1.d.ts} +1 -1
- package/dist/{index-B_IP40nB.d.cts → index-Xi3u0HCQ.d.cts} +1 -1
- package/dist/{index-BYOHF0zP.d.ts → index-wEn0eFe8.d.ts} +1 -1
- package/dist/index.d.cts +35 -1692
- package/dist/index.d.ts +35 -1692
- package/dist/index.js +307 -3731
- package/dist/index.js.map +1 -1
- package/dist/memory-C6Z2tGpC.d.cts +139 -0
- package/dist/memory-li6FL5RM.d.ts +139 -0
- package/dist/messaging-Gt4LPbyA.d.cts +269 -0
- package/dist/messaging-XDoYablx.d.ts +269 -0
- package/dist/{meta-C0-8XW6Q.d.cts → meta-BxCA7rcr.d.cts} +1 -1
- package/dist/{meta-BGqSZ7mt.d.ts → meta-CbznRPYJ.d.ts} +1 -1
- package/dist/{node-C_IBuvX2.d.cts → node-BmerH3kS.d.cts} +1 -1
- package/dist/{node-C_IBuvX2.d.ts → node-BmerH3kS.d.ts} +1 -1
- package/dist/{observable-DCk45RH5.d.ts → observable-BgGUwcqp.d.ts} +1 -1
- package/dist/{observable-Crr1jgzx.d.cts → observable-DJt_AxzQ.d.cts} +1 -1
- package/dist/patterns/ai.cjs +7930 -0
- package/dist/patterns/ai.cjs.map +1 -0
- package/dist/patterns/ai.d.cts +10 -0
- package/dist/patterns/ai.d.ts +10 -0
- package/dist/patterns/ai.js +71 -0
- package/dist/patterns/ai.js.map +1 -0
- package/dist/patterns/audit.cjs +5805 -0
- package/dist/patterns/audit.cjs.map +1 -0
- package/dist/patterns/audit.d.cts +6 -0
- package/dist/patterns/audit.d.ts +6 -0
- package/dist/patterns/audit.js +29 -0
- package/dist/patterns/audit.js.map +1 -0
- package/dist/patterns/demo-shell.d.cts +6 -6
- package/dist/patterns/demo-shell.d.ts +6 -6
- package/dist/patterns/demo-shell.js +4 -4
- package/dist/patterns/memory.cjs +5283 -0
- package/dist/patterns/memory.cjs.map +1 -0
- package/dist/patterns/memory.d.cts +5 -0
- package/dist/patterns/memory.d.ts +5 -0
- package/dist/patterns/memory.js +20 -0
- package/dist/patterns/memory.js.map +1 -0
- package/dist/patterns/reactive-layout/index.d.cts +6 -6
- package/dist/patterns/reactive-layout/index.d.ts +6 -6
- package/dist/patterns/reactive-layout/index.js +4 -4
- package/dist/{reactive-layout-BaOQefHu.d.cts → reactive-layout-MQP--J3F.d.cts} +2 -2
- package/dist/{reactive-layout-D9gejYXE.d.ts → reactive-layout-u5Ulnqag.d.ts} +2 -2
- package/dist/{storage-BMycWEh2.d.ts → storage-CMjUUuxn.d.ts} +2 -2
- package/dist/{storage-DiqWHzVI.d.cts → storage-DdWlZo6U.d.cts} +2 -2
- package/dist/sugar-CCOxXK1e.d.ts +201 -0
- package/dist/sugar-D02n5JjF.d.cts +201 -0
- package/package.json +32 -2
- package/dist/chunk-AMCG74RZ.js.map +0 -1
- package/dist/chunk-RB6QPHJ7.js.map +0 -1
- package/dist/index-C0ZXMaXO.d.cts +0 -392
- package/dist/index-CY2TljO4.d.ts +0 -392
- /package/dist/{chunk-JYXEWPH4.js.map → chunk-APFNLIRG.js.map} +0 -0
- /package/dist/{chunk-LCE3GF5P.js.map → chunk-GTE6PWRZ.js.map} +0 -0
- /package/dist/{chunk-FQMKGR6L.js.map → chunk-JWBCY4NC.js.map} +0 -0
- /package/dist/{chunk-6LDQFTYS.js.map → chunk-OU5CQKNW.js.map} +0 -0
- /package/dist/{chunk-THTWHNU4.js.map → chunk-PF7GRZMW.js.map} +0 -0
- /package/dist/{chunk-SN4YWWYO.js.map → chunk-WBZOVTYK.js.map} +0 -0
- /package/dist/{chunk-ZQMEI34O.js.map → chunk-X3VMZYBT.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/extra/observable.ts","../src/extra/backpressure.ts","../src/extra/reactive-log.ts"],"sourcesContent":["// ---------------------------------------------------------------------------\n// RxJS bridge — reactive interop between GraphReFly nodes and RxJS Observables.\n// ---------------------------------------------------------------------------\n// Usage:\n// import { toObservable } from '@graphrefly/graphrefly-ts/extra';\n// const values$ = toObservable(myNode); // Observable<T>\n// const msgs$ = toObservable(myNode, { raw: true }); // Observable<Messages>\n// ---------------------------------------------------------------------------\n\nimport { Observable } from \"rxjs\";\nimport { COMPLETE, DATA, ERROR, type Messages } from \"../core/messages.js\";\nimport type { Node } from \"../core/node.js\";\n\n/** Options for {@link toObservable}. */\nexport type ToObservableOptions = {\n\t/**\n\t * When `true`, emit raw `Messages` batches instead of extracted `DATA` values.\n\t * Terminal batches are still emitted as the final `next()` before the\n\t * Observable signal (error/complete).\n\t */\n\traw?: boolean;\n};\n\n/**\n * Bridge a `Node<T>` to an RxJS `Observable`.\n *\n * Default mode emits the node's value on each `DATA` message. Maps `ERROR` to\n * `subscriber.error()` and `COMPLETE` to `subscriber.complete()`.\n * Protocol-internal signals (DIRTY, RESOLVED, PAUSE, etc.) are skipped.\n *\n * With `{ raw: true }`, emits full `[[Type, Data?], ...]` message batches.\n * The Observable terminates on ERROR or COMPLETE (the terminal batch is still\n * emitted as the final `next()` before the Observable signal).\n *\n * For graph-level observation, use `toObservable(graph.resolve(path))` or\n * subscribe to `graph.observe()` directly.\n *\n * Unsubscribing the Observable unsubscribes the node.\n */\nexport function toObservable<T>(\n\tnode: Node<T>,\n\toptions?: ToObservableOptions & { raw?: false },\n): Observable<T>;\nexport function toObservable<T>(\n\tnode: Node<T>,\n\toptions: ToObservableOptions & { raw: true },\n): Observable<Messages>;\nexport function toObservable<T>(\n\tnode: Node<T>,\n\toptions?: ToObservableOptions,\n): Observable<T | Messages> {\n\tif (options?.raw) {\n\t\treturn new Observable<Messages>((subscriber) => {\n\t\t\tconst unsub = node.subscribe((msgs) => {\n\t\t\t\tif (subscriber.closed) return;\n\t\t\t\tsubscriber.next(msgs);\n\t\t\t\tfor (const m of msgs) {\n\t\t\t\t\tif (m[0] === ERROR) {\n\t\t\t\t\t\tsubscriber.error(m[1]);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (m[0] === COMPLETE) {\n\t\t\t\t\t\tsubscriber.complete();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn unsub;\n\t\t});\n\t}\n\n\treturn new Observable<T>((subscriber) => {\n\t\tconst unsub = node.subscribe((msgs) => {\n\t\t\tfor (const m of msgs) {\n\t\t\t\tif (subscriber.closed) return;\n\t\t\t\tif (m[0] === DATA) {\n\t\t\t\t\tsubscriber.next(m[1] as T);\n\t\t\t\t} else if (m[0] === ERROR) {\n\t\t\t\t\tsubscriber.error(m[1]);\n\t\t\t\t\treturn;\n\t\t\t\t} else if (m[0] === COMPLETE) {\n\t\t\t\t\tsubscriber.complete();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn unsub;\n\t});\n}\n","/**\n * Watermark-based backpressure controller — reactive PAUSE/RESUME flow control.\n *\n * Purely synchronous, event-driven. No timers, no polling, no Promises.\n * Each controller instance uses a unique lockId so multiple controllers\n * on the same upstream node do not collide.\n *\n * @module\n */\n\nimport { type Messages, PAUSE, RESUME } from \"../core/messages.js\";\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport type WatermarkOptions = {\n\t/** Pending count at which PAUSE is sent upstream. */\n\thighWaterMark: number;\n\t/** Pending count at which RESUME is sent upstream (after being paused). */\n\tlowWaterMark: number;\n};\n\nexport type WatermarkController = {\n\t/** Call when a DATA message is buffered/enqueued. Returns `true` if PAUSE was just sent. */\n\tonEnqueue(): boolean;\n\t/** Call when a buffered item is consumed. Returns `true` if RESUME was just sent. */\n\tonDequeue(): boolean;\n\t/** Current un-consumed item count. */\n\treadonly pending: number;\n\t/** Whether upstream is currently paused by this controller. */\n\treadonly paused: boolean;\n\t/** Dispose: if paused, sends RESUME to unblock upstream. */\n\tdispose(): void;\n};\n\n// ---------------------------------------------------------------------------\n// Factory\n// ---------------------------------------------------------------------------\n\nlet nextLockId = 0;\n\n/**\n * Creates a watermark-based backpressure controller.\n *\n * @param sendUp - Callback that delivers messages upstream (typically `handle.up`).\n * @param opts - High/low watermark thresholds (item counts).\n * @returns A {@link WatermarkController}.\n *\n * @example\n * ```ts\n * const handle = graph.observe(\"fast-source\");\n * const wm = createWatermarkController(\n * (msgs) => handle.up(msgs),\n * { highWaterMark: 64, lowWaterMark: 16 },\n * );\n *\n * // In sink callback:\n * handle.subscribe((msgs) => {\n * for (const msg of msgs) {\n * if (msg[0] === DATA) {\n * buffer.push(msg[1]);\n * wm.onEnqueue();\n * }\n * }\n * });\n *\n * // When consumer drains:\n * const item = buffer.shift();\n * wm.onDequeue();\n * ```\n *\n * @category extra\n */\nexport function createWatermarkController(\n\tsendUp: (messages: Messages) => void,\n\topts: WatermarkOptions,\n): WatermarkController {\n\tif (opts.highWaterMark < 1) throw new RangeError(\"highWaterMark must be >= 1\");\n\tif (opts.lowWaterMark < 0) throw new RangeError(\"lowWaterMark must be >= 0\");\n\tif (opts.lowWaterMark >= opts.highWaterMark)\n\t\tthrow new RangeError(\"lowWaterMark must be < highWaterMark\");\n\tconst lockId = Symbol(`bp-${++nextLockId}`);\n\tlet pending = 0;\n\tlet paused = false;\n\n\treturn {\n\t\tonEnqueue(): boolean {\n\t\t\tpending += 1;\n\t\t\tif (!paused && pending >= opts.highWaterMark) {\n\t\t\t\tpaused = true;\n\t\t\t\tsendUp([[PAUSE, lockId]]);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tonDequeue(): boolean {\n\t\t\tif (pending > 0) pending -= 1;\n\t\t\tif (paused && pending <= opts.lowWaterMark) {\n\t\t\t\tpaused = false;\n\t\t\t\tsendUp([[RESUME, lockId]]);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tget pending() {\n\t\t\treturn pending;\n\t\t},\n\t\tget paused() {\n\t\t\treturn paused;\n\t\t},\n\t\tdispose() {\n\t\t\tif (paused) {\n\t\t\t\tpaused = false;\n\t\t\t\tsendUp([[RESUME, lockId]]);\n\t\t\t}\n\t\t},\n\t};\n}\n","/**\n * Reactive append-only log (roadmap §3.2) — emits `readonly T[]` snapshots directly.\n *\n * Internal version counter drives efficient equality without leaking `Versioned`\n * into the public API (spec §5.12).\n *\n * **Wave 4 refactor (2026-04-15):** Introduces the `LogBackend<T>` pluggable-backend\n * interface. The default `NativeLogBackend` uses a ring buffer when `maxSize` is set\n * (O(1) append + trim) and a flat array otherwise. `tail(n)` and `slice(start, stop)`\n * are memoized — repeat calls with identical arguments return the same derived node,\n * bounding the keepalive-subscription footprint. The standalone `logSlice` factory\n * has been removed; use `log.slice(start, stop)` instead.\n */\nimport { batch } from \"../core/batch.js\";\nimport { DATA, DIRTY } from \"../core/messages.js\";\nimport type { Node } from \"../core/node.js\";\nimport { derived, state } from \"../core/sugar.js\";\nimport type { VersioningLevel } from \"../core/versioning.js\";\n\nexport type ReactiveLogOptions<T> = {\n\tname?: string;\n\tmaxSize?: number;\n\t/**\n\t * Optional versioning level for the underlying `entries` state node. Set\n\t * at construction time; cannot be changed later. Pass `0` for V0 identity\n\t * + monotonic version counter, or `1` for V1 + content-addressed cid.\n\t */\n\tversioning?: VersioningLevel;\n\t/**\n\t * Storage backend. Defaults to `NativeLogBackend` (ring buffer if `maxSize` is set,\n\t * flat array otherwise). Users can plug in persistent / RRB-tree backends via\n\t * the {@link LogBackend} interface.\n\t */\n\tbackend?: LogBackend<T>;\n};\n\nexport type ReactiveLogBundle<T> = {\n\t/** Emits `readonly T[]` on each append/clear/trim (two-phase). */\n\treadonly entries: Node<readonly T[]>;\n\t/** Current entry count (O(1)). */\n\treadonly size: number;\n\t/** Positional access (O(1)); returns `undefined` on out-of-range. Supports negative indices (Python-style). */\n\tat: (index: number) => T | undefined;\n\tappend: (value: T) => void;\n\t/**\n\t * Push all values, emit one snapshot. No-op if `values` is empty.\n\t * **Iterable consumption:** `values` is a `readonly T[]` — safe to pass arrays.\n\t */\n\tappendMany: (values: readonly T[]) => void;\n\tclear: () => void;\n\t/** Remove the first `n` entries (clamped to `size`). Throws on non-integer or negative `n`. */\n\ttrimHead: (n: number) => void;\n\t/**\n\t * Last `n` entries (or fewer) as a derived reactive view. Memoized with\n\t * an LRU cache (default cap 64) — repeat calls with the same `n` return\n\t * the same node. Throws on non-integer or negative `n`.\n\t *\n\t * **LRU eviction contract (D3(b)):** when a 65th distinct `n` is passed,\n\t * the least-recently-used cached view is evicted and its keepalive is\n\t * disposed. External holders of the evicted node will NOT receive further\n\t * updates — re-call `tail(n)` for a fresh node, or dispose proactively\n\t * via {@link disposeTail} / {@link disposeAllViews}. To avoid surprise:\n\t * resolve `tail(n)` at the point of use rather than caching the returned\n\t * node across many distinct `n`s.\n\t */\n\ttail: (n: number) => Node<readonly T[]>;\n\t/**\n\t * Reactive view of `entries.slice(start, stop)` — non-negative integer\n\t * `start`, non-negative integer `stop` (exclusive) or `undefined` (to end).\n\t * Memoized with an LRU cache (default cap 64) — repeat calls with the\n\t * same `(start, stop)` return the same node.\n\t *\n\t * Throws on non-integer `start`, negative `start`, non-integer `stop`, or\n\t * negative `stop` (P4 — the backend cannot cheaply honor JS-style\n\t * negative `stop` without scanning length; disallowed for a consistent\n\t * contract between backend, derived recomputation, and cached initial).\n\t *\n\t * **LRU eviction contract (D3(b)):** same as {@link tail} — past 64\n\t * distinct `(start, stop)` pairs, the oldest cached view is evicted and\n\t * its keepalive disposed. External holders stop receiving updates.\n\t */\n\tslice: (start: number, stop?: number) => Node<readonly T[]>;\n\t/**\n\t * Releases the cached `tail(n)` view if present (disposes its keepalive\n\t * subscription). Subsequent `tail(n)` calls create a fresh node. No-op if\n\t * `n` was not cached. Returns `true` if a view was disposed.\n\t */\n\tdisposeTail: (n: number) => boolean;\n\t/**\n\t * Releases the cached `slice(start, stop?)` view if present. No-op if not cached.\n\t */\n\tdisposeSlice: (start: number, stop?: number) => boolean;\n\t/** Releases all cached tail/slice views and their keepalive subscriptions. */\n\tdisposeAllViews: () => void;\n\t/**\n\t * Releases all internal keepalive subscriptions so the bundle can be\n\t * GC'd — currently equivalent to {@link disposeAllViews}, but exposed as\n\t * a uniform API across all reactive data structures for lifecycle\n\t * symmetry (mirrors `reactiveMap.dispose` / `reactiveList.dispose` /\n\t * `reactiveIndex.dispose`). Idempotent. D6(a).\n\t */\n\tdispose: () => void;\n};\n\n// ── Backend interface ─────────────────────────────────────────────────────\n\n/**\n * Storage contract for {@link reactiveLog}. Implementations own the mutable state and\n * expose a monotonic `version` counter that increments on every structural change.\n *\n * The reactive layer reads `version` to decide when to emit; it does not inspect\n * internal representation. Users can plug in persistent / ring-buffer / skip-list\n * backends without touching the reactive emission logic.\n *\n * @remarks Post-1.0 op-log changesets will extend this interface with a\n * `changesSince(version: number): Iterable<Change>` method. Current consumers\n * should treat all methods here as stable.\n *\n * @category extra\n */\nexport interface LogBackend<T> {\n\t/** Monotonic mutation counter; increments on every append/trim/clear that changes state. */\n\treadonly version: number;\n\t/** Number of entries currently stored. */\n\treadonly size: number;\n\t/** O(1) positional access; returns `undefined` on out-of-range. */\n\tat(index: number): T | undefined;\n\t/** Append a value. Applies `maxSize` head-drop if configured. Advances `version`. */\n\tappend(value: T): void;\n\t/** Append a batch; advances `version` once. No-op if `values.length === 0`. */\n\tappendMany(values: readonly T[]): void;\n\t/** Remove all entries. Returns count removed. Advances `version` only if non-zero. */\n\tclear(): number;\n\t/** Remove the first `n` entries (clamped). Returns count removed. Throws on negative `n`. */\n\ttrimHead(n: number): number;\n\t/** Fresh snapshot array for `[start, stop)`. Throws on negative `start`. */\n\tslice(start: number, stop?: number): readonly T[];\n\t/** Last `n` entries as a fresh array. Throws on negative `n`. */\n\ttail(n: number): readonly T[];\n\t/** Full snapshot as a fresh array. */\n\ttoArray(): readonly T[];\n}\n\n/**\n * Default append-only log backend.\n *\n * - When `maxSize` is set: uses a **ring buffer** with `_head` index and circular\n * modular arithmetic. Append and trim become O(1); snapshot is O(size) unrolling.\n * - When `maxSize` is unset: uses a flat array with standard push/splice.\n *\n * `appendMany` pre-trims oversize input: if `values.length > maxSize`, only the\n * tail of `values` is pushed (the rest would be immediately evicted).\n *\n * @category extra\n */\nexport class NativeLogBackend<T> implements LogBackend<T> {\n\tprivate _version = 0;\n\tprivate readonly _maxSize?: number;\n\tprivate readonly _buf: T[];\n\tprivate _head = 0;\n\tprivate _size = 0;\n\n\tconstructor(initial?: readonly T[], maxSize?: number) {\n\t\tif (maxSize !== undefined && maxSize < 1) {\n\t\t\tthrow new RangeError(\"maxSize must be >= 1\");\n\t\t}\n\t\tthis._maxSize = maxSize;\n\t\tif (maxSize !== undefined) {\n\t\t\t// Ring buffer mode — pre-allocate fixed size\n\t\t\tthis._buf = new Array(maxSize);\n\t\t\tif (initial && initial.length > 0) {\n\t\t\t\tconst take = Math.min(initial.length, maxSize);\n\t\t\t\tconst start = initial.length - take;\n\t\t\t\tfor (let i = 0; i < take; i++) {\n\t\t\t\t\tthis._buf[i] = initial[start + i]!;\n\t\t\t\t}\n\t\t\t\tthis._size = take;\n\t\t\t}\n\t\t} else {\n\t\t\t// Unbounded mode — dynamic array\n\t\t\tthis._buf = initial ? [...initial] : [];\n\t\t\tthis._size = this._buf.length;\n\t\t}\n\t}\n\n\tget version(): number {\n\t\treturn this._version;\n\t}\n\n\tget size(): number {\n\t\treturn this._size;\n\t}\n\n\tat(index: number): T | undefined {\n\t\tif (!Number.isInteger(index)) return undefined;\n\t\t// P5: Python-style negative index — `-1` returns the last entry.\n\t\tconst i = index >= 0 ? index : this._size + index;\n\t\tif (i < 0 || i >= this._size) return undefined;\n\t\tif (this._maxSize !== undefined) {\n\t\t\treturn this._buf[(this._head + i) % this._maxSize];\n\t\t}\n\t\treturn this._buf[i];\n\t}\n\n\tappend(value: T): void {\n\t\tthis._rawAppend(value);\n\t\tthis._version += 1;\n\t}\n\n\tappendMany(values: readonly T[]): void {\n\t\tif (values.length === 0) return;\n\t\t// Pre-trim oversize input in ring mode — skip values that would be\n\t\t// immediately evicted. Iterate with a start index instead of\n\t\t// allocating an intermediate slice. F2.\n\t\tconst start =\n\t\t\tthis._maxSize !== undefined && values.length > this._maxSize\n\t\t\t\t? values.length - this._maxSize\n\t\t\t\t: 0;\n\t\tfor (let i = start; i < values.length; i++) {\n\t\t\tthis._rawAppend(values[i] as T);\n\t\t}\n\t\tthis._version += 1;\n\t}\n\n\tclear(): number {\n\t\tif (this._size === 0) return 0;\n\t\tconst n = this._size;\n\t\tif (this._maxSize === undefined) {\n\t\t\tthis._buf.length = 0;\n\t\t} else {\n\t\t\t// Ring buffer: only null the currently-live window so the GC can\n\t\t\t// reclaim ref-typed `T`. Iterating the full capacity would be O(cap)\n\t\t\t// even when only a few slots are in use (P6). Non-live slots are\n\t\t\t// already `undefined` (pre-allocation state) or whatever a prior\n\t\t\t// trim/clear left — they hold no live refs.\n\t\t\tfor (let i = 0; i < n; i++) {\n\t\t\t\tthis._buf[(this._head + i) % this._maxSize] = undefined as unknown as T;\n\t\t\t}\n\t\t}\n\t\tthis._head = 0;\n\t\tthis._size = 0;\n\t\tthis._version += 1;\n\t\treturn n;\n\t}\n\n\ttrimHead(n: number): number {\n\t\tif (!Number.isInteger(n) || n < 0) {\n\t\t\tthrow new RangeError(`trimHead: n must be a non-negative integer (got ${n})`);\n\t\t}\n\t\tif (n === 0 || this._size === 0) return 0;\n\t\tconst removed = Math.min(n, this._size);\n\t\tif (this._maxSize === undefined) {\n\t\t\tthis._buf.splice(0, removed);\n\t\t} else {\n\t\t\t// Null trimmed slots so the GC can reclaim ref-typed T (P4 extension).\n\t\t\tfor (let i = 0; i < removed; i++) {\n\t\t\t\tthis._buf[(this._head + i) % this._maxSize] = undefined as unknown as T;\n\t\t\t}\n\t\t\tthis._head = (this._head + removed) % this._maxSize;\n\t\t}\n\t\tthis._size -= removed;\n\t\tthis._version += 1;\n\t\treturn removed;\n\t}\n\n\tslice(start: number, stop?: number): readonly T[] {\n\t\tif (!Number.isInteger(start) || start < 0) {\n\t\t\tthrow new RangeError(`slice: start must be a non-negative integer (got ${start})`);\n\t\t}\n\t\t// P4: reject negative `stop` explicitly so the bundle / backend / derived\n\t\t// contract stays consistent. Previously stop was silently clamped to 0,\n\t\t// producing `[]` in the backend but a different value under JS semantics\n\t\t// in the derived recomputation — a latent bug for negative inputs.\n\t\tif (stop !== undefined && (!Number.isInteger(stop) || stop < 0)) {\n\t\t\tthrow new RangeError(`slice: stop must be a non-negative integer or undefined (got ${stop})`);\n\t\t}\n\t\tconst end = stop === undefined ? this._size : Math.min(Math.max(stop, 0), this._size);\n\t\tconst s = Math.min(start, this._size);\n\t\tif (s >= end) return [];\n\t\tconst len = end - s;\n\t\tif (this._maxSize === undefined) {\n\t\t\treturn this._buf.slice(s, end);\n\t\t}\n\t\tconst out: T[] = new Array(len);\n\t\tfor (let i = 0; i < len; i++) {\n\t\t\tout[i] = this._buf[(this._head + s + i) % this._maxSize]!;\n\t\t}\n\t\treturn out;\n\t}\n\n\ttail(n: number): readonly T[] {\n\t\tif (!Number.isInteger(n) || n < 0) {\n\t\t\tthrow new RangeError(`tail: n must be a non-negative integer (got ${n})`);\n\t\t}\n\t\tif (n === 0 || this._size === 0) return [];\n\t\tconst take = Math.min(n, this._size);\n\t\treturn this.slice(this._size - take, this._size);\n\t}\n\n\ttoArray(): readonly T[] {\n\t\tif (this._maxSize === undefined) {\n\t\t\treturn [...this._buf];\n\t\t}\n\t\tconst out: T[] = new Array(this._size);\n\t\tfor (let i = 0; i < this._size; i++) {\n\t\t\tout[i] = this._buf[(this._head + i) % this._maxSize]!;\n\t\t}\n\t\treturn out;\n\t}\n\n\t/** Internal append without version bump — used by `appendMany`. */\n\tprivate _rawAppend(value: T): void {\n\t\tif (this._maxSize === undefined) {\n\t\t\tthis._buf.push(value);\n\t\t\tthis._size = this._buf.length;\n\t\t\treturn;\n\t\t}\n\t\tif (this._size < this._maxSize) {\n\t\t\tthis._buf[(this._head + this._size) % this._maxSize] = value;\n\t\t\tthis._size += 1;\n\t\t} else {\n\t\t\t// Overwrite slot at head, advance head.\n\t\t\tthis._buf[this._head] = value;\n\t\t\tthis._head = (this._head + 1) % this._maxSize;\n\t\t}\n\t}\n}\n\n// ── Reactive wrapper ──────────────────────────────────────────────────────\n\n/** Installs a keepalive subscription; returns the disposer so callers can release it. */\nfunction keepaliveDerived(n: Node<unknown>): () => void {\n\treturn n.subscribe(() => {});\n}\n\n/** Default cap on the LRU view cache for `tail(n)` / `slice(start, stop?)`. D2(c). */\nconst DEFAULT_VIEW_CACHE_MAX = 64;\n\n/**\n * Creates an append-only reactive log with immutable array snapshots.\n *\n * @param initial - Optional seed entries (copied; pre-trimmed to `maxSize` if set).\n * @param options - `name`, `maxSize`, and optional pluggable `backend`.\n * @returns Bundle with `entries` (state node), `append`/`appendMany`/`clear`/`trimHead`,\n * `size` / `at`, and memoized derived views `tail(n)` / `slice(start, stop?)`.\n *\n * @remarks\n * **Backend:** The default {@link NativeLogBackend} uses a ring buffer when `maxSize`\n * is set (O(1) append + trim) and a flat array otherwise. For persistent/structural-\n * sharing semantics plug in a custom {@link LogBackend}.\n *\n * **`initial` + custom `backend` (F5):** When you supply `options.backend`, the\n * `initial` argument is IGNORED — seed the backend yourself before passing it in.\n * The `initial` seed only applies to the default `NativeLogBackend`.\n *\n * **Memoized views:** {@link ReactiveLogBundle.tail} and {@link ReactiveLogBundle.slice}\n * cache derived nodes per-argument. Repeat calls with the same `n` / `(start, stop)`\n * return the same node, bounding keepalive-subscription count to one per unique argument.\n *\n * @example\n * ```ts\n * import { reactiveLog } from \"@graphrefly/graphrefly-ts\";\n *\n * const lg = reactiveLog<number>([1, 2], { name: \"audit\", maxSize: 100 });\n * lg.append(3);\n * lg.entries.subscribe((msgs) => console.log(msgs));\n * const last5 = lg.tail(5); // derived node\n * const window = lg.slice(10, 20); // derived node\n * ```\n *\n * @category extra\n */\nexport function reactiveLog<T>(\n\tinitial?: readonly T[],\n\toptions: ReactiveLogOptions<T> = {},\n): ReactiveLogBundle<T> {\n\tconst { name, maxSize, versioning, backend: userBackend } = options;\n\tconst backend: LogBackend<T> = userBackend ?? new NativeLogBackend<T>(initial, maxSize);\n\n\tconst entries = state<readonly T[]>(backend.toArray(), {\n\t\tname,\n\t\tdescribeKind: \"state\",\n\t\tequals: (a, b) => a === b,\n\t\t...(versioning != null ? { versioning } : {}),\n\t});\n\n\tfunction pushSnapshot(): void {\n\t\tconst snapshot = backend.toArray();\n\t\tbatch(() => {\n\t\t\tentries.down([[DIRTY]]);\n\t\t\tentries.down([[DATA, snapshot]]);\n\t\t});\n\t}\n\n\t// Memoization caches for derived views (D2(c)). Each cache is an LRU keyed by\n\t// the unique view argument, bounded by `DEFAULT_VIEW_CACHE_MAX`. On cache miss\n\t// past the cap, the least-recently-used entry is evicted and its keepalive\n\t// disposer is called so the underlying derived node can be GC'd. Callers can\n\t// also release views proactively via `disposeTail` / `disposeSlice` /\n\t// `disposeAllViews`. Iteration order of `Map` is insertion order, so moving\n\t// an entry to the end on hit is the LRU \"touch\".\n\ttype ViewEntry = { node: Node<readonly T[]>; dispose: () => void };\n\tconst tailCache = new Map<number, ViewEntry>();\n\tconst sliceCache = new Map<string, ViewEntry>();\n\n\tfunction sliceKey(start: number, stop?: number): string {\n\t\treturn `${start}:${stop === undefined ? \"END\" : stop}`;\n\t}\n\n\tfunction evictOldestIfFull<K>(cache: Map<K, ViewEntry>): void {\n\t\tif (cache.size < DEFAULT_VIEW_CACHE_MAX) return;\n\t\tconst first = cache.keys().next();\n\t\tif (first.done) return;\n\t\tconst oldest = cache.get(first.value);\n\t\tif (oldest !== undefined) oldest.dispose();\n\t\tcache.delete(first.value);\n\t}\n\n\t/**\n\t * D4(a): try/finally defense-in-depth — if a custom backend op throws\n\t * mid-mutation, surface the partial state via pushSnapshot so subscribers\n\t * don't see a stale cache. Matches the pattern in reactive-map and\n\t * reactive-index. Native ops are atomic by contract; this only matters\n\t * for user-supplied backends.\n\t */\n\tfunction wrapMutation<R>(op: () => R): R {\n\t\tconst prev = backend.version;\n\t\ttry {\n\t\t\treturn op();\n\t\t} finally {\n\t\t\tif (backend.version !== prev) pushSnapshot();\n\t\t}\n\t}\n\n\treturn {\n\t\tentries,\n\n\t\tget size(): number {\n\t\t\treturn backend.size;\n\t\t},\n\n\t\tat(index: number): T | undefined {\n\t\t\treturn backend.at(index);\n\t\t},\n\n\t\tappend(value: T): void {\n\t\t\twrapMutation(() => backend.append(value));\n\t\t},\n\n\t\tappendMany(values: readonly T[]): void {\n\t\t\tif (values.length === 0) return;\n\t\t\twrapMutation(() => backend.appendMany(values));\n\t\t},\n\n\t\tclear(): void {\n\t\t\twrapMutation(() => backend.clear());\n\t\t\t// NOTE: cached tail/slice derived views are intentionally NOT\n\t\t\t// disposed here. Disposing would kill the keepalive on any node\n\t\t\t// a caller already holds externally, silently stopping their\n\t\t\t// updates. The derived nodes recompute from the new empty\n\t\t\t// snapshot when `entries` emits post-clear, so `.cache` on an\n\t\t\t// outstanding view settles to `[]` without any manual\n\t\t\t// reset. (Initial snapshots, if inspected before the next wave,\n\t\t\t// may be stale — callers who care can `disposeTail` / `slice`\n\t\t\t// explicitly.)\n\t\t},\n\n\t\ttrimHead(n: number): void {\n\t\t\twrapMutation(() => backend.trimHead(n));\n\t\t},\n\n\t\ttail(n: number): Node<readonly T[]> {\n\t\t\tif (!Number.isInteger(n) || n < 0) {\n\t\t\t\tthrow new RangeError(`tail: n must be a non-negative integer (got ${n})`);\n\t\t\t}\n\t\t\tconst hit = tailCache.get(n);\n\t\t\tif (hit !== undefined) {\n\t\t\t\t// LRU touch: move to end of insertion order.\n\t\t\t\ttailCache.delete(n);\n\t\t\t\ttailCache.set(n, hit);\n\t\t\t\treturn hit.node;\n\t\t\t}\n\t\t\tevictOldestIfFull(tailCache);\n\t\t\tconst node_ = derived(\n\t\t\t\t[entries],\n\t\t\t\t([s]) => {\n\t\t\t\t\tconst list = s as readonly T[];\n\t\t\t\t\tif (n === 0 || list.length === 0) return [];\n\t\t\t\t\treturn list.slice(Math.max(0, list.length - n));\n\t\t\t\t},\n\t\t\t\t{ initial: backend.tail(n), describeKind: \"derived\" },\n\t\t\t);\n\t\t\tconst dispose = keepaliveDerived(node_);\n\t\t\ttailCache.set(n, { node: node_, dispose });\n\t\t\treturn node_;\n\t\t},\n\n\t\tslice(start: number, stop?: number): Node<readonly T[]> {\n\t\t\tif (!Number.isInteger(start) || start < 0) {\n\t\t\t\tthrow new RangeError(`slice: start must be a non-negative integer (got ${start})`);\n\t\t\t}\n\t\t\t// P4: reject negative stop explicitly to keep bundle / backend / derived\n\t\t\t// consistent (JS `Array.prototype.slice` supports negative stop, but the\n\t\t\t// backend can't cheaply honor it without scanning length, so we disallow).\n\t\t\tif (stop !== undefined && (!Number.isInteger(stop) || stop < 0)) {\n\t\t\t\tthrow new RangeError(\n\t\t\t\t\t`slice: stop must be a non-negative integer or undefined (got ${stop})`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst key = sliceKey(start, stop);\n\t\t\tconst hit = sliceCache.get(key);\n\t\t\tif (hit !== undefined) {\n\t\t\t\tsliceCache.delete(key);\n\t\t\t\tsliceCache.set(key, hit);\n\t\t\t\treturn hit.node;\n\t\t\t}\n\t\t\tevictOldestIfFull(sliceCache);\n\t\t\tconst node_ = derived(\n\t\t\t\t[entries],\n\t\t\t\t([s]) => {\n\t\t\t\t\tconst list = s as readonly T[];\n\t\t\t\t\treturn stop === undefined ? list.slice(start) : list.slice(start, stop);\n\t\t\t\t},\n\t\t\t\t{ initial: backend.slice(start, stop), describeKind: \"derived\" },\n\t\t\t);\n\t\t\tconst dispose = keepaliveDerived(node_);\n\t\t\tsliceCache.set(key, { node: node_, dispose });\n\t\t\treturn node_;\n\t\t},\n\n\t\tdisposeTail(n: number): boolean {\n\t\t\tconst hit = tailCache.get(n);\n\t\t\tif (hit === undefined) return false;\n\t\t\thit.dispose();\n\t\t\ttailCache.delete(n);\n\t\t\treturn true;\n\t\t},\n\n\t\tdisposeSlice(start: number, stop?: number): boolean {\n\t\t\tconst key = sliceKey(start, stop);\n\t\t\tconst hit = sliceCache.get(key);\n\t\t\tif (hit === undefined) return false;\n\t\t\thit.dispose();\n\t\t\tsliceCache.delete(key);\n\t\t\treturn true;\n\t\t},\n\n\t\tdisposeAllViews(): void {\n\t\t\tfor (const entry of tailCache.values()) entry.dispose();\n\t\t\ttailCache.clear();\n\t\t\tfor (const entry of sliceCache.values()) entry.dispose();\n\t\t\tsliceCache.clear();\n\t\t},\n\n\t\tdispose(): void {\n\t\t\t// D6(a): currently identical to disposeAllViews. Exposed as a\n\t\t\t// uniform lifecycle API across all 4 reactive data structures.\n\t\t\tfor (const entry of tailCache.values()) entry.dispose();\n\t\t\ttailCache.clear();\n\t\t\tfor (const entry of sliceCache.values()) entry.dispose();\n\t\t\tsliceCache.clear();\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;AASA,SAAS,kBAAkB;AAsCpB,SAAS,aACf,MACA,SAC2B;AAC3B,MAAI,SAAS,KAAK;AACjB,WAAO,IAAI,WAAqB,CAAC,eAAe;AAC/C,YAAM,QAAQ,KAAK,UAAU,CAAC,SAAS;AACtC,YAAI,WAAW,OAAQ;AACvB,mBAAW,KAAK,IAAI;AACpB,mBAAW,KAAK,MAAM;AACrB,cAAI,EAAE,CAAC,MAAM,OAAO;AACnB,uBAAW,MAAM,EAAE,CAAC,CAAC;AACrB;AAAA,UACD;AACA,cAAI,EAAE,CAAC,MAAM,UAAU;AACtB,uBAAW,SAAS;AACpB;AAAA,UACD;AAAA,QACD;AAAA,MACD,CAAC;AACD,aAAO;AAAA,IACR,CAAC;AAAA,EACF;AAEA,SAAO,IAAI,WAAc,CAAC,eAAe;AACxC,UAAM,QAAQ,KAAK,UAAU,CAAC,SAAS;AACtC,iBAAW,KAAK,MAAM;AACrB,YAAI,WAAW,OAAQ;AACvB,YAAI,EAAE,CAAC,MAAM,MAAM;AAClB,qBAAW,KAAK,EAAE,CAAC,CAAM;AAAA,QAC1B,WAAW,EAAE,CAAC,MAAM,OAAO;AAC1B,qBAAW,MAAM,EAA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MAAwB;AACnD,YAAM,MAAM,SAAS,OAAO,IAAI;AAChC,YAAM,MAAM,WAAW,IAAI,GAAG;AAC9B,UAAI,QAAQ,OAAW,QAAO;AAC9B,UAAI,QAAQ;AACZ,iBAAW,OAAO,GAAG;AACrB,aAAO;AAAA,IACR;AAAA,IAEA,kBAAwB;AACvB,iBAAW,SAAS,UAAU,OAAO,EAAG,OAAM,QAAQ;AACtD,gBAAU,MAAM;AAChB,iBAAW,SAAS,WAAW,OAAO,EAAG,OAAM,QAAQ;AACvD,iBAAW,MAAM;AAAA,IAClB;AAAA,IAEA,UAAgB;AAGf,iBAAW,SAAS,UAAU,OAAO,EAAG,OAAM,QAAQ;AACtD,gBAAU,MAAM;AAChB,iBAAW,SAAS,WAAW,OAAO,EAAG,OAAM,QAAQ;AACvD,iBAAW,MAAM;AAAA,IAClB;AAAA,EACD;AACD;","names":[]}
|
|
@@ -1,392 +0,0 @@
|
|
|
1
|
-
import { t as Messages, a as NodeOptions, F as FnCtx, N as Node, b as NodeActions, x as NodeFnCleanup, 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, j as GlobalInspectorEvent, k as GlobalInspectorHook, l as GraphReFlyConfig, G 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, u as NodeCtx, v as NodeDescribeKind, w as NodeFn, y as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, Q as NodeVersionInfo, R as OnMessageHandler, S as OnSubscribeHandler, T as PAUSE, U as PolicyAllow, V as PolicyDeny, P 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-C_IBuvX2.cjs';
|
|
2
|
-
import { D as DescribeDetail, a as DescribeField, b as DescribeNodeOutput, r as resolveDescribeFields } from './meta-C0-8XW6Q.cjs';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Batch deferral for tier-3+ messages, plus per-node emit coalescing inside
|
|
6
|
-
* explicit `batch()` scopes.
|
|
7
|
-
*
|
|
8
|
-
* **Canonical invariant:** GRAPHREFLY-SPEC.md §1.3.7 — inside a batch,
|
|
9
|
-
* tier 0–2 signals propagate immediately; tier 3 (DATA/RESOLVED), tier 4
|
|
10
|
-
* (COMPLETE/ERROR), and tier 5 (TEARDOWN) are queued and drained in ascending
|
|
11
|
-
* phase order after the outermost `batch()` callback returns.
|
|
12
|
-
*
|
|
13
|
-
* **Per-node emit coalescing (Bug 2 fix, 2026-04-17).** Inside an explicit
|
|
14
|
-
* `batch()` scope, consecutive emissions from the same node accumulate in
|
|
15
|
-
* `NodeImpl._batchPendingMessages` (see JSDoc there) instead of each producing
|
|
16
|
-
* a separate downstream wave. K `.emit()` calls to the same source collapse to
|
|
17
|
-
* one coalesced `downWithBatch` call per child edge at batch end. Outside batch
|
|
18
|
-
* (or during drain), coalescing does NOT apply — each emit produces its own wave.
|
|
19
|
-
*
|
|
20
|
-
* **Phase vocabulary:**
|
|
21
|
-
* - Phase 1 = tiers 0–2 — immediate, never queued.
|
|
22
|
-
* - Phase 2 = tier 3 — {@link drainPhase2}. Value settlements.
|
|
23
|
-
* - Phase 3 = tier 4 — {@link drainPhase3}. Terminal signals.
|
|
24
|
-
* - Phase 4 = tier 5 — {@link drainPhase4}. TEARDOWN (unified deferral).
|
|
25
|
-
*
|
|
26
|
-
* Drain rule: fire any pending flush hooks first, then the lowest non-empty
|
|
27
|
-
* phase. Re-enqueues during drain (and hooks registered by reentrant batches
|
|
28
|
-
* inside subscriber callbacks) bump the loop back to the top so newly-added
|
|
29
|
-
* hooks and closures get processed.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Returns whether the current call stack is inside a batch scope **or** while
|
|
34
|
-
* a deferred drain is in progress. Nested `downWithBatch` calls during drain
|
|
35
|
-
* still defer (they bump the drain loop).
|
|
36
|
-
*/
|
|
37
|
-
declare function isBatching(): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Runs `fn` inside a batch scope. Nested `batch()` calls share one deferral
|
|
40
|
-
* queue. If `fn` throws, deferred work for the outer frame is discarded
|
|
41
|
-
* (unless a drain is already in progress — cross-language decision A4).
|
|
42
|
-
*/
|
|
43
|
-
declare function batch(fn: () => void): void;
|
|
44
|
-
/**
|
|
45
|
-
* Deliver pre-sorted messages through `sink` with tier-based deferral applied.
|
|
46
|
-
*
|
|
47
|
-
* `messages` MUST be in ascending tier order (produced by `_frameBatch` in
|
|
48
|
-
* `node.ts`); the walker exploits that invariant to find phase cuts in one
|
|
49
|
-
* pass without re-sorting.
|
|
50
|
-
*
|
|
51
|
-
* Behavior:
|
|
52
|
-
* - Tier 0–2 — delivered synchronously.
|
|
53
|
-
* - Tier 3 — deferred to {@link drainPhase2} when batching, else synchronous.
|
|
54
|
-
* - Tier 4 — deferred to {@link drainPhase3} when batching, else synchronous.
|
|
55
|
-
* - Tier 5 — deferred to {@link drainPhase4} when batching, else synchronous.
|
|
56
|
-
*
|
|
57
|
-
* Tier-classification uses the caller-supplied `tierOf` so that batch stays
|
|
58
|
-
* decoupled from `GraphReFlyConfig`. NodeImpl passes `config.tierOf` (a
|
|
59
|
-
* pre-bound closure built once in the config constructor) at the emit site;
|
|
60
|
-
* alternate configs can pass their own lookup.
|
|
61
|
-
*/
|
|
62
|
-
declare function downWithBatch(sink: (messages: Messages) => void, messages: Messages, tierOf: (t: symbol) => number): void;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Centralised timestamp utilities.
|
|
66
|
-
*
|
|
67
|
-
* Convention: all graphrefly-ts timestamps use nanoseconds (`_ns` suffix).
|
|
68
|
-
*
|
|
69
|
-
* - {@link monotonicNs} — monotonic clock (ordering, durations, timeline events).
|
|
70
|
-
* - {@link wallClockNs} — wall-clock (mutation attribution, cron emission).
|
|
71
|
-
*
|
|
72
|
-
* **Precision limits (JS platform):**
|
|
73
|
-
*
|
|
74
|
-
* - `monotonicNs`: effective ~microsecond precision. `performance.now()` returns
|
|
75
|
-
* milliseconds with ~5µs resolution; the last 3 digits of the nanosecond value
|
|
76
|
-
* are always zero. Python's `time.monotonic_ns()` gives true nanoseconds.
|
|
77
|
-
*
|
|
78
|
-
* - `wallClockNs`: ~256ns precision loss at current epoch. `Date.now() * 1e6`
|
|
79
|
-
* produces values around 1.8×10¹⁸ which exceed IEEE 754's 2⁵³ safe integer
|
|
80
|
-
* limit. Python's `time.time_ns()` (arbitrary-precision `int`) has no loss.
|
|
81
|
-
* In practice this is irrelevant — JS is single-threaded, so sub-microsecond
|
|
82
|
-
* timestamp collisions cannot occur.
|
|
83
|
-
*/
|
|
84
|
-
/** Monotonic nanosecond timestamp via `performance.now()`. */
|
|
85
|
-
declare function monotonicNs(): number;
|
|
86
|
-
/** Wall-clock nanosecond timestamp via `Date.now()`. */
|
|
87
|
-
declare function wallClockNs(): number;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Sugar constructors over the raw `node()` primitive.
|
|
91
|
-
*
|
|
92
|
-
* Each factory wraps a user-friendly function into the canonical
|
|
93
|
-
* `NodeFn = (data, actions, ctx) => cleanup | void` shape, then calls
|
|
94
|
-
* `node(...)`. This is the only place `actions.emit(...)` is invoked
|
|
95
|
-
* on behalf of the user — if you need finer control (multi-emission,
|
|
96
|
-
* raw `actions.down` / `actions.up`, cleanup return), use the raw
|
|
97
|
-
* `node()` factory from `./node.js` directly.
|
|
98
|
-
*
|
|
99
|
-
* See SESSION-foundation-redesign.md §8.5 + §10.6 for the rewrite.
|
|
100
|
-
*/
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Creates a manual source node. Drive it with `state.emit(v)` (framed,
|
|
104
|
-
* diamond-safe) or `state.down([[DATA, v]])` (raw compat path).
|
|
105
|
-
*
|
|
106
|
-
* @param initial - Starting cached value. Pass `undefined` or `null`
|
|
107
|
-
* explicitly to cache that value; omit to leave the node in `"sentinel"`.
|
|
108
|
-
* @param opts - Optional {@link NodeOptions} (excluding `initial`).
|
|
109
|
-
*/
|
|
110
|
-
declare function state<T>(initial: T, opts?: Omit<NodeOptions<T>, "initial">): Node<T>;
|
|
111
|
-
/**
|
|
112
|
-
* User-level producer compute: runs once on first-subscriber activation.
|
|
113
|
-
* Receives `actions` for imperative emission and `ctx` for FnCtx (typically
|
|
114
|
-
* only `store` is useful on a producer — no deps means `prevData` and
|
|
115
|
-
* `terminalDeps` are empty).
|
|
116
|
-
*/
|
|
117
|
-
type ProducerFn = (actions: NodeActions, ctx: FnCtx) => NodeFnCleanup | void;
|
|
118
|
-
/**
|
|
119
|
-
* Creates a producer node with no deps; `fn` runs once when the first
|
|
120
|
-
* subscriber connects. Return a cleanup function (`() => void`) or
|
|
121
|
-
* `{ deactivation: () => void }` to register teardown.
|
|
122
|
-
*
|
|
123
|
-
* @example
|
|
124
|
-
* ```ts
|
|
125
|
-
* const ticker = producer((actions) => {
|
|
126
|
-
* const id = setInterval(() => actions.emit(Date.now()), 1000);
|
|
127
|
-
* return () => clearInterval(id);
|
|
128
|
-
* });
|
|
129
|
-
* ```
|
|
130
|
-
*/
|
|
131
|
-
declare function producer<T = unknown>(fn: ProducerFn, opts?: NodeOptions<T>): Node<T>;
|
|
132
|
-
/**
|
|
133
|
-
* User-level derived compute: receives the latest DATA from each dep and
|
|
134
|
-
* returns the new value. The sugar wraps it with `actions.emit(fn(...))`
|
|
135
|
-
* so the return value flows through the framed emit pipeline.
|
|
136
|
-
*
|
|
137
|
-
* For derived nodes that need to inspect `ctx.prevData` / `ctx.terminalDeps`
|
|
138
|
-
* / `ctx.store`, accept the optional second parameter.
|
|
139
|
-
*/
|
|
140
|
-
type DerivedFn<T> = (data: readonly unknown[], ctx: FnCtx) => T | undefined | null;
|
|
141
|
-
/**
|
|
142
|
-
* Creates a derived node that computes **one output per wave** from the latest
|
|
143
|
-
* value of each dependency — **snapshot / combine semantics**.
|
|
144
|
-
*
|
|
145
|
-
* `fn` receives one scalar per dep (the last DATA value seen this wave, or the
|
|
146
|
-
* prior-wave value as fallback). It is called once per settled wave and emits
|
|
147
|
-
* a single value via `actions.emit`. The equals check then suppresses the
|
|
148
|
-
* emission as `RESOLVED` if the output has not changed.
|
|
149
|
-
*
|
|
150
|
-
* **Not for streaming one-to-one transforms.** If each DATA value in a batch
|
|
151
|
-
* must produce a corresponding output (e.g. transforming every item emitted by
|
|
152
|
-
* `fromIter` individually), use {@link map} or raw `node()` with full batch
|
|
153
|
-
* iteration instead. `derived` only sees the *last* value per dep when a batch
|
|
154
|
-
* carries multiple DATAs.
|
|
155
|
-
*
|
|
156
|
-
* @example
|
|
157
|
-
* ```ts
|
|
158
|
-
* const a = state(1);
|
|
159
|
-
* const b = derived([a], ([x]) => (x as number) * 2);
|
|
160
|
-
* ```
|
|
161
|
-
*/
|
|
162
|
-
declare function derived<T = unknown>(deps: readonly Node[], fn: DerivedFn<T>, opts?: NodeOptions<T> & {
|
|
163
|
-
partial?: boolean;
|
|
164
|
-
}): Node<T>;
|
|
165
|
-
/**
|
|
166
|
-
* User-level effect compute: fires when deps settle. Return value is NOT
|
|
167
|
-
* auto-emitted — use `actions.emit(v)` / `actions.down(msgs)` explicitly if
|
|
168
|
-
* the effect also wants to produce downstream messages. Return a cleanup
|
|
169
|
-
* function or `{ deactivation }` to register teardown.
|
|
170
|
-
*/
|
|
171
|
-
type EffectFn = (data: readonly unknown[], actions: NodeActions, ctx: FnCtx) => NodeFnCleanup | void;
|
|
172
|
-
/**
|
|
173
|
-
* Runs a side-effect when deps settle. Return value is not auto-emitted.
|
|
174
|
-
*
|
|
175
|
-
* @example
|
|
176
|
-
* ```ts
|
|
177
|
-
* effect([source], ([v]) => {
|
|
178
|
-
* console.log(v);
|
|
179
|
-
* });
|
|
180
|
-
* ```
|
|
181
|
-
*/
|
|
182
|
-
declare function effect(deps: readonly Node[], fn: EffectFn, opts?: NodeOptions<unknown> & {
|
|
183
|
-
partial?: boolean;
|
|
184
|
-
}): Node<unknown>;
|
|
185
|
-
/**
|
|
186
|
-
* Proxy handed to a {@link DynamicFn}. `track(dep)` returns the dep's
|
|
187
|
-
* latest DATA payload, as delivered through the protocol. Reading from
|
|
188
|
-
* `track` does NOT bypass the message protocol — it reads the internal
|
|
189
|
-
* `DepRecord.prevData` (the stable end-of-previous-wave value) that
|
|
190
|
-
* `_onDepMessage` already populated. If a dep has not yet sent DATA,
|
|
191
|
-
* `track` returns `undefined`.
|
|
192
|
-
*/
|
|
193
|
-
type TrackFn = (dep: Node) => unknown;
|
|
194
|
-
/** User-level dynamicNode compute. */
|
|
195
|
-
type DynamicFn<T> = (track: TrackFn, ctx: FnCtx) => T | undefined | null;
|
|
196
|
-
/**
|
|
197
|
-
* Sugar over `derived(...)` that exposes dep values via a `track(dep)`
|
|
198
|
-
* proxy instead of positional `data[i]`. All declared `allDeps` participate
|
|
199
|
-
* in wave tracking, so the first fn run waits for every dep to settle.
|
|
200
|
-
* Unused deps that update just re-run fn; `equals` absorbs unchanged
|
|
201
|
-
* outputs as RESOLVED.
|
|
202
|
-
*
|
|
203
|
-
* P3-compliant: `track(dep)` reads from the framework-managed
|
|
204
|
-
* `DepRecord.prevData` populated by the protocol, never from
|
|
205
|
-
* `dep.cache`.
|
|
206
|
-
*
|
|
207
|
-
* @example
|
|
208
|
-
* ```ts
|
|
209
|
-
* const a = state(1);
|
|
210
|
-
* const b = state(10);
|
|
211
|
-
* const sum = dynamicNode([a, b], (track) => (track(a) as number) + (track(b) as number));
|
|
212
|
-
* ```
|
|
213
|
-
*/
|
|
214
|
-
declare function dynamicNode<T = unknown>(allDeps: readonly Node[], fn: DynamicFn<T>, opts?: NodeOptions<T> & {
|
|
215
|
-
partial?: boolean;
|
|
216
|
-
}): Node<T>;
|
|
217
|
-
/**
|
|
218
|
-
* Like {@link dynamicNode} but deps are discovered at runtime via `track()`
|
|
219
|
-
* calls — no upfront `allDeps` array needed. Designed for pull-based compat
|
|
220
|
-
* layers (Jotai atoms, TC39 Signals) where deps are unknown until fn runs.
|
|
221
|
-
*
|
|
222
|
-
* **Two-phase discovery:**
|
|
223
|
-
* 1. fn runs. Each `track(dep)` for an unknown dep: subscribes immediately
|
|
224
|
-
* via `_addDep`, returns `dep.cache` as a stub (P3 boundary exception).
|
|
225
|
-
* Result is discarded (discovery run).
|
|
226
|
-
* 2. New deps settle (DATA from subscribe handshake). Wave machinery
|
|
227
|
-
* re-triggers fn. `track(dep)` now returns protocol-delivered `data[i]`.
|
|
228
|
-
* If MORE unknown deps appear, repeat step 1.
|
|
229
|
-
* 3. Converges when no new deps found → real run → `actions.emit(result)`.
|
|
230
|
-
*
|
|
231
|
-
* P3 violation is limited to discovery runs. Once all deps are known,
|
|
232
|
-
* subsequent waves use protocol-delivered values exclusively.
|
|
233
|
-
*
|
|
234
|
-
* Re-entrance safety: `_addDep` subscribes immediately. If the dep delivers
|
|
235
|
-
* DATA synchronously during fn execution, `_execFn`'s re-entrance guard
|
|
236
|
-
* defers the re-run to after the current fn returns.
|
|
237
|
-
*
|
|
238
|
-
* @param opts - Optional {@link AutoTrackOptions}. Pass `{ partial: true }` to
|
|
239
|
-
* allow fn to run before all known deps have delivered their first value
|
|
240
|
-
* (useful for optional/secondary deps).
|
|
241
|
-
*
|
|
242
|
-
* @example
|
|
243
|
-
* ```ts
|
|
244
|
-
* const a = state(1), b = state(2);
|
|
245
|
-
* const sum = autoTrackNode((track) => track(a) + track(b));
|
|
246
|
-
* // deps [a, b] discovered automatically on first run
|
|
247
|
-
* ```
|
|
248
|
-
*/
|
|
249
|
-
/**
|
|
250
|
-
* Options for {@link autoTrackNode}.
|
|
251
|
-
*/
|
|
252
|
-
interface AutoTrackOptions<T> extends NodeOptions<T> {
|
|
253
|
-
/**
|
|
254
|
-
* When `true`, fn may run before all known deps have delivered their first
|
|
255
|
-
* DATA. Unknown deps return `undefined` via `track()`, which the fn must
|
|
256
|
-
* handle explicitly. Useful when some deps are "nice-to-have" — e.g. a
|
|
257
|
-
* primary computation should continue while a secondary dep is still
|
|
258
|
-
* initialising.
|
|
259
|
-
*
|
|
260
|
-
* When `false` (default), fn is held until every known dep has delivered at
|
|
261
|
-
* least one DATA value — a RESOLVED is emitted for the wave instead.
|
|
262
|
-
* This matches `derived()` semantics and is the correct default for
|
|
263
|
-
* pull-based compat layers (Signals, Jotai) where all deps must be
|
|
264
|
-
* initialised before the computation is meaningful.
|
|
265
|
-
*
|
|
266
|
-
* @default false
|
|
267
|
-
*/
|
|
268
|
-
partial?: boolean;
|
|
269
|
-
}
|
|
270
|
-
declare function autoTrackNode<T = unknown>(fn: (track: TrackFn, ctx: FnCtx) => T | undefined | null, opts?: AutoTrackOptions<T>): Node<T>;
|
|
271
|
-
/** Unary operator used by {@link pipe}. */
|
|
272
|
-
type PipeOperator = (n: Node) => Node;
|
|
273
|
-
/**
|
|
274
|
-
* Composes unary operators left-to-right; returns the final node.
|
|
275
|
-
*
|
|
276
|
-
* @example
|
|
277
|
-
* ```ts
|
|
278
|
-
* const out = pipe(
|
|
279
|
-
* source,
|
|
280
|
-
* (n) => map(n, (x) => x + 1),
|
|
281
|
-
* (n) => filter(n, (x) => x > 0),
|
|
282
|
-
* );
|
|
283
|
-
* ```
|
|
284
|
-
*/
|
|
285
|
-
declare function pipe(source: Node, ...ops: PipeOperator[]): Node;
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* Core layer: message protocol, node primitive, lifecycle (Phase 0).
|
|
289
|
-
*/
|
|
290
|
-
|
|
291
|
-
declare const index_Actor: typeof Actor;
|
|
292
|
-
type index_AutoTrackOptions<T> = AutoTrackOptions<T>;
|
|
293
|
-
declare const index_COMPLETE: typeof COMPLETE;
|
|
294
|
-
declare const index_COMPLETE_MSG: typeof COMPLETE_MSG;
|
|
295
|
-
declare const index_COMPLETE_ONLY_BATCH: typeof COMPLETE_ONLY_BATCH;
|
|
296
|
-
declare const index_DATA: typeof DATA;
|
|
297
|
-
declare const index_DEFAULT_ACTOR: typeof DEFAULT_ACTOR;
|
|
298
|
-
declare const index_DIRTY: typeof DIRTY;
|
|
299
|
-
declare const index_DIRTY_MSG: typeof DIRTY_MSG;
|
|
300
|
-
declare const index_DIRTY_ONLY_BATCH: typeof DIRTY_ONLY_BATCH;
|
|
301
|
-
declare const index_DepRecord: typeof DepRecord;
|
|
302
|
-
type index_DerivedFn<T> = DerivedFn<T>;
|
|
303
|
-
declare const index_DescribeDetail: typeof DescribeDetail;
|
|
304
|
-
declare const index_DescribeField: typeof DescribeField;
|
|
305
|
-
declare const index_DescribeNodeOutput: typeof DescribeNodeOutput;
|
|
306
|
-
type index_DynamicFn<T> = DynamicFn<T>;
|
|
307
|
-
declare const index_ERROR: typeof ERROR;
|
|
308
|
-
type index_EffectFn = EffectFn;
|
|
309
|
-
declare const index_FnCtx: typeof FnCtx;
|
|
310
|
-
declare const index_GlobalInspectorEvent: typeof GlobalInspectorEvent;
|
|
311
|
-
declare const index_GlobalInspectorHook: typeof GlobalInspectorHook;
|
|
312
|
-
declare const index_GraphReFlyConfig: typeof GraphReFlyConfig;
|
|
313
|
-
declare const index_GuardAction: typeof GuardAction;
|
|
314
|
-
declare const index_GuardDenied: typeof GuardDenied;
|
|
315
|
-
declare const index_GuardDeniedDetails: typeof GuardDeniedDetails;
|
|
316
|
-
declare const index_HashFn: typeof HashFn;
|
|
317
|
-
declare const index_INVALIDATE: typeof INVALIDATE;
|
|
318
|
-
declare const index_INVALIDATE_MSG: typeof INVALIDATE_MSG;
|
|
319
|
-
declare const index_INVALIDATE_ONLY_BATCH: typeof INVALIDATE_ONLY_BATCH;
|
|
320
|
-
declare const index_Message: typeof Message;
|
|
321
|
-
declare const index_MessageContext: typeof MessageContext;
|
|
322
|
-
declare const index_MessageTypeRegistration: typeof MessageTypeRegistration;
|
|
323
|
-
declare const index_MessageTypeRegistrationInput: typeof MessageTypeRegistrationInput;
|
|
324
|
-
declare const index_Messages: typeof Messages;
|
|
325
|
-
declare const index_Node: typeof Node;
|
|
326
|
-
declare const index_NodeActions: typeof NodeActions;
|
|
327
|
-
declare const index_NodeCtx: typeof NodeCtx;
|
|
328
|
-
declare const index_NodeDescribeKind: typeof NodeDescribeKind;
|
|
329
|
-
declare const index_NodeFn: typeof NodeFn;
|
|
330
|
-
declare const index_NodeFnCleanup: typeof NodeFnCleanup;
|
|
331
|
-
declare const index_NodeGuard: typeof NodeGuard;
|
|
332
|
-
declare const index_NodeImpl: typeof NodeImpl;
|
|
333
|
-
declare const index_NodeInspectorHook: typeof NodeInspectorHook;
|
|
334
|
-
declare const index_NodeInspectorHookEvent: typeof NodeInspectorHookEvent;
|
|
335
|
-
declare const index_NodeOptions: typeof NodeOptions;
|
|
336
|
-
declare const index_NodeSink: typeof NodeSink;
|
|
337
|
-
declare const index_NodeStatus: typeof NodeStatus;
|
|
338
|
-
declare const index_NodeTransportOptions: typeof NodeTransportOptions;
|
|
339
|
-
declare const index_NodeVersionInfo: typeof NodeVersionInfo;
|
|
340
|
-
declare const index_OnMessageHandler: typeof OnMessageHandler;
|
|
341
|
-
declare const index_OnSubscribeHandler: typeof OnSubscribeHandler;
|
|
342
|
-
declare const index_PAUSE: typeof PAUSE;
|
|
343
|
-
type index_PipeOperator = PipeOperator;
|
|
344
|
-
declare const index_PolicyAllow: typeof PolicyAllow;
|
|
345
|
-
declare const index_PolicyDeny: typeof PolicyDeny;
|
|
346
|
-
declare const index_PolicyRuleData: typeof PolicyRuleData;
|
|
347
|
-
type index_ProducerFn = ProducerFn;
|
|
348
|
-
declare const index_RESOLVED: typeof RESOLVED;
|
|
349
|
-
declare const index_RESOLVED_MSG: typeof RESOLVED_MSG;
|
|
350
|
-
declare const index_RESOLVED_ONLY_BATCH: typeof RESOLVED_ONLY_BATCH;
|
|
351
|
-
declare const index_RESUME: typeof RESUME;
|
|
352
|
-
declare const index_START: typeof START;
|
|
353
|
-
declare const index_START_MSG: typeof START_MSG;
|
|
354
|
-
declare const index_SubscribeContext: typeof SubscribeContext;
|
|
355
|
-
declare const index_TEARDOWN: typeof TEARDOWN;
|
|
356
|
-
declare const index_TEARDOWN_MSG: typeof TEARDOWN_MSG;
|
|
357
|
-
declare const index_TEARDOWN_ONLY_BATCH: typeof TEARDOWN_ONLY_BATCH;
|
|
358
|
-
type index_TrackFn = TrackFn;
|
|
359
|
-
declare const index_V0: typeof V0;
|
|
360
|
-
declare const index_V1: typeof V1;
|
|
361
|
-
declare const index_VersioningLevel: typeof VersioningLevel;
|
|
362
|
-
declare const index_VersioningOptions: typeof VersioningOptions;
|
|
363
|
-
declare const index_accessHintForGuard: typeof accessHintForGuard;
|
|
364
|
-
declare const index_advanceVersion: typeof advanceVersion;
|
|
365
|
-
declare const index_autoTrackNode: typeof autoTrackNode;
|
|
366
|
-
declare const index_batch: typeof batch;
|
|
367
|
-
declare const index_configure: typeof configure;
|
|
368
|
-
declare const index_createVersioning: typeof createVersioning;
|
|
369
|
-
declare const index_defaultConfig: typeof defaultConfig;
|
|
370
|
-
declare const index_defaultHash: typeof defaultHash;
|
|
371
|
-
declare const index_derived: typeof derived;
|
|
372
|
-
declare const index_downWithBatch: typeof downWithBatch;
|
|
373
|
-
declare const index_dynamicNode: typeof dynamicNode;
|
|
374
|
-
declare const index_effect: typeof effect;
|
|
375
|
-
declare const index_isBatching: typeof isBatching;
|
|
376
|
-
declare const index_isV1: typeof isV1;
|
|
377
|
-
declare const index_monotonicNs: typeof monotonicNs;
|
|
378
|
-
declare const index_node: typeof node;
|
|
379
|
-
declare const index_normalizeActor: typeof normalizeActor;
|
|
380
|
-
declare const index_pipe: typeof pipe;
|
|
381
|
-
declare const index_policy: typeof policy;
|
|
382
|
-
declare const index_policyFromRules: typeof policyFromRules;
|
|
383
|
-
declare const index_producer: typeof producer;
|
|
384
|
-
declare const index_registerBuiltins: typeof registerBuiltins;
|
|
385
|
-
declare const index_resolveDescribeFields: typeof resolveDescribeFields;
|
|
386
|
-
declare const index_state: typeof state;
|
|
387
|
-
declare const index_wallClockNs: typeof wallClockNs;
|
|
388
|
-
declare namespace index {
|
|
389
|
-
export { index_Actor as Actor, type index_AutoTrackOptions as AutoTrackOptions, index_COMPLETE as COMPLETE, index_COMPLETE_MSG as COMPLETE_MSG, index_COMPLETE_ONLY_BATCH as COMPLETE_ONLY_BATCH, index_DATA as DATA, index_DEFAULT_ACTOR as DEFAULT_ACTOR, index_DIRTY as DIRTY, index_DIRTY_MSG as DIRTY_MSG, index_DIRTY_ONLY_BATCH as DIRTY_ONLY_BATCH, index_DepRecord as DepRecord, type index_DerivedFn as DerivedFn, index_DescribeDetail as DescribeDetail, index_DescribeField as DescribeField, index_DescribeNodeOutput as DescribeNodeOutput, type index_DynamicFn as DynamicFn, index_ERROR as ERROR, type index_EffectFn as EffectFn, index_FnCtx as FnCtx, index_GlobalInspectorEvent as GlobalInspectorEvent, index_GlobalInspectorHook as GlobalInspectorHook, index_GraphReFlyConfig as GraphReFlyConfig, index_GuardAction as GuardAction, index_GuardDenied as GuardDenied, index_GuardDeniedDetails as GuardDeniedDetails, index_HashFn as HashFn, index_INVALIDATE as INVALIDATE, index_INVALIDATE_MSG as INVALIDATE_MSG, index_INVALIDATE_ONLY_BATCH as INVALIDATE_ONLY_BATCH, index_Message as Message, index_MessageContext as MessageContext, index_MessageTypeRegistration as MessageTypeRegistration, index_MessageTypeRegistrationInput as MessageTypeRegistrationInput, index_Messages as Messages, index_Node as Node, index_NodeActions as NodeActions, index_NodeCtx as NodeCtx, index_NodeDescribeKind as NodeDescribeKind, index_NodeFn as NodeFn, index_NodeFnCleanup as NodeFnCleanup, index_NodeGuard as NodeGuard, index_NodeImpl as NodeImpl, index_NodeInspectorHook as NodeInspectorHook, index_NodeInspectorHookEvent as NodeInspectorHookEvent, index_NodeOptions as NodeOptions, index_NodeSink as NodeSink, index_NodeStatus as NodeStatus, index_NodeTransportOptions as NodeTransportOptions, index_NodeVersionInfo as NodeVersionInfo, index_OnMessageHandler as OnMessageHandler, index_OnSubscribeHandler as OnSubscribeHandler, index_PAUSE as PAUSE, type index_PipeOperator as PipeOperator, index_PolicyAllow as PolicyAllow, index_PolicyDeny as PolicyDeny, index_PolicyRuleData as PolicyRuleData, type index_ProducerFn as ProducerFn, index_RESOLVED as RESOLVED, index_RESOLVED_MSG as RESOLVED_MSG, index_RESOLVED_ONLY_BATCH as RESOLVED_ONLY_BATCH, index_RESUME as RESUME, index_START as START, index_START_MSG as START_MSG, index_SubscribeContext as SubscribeContext, index_TEARDOWN as TEARDOWN, index_TEARDOWN_MSG as TEARDOWN_MSG, index_TEARDOWN_ONLY_BATCH as TEARDOWN_ONLY_BATCH, type index_TrackFn as TrackFn, index_V0 as V0, index_V1 as V1, index_VersioningLevel as VersioningLevel, index_VersioningOptions as VersioningOptions, index_accessHintForGuard as accessHintForGuard, index_advanceVersion as advanceVersion, index_autoTrackNode as autoTrackNode, index_batch as batch, index_configure as configure, index_createVersioning as createVersioning, index_defaultConfig as defaultConfig, index_defaultHash as defaultHash, index_derived as derived, index_downWithBatch as downWithBatch, index_dynamicNode as dynamicNode, index_effect as effect, index_isBatching as isBatching, index_isV1 as isV1, index_monotonicNs as monotonicNs, index_node as node, index_normalizeActor as normalizeActor, index_pipe as pipe, index_policy as policy, index_policyFromRules as policyFromRules, index_producer as producer, index_registerBuiltins as registerBuiltins, index_resolveDescribeFields as resolveDescribeFields, index_state as state, index_wallClockNs as wallClockNs };
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
export { type AutoTrackOptions as A, type DerivedFn as D, type EffectFn as E, type PipeOperator as P, type TrackFn as T, type DynamicFn as a, type ProducerFn as b, autoTrackNode as c, batch as d, derived as e, downWithBatch as f, dynamicNode as g, effect as h, index as i, isBatching as j, producer as k, monotonicNs as m, pipe as p, state as s, wallClockNs as w };
|