@graphrefly/graphrefly 0.27.0 → 0.28.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.
Files changed (428) hide show
  1. package/dist/backoff-HPZMEZNF.js +1 -0
  2. package/dist/cascading-B-5zmAUv.d.cts +180 -0
  3. package/dist/cascading-D9WG1-9L.d.ts +180 -0
  4. package/dist/chunk-2FOAM3OR.js +1 -0
  5. package/dist/chunk-2PMCKKRK.js +1 -0
  6. package/dist/chunk-3JXNEPCD.js +2 -0
  7. package/dist/chunk-3R5HFPX7.js +78 -0
  8. package/dist/chunk-4GKB4OUJ.js +1 -0
  9. package/dist/chunk-4VVTGLXJ.js +1 -0
  10. package/dist/chunk-5QDBSZBV.js +1 -0
  11. package/dist/chunk-6QZNQS5B.js +1 -0
  12. package/dist/chunk-6V3SEX2I.js +1 -0
  13. package/dist/chunk-76A3HVQE.js +9 -0
  14. package/dist/chunk-7H6LGFUG.js +64 -0
  15. package/dist/chunk-CK2E7BTU.js +1 -0
  16. package/dist/chunk-CKCSDI7T.js +6 -0
  17. package/dist/chunk-CRXTH3SH.js +1 -0
  18. package/dist/chunk-CWLN3X3N.js +1 -0
  19. package/dist/chunk-D7A7DBE4.js +1 -0
  20. package/dist/chunk-DBGGMN3D.js +1 -0
  21. package/dist/chunk-DQA3UIQ2.js +1 -0
  22. package/dist/chunk-ERLIRFPA.js +1 -0
  23. package/dist/chunk-ESMPEKEV.js +1 -0
  24. package/dist/chunk-ETWTCCJI.js +1 -0
  25. package/dist/chunk-FNYWM6JC.js +1 -0
  26. package/dist/chunk-GHJJR5P4.js +1 -0
  27. package/dist/chunk-GPW2V3RE.js +1 -0
  28. package/dist/chunk-I6VIH3VA.js +1 -0
  29. package/dist/chunk-K2GNMCQT.js +1 -0
  30. package/dist/chunk-LBTDSCCO.js +3 -0
  31. package/dist/chunk-LQ3Y5NJS.js +1 -0
  32. package/dist/chunk-MIQTDPY4.js +5 -0
  33. package/dist/chunk-MTTAAPCK.js +1 -0
  34. package/dist/chunk-OAWLCNJJ.js +1 -0
  35. package/dist/chunk-OBKQQA5I.js +1 -0
  36. package/dist/chunk-OYHGKYQM.js +1 -0
  37. package/dist/chunk-PIOGHC63.js +1 -0
  38. package/dist/chunk-QWAPKG3O.js +2 -0
  39. package/dist/chunk-QYADASLV.js +1 -0
  40. package/dist/chunk-RHESUC3V.js +43 -0
  41. package/dist/chunk-S35VARIR.js +1 -0
  42. package/dist/chunk-SC3U7ETD.js +1 -0
  43. package/dist/chunk-U3AICJKU.js +1 -0
  44. package/dist/chunk-UMBIDLJ4.js +1 -0
  45. package/dist/chunk-UPHHLMHE.js +1 -0
  46. package/dist/chunk-UPXUCFMX.js +1 -0
  47. package/dist/chunk-UWJE5FQA.js +18 -0
  48. package/dist/chunk-V6YQICXZ.js +1 -0
  49. package/dist/chunk-VIMF6LGM.js +1 -0
  50. package/dist/chunk-VJLMUKOI.js +1 -0
  51. package/dist/chunk-VPYBOXVT.js +1 -0
  52. package/dist/chunk-VTPVOGHH.js +1 -0
  53. package/dist/chunk-WQ2BN6X6.js +1 -0
  54. package/dist/chunk-XAUNPIMX.js +1 -0
  55. package/dist/chunk-Y2EMPB3I.js +1 -0
  56. package/dist/chunk-Z4HDAS2Q.js +1 -0
  57. package/dist/chunk-ZB5EHBIO.js +1 -0
  58. package/dist/chunk-ZV2DXV5A.js +23 -0
  59. package/dist/compat/index.cjs +14 -7656
  60. package/dist/compat/index.d.cts +15 -14
  61. package/dist/compat/index.d.ts +15 -14
  62. package/dist/compat/index.js +1 -50
  63. package/dist/compat/jotai/index.cjs +1 -2048
  64. package/dist/compat/jotai/index.d.cts +2 -2
  65. package/dist/compat/jotai/index.d.ts +2 -2
  66. package/dist/compat/jotai/index.js +1 -9
  67. package/dist/compat/nanostores/index.cjs +1 -2175
  68. package/dist/compat/nanostores/index.d.cts +2 -2
  69. package/dist/compat/nanostores/index.d.ts +2 -2
  70. package/dist/compat/nanostores/index.js +1 -23
  71. package/dist/compat/nestjs/index.cjs +14 -6782
  72. package/dist/compat/nestjs/index.d.cts +7 -6
  73. package/dist/compat/nestjs/index.d.ts +7 -6
  74. package/dist/compat/nestjs/index.js +1 -83
  75. package/dist/compat/react/index.cjs +1 -141
  76. package/dist/compat/react/index.d.cts +2 -2
  77. package/dist/compat/react/index.d.ts +2 -2
  78. package/dist/compat/react/index.js +1 -12
  79. package/dist/compat/solid/index.cjs +1 -128
  80. package/dist/compat/solid/index.d.cts +2 -2
  81. package/dist/compat/solid/index.d.ts +2 -2
  82. package/dist/compat/solid/index.js +1 -12
  83. package/dist/compat/svelte/index.cjs +1 -131
  84. package/dist/compat/svelte/index.d.cts +2 -2
  85. package/dist/compat/svelte/index.d.ts +2 -2
  86. package/dist/compat/svelte/index.js +1 -12
  87. package/dist/compat/vue/index.cjs +1 -146
  88. package/dist/compat/vue/index.d.cts +2 -2
  89. package/dist/compat/vue/index.d.ts +2 -2
  90. package/dist/compat/vue/index.js +1 -12
  91. package/dist/compat/zustand/index.cjs +6 -4931
  92. package/dist/compat/zustand/index.d.cts +5 -5
  93. package/dist/compat/zustand/index.d.ts +5 -5
  94. package/dist/compat/zustand/index.js +1 -12
  95. package/dist/composite-B-xqw4Kk.d.cts +69 -0
  96. package/dist/composite-BhbKHbOS.d.ts +69 -0
  97. package/dist/core/index.cjs +1 -2271
  98. package/dist/core/index.d.cts +4 -4
  99. package/dist/core/index.d.ts +4 -4
  100. package/dist/core/index.js +1 -110
  101. package/dist/extra/browser.cjs +1 -0
  102. package/dist/extra/browser.d.cts +3 -0
  103. package/dist/extra/browser.d.ts +3 -0
  104. package/dist/extra/browser.js +1 -0
  105. package/dist/extra/index.cjs +23 -9971
  106. package/dist/extra/index.d.cts +13 -6
  107. package/dist/extra/index.d.ts +13 -6
  108. package/dist/extra/index.js +1 -381
  109. package/dist/extra/node.cjs +3 -0
  110. package/dist/extra/node.d.cts +81 -0
  111. package/dist/extra/node.d.ts +81 -0
  112. package/dist/extra/node.js +2 -0
  113. package/dist/extra/operators.cjs +1 -0
  114. package/dist/extra/operators.d.cts +910 -0
  115. package/dist/extra/operators.d.ts +910 -0
  116. package/dist/extra/operators.js +1 -0
  117. package/dist/extra/reactive.cjs +1 -0
  118. package/dist/extra/reactive.d.cts +352 -0
  119. package/dist/extra/reactive.d.ts +352 -0
  120. package/dist/extra/reactive.js +1 -0
  121. package/dist/extra/sources.cjs +1 -2486
  122. package/dist/extra/sources.d.cts +6 -2
  123. package/dist/extra/sources.d.ts +6 -2
  124. package/dist/extra/sources.js +1 -57
  125. package/dist/extra/storage-browser.cjs +1 -0
  126. package/dist/extra/storage-browser.d.cts +71 -0
  127. package/dist/extra/storage-browser.d.ts +71 -0
  128. package/dist/extra/storage-browser.js +1 -0
  129. package/dist/extra/storage-core.cjs +1 -0
  130. package/dist/extra/storage-core.d.cts +98 -0
  131. package/dist/extra/storage-core.d.ts +98 -0
  132. package/dist/extra/storage-core.js +1 -0
  133. package/dist/extra/storage-node.cjs +2 -0
  134. package/dist/extra/storage-node.d.cts +60 -0
  135. package/dist/extra/storage-node.d.ts +60 -0
  136. package/dist/extra/storage-node.js +1 -0
  137. package/dist/fallback-BaTS7vVY.d.cts +258 -0
  138. package/dist/fallback-eOm3LNxP.d.ts +258 -0
  139. package/dist/graph/index.cjs +6 -5030
  140. package/dist/graph/index.d.cts +6 -5
  141. package/dist/graph/index.d.ts +6 -5
  142. package/dist/graph/index.js +1 -50
  143. package/dist/{graph-CCwGKLCm.d.ts → graph-BZGRXwOm.d.ts} +134 -31
  144. package/dist/{graph-DNCrvZSn.d.cts → graph-D48Qw9Cg.d.cts} +134 -31
  145. package/dist/index-8FSVk4Uf.d.ts +135 -0
  146. package/dist/index-9oDeHH2u.d.cts +291 -0
  147. package/dist/{messaging-XDoYablx.d.ts → index-B0c4cmIO.d.ts} +31 -93
  148. package/dist/{index-VdHQMPy1.d.ts → index-B1AmmSlb.d.ts} +1 -1
  149. package/dist/{index-VHqptjhu.d.cts → index-B2pwesl9.d.cts} +1 -1
  150. package/dist/index-BHvIquRZ.d.ts +1957 -0
  151. package/dist/{index-Dzk2hrlR.d.ts → index-BVHOrDwO.d.ts} +1 -1
  152. package/dist/{index-CxFrXH4m.d.ts → index-BWJV63ti.d.ts} +1 -1
  153. package/dist/{index-Xi3u0HCQ.d.cts → index-B_agccPe.d.cts} +1 -1
  154. package/dist/index-BgyGlizc.d.ts +163 -0
  155. package/dist/index-BpA5c4G9.d.ts +357 -0
  156. package/dist/index-BpIFjILY.d.cts +357 -0
  157. package/dist/{index-3lsddbbS.d.ts → index-Bqachn9_.d.ts} +1 -1
  158. package/dist/index-Btib9rsU.d.ts +607 -0
  159. package/dist/{index-wEn0eFe8.d.ts → index-BwM9BEkt.d.ts} +1 -1
  160. package/dist/index-BxJ86YZZ.d.cts +105 -0
  161. package/dist/{audit-DRlSzBu9.d.ts → index-C73n7lo-.d.cts} +27 -21
  162. package/dist/index-CEXXwWVH.d.cts +192 -0
  163. package/dist/index-CHEswufn.d.cts +163 -0
  164. package/dist/{index-C0svESO4.d.ts → index-CMn8S8Hw.d.ts} +1 -1
  165. package/dist/{index-ByQxazQJ.d.cts → index-CRO83MmV.d.cts} +1 -1
  166. package/dist/{index-BuEoe-Qu.d.ts → index-CloUk1kY.d.ts} +9 -9
  167. package/dist/index-CpgYhnrG.d.ts +291 -0
  168. package/dist/{index-DO_6JN9Z.d.cts → index-Cyojz0AE.d.cts} +1 -1
  169. package/dist/{demo-shell-BDkOptd6.d.ts → index-CzobVSMr.d.ts} +14 -14
  170. package/dist/index-Czq6ynh8.d.ts +143 -0
  171. package/dist/{index-BaSM3aYt.d.ts → index-D-YB-Vl3.d.ts} +3 -3
  172. package/dist/index-DAlweici.d.ts +231 -0
  173. package/dist/index-DEwTb_fm.d.cts +1957 -0
  174. package/dist/{index-DYme44FM.d.cts → index-DL-rYJrx.d.cts} +1 -1
  175. package/dist/{memory-li6FL5RM.d.ts → index-DP4ZTkdw.d.ts} +26 -26
  176. package/dist/{index-BwfLUNw4.d.ts → index-DUqMOlKZ.d.cts} +173 -2040
  177. package/dist/{index-B1tloyhO.d.cts → index-D_NwnRYS.d.cts} +1 -1
  178. package/dist/index-DaLJvH8Z.d.ts +105 -0
  179. package/dist/index-DcXZBF5a.d.cts +135 -0
  180. package/dist/index-DfyOkTvs.d.ts +321 -0
  181. package/dist/{index-B9B7_HEY.d.ts → index-DiOXyAwt.d.ts} +1 -1
  182. package/dist/index-DpHe5e0Q.d.ts +186 -0
  183. package/dist/index-DraikLjn.d.ts +86 -0
  184. package/dist/{index-D8wS_PeY.d.cts → index-DxsnAMWD.d.cts} +9 -9
  185. package/dist/{messaging-Gt4LPbyA.d.cts → index-DyxjtScX.d.cts} +31 -93
  186. package/dist/{audit-ClmqGOCx.d.cts → index-HDpJe9hX.d.ts} +27 -21
  187. package/dist/{index-DVGiGFGT.d.cts → index-O6TgGUBV.d.cts} +3 -3
  188. package/dist/{index-B6EhDnjH.d.cts → index-Oi8d8w4R.d.cts} +1 -1
  189. package/dist/{index-C8oil6M6.d.ts → index-ROpQmGjE.d.ts} +30 -6
  190. package/dist/index-RukJ4DLS.d.cts +607 -0
  191. package/dist/{index-BHlKbUwO.d.cts → index-ZftwfxJM.d.ts} +173 -2040
  192. package/dist/{index-BPVt8kqc.d.ts → index-cByzxQIC.d.cts} +10 -195
  193. package/dist/index-dtN7YA2x.d.cts +143 -0
  194. package/dist/{index-CI3DprxP.d.cts → index-fM6y00vT.d.cts} +30 -6
  195. package/dist/{index-DlLp-2Xn.d.cts → index-m-yHof5p.d.ts} +10 -195
  196. package/dist/index-pXrDMpRO.d.cts +231 -0
  197. package/dist/index-rHJSKsU8.d.cts +186 -0
  198. package/dist/index-rX8HBM5h.d.cts +321 -0
  199. package/dist/{index-CO8uBlUh.d.cts → index-rnwQly8X.d.cts} +147 -20
  200. package/dist/index-sm373fsH.d.ts +192 -0
  201. package/dist/{memory-C6Z2tGpC.d.cts → index-tbf2gKHd.d.cts} +26 -26
  202. package/dist/{demo-shell-Crid1WdR.d.cts → index-u15meRxL.d.cts} +14 -14
  203. package/dist/{index-B6D3QNSA.d.ts → index-umtoWT8K.d.ts} +147 -20
  204. package/dist/index-vscRDkjW.d.cts +86 -0
  205. package/dist/index.cjs +150 -24142
  206. package/dist/index.d.cts +69 -2099
  207. package/dist/index.d.ts +69 -2099
  208. package/dist/index.js +1 -3868
  209. package/dist/{meta-CbznRPYJ.d.ts → meta-Cgj6zeji.d.cts} +5 -5
  210. package/dist/{meta-BxCA7rcr.d.cts → meta-CwesDrMD.d.ts} +5 -5
  211. package/dist/{node-BmerH3kS.d.cts → node-Cc1TniY8.d.cts} +36 -9
  212. package/dist/{node-BmerH3kS.d.ts → node-Cc1TniY8.d.ts} +36 -9
  213. package/dist/{observable-BgGUwcqp.d.ts → observable-Ct-gJ9jI.d.ts} +1 -1
  214. package/dist/{observable-DJt_AxzQ.d.cts → observable-glXQoGj2.d.cts} +1 -1
  215. package/dist/patterns/ai/browser.cjs +25 -0
  216. package/dist/patterns/ai/browser.d.cts +127 -0
  217. package/dist/patterns/ai/browser.d.ts +127 -0
  218. package/dist/patterns/ai/browser.js +3 -0
  219. package/dist/patterns/ai/index.cjs +91 -0
  220. package/dist/patterns/ai/index.d.cts +17 -0
  221. package/dist/patterns/ai/index.d.ts +17 -0
  222. package/dist/patterns/ai/index.js +1 -0
  223. package/dist/patterns/ai/node.cjs +2 -0
  224. package/dist/patterns/ai/node.d.cts +58 -0
  225. package/dist/patterns/ai/node.d.ts +58 -0
  226. package/dist/patterns/ai/node.js +1 -0
  227. package/dist/patterns/audit/index.cjs +6 -0
  228. package/dist/patterns/audit/index.d.cts +6 -0
  229. package/dist/patterns/audit/index.d.ts +6 -0
  230. package/dist/patterns/audit/index.js +1 -0
  231. package/dist/patterns/cqrs/index.cjs +6 -0
  232. package/dist/patterns/cqrs/index.d.cts +5 -0
  233. package/dist/patterns/cqrs/index.d.ts +5 -0
  234. package/dist/patterns/cqrs/index.js +1 -0
  235. package/dist/patterns/demo-shell/index.cjs +7 -0
  236. package/dist/patterns/demo-shell/index.d.cts +6 -0
  237. package/dist/patterns/demo-shell/index.d.ts +6 -0
  238. package/dist/patterns/demo-shell/index.js +1 -0
  239. package/dist/patterns/domain-templates/index.cjs +6 -0
  240. package/dist/patterns/domain-templates/index.d.cts +5 -0
  241. package/dist/patterns/domain-templates/index.d.ts +5 -0
  242. package/dist/patterns/domain-templates/index.js +1 -0
  243. package/dist/patterns/graphspec/index.cjs +83 -0
  244. package/dist/patterns/graphspec/index.d.cts +7 -0
  245. package/dist/patterns/graphspec/index.d.ts +7 -0
  246. package/dist/patterns/graphspec/index.js +1 -0
  247. package/dist/patterns/guarded-execution/index.cjs +6 -0
  248. package/dist/patterns/guarded-execution/index.d.cts +7 -0
  249. package/dist/patterns/guarded-execution/index.d.ts +7 -0
  250. package/dist/patterns/guarded-execution/index.js +1 -0
  251. package/dist/patterns/harness/index.cjs +48 -0
  252. package/dist/patterns/harness/index.d.cts +8 -0
  253. package/dist/patterns/harness/index.d.ts +8 -0
  254. package/dist/patterns/harness/index.js +1 -0
  255. package/dist/patterns/job-queue/index.cjs +6 -0
  256. package/dist/patterns/job-queue/index.d.cts +5 -0
  257. package/dist/patterns/job-queue/index.d.ts +5 -0
  258. package/dist/patterns/job-queue/index.js +1 -0
  259. package/dist/patterns/lens/index.cjs +6 -0
  260. package/dist/patterns/lens/index.d.cts +7 -0
  261. package/dist/patterns/lens/index.d.ts +7 -0
  262. package/dist/patterns/lens/index.js +1 -0
  263. package/dist/patterns/memory/index.cjs +6 -0
  264. package/dist/patterns/memory/index.d.cts +5 -0
  265. package/dist/patterns/memory/index.d.ts +5 -0
  266. package/dist/patterns/memory/index.js +1 -0
  267. package/dist/patterns/messaging/index.cjs +6 -0
  268. package/dist/patterns/messaging/index.d.cts +5 -0
  269. package/dist/patterns/messaging/index.d.ts +5 -0
  270. package/dist/patterns/messaging/index.js +1 -0
  271. package/dist/patterns/orchestration/index.cjs +6 -0
  272. package/dist/patterns/orchestration/index.d.cts +6 -0
  273. package/dist/patterns/orchestration/index.d.ts +6 -0
  274. package/dist/patterns/orchestration/index.js +1 -0
  275. package/dist/patterns/reactive-layout/index.cjs +7 -6444
  276. package/dist/patterns/reactive-layout/index.d.cts +6 -6
  277. package/dist/patterns/reactive-layout/index.d.ts +6 -6
  278. package/dist/patterns/reactive-layout/index.js +1 -56
  279. package/dist/patterns/reduction/index.cjs +6 -0
  280. package/dist/patterns/reduction/index.d.cts +5 -0
  281. package/dist/patterns/reduction/index.d.ts +5 -0
  282. package/dist/patterns/reduction/index.js +1 -0
  283. package/dist/patterns/refine-loop/index.cjs +8 -0
  284. package/dist/patterns/refine-loop/index.d.cts +7 -0
  285. package/dist/patterns/refine-loop/index.d.ts +7 -0
  286. package/dist/patterns/refine-loop/index.js +1 -0
  287. package/dist/patterns/resilient-pipeline/index.cjs +1 -0
  288. package/dist/patterns/resilient-pipeline/index.d.cts +7 -0
  289. package/dist/patterns/resilient-pipeline/index.d.ts +7 -0
  290. package/dist/patterns/resilient-pipeline/index.js +1 -0
  291. package/dist/patterns/surface/index.cjs +14 -0
  292. package/dist/patterns/surface/index.d.cts +8 -0
  293. package/dist/patterns/surface/index.d.ts +8 -0
  294. package/dist/patterns/surface/index.js +1 -0
  295. package/dist/{reactive-layout-MQP--J3F.d.cts → reactive-layout-CpYb5qLP.d.cts} +2 -2
  296. package/dist/{reactive-layout-u5Ulnqag.d.ts → reactive-layout-D8u4wuUR.d.ts} +2 -2
  297. package/dist/reactive-log-DPzuUDj5.d.cts +190 -0
  298. package/dist/reactive-log-YuH9VYN8.d.ts +190 -0
  299. package/dist/{composite-aUCvjZVR.d.ts → reactive-map-CdbNoSgP.d.ts} +2 -67
  300. package/dist/{composite-C7PcQvcs.d.cts → reactive-map-DUeRmb9d.d.cts} +2 -67
  301. package/dist/resilience-Ba5-b4WD.d.cts +493 -0
  302. package/dist/resilience-CGRzhnD3.d.ts +493 -0
  303. package/dist/resilience-QAHKANT5.js +1 -0
  304. package/dist/{sugar-D02n5JjF.d.cts → sugar-BV0htudb.d.cts} +8 -4
  305. package/dist/{sugar-CCOxXK1e.d.ts → sugar-Dtyrq2_q.d.ts} +8 -4
  306. package/dist/topology-tree-CYHOwQZ_.d.ts +25 -0
  307. package/dist/topology-tree-DROUdq5B.d.cts +25 -0
  308. package/dist/types-O3GzJY2U.d.cts +401 -0
  309. package/dist/types-u64Ose53.d.ts +401 -0
  310. package/package.json +252 -22
  311. package/dist/ai-CaR_912Q.d.cts +0 -1033
  312. package/dist/ai-WlRltJV7.d.ts +0 -1033
  313. package/dist/chunk-3ZWCKRHX.js +0 -117
  314. package/dist/chunk-3ZWCKRHX.js.map +0 -1
  315. package/dist/chunk-7TAQJHQV.js +0 -103
  316. package/dist/chunk-7TAQJHQV.js.map +0 -1
  317. package/dist/chunk-APFNLIRG.js +0 -62
  318. package/dist/chunk-APFNLIRG.js.map +0 -1
  319. package/dist/chunk-AT5LKYNL.js +0 -395
  320. package/dist/chunk-AT5LKYNL.js.map +0 -1
  321. package/dist/chunk-BQ6RQQFF.js +0 -5087
  322. package/dist/chunk-BQ6RQQFF.js.map +0 -1
  323. package/dist/chunk-BVZYTZ5H.js +0 -599
  324. package/dist/chunk-BVZYTZ5H.js.map +0 -1
  325. package/dist/chunk-DST5DKZS.js +0 -1371
  326. package/dist/chunk-DST5DKZS.js.map +0 -1
  327. package/dist/chunk-GTE6PWRZ.js +0 -866
  328. package/dist/chunk-GTE6PWRZ.js.map +0 -1
  329. package/dist/chunk-HXZEYDUR.js +0 -94
  330. package/dist/chunk-HXZEYDUR.js.map +0 -1
  331. package/dist/chunk-J22W6HV3.js +0 -107
  332. package/dist/chunk-J22W6HV3.js.map +0 -1
  333. package/dist/chunk-J2VBW3DZ.js +0 -302
  334. package/dist/chunk-J2VBW3DZ.js.map +0 -1
  335. package/dist/chunk-JSCT3CR4.js +0 -38
  336. package/dist/chunk-JSCT3CR4.js.map +0 -1
  337. package/dist/chunk-JWBCY4NC.js +0 -330
  338. package/dist/chunk-JWBCY4NC.js.map +0 -1
  339. package/dist/chunk-K2AUJHVP.js +0 -2251
  340. package/dist/chunk-K2AUJHVP.js.map +0 -1
  341. package/dist/chunk-MJ2NKQQL.js +0 -119
  342. package/dist/chunk-MJ2NKQQL.js.map +0 -1
  343. package/dist/chunk-N6UR7YVY.js +0 -198
  344. package/dist/chunk-N6UR7YVY.js.map +0 -1
  345. package/dist/chunk-NC6S43JJ.js +0 -456
  346. package/dist/chunk-NC6S43JJ.js.map +0 -1
  347. package/dist/chunk-OFVJBJXR.js +0 -98
  348. package/dist/chunk-OFVJBJXR.js.map +0 -1
  349. package/dist/chunk-OHISZPOJ.js +0 -97
  350. package/dist/chunk-OHISZPOJ.js.map +0 -1
  351. package/dist/chunk-OU5CQKNW.js +0 -102
  352. package/dist/chunk-OU5CQKNW.js.map +0 -1
  353. package/dist/chunk-PF7GRZMW.js +0 -2712
  354. package/dist/chunk-PF7GRZMW.js.map +0 -1
  355. package/dist/chunk-PHOUUNK7.js +0 -2291
  356. package/dist/chunk-PHOUUNK7.js.map +0 -1
  357. package/dist/chunk-RNHBMHKA.js +0 -1665
  358. package/dist/chunk-RNHBMHKA.js.map +0 -1
  359. package/dist/chunk-SX52TAR4.js +0 -110
  360. package/dist/chunk-SX52TAR4.js.map +0 -1
  361. package/dist/chunk-VYPWMZ6H.js +0 -98
  362. package/dist/chunk-VYPWMZ6H.js.map +0 -1
  363. package/dist/chunk-WBZOVTYK.js +0 -171
  364. package/dist/chunk-WBZOVTYK.js.map +0 -1
  365. package/dist/chunk-WKNUIZOY.js +0 -354
  366. package/dist/chunk-WKNUIZOY.js.map +0 -1
  367. package/dist/chunk-X3VMZYBT.js +0 -713
  368. package/dist/chunk-X3VMZYBT.js.map +0 -1
  369. package/dist/chunk-X5R3GL6H.js +0 -525
  370. package/dist/chunk-X5R3GL6H.js.map +0 -1
  371. package/dist/chunk-XGPU467M.js +0 -136
  372. package/dist/chunk-XGPU467M.js.map +0 -1
  373. package/dist/compat/index.cjs.map +0 -1
  374. package/dist/compat/index.js.map +0 -1
  375. package/dist/compat/jotai/index.cjs.map +0 -1
  376. package/dist/compat/jotai/index.js.map +0 -1
  377. package/dist/compat/nanostores/index.cjs.map +0 -1
  378. package/dist/compat/nanostores/index.js.map +0 -1
  379. package/dist/compat/nestjs/index.cjs.map +0 -1
  380. package/dist/compat/nestjs/index.js.map +0 -1
  381. package/dist/compat/react/index.cjs.map +0 -1
  382. package/dist/compat/react/index.js.map +0 -1
  383. package/dist/compat/solid/index.cjs.map +0 -1
  384. package/dist/compat/solid/index.js.map +0 -1
  385. package/dist/compat/svelte/index.cjs.map +0 -1
  386. package/dist/compat/svelte/index.js.map +0 -1
  387. package/dist/compat/vue/index.cjs.map +0 -1
  388. package/dist/compat/vue/index.js.map +0 -1
  389. package/dist/compat/zustand/index.cjs.map +0 -1
  390. package/dist/compat/zustand/index.js.map +0 -1
  391. package/dist/core/index.cjs.map +0 -1
  392. package/dist/core/index.js.map +0 -1
  393. package/dist/extra/index.cjs.map +0 -1
  394. package/dist/extra/index.js.map +0 -1
  395. package/dist/extra/sources.cjs.map +0 -1
  396. package/dist/extra/sources.js.map +0 -1
  397. package/dist/graph/index.cjs.map +0 -1
  398. package/dist/graph/index.js.map +0 -1
  399. package/dist/index.cjs.map +0 -1
  400. package/dist/index.js.map +0 -1
  401. package/dist/patterns/ai.cjs +0 -7930
  402. package/dist/patterns/ai.cjs.map +0 -1
  403. package/dist/patterns/ai.d.cts +0 -10
  404. package/dist/patterns/ai.d.ts +0 -10
  405. package/dist/patterns/ai.js +0 -71
  406. package/dist/patterns/ai.js.map +0 -1
  407. package/dist/patterns/audit.cjs +0 -5805
  408. package/dist/patterns/audit.cjs.map +0 -1
  409. package/dist/patterns/audit.d.cts +0 -6
  410. package/dist/patterns/audit.d.ts +0 -6
  411. package/dist/patterns/audit.js +0 -29
  412. package/dist/patterns/audit.js.map +0 -1
  413. package/dist/patterns/demo-shell.cjs +0 -5604
  414. package/dist/patterns/demo-shell.cjs.map +0 -1
  415. package/dist/patterns/demo-shell.d.cts +0 -6
  416. package/dist/patterns/demo-shell.d.ts +0 -6
  417. package/dist/patterns/demo-shell.js +0 -15
  418. package/dist/patterns/demo-shell.js.map +0 -1
  419. package/dist/patterns/memory.cjs +0 -5283
  420. package/dist/patterns/memory.cjs.map +0 -1
  421. package/dist/patterns/memory.d.cts +0 -5
  422. package/dist/patterns/memory.d.ts +0 -5
  423. package/dist/patterns/memory.js +0 -20
  424. package/dist/patterns/memory.js.map +0 -1
  425. package/dist/patterns/reactive-layout/index.cjs.map +0 -1
  426. package/dist/patterns/reactive-layout/index.js.map +0 -1
  427. package/dist/storage-CMjUUuxn.d.ts +0 -190
  428. package/dist/storage-DdWlZo6U.d.cts +0 -190
