@graphrefly/ts 0.0.2 → 0.0.3
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/README.md +197 -117
- package/dist/{actions-types-wl9Mgkmr.d.cts → actions-types-CH-XCU9O.d.cts} +4 -4
- package/dist/{actions-types-CSC3NMDl.d.ts → actions-types-w2iPQTkv.d.ts} +4 -4
- package/dist/adapters/index.cjs.map +1 -1
- package/dist/adapters/index.d.cts +10 -10
- package/dist/adapters/index.d.ts +10 -10
- package/dist/adapters/index.js +7 -7
- package/dist/adapters/nestjs/microservices.d.cts +3 -3
- package/dist/adapters/nestjs/microservices.d.ts +3 -3
- package/dist/adapters/nestjs/native.cjs.map +1 -1
- package/dist/adapters/nestjs/native.d.cts +4 -4
- package/dist/adapters/nestjs/native.d.ts +4 -4
- package/dist/adapters/nestjs/native.js +3 -3
- package/dist/adapters/nestjs/websockets.d.cts +3 -3
- package/dist/adapters/nestjs/websockets.d.ts +3 -3
- package/dist/adapters/nestjs.d.cts +3 -3
- package/dist/adapters/nestjs.d.ts +3 -3
- package/dist/adapters/observe-storage.d.cts +3 -3
- package/dist/adapters/observe-storage.d.ts +3 -3
- package/dist/adapters/react.d.cts +2 -2
- package/dist/adapters/react.d.ts +2 -2
- package/dist/adapters/solid.d.cts +2 -2
- package/dist/adapters/solid.d.ts +2 -2
- package/dist/adapters/svelte.d.cts +2 -2
- package/dist/adapters/svelte.d.ts +2 -2
- package/dist/adapters/vue.d.cts +2 -2
- package/dist/adapters/vue.d.ts +2 -2
- package/dist/{agent-runtime-types-core-hU299uIC.d.ts → agent-runtime-types-core-CKwrBDyi.d.ts} +1 -1
- package/dist/{agent-runtime-types-core-CaXfKNtY.d.cts → agent-runtime-types-core-bfl4m0vM.d.cts} +1 -1
- package/dist/{agent-runtime-types-tool-DninPEzk.d.cts → agent-runtime-types-tool-BLPV3azj.d.cts} +4 -4
- package/dist/{agent-runtime-types-tool-BEpSINol.d.ts → agent-runtime-types-tool-hwqvVqNt.d.ts} +4 -4
- package/dist/{agentic-memory-retention-BmGX368S.d.ts → agentic-memory-retention-CLwI76JK.d.ts} +2 -2
- package/dist/{agentic-memory-retention-Ih1qhX9Z.d.cts → agentic-memory-retention-Cz8GR6ie.d.cts} +2 -2
- package/dist/{agentic-memory-types-FnnYlVUs.d.cts → agentic-memory-types-JDr7MPhh.d.cts} +2 -2
- package/dist/{agentic-memory-types-CVSUS6XR.d.ts → agentic-memory-types-khYJgzKL.d.ts} +2 -2
- package/dist/{capability-admission-lwSecxXs.d.cts → capability-admission-B8RNFyaZ.d.cts} +3 -3
- package/dist/{capability-admission-BW2CziT6.d.ts → capability-admission-Dkw1Xz3r.d.ts} +3 -3
- package/dist/{chunk-SIDJO2T4.js → chunk-3J7UPZL5.js} +6 -6
- package/dist/{chunk-ECURQ3HD.js → chunk-3LYI6ADX.js} +4 -4
- package/dist/chunk-3LYI6ADX.js.map +1 -0
- package/dist/{chunk-M7J6Z4IJ.js → chunk-4M37FH2I.js} +2 -2
- package/dist/chunk-4M37FH2I.js.map +1 -0
- package/dist/{chunk-CJIFGJQG.js → chunk-54WPEODM.js} +2 -2
- package/dist/chunk-54WPEODM.js.map +1 -0
- package/dist/{chunk-CX6B6PO2.js → chunk-DKFWDTVY.js} +2 -2
- package/dist/chunk-DKFWDTVY.js.map +1 -0
- package/dist/{chunk-SHZDP2MQ.js → chunk-GXU6WFEJ.js} +1 -1
- package/dist/chunk-GXU6WFEJ.js.map +1 -0
- package/dist/{chunk-YDWBXXQZ.js → chunk-KFURM6FM.js} +3 -3
- package/dist/{chunk-STXRMPW4.js → chunk-MCOFHMUU.js} +2 -2
- package/dist/{chunk-EOKT4QFF.js → chunk-NNDIFUKX.js} +3 -3
- package/dist/chunk-NNDIFUKX.js.map +1 -0
- package/dist/{chunk-TPND5MJS.js → chunk-PUSRRALM.js} +3 -3
- package/dist/{chunk-7HZRJMN6.js → chunk-UEMN5URK.js} +2 -2
- package/dist/{chunk-2NJP6GO4.js → chunk-WOS7RJYZ.js} +2 -2
- package/dist/composition/index.cjs.map +1 -1
- package/dist/composition/index.d.cts +3 -3
- package/dist/composition/index.d.ts +3 -3
- package/dist/composition/index.js +3 -3
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +23 -2
- package/dist/core/index.d.ts +23 -2
- package/dist/core/index.js +1 -1
- package/dist/cqrs/index.d.cts +3 -3
- package/dist/cqrs/index.d.ts +3 -3
- package/dist/cqrs/messaging.d.cts +4 -4
- package/dist/cqrs/messaging.d.ts +4 -4
- package/dist/cqrs/work-queue.d.cts +5 -5
- package/dist/cqrs/work-queue.d.ts +5 -5
- package/dist/data-structures/index.cjs.map +1 -1
- package/dist/data-structures/index.d.cts +8 -8
- package/dist/data-structures/index.d.ts +8 -8
- package/dist/data-structures/index.js +4 -4
- package/dist/{describe-CQRrkv-Q.d.cts → describe-BumQ-3_0.d.cts} +1 -1
- package/dist/{describe-B_A5fbXH.d.ts → describe-cYr_Z5zm.d.ts} +1 -1
- package/dist/executors/tool-provider-adapters.d.cts +7 -7
- package/dist/executors/tool-provider-adapters.d.ts +7 -7
- package/dist/executors/tool-provider-adapters.js +5 -5
- package/dist/executors/tool-provider-runtime.cjs.map +1 -1
- package/dist/executors/tool-provider-runtime.d.cts +8 -8
- package/dist/executors/tool-provider-runtime.d.ts +8 -8
- package/dist/executors/tool-provider-runtime.js +2 -2
- package/dist/executors/tool-provider.cjs.map +1 -1
- package/dist/executors/tool-provider.d.cts +7 -7
- package/dist/executors/tool-provider.d.ts +7 -7
- package/dist/executors/tool-provider.js +2 -2
- package/dist/executors/work-queue.d.cts +6 -6
- package/dist/executors/work-queue.d.ts +6 -6
- package/dist/graph/index.cjs.map +1 -1
- package/dist/graph/index.d.cts +9 -9
- package/dist/graph/index.d.ts +9 -9
- package/dist/graph/index.js +7 -7
- package/dist/{graph-CWK3HLPB.d.cts → graph-C1C-wb0L.d.cts} +135 -8
- package/dist/{graph-ho5sotHP.d.ts → graph-CS0b4V9B.d.ts} +135 -8
- package/dist/{index-CQWcE0Dw.d.ts → index-DLrNopda.d.cts} +135 -8
- package/dist/{index-DHA1i67c.d.cts → index-DzJni3_6.d.ts} +135 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +13 -13
- package/dist/inspection/boundary.d.cts +4 -4
- package/dist/inspection/boundary.d.ts +4 -4
- package/dist/{measurements-OMpCeBwh.d.ts → measurements-BWAnochv.d.ts} +139 -9
- package/dist/{measurements-C0mAvWU1.d.cts → measurements-B_gJfD8h.d.cts} +139 -9
- package/dist/messaging/index.d.cts +5 -5
- package/dist/messaging/index.d.ts +5 -5
- package/dist/operators/index.cjs.map +1 -1
- package/dist/operators/index.d.cts +5 -5
- package/dist/operators/index.d.ts +5 -5
- package/dist/operators/index.js +4 -4
- package/dist/orchestration/index.cjs.map +1 -1
- package/dist/orchestration/index.d.cts +12 -12
- package/dist/orchestration/index.d.ts +12 -12
- package/dist/orchestration/index.js +5 -5
- package/dist/orchestration/messaging.d.cts +5 -5
- package/dist/orchestration/messaging.d.ts +5 -5
- package/dist/orchestration/work-queue.d.cts +8 -8
- package/dist/orchestration/work-queue.d.ts +8 -8
- package/dist/patterns/event-flow.d.cts +4 -4
- package/dist/patterns/event-flow.d.ts +4 -4
- package/dist/patterns/index.d.cts +6 -6
- package/dist/patterns/index.d.ts +6 -6
- package/dist/{process-types-h3uRlzDc.d.cts → process-types-BB7oRhX3.d.cts} +1 -1
- package/dist/{process-types-C9uMYz3i.d.ts → process-types-QNhyoYJ8.d.ts} +1 -1
- package/dist/{reactive-collection-B9R0Bl1P.d.cts → reactive-collection-BYlWvtnp.d.cts} +3 -3
- package/dist/{reactive-collection-BXFrH0U2.d.ts → reactive-collection-efOEdGFN.d.ts} +3 -3
- package/dist/{reactive-collection-storage-BLGv8Xp8.d.cts → reactive-collection-storage-BjoLsoiC.d.cts} +5 -5
- package/dist/{reactive-collection-storage-a4zD3665.d.ts → reactive-collection-storage-DwW6UuK_.d.ts} +5 -5
- package/dist/{reactive-map-jle5dnok.d.ts → reactive-map-BHacbIqz.d.cts} +7 -3
- package/dist/{reactive-map-C_8sOfdS.d.cts → reactive-map-DN4Jyqnf.d.ts} +7 -3
- package/dist/render/index.d.cts +2 -2
- package/dist/render/index.d.ts +2 -2
- package/dist/{scheduled-readiness-5rwQlyjV.d.ts → scheduled-readiness-BmqXxnzX.d.ts} +3 -3
- package/dist/{scheduled-readiness-DpRY8jI0.d.cts → scheduled-readiness-CYSw7KDE.d.cts} +3 -3
- package/dist/{semantic-memory-graph-DlZBD_Eu.d.cts → semantic-memory-graph-B_LwbM-E.d.cts} +2 -2
- package/dist/{semantic-memory-graph-C2ZUwIlq.d.ts → semantic-memory-graph-rsFNNhwn.d.ts} +2 -2
- package/dist/{semantic-memory-graph-types-BvzdqmkY.d.cts → semantic-memory-graph-types-Y73bbwVI.d.cts} +1 -1
- package/dist/{semantic-memory-graph-types-Ci-OtahO.d.ts → semantic-memory-graph-types-safmPkuX.d.ts} +1 -1
- package/dist/solutions/index.cjs.map +1 -1
- package/dist/solutions/index.d.cts +11 -11
- package/dist/solutions/index.d.ts +11 -11
- package/dist/solutions/index.js +2 -2
- package/dist/solutions/reactive-layout/browser/index.cjs.map +1 -1
- package/dist/solutions/reactive-layout/browser/index.d.cts +4 -4
- package/dist/solutions/reactive-layout/browser/index.d.ts +4 -4
- package/dist/solutions/reactive-layout/browser/index.js +2 -2
- package/dist/solutions/reactive-layout/index.cjs.map +1 -1
- package/dist/solutions/reactive-layout/index.d.cts +6 -6
- package/dist/solutions/reactive-layout/index.d.ts +6 -6
- package/dist/solutions/reactive-layout/index.js +2 -2
- package/dist/solutions/reactive-layout/node-canvas/index.cjs.map +1 -1
- package/dist/solutions/reactive-layout/node-canvas/index.d.cts +4 -4
- package/dist/solutions/reactive-layout/node-canvas/index.d.ts +4 -4
- package/dist/solutions/reactive-layout/node-canvas/index.js +2 -2
- package/dist/solutions/reactive-layout/react-native/index.cjs.map +1 -1
- package/dist/solutions/reactive-layout/react-native/index.d.cts +4 -4
- package/dist/solutions/reactive-layout/react-native/index.d.ts +4 -4
- package/dist/solutions/reactive-layout/react-native/index.js +2 -2
- package/dist/solutions/reactive-layout/skia/index.cjs.map +1 -1
- package/dist/solutions/reactive-layout/skia/index.d.cts +4 -4
- package/dist/solutions/reactive-layout/skia/index.d.ts +4 -4
- package/dist/solutions/reactive-layout/skia/index.js +2 -2
- package/dist/solutions/work-item/actions.d.cts +10 -10
- package/dist/solutions/work-item/actions.d.ts +10 -10
- package/dist/solutions/work-item/scheduling.d.cts +9 -9
- package/dist/solutions/work-item/scheduling.d.ts +9 -9
- package/dist/solutions/work-item/work-queue.d.cts +7 -7
- package/dist/solutions/work-item/work-queue.d.ts +7 -7
- package/dist/sources/browser.cjs.map +1 -1
- package/dist/sources/browser.d.cts +22 -6
- package/dist/sources/browser.d.ts +22 -6
- package/dist/sources/browser.js +3 -3
- package/dist/sources/browser.js.map +1 -1
- package/dist/sources/index.cjs.map +1 -1
- package/dist/sources/index.d.cts +4 -4
- package/dist/sources/index.d.ts +4 -4
- package/dist/sources/index.js +3 -3
- package/dist/sources/node.d.cts +3 -3
- package/dist/sources/node.d.ts +3 -3
- package/dist/storage/index.d.cts +5 -5
- package/dist/storage/index.d.ts +5 -5
- package/dist/{store-BmtEs9mG.d.ts → store-6_CHF6Ge.d.ts} +1 -1
- package/dist/{store-PAAsYvML.d.cts → store-BljX8RkQ.d.cts} +1 -1
- package/dist/{types-BhveCMg5.d.cts → types-BAw2QVVE.d.cts} +1 -1
- package/dist/{types-XDoqxYO9.d.cts → types-BUbbbh4f.d.cts} +1 -1
- package/dist/{types-BWK2ay3e.d.cts → types-CMnzoL54.d.cts} +2 -2
- package/dist/{types-BS6CyR-x.d.cts → types-CTN3XoMl.d.cts} +30 -0
- package/dist/{types-BXKSAoE1.d.cts → types-CV_ohy5T.d.cts} +2 -2
- package/dist/{types-C9NOgNJw.d.ts → types-DChxk1vK.d.ts} +30 -0
- package/dist/{types-CTsQ8Ww4.d.ts → types-DRu7SnLV.d.ts} +1 -1
- package/dist/{types-DL_05n2M.d.ts → types-DeID_FRl.d.ts} +1 -1
- package/dist/{types-BRNKoFHj.d.ts → types-IhKH0hGW.d.ts} +2 -2
- package/dist/{types-BaPpZItj.d.ts → types-ePlD2uyT.d.ts} +2 -2
- package/dist/{work-item-runtime-types-CHO03AKh.d.cts → work-item-runtime-types-BTxLskN5.d.cts} +2 -2
- package/dist/{work-item-runtime-types-BqtWnSCS.d.ts → work-item-runtime-types-DAsZbb2y.d.ts} +2 -2
- package/dist/work-queue/index.d.cts +6 -6
- package/dist/work-queue/index.d.ts +6 -6
- package/package.json +9 -1
- package/dist/chunk-CJIFGJQG.js.map +0 -1
- package/dist/chunk-CX6B6PO2.js.map +0 -1
- package/dist/chunk-ECURQ3HD.js.map +0 -1
- package/dist/chunk-EOKT4QFF.js.map +0 -1
- package/dist/chunk-M7J6Z4IJ.js.map +0 -1
- package/dist/chunk-SHZDP2MQ.js.map +0 -1
- /package/dist/{chunk-SIDJO2T4.js.map → chunk-3J7UPZL5.js.map} +0 -0
- /package/dist/{chunk-YDWBXXQZ.js.map → chunk-KFURM6FM.js.map} +0 -0
- /package/dist/{chunk-STXRMPW4.js.map → chunk-MCOFHMUU.js.map} +0 -0
- /package/dist/{chunk-TPND5MJS.js.map → chunk-PUSRRALM.js.map} +0 -0
- /package/dist/{chunk-7HZRJMN6.js.map → chunk-UEMN5URK.js.map} +0 -0
- /package/dist/{chunk-2NJP6GO4.js.map → chunk-WOS7RJYZ.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as Node, n as NodeOptions, h as HttpResponse, g as HttpRequest, x as ProcessResult, z as SseEvent, A as SseRequest, J as WebSocketEvent, M as WebSocketRequest, X as WebhookEvent, Y as WebhookRegistration, w as ProcessCommand } from './types-
|
|
2
|
-
import { L as Operator } from './graph-
|
|
1
|
+
import { N as Node, n as NodeOptions, h as HttpResponse, g as HttpRequest, x as ProcessResult, z as SseEvent, A as SseRequest, J as WebSocketEvent, M as WebSocketRequest, X as WebhookEvent, Y as WebhookRegistration, w as ProcessCommand } from './types-CTN3XoMl.cjs';
|
|
2
|
+
import { L as Operator } from './graph-C1C-wb0L.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Async + sync sources (binding-layer sugar, D43 / D40 / feedback_async_sources_binding_layer).
|
|
@@ -115,38 +115,165 @@ declare function fromWebhookWithOptions(registration: WebhookRegistration): Oper
|
|
|
115
115
|
* Timer source: one-shot (first tick then COMPLETE) or periodic (`{period}` → 0, 1, 2, …).
|
|
116
116
|
* sync pool + pausable:false (a timer keeps producing through PAUSE, R-pause-modes). Emits the
|
|
117
117
|
* tick counter from 0; deactivation clears the timers.
|
|
118
|
+
*
|
|
119
|
+
* @param ms - Delay before the first tick in milliseconds.
|
|
120
|
+
* @param opts - Optional period and source options.
|
|
121
|
+
* @returns A source operator that emits tick counters.
|
|
122
|
+
* @example
|
|
123
|
+
* ```ts
|
|
124
|
+
* import { graph, timer } from "@graphrefly/ts";
|
|
125
|
+
*
|
|
126
|
+
* const tick = graph().initNode(timer(100), []);
|
|
127
|
+
* ```
|
|
128
|
+
* @category sources
|
|
118
129
|
*/
|
|
119
130
|
declare function timer(ms: number, opts?: TimerSourceOpts): Operator<never, number>;
|
|
120
|
-
/**
|
|
131
|
+
/**
|
|
132
|
+
* Create a timer source with the legacy `fromTimer` factory name.
|
|
133
|
+
*
|
|
134
|
+
* @param ms - Delay before the first tick in milliseconds.
|
|
135
|
+
* @param opts - Optional period and source options.
|
|
136
|
+
* @returns A source operator that emits tick counters.
|
|
137
|
+
* @example
|
|
138
|
+
* ```ts
|
|
139
|
+
* import { fromTimer, graph } from "@graphrefly/ts";
|
|
140
|
+
*
|
|
141
|
+
* const tick = graph().initNode(fromTimer(100), []);
|
|
142
|
+
* ```
|
|
143
|
+
* @remarks **Factory name:** This preserves the real `fromTimer` factory name in `describe()`.
|
|
144
|
+
* @category sources
|
|
145
|
+
*/
|
|
121
146
|
declare function fromTimer(ms: number, opts?: TimerSourceOpts): Operator<never, number>;
|
|
122
|
-
/**
|
|
147
|
+
/**
|
|
148
|
+
* Emit periodic tick counters.
|
|
149
|
+
*
|
|
150
|
+
* @param ms - Delay before the first tick and between later ticks in milliseconds.
|
|
151
|
+
* @returns A source operator that emits `0`, `1`, `2`, and so on.
|
|
152
|
+
* @example
|
|
153
|
+
* ```ts
|
|
154
|
+
* import { graph, interval } from "@graphrefly/ts";
|
|
155
|
+
*
|
|
156
|
+
* const ticks = graph().initNode(interval(1000), []);
|
|
157
|
+
* ```
|
|
158
|
+
* @category sources
|
|
159
|
+
*/
|
|
123
160
|
declare function interval(ms: number): Operator<never, number>;
|
|
124
161
|
/**
|
|
125
162
|
* Lift a Promise (or thenable) to a single-value stream: one DATA then COMPLETE, or ERROR on
|
|
126
163
|
* rejection. async pool (default pausable → a paused source buffers its late emit). Optional
|
|
127
164
|
* `signal` aborts to ERROR.
|
|
165
|
+
*
|
|
166
|
+
* @param p - Promise or thenable to lift into the graph.
|
|
167
|
+
* @param opts - Optional abort signal and async source options.
|
|
168
|
+
* @returns A source operator that emits one DATA value and COMPLETE, or ERROR on rejection/abort.
|
|
169
|
+
* @example
|
|
170
|
+
* ```ts
|
|
171
|
+
* import { fromPromise, graph } from "@graphrefly/ts";
|
|
172
|
+
*
|
|
173
|
+
* const user = graph().initNode(fromPromise(fetch("/user").then((res) => res.json())), []);
|
|
174
|
+
* ```
|
|
175
|
+
* @category sources
|
|
128
176
|
*/
|
|
129
177
|
declare function fromPromise<T>(p: Promise<T> | PromiseLike<T>, opts?: AsyncSourceOpts): Operator<never, T>;
|
|
130
178
|
/**
|
|
131
179
|
* Read an async iterable: each value → DATA; COMPLETE when done; ERROR on failure. async pool.
|
|
132
180
|
* Optional `signal` aborts the pump.
|
|
181
|
+
*
|
|
182
|
+
* @param iterable - Async iterable to pump into the graph.
|
|
183
|
+
* @param opts - Optional abort signal and async source options.
|
|
184
|
+
* @returns A source operator that emits every iterable value and then COMPLETE.
|
|
185
|
+
* @example
|
|
186
|
+
* ```ts
|
|
187
|
+
* import { fromAsyncIter, graph } from "@graphrefly/ts";
|
|
188
|
+
*
|
|
189
|
+
* const stream = graph().initNode(fromAsyncIter(events()), []);
|
|
190
|
+
* ```
|
|
191
|
+
* @category sources
|
|
133
192
|
*/
|
|
134
193
|
declare function fromAsyncIter<T>(iterable: AsyncIterable<T>, opts?: AsyncSourceOpts): Operator<never, T>;
|
|
135
194
|
/**
|
|
136
195
|
* of: synchronous values — each argument as DATA, then COMPLETE. `of()` is the EMPTY source.
|
|
196
|
+
*
|
|
197
|
+
* @param values - Values to emit synchronously on activation.
|
|
198
|
+
* @returns A source operator that emits each value and then COMPLETE.
|
|
199
|
+
* @example
|
|
200
|
+
* ```ts
|
|
201
|
+
* import { graph, of } from "@graphrefly/ts";
|
|
202
|
+
*
|
|
203
|
+
* const values = graph().initNode(of(1, 2, 3), []);
|
|
204
|
+
* ```
|
|
205
|
+
* @category sources
|
|
137
206
|
*/
|
|
138
207
|
declare function of<T = never>(...values: T[]): Operator<never, T>;
|
|
139
|
-
/**
|
|
208
|
+
/**
|
|
209
|
+
* Emit every value from a synchronous iterable.
|
|
210
|
+
*
|
|
211
|
+
* @param iterable - Iterable whose values are emitted in order.
|
|
212
|
+
* @returns A source operator that emits every iterable value and then COMPLETE.
|
|
213
|
+
* @example
|
|
214
|
+
* ```ts
|
|
215
|
+
* import { fromIter, graph } from "@graphrefly/ts";
|
|
216
|
+
*
|
|
217
|
+
* const values = graph().initNode(fromIter([1, 2, 3]), []);
|
|
218
|
+
* ```
|
|
219
|
+
* @category sources
|
|
220
|
+
*/
|
|
140
221
|
declare function fromIter<T>(iterable: Iterable<T>): Operator<never, T>;
|
|
141
|
-
/**
|
|
222
|
+
/**
|
|
223
|
+
* Complete immediately without emitting DATA.
|
|
224
|
+
*
|
|
225
|
+
* @returns A source operator that emits COMPLETE on activation.
|
|
226
|
+
* @example
|
|
227
|
+
* ```ts
|
|
228
|
+
* import { empty, graph } from "@graphrefly/ts";
|
|
229
|
+
*
|
|
230
|
+
* const done = graph().initNode(empty(), []);
|
|
231
|
+
* ```
|
|
232
|
+
* @category sources
|
|
233
|
+
*/
|
|
142
234
|
declare function empty<T = never>(): Operator<never, T>;
|
|
143
|
-
/**
|
|
235
|
+
/**
|
|
236
|
+
* Activate and remain silent until deactivation.
|
|
237
|
+
*
|
|
238
|
+
* @returns A source operator that never emits DATA or terminal messages by itself.
|
|
239
|
+
* @example
|
|
240
|
+
* ```ts
|
|
241
|
+
* import { graph, never } from "@graphrefly/ts";
|
|
242
|
+
*
|
|
243
|
+
* const quiet = graph().initNode(never(), []);
|
|
244
|
+
* ```
|
|
245
|
+
* @category sources
|
|
246
|
+
*/
|
|
144
247
|
declare function never<T = never>(): Operator<never, T>;
|
|
145
|
-
/**
|
|
248
|
+
/**
|
|
249
|
+
* Terminate with ERROR on activation.
|
|
250
|
+
*
|
|
251
|
+
* @param err - Host-language error payload to normalize into a protocol ERROR payload.
|
|
252
|
+
* @returns A source operator that emits ERROR.
|
|
253
|
+
* @example
|
|
254
|
+
* ```ts
|
|
255
|
+
* import { graph, throwError } from "@graphrefly/ts";
|
|
256
|
+
*
|
|
257
|
+
* const failed = graph().initNode(throwError(new Error("boom")), []);
|
|
258
|
+
* ```
|
|
259
|
+
* @category sources
|
|
260
|
+
*/
|
|
146
261
|
declare function throwError(err: unknown): Operator<never, never>;
|
|
147
262
|
/**
|
|
148
263
|
* Wrap a DOM-style event target. Each event becomes DATA; deactivation removes the listener.
|
|
149
264
|
* External callbacks are source boundaries (D43), so no polling or operator-level async leaks in.
|
|
265
|
+
*
|
|
266
|
+
* @param target - Event target implementing `addEventListener` and `removeEventListener`.
|
|
267
|
+
* @param type - Event type to subscribe to.
|
|
268
|
+
* @param opts - Optional listener options and source options.
|
|
269
|
+
* @returns A source operator that emits each event as DATA.
|
|
270
|
+
* @example
|
|
271
|
+
* ```ts
|
|
272
|
+
* import { fromEvent, graph } from "@graphrefly/ts";
|
|
273
|
+
*
|
|
274
|
+
* const clicks = graph().initNode(fromEvent<MouseEvent>(button, "click"), []);
|
|
275
|
+
* ```
|
|
276
|
+
* @category sources
|
|
150
277
|
*/
|
|
151
278
|
declare function fromEvent<T = unknown>(target: EventTargetLike, type: string, opts?: FromEventOptions): Operator<never, T>;
|
|
152
279
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as Node, n as NodeOptions, h as HttpResponse, g as HttpRequest, x as ProcessResult, z as SseEvent, A as SseRequest, J as WebSocketEvent, M as WebSocketRequest, X as WebhookEvent, Y as WebhookRegistration, w as ProcessCommand } from './types-
|
|
2
|
-
import { L as Operator } from './graph-
|
|
1
|
+
import { N as Node, n as NodeOptions, h as HttpResponse, g as HttpRequest, x as ProcessResult, z as SseEvent, A as SseRequest, J as WebSocketEvent, M as WebSocketRequest, X as WebhookEvent, Y as WebhookRegistration, w as ProcessCommand } from './types-DChxk1vK.js';
|
|
2
|
+
import { L as Operator } from './graph-CS0b4V9B.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Async + sync sources (binding-layer sugar, D43 / D40 / feedback_async_sources_binding_layer).
|
|
@@ -115,38 +115,165 @@ declare function fromWebhookWithOptions(registration: WebhookRegistration): Oper
|
|
|
115
115
|
* Timer source: one-shot (first tick then COMPLETE) or periodic (`{period}` → 0, 1, 2, …).
|
|
116
116
|
* sync pool + pausable:false (a timer keeps producing through PAUSE, R-pause-modes). Emits the
|
|
117
117
|
* tick counter from 0; deactivation clears the timers.
|
|
118
|
+
*
|
|
119
|
+
* @param ms - Delay before the first tick in milliseconds.
|
|
120
|
+
* @param opts - Optional period and source options.
|
|
121
|
+
* @returns A source operator that emits tick counters.
|
|
122
|
+
* @example
|
|
123
|
+
* ```ts
|
|
124
|
+
* import { graph, timer } from "@graphrefly/ts";
|
|
125
|
+
*
|
|
126
|
+
* const tick = graph().initNode(timer(100), []);
|
|
127
|
+
* ```
|
|
128
|
+
* @category sources
|
|
118
129
|
*/
|
|
119
130
|
declare function timer(ms: number, opts?: TimerSourceOpts): Operator<never, number>;
|
|
120
|
-
/**
|
|
131
|
+
/**
|
|
132
|
+
* Create a timer source with the legacy `fromTimer` factory name.
|
|
133
|
+
*
|
|
134
|
+
* @param ms - Delay before the first tick in milliseconds.
|
|
135
|
+
* @param opts - Optional period and source options.
|
|
136
|
+
* @returns A source operator that emits tick counters.
|
|
137
|
+
* @example
|
|
138
|
+
* ```ts
|
|
139
|
+
* import { fromTimer, graph } from "@graphrefly/ts";
|
|
140
|
+
*
|
|
141
|
+
* const tick = graph().initNode(fromTimer(100), []);
|
|
142
|
+
* ```
|
|
143
|
+
* @remarks **Factory name:** This preserves the real `fromTimer` factory name in `describe()`.
|
|
144
|
+
* @category sources
|
|
145
|
+
*/
|
|
121
146
|
declare function fromTimer(ms: number, opts?: TimerSourceOpts): Operator<never, number>;
|
|
122
|
-
/**
|
|
147
|
+
/**
|
|
148
|
+
* Emit periodic tick counters.
|
|
149
|
+
*
|
|
150
|
+
* @param ms - Delay before the first tick and between later ticks in milliseconds.
|
|
151
|
+
* @returns A source operator that emits `0`, `1`, `2`, and so on.
|
|
152
|
+
* @example
|
|
153
|
+
* ```ts
|
|
154
|
+
* import { graph, interval } from "@graphrefly/ts";
|
|
155
|
+
*
|
|
156
|
+
* const ticks = graph().initNode(interval(1000), []);
|
|
157
|
+
* ```
|
|
158
|
+
* @category sources
|
|
159
|
+
*/
|
|
123
160
|
declare function interval(ms: number): Operator<never, number>;
|
|
124
161
|
/**
|
|
125
162
|
* Lift a Promise (or thenable) to a single-value stream: one DATA then COMPLETE, or ERROR on
|
|
126
163
|
* rejection. async pool (default pausable → a paused source buffers its late emit). Optional
|
|
127
164
|
* `signal` aborts to ERROR.
|
|
165
|
+
*
|
|
166
|
+
* @param p - Promise or thenable to lift into the graph.
|
|
167
|
+
* @param opts - Optional abort signal and async source options.
|
|
168
|
+
* @returns A source operator that emits one DATA value and COMPLETE, or ERROR on rejection/abort.
|
|
169
|
+
* @example
|
|
170
|
+
* ```ts
|
|
171
|
+
* import { fromPromise, graph } from "@graphrefly/ts";
|
|
172
|
+
*
|
|
173
|
+
* const user = graph().initNode(fromPromise(fetch("/user").then((res) => res.json())), []);
|
|
174
|
+
* ```
|
|
175
|
+
* @category sources
|
|
128
176
|
*/
|
|
129
177
|
declare function fromPromise<T>(p: Promise<T> | PromiseLike<T>, opts?: AsyncSourceOpts): Operator<never, T>;
|
|
130
178
|
/**
|
|
131
179
|
* Read an async iterable: each value → DATA; COMPLETE when done; ERROR on failure. async pool.
|
|
132
180
|
* Optional `signal` aborts the pump.
|
|
181
|
+
*
|
|
182
|
+
* @param iterable - Async iterable to pump into the graph.
|
|
183
|
+
* @param opts - Optional abort signal and async source options.
|
|
184
|
+
* @returns A source operator that emits every iterable value and then COMPLETE.
|
|
185
|
+
* @example
|
|
186
|
+
* ```ts
|
|
187
|
+
* import { fromAsyncIter, graph } from "@graphrefly/ts";
|
|
188
|
+
*
|
|
189
|
+
* const stream = graph().initNode(fromAsyncIter(events()), []);
|
|
190
|
+
* ```
|
|
191
|
+
* @category sources
|
|
133
192
|
*/
|
|
134
193
|
declare function fromAsyncIter<T>(iterable: AsyncIterable<T>, opts?: AsyncSourceOpts): Operator<never, T>;
|
|
135
194
|
/**
|
|
136
195
|
* of: synchronous values — each argument as DATA, then COMPLETE. `of()` is the EMPTY source.
|
|
196
|
+
*
|
|
197
|
+
* @param values - Values to emit synchronously on activation.
|
|
198
|
+
* @returns A source operator that emits each value and then COMPLETE.
|
|
199
|
+
* @example
|
|
200
|
+
* ```ts
|
|
201
|
+
* import { graph, of } from "@graphrefly/ts";
|
|
202
|
+
*
|
|
203
|
+
* const values = graph().initNode(of(1, 2, 3), []);
|
|
204
|
+
* ```
|
|
205
|
+
* @category sources
|
|
137
206
|
*/
|
|
138
207
|
declare function of<T = never>(...values: T[]): Operator<never, T>;
|
|
139
|
-
/**
|
|
208
|
+
/**
|
|
209
|
+
* Emit every value from a synchronous iterable.
|
|
210
|
+
*
|
|
211
|
+
* @param iterable - Iterable whose values are emitted in order.
|
|
212
|
+
* @returns A source operator that emits every iterable value and then COMPLETE.
|
|
213
|
+
* @example
|
|
214
|
+
* ```ts
|
|
215
|
+
* import { fromIter, graph } from "@graphrefly/ts";
|
|
216
|
+
*
|
|
217
|
+
* const values = graph().initNode(fromIter([1, 2, 3]), []);
|
|
218
|
+
* ```
|
|
219
|
+
* @category sources
|
|
220
|
+
*/
|
|
140
221
|
declare function fromIter<T>(iterable: Iterable<T>): Operator<never, T>;
|
|
141
|
-
/**
|
|
222
|
+
/**
|
|
223
|
+
* Complete immediately without emitting DATA.
|
|
224
|
+
*
|
|
225
|
+
* @returns A source operator that emits COMPLETE on activation.
|
|
226
|
+
* @example
|
|
227
|
+
* ```ts
|
|
228
|
+
* import { empty, graph } from "@graphrefly/ts";
|
|
229
|
+
*
|
|
230
|
+
* const done = graph().initNode(empty(), []);
|
|
231
|
+
* ```
|
|
232
|
+
* @category sources
|
|
233
|
+
*/
|
|
142
234
|
declare function empty<T = never>(): Operator<never, T>;
|
|
143
|
-
/**
|
|
235
|
+
/**
|
|
236
|
+
* Activate and remain silent until deactivation.
|
|
237
|
+
*
|
|
238
|
+
* @returns A source operator that never emits DATA or terminal messages by itself.
|
|
239
|
+
* @example
|
|
240
|
+
* ```ts
|
|
241
|
+
* import { graph, never } from "@graphrefly/ts";
|
|
242
|
+
*
|
|
243
|
+
* const quiet = graph().initNode(never(), []);
|
|
244
|
+
* ```
|
|
245
|
+
* @category sources
|
|
246
|
+
*/
|
|
144
247
|
declare function never<T = never>(): Operator<never, T>;
|
|
145
|
-
/**
|
|
248
|
+
/**
|
|
249
|
+
* Terminate with ERROR on activation.
|
|
250
|
+
*
|
|
251
|
+
* @param err - Host-language error payload to normalize into a protocol ERROR payload.
|
|
252
|
+
* @returns A source operator that emits ERROR.
|
|
253
|
+
* @example
|
|
254
|
+
* ```ts
|
|
255
|
+
* import { graph, throwError } from "@graphrefly/ts";
|
|
256
|
+
*
|
|
257
|
+
* const failed = graph().initNode(throwError(new Error("boom")), []);
|
|
258
|
+
* ```
|
|
259
|
+
* @category sources
|
|
260
|
+
*/
|
|
146
261
|
declare function throwError(err: unknown): Operator<never, never>;
|
|
147
262
|
/**
|
|
148
263
|
* Wrap a DOM-style event target. Each event becomes DATA; deactivation removes the listener.
|
|
149
264
|
* External callbacks are source boundaries (D43), so no polling or operator-level async leaks in.
|
|
265
|
+
*
|
|
266
|
+
* @param target - Event target implementing `addEventListener` and `removeEventListener`.
|
|
267
|
+
* @param type - Event type to subscribe to.
|
|
268
|
+
* @param opts - Optional listener options and source options.
|
|
269
|
+
* @returns A source operator that emits each event as DATA.
|
|
270
|
+
* @example
|
|
271
|
+
* ```ts
|
|
272
|
+
* import { fromEvent, graph } from "@graphrefly/ts";
|
|
273
|
+
*
|
|
274
|
+
* const clicks = graph().initNode(fromEvent<MouseEvent>(button, "click"), []);
|
|
275
|
+
* ```
|
|
276
|
+
* @category sources
|
|
150
277
|
*/
|
|
151
278
|
declare function fromEvent<T = unknown>(target: EventTargetLike, type: string, opts?: FromEventOptions): Operator<never, T>;
|
|
152
279
|
/**
|