@graphrefly/ts 0.0.0 → 0.0.2
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 +135 -0
- package/dist/actions-types-CSC3NMDl.d.ts +657 -0
- package/dist/actions-types-wl9Mgkmr.d.cts +657 -0
- package/dist/adapters/index.cjs +5219 -2974
- package/dist/adapters/index.cjs.map +1 -1
- package/dist/adapters/index.d.cts +204 -192
- package/dist/adapters/index.d.ts +204 -192
- package/dist/adapters/index.js +3685 -1833
- package/dist/adapters/index.js.map +1 -1
- package/dist/adapters/nestjs/microservices.cjs +841 -0
- package/dist/adapters/nestjs/microservices.cjs.map +1 -0
- package/dist/adapters/nestjs/microservices.d.cts +45 -0
- package/dist/adapters/nestjs/microservices.d.ts +45 -0
- package/dist/adapters/nestjs/microservices.js +206 -0
- package/dist/adapters/nestjs/microservices.js.map +1 -0
- package/dist/adapters/nestjs/native.cjs +1391 -0
- package/dist/adapters/nestjs/native.cjs.map +1 -0
- package/dist/adapters/nestjs/native.d.cts +111 -0
- package/dist/adapters/nestjs/native.d.ts +111 -0
- package/dist/adapters/nestjs/native.js +577 -0
- package/dist/adapters/nestjs/native.js.map +1 -0
- package/dist/adapters/nestjs/websockets.cjs +924 -0
- package/dist/adapters/nestjs/websockets.cjs.map +1 -0
- package/dist/adapters/nestjs/websockets.d.cts +47 -0
- package/dist/adapters/nestjs/websockets.d.ts +47 -0
- package/dist/adapters/nestjs/websockets.js +286 -0
- package/dist/adapters/nestjs/websockets.js.map +1 -0
- package/dist/adapters/nestjs.cjs +1085 -0
- package/dist/adapters/nestjs.cjs.map +1 -0
- package/dist/adapters/nestjs.d.cts +385 -0
- package/dist/adapters/nestjs.d.ts +385 -0
- package/dist/adapters/nestjs.js +112 -0
- package/dist/adapters/nestjs.js.map +1 -0
- package/dist/adapters/observe-storage.d.cts +4 -4
- package/dist/adapters/observe-storage.d.ts +4 -4
- package/dist/adapters/observe-storage.js +5 -4
- package/dist/adapters/observe-storage.js.map +1 -1
- package/dist/adapters/react.cjs +166 -0
- package/dist/adapters/react.cjs.map +1 -0
- package/dist/adapters/react.d.cts +31 -0
- package/dist/adapters/react.d.ts +31 -0
- package/dist/adapters/react.js +51 -0
- package/dist/adapters/react.js.map +1 -0
- package/dist/adapters/solid.cjs +157 -0
- package/dist/adapters/solid.cjs.map +1 -0
- package/dist/adapters/solid.d.cts +26 -0
- package/dist/adapters/solid.d.ts +26 -0
- package/dist/adapters/solid.js +48 -0
- package/dist/adapters/solid.js.map +1 -0
- package/dist/adapters/svelte.cjs +148 -0
- package/dist/adapters/svelte.cjs.map +1 -0
- package/dist/adapters/svelte.d.cts +31 -0
- package/dist/adapters/svelte.d.ts +31 -0
- package/dist/adapters/svelte.js +46 -0
- package/dist/adapters/svelte.js.map +1 -0
- package/dist/adapters/vue.cjs +155 -0
- package/dist/adapters/vue.cjs.map +1 -0
- package/dist/adapters/vue.d.cts +26 -0
- package/dist/adapters/vue.d.ts +26 -0
- package/dist/adapters/vue.js +46 -0
- package/dist/adapters/vue.js.map +1 -0
- package/dist/agent-runtime-types-core-CaXfKNtY.d.cts +406 -0
- package/dist/agent-runtime-types-core-hU299uIC.d.ts +406 -0
- package/dist/agent-runtime-types-tool-BEpSINol.d.ts +695 -0
- package/dist/agent-runtime-types-tool-DninPEzk.d.cts +695 -0
- package/dist/agentic-memory-retention-BmGX368S.d.ts +14 -0
- package/dist/agentic-memory-retention-Ih1qhX9Z.d.cts +14 -0
- package/dist/agentic-memory-types-CVSUS6XR.d.ts +473 -0
- package/dist/agentic-memory-types-FnnYlVUs.d.cts +473 -0
- package/dist/capability-admission-BW2CziT6.d.ts +102 -0
- package/dist/capability-admission-lwSecxXs.d.cts +102 -0
- package/dist/chunk-2KUAG2GZ.js +9693 -0
- package/dist/chunk-2KUAG2GZ.js.map +1 -0
- package/dist/chunk-2NJP6GO4.js +1320 -0
- package/dist/chunk-2NJP6GO4.js.map +1 -0
- package/dist/{chunk-GDL26N2T.js → chunk-3KN7NJDR.js} +2 -2
- package/dist/{chunk-COHO25CZ.js → chunk-4NWSNI4K.js} +2232 -1672
- package/dist/chunk-4NWSNI4K.js.map +1 -0
- package/dist/{chunk-Z2ANQ6JW.js → chunk-4Q77MMJY.js} +2 -2
- package/dist/chunk-6E76H4OU.js +132 -0
- package/dist/chunk-6E76H4OU.js.map +1 -0
- package/dist/chunk-7GOTIIQ7.js +819 -0
- package/dist/chunk-7GOTIIQ7.js.map +1 -0
- package/dist/{chunk-D6BG7U6A.js → chunk-7HZRJMN6.js} +3 -3
- package/dist/{chunk-SCRFRCGR.js → chunk-BSQGE5PS.js} +1 -1
- package/dist/{chunk-PKVBHGBM.js → chunk-CJIFGJQG.js} +7 -7
- package/dist/{chunk-G4M3NHRJ.js → chunk-CX6B6PO2.js} +93 -10
- package/dist/chunk-CX6B6PO2.js.map +1 -0
- package/dist/chunk-DGUM43GV.js +11 -0
- package/dist/chunk-DGUM43GV.js.map +1 -0
- package/dist/{chunk-JIMUDQN3.js → chunk-E4QCH32M.js} +449 -447
- package/dist/chunk-E4QCH32M.js.map +1 -0
- package/dist/{chunk-RIIOUTGM.js → chunk-ECURQ3HD.js} +19 -129
- package/dist/chunk-ECURQ3HD.js.map +1 -0
- package/dist/{chunk-2ILL7HQI.js → chunk-EOKT4QFF.js} +134 -128
- package/dist/chunk-EOKT4QFF.js.map +1 -0
- package/dist/{chunk-K3FXTC3I.js → chunk-HJACH5PU.js} +3 -3
- package/dist/{chunk-GTPCOEOZ.js → chunk-IDMLXLLG.js} +3 -3
- package/dist/{chunk-DKP56CSW.js → chunk-JKAYLDQV.js} +2 -2
- package/dist/{chunk-4VLAQHZI.js → chunk-K7FB3JTD.js} +17 -1
- package/dist/chunk-K7FB3JTD.js.map +1 -0
- package/dist/chunk-L6LDXRWE.js +219 -0
- package/dist/chunk-L6LDXRWE.js.map +1 -0
- package/dist/chunk-M7J6Z4IJ.js +1930 -0
- package/dist/chunk-M7J6Z4IJ.js.map +1 -0
- package/dist/chunk-MQEQMS7B.js +1009 -0
- package/dist/chunk-MQEQMS7B.js.map +1 -0
- package/dist/chunk-MTELVIYR.js +1421 -0
- package/dist/chunk-MTELVIYR.js.map +1 -0
- package/dist/chunk-PVC7WDKI.js +885 -0
- package/dist/chunk-PVC7WDKI.js.map +1 -0
- package/dist/chunk-RAHNUYA5.js +368 -0
- package/dist/chunk-RAHNUYA5.js.map +1 -0
- package/dist/{chunk-DK554R7P.js → chunk-S6HXABGL.js} +2 -1
- package/dist/chunk-S6HXABGL.js.map +1 -0
- package/dist/{chunk-I3IHOHCJ.js → chunk-SHZDP2MQ.js} +1181 -1001
- package/dist/chunk-SHZDP2MQ.js.map +1 -0
- package/dist/{chunk-Y3ZLRGHC.js → chunk-SIDJO2T4.js} +16 -16
- package/dist/chunk-STXRMPW4.js +4131 -0
- package/dist/chunk-STXRMPW4.js.map +1 -0
- package/dist/{chunk-JR4IKCR2.js → chunk-TPND5MJS.js} +5 -5
- package/dist/chunk-TQPCAIQI.js +612 -0
- package/dist/chunk-TQPCAIQI.js.map +1 -0
- package/dist/chunk-UT3MHJCW.js +49 -0
- package/dist/chunk-UT3MHJCW.js.map +1 -0
- package/dist/{chunk-TEW47IVR.js → chunk-VPEFSDME.js} +2 -2
- package/dist/{chunk-SWTLEQL6.js → chunk-WQIA3GFB.js} +2 -2
- package/dist/chunk-WQIA3GFB.js.map +1 -0
- package/dist/{chunk-DJC4CHLQ.js → chunk-YDWBXXQZ.js} +5 -5
- package/dist/{chunk-6PHB5CJS.js → chunk-ZLFRB6FI.js} +2 -2
- package/dist/composition/index.cjs +1256 -1059
- package/dist/composition/index.cjs.map +1 -1
- package/dist/composition/index.d.cts +4 -4
- package/dist/composition/index.d.ts +4 -4
- package/dist/composition/index.js +7 -6
- package/dist/core/index.cjs +1218 -1021
- 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 +5 -4
- package/dist/cqrs/index.cjs.map +1 -1
- package/dist/cqrs/index.d.cts +4 -4
- package/dist/cqrs/index.d.ts +4 -4
- package/dist/cqrs/index.js +3 -2
- package/dist/cqrs/index.js.map +1 -1
- package/dist/cqrs/messaging.cjs +312 -0
- package/dist/cqrs/messaging.cjs.map +1 -0
- package/dist/cqrs/messaging.d.cts +57 -0
- package/dist/cqrs/messaging.d.ts +57 -0
- package/dist/cqrs/messaging.js +274 -0
- package/dist/cqrs/messaging.js.map +1 -0
- package/dist/cqrs/work-queue.cjs +329 -0
- package/dist/cqrs/work-queue.cjs.map +1 -0
- package/dist/cqrs/work-queue.d.cts +90 -0
- package/dist/cqrs/work-queue.d.ts +90 -0
- package/dist/cqrs/work-queue.js +292 -0
- package/dist/cqrs/work-queue.js.map +1 -0
- package/dist/data/index.cjs +19 -0
- package/dist/data/index.cjs.map +1 -0
- package/dist/data/index.d.cts +36 -0
- package/dist/data/index.d.ts +36 -0
- package/dist/data/index.js +1 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data-structures/index.cjs +1252 -1052
- package/dist/data-structures/index.cjs.map +1 -1
- package/dist/data-structures/index.d.cts +9 -8
- package/dist/data-structures/index.d.ts +9 -8
- package/dist/data-structures/index.js +9 -7
- package/dist/{describe-BZb7AS2y.d.ts → describe-B_A5fbXH.d.ts} +1 -1
- package/dist/{describe-Ciu8SUnN.d.cts → describe-CQRrkv-Q.d.cts} +1 -1
- package/dist/executors/tool-provider-adapters.cjs +3091 -0
- package/dist/executors/tool-provider-adapters.cjs.map +1 -0
- package/dist/executors/tool-provider-adapters.d.cts +174 -0
- package/dist/executors/tool-provider-adapters.d.ts +174 -0
- package/dist/executors/tool-provider-adapters.js +1336 -0
- package/dist/executors/tool-provider-adapters.js.map +1 -0
- package/dist/executors/tool-provider-runtime.cjs +5178 -0
- package/dist/executors/tool-provider-runtime.cjs.map +1 -0
- package/dist/executors/tool-provider-runtime.d.cts +17 -0
- package/dist/executors/tool-provider-runtime.d.ts +17 -0
- package/dist/executors/tool-provider-runtime.js +15 -0
- package/dist/executors/tool-provider-runtime.js.map +1 -0
- package/dist/executors/tool-provider.cjs +6392 -0
- package/dist/executors/tool-provider.cjs.map +1 -0
- package/dist/executors/tool-provider.d.cts +60 -0
- package/dist/executors/tool-provider.d.ts +60 -0
- package/dist/executors/tool-provider.js +89 -0
- package/dist/executors/tool-provider.js.map +1 -0
- package/dist/executors/work-queue.cjs +342 -0
- package/dist/executors/work-queue.cjs.map +1 -0
- package/dist/executors/work-queue.d.cts +90 -0
- package/dist/executors/work-queue.d.ts +90 -0
- package/dist/executors/work-queue.js +306 -0
- package/dist/executors/work-queue.js.map +1 -0
- package/dist/graph/index.cjs +1536 -1324
- package/dist/graph/index.cjs.map +1 -1
- package/dist/graph/index.d.cts +10 -9
- package/dist/graph/index.d.ts +10 -9
- package/dist/graph/index.js +22 -20
- package/dist/{graph-s23RbbFO.d.cts → graph-CWK3HLPB.d.cts} +134 -132
- package/dist/{graph-DfdF9zy4.d.ts → graph-ho5sotHP.d.ts} +134 -132
- package/dist/{index-SnzZu3x7.d.ts → index-CQWcE0Dw.d.ts} +18 -4
- package/dist/{index-CAEmLCYF.d.cts → index-DHA1i67c.d.cts} +18 -4
- package/dist/index.cjs +3331 -3020
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -10
- package/dist/index.d.ts +14 -10
- package/dist/index.js +114 -108
- package/dist/inspection/boundary.cjs +98 -0
- package/dist/inspection/boundary.cjs.map +1 -0
- package/dist/inspection/boundary.d.cts +61 -0
- package/dist/inspection/boundary.d.ts +61 -0
- package/dist/inspection/boundary.js +75 -0
- package/dist/inspection/boundary.js.map +1 -0
- package/dist/measurements-C0mAvWU1.d.cts +164 -0
- package/dist/measurements-OMpCeBwh.d.ts +164 -0
- package/dist/{messages-BZqrGGm1.d.ts → messages-CAzUPPJM.d.cts} +10 -5
- package/dist/{messages-BZqrGGm1.d.cts → messages-CAzUPPJM.d.ts} +10 -5
- package/dist/messaging/index.cjs +756 -619
- package/dist/messaging/index.cjs.map +1 -1
- package/dist/messaging/index.d.cts +17 -226
- package/dist/messaging/index.d.ts +17 -226
- package/dist/messaging/index.js +19 -749
- package/dist/messaging/index.js.map +1 -1
- package/dist/operators/index.cjs +1256 -1059
- package/dist/operators/index.cjs.map +1 -1
- package/dist/operators/index.d.cts +6 -6
- package/dist/operators/index.d.ts +6 -6
- package/dist/operators/index.js +9 -8
- package/dist/orchestration/index.cjs +8664 -2617
- package/dist/orchestration/index.cjs.map +1 -1
- package/dist/orchestration/index.d.cts +171 -221
- package/dist/orchestration/index.d.ts +171 -221
- package/dist/orchestration/index.js +74 -982
- package/dist/orchestration/index.js.map +1 -1
- package/dist/orchestration/messaging.cjs +314 -0
- package/dist/orchestration/messaging.cjs.map +1 -0
- package/dist/orchestration/messaging.d.cts +56 -0
- package/dist/orchestration/messaging.d.ts +56 -0
- package/dist/orchestration/messaging.js +276 -0
- package/dist/orchestration/messaging.js.map +1 -0
- package/dist/orchestration/work-queue.cjs +1500 -0
- package/dist/orchestration/work-queue.cjs.map +1 -0
- package/dist/orchestration/work-queue.d.cts +196 -0
- package/dist/orchestration/work-queue.d.ts +196 -0
- package/dist/orchestration/work-queue.js +1289 -0
- package/dist/orchestration/work-queue.js.map +1 -0
- package/dist/patterns/event-flow.cjs +433 -0
- package/dist/patterns/event-flow.cjs.map +1 -0
- package/dist/patterns/event-flow.d.cts +115 -0
- package/dist/patterns/event-flow.d.ts +115 -0
- package/dist/patterns/event-flow.js +14 -0
- package/dist/patterns/event-flow.js.map +1 -0
- package/dist/patterns/index.cjs +748 -355
- package/dist/patterns/index.cjs.map +1 -1
- package/dist/patterns/index.d.cts +9 -5
- package/dist/patterns/index.d.ts +9 -5
- package/dist/patterns/index.js +13 -4
- package/dist/process-types-C9uMYz3i.d.ts +200 -0
- package/dist/process-types-h3uRlzDc.d.cts +200 -0
- package/dist/{reactive-collection-BxBqtIOE.d.cts → reactive-collection-B9R0Bl1P.d.cts} +11 -41
- package/dist/{reactive-collection-Cb1II1Fi.d.ts → reactive-collection-BXFrH0U2.d.ts} +11 -41
- package/dist/{reactive-collection-storage-D-KmjE0J.d.cts → reactive-collection-storage-BLGv8Xp8.d.cts} +5 -5
- package/dist/{reactive-collection-storage-BNiEc-Gd.d.ts → reactive-collection-storage-a4zD3665.d.ts} +5 -5
- package/dist/{reactive-map-BcB4KsQR.d.ts → reactive-map-C_8sOfdS.d.cts} +7 -6
- package/dist/{reactive-map-D-g3dv8I.d.cts → reactive-map-jle5dnok.d.ts} +7 -6
- package/dist/render/index.d.cts +3 -3
- package/dist/render/index.d.ts +3 -3
- package/dist/render/index.js +1 -0
- package/dist/scheduled-readiness-5rwQlyjV.d.ts +91 -0
- package/dist/scheduled-readiness-DpRY8jI0.d.cts +91 -0
- package/dist/semantic-memory-graph-C2ZUwIlq.d.ts +30 -0
- package/dist/semantic-memory-graph-DlZBD_Eu.d.cts +30 -0
- package/dist/{semantic-memory-graph-BYoIlP35.d.cts → semantic-memory-graph-types-BvzdqmkY.d.cts} +2 -28
- package/dist/{semantic-memory-graph-CxyXLms3.d.ts → semantic-memory-graph-types-Ci-OtahO.d.ts} +2 -28
- package/dist/solutions/index.cjs +6788 -2128
- package/dist/solutions/index.cjs.map +1 -1
- package/dist/solutions/index.d.cts +15 -519
- package/dist/solutions/index.d.ts +15 -519
- package/dist/solutions/index.js +91 -7
- package/dist/solutions/reactive-layout/browser/index.cjs +457 -0
- package/dist/solutions/reactive-layout/browser/index.cjs.map +1 -0
- package/dist/solutions/reactive-layout/browser/index.d.cts +44 -0
- package/dist/solutions/reactive-layout/browser/index.d.ts +44 -0
- package/dist/solutions/reactive-layout/browser/index.js +69 -0
- package/dist/solutions/reactive-layout/browser/index.js.map +1 -0
- package/dist/solutions/reactive-layout/index.cjs +4494 -0
- package/dist/solutions/reactive-layout/index.cjs.map +1 -0
- package/dist/solutions/reactive-layout/index.d.cts +37 -0
- package/dist/solutions/reactive-layout/index.d.ts +37 -0
- package/dist/solutions/reactive-layout/index.js +146 -0
- package/dist/solutions/reactive-layout/index.js.map +1 -0
- package/dist/solutions/reactive-layout/node-canvas/index.cjs +555 -0
- package/dist/solutions/reactive-layout/node-canvas/index.cjs.map +1 -0
- package/dist/solutions/reactive-layout/node-canvas/index.d.cts +54 -0
- package/dist/solutions/reactive-layout/node-canvas/index.d.ts +54 -0
- package/dist/solutions/reactive-layout/node-canvas/index.js +131 -0
- package/dist/solutions/reactive-layout/node-canvas/index.js.map +1 -0
- package/dist/solutions/reactive-layout/react-native/index.cjs +504 -0
- package/dist/solutions/reactive-layout/react-native/index.cjs.map +1 -0
- package/dist/solutions/reactive-layout/react-native/index.d.cts +51 -0
- package/dist/solutions/reactive-layout/react-native/index.d.ts +51 -0
- package/dist/solutions/reactive-layout/react-native/index.js +77 -0
- package/dist/solutions/reactive-layout/react-native/index.js.map +1 -0
- package/dist/solutions/reactive-layout/skia/index.cjs +557 -0
- package/dist/solutions/reactive-layout/skia/index.cjs.map +1 -0
- package/dist/solutions/reactive-layout/skia/index.d.cts +64 -0
- package/dist/solutions/reactive-layout/skia/index.d.ts +64 -0
- package/dist/solutions/reactive-layout/skia/index.js +70 -0
- package/dist/solutions/reactive-layout/skia/index.js.map +1 -0
- package/dist/solutions/work-item/actions.cjs +2345 -0
- package/dist/solutions/work-item/actions.cjs.map +1 -0
- package/dist/solutions/work-item/actions.d.cts +40 -0
- package/dist/solutions/work-item/actions.d.ts +40 -0
- package/dist/solutions/work-item/actions.js +2078 -0
- package/dist/solutions/work-item/actions.js.map +1 -0
- package/dist/solutions/work-item/scheduling.cjs +9797 -0
- package/dist/solutions/work-item/scheduling.cjs.map +1 -0
- package/dist/solutions/work-item/scheduling.d.cts +1868 -0
- package/dist/solutions/work-item/scheduling.d.ts +1868 -0
- package/dist/solutions/work-item/scheduling.js +146 -0
- package/dist/solutions/work-item/scheduling.js.map +1 -0
- package/dist/solutions/work-item/work-queue.cjs +306 -0
- package/dist/solutions/work-item/work-queue.cjs.map +1 -0
- package/dist/solutions/work-item/work-queue.d.cts +71 -0
- package/dist/solutions/work-item/work-queue.d.ts +71 -0
- package/dist/solutions/work-item/work-queue.js +270 -0
- package/dist/solutions/work-item/work-queue.js.map +1 -0
- package/dist/sources/browser.cjs +1399 -1052
- package/dist/sources/browser.cjs.map +1 -1
- package/dist/sources/browser.d.cts +33 -6
- package/dist/sources/browser.d.ts +33 -6
- package/dist/sources/browser.js +73 -6
- package/dist/sources/browser.js.map +1 -1
- package/dist/sources/index.cjs +1345 -1065
- package/dist/sources/index.cjs.map +1 -1
- package/dist/sources/index.d.cts +5 -5
- package/dist/sources/index.d.ts +5 -5
- package/dist/sources/index.js +7 -6
- package/dist/sources/node.cjs.map +1 -1
- package/dist/sources/node.d.cts +4 -4
- package/dist/sources/node.d.ts +4 -4
- package/dist/sources/node.js +2 -1
- package/dist/sources/node.js.map +1 -1
- package/dist/storage/browser.cjs +16 -0
- package/dist/storage/browser.cjs.map +1 -1
- package/dist/storage/browser.js +4 -3
- package/dist/storage/browser.js.map +1 -1
- package/dist/storage/index.cjs +16 -0
- package/dist/storage/index.cjs.map +1 -1
- package/dist/storage/index.d.cts +6 -5
- package/dist/storage/index.d.ts +6 -5
- package/dist/storage/index.js +10 -9
- package/dist/storage/node.cjs +16 -0
- package/dist/storage/node.cjs.map +1 -1
- package/dist/storage/node.js +4 -3
- package/dist/storage/node.js.map +1 -1
- package/dist/store-BmtEs9mG.d.ts +123 -0
- package/dist/store-PAAsYvML.d.cts +123 -0
- package/dist/testing/index.cjs +1 -0
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +3 -2
- package/dist/types-BRNKoFHj.d.ts +357 -0
- package/dist/{types-h12mNYbq.d.ts → types-BS6CyR-x.d.cts} +49 -130
- package/dist/types-BWK2ay3e.d.cts +457 -0
- package/dist/types-BXKSAoE1.d.cts +357 -0
- package/dist/types-BaPpZItj.d.ts +457 -0
- package/dist/types-BhveCMg5.d.cts +274 -0
- package/dist/{types-bNMSWKqF.d.cts → types-C9NOgNJw.d.ts} +49 -130
- package/dist/types-CTsQ8Ww4.d.ts +274 -0
- package/dist/types-DL_05n2M.d.ts +34 -0
- package/dist/types-XDoqxYO9.d.cts +34 -0
- package/dist/work-item-runtime-types-BqtWnSCS.d.ts +138 -0
- package/dist/work-item-runtime-types-CHO03AKh.d.cts +138 -0
- package/dist/work-queue/index.cjs +1136 -0
- package/dist/work-queue/index.cjs.map +1 -0
- package/dist/work-queue/index.d.cts +21 -0
- package/dist/work-queue/index.d.ts +21 -0
- package/dist/work-queue/index.js +1082 -0
- package/dist/work-queue/index.js.map +1 -0
- package/package.json +603 -249
- package/dist/chunk-2ILL7HQI.js.map +0 -1
- package/dist/chunk-4VLAQHZI.js.map +0 -1
- package/dist/chunk-COHO25CZ.js.map +0 -1
- package/dist/chunk-DK554R7P.js.map +0 -1
- package/dist/chunk-G4M3NHRJ.js.map +0 -1
- package/dist/chunk-I3IHOHCJ.js.map +0 -1
- package/dist/chunk-JIMUDQN3.js.map +0 -1
- package/dist/chunk-RIIOUTGM.js.map +0 -1
- package/dist/chunk-SWTLEQL6.js.map +0 -1
- /package/dist/{chunk-GDL26N2T.js.map → chunk-3KN7NJDR.js.map} +0 -0
- /package/dist/{chunk-Z2ANQ6JW.js.map → chunk-4Q77MMJY.js.map} +0 -0
- /package/dist/{chunk-D6BG7U6A.js.map → chunk-7HZRJMN6.js.map} +0 -0
- /package/dist/{chunk-SCRFRCGR.js.map → chunk-BSQGE5PS.js.map} +0 -0
- /package/dist/{chunk-PKVBHGBM.js.map → chunk-CJIFGJQG.js.map} +0 -0
- /package/dist/{chunk-K3FXTC3I.js.map → chunk-HJACH5PU.js.map} +0 -0
- /package/dist/{chunk-GTPCOEOZ.js.map → chunk-IDMLXLLG.js.map} +0 -0
- /package/dist/{chunk-DKP56CSW.js.map → chunk-JKAYLDQV.js.map} +0 -0
- /package/dist/{chunk-Y3ZLRGHC.js.map → chunk-SIDJO2T4.js.map} +0 -0
- /package/dist/{chunk-JR4IKCR2.js.map → chunk-TPND5MJS.js.map} +0 -0
- /package/dist/{chunk-TEW47IVR.js.map → chunk-VPEFSDME.js.map} +0 -0
- /package/dist/{chunk-DJC4CHLQ.js.map → chunk-YDWBXXQZ.js.map} +0 -0
- /package/dist/{chunk-6PHB5CJS.js.map → chunk-ZLFRB6FI.js.map} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { L as Operator } from '../graph-
|
|
2
|
-
export { c as DriverResult, g as HttpRequest, h as HttpResponse, y as SseDriverEvent, z as SseEvent, A as SseRequest, I as WebSocketDriverEvent, J as WebSocketEvent, M as WebSocketRequest, V as WebhookDriverEvent, X as WebhookEvent, Y as WebhookRegistration } from '../types-
|
|
3
|
-
export { A as AsyncSourceOpts, C as CronSchedule, E as EventListenerOptionsLike, a as EventTargetLike, F as FromCronOptions, b as FromEventOptions, N as NodeInput, P as PushRegister, c as PushUnsubscribe, S as SingleFromAnyOptions, T as TimerSourceOpts, e as empty, f as firstValueFrom, d as fromAny, g as fromAsyncIter, h as fromCron, i as fromEvent, j as fromHttp, k as fromHttpWithOptions, l as fromIter, n as fromPromise, o as fromPushNotification, p as fromSSE, q as fromSSEWithOptions, r as fromTimer, s as fromWebSocket, t as fromWebSocketWithOptions, u as fromWebhook, v as fromWebhookWithOptions, w as interval, x as matchesCron, y as never, z as of, B as parseCron, H as singleFromAny, I as throwError, J as timer } from '../index-
|
|
1
|
+
import { L as Operator } from '../graph-CWK3HLPB.cjs';
|
|
2
|
+
export { c as DriverResult, g as HttpRequest, h as HttpResponse, y as SseDriverEvent, z as SseEvent, A as SseRequest, I as WebSocketDriverEvent, J as WebSocketEvent, M as WebSocketRequest, V as WebhookDriverEvent, X as WebhookEvent, Y as WebhookRegistration } from '../types-BS6CyR-x.cjs';
|
|
3
|
+
export { A as AsyncSourceOpts, C as CronSchedule, E as EventListenerOptionsLike, a as EventTargetLike, F as FromCronOptions, b as FromEventOptions, N as NodeInput, P as PushRegister, c as PushUnsubscribe, S as SingleFromAnyOptions, T as TimerSourceOpts, e as empty, f as firstValueFrom, d as fromAny, g as fromAsyncIter, h as fromCron, i as fromEvent, j as fromHttp, k as fromHttpWithOptions, l as fromIter, n as fromPromise, o as fromPushNotification, p as fromSSE, q as fromSSEWithOptions, r as fromTimer, s as fromWebSocket, t as fromWebSocketWithOptions, u as fromWebhook, v as fromWebhookWithOptions, w as interval, x as matchesCron, y as never, z as of, B as parseCron, H as singleFromAny, I as throwError, J as timer } from '../index-DHA1i67c.cjs';
|
|
4
4
|
import '../core/index.cjs';
|
|
5
|
-
import '../messages-
|
|
5
|
+
import '../messages-CAzUPPJM.cjs';
|
|
6
6
|
import '../codec-BB7p8fJc.cjs';
|
|
7
|
-
import '../describe-
|
|
7
|
+
import '../describe-CQRrkv-Q.cjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Browser-safe source factories. This subpath intentionally excludes
|
|
@@ -26,6 +26,33 @@ interface IDBTransactionLike {
|
|
|
26
26
|
onerror: null | IDBEventHandler<IDBTransactionLike>;
|
|
27
27
|
onabort: null | IDBEventHandler<IDBTransactionLike>;
|
|
28
28
|
}
|
|
29
|
+
type AnimationFrameHandle = number | ReturnType<typeof setTimeout>;
|
|
30
|
+
interface AnimationFrameScheduler {
|
|
31
|
+
requestAnimationFrame(callback: (time: number) => void): AnimationFrameHandle;
|
|
32
|
+
cancelAnimationFrame(handle: AnimationFrameHandle): void;
|
|
33
|
+
}
|
|
34
|
+
interface VisibilityDocumentLike {
|
|
35
|
+
readonly visibilityState?: "hidden" | "visible" | "prerender" | string;
|
|
36
|
+
addEventListener?(type: "visibilitychange", listener: () => void): void;
|
|
37
|
+
removeEventListener?(type: "visibilitychange", listener: () => void): void;
|
|
38
|
+
}
|
|
39
|
+
interface FromRafOptions {
|
|
40
|
+
/** Custom scheduler for tests or host wrappers. Defaults to browser rAF, then a timer fallback. */
|
|
41
|
+
readonly scheduler?: AnimationFrameScheduler;
|
|
42
|
+
/** Timer fallback cadence when requestAnimationFrame is unavailable. Default: 16ms. */
|
|
43
|
+
readonly fallbackMs?: number;
|
|
44
|
+
/** Fully park while the provided/browser document is hidden. Default: false. */
|
|
45
|
+
readonly pauseWhenHidden?: boolean;
|
|
46
|
+
/** Document-like visibility source for tests or embedded browser hosts. */
|
|
47
|
+
readonly document?: VisibilityDocumentLike;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Browser animation-frame source.
|
|
51
|
+
*
|
|
52
|
+
* This is a browser/source boundary, not reactive-layout ownership (D181): every frame timestamp
|
|
53
|
+
* enters the graph as DATA through `ctx.down`, and teardown cancels the pending host callback.
|
|
54
|
+
*/
|
|
55
|
+
declare function fromRaf(opts?: FromRafOptions): Operator<never, number>;
|
|
29
56
|
/** Wrap an IndexedDB request as a one-shot source. */
|
|
30
57
|
declare function fromIDBRequest<T>(request: IDBRequestLike<T>): Operator<never, T>;
|
|
31
58
|
/**
|
|
@@ -36,4 +63,4 @@ declare function fromIDBRequest<T>(request: IDBRequestLike<T>): Operator<never,
|
|
|
36
63
|
*/
|
|
37
64
|
declare function fromIDBTransaction(transaction: IDBTransactionLike): Operator<never, never>;
|
|
38
65
|
|
|
39
|
-
export { type IDBRequestLike, type IDBTransactionLike, fromIDBRequest, fromIDBTransaction };
|
|
66
|
+
export { type AnimationFrameHandle, type AnimationFrameScheduler, type FromRafOptions, type IDBRequestLike, type IDBTransactionLike, type VisibilityDocumentLike, fromIDBRequest, fromIDBTransaction, fromRaf };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { L as Operator } from '../graph-
|
|
2
|
-
export { c as DriverResult, g as HttpRequest, h as HttpResponse, y as SseDriverEvent, z as SseEvent, A as SseRequest, I as WebSocketDriverEvent, J as WebSocketEvent, M as WebSocketRequest, V as WebhookDriverEvent, X as WebhookEvent, Y as WebhookRegistration } from '../types-
|
|
3
|
-
export { A as AsyncSourceOpts, C as CronSchedule, E as EventListenerOptionsLike, a as EventTargetLike, F as FromCronOptions, b as FromEventOptions, N as NodeInput, P as PushRegister, c as PushUnsubscribe, S as SingleFromAnyOptions, T as TimerSourceOpts, e as empty, f as firstValueFrom, d as fromAny, g as fromAsyncIter, h as fromCron, i as fromEvent, j as fromHttp, k as fromHttpWithOptions, l as fromIter, n as fromPromise, o as fromPushNotification, p as fromSSE, q as fromSSEWithOptions, r as fromTimer, s as fromWebSocket, t as fromWebSocketWithOptions, u as fromWebhook, v as fromWebhookWithOptions, w as interval, x as matchesCron, y as never, z as of, B as parseCron, H as singleFromAny, I as throwError, J as timer } from '../index-
|
|
1
|
+
import { L as Operator } from '../graph-ho5sotHP.js';
|
|
2
|
+
export { c as DriverResult, g as HttpRequest, h as HttpResponse, y as SseDriverEvent, z as SseEvent, A as SseRequest, I as WebSocketDriverEvent, J as WebSocketEvent, M as WebSocketRequest, V as WebhookDriverEvent, X as WebhookEvent, Y as WebhookRegistration } from '../types-C9NOgNJw.js';
|
|
3
|
+
export { A as AsyncSourceOpts, C as CronSchedule, E as EventListenerOptionsLike, a as EventTargetLike, F as FromCronOptions, b as FromEventOptions, N as NodeInput, P as PushRegister, c as PushUnsubscribe, S as SingleFromAnyOptions, T as TimerSourceOpts, e as empty, f as firstValueFrom, d as fromAny, g as fromAsyncIter, h as fromCron, i as fromEvent, j as fromHttp, k as fromHttpWithOptions, l as fromIter, n as fromPromise, o as fromPushNotification, p as fromSSE, q as fromSSEWithOptions, r as fromTimer, s as fromWebSocket, t as fromWebSocketWithOptions, u as fromWebhook, v as fromWebhookWithOptions, w as interval, x as matchesCron, y as never, z as of, B as parseCron, H as singleFromAny, I as throwError, J as timer } from '../index-CQWcE0Dw.js';
|
|
4
4
|
import '../core/index.js';
|
|
5
|
-
import '../messages-
|
|
5
|
+
import '../messages-CAzUPPJM.js';
|
|
6
6
|
import '../codec-BB7p8fJc.js';
|
|
7
|
-
import '../describe-
|
|
7
|
+
import '../describe-B_A5fbXH.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Browser-safe source factories. This subpath intentionally excludes
|
|
@@ -26,6 +26,33 @@ interface IDBTransactionLike {
|
|
|
26
26
|
onerror: null | IDBEventHandler<IDBTransactionLike>;
|
|
27
27
|
onabort: null | IDBEventHandler<IDBTransactionLike>;
|
|
28
28
|
}
|
|
29
|
+
type AnimationFrameHandle = number | ReturnType<typeof setTimeout>;
|
|
30
|
+
interface AnimationFrameScheduler {
|
|
31
|
+
requestAnimationFrame(callback: (time: number) => void): AnimationFrameHandle;
|
|
32
|
+
cancelAnimationFrame(handle: AnimationFrameHandle): void;
|
|
33
|
+
}
|
|
34
|
+
interface VisibilityDocumentLike {
|
|
35
|
+
readonly visibilityState?: "hidden" | "visible" | "prerender" | string;
|
|
36
|
+
addEventListener?(type: "visibilitychange", listener: () => void): void;
|
|
37
|
+
removeEventListener?(type: "visibilitychange", listener: () => void): void;
|
|
38
|
+
}
|
|
39
|
+
interface FromRafOptions {
|
|
40
|
+
/** Custom scheduler for tests or host wrappers. Defaults to browser rAF, then a timer fallback. */
|
|
41
|
+
readonly scheduler?: AnimationFrameScheduler;
|
|
42
|
+
/** Timer fallback cadence when requestAnimationFrame is unavailable. Default: 16ms. */
|
|
43
|
+
readonly fallbackMs?: number;
|
|
44
|
+
/** Fully park while the provided/browser document is hidden. Default: false. */
|
|
45
|
+
readonly pauseWhenHidden?: boolean;
|
|
46
|
+
/** Document-like visibility source for tests or embedded browser hosts. */
|
|
47
|
+
readonly document?: VisibilityDocumentLike;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Browser animation-frame source.
|
|
51
|
+
*
|
|
52
|
+
* This is a browser/source boundary, not reactive-layout ownership (D181): every frame timestamp
|
|
53
|
+
* enters the graph as DATA through `ctx.down`, and teardown cancels the pending host callback.
|
|
54
|
+
*/
|
|
55
|
+
declare function fromRaf(opts?: FromRafOptions): Operator<never, number>;
|
|
29
56
|
/** Wrap an IndexedDB request as a one-shot source. */
|
|
30
57
|
declare function fromIDBRequest<T>(request: IDBRequestLike<T>): Operator<never, T>;
|
|
31
58
|
/**
|
|
@@ -36,4 +63,4 @@ declare function fromIDBRequest<T>(request: IDBRequestLike<T>): Operator<never,
|
|
|
36
63
|
*/
|
|
37
64
|
declare function fromIDBTransaction(transaction: IDBTransactionLike): Operator<never, never>;
|
|
38
65
|
|
|
39
|
-
export { type IDBRequestLike, type IDBTransactionLike, fromIDBRequest, fromIDBTransaction };
|
|
66
|
+
export { type AnimationFrameHandle, type AnimationFrameScheduler, type FromRafOptions, type IDBRequestLike, type IDBTransactionLike, type VisibilityDocumentLike, fromIDBRequest, fromIDBTransaction, fromRaf };
|
package/dist/sources/browser.js
CHANGED
|
@@ -26,14 +26,15 @@ import {
|
|
|
26
26
|
singleFromAny,
|
|
27
27
|
throwError,
|
|
28
28
|
timer
|
|
29
|
-
} from "../chunk-
|
|
30
|
-
import "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-SWTLEQL6.js";
|
|
29
|
+
} from "../chunk-CX6B6PO2.js";
|
|
30
|
+
import "../chunk-CJIFGJQG.js";
|
|
31
|
+
import "../chunk-SHZDP2MQ.js";
|
|
32
|
+
import "../chunk-WQIA3GFB.js";
|
|
34
33
|
import {
|
|
35
34
|
errorPayload
|
|
36
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-S6HXABGL.js";
|
|
36
|
+
import "../chunk-K7FB3JTD.js";
|
|
37
|
+
import "../chunk-DGUM43GV.js";
|
|
37
38
|
|
|
38
39
|
// src/sources/browser.ts
|
|
39
40
|
function source(factory, setup) {
|
|
@@ -45,6 +46,71 @@ function source(factory, setup) {
|
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
48
|
}
|
|
49
|
+
function defaultAnimationFrameScheduler(fallbackMs) {
|
|
50
|
+
const host = globalThis;
|
|
51
|
+
if (typeof host.requestAnimationFrame === "function" && typeof host.cancelAnimationFrame === "function") {
|
|
52
|
+
return {
|
|
53
|
+
requestAnimationFrame: (callback) => host.requestAnimationFrame?.(callback) ?? 0,
|
|
54
|
+
cancelAnimationFrame: (handle) => {
|
|
55
|
+
if (typeof handle === "number") host.cancelAnimationFrame?.(handle);
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
requestAnimationFrame(callback) {
|
|
61
|
+
return setTimeout(() => callback(Date.now()), fallbackMs);
|
|
62
|
+
},
|
|
63
|
+
cancelAnimationFrame(handle) {
|
|
64
|
+
clearTimeout(handle);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function defaultVisibilityDocument() {
|
|
69
|
+
return globalThis.document;
|
|
70
|
+
}
|
|
71
|
+
function fromRaf(opts = {}) {
|
|
72
|
+
const fallbackMsOpt = opts.fallbackMs;
|
|
73
|
+
const fallbackMs = Number.isFinite(fallbackMsOpt) && fallbackMsOpt !== void 0 && fallbackMsOpt > 0 ? fallbackMsOpt : 16;
|
|
74
|
+
const scheduler = opts.scheduler ?? defaultAnimationFrameScheduler(fallbackMs);
|
|
75
|
+
const visibilityDocument = opts.document ?? defaultVisibilityDocument();
|
|
76
|
+
return {
|
|
77
|
+
factory: "fromRaf",
|
|
78
|
+
opts: { pool: "sync", pausable: false },
|
|
79
|
+
body: (ctx) => {
|
|
80
|
+
let active = true;
|
|
81
|
+
let frame;
|
|
82
|
+
const cancelPending = () => {
|
|
83
|
+
if (frame === void 0) return;
|
|
84
|
+
scheduler.cancelAnimationFrame(frame);
|
|
85
|
+
frame = void 0;
|
|
86
|
+
};
|
|
87
|
+
const isHidden = () => opts.pauseWhenHidden === true && visibilityDocument?.visibilityState === "hidden";
|
|
88
|
+
const schedule = () => {
|
|
89
|
+
if (!active || frame !== void 0 || isHidden()) return;
|
|
90
|
+
frame = scheduler.requestAnimationFrame((time) => {
|
|
91
|
+
frame = void 0;
|
|
92
|
+
if (!active || isHidden()) return;
|
|
93
|
+
ctx.down([["DATA", Number.isFinite(time) ? time : Date.now()]]);
|
|
94
|
+
schedule();
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
const onVisibilityChange = () => {
|
|
98
|
+
if (!active) return;
|
|
99
|
+
if (isHidden()) cancelPending();
|
|
100
|
+
else schedule();
|
|
101
|
+
};
|
|
102
|
+
if (opts.pauseWhenHidden === true && visibilityDocument?.addEventListener && visibilityDocument.removeEventListener) {
|
|
103
|
+
visibilityDocument.addEventListener("visibilitychange", onVisibilityChange);
|
|
104
|
+
}
|
|
105
|
+
ctx.onDeactivation(() => {
|
|
106
|
+
active = false;
|
|
107
|
+
cancelPending();
|
|
108
|
+
visibilityDocument?.removeEventListener?.("visibilitychange", onVisibilityChange);
|
|
109
|
+
});
|
|
110
|
+
schedule();
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
}
|
|
48
114
|
function fromIDBRequest(request) {
|
|
49
115
|
return source("fromIDBRequest", (ctx) => {
|
|
50
116
|
let done = false;
|
|
@@ -118,6 +184,7 @@ export {
|
|
|
118
184
|
fromIter,
|
|
119
185
|
fromPromise,
|
|
120
186
|
fromPushNotification,
|
|
187
|
+
fromRaf,
|
|
121
188
|
fromSSE,
|
|
122
189
|
fromSSEWithOptions,
|
|
123
190
|
fromTimer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/sources/browser.ts"],"sourcesContent":["/**\n * Browser-safe source factories. This subpath intentionally excludes\n * Node-only adapters such as fromFSWatch.\n */\n\nimport type { Ctx } from \"../ctx/types.js\";\nimport type { Operator } from \"../graph/operators.js\";\nimport { errorPayload } from \"../protocol/messages.js\";\n\nexport * from \"./index.js\";\n\ntype IDBEventHandler<TThis> = {\n\tbivarianceHack(this: TThis, event: unknown): unknown;\n}[\"bivarianceHack\"];\n\nexport interface IDBRequestLike<T> {\n\tresult: T;\n\terror?: unknown;\n\tonsuccess: null | IDBEventHandler<IDBRequestLike<T>>;\n\tonerror: null | IDBEventHandler<IDBRequestLike<T>>;\n}\n\nexport interface IDBTransactionLike {\n\terror?: unknown;\n\toncomplete: null | IDBEventHandler<IDBTransactionLike>;\n\tonerror: null | IDBEventHandler<IDBTransactionLike>;\n\tonabort: null | IDBEventHandler<IDBTransactionLike>;\n}\n\nfunction source<T>(\n\tfactory: string,\n\tsetup: (ctx: Ctx) => undefined | (() => void),\n): Operator<never, T> {\n\treturn {\n\t\tfactory,\n\t\tbody: (ctx) => {\n\t\t\tconst cleanup = setup(ctx);\n\t\t\tif (typeof cleanup === \"function\") ctx.onDeactivation(cleanup);\n\t\t},\n\t};\n}\n\n/** Wrap an IndexedDB request as a one-shot source. */\nexport function fromIDBRequest<T>(request: IDBRequestLike<T>): Operator<never, T> {\n\treturn source<T>(\"fromIDBRequest\", (ctx) => {\n\t\tlet done = false;\n\t\tconst clear = () => {\n\t\t\trequest.onsuccess = null;\n\t\t\trequest.onerror = null;\n\t\t};\n\t\trequest.onsuccess = () => {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tclear();\n\t\t\tif (request.result === undefined) {\n\t\t\t\tctx.down([\n\t\t\t\t\t[\"ERROR\", new TypeError(\"fromIDBRequest: request.result is the substrate SENTINEL\")],\n\t\t\t\t]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tctx.down([[\"DATA\", request.result], [\"COMPLETE\"]]);\n\t\t};\n\t\trequest.onerror = () => {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tclear();\n\t\t\tctx.down([[\"ERROR\", errorPayload(request.error ?? new Error(\"IndexedDB request failed\"))]]);\n\t\t};\n\t\treturn () => {\n\t\t\tdone = true;\n\t\t\tclear();\n\t\t};\n\t});\n}\n\n/**\n * Wrap an IndexedDB transaction lifecycle as a terminal-only source.\n *\n * Success emits COMPLETE without DATA: undefined is the TypeScript SENTINEL and cannot be a DATA\n * payload under R-data-payload.\n */\nexport function fromIDBTransaction(transaction: IDBTransactionLike): Operator<never, never> {\n\treturn source<never>(\"fromIDBTransaction\", (ctx) => {\n\t\tlet done = false;\n\t\tconst clear = () => {\n\t\t\ttransaction.oncomplete = null;\n\t\t\ttransaction.onerror = null;\n\t\t\ttransaction.onabort = null;\n\t\t};\n\t\tconst fail = (fallback: string) => {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tclear();\n\t\t\tctx.down([[\"ERROR\", errorPayload(transaction.error ?? new Error(fallback))]]);\n\t\t};\n\t\ttransaction.oncomplete = () => {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tclear();\n\t\t\tctx.down([[\"COMPLETE\"]]);\n\t\t};\n\t\ttransaction.onerror = () => fail(\"IndexedDB transaction failed\");\n\t\ttransaction.onabort = () => fail(\"IndexedDB transaction aborted\");\n\t\treturn () => {\n\t\t\tdone = true;\n\t\t\tclear();\n\t\t};\n\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAS,OACR,SACA,OACqB;AACrB,SAAO;AAAA,IACN;AAAA,IACA,MAAM,CAAC,QAAQ;AACd,YAAM,UAAU,MAAM,GAAG;AACzB,UAAI,OAAO,YAAY,WAAY,KAAI,eAAe,OAAO;AAAA,IAC9D;AAAA,EACD;AACD;AAGO,SAAS,eAAkB,SAAgD;AACjF,SAAO,OAAU,kBAAkB,CAAC,QAAQ;AAC3C,QAAI,OAAO;AACX,UAAM,QAAQ,MAAM;AACnB,cAAQ,YAAY;AACpB,cAAQ,UAAU;AAAA,IACnB;AACA,YAAQ,YAAY,MAAM;AACzB,UAAI,KAAM;AACV,aAAO;AACP,YAAM;AACN,UAAI,QAAQ,WAAW,QAAW;AACjC,YAAI,KAAK;AAAA,UACR,CAAC,SAAS,IAAI,UAAU,0DAA0D,CAAC;AAAA,QACpF,CAAC;AACD;AAAA,MACD;AACA,UAAI,KAAK,CAAC,CAAC,QAAQ,QAAQ,MAAM,GAAG,CAAC,UAAU,CAAC,CAAC;AAAA,IAClD;AACA,YAAQ,UAAU,MAAM;AACvB,UAAI,KAAM;AACV,aAAO;AACP,YAAM;AACN,UAAI,KAAK,CAAC,CAAC,SAAS,aAAa,QAAQ,SAAS,IAAI,MAAM,0BAA0B,CAAC,CAAC,CAAC,CAAC;AAAA,IAC3F;AACA,WAAO,MAAM;AACZ,aAAO;AACP,YAAM;AAAA,IACP;AAAA,EACD,CAAC;AACF;AAQO,SAAS,mBAAmB,aAAyD;AAC3F,SAAO,OAAc,sBAAsB,CAAC,QAAQ;AACnD,QAAI,OAAO;AACX,UAAM,QAAQ,MAAM;AACnB,kBAAY,aAAa;AACzB,kBAAY,UAAU;AACtB,kBAAY,UAAU;AAAA,IACvB;AACA,UAAM,OAAO,CAAC,aAAqB;AAClC,UAAI,KAAM;AACV,aAAO;AACP,YAAM;AACN,UAAI,KAAK,CAAC,CAAC,SAAS,aAAa,YAAY,SAAS,IAAI,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC;AAAA,IAC7E;AACA,gBAAY,aAAa,MAAM;AAC9B,UAAI,KAAM;AACV,aAAO;AACP,YAAM;AACN,UAAI,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC;AAAA,IACxB;AACA,gBAAY,UAAU,MAAM,KAAK,8BAA8B;AAC/D,gBAAY,UAAU,MAAM,KAAK,+BAA+B;AAChE,WAAO,MAAM;AACZ,aAAO;AACP,YAAM;AAAA,IACP;AAAA,EACD,CAAC;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/sources/browser.ts"],"sourcesContent":["/**\n * Browser-safe source factories. This subpath intentionally excludes\n * Node-only adapters such as fromFSWatch.\n */\n\nimport type { Ctx } from \"../ctx/types.js\";\nimport type { Operator } from \"../graph/operators.js\";\nimport { errorPayload } from \"../protocol/messages.js\";\n\nexport * from \"./index.js\";\n\ntype IDBEventHandler<TThis> = {\n\tbivarianceHack(this: TThis, event: unknown): unknown;\n}[\"bivarianceHack\"];\n\nexport interface IDBRequestLike<T> {\n\tresult: T;\n\terror?: unknown;\n\tonsuccess: null | IDBEventHandler<IDBRequestLike<T>>;\n\tonerror: null | IDBEventHandler<IDBRequestLike<T>>;\n}\n\nexport interface IDBTransactionLike {\n\terror?: unknown;\n\toncomplete: null | IDBEventHandler<IDBTransactionLike>;\n\tonerror: null | IDBEventHandler<IDBTransactionLike>;\n\tonabort: null | IDBEventHandler<IDBTransactionLike>;\n}\n\nexport type AnimationFrameHandle = number | ReturnType<typeof setTimeout>;\n\nexport interface AnimationFrameScheduler {\n\trequestAnimationFrame(callback: (time: number) => void): AnimationFrameHandle;\n\tcancelAnimationFrame(handle: AnimationFrameHandle): void;\n}\n\nexport interface VisibilityDocumentLike {\n\treadonly visibilityState?: \"hidden\" | \"visible\" | \"prerender\" | string;\n\taddEventListener?(type: \"visibilitychange\", listener: () => void): void;\n\tremoveEventListener?(type: \"visibilitychange\", listener: () => void): void;\n}\n\nexport interface FromRafOptions {\n\t/** Custom scheduler for tests or host wrappers. Defaults to browser rAF, then a timer fallback. */\n\treadonly scheduler?: AnimationFrameScheduler;\n\t/** Timer fallback cadence when requestAnimationFrame is unavailable. Default: 16ms. */\n\treadonly fallbackMs?: number;\n\t/** Fully park while the provided/browser document is hidden. Default: false. */\n\treadonly pauseWhenHidden?: boolean;\n\t/** Document-like visibility source for tests or embedded browser hosts. */\n\treadonly document?: VisibilityDocumentLike;\n}\n\nfunction source<T>(\n\tfactory: string,\n\tsetup: (ctx: Ctx) => undefined | (() => void),\n): Operator<never, T> {\n\treturn {\n\t\tfactory,\n\t\tbody: (ctx) => {\n\t\t\tconst cleanup = setup(ctx);\n\t\t\tif (typeof cleanup === \"function\") ctx.onDeactivation(cleanup);\n\t\t},\n\t};\n}\n\nfunction defaultAnimationFrameScheduler(fallbackMs: number): AnimationFrameScheduler {\n\tconst host = globalThis as {\n\t\trequestAnimationFrame?: (callback: (time: number) => void) => number;\n\t\tcancelAnimationFrame?: (handle: number) => void;\n\t};\n\tif (\n\t\ttypeof host.requestAnimationFrame === \"function\" &&\n\t\ttypeof host.cancelAnimationFrame === \"function\"\n\t) {\n\t\treturn {\n\t\t\trequestAnimationFrame: (callback) => host.requestAnimationFrame?.(callback) ?? 0,\n\t\t\tcancelAnimationFrame: (handle) => {\n\t\t\t\tif (typeof handle === \"number\") host.cancelAnimationFrame?.(handle);\n\t\t\t},\n\t\t};\n\t}\n\treturn {\n\t\trequestAnimationFrame(callback) {\n\t\t\treturn setTimeout(() => callback(Date.now()), fallbackMs);\n\t\t},\n\t\tcancelAnimationFrame(handle) {\n\t\t\tclearTimeout(handle);\n\t\t},\n\t};\n}\n\nfunction defaultVisibilityDocument(): VisibilityDocumentLike | undefined {\n\treturn (globalThis as { document?: VisibilityDocumentLike }).document;\n}\n\n/**\n * Browser animation-frame source.\n *\n * This is a browser/source boundary, not reactive-layout ownership (D181): every frame timestamp\n * enters the graph as DATA through `ctx.down`, and teardown cancels the pending host callback.\n */\nexport function fromRaf(opts: FromRafOptions = {}): Operator<never, number> {\n\tconst fallbackMsOpt = opts.fallbackMs;\n\tconst fallbackMs =\n\t\tNumber.isFinite(fallbackMsOpt) && fallbackMsOpt !== undefined && fallbackMsOpt > 0\n\t\t\t? fallbackMsOpt\n\t\t\t: 16;\n\tconst scheduler = opts.scheduler ?? defaultAnimationFrameScheduler(fallbackMs);\n\tconst visibilityDocument = opts.document ?? defaultVisibilityDocument();\n\treturn {\n\t\tfactory: \"fromRaf\",\n\t\topts: { pool: \"sync\", pausable: false },\n\t\tbody: (ctx) => {\n\t\t\tlet active = true;\n\t\t\tlet frame: AnimationFrameHandle | undefined;\n\t\t\tconst cancelPending = () => {\n\t\t\t\tif (frame === undefined) return;\n\t\t\t\tscheduler.cancelAnimationFrame(frame);\n\t\t\t\tframe = undefined;\n\t\t\t};\n\t\t\tconst isHidden = () =>\n\t\t\t\topts.pauseWhenHidden === true && visibilityDocument?.visibilityState === \"hidden\";\n\t\t\tconst schedule = () => {\n\t\t\t\tif (!active || frame !== undefined || isHidden()) return;\n\t\t\t\tframe = scheduler.requestAnimationFrame((time) => {\n\t\t\t\t\tframe = undefined;\n\t\t\t\t\tif (!active || isHidden()) return;\n\t\t\t\t\tctx.down([[\"DATA\", Number.isFinite(time) ? time : Date.now()]]);\n\t\t\t\t\tschedule();\n\t\t\t\t});\n\t\t\t};\n\t\t\tconst onVisibilityChange = () => {\n\t\t\t\tif (!active) return;\n\t\t\t\tif (isHidden()) cancelPending();\n\t\t\t\telse schedule();\n\t\t\t};\n\t\t\tif (\n\t\t\t\topts.pauseWhenHidden === true &&\n\t\t\t\tvisibilityDocument?.addEventListener &&\n\t\t\t\tvisibilityDocument.removeEventListener\n\t\t\t) {\n\t\t\t\tvisibilityDocument.addEventListener(\"visibilitychange\", onVisibilityChange);\n\t\t\t}\n\t\t\tctx.onDeactivation(() => {\n\t\t\t\tactive = false;\n\t\t\t\tcancelPending();\n\t\t\t\tvisibilityDocument?.removeEventListener?.(\"visibilitychange\", onVisibilityChange);\n\t\t\t});\n\t\t\tschedule();\n\t\t},\n\t};\n}\n\n/** Wrap an IndexedDB request as a one-shot source. */\nexport function fromIDBRequest<T>(request: IDBRequestLike<T>): Operator<never, T> {\n\treturn source<T>(\"fromIDBRequest\", (ctx) => {\n\t\tlet done = false;\n\t\tconst clear = () => {\n\t\t\trequest.onsuccess = null;\n\t\t\trequest.onerror = null;\n\t\t};\n\t\trequest.onsuccess = () => {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tclear();\n\t\t\tif (request.result === undefined) {\n\t\t\t\tctx.down([\n\t\t\t\t\t[\"ERROR\", new TypeError(\"fromIDBRequest: request.result is the substrate SENTINEL\")],\n\t\t\t\t]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tctx.down([[\"DATA\", request.result], [\"COMPLETE\"]]);\n\t\t};\n\t\trequest.onerror = () => {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tclear();\n\t\t\tctx.down([[\"ERROR\", errorPayload(request.error ?? new Error(\"IndexedDB request failed\"))]]);\n\t\t};\n\t\treturn () => {\n\t\t\tdone = true;\n\t\t\tclear();\n\t\t};\n\t});\n}\n\n/**\n * Wrap an IndexedDB transaction lifecycle as a terminal-only source.\n *\n * Success emits COMPLETE without DATA: undefined is the TypeScript SENTINEL and cannot be a DATA\n * payload under R-data-payload.\n */\nexport function fromIDBTransaction(transaction: IDBTransactionLike): Operator<never, never> {\n\treturn source<never>(\"fromIDBTransaction\", (ctx) => {\n\t\tlet done = false;\n\t\tconst clear = () => {\n\t\t\ttransaction.oncomplete = null;\n\t\t\ttransaction.onerror = null;\n\t\t\ttransaction.onabort = null;\n\t\t};\n\t\tconst fail = (fallback: string) => {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tclear();\n\t\t\tctx.down([[\"ERROR\", errorPayload(transaction.error ?? new Error(fallback))]]);\n\t\t};\n\t\ttransaction.oncomplete = () => {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tclear();\n\t\t\tctx.down([[\"COMPLETE\"]]);\n\t\t};\n\t\ttransaction.onerror = () => fail(\"IndexedDB transaction failed\");\n\t\ttransaction.onabort = () => fail(\"IndexedDB transaction aborted\");\n\t\treturn () => {\n\t\t\tdone = true;\n\t\t\tclear();\n\t\t};\n\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,SAAS,OACR,SACA,OACqB;AACrB,SAAO;AAAA,IACN;AAAA,IACA,MAAM,CAAC,QAAQ;AACd,YAAM,UAAU,MAAM,GAAG;AACzB,UAAI,OAAO,YAAY,WAAY,KAAI,eAAe,OAAO;AAAA,IAC9D;AAAA,EACD;AACD;AAEA,SAAS,+BAA+B,YAA6C;AACpF,QAAM,OAAO;AAIb,MACC,OAAO,KAAK,0BAA0B,cACtC,OAAO,KAAK,yBAAyB,YACpC;AACD,WAAO;AAAA,MACN,uBAAuB,CAAC,aAAa,KAAK,wBAAwB,QAAQ,KAAK;AAAA,MAC/E,sBAAsB,CAAC,WAAW;AACjC,YAAI,OAAO,WAAW,SAAU,MAAK,uBAAuB,MAAM;AAAA,MACnE;AAAA,IACD;AAAA,EACD;AACA,SAAO;AAAA,IACN,sBAAsB,UAAU;AAC/B,aAAO,WAAW,MAAM,SAAS,KAAK,IAAI,CAAC,GAAG,UAAU;AAAA,IACzD;AAAA,IACA,qBAAqB,QAAQ;AAC5B,mBAAa,MAAM;AAAA,IACpB;AAAA,EACD;AACD;AAEA,SAAS,4BAAgE;AACxE,SAAQ,WAAqD;AAC9D;AAQO,SAAS,QAAQ,OAAuB,CAAC,GAA4B;AAC3E,QAAM,gBAAgB,KAAK;AAC3B,QAAM,aACL,OAAO,SAAS,aAAa,KAAK,kBAAkB,UAAa,gBAAgB,IAC9E,gBACA;AACJ,QAAM,YAAY,KAAK,aAAa,+BAA+B,UAAU;AAC7E,QAAM,qBAAqB,KAAK,YAAY,0BAA0B;AACtE,SAAO;AAAA,IACN,SAAS;AAAA,IACT,MAAM,EAAE,MAAM,QAAQ,UAAU,MAAM;AAAA,IACtC,MAAM,CAAC,QAAQ;AACd,UAAI,SAAS;AACb,UAAI;AACJ,YAAM,gBAAgB,MAAM;AAC3B,YAAI,UAAU,OAAW;AACzB,kBAAU,qBAAqB,KAAK;AACpC,gBAAQ;AAAA,MACT;AACA,YAAM,WAAW,MAChB,KAAK,oBAAoB,QAAQ,oBAAoB,oBAAoB;AAC1E,YAAM,WAAW,MAAM;AACtB,YAAI,CAAC,UAAU,UAAU,UAAa,SAAS,EAAG;AAClD,gBAAQ,UAAU,sBAAsB,CAAC,SAAS;AACjD,kBAAQ;AACR,cAAI,CAAC,UAAU,SAAS,EAAG;AAC3B,cAAI,KAAK,CAAC,CAAC,QAAQ,OAAO,SAAS,IAAI,IAAI,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC;AAC9D,mBAAS;AAAA,QACV,CAAC;AAAA,MACF;AACA,YAAM,qBAAqB,MAAM;AAChC,YAAI,CAAC,OAAQ;AACb,YAAI,SAAS,EAAG,eAAc;AAAA,YACzB,UAAS;AAAA,MACf;AACA,UACC,KAAK,oBAAoB,QACzB,oBAAoB,oBACpB,mBAAmB,qBAClB;AACD,2BAAmB,iBAAiB,oBAAoB,kBAAkB;AAAA,MAC3E;AACA,UAAI,eAAe,MAAM;AACxB,iBAAS;AACT,sBAAc;AACd,4BAAoB,sBAAsB,oBAAoB,kBAAkB;AAAA,MACjF,CAAC;AACD,eAAS;AAAA,IACV;AAAA,EACD;AACD;AAGO,SAAS,eAAkB,SAAgD;AACjF,SAAO,OAAU,kBAAkB,CAAC,QAAQ;AAC3C,QAAI,OAAO;AACX,UAAM,QAAQ,MAAM;AACnB,cAAQ,YAAY;AACpB,cAAQ,UAAU;AAAA,IACnB;AACA,YAAQ,YAAY,MAAM;AACzB,UAAI,KAAM;AACV,aAAO;AACP,YAAM;AACN,UAAI,QAAQ,WAAW,QAAW;AACjC,YAAI,KAAK;AAAA,UACR,CAAC,SAAS,IAAI,UAAU,0DAA0D,CAAC;AAAA,QACpF,CAAC;AACD;AAAA,MACD;AACA,UAAI,KAAK,CAAC,CAAC,QAAQ,QAAQ,MAAM,GAAG,CAAC,UAAU,CAAC,CAAC;AAAA,IAClD;AACA,YAAQ,UAAU,MAAM;AACvB,UAAI,KAAM;AACV,aAAO;AACP,YAAM;AACN,UAAI,KAAK,CAAC,CAAC,SAAS,aAAa,QAAQ,SAAS,IAAI,MAAM,0BAA0B,CAAC,CAAC,CAAC,CAAC;AAAA,IAC3F;AACA,WAAO,MAAM;AACZ,aAAO;AACP,YAAM;AAAA,IACP;AAAA,EACD,CAAC;AACF;AAQO,SAAS,mBAAmB,aAAyD;AAC3F,SAAO,OAAc,sBAAsB,CAAC,QAAQ;AACnD,QAAI,OAAO;AACX,UAAM,QAAQ,MAAM;AACnB,kBAAY,aAAa;AACzB,kBAAY,UAAU;AACtB,kBAAY,UAAU;AAAA,IACvB;AACA,UAAM,OAAO,CAAC,aAAqB;AAClC,UAAI,KAAM;AACV,aAAO;AACP,YAAM;AACN,UAAI,KAAK,CAAC,CAAC,SAAS,aAAa,YAAY,SAAS,IAAI,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC;AAAA,IAC7E;AACA,gBAAY,aAAa,MAAM;AAC9B,UAAI,KAAM;AACV,aAAO;AACP,YAAM;AACN,UAAI,KAAK,CAAC,CAAC,UAAU,CAAC,CAAC;AAAA,IACxB;AACA,gBAAY,UAAU,MAAM,KAAK,8BAA8B;AAC/D,gBAAY,UAAU,MAAM,KAAK,+BAA+B;AAChE,WAAO,MAAM;AACZ,aAAO;AACP,YAAM;AAAA,IACP;AAAA,EACD,CAAC;AACF;","names":[]}
|