@@ -0,0 +1,910 @@
1
+ import { N as NodeOptions, a as Node, M as Message } from '../node-Cc1TniY8.js';
2
+ import { NodeInput } from './sources.js';
3
+
4
+ /**
5
+ * Tier 1 sync operators (roadmap §2.1) and Tier 2 async/dynamic operators (roadmap §2.2) —
6
+ * each returns a {@link Node} built with {@link node} (or {@link producer} for cold sources).
7
+ *
8
+ * v5 foundation redesign: all operators use `actions.emit()` for value emission,
9
+ * `ctx.store` for persistent state, `ctx.terminalDeps` for terminal handling,
10
+ * and `data[i]` batch shape for DATA vs RESOLVED discrimination. `onMessage`
11
+ * and `onResubscribe` are removed.
12
+ */
13
+
14
+ type ExtraOpts = Omit<NodeOptions<unknown>, "describeKind">;
15
+ /**
16
+ * Maps each settled value from `source` through `project`.
17
+ *
18
+ * @param source - Upstream node.
19
+ * @param project - Transform for each value.
20
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
21
+ * @returns `Node<R>` - Derived node emitting mapped values.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * import { map, state } from "@graphrefly/graphrefly-ts";
26
+ *
27
+ * const n = map(state(2), (x) => x * 3);
28
+ * ```
29
+ *
30
+ * @category extra
31
+ */
32
+ declare function map<T, R>(source: Node<T>, project: (value: T) => R, opts?: ExtraOpts): Node<R>;
33
+ /**
34
+ * Forwards values that satisfy `predicate`; otherwise emits `RESOLVED` with no `DATA` (two-phase semantics).
35
+ *
36
+ * @param source - Upstream node.
37
+ * @param predicate - Inclusion test.
38
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
39
+ * @returns `Node<T>` - Filtered node.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * import { filter, state } from "@graphrefly/graphrefly-ts";
44
+ *
45
+ * const n = filter(state(1), (x) => x > 0);
46
+ * ```
47
+ *
48
+ * @category extra
49
+ */
50
+ declare function filter<T>(source: Node<T>, predicate: (value: T) => boolean, opts?: ExtraOpts): Node<T>;
51
+ /**
52
+ * Folds each upstream value into an accumulator; emits the new accumulator every time.
53
+ *
54
+ * Unlike RxJS, `seed` is always required — there is no seedless mode where the first
55
+ * value silently becomes the accumulator.
56
+ *
57
+ * @param source - Upstream node.
58
+ * @param reducer - `(acc, value) => nextAcc`.
59
+ * @param seed - Initial accumulator (required).
60
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
61
+ * @returns `Node<R>` - Scan node.
62
+ *
63
+ * @example
64
+ * ```ts
65
+ * import { scan, state } from "@graphrefly/graphrefly-ts";
66
+ *
67
+ * const n = scan(state(1), (a, x) => a + x, 0);
68
+ * ```
69
+ *
70
+ * @category extra
71
+ */
72
+ declare function scan<T, R>(source: Node<T>, reducer: (acc: R, value: T) => R, seed: R, opts?: ExtraOpts): Node<R>;
73
+ /**
74
+ * Reduces to one value emitted when `source` completes; if no `DATA` arrived, emits `seed`.
75
+ *
76
+ * Unlike RxJS, `seed` is always required. If the source completes without emitting
77
+ * DATA, the seed value is emitted (RxJS would throw without a seed).
78
+ *
79
+ * @param source - Upstream node.
80
+ * @param reducer - `(acc, value) => nextAcc`.
81
+ * @param seed - Empty-completion default and initial accumulator (required).
82
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
83
+ * @returns `Node<R>` - Node that emits once on completion.
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * import { reduce, state } from "@graphrefly/graphrefly-ts";
88
+ *
89
+ * const n = reduce(state(1), (a, x) => a + x, 0);
90
+ * ```
91
+ *
92
+ * @category extra
93
+ */
94
+ declare function reduce<T, R>(source: Node<T>, reducer: (acc: R, value: T) => R, seed: R, opts?: ExtraOpts): Node<R>;
95
+ /**
96
+ * Emits at most `count` **`DATA`** values, then **`COMPLETE`**. `RESOLVED` does not advance the counter.
97
+ *
98
+ * @param source - Upstream node.
99
+ * @param count - Maximum `DATA` emissions (≤0 completes immediately).
100
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
101
+ * @returns `Node<T>` - Limited stream.
102
+ *
103
+ * @example
104
+ * ```ts
105
+ * import { take, state } from "@graphrefly/graphrefly-ts";
106
+ *
107
+ * const n = take(state(0), 3);
108
+ * ```
109
+ *
110
+ * @category extra
111
+ */
112
+ declare function take<T>(source: Node<T>, count: number, opts?: ExtraOpts): Node<T>;
113
+ /**
114
+ * Skips the first `count` **`DATA`** emissions. `RESOLVED` does not advance the counter.
115
+ *
116
+ * @param source - Upstream node.
117
+ * @param count - Number of `DATA` values to drop.
118
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
119
+ * @returns `Node<T>` - Skipped stream.
120
+ *
121
+ * @example
122
+ * ```ts
123
+ * import { skip, state } from "@graphrefly/graphrefly-ts";
124
+ *
125
+ * const n = skip(state(0), 2);
126
+ * ```
127
+ *
128
+ * @category extra
129
+ */
130
+ declare function skip<T>(source: Node<T>, count: number, opts?: ExtraOpts): Node<T>;
131
+ /**
132
+ * Emits while `predicate` holds; on first false, sends **`COMPLETE`**.
133
+ *
134
+ * @param source - Upstream node.
135
+ * @param predicate - Continuation test.
136
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
137
+ * @returns `Node<T>` - Truncated stream.
138
+ *
139
+ * @example
140
+ * ```ts
141
+ * import { takeWhile, state } from "@graphrefly/graphrefly-ts";
142
+ *
143
+ * const n = takeWhile(state(1), (x) => x < 10);
144
+ * ```
145
+ *
146
+ * @category extra
147
+ */
148
+ declare function takeWhile<T>(source: Node<T>, predicate: (value: T) => boolean, opts?: ExtraOpts): Node<T>;
149
+ /**
150
+ * Forwards `source` until `notifier` matches `predicate` (default: notifier **`DATA`**), then **`COMPLETE`**.
151
+ *
152
+ * @param source - Main upstream.
153
+ * @param notifier - Triggers completion when `predicate(msg)` is true.
154
+ * @param opts - Optional {@link NodeOptions}, plus `predicate` for custom notifier matching.
155
+ * @returns `Node<T>` - Truncated stream.
156
+ *
157
+ * @example
158
+ * ```ts
159
+ * import { producer, takeUntil, state } from "@graphrefly/graphrefly-ts";
160
+ *
161
+ * const src = state(1);
162
+ * const stop = producer((_d, a) => a.emit(undefined));
163
+ * const n = takeUntil(src, stop);
164
+ * ```
165
+ *
166
+ * @category extra
167
+ */
168
+ declare function takeUntil<T>(source: Node<T>, notifier: Node, opts?: ExtraOpts & {
169
+ predicate?: (msg: Message) => boolean;
170
+ }): Node<T>;
171
+ /**
172
+ * Emits the first **`DATA`** then **`COMPLETE`** (same as `take(source, 1)`).
173
+ *
174
+ * @param source - Upstream node.
175
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
176
+ * @returns `Node<T>` - Single-value stream.
177
+ *
178
+ * @example
179
+ * ```ts
180
+ * import { first, state } from "@graphrefly/graphrefly-ts";
181
+ *
182
+ * const n = first(state(42));
183
+ * ```
184
+ *
185
+ * @category extra
186
+ */
187
+ declare function first<T>(source: Node<T>, opts?: ExtraOpts): Node<T>;
188
+ /**
189
+ * Buffers values and emits the last **`DATA`** on **`COMPLETE`**; optional `defaultValue` if none arrived.
190
+ *
191
+ * @param source - Upstream node.
192
+ * @param options - Optional {@link NodeOptions} and `defaultValue` when empty.
193
+ * @returns `Node<T>` - Last-or-default node.
194
+ *
195
+ * @example
196
+ * ```ts
197
+ * import { last, state } from "@graphrefly/graphrefly-ts";
198
+ *
199
+ * const n = last(state(1), { defaultValue: 0 });
200
+ * ```
201
+ *
202
+ * @category extra
203
+ */
204
+ declare function last<T>(source: Node<T>, options?: ExtraOpts & {
205
+ defaultValue?: T;
206
+ }): Node<T>;
207
+ /**
208
+ * Emits the first value matching `predicate`, then **`COMPLETE`**.
209
+ *
210
+ * @param source - Upstream node.
211
+ * @param predicate - Match test.
212
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
213
+ * @returns `Node<T>` - First-match stream.
214
+ *
215
+ * @example
216
+ * ```ts
217
+ * import { find, state } from "@graphrefly/graphrefly-ts";
218
+ *
219
+ * const n = find(state(1), (x) => x > 0);
220
+ * ```
221
+ *
222
+ * @category extra
223
+ */
224
+ declare function find<T>(source: Node<T>, predicate: (value: T) => boolean, opts?: ExtraOpts): Node<T>;
225
+ /**
226
+ * Emits the `index`th **`DATA`** (zero-based), then **`COMPLETE`**.
227
+ *
228
+ * @param source - Upstream node.
229
+ * @param index - Zero-based emission index.
230
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
231
+ * @returns `Node<T>` - Single indexed value.
232
+ *
233
+ * @example
234
+ * ```ts
235
+ * import { elementAt, state } from "@graphrefly/graphrefly-ts";
236
+ *
237
+ * const n = elementAt(state(0), 2);
238
+ * ```
239
+ *
240
+ * @category extra
241
+ */
242
+ declare function elementAt<T>(source: Node<T>, index: number, opts?: ExtraOpts): Node<T>;
243
+ /**
244
+ * Observer shape for {@link tap} — side effects for data, error, and/or complete.
245
+ */
246
+ type TapObserver<T> = {
247
+ data?: (value: T) => void;
248
+ error?: (err: unknown) => void;
249
+ complete?: () => void;
250
+ };
251
+ /**
252
+ * Invokes side effects; values pass through unchanged.
253
+ *
254
+ * Accepts either a function (called on each DATA) or an observer object
255
+ * `{ data?, error?, complete? }` for lifecycle-aware side effects.
256
+ *
257
+ * @param source - Upstream node.
258
+ * @param fnOrObserver - Side effect function or observer object.
259
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
260
+ * @returns `Node<T>` - Passthrough node.
261
+ *
262
+ * @example
263
+ * ```ts
264
+ * import { tap, state } from "@graphrefly/graphrefly-ts";
265
+ *
266
+ * // Function form (DATA only)
267
+ * tap(state(1), (x) => console.log(x));
268
+ *
269
+ * // Observer form (DATA + ERROR + COMPLETE)
270
+ * tap(state(1), { data: console.log, error: console.error, complete: () => console.log("done") });
271
+ * ```
272
+ *
273
+ * @category extra
274
+ */
275
+ declare function tap<T>(source: Node<T>, fnOrObserver: ((value: T) => void) | TapObserver<T>, opts?: ExtraOpts): Node<T>;
276
+ /**
277
+ * Suppresses adjacent duplicates using `equals` (default `Object.is`).
278
+ *
279
+ * @param source - Upstream node.
280
+ * @param equals - Optional equality for consecutive values.
281
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
282
+ * @returns `Node<T>` - Deduped stream.
283
+ *
284
+ * @example
285
+ * ```ts
286
+ * import { distinctUntilChanged, state } from "@graphrefly/graphrefly-ts";
287
+ *
288
+ * const n = distinctUntilChanged(state(1));
289
+ * ```
290
+ *
291
+ * @category extra
292
+ */
293
+ declare function distinctUntilChanged<T>(source: Node<T>, equals?: (a: T, b: T) => boolean, opts?: ExtraOpts): Node<T>;
294
+ /**
295
+ * Emits `[previous, current]` pairs starting after the second value (first pair uses `RESOLVED` only).
296
+ *
297
+ * @param source - Upstream node.
298
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
299
+ * @returns `Node<readonly [T, T]>` - Pair stream.
300
+ *
301
+ * @example
302
+ * ```ts
303
+ * import { pairwise, state } from "@graphrefly/graphrefly-ts";
304
+ *
305
+ * const n = pairwise(state(0));
306
+ * ```
307
+ *
308
+ * @category extra
309
+ */
310
+ declare function pairwise<T>(source: Node<T>, opts?: ExtraOpts): Node<readonly [T, T]>;
311
+ /**
312
+ * Combines the latest value from each dependency whenever any dep settles (combineLatest).
313
+ *
314
+ * @param sources - Nodes to combine (variadic).
315
+ * @returns `Node<T>` - Tuple of latest values.
316
+ *
317
+ * @example
318
+ * ```ts
319
+ * import { combine, state } from "@graphrefly/graphrefly-ts";
320
+ *
321
+ * const n = combine(state(1), state("a"));
322
+ * ```
323
+ *
324
+ * @remarks
325
+ * Unlike RxJS `combineLatest`, this is named `combine`. Use the {@link combineLatest} alias
326
+ * if you prefer the RxJS name. Seed is always required for `scan`/`reduce` (no seedless mode).
327
+ *
328
+ * @category extra
329
+ */
330
+ declare function combine<const T extends readonly unknown[]>(...sources: {
331
+ [K in keyof T]: Node<T[K]>;
332
+ }): Node<T>;
333
+ /**
334
+ * When `primary` settles, emits `[primary, latestSecondary]`. `secondary` alone updates cache only.
335
+ *
336
+ * @param primary - Main stream.
337
+ * @param secondary - Latest value is paired on each primary emission.
338
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
339
+ * @returns `Node<readonly [A, B]>` - Paired stream.
340
+ *
341
+ * @example
342
+ * ```ts
343
+ * import { state, withLatestFrom } from "@graphrefly/graphrefly-ts";
344
+ *
345
+ * const n = withLatestFrom(state(1), state("x"));
346
+ * ```
347
+ *
348
+ * @category extra
349
+ */
350
+ declare function withLatestFrom<A, B>(primary: Node<A>, secondary: Node<B>, opts?: ExtraOpts): Node<readonly [A, B]>;
351
+ /**
352
+ * Merges **`DATA`** from any source with correct two-phase dirty tracking. **`COMPLETE`** after **all** sources complete (spec §1.3.5).
353
+ *
354
+ * @param sources - Nodes to merge (variadic; empty completes immediately).
355
+ * @returns `Node<T>` - Merged stream.
356
+ *
357
+ * @remarks
358
+ * **Ordering:** DIRTY/RESOLVED rules follow multi-source semantics in `~/src/graphrefly/GRAPHREFLY-SPEC.md`.
359
+ *
360
+ * @example
361
+ * ```ts
362
+ * import { merge, state } from "@graphrefly/graphrefly-ts";
363
+ *
364
+ * const n = merge(state(1), state(2));
365
+ * ```
366
+ *
367
+ * @category extra
368
+ */
369
+ declare function merge<T>(...sources: readonly Node<T>[]): Node<T>;
370
+ /**
371
+ * Zips one **`DATA`** from each source per cycle into a tuple. Only **`DATA`** enqueues (spec §1.3.3).
372
+ *
373
+ * @param sources - Nodes to zip (variadic).
374
+ * @returns `Node<T>` - Zipped tuples.
375
+ *
376
+ * @example
377
+ * ```ts
378
+ * import { state, zip } from "@graphrefly/graphrefly-ts";
379
+ *
380
+ * const n = zip(state(1), state(2));
381
+ * ```
382
+ *
383
+ * @category extra
384
+ */
385
+ declare function zip<const T extends readonly unknown[]>(...sources: {
386
+ [K in keyof T]: Node<T[K]>;
387
+ }): Node<T>;
388
+ /**
389
+ * Plays all of `firstSrc`, then all of `secondSrc`. **`DATA`** from `secondSrc` during phase one is buffered until handoff.
390
+ *
391
+ * @param firstSrc - First segment.
392
+ * @param secondSrc - Second segment.
393
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
394
+ * @returns `Node<T>` - Concatenated stream.
395
+ *
396
+ * @example
397
+ * ```ts
398
+ * import { concat, state } from "@graphrefly/graphrefly-ts";
399
+ *
400
+ * const n = concat(state(1), state(2));
401
+ * ```
402
+ *
403
+ * @category extra
404
+ */
405
+ declare function concat<T>(firstSrc: Node<T>, secondSrc: Node<T>, opts?: ExtraOpts): Node<T>;
406
+ /**
407
+ * First source to emit **`DATA`** wins; later traffic follows only the winner (Rx-style `race`).
408
+ *
409
+ * @param sources - Contestants (variadic; empty completes immediately; one node is identity).
410
+ * @returns `Node<T>` - Winning stream.
411
+ *
412
+ * @example
413
+ * ```ts
414
+ * import { race, state } from "@graphrefly/graphrefly-ts";
415
+ *
416
+ * const n = race(state(1), state(2));
417
+ * ```
418
+ *
419
+ * @category extra
420
+ */
421
+ declare function race<T>(...sources: readonly Node<T>[]): Node<T>;
422
+ /**
423
+ * Maps each settled value to an inner node; unsubscribes the previous inner (Rx-style `switchMap`).
424
+ *
425
+ * @param source - Upstream node.
426
+ * @param project - Maps each outer value to an inner source shape (`Node`, scalar, `PromiseLike`, `Iterable`, or `AsyncIterable`) coerced via {@link fromAny}.
427
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
428
+ * @returns `Node<R>` - Emissions from the active inner subscription.
429
+ * @example
430
+ * ```ts
431
+ * import { switchMap, state } from "@graphrefly/graphrefly-ts";
432
+ *
433
+ * const src = state(0);
434
+ * switchMap(src, (n) => state((n as number) * 2));
435
+ * ```
436
+ *
437
+ * @category extra
438
+ */
439
+ declare function switchMap<T, R>(source: Node<T>, project: (value: T) => NodeInput<R>, opts?: ExtraOpts): Node<R>;
440
+ /**
441
+ * Like {@link switchMap}, but ignores outer `DATA` while an inner subscription is active (`exhaustMap`).
442
+ *
443
+ * @param source - Upstream node.
444
+ * @param project - Maps each outer value to an inner source shape (`Node`, scalar, `PromiseLike`, `Iterable`, or `AsyncIterable`) coerced via {@link fromAny}.
445
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
446
+ * @returns `Node<R>` - Emissions from the active inner while it runs.
447
+ * @example
448
+ * ```ts
449
+ * import { exhaustMap, state } from "@graphrefly/graphrefly-ts";
450
+ *
451
+ * exhaustMap(state(0), () => state(1));
452
+ * ```
453
+ *
454
+ * @category extra
455
+ */
456
+ declare function exhaustMap<T, R>(source: Node<T>, project: (value: T) => NodeInput<R>, opts?: ExtraOpts): Node<R>;
457
+ /**
458
+ * Enqueues each outer value and subscribes to inners one at a time (`concatMap`).
459
+ *
460
+ * @param source - Upstream node.
461
+ * @param project - Maps each outer value to an inner source shape (`Node`, scalar, `PromiseLike`, `Iterable`, or `AsyncIterable`) coerced via {@link fromAny}.
462
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
463
+ * @returns `Node<R>` - Sequential concatenation of inner streams.
464
+ * @example
465
+ * ```ts
466
+ * import { concatMap, state } from "@graphrefly/graphrefly-ts";
467
+ *
468
+ * concatMap(state(0), (n) => state((n as number) + 1));
469
+ * ```
470
+ *
471
+ * @category extra
472
+ */
473
+ declare function concatMap<T, R>(source: Node<T>, project: (value: T) => NodeInput<R>, opts?: ExtraOpts & {
474
+ maxBuffer?: number;
475
+ }): Node<R>;
476
+ /** Options for {@link mergeMap}. */
477
+ type MergeMapOptions = ExtraOpts & {
478
+ /** Maximum number of concurrent inner subscriptions. Default: `Infinity` (unbounded). */
479
+ concurrent?: number;
480
+ };
481
+ /**
482
+ * Subscribes to inner nodes in parallel (up to `concurrent`) and merges outputs (`mergeMap` / `flatMap`).
483
+ *
484
+ * @param source - Upstream node.
485
+ * @param project - Maps each outer value to an inner source shape (`Node`, scalar, `PromiseLike`, `Iterable`, or `AsyncIterable`) coerced via {@link fromAny}.
486
+ * @param opts - Optional options including `concurrent` limit.
487
+ * @returns `Node<R>` - Merged output of all active inners; completes when the outer and every inner complete.
488
+ *
489
+ * @remarks
490
+ * **ERROR handling:** An `ERROR` from the outer source cancels all active inner
491
+ * subscriptions and propagates the error downstream. An `ERROR` from an inner
492
+ * subscription propagates downstream immediately but does **not** cancel sibling
493
+ * inner subscriptions — other active inners continue until they complete or the
494
+ * outer errors/completes. This is intentional: for parallel work, isolating
495
+ * failures per-inner is more useful than Rx-style "first error cancels all."
496
+ *
497
+ * @example
498
+ * ```ts
499
+ * import { mergeMap, state } from "@graphrefly/graphrefly-ts";
500
+ *
501
+ * // Unbounded (default)
502
+ * mergeMap(state(0), (n) => state((n as number) + 1));
503
+ *
504
+ * // Limited concurrency
505
+ * mergeMap(state(0), (n) => state((n as number) + 1), { concurrent: 3 });
506
+ * ```
507
+ *
508
+ * @category extra
509
+ */
510
+ declare function mergeMap<T, R>(source: Node<T>, project: (value: T) => NodeInput<R>, opts?: MergeMapOptions): Node<R>;
511
+ /**
512
+ * RxJS-named alias for {@link mergeMap} — projects each `DATA` to an inner node and merges outputs.
513
+ *
514
+ * @param source - Upstream node.
515
+ * @param project - Returns an inner `Node<R>` per value.
516
+ * @param opts - Optional concurrency cap and node options (excluding `describeKind`).
517
+ * @returns Merged projection; behavior matches `mergeMap`.
518
+ *
519
+ * @example
520
+ * ```ts
521
+ * import { flatMap, state } from "@graphrefly/graphrefly-ts";
522
+ *
523
+ * flatMap(state(0), (n) => state(n));
524
+ * ```
525
+ *
526
+ * @category extra
527
+ */
528
+ declare const flatMap: typeof mergeMap;
529
+ /**
530
+ * Delays phase-2 emissions by `ms` (timers). `DIRTY` still forwards immediately.
531
+ *
532
+ * @param source - Upstream node.
533
+ * @param ms - Delay in milliseconds.
534
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
535
+ * @returns `Node<T>` - Same values, shifted in time.
536
+ * @example
537
+ * ```ts
538
+ * import { delay, state } from "@graphrefly/graphrefly-ts";
539
+ *
540
+ * delay(state(1), 100);
541
+ * ```
542
+ *
543
+ * @category extra
544
+ */
545
+ declare function delay<T>(source: Node<T>, ms: number, opts?: ExtraOpts): Node<T>;
546
+ /**
547
+ * Emits the latest value only after `ms` quiet time since the last trigger (`debounce`).
548
+ *
549
+ * @param source - Upstream node.
550
+ * @param ms - Quiet window in milliseconds.
551
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
552
+ * @returns `Node<T>` - Debounced stream.
553
+ * @example
554
+ * ```ts
555
+ * import { debounce, state } from "@graphrefly/graphrefly-ts";
556
+ *
557
+ * debounce(state(0), 50);
558
+ * ```
559
+ *
560
+ * @category extra
561
+ */
562
+ declare function debounce<T>(source: Node<T>, ms: number, opts?: ExtraOpts): Node<T>;
563
+ type ThrottleOptions = {
564
+ leading?: boolean;
565
+ trailing?: boolean;
566
+ };
567
+ /**
568
+ * Rate-limits emissions to at most once per `ms` window (`throttleTime`).
569
+ *
570
+ * @param source - Upstream node.
571
+ * @param ms - Minimum spacing in milliseconds.
572
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`) plus `leading` / `trailing`.
573
+ * @returns `Node<T>` - Throttled stream.
574
+ * @example
575
+ * ```ts
576
+ * import { throttle, state } from "@graphrefly/graphrefly-ts";
577
+ *
578
+ * throttle(state(0), 1_000, { trailing: false });
579
+ * ```
580
+ *
581
+ * @category extra
582
+ */
583
+ declare function throttle<T>(source: Node<T>, ms: number, opts?: ExtraOpts & ThrottleOptions): Node<T>;
584
+ /**
585
+ * Emits the most recent source value whenever `notifier` emits `DATA` (`sample`).
586
+ *
587
+ * Source `COMPLETE` stops sampling (clears held value); notifier `COMPLETE` terminates the
588
+ * operator. `ERROR` from either dep terminates immediately. At most one terminal message is
589
+ * emitted downstream (latch). Supports `resubscribable` — `ctx.store` resets automatically.
590
+ *
591
+ * @param source - Node whose latest value is sampled.
592
+ * @param notifier - When this node emits `DATA`, a sample is taken.
593
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
594
+ * @returns `Node<T>` - Sampled snapshots of `source`.
595
+ * @example
596
+ * ```ts
597
+ * import { sample, state } from "@graphrefly/graphrefly-ts";
598
+ *
599
+ * sample(state(1), state(0));
600
+ * ```
601
+ *
602
+ * @category extra
603
+ */
604
+ declare function sample<T>(source: Node<T>, notifier: Node<unknown>, opts?: ExtraOpts): Node<T>;
605
+ /**
606
+ * After each source `DATA`, waits `ms` then emits the latest value if another `DATA` has not arrived (`auditTime` / trailing window).
607
+ *
608
+ * @param source - Upstream node.
609
+ * @param ms - Window in milliseconds after each `DATA`.
610
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
611
+ * @returns `Node<T>` - Trailing-edge sampled stream.
612
+ * @example
613
+ * ```ts
614
+ * import { audit, state } from "@graphrefly/graphrefly-ts";
615
+ *
616
+ * audit(state(0), 100);
617
+ * ```
618
+ *
619
+ * @category extra
620
+ */
621
+ declare function audit<T>(source: Node<T>, ms: number, opts?: ExtraOpts): Node<T>;
622
+ /**
623
+ * Errors if no `DATA` arrives within `ms` after subscribe or after the previous `DATA`.
624
+ *
625
+ * @param source - Upstream node.
626
+ * @param ms - Idle budget in milliseconds.
627
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`) and `with` for a custom error payload.
628
+ * @returns `Node<T>` - Pass-through with idle watchdog.
629
+ * @example
630
+ * ```ts
631
+ * import { timeout, state } from "@graphrefly/graphrefly-ts";
632
+ *
633
+ * timeout(state(0), 5_000);
634
+ * ```
635
+ *
636
+ * @category extra
637
+ */
638
+ declare function timeout<T>(source: Node<T>, ms: number, opts?: ExtraOpts & {
639
+ with?: unknown;
640
+ }): Node<T>;
641
+ /**
642
+ * Buffers source `DATA` values; flushes an array when `notifier` settles (`buffer`).
643
+ *
644
+ * @param source - Upstream node.
645
+ * @param notifier - Flush trigger on each settlement.
646
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
647
+ * @returns `Node<T[]>` - Emits buffered arrays (may be empty-handled via `RESOLVED` when nothing buffered).
648
+ * @example
649
+ * ```ts
650
+ * import { buffer, state } from "@graphrefly/graphrefly-ts";
651
+ *
652
+ * buffer(state(0), state(0));
653
+ * ```
654
+ *
655
+ * @category extra
656
+ */
657
+ declare function buffer<T>(source: Node<T>, notifier: Node<unknown>, opts?: ExtraOpts): Node<T[]>;
658
+ /**
659
+ * Batches consecutive `DATA` values into arrays of length `count` (`bufferCount` / `windowCount`).
660
+ *
661
+ * @param source - Upstream node.
662
+ * @param count - Buffer size before emit; must be > 0.
663
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
664
+ * @returns `Node<T[]>` - Emits fixed-size arrays; remainder flushes on `COMPLETE`.
665
+ * @example
666
+ * ```ts
667
+ * import { bufferCount, state } from "@graphrefly/graphrefly-ts";
668
+ *
669
+ * bufferCount(state(0), 3);
670
+ * ```
671
+ *
672
+ * @category extra
673
+ */
674
+ declare function bufferCount<T>(source: Node<T>, count: number, opts?: ExtraOpts): Node<T[]>;
675
+ /**
676
+ * Splits source `DATA` into sub-nodes of `count` values each. Each sub-node completes after `count` items or when source completes.
677
+ *
678
+ * @param source - Upstream node.
679
+ * @param count - Items per window.
680
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
681
+ * @returns `Node<Node<T>>` - Each emission is a sub-node carrying that window's values.
682
+ *
683
+ * @example
684
+ * ```ts
685
+ * import { windowCount, state } from "@graphrefly/graphrefly-ts";
686
+ *
687
+ * windowCount(state(0), 3);
688
+ * ```
689
+ *
690
+ * @category extra
691
+ */
692
+ declare function windowCount<T>(source: Node<T>, count: number, opts?: ExtraOpts): Node<Node<T>>;
693
+ /**
694
+ * Flushes buffered `DATA` values every `ms` (`bufferTime` / `windowTime`).
695
+ *
696
+ * @param source - Upstream node.
697
+ * @param ms - Flush interval in milliseconds.
698
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
699
+ * @returns `Node<T[]>` - Time-windowed batches.
700
+ * @example
701
+ * ```ts
702
+ * import { bufferTime, state } from "@graphrefly/graphrefly-ts";
703
+ *
704
+ * bufferTime(state(0), 250);
705
+ * ```
706
+ *
707
+ * @category extra
708
+ */
709
+ declare function bufferTime<T>(source: Node<T>, ms: number, opts?: ExtraOpts): Node<T[]>;
710
+ /**
711
+ * Splits source `DATA` into time-windowed sub-nodes; each window lasts `ms`.
712
+ *
713
+ * @param source - Upstream node.
714
+ * @param ms - Window duration in milliseconds.
715
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
716
+ * @returns `Node<Node<T>>` - Each emission is a sub-node carrying that window's values.
717
+ *
718
+ * @example
719
+ * ```ts
720
+ * import { windowTime, state } from "@graphrefly/graphrefly-ts";
721
+ *
722
+ * windowTime(state(0), 500);
723
+ * ```
724
+ *
725
+ * @category extra
726
+ */
727
+ declare function windowTime<T>(source: Node<T>, ms: number, opts?: ExtraOpts): Node<Node<T>>;
728
+ /**
729
+ * Splits source `DATA` into sub-nodes, opening a new window each time `notifier` emits `DATA`.
730
+ *
731
+ * @param source - Upstream node.
732
+ * @param notifier - Each `DATA` from `notifier` closes the current window and opens a new one.
733
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
734
+ * @returns `Node<Node<T>>` - Each emission is a sub-node carrying that window's values.
735
+ *
736
+ * @example
737
+ * ```ts
738
+ * import { state, window } from "@graphrefly/graphrefly-ts";
739
+ *
740
+ * window(state(0), state(0));
741
+ * ```
742
+ *
743
+ * @category extra
744
+ */
745
+ declare function window<T>(source: Node<T>, notifier: Node<unknown>, opts?: ExtraOpts): Node<Node<T>>;
746
+ /**
747
+ * Increments on each tick (`interval`); uses `setInterval` via {@link producer}.
748
+ *
749
+ * @param periodMs - Time between ticks.
750
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
751
+ * @returns `Node<number>` - Emits `0`, `1`, `2`, … while subscribed.
752
+ * @example
753
+ * ```ts
754
+ * import { interval } from "@graphrefly/graphrefly-ts";
755
+ *
756
+ * interval(1_000);
757
+ * ```
758
+ *
759
+ * @category extra
760
+ */
761
+ declare function interval(periodMs: number, opts?: ExtraOpts): Node<number>;
762
+ /**
763
+ * Subscribes to `source` repeatedly (`count` times, sequentially). Best with a fresh or `resubscribable` source.
764
+ *
765
+ * @param source - Upstream node to replay.
766
+ * @param count - Number of subscription rounds.
767
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
768
+ * @returns `Node<T>` - Forwards each round then completes after the last inner `COMPLETE`.
769
+ * @example
770
+ * ```ts
771
+ * import { repeat, state } from "@graphrefly/graphrefly-ts";
772
+ *
773
+ * repeat(state(1, { resubscribable: true }), 2);
774
+ * ```
775
+ *
776
+ * @category extra
777
+ */
778
+ declare function repeat<T>(source: Node<T>, count: number, opts?: ExtraOpts): Node<T>;
779
+ /**
780
+ * Identity passthrough — `pausable()` has been promoted to default node behavior in v5 (§4).
781
+ *
782
+ * @deprecated Default node behavior now handles PAUSE/RESUME. This operator is a no-op
783
+ * identity passthrough kept only for migration compatibility.
784
+ *
785
+ * @param source - Upstream node.
786
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
787
+ * @returns `Node<T>` - Pass-through (identity).
788
+ * @example
789
+ * ```ts
790
+ * import { pausable, state } from "@graphrefly/graphrefly-ts";
791
+ *
792
+ * // No longer needed — default nodes handle PAUSE/RESUME.
793
+ * const s = state(0);
794
+ * pausable(s); // identity passthrough
795
+ * ```
796
+ *
797
+ * @category extra
798
+ */
799
+ declare function pausable<T>(source: Node<T>, opts?: ExtraOpts): Node<T>;
800
+ /**
801
+ * Replaces an upstream `ERROR` with a recovered value (`catchError`-style).
802
+ *
803
+ * @param source - Upstream node.
804
+ * @param recover - Maps the error payload to a replacement value; if it throws, `ERROR` is forwarded.
805
+ * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
806
+ * @returns `Node<T>` - Recovered stream.
807
+ * @example
808
+ * ```ts
809
+ * import { rescue, state } from "@graphrefly/graphrefly-ts";
810
+ *
811
+ * rescue(state(0), () => 0);
812
+ * ```
813
+ *
814
+ * @category extra
815
+ */
816
+ declare function rescue<T>(source: Node<T>, recover: (err: unknown) => T, opts?: ExtraOpts): Node<T>;
817
+ /**
818
+ * Forwards upstream `DATA` only while `control.get()` is truthy; when closed, emits `RESOLVED`
819
+ * instead of repeating the last value (value-level valve). For protocol pause/resume, use default
820
+ * node PAUSE/RESUME behavior.
821
+ *
822
+ * @param source - Upstream value node.
823
+ * @param control - Boolean node; when falsy, output stays "closed" for that tick.
824
+ * @param opts - Optional node options (excluding `describeKind`).
825
+ * @returns `Node<T>` gated by `control`.
826
+ *
827
+ * @example
828
+ * ```ts
829
+ * import { valve, state } from "@graphrefly/graphrefly-ts";
830
+ *
831
+ * const data = state(1);
832
+ * const open = state(true);
833
+ * valve(data, open);
834
+ * ```
835
+ *
836
+ * @category extra
837
+ */
838
+ declare function valve<T>(source: Node<T>, control: Node<boolean>, opts?: ExtraOpts): Node<T>;
839
+ /**
840
+ * RxJS-named alias for {@link combine} — emits when any dep updates with latest tuple of values.
841
+ *
842
+ * @param sources - Upstream nodes as separate arguments (same calling shape as `combine`).
843
+ * @returns Combined node; signature matches `combine`.
844
+ *
845
+ * @example
846
+ * ```ts
847
+ * import { combineLatest, state } from "@graphrefly/graphrefly-ts";
848
+ *
849
+ * const n = combineLatest(state(1), state("a"));
850
+ * ```
851
+ *
852
+ * @category extra
853
+ */
854
+ declare const combineLatest: typeof combine;
855
+ /**
856
+ * RxJS-named alias for {@link debounce} — drops rapid `DATA` until `ms` of quiet.
857
+ *
858
+ * @param source - Upstream node.
859
+ * @param ms - Quiet period in milliseconds.
860
+ * @param opts - Optional node options (excluding `describeKind`).
861
+ * @returns Debounced node; behavior matches `debounce`.
862
+ *
863
+ * @example
864
+ * ```ts
865
+ * import { debounceTime, state } from "@graphrefly/graphrefly-ts";
866
+ *
867
+ * debounceTime(state(0), 100);
868
+ * ```
869
+ *
870
+ * @category extra
871
+ */
872
+ declare const debounceTime: typeof debounce;
873
+ /**
874
+ * RxJS-named alias for {@link throttle} — emits on leading/trailing edges within `ms`.
875
+ *
876
+ * @param source - Upstream node.
877
+ * @param ms - Minimum spacing in milliseconds.
878
+ * @param opts - Optional throttle shape (`leading` / `trailing`) and node options.
879
+ * @returns Throttled node; behavior matches `throttle`.
880
+ *
881
+ * @example
882
+ * ```ts
883
+ * import { throttleTime, state } from "@graphrefly/graphrefly-ts";
884
+ *
885
+ * throttleTime(state(0), 100);
886
+ * ```
887
+ *
888
+ * @category extra
889
+ */
890
+ declare const throttleTime: typeof throttle;
891
+ /**
892
+ * RxJS-named alias for {@link rescue} — replaces upstream `ERROR` with a recovered value.
893
+ *
894
+ * @param source - Upstream node.
895
+ * @param recover - Maps error payload to replacement value.
896
+ * @param opts - Optional node options (excluding `describeKind`).
897
+ * @returns Recovered stream; behavior matches `rescue`.
898
+ *
899
+ * @example
900
+ * ```ts
901
+ * import { catchError, state } from "@graphrefly/graphrefly-ts";
902
+ *
903
+ * catchError(state(0), () => 0);
904
+ * ```
905
+ *
906
+ * @category extra
907
+ */
908
+ declare const catchError: typeof rescue;
909
+
910
+ export { type MergeMapOptions, type TapObserver, type ThrottleOptions, audit, buffer, bufferCount, bufferTime, catchError, combine, combineLatest, concat, concatMap, debounce, debounceTime, delay, distinctUntilChanged, elementAt, exhaustMap, filter, find, first, flatMap, interval, last, map, merge, mergeMap, pairwise, pausable, race, reduce, repeat, rescue, sample, scan, skip, switchMap, take, takeUntil, takeWhile, tap, throttle, throttleTime, timeout, valve, window, windowCount, windowTime, withLatestFrom, zip };