@graphrefly/graphrefly 0.18.0 → 0.19.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-TNKODJ6E.js → chunk-AHRKWMNI.js} +7 -3
- package/dist/{chunk-TNKODJ6E.js.map → chunk-AHRKWMNI.js.map} +1 -1
- package/dist/{chunk-76YPZQTW.js → chunk-BER7UYLM.js} +27 -26
- package/dist/chunk-BER7UYLM.js.map +1 -0
- package/dist/{chunk-F6ORUNO7.js → chunk-IRZAGZUB.js} +34 -2
- package/dist/{chunk-F6ORUNO7.js.map → chunk-IRZAGZUB.js.map} +1 -1
- package/dist/{chunk-LB3RYLSC.js → chunk-JC2SN46B.js} +197 -42
- package/dist/chunk-JC2SN46B.js.map +1 -0
- package/dist/{chunk-KJGUP35I.js → chunk-OO5QOAXI.js} +4 -4
- package/dist/{chunk-UVWEKTYC.js → chunk-UW77D7SP.js} +3 -3
- package/dist/{chunk-J7S54G7I.js → chunk-XUOY3YKN.js} +7 -2
- package/dist/chunk-XUOY3YKN.js.map +1 -0
- package/dist/chunk-YLR5JUJZ.js +111 -0
- package/dist/chunk-YLR5JUJZ.js.map +1 -0
- package/dist/{chunk-BV3TPSBK.js → chunk-YXR3WW3Q.js} +740 -755
- package/dist/chunk-YXR3WW3Q.js.map +1 -0
- package/dist/compat/nestjs/index.cjs +931 -784
- package/dist/compat/nestjs/index.cjs.map +1 -1
- package/dist/compat/nestjs/index.d.cts +4 -4
- package/dist/compat/nestjs/index.d.ts +4 -4
- package/dist/compat/nestjs/index.js +7 -7
- package/dist/core/index.cjs +651 -664
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +7 -3
- package/dist/extra/index.cjs +686 -672
- 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 +5 -5
- package/dist/graph/index.cjs +836 -808
- package/dist/graph/index.cjs.map +1 -1
- package/dist/graph/index.d.cts +3 -3
- package/dist/graph/index.d.ts +3 -3
- package/dist/graph/index.js +8 -8
- package/dist/{graph-gISB9n3n.d.ts → graph-KsTe57nI.d.cts} +82 -8
- package/dist/{graph-BYFlyNpX.d.cts → graph-mILUUqW8.d.ts} +82 -8
- package/dist/{index-CgKPpiu8.d.ts → index-8a605sg9.d.ts} +2 -2
- package/dist/{index-DKaB2x0T.d.ts → index-B2SvPEbc.d.ts} +6 -65
- package/dist/{index-B80mMeuf.d.ts → index-BBUYZfJ1.d.cts} +122 -76
- package/dist/{index-D_tUMcpz.d.cts → index-Bjh5C1Tp.d.cts} +37 -32
- package/dist/{index-B43mC7uY.d.cts → index-BjtlNirP.d.cts} +3 -3
- package/dist/{index-7WnwgjMu.d.ts → index-BnkMgNNa.d.ts} +37 -32
- package/dist/{index-CEDaJaYE.d.ts → index-CgSiUouz.d.ts} +3 -3
- package/dist/{index-EmzYk-TG.d.cts → index-CvKzv0AW.d.ts} +122 -76
- package/dist/{index-Ci_vPaVm.d.cts → index-UudxGnzc.d.cts} +6 -65
- package/dist/{index-BqOWSFhr.d.cts → index-VHA43cGP.d.cts} +2 -2
- package/dist/index.cjs +5920 -5572
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +595 -399
- package/dist/index.d.ts +595 -399
- package/dist/index.js +4357 -4063
- package/dist/index.js.map +1 -1
- package/dist/{meta-npl5b97j.d.cts → meta-BnG7XAaE.d.cts} +394 -236
- package/dist/{meta-npl5b97j.d.ts → meta-BnG7XAaE.d.ts} +394 -236
- package/dist/{observable-DFBCBELR.d.cts → observable-C8Kx_O6k.d.cts} +1 -1
- package/dist/{observable-oAGygKvc.d.ts → observable-DcBwQY7t.d.ts} +1 -1
- package/dist/patterns/reactive-layout/index.cjs +865 -718
- package/dist/patterns/reactive-layout/index.cjs.map +1 -1
- package/dist/patterns/reactive-layout/index.d.cts +3 -3
- package/dist/patterns/reactive-layout/index.d.ts +3 -3
- package/dist/patterns/reactive-layout/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-76YPZQTW.js.map +0 -1
- package/dist/chunk-BV3TPSBK.js.map +0 -1
- package/dist/chunk-FCLROC4Q.js +0 -231
- package/dist/chunk-FCLROC4Q.js.map +0 -1
- package/dist/chunk-J7S54G7I.js.map +0 -1
- package/dist/chunk-LB3RYLSC.js.map +0 -1
- /package/dist/{chunk-KJGUP35I.js.map → chunk-OO5QOAXI.js.map} +0 -0
- /package/dist/{chunk-UVWEKTYC.js.map → chunk-UW77D7SP.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-WZ2Z2CRV.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveDescribeFields
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XUOY3YKN.js";
|
|
7
7
|
import {
|
|
8
8
|
CLEANUP_RESULT,
|
|
9
9
|
COMPLETE,
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
PAUSE,
|
|
18
18
|
RESOLVED,
|
|
19
19
|
RESUME,
|
|
20
|
+
START,
|
|
20
21
|
TEARDOWN,
|
|
21
22
|
__export,
|
|
22
23
|
accessHintForGuard,
|
|
@@ -31,6 +32,7 @@ import {
|
|
|
31
32
|
effect,
|
|
32
33
|
isBatching,
|
|
33
34
|
isKnownMessageType,
|
|
35
|
+
isLocalOnly,
|
|
34
36
|
isPhase2Message,
|
|
35
37
|
isTerminalMessage,
|
|
36
38
|
isV1,
|
|
@@ -47,7 +49,7 @@ import {
|
|
|
47
49
|
propagatesToMeta,
|
|
48
50
|
state,
|
|
49
51
|
wallClockNs
|
|
50
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-YXR3WW3Q.js";
|
|
51
53
|
|
|
52
54
|
// src/core/index.ts
|
|
53
55
|
var core_exports = {};
|
|
@@ -66,6 +68,7 @@ __export(core_exports, {
|
|
|
66
68
|
RESOLVED: () => RESOLVED,
|
|
67
69
|
RESUME: () => RESUME,
|
|
68
70
|
ResettableTimer: () => ResettableTimer,
|
|
71
|
+
START: () => START,
|
|
69
72
|
TEARDOWN: () => TEARDOWN,
|
|
70
73
|
accessHintForGuard: () => accessHintForGuard,
|
|
71
74
|
advanceVersion: () => advanceVersion,
|
|
@@ -80,6 +83,7 @@ __export(core_exports, {
|
|
|
80
83
|
effect: () => effect,
|
|
81
84
|
isBatching: () => isBatching,
|
|
82
85
|
isKnownMessageType: () => isKnownMessageType,
|
|
86
|
+
isLocalOnly: () => isLocalOnly,
|
|
83
87
|
isPhase2Message: () => isPhase2Message,
|
|
84
88
|
isTerminalMessage: () => isTerminalMessage,
|
|
85
89
|
isV1: () => isV1,
|
|
@@ -155,4 +159,4 @@ export {
|
|
|
155
159
|
bridge,
|
|
156
160
|
core_exports
|
|
157
161
|
};
|
|
158
|
-
//# sourceMappingURL=chunk-
|
|
162
|
+
//# sourceMappingURL=chunk-AHRKWMNI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core/index.ts","../src/core/bridge.ts"],"sourcesContent":["/**\n * Core layer: message protocol, node primitive, lifecycle (Phase 0).\n */\nexport * from \"./actor.js\";\nexport * from \"./batch.js\";\nexport { type BridgeOptions, bridge, DEFAULT_DOWN } from \"./bridge.js\";\nexport { monotonicNs, wallClockNs } from \"./clock.js\";\nexport * from \"./dynamic-node.js\";\nexport * from \"./guard.js\";\nexport * from \"./messages.js\";\nexport {\n\ttype DescribeDetail,\n\ttype DescribeField,\n\ttype DescribeNodeOutput,\n\tresolveDescribeFields,\n} from \"./meta.js\";\nexport {\n\tCLEANUP_RESULT,\n\ttype CleanupResult,\n\tcleanupResult,\n\ttype Node,\n\ttype NodeActions,\n\ttype NodeDescribeKind,\n\ttype NodeFn,\n\ttype NodeOptions,\n\ttype NodeSink,\n\ttype NodeStatus,\n\ttype NodeTransportOptions,\n\tnode,\n\ttype OnMessageHandler,\n\ttype SubscribeHints,\n} from \"./node.js\";\nexport * from \"./sugar.js\";\nexport { ResettableTimer } from \"./timer.js\";\nexport {\n\tadvanceVersion,\n\tcreateVersioning,\n\tdefaultHash,\n\ttype HashFn,\n\tisV1,\n\ttype NodeVersionInfo,\n\ttype V0,\n\ttype V1,\n\ttype VersioningLevel,\n\ttype VersioningOptions,\n} from \"./versioning.js\";\n","/**\n * bridge — graph-visible message forwarding between two nodes.\n *\n * Replaces ad-hoc `subscribe()` bridges that bypass graph topology.\n * The returned node is an effect that intercepts messages from `from`\n * and forwards them to `to.down()`. Register it with `graph.add()` to\n * make the bridge visible in `describe()` and `snapshot()`.\n *\n * **Upstream path:** The bridge node has `from` as its dep, so anything\n * downstream of the bridge that calls `up()` naturally reaches `from`.\n * If `to` is used as a dep by other nodes and those nodes send `up()`,\n * the messages reach `to`'s deps (not `from`). For full upstream relay\n * across the bridge boundary, wire the bridge as a dep of `to`'s\n * consumers or use `graph.connect()`.\n *\n * **ABAC / guards:** `to.down()` is called without `NodeTransportOptions`,\n * so any ABAC guard on `to` receives `actor = undefined`. Upstream (`up()`)\n * messages propagate through the dep chain the same way — no actor is\n * injected on either path. Both paths are intentionally unguarded; if `to`\n * requires a specific actor, provide a guarded wrapper node and bridge to\n * that instead.\n *\n * **Default forwarding:** All standard message types are forwarded by\n * default, including TEARDOWN, PAUSE, RESUME, and INVALIDATE. Use the\n * `down` option to restrict which types are forwarded. Callers that need\n * to exclude TEARDOWN (e.g. inter-stage wiring in `funnel()`) pass an\n * explicit `down` array without TEARDOWN.\n *\n * @module\n */\n\nimport {\n\tCOMPLETE,\n\tDATA,\n\tDIRTY,\n\tERROR,\n\tINVALIDATE,\n\ttype Message,\n\tPAUSE,\n\tRESOLVED,\n\tRESUME,\n\tTEARDOWN,\n} from \"./messages.js\";\nimport { type Node, type NodeActions, node, type OnMessageHandler } from \"./node.js\";\n\n/** Options for {@link bridge}. */\nexport type BridgeOptions = {\n\t/** Node name (for graph registration / describe). */\n\tname?: string;\n\t/**\n\t * Standard message types to forward downstream. Default: all standard\n\t * types. Unknown (non-standard) types always forward per spec §1.3.6\n\t * regardless of this option.\n\t */\n\tdown?: readonly symbol[];\n};\n\n/** All standard types forwarded by default. Export for callers that\n * need to customize (e.g. exclude TEARDOWN). */\nexport const DEFAULT_DOWN: readonly symbol[] = [\n\tDATA,\n\tDIRTY,\n\tRESOLVED,\n\tCOMPLETE,\n\tERROR,\n\tTEARDOWN,\n\tPAUSE,\n\tRESUME,\n\tINVALIDATE,\n];\n\n/**\n * All standard message types the bridge understands. Types outside this set\n * are \"unknown\" and must always be forwarded (spec §1.3.6).\n */\nconst STANDARD_TYPES = new Set<symbol>([\n\tDATA,\n\tDIRTY,\n\tRESOLVED,\n\tCOMPLETE,\n\tERROR,\n\tTEARDOWN,\n\tPAUSE,\n\tRESUME,\n\tINVALIDATE,\n]);\n\n/**\n * Create a graph-visible bridge node that forwards messages from `from` to `to`.\n *\n * The bridge is a real node (effect) — it shows up in `describe()`, participates\n * in two-phase push, and cleans up on TEARDOWN. Register it via `graph.add()`\n * to make it part of the graph topology.\n *\n * **Unknown message types** (custom domain signals not in the standard protocol\n * set) are always forwarded to `to`, regardless of the `down` option. This\n * satisfies spec §1.3.6 (\"unknown types forward unchanged\").\n *\n * **COMPLETE / ERROR**: when forwarded, the bridge also transitions to terminal\n * state so graph-wide completion detection works correctly.\n *\n * @param from - Source node to observe.\n * @param to - Target node to forward messages to via `to.down()`.\n * @param opts - Optional configuration.\n * @returns A bridge effect node. Add it to a graph with `graph.add(name, bridge(...))`.\n *\n * @example\n * ```ts\n * import { bridge, state } from \"@graphrefly/graphrefly-ts\";\n *\n * const a = state(0);\n * const b = state(0);\n * const br = bridge(a, b, { name: \"__bridge_a_b\" });\n * graph.add(\"__bridge_a_b\", br);\n * // Now a's messages flow to b, visible in describe()\n * ```\n *\n * @category core\n */\nexport function bridge<T = unknown>(from: Node<T>, to: Node, opts?: BridgeOptions): Node<unknown> {\n\tconst allowedDown = new Set(opts?.down ?? DEFAULT_DOWN);\n\n\tconst onMessage: OnMessageHandler = (\n\t\tmsg: Message,\n\t\t_depIndex: number,\n\t\t_actions: NodeActions,\n\t): boolean => {\n\t\tconst type = msg[0];\n\n\t\t// Unknown types (custom domain signals) always forward — spec §1.3.6.\n\t\tif (!STANDARD_TYPES.has(type)) {\n\t\t\tto.down([msg]);\n\t\t\treturn true;\n\t\t}\n\n\t\t// Terminal types: always transition the bridge to terminal state\n\t\t// (return false → default dispatch). Only forward to `to` if allowed.\n\t\tif (type === COMPLETE || type === ERROR) {\n\t\t\tif (allowedDown.has(type)) {\n\t\t\t\tto.down([msg]);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t// Known type, not in allowedDown — consume without forwarding.\n\t\tif (!allowedDown.has(type)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Forward the message to the target.\n\t\tto.down([msg]);\n\t\treturn true;\n\t};\n\n\treturn node([from as Node], undefined, {\n\t\tname: opts?.name,\n\t\tdescribeKind: \"effect\",\n\t\tonMessage,\n\t\tmeta: { _internal: true },\n\t});\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/core/index.ts","../src/core/bridge.ts"],"sourcesContent":["/**\n * Core layer: message protocol, node primitive, lifecycle (Phase 0).\n */\nexport * from \"./actor.js\";\nexport * from \"./batch.js\";\nexport { type BridgeOptions, bridge, DEFAULT_DOWN } from \"./bridge.js\";\nexport { monotonicNs, wallClockNs } from \"./clock.js\";\nexport * from \"./dynamic-node.js\";\nexport * from \"./guard.js\";\nexport * from \"./messages.js\";\nexport {\n\ttype DescribeDetail,\n\ttype DescribeField,\n\ttype DescribeNodeOutput,\n\tresolveDescribeFields,\n} from \"./meta.js\";\nexport {\n\tCLEANUP_RESULT,\n\ttype CleanupResult,\n\tcleanupResult,\n\ttype Node,\n\ttype NodeActions,\n\ttype NodeDescribeKind,\n\ttype NodeFn,\n\ttype NodeOptions,\n\ttype NodeSink,\n\ttype NodeStatus,\n\ttype NodeTransportOptions,\n\tnode,\n\ttype OnMessageHandler,\n\ttype SubscribeHints,\n} from \"./node.js\";\nexport * from \"./sugar.js\";\nexport { ResettableTimer } from \"./timer.js\";\nexport {\n\tadvanceVersion,\n\tcreateVersioning,\n\tdefaultHash,\n\ttype HashFn,\n\tisV1,\n\ttype NodeVersionInfo,\n\ttype V0,\n\ttype V1,\n\ttype VersioningLevel,\n\ttype VersioningOptions,\n} from \"./versioning.js\";\n","/**\n * bridge — graph-visible message forwarding between two nodes.\n *\n * Replaces ad-hoc `subscribe()` bridges that bypass graph topology.\n * The returned node is an effect that intercepts messages from `from`\n * and forwards them to `to.down()`. Register it with `graph.add()` to\n * make the bridge visible in `describe()` and `snapshot()`.\n *\n * **Upstream path:** The bridge node has `from` as its dep, so anything\n * downstream of the bridge that calls `up()` naturally reaches `from`.\n * If `to` is used as a dep by other nodes and those nodes send `up()`,\n * the messages reach `to`'s deps (not `from`). For full upstream relay\n * across the bridge boundary, wire the bridge as a dep of `to`'s\n * consumers or use `graph.connect()`.\n *\n * **ABAC / guards:** `to.down()` is called without `NodeTransportOptions`,\n * so any ABAC guard on `to` receives `actor = undefined`. Upstream (`up()`)\n * messages propagate through the dep chain the same way — no actor is\n * injected on either path. Both paths are intentionally unguarded; if `to`\n * requires a specific actor, provide a guarded wrapper node and bridge to\n * that instead.\n *\n * **Default forwarding:** All standard message types are forwarded by\n * default, including TEARDOWN, PAUSE, RESUME, and INVALIDATE. Use the\n * `down` option to restrict which types are forwarded. Callers that need\n * to exclude TEARDOWN (e.g. inter-stage wiring in `funnel()`) pass an\n * explicit `down` array without TEARDOWN.\n *\n * @module\n */\n\nimport {\n\tCOMPLETE,\n\tDATA,\n\tDIRTY,\n\tERROR,\n\tINVALIDATE,\n\ttype Message,\n\tPAUSE,\n\tRESOLVED,\n\tRESUME,\n\tTEARDOWN,\n} from \"./messages.js\";\nimport { type Node, type NodeActions, node, type OnMessageHandler } from \"./node.js\";\n\n/** Options for {@link bridge}. */\nexport type BridgeOptions = {\n\t/** Node name (for graph registration / describe). */\n\tname?: string;\n\t/**\n\t * Standard message types to forward downstream. Default: all standard\n\t * types. Unknown (non-standard) types always forward per spec §1.3.6\n\t * regardless of this option.\n\t */\n\tdown?: readonly symbol[];\n};\n\n/** All standard types forwarded by default. Export for callers that\n * need to customize (e.g. exclude TEARDOWN). */\nexport const DEFAULT_DOWN: readonly symbol[] = [\n\tDATA,\n\tDIRTY,\n\tRESOLVED,\n\tCOMPLETE,\n\tERROR,\n\tTEARDOWN,\n\tPAUSE,\n\tRESUME,\n\tINVALIDATE,\n];\n\n/**\n * All standard message types the bridge understands. Types outside this set\n * are \"unknown\" and must always be forwarded (spec §1.3.6).\n */\nconst STANDARD_TYPES = new Set<symbol>([\n\tDATA,\n\tDIRTY,\n\tRESOLVED,\n\tCOMPLETE,\n\tERROR,\n\tTEARDOWN,\n\tPAUSE,\n\tRESUME,\n\tINVALIDATE,\n]);\n\n/**\n * Create a graph-visible bridge node that forwards messages from `from` to `to`.\n *\n * The bridge is a real node (effect) — it shows up in `describe()`, participates\n * in two-phase push, and cleans up on TEARDOWN. Register it via `graph.add()`\n * to make it part of the graph topology.\n *\n * **Unknown message types** (custom domain signals not in the standard protocol\n * set) are always forwarded to `to`, regardless of the `down` option. This\n * satisfies spec §1.3.6 (\"unknown types forward unchanged\").\n *\n * **COMPLETE / ERROR**: when forwarded, the bridge also transitions to terminal\n * state so graph-wide completion detection works correctly.\n *\n * @param from - Source node to observe.\n * @param to - Target node to forward messages to via `to.down()`.\n * @param opts - Optional configuration.\n * @returns A bridge effect node. Add it to a graph with `graph.add(name, bridge(...))`.\n *\n * @example\n * ```ts\n * import { bridge, state } from \"@graphrefly/graphrefly-ts\";\n *\n * const a = state(0);\n * const b = state(0);\n * const br = bridge(a, b, { name: \"__bridge_a_b\" });\n * graph.add(\"__bridge_a_b\", br);\n * // Now a's messages flow to b, visible in describe()\n * ```\n *\n * @category core\n */\nexport function bridge<T = unknown>(from: Node<T>, to: Node, opts?: BridgeOptions): Node<unknown> {\n\tconst allowedDown = new Set(opts?.down ?? DEFAULT_DOWN);\n\n\tconst onMessage: OnMessageHandler = (\n\t\tmsg: Message,\n\t\t_depIndex: number,\n\t\t_actions: NodeActions,\n\t): boolean => {\n\t\tconst type = msg[0];\n\n\t\t// Unknown types (custom domain signals) always forward — spec §1.3.6.\n\t\tif (!STANDARD_TYPES.has(type)) {\n\t\t\tto.down([msg]);\n\t\t\treturn true;\n\t\t}\n\n\t\t// Terminal types: always transition the bridge to terminal state\n\t\t// (return false → default dispatch). Only forward to `to` if allowed.\n\t\tif (type === COMPLETE || type === ERROR) {\n\t\t\tif (allowedDown.has(type)) {\n\t\t\t\tto.down([msg]);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t\t// Known type, not in allowedDown — consume without forwarding.\n\t\tif (!allowedDown.has(type)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Forward the message to the target.\n\t\tto.down([msg]);\n\t\treturn true;\n\t};\n\n\treturn node([from as Node], undefined, {\n\t\tname: opts?.name,\n\t\tdescribeKind: \"effect\",\n\t\tonMessage,\n\t\tmeta: { _internal: true },\n\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC2DO,IAAM,eAAkC;AAAA,EAC9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAMA,IAAM,iBAAiB,oBAAI,IAAY;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAkCM,SAAS,OAAoB,MAAe,IAAU,MAAqC;AACjG,QAAM,cAAc,IAAI,IAAI,MAAM,QAAQ,YAAY;AAEtD,QAAM,YAA8B,CACnC,KACA,WACA,aACa;AACb,UAAM,OAAO,IAAI,CAAC;AAGlB,QAAI,CAAC,eAAe,IAAI,IAAI,GAAG;AAC9B,SAAG,KAAK,CAAC,GAAG,CAAC;AACb,aAAO;AAAA,IACR;AAIA,QAAI,SAAS,YAAY,SAAS,OAAO;AACxC,UAAI,YAAY,IAAI,IAAI,GAAG;AAC1B,WAAG,KAAK,CAAC,GAAG,CAAC;AAAA,MACd;AACA,aAAO;AAAA,IACR;AAGA,QAAI,CAAC,YAAY,IAAI,IAAI,GAAG;AAC3B,aAAO;AAAA,IACR;AAGA,OAAG,KAAK,CAAC,GAAG,CAAC;AACb,WAAO;AAAA,EACR;AAEA,SAAO,KAAK,CAAC,IAAY,GAAG,QAAW;AAAA,IACtC,MAAM,MAAM;AAAA,IACZ,cAAc;AAAA,IACd;AAAA,IACA,MAAM,EAAE,WAAW,KAAK;AAAA,EACzB,CAAC;AACF;","names":[]}
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
empty,
|
|
5
5
|
escapeRegexChar,
|
|
6
6
|
firstValueFrom,
|
|
7
|
+
firstWhere,
|
|
7
8
|
forEach,
|
|
8
9
|
fromAny,
|
|
9
10
|
fromAsyncIter,
|
|
@@ -27,7 +28,7 @@ import {
|
|
|
27
28
|
throwError,
|
|
28
29
|
toArray,
|
|
29
30
|
toObservable
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-IRZAGZUB.js";
|
|
31
32
|
import {
|
|
32
33
|
ResettableTimer
|
|
33
34
|
} from "./chunk-WZ2Z2CRV.js";
|
|
@@ -41,6 +42,7 @@ import {
|
|
|
41
42
|
PAUSE,
|
|
42
43
|
RESOLVED,
|
|
43
44
|
RESUME,
|
|
45
|
+
START,
|
|
44
46
|
TEARDOWN,
|
|
45
47
|
__export,
|
|
46
48
|
__require,
|
|
@@ -48,14 +50,14 @@ import {
|
|
|
48
50
|
derived,
|
|
49
51
|
dynamicNode,
|
|
50
52
|
effect,
|
|
51
|
-
|
|
53
|
+
isLocalOnly,
|
|
52
54
|
messageTier,
|
|
53
55
|
monotonicNs,
|
|
54
56
|
node,
|
|
55
57
|
producer,
|
|
56
58
|
state,
|
|
57
59
|
wallClockNs
|
|
58
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-YXR3WW3Q.js";
|
|
59
61
|
|
|
60
62
|
// src/extra/index.ts
|
|
61
63
|
var extra_exports = {};
|
|
@@ -105,6 +107,7 @@ __export(extra_exports, {
|
|
|
105
107
|
find: () => find,
|
|
106
108
|
first: () => first,
|
|
107
109
|
firstValueFrom: () => firstValueFrom,
|
|
110
|
+
firstWhere: () => firstWhere,
|
|
108
111
|
flatMap: () => flatMap,
|
|
109
112
|
forEach: () => forEach,
|
|
110
113
|
fromAny: () => fromAny,
|
|
@@ -182,7 +185,6 @@ __export(extra_exports, {
|
|
|
182
185
|
shareReplay: () => shareReplay,
|
|
183
186
|
signalToName: () => signalToName,
|
|
184
187
|
skip: () => skip,
|
|
185
|
-
startWith: () => startWith,
|
|
186
188
|
switchMap: () => switchMap,
|
|
187
189
|
take: () => take,
|
|
188
190
|
takeUntil: () => takeUntil,
|
|
@@ -1065,6 +1067,10 @@ function toSSE(source, opts) {
|
|
|
1065
1067
|
unsub = source.subscribe((msgs) => {
|
|
1066
1068
|
for (const msg of msgs) {
|
|
1067
1069
|
const t = msg[0];
|
|
1070
|
+
if (isLocalOnly(t)) {
|
|
1071
|
+
if (t === DIRTY && includeDirty) {
|
|
1072
|
+
} else continue;
|
|
1073
|
+
}
|
|
1068
1074
|
if (t === DATA) {
|
|
1069
1075
|
write(dataEvent, serializeSseData(msg[1], serialize));
|
|
1070
1076
|
continue;
|
|
@@ -1080,7 +1086,6 @@ function toSSE(source, opts) {
|
|
|
1080
1086
|
return;
|
|
1081
1087
|
}
|
|
1082
1088
|
if (!includeResolved && t === RESOLVED) continue;
|
|
1083
|
-
if (!includeDirty && t === DIRTY) continue;
|
|
1084
1089
|
write(
|
|
1085
1090
|
eventNameResolver(t),
|
|
1086
1091
|
msg.length > 1 ? serializeSseData(msg[1], serialize) : void 0
|
|
@@ -3682,9 +3687,12 @@ function reduce(source, reducer, seed, opts) {
|
|
|
3682
3687
|
}
|
|
3683
3688
|
function take(source, count, opts) {
|
|
3684
3689
|
if (count <= 0) {
|
|
3690
|
+
let completed = false;
|
|
3685
3691
|
return node(
|
|
3686
3692
|
[source],
|
|
3687
3693
|
(_d, a) => {
|
|
3694
|
+
if (completed) return void 0;
|
|
3695
|
+
completed = true;
|
|
3688
3696
|
a.down([[COMPLETE]]);
|
|
3689
3697
|
return void 0;
|
|
3690
3698
|
},
|
|
@@ -3692,8 +3700,15 @@ function take(source, count, opts) {
|
|
|
3692
3700
|
...operatorOpts2(opts),
|
|
3693
3701
|
completeWhenDepsComplete: false,
|
|
3694
3702
|
onMessage(msg, _i, a) {
|
|
3695
|
-
if (msg[0] ===
|
|
3703
|
+
if (msg[0] === START && !completed) {
|
|
3704
|
+
completed = true;
|
|
3705
|
+
a.down([[COMPLETE]]);
|
|
3706
|
+
return true;
|
|
3707
|
+
}
|
|
3708
|
+
if (msg[0] === COMPLETE && !completed) {
|
|
3709
|
+
completed = true;
|
|
3696
3710
|
a.down([[COMPLETE]]);
|
|
3711
|
+
return true;
|
|
3697
3712
|
}
|
|
3698
3713
|
return true;
|
|
3699
3714
|
}
|
|
@@ -3875,21 +3890,6 @@ function find(source, predicate, opts) {
|
|
|
3875
3890
|
function elementAt(source, index, opts) {
|
|
3876
3891
|
return take(skip(source, index, opts), 1, opts);
|
|
3877
3892
|
}
|
|
3878
|
-
function startWith(source, initial, opts) {
|
|
3879
|
-
let prepended = false;
|
|
3880
|
-
return node(
|
|
3881
|
-
[source],
|
|
3882
|
-
([v], a) => {
|
|
3883
|
-
if (!prepended) {
|
|
3884
|
-
prepended = true;
|
|
3885
|
-
a.emit(initial);
|
|
3886
|
-
}
|
|
3887
|
-
a.emit(v);
|
|
3888
|
-
return void 0;
|
|
3889
|
-
},
|
|
3890
|
-
operatorOpts2(opts)
|
|
3891
|
-
);
|
|
3892
|
-
}
|
|
3893
3893
|
function tap(source, fnOrObserver, opts) {
|
|
3894
3894
|
if (typeof fnOrObserver === "function") {
|
|
3895
3895
|
return derived(
|
|
@@ -4225,6 +4225,7 @@ function forwardInner(inner, a, onInnerComplete) {
|
|
|
4225
4225
|
let sawError = false;
|
|
4226
4226
|
const out = [];
|
|
4227
4227
|
for (const m of msgs) {
|
|
4228
|
+
if (messageTier(m[0]) < 1) continue;
|
|
4228
4229
|
if (m[0] === DATA) emitted = true;
|
|
4229
4230
|
if (m[0] === COMPLETE) sawComplete = true;
|
|
4230
4231
|
else {
|
|
@@ -4709,7 +4710,7 @@ function sample(source, notifier, opts) {
|
|
|
4709
4710
|
if (terminated) return true;
|
|
4710
4711
|
const t = msg[0];
|
|
4711
4712
|
const tier = messageTier(t);
|
|
4712
|
-
if (tier >=
|
|
4713
|
+
if (tier >= 4) {
|
|
4713
4714
|
if (t === ERROR) {
|
|
4714
4715
|
terminated = true;
|
|
4715
4716
|
a.down([msg]);
|
|
@@ -4725,6 +4726,7 @@ function sample(source, notifier, opts) {
|
|
|
4725
4726
|
a.down([msg]);
|
|
4726
4727
|
return true;
|
|
4727
4728
|
}
|
|
4729
|
+
terminated = true;
|
|
4728
4730
|
a.down([msg]);
|
|
4729
4731
|
return true;
|
|
4730
4732
|
}
|
|
@@ -5897,7 +5899,7 @@ function workerBridge(target, opts) {
|
|
|
5897
5899
|
for (const m of msgs) {
|
|
5898
5900
|
const type = m[0];
|
|
5899
5901
|
if (type === DATA) continue;
|
|
5900
|
-
if (
|
|
5902
|
+
if (isLocalOnly(type)) continue;
|
|
5901
5903
|
if (type === ERROR) {
|
|
5902
5904
|
transport.post({
|
|
5903
5905
|
t: "e",
|
|
@@ -6023,7 +6025,7 @@ function workerSelf(target, opts) {
|
|
|
6023
6025
|
for (const m of msgs) {
|
|
6024
6026
|
const type = m[0];
|
|
6025
6027
|
if (type === DATA) continue;
|
|
6026
|
-
if (
|
|
6028
|
+
if (isLocalOnly(type)) continue;
|
|
6027
6029
|
if (type === ERROR) {
|
|
6028
6030
|
transport.post({
|
|
6029
6031
|
t: "e",
|
|
@@ -6211,7 +6213,6 @@ export {
|
|
|
6211
6213
|
last,
|
|
6212
6214
|
find,
|
|
6213
6215
|
elementAt,
|
|
6214
|
-
startWith,
|
|
6215
6216
|
tap,
|
|
6216
6217
|
distinctUntilChanged,
|
|
6217
6218
|
pairwise,
|
|
@@ -6261,4 +6262,4 @@ export {
|
|
|
6261
6262
|
workerSelf,
|
|
6262
6263
|
extra_exports
|
|
6263
6264
|
};
|
|
6264
|
-
//# sourceMappingURL=chunk-
|
|
6265
|
+
//# sourceMappingURL=chunk-BER7UYLM.js.map
|