@graphrefly/graphrefly 0.43.0 → 0.45.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 (422) hide show
  1. package/README.md +21 -17
  2. package/dist/compat/index.cjs +20 -10
  3. package/dist/compat/index.cjs.map +1 -0
  4. package/dist/compat/index.d.cts +1 -22
  5. package/dist/compat/index.d.ts +1 -22
  6. package/dist/compat/index.js +3 -1
  7. package/dist/compat/index.js.map +1 -0
  8. package/dist/compat/jotai/index.cjs +21 -1
  9. package/dist/compat/jotai/index.cjs.map +1 -0
  10. package/dist/compat/jotai/index.d.cts +1 -2
  11. package/dist/compat/jotai/index.d.ts +1 -2
  12. package/dist/compat/jotai/index.js +3 -1
  13. package/dist/compat/jotai/index.js.map +1 -0
  14. package/dist/compat/nanostores/index.cjs +21 -1
  15. package/dist/compat/nanostores/index.cjs.map +1 -0
  16. package/dist/compat/nanostores/index.d.cts +1 -2
  17. package/dist/compat/nanostores/index.d.ts +1 -2
  18. package/dist/compat/nanostores/index.js +3 -1
  19. package/dist/compat/nanostores/index.js.map +1 -0
  20. package/dist/compat/nestjs/index.cjs +20 -10
  21. package/dist/compat/nestjs/index.cjs.map +1 -0
  22. package/dist/compat/nestjs/index.d.cts +1 -13
  23. package/dist/compat/nestjs/index.d.ts +1 -13
  24. package/dist/compat/nestjs/index.js +3 -1
  25. package/dist/compat/nestjs/index.js.map +1 -0
  26. package/dist/compat/react/index.cjs +21 -1
  27. package/dist/compat/react/index.cjs.map +1 -0
  28. package/dist/compat/react/index.d.cts +1 -2
  29. package/dist/compat/react/index.d.ts +1 -2
  30. package/dist/compat/react/index.js +3 -1
  31. package/dist/compat/react/index.js.map +1 -0
  32. package/dist/compat/solid/index.cjs +21 -1
  33. package/dist/compat/solid/index.cjs.map +1 -0
  34. package/dist/compat/solid/index.d.cts +1 -2
  35. package/dist/compat/solid/index.d.ts +1 -2
  36. package/dist/compat/solid/index.js +3 -1
  37. package/dist/compat/solid/index.js.map +1 -0
  38. package/dist/compat/svelte/index.cjs +21 -1
  39. package/dist/compat/svelte/index.cjs.map +1 -0
  40. package/dist/compat/svelte/index.d.cts +1 -2
  41. package/dist/compat/svelte/index.d.ts +1 -2
  42. package/dist/compat/svelte/index.js +3 -1
  43. package/dist/compat/svelte/index.js.map +1 -0
  44. package/dist/compat/vue/index.cjs +21 -1
  45. package/dist/compat/vue/index.cjs.map +1 -0
  46. package/dist/compat/vue/index.d.cts +1 -3
  47. package/dist/compat/vue/index.d.ts +1 -3
  48. package/dist/compat/vue/index.js +3 -1
  49. package/dist/compat/vue/index.js.map +1 -0
  50. package/dist/compat/zustand/index.cjs +21 -3
  51. package/dist/compat/zustand/index.cjs.map +1 -0
  52. package/dist/compat/zustand/index.d.cts +1 -6
  53. package/dist/compat/zustand/index.d.ts +1 -6
  54. package/dist/compat/zustand/index.js +3 -1
  55. package/dist/compat/zustand/index.js.map +1 -0
  56. package/dist/core/index.cjs +21 -1
  57. package/dist/core/index.cjs.map +1 -0
  58. package/dist/core/index.d.cts +1 -4
  59. package/dist/core/index.d.ts +1 -4
  60. package/dist/core/index.js +3 -1
  61. package/dist/core/index.js.map +1 -0
  62. package/dist/extra/browser.cjs +21 -1
  63. package/dist/extra/browser.cjs.map +1 -0
  64. package/dist/extra/browser.d.cts +1 -4
  65. package/dist/extra/browser.d.ts +1 -4
  66. package/dist/extra/browser.js +3 -1
  67. package/dist/extra/browser.js.map +1 -0
  68. package/dist/extra/index.cjs +20 -19
  69. package/dist/extra/index.cjs.map +1 -0
  70. package/dist/extra/index.d.cts +1 -17
  71. package/dist/extra/index.d.ts +1 -17
  72. package/dist/extra/index.js +3 -1
  73. package/dist/extra/index.js.map +1 -0
  74. package/dist/extra/node.cjs +21 -2
  75. package/dist/extra/node.cjs.map +1 -0
  76. package/dist/extra/node.d.cts +1 -187
  77. package/dist/extra/node.d.ts +1 -187
  78. package/dist/extra/node.js +3 -2
  79. package/dist/extra/node.js.map +1 -0
  80. package/dist/extra/operators.cjs +21 -1
  81. package/dist/extra/operators.cjs.map +1 -0
  82. package/dist/extra/operators.d.cts +1 -950
  83. package/dist/extra/operators.d.ts +1 -950
  84. package/dist/extra/operators.js +3 -1
  85. package/dist/extra/operators.js.map +1 -0
  86. package/dist/extra/reactive.cjs +21 -1
  87. package/dist/extra/reactive.cjs.map +1 -0
  88. package/dist/extra/reactive.d.cts +1 -353
  89. package/dist/extra/reactive.d.ts +1 -353
  90. package/dist/extra/reactive.js +3 -1
  91. package/dist/extra/reactive.js.map +1 -0
  92. package/dist/extra/render/index.cjs +21 -5
  93. package/dist/extra/render/index.cjs.map +1 -0
  94. package/dist/extra/render/index.d.cts +1 -183
  95. package/dist/extra/render/index.d.ts +1 -183
  96. package/dist/extra/render/index.js +3 -1
  97. package/dist/extra/render/index.js.map +1 -0
  98. package/dist/extra/sources.cjs +21 -3
  99. package/dist/extra/sources.cjs.map +1 -0
  100. package/dist/extra/sources.d.cts +1 -584
  101. package/dist/extra/sources.d.ts +1 -584
  102. package/dist/extra/sources.js +3 -1
  103. package/dist/extra/sources.js.map +1 -0
  104. package/dist/extra/storage-browser.cjs +21 -1
  105. package/dist/extra/storage-browser.cjs.map +1 -0
  106. package/dist/extra/storage-browser.d.cts +1 -37
  107. package/dist/extra/storage-browser.d.ts +1 -37
  108. package/dist/extra/storage-browser.js +3 -1
  109. package/dist/extra/storage-browser.js.map +1 -0
  110. package/dist/extra/storage-core.cjs +21 -1
  111. package/dist/extra/storage-core.cjs.map +1 -0
  112. package/dist/extra/storage-core.d.cts +1 -28
  113. package/dist/extra/storage-core.d.ts +1 -28
  114. package/dist/extra/storage-core.js +3 -1
  115. package/dist/extra/storage-core.js.map +1 -0
  116. package/dist/extra/storage-node.cjs +20 -0
  117. package/dist/extra/storage-node.cjs.map +1 -0
  118. package/dist/extra/storage-node.d.cts +1 -2
  119. package/dist/extra/storage-node.d.ts +1 -2
  120. package/dist/extra/storage-node.js +3 -0
  121. package/dist/extra/storage-node.js.map +1 -0
  122. package/dist/extra/storage-tiers-browser.cjs +21 -1
  123. package/dist/extra/storage-tiers-browser.cjs.map +1 -0
  124. package/dist/extra/storage-tiers-browser.d.cts +1 -120
  125. package/dist/extra/storage-tiers-browser.d.ts +1 -120
  126. package/dist/extra/storage-tiers-browser.js +3 -1
  127. package/dist/extra/storage-tiers-browser.js.map +1 -0
  128. package/dist/extra/storage-tiers-node.cjs +21 -1
  129. package/dist/extra/storage-tiers-node.cjs.map +1 -0
  130. package/dist/extra/storage-tiers-node.d.cts +1 -210
  131. package/dist/extra/storage-tiers-node.d.ts +1 -210
  132. package/dist/extra/storage-tiers-node.js +3 -1
  133. package/dist/extra/storage-tiers-node.js.map +1 -0
  134. package/dist/extra/storage-tiers.cjs +21 -1
  135. package/dist/extra/storage-tiers.cjs.map +1 -0
  136. package/dist/extra/storage-tiers.d.cts +1 -412
  137. package/dist/extra/storage-tiers.d.ts +1 -412
  138. package/dist/extra/storage-tiers.js +3 -1
  139. package/dist/extra/storage-tiers.js.map +1 -0
  140. package/dist/extra/storage-wal.cjs +21 -0
  141. package/dist/extra/storage-wal.cjs.map +1 -0
  142. package/dist/extra/storage-wal.d.cts +1 -0
  143. package/dist/extra/storage-wal.d.ts +1 -0
  144. package/dist/extra/storage-wal.js +3 -0
  145. package/dist/extra/storage-wal.js.map +1 -0
  146. package/dist/graph/index.cjs +21 -7
  147. package/dist/graph/index.cjs.map +1 -0
  148. package/dist/graph/index.d.cts +1 -7
  149. package/dist/graph/index.d.ts +1 -7
  150. package/dist/graph/index.js +3 -1
  151. package/dist/graph/index.js.map +1 -0
  152. package/dist/index.cjs +20 -227
  153. package/dist/index.cjs.map +1 -0
  154. package/dist/index.d.cts +45 -96
  155. package/dist/index.d.ts +45 -96
  156. package/dist/index.js +3 -1
  157. package/dist/index.js.map +1 -0
  158. package/dist/patterns/ai/browser.cjs +20 -7
  159. package/dist/patterns/ai/browser.cjs.map +1 -0
  160. package/dist/patterns/ai/browser.d.cts +1 -127
  161. package/dist/patterns/ai/browser.d.ts +1 -127
  162. package/dist/patterns/ai/browser.js +3 -3
  163. package/dist/patterns/ai/browser.js.map +1 -0
  164. package/dist/patterns/ai/index.cjs +20 -73
  165. package/dist/patterns/ai/index.cjs.map +1 -0
  166. package/dist/patterns/ai/index.d.cts +1 -21
  167. package/dist/patterns/ai/index.d.ts +1 -21
  168. package/dist/patterns/ai/index.js +3 -1
  169. package/dist/patterns/ai/index.js.map +1 -0
  170. package/dist/patterns/ai/node.cjs +21 -1
  171. package/dist/patterns/ai/node.cjs.map +1 -0
  172. package/dist/patterns/ai/node.d.cts +1 -59
  173. package/dist/patterns/ai/node.d.ts +1 -59
  174. package/dist/patterns/ai/node.js +3 -1
  175. package/dist/patterns/ai/node.js.map +1 -0
  176. package/dist/patterns/cqrs/index.cjs +21 -3
  177. package/dist/patterns/cqrs/index.cjs.map +1 -0
  178. package/dist/patterns/cqrs/index.d.cts +1 -8
  179. package/dist/patterns/cqrs/index.d.ts +1 -8
  180. package/dist/patterns/cqrs/index.js +3 -1
  181. package/dist/patterns/cqrs/index.js.map +1 -0
  182. package/dist/patterns/demo-shell/index.cjs +21 -5
  183. package/dist/patterns/demo-shell/index.cjs.map +1 -0
  184. package/dist/patterns/demo-shell/index.d.cts +1 -7
  185. package/dist/patterns/demo-shell/index.d.ts +1 -7
  186. package/dist/patterns/demo-shell/index.js +3 -1
  187. package/dist/patterns/demo-shell/index.js.map +1 -0
  188. package/dist/patterns/domain-templates/index.cjs +21 -3
  189. package/dist/patterns/domain-templates/index.cjs.map +1 -0
  190. package/dist/patterns/domain-templates/index.d.cts +1 -6
  191. package/dist/patterns/domain-templates/index.d.ts +1 -6
  192. package/dist/patterns/domain-templates/index.js +3 -1
  193. package/dist/patterns/domain-templates/index.js.map +1 -0
  194. package/dist/patterns/graphspec/index.cjs +21 -86
  195. package/dist/patterns/graphspec/index.cjs.map +1 -0
  196. package/dist/patterns/graphspec/index.d.cts +1 -8
  197. package/dist/patterns/graphspec/index.d.ts +1 -8
  198. package/dist/patterns/graphspec/index.js +3 -1
  199. package/dist/patterns/graphspec/index.js.map +1 -0
  200. package/dist/patterns/harness/index.cjs +21 -48
  201. package/dist/patterns/harness/index.cjs.map +1 -0
  202. package/dist/patterns/harness/index.d.cts +1 -14
  203. package/dist/patterns/harness/index.d.ts +1 -14
  204. package/dist/patterns/harness/index.js +3 -1
  205. package/dist/patterns/harness/index.js.map +1 -0
  206. package/dist/patterns/inspect/index.cjs +21 -3
  207. package/dist/patterns/inspect/index.cjs.map +1 -0
  208. package/dist/patterns/inspect/index.d.cts +1 -9
  209. package/dist/patterns/inspect/index.d.ts +1 -9
  210. package/dist/patterns/inspect/index.js +3 -1
  211. package/dist/patterns/inspect/index.js.map +1 -0
  212. package/dist/patterns/job-queue/index.cjs +21 -3
  213. package/dist/patterns/job-queue/index.cjs.map +1 -0
  214. package/dist/patterns/job-queue/index.d.cts +1 -9
  215. package/dist/patterns/job-queue/index.d.ts +1 -9
  216. package/dist/patterns/job-queue/index.js +3 -1
  217. package/dist/patterns/job-queue/index.js.map +1 -0
  218. package/dist/patterns/memory/index.cjs +21 -3
  219. package/dist/patterns/memory/index.cjs.map +1 -0
  220. package/dist/patterns/memory/index.d.cts +1 -8
  221. package/dist/patterns/memory/index.d.ts +1 -8
  222. package/dist/patterns/memory/index.js +3 -1
  223. package/dist/patterns/memory/index.js.map +1 -0
  224. package/dist/patterns/messaging/index.cjs +21 -3
  225. package/dist/patterns/messaging/index.cjs.map +1 -0
  226. package/dist/patterns/messaging/index.d.cts +1 -7
  227. package/dist/patterns/messaging/index.d.ts +1 -7
  228. package/dist/patterns/messaging/index.js +3 -1
  229. package/dist/patterns/messaging/index.js.map +1 -0
  230. package/dist/patterns/orchestration/index.cjs +21 -3
  231. package/dist/patterns/orchestration/index.cjs.map +1 -0
  232. package/dist/patterns/orchestration/index.d.cts +1 -9
  233. package/dist/patterns/orchestration/index.d.ts +1 -9
  234. package/dist/patterns/orchestration/index.js +3 -1
  235. package/dist/patterns/orchestration/index.js.map +1 -0
  236. package/dist/patterns/process/index.cjs +21 -1
  237. package/dist/patterns/process/index.cjs.map +1 -0
  238. package/dist/patterns/process/index.d.cts +1 -10
  239. package/dist/patterns/process/index.d.ts +1 -10
  240. package/dist/patterns/process/index.js +3 -1
  241. package/dist/patterns/process/index.js.map +1 -0
  242. package/dist/patterns/reactive-layout/index.cjs +21 -4
  243. package/dist/patterns/reactive-layout/index.cjs.map +1 -0
  244. package/dist/patterns/reactive-layout/index.d.cts +1 -7
  245. package/dist/patterns/reactive-layout/index.d.ts +1 -7
  246. package/dist/patterns/reactive-layout/index.js +3 -1
  247. package/dist/patterns/reactive-layout/index.js.map +1 -0
  248. package/dist/patterns/reduction/index.cjs +21 -3
  249. package/dist/patterns/reduction/index.cjs.map +1 -0
  250. package/dist/patterns/reduction/index.d.cts +1 -6
  251. package/dist/patterns/reduction/index.d.ts +1 -6
  252. package/dist/patterns/reduction/index.js +3 -1
  253. package/dist/patterns/reduction/index.js.map +1 -0
  254. package/dist/patterns/surface/index.cjs +21 -13
  255. package/dist/patterns/surface/index.cjs.map +1 -0
  256. package/dist/patterns/surface/index.d.cts +1 -9
  257. package/dist/patterns/surface/index.d.ts +1 -9
  258. package/dist/patterns/surface/index.js +3 -1
  259. package/dist/patterns/surface/index.js.map +1 -0
  260. package/dist/patterns/topology-view/index.cjs +21 -0
  261. package/dist/patterns/topology-view/index.cjs.map +1 -0
  262. package/dist/patterns/topology-view/index.d.cts +1 -0
  263. package/dist/patterns/topology-view/index.d.ts +1 -0
  264. package/dist/patterns/topology-view/index.js +3 -0
  265. package/dist/patterns/topology-view/index.js.map +1 -0
  266. package/dist/testing/index.cjs +21 -0
  267. package/dist/testing/index.cjs.map +1 -0
  268. package/dist/testing/index.d.cts +1 -0
  269. package/dist/testing/index.d.ts +1 -0
  270. package/dist/testing/index.js +3 -0
  271. package/dist/testing/index.js.map +1 -0
  272. package/package.json +608 -584
  273. package/dist/backoff-HPZMEZNF.js +0 -1
  274. package/dist/cascading-CH-_VwG9.d.cts +0 -199
  275. package/dist/cascading-OgKQZjsa.d.ts +0 -199
  276. package/dist/chunk-35JTVPOX.js +0 -1
  277. package/dist/chunk-3G5U5QNE.js +0 -5
  278. package/dist/chunk-3XDYJRYU.js +0 -1
  279. package/dist/chunk-4I45FVQS.js +0 -1
  280. package/dist/chunk-4VVTGLXJ.js +0 -1
  281. package/dist/chunk-4YAN45KM.js +0 -1
  282. package/dist/chunk-5QDBSZBV.js +0 -1
  283. package/dist/chunk-626TESAC.js +0 -3
  284. package/dist/chunk-6HOSXQKF.js +0 -1
  285. package/dist/chunk-6QZNQS5B.js +0 -1
  286. package/dist/chunk-C72GO4IZ.js +0 -1
  287. package/dist/chunk-CE72X3WO.js +0 -1
  288. package/dist/chunk-CK2E7BTU.js +0 -1
  289. package/dist/chunk-CLD3F4R5.js +0 -1
  290. package/dist/chunk-CUNIRONA.js +0 -1
  291. package/dist/chunk-D27JNOLZ.js +0 -1
  292. package/dist/chunk-D5RFJOZ2.js +0 -1
  293. package/dist/chunk-EBW4V6JN.js +0 -1
  294. package/dist/chunk-ESMPEKEV.js +0 -1
  295. package/dist/chunk-F3IGTWCQ.js +0 -1
  296. package/dist/chunk-F672GV32.js +0 -1
  297. package/dist/chunk-FDQGFWLF.js +0 -1
  298. package/dist/chunk-FG4TKHMC.js +0 -1
  299. package/dist/chunk-GPW2V3RE.js +0 -1
  300. package/dist/chunk-I7IGYPSL.js +0 -1
  301. package/dist/chunk-INQD2KRQ.js +0 -1
  302. package/dist/chunk-JNWRYDJN.js +0 -1
  303. package/dist/chunk-JQFH2DV6.js +0 -1
  304. package/dist/chunk-K2Q24F5T.js +0 -1
  305. package/dist/chunk-KGKJCHEK.js +0 -1
  306. package/dist/chunk-KRH66M4O.js +0 -1
  307. package/dist/chunk-KVV66NN2.js +0 -1
  308. package/dist/chunk-L6NSJVJZ.js +0 -1
  309. package/dist/chunk-LYCLF26R.js +0 -1
  310. package/dist/chunk-NNKJUORL.js +0 -1
  311. package/dist/chunk-NON4NLIC.js +0 -45
  312. package/dist/chunk-O2BLLH7M.js +0 -18
  313. package/dist/chunk-OCKEEPRJ.js +0 -2
  314. package/dist/chunk-OFZG3TB3.js +0 -9
  315. package/dist/chunk-OYJKFY7V.js +0 -1
  316. package/dist/chunk-P6C4WHZO.js +0 -5
  317. package/dist/chunk-PT7W5FCD.js +0 -5
  318. package/dist/chunk-Q4U3A3L5.js +0 -1
  319. package/dist/chunk-QE4IGY7I.js +0 -61
  320. package/dist/chunk-QYADASLV.js +0 -1
  321. package/dist/chunk-QYVXF7GW.js +0 -1
  322. package/dist/chunk-S3EEIPO7.js +0 -1
  323. package/dist/chunk-SUWT3ZON.js +0 -1
  324. package/dist/chunk-TPKQW72B.js +0 -1
  325. package/dist/chunk-TSOYJ743.js +0 -1
  326. package/dist/chunk-TZQPPQEQ.js +0 -1
  327. package/dist/chunk-V5A7M7RJ.js +0 -1
  328. package/dist/chunk-VIMF6LGM.js +0 -1
  329. package/dist/chunk-VJLMUKOI.js +0 -1
  330. package/dist/chunk-VN6RDSK2.js +0 -1
  331. package/dist/chunk-VNC3TMVY.js +0 -1
  332. package/dist/chunk-VOPGGIL7.js +0 -1
  333. package/dist/chunk-VQ4A6T2A.js +0 -1
  334. package/dist/chunk-XG62INFA.js +0 -1
  335. package/dist/chunk-Y4NI3X7O.js +0 -84
  336. package/dist/content-addressed-storage-4-ST1tYk.d.cts +0 -124
  337. package/dist/content-addressed-storage-DuYMjV7o.d.ts +0 -124
  338. package/dist/decay-2ZukgQ4o.d.cts +0 -112
  339. package/dist/decay-CdEBmDIs.d.ts +0 -112
  340. package/dist/fallback-CqYVLL6X.d.ts +0 -250
  341. package/dist/fallback-Ctlj2tMY.d.cts +0 -250
  342. package/dist/graph-7VguS7a4.d.ts +0 -1668
  343. package/dist/graph-C4SHb3Ly.d.cts +0 -1668
  344. package/dist/index-0rKFCVFp.d.cts +0 -557
  345. package/dist/index-B-i4_g3k.d.ts +0 -651
  346. package/dist/index-B5iz82A3.d.cts +0 -2655
  347. package/dist/index-BAOD98JD.d.cts +0 -754
  348. package/dist/index-BG0BN3PB.d.ts +0 -44
  349. package/dist/index-BJX94aud.d.cts +0 -34
  350. package/dist/index-BP8a88zx.d.ts +0 -385
  351. package/dist/index-BTQtTb_H.d.cts +0 -301
  352. package/dist/index-BVpm6noz.d.cts +0 -36
  353. package/dist/index-Bc41FuHp.d.cts +0 -291
  354. package/dist/index-BdGtBX-X.d.cts +0 -515
  355. package/dist/index-Bf7eqeSF.d.ts +0 -113
  356. package/dist/index-BiX1Nkgx.d.cts +0 -1844
  357. package/dist/index-BoLv_OfD.d.cts +0 -651
  358. package/dist/index-BojK2fwH.d.cts +0 -299
  359. package/dist/index-BsT7F2et.d.ts +0 -291
  360. package/dist/index-BwLvVVsy.d.cts +0 -189
  361. package/dist/index-C59mYFKp.d.ts +0 -121
  362. package/dist/index-C7O6r5fV.d.ts +0 -37
  363. package/dist/index-C9kSENB4.d.cts +0 -127
  364. package/dist/index-C9pjcz3l.d.cts +0 -209
  365. package/dist/index-CAC_rNzm.d.ts +0 -189
  366. package/dist/index-CCq87F7t.d.ts +0 -127
  367. package/dist/index-CDXc9zKM.d.cts +0 -26
  368. package/dist/index-CJK1JkYy.d.ts +0 -36
  369. package/dist/index-CLon-IWF.d.cts +0 -374
  370. package/dist/index-COD1kVoS.d.cts +0 -468
  371. package/dist/index-CPT7C_f1.d.ts +0 -374
  372. package/dist/index-CQG3D1cp.d.ts +0 -468
  373. package/dist/index-CZQXo5tH.d.ts +0 -209
  374. package/dist/index-CZjOhcBy.d.cts +0 -113
  375. package/dist/index-ChOyVLKm.d.cts +0 -86
  376. package/dist/index-CvrqGfNS.d.ts +0 -34
  377. package/dist/index-D-AEQVLo.d.ts +0 -2655
  378. package/dist/index-D4Y1cMG0.d.ts +0 -26
  379. package/dist/index-DBHK8O6H.d.ts +0 -301
  380. package/dist/index-DBevwHj_.d.ts +0 -515
  381. package/dist/index-DIOoAZUX.d.ts +0 -45
  382. package/dist/index-DSZ3ZCHF.d.ts +0 -3402
  383. package/dist/index-Dgs8zcj7.d.ts +0 -102
  384. package/dist/index-Dh_HJ82K.d.ts +0 -299
  385. package/dist/index-Dhc7a7Xo.d.cts +0 -102
  386. package/dist/index-Dmqp7KjD.d.ts +0 -86
  387. package/dist/index-Dn-wI9g4.d.ts +0 -231
  388. package/dist/index-Du7u1lSf.d.cts +0 -385
  389. package/dist/index-DwigL4lY.d.ts +0 -1844
  390. package/dist/index-DyR7eU5S.d.cts +0 -779
  391. package/dist/index-JZUPJIJy.d.ts +0 -779
  392. package/dist/index-K0_0eR8g.d.ts +0 -557
  393. package/dist/index-O16yXPK4.d.cts +0 -3402
  394. package/dist/index-O7fucFrU.d.cts +0 -121
  395. package/dist/index-RV_yDjOX.d.cts +0 -198
  396. package/dist/index-cm1GNcWE.d.ts +0 -754
  397. package/dist/index-f5IivDUX.d.cts +0 -37
  398. package/dist/index-hHcaFlJX.d.cts +0 -45
  399. package/dist/index-tJoTcnHh.d.cts +0 -231
  400. package/dist/index-wAzD9yVj.d.ts +0 -198
  401. package/dist/index-z96luz5O.d.cts +0 -44
  402. package/dist/meta-BgVAsg9j.d.ts +0 -102
  403. package/dist/meta-vE8bxW1E.d.cts +0 -102
  404. package/dist/node-ClS5yC-B.d.cts +0 -1347
  405. package/dist/node-ClS5yC-B.d.ts +0 -1347
  406. package/dist/observable-BsBzUrcI.d.ts +0 -36
  407. package/dist/observable-DLGPPtb8.d.cts +0 -36
  408. package/dist/pipeline-graph-DPqKDk59.d.cts +0 -137
  409. package/dist/pipeline-graph-loP57TBA.d.ts +0 -137
  410. package/dist/reactive-layout-Dsvob4zD.d.cts +0 -183
  411. package/dist/reactive-layout-v7KPvxoc.d.ts +0 -183
  412. package/dist/reactive-log-B00laMSQ.d.cts +0 -223
  413. package/dist/reactive-log-BezYsbA_.d.ts +0 -223
  414. package/dist/reactive-map-48mnZ-nu.d.cts +0 -296
  415. package/dist/reactive-map-BVVPdvmi.d.ts +0 -296
  416. package/dist/resilience-YIWPK4YC.js +0 -1
  417. package/dist/sugar-DLwvMr3F.d.ts +0 -223
  418. package/dist/sugar-DyVGtczU.d.cts +0 -223
  419. package/dist/topology-tree-BNGvuG82.d.ts +0 -25
  420. package/dist/topology-tree-BSdfSwMi.d.cts +0 -25
  421. package/dist/types-B1jDWVsM.d.cts +0 -442
  422. package/dist/types-DkzUUs0H.d.ts +0 -442
@@ -1,950 +1 @@
1
- import { a as NodeOptions, N as Node, t as Message } from '../node-ClS5yC-B.cjs';
2
- import { NodeInput } from './sources.cjs';
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
- * Invokes `fn` exactly once on the first qualifying DATA emission, then passes
278
- * all values (including subsequent DATA) through unchanged.
279
- *
280
- * Motivation: call-boundary instrumentation (record stats, debit budget, log
281
- * first-token latency) where the wrapper is re-subscribed by downstream
282
- * composition (push-on-subscribe §2.2 would otherwise re-deliver the cached
283
- * value and re-fire the side effect). The closure guard is scoped to the node
284
- * instance, so the side effect fires exactly once per node lifetime.
285
- *
286
- * By default `null` / `undefined` values pass through WITHOUT counting as
287
- * "first" — matches the SENTINEL convention (COMPOSITION-GUIDE §8) used by
288
- * `promptNode`, `fromAny(Promise)`, and friends where a cached `null` means
289
- * "not yet settled." Pass `where` to override with a custom predicate.
290
- *
291
- * @param source - Upstream node.
292
- * @param fn - Side effect invoked once on the first qualifying value.
293
- * @param opts - Optional {@link NodeOptions} plus `where` predicate. Default
294
- * `where: (v) => v != null`.
295
- * @returns `Node<T>` - Passthrough node.
296
- *
297
- * @example
298
- * ```ts
299
- * import { onFirstData, fromAny } from "@graphrefly/graphrefly-ts";
300
- *
301
- * const tap = onFirstData(fromAny(adapter.invoke(msgs)), (resp) => recordStats(resp));
302
- * ```
303
- *
304
- * @category extra
305
- */
306
- declare function onFirstData<T>(source: Node<T>, fn: (value: T) => void, opts?: ExtraOpts & {
307
- where?: (value: T) => boolean;
308
- }): Node<T>;
309
- /**
310
- * Alias for {@link onFirstData}. Parallels `tap` naming for discoverability —
311
- * `tapFirst` is the one-shot companion of `tap`.
312
- *
313
- * @category extra
314
- */
315
- declare const tapFirst: typeof onFirstData;
316
- /**
317
- * Suppresses adjacent duplicates using `equals` (default `Object.is`).
318
- *
319
- * @param source - Upstream node.
320
- * @param equals - Optional equality for consecutive values.
321
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
322
- * @returns `Node<T>` - Deduped stream.
323
- *
324
- * @example
325
- * ```ts
326
- * import { distinctUntilChanged, state } from "@graphrefly/graphrefly-ts";
327
- *
328
- * const n = distinctUntilChanged(state(1));
329
- * ```
330
- *
331
- * @category extra
332
- */
333
- declare function distinctUntilChanged<T>(source: Node<T>, equals?: (a: T, b: T) => boolean, opts?: ExtraOpts): Node<T>;
334
- /**
335
- * Emits `[previous, current]` pairs starting after the second value (first pair uses `RESOLVED` only).
336
- *
337
- * @param source - Upstream node.
338
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
339
- * @returns `Node<readonly [T, T]>` - Pair stream.
340
- *
341
- * @example
342
- * ```ts
343
- * import { pairwise, state } from "@graphrefly/graphrefly-ts";
344
- *
345
- * const n = pairwise(state(0));
346
- * ```
347
- *
348
- * @category extra
349
- */
350
- declare function pairwise<T>(source: Node<T>, opts?: ExtraOpts): Node<readonly [T, T]>;
351
- /**
352
- * Combines the latest value from each dependency whenever any dep settles (combineLatest).
353
- *
354
- * @param sources - Nodes to combine (variadic).
355
- * @returns `Node<T>` - Tuple of latest values.
356
- *
357
- * @example
358
- * ```ts
359
- * import { combine, state } from "@graphrefly/graphrefly-ts";
360
- *
361
- * const n = combine(state(1), state("a"));
362
- * ```
363
- *
364
- * @remarks
365
- * Unlike RxJS `combineLatest`, this is named `combine`. Use the {@link combineLatest} alias
366
- * if you prefer the RxJS name. Seed is always required for `scan`/`reduce` (no seedless mode).
367
- *
368
- * @category extra
369
- */
370
- declare function combine<const T extends readonly unknown[]>(...sources: {
371
- [K in keyof T]: Node<T[K]>;
372
- }): Node<T>;
373
- /**
374
- * When `primary` settles, emits `[primary, latestSecondary]`. `secondary` alone updates cache only.
375
- *
376
- * @param primary - Main stream.
377
- * @param secondary - Latest value is paired on each primary emission.
378
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
379
- * @returns `Node<readonly [A, B]>` - Paired stream.
380
- *
381
- * @example
382
- * ```ts
383
- * import { state, withLatestFrom } from "@graphrefly/graphrefly-ts";
384
- *
385
- * const n = withLatestFrom(state(1), state("x"));
386
- * ```
387
- *
388
- * @category extra
389
- */
390
- declare function withLatestFrom<A, B>(primary: Node<A>, secondary: Node<B>, opts?: ExtraOpts): Node<readonly [A, B]>;
391
- /**
392
- * Merges **`DATA`** from any source with correct two-phase dirty tracking. **`COMPLETE`** after **all** sources complete (spec §1.3.5).
393
- *
394
- * @param sources - Nodes to merge (variadic; empty completes immediately).
395
- * @returns `Node<T>` - Merged stream.
396
- *
397
- * @remarks
398
- * **Ordering:** DIRTY/RESOLVED rules follow multi-source semantics in `~/src/graphrefly/GRAPHREFLY-SPEC.md`.
399
- *
400
- * @example
401
- * ```ts
402
- * import { merge, state } from "@graphrefly/graphrefly-ts";
403
- *
404
- * const n = merge(state(1), state(2));
405
- * ```
406
- *
407
- * @category extra
408
- */
409
- declare function merge<T>(...sources: readonly Node<T>[]): Node<T>;
410
- /**
411
- * Zips one **`DATA`** from each source per cycle into a tuple. Only **`DATA`** enqueues (spec §1.3.3).
412
- *
413
- * @param sources - Nodes to zip (variadic).
414
- * @returns `Node<T>` - Zipped tuples.
415
- *
416
- * @example
417
- * ```ts
418
- * import { state, zip } from "@graphrefly/graphrefly-ts";
419
- *
420
- * const n = zip(state(1), state(2));
421
- * ```
422
- *
423
- * @category extra
424
- */
425
- declare function zip<const T extends readonly unknown[]>(...sources: {
426
- [K in keyof T]: Node<T[K]>;
427
- }): Node<T>;
428
- /**
429
- * Plays all of `firstSrc`, then all of `secondSrc`. **`DATA`** from `secondSrc` during phase one is buffered until handoff.
430
- *
431
- * @param firstSrc - First segment.
432
- * @param secondSrc - Second segment.
433
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
434
- * @returns `Node<T>` - Concatenated stream.
435
- *
436
- * @example
437
- * ```ts
438
- * import { concat, state } from "@graphrefly/graphrefly-ts";
439
- *
440
- * const n = concat(state(1), state(2));
441
- * ```
442
- *
443
- * @category extra
444
- */
445
- declare function concat<T>(firstSrc: Node<T>, secondSrc: Node<T>, opts?: ExtraOpts): Node<T>;
446
- /**
447
- * First source to emit **`DATA`** wins; later traffic follows only the winner (Rx-style `race`).
448
- *
449
- * @param sources - Contestants (variadic; empty completes immediately; one node is identity).
450
- * @returns `Node<T>` - Winning stream.
451
- *
452
- * @example
453
- * ```ts
454
- * import { race, state } from "@graphrefly/graphrefly-ts";
455
- *
456
- * const n = race(state(1), state(2));
457
- * ```
458
- *
459
- * @category extra
460
- */
461
- declare function race<T>(...sources: readonly Node<T>[]): Node<T>;
462
- /**
463
- * Maps each settled value to an inner node; unsubscribes the previous inner (Rx-style `switchMap`).
464
- *
465
- * @param source - Upstream node.
466
- * @param project - Maps each outer value to an inner source shape (`Node`, scalar, `PromiseLike`, `Iterable`, or `AsyncIterable`) coerced via {@link fromAny}.
467
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
468
- * @returns `Node<R>` - Emissions from the active inner subscription.
469
- * @example
470
- * ```ts
471
- * import { switchMap, state } from "@graphrefly/graphrefly-ts";
472
- *
473
- * const src = state(0);
474
- * switchMap(src, (n) => state((n as number) * 2));
475
- * ```
476
- *
477
- * @category extra
478
- */
479
- declare function switchMap<T, R>(source: Node<T>, project: (value: T) => NodeInput<R>, opts?: ExtraOpts): Node<R>;
480
- /**
481
- * Like {@link switchMap}, but ignores outer `DATA` while an inner subscription is active (`exhaustMap`).
482
- *
483
- * @param source - Upstream node.
484
- * @param project - Maps each outer value to an inner source shape (`Node`, scalar, `PromiseLike`, `Iterable`, or `AsyncIterable`) coerced via {@link fromAny}.
485
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
486
- * @returns `Node<R>` - Emissions from the active inner while it runs.
487
- * @example
488
- * ```ts
489
- * import { exhaustMap, state } from "@graphrefly/graphrefly-ts";
490
- *
491
- * exhaustMap(state(0), () => state(1));
492
- * ```
493
- *
494
- * @category extra
495
- */
496
- declare function exhaustMap<T, R>(source: Node<T>, project: (value: T) => NodeInput<R>, opts?: ExtraOpts): Node<R>;
497
- /**
498
- * Enqueues each outer value and subscribes to inners one at a time (`concatMap`).
499
- *
500
- * @param source - Upstream node.
501
- * @param project - Maps each outer value to an inner source shape (`Node`, scalar, `PromiseLike`, `Iterable`, or `AsyncIterable`) coerced via {@link fromAny}.
502
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
503
- * @returns `Node<R>` - Sequential concatenation of inner streams.
504
- * @example
505
- * ```ts
506
- * import { concatMap, state } from "@graphrefly/graphrefly-ts";
507
- *
508
- * concatMap(state(0), (n) => state((n as number) + 1));
509
- * ```
510
- *
511
- * @category extra
512
- */
513
- declare function concatMap<T, R>(source: Node<T>, project: (value: T) => NodeInput<R>, opts?: ExtraOpts & {
514
- maxBuffer?: number;
515
- }): Node<R>;
516
- /** Options for {@link mergeMap}. */
517
- type MergeMapOptions = ExtraOpts & {
518
- /** Maximum number of concurrent inner subscriptions. Default: `Infinity` (unbounded). */
519
- concurrent?: number;
520
- };
521
- /**
522
- * Subscribes to inner nodes in parallel (up to `concurrent`) and merges outputs (`mergeMap` / `flatMap`).
523
- *
524
- * @param source - Upstream node.
525
- * @param project - Maps each outer value to an inner source shape (`Node`, scalar, `PromiseLike`, `Iterable`, or `AsyncIterable`) coerced via {@link fromAny}.
526
- * @param opts - Optional options including `concurrent` limit.
527
- * @returns `Node<R>` - Merged output of all active inners; completes when the outer and every inner complete.
528
- *
529
- * @remarks
530
- * **ERROR handling:** An `ERROR` from the outer source cancels all active inner
531
- * subscriptions and propagates the error downstream. An `ERROR` from an inner
532
- * subscription propagates downstream immediately but does **not** cancel sibling
533
- * inner subscriptions — other active inners continue until they complete or the
534
- * outer errors/completes. This is intentional: for parallel work, isolating
535
- * failures per-inner is more useful than Rx-style "first error cancels all."
536
- *
537
- * @example
538
- * ```ts
539
- * import { mergeMap, state } from "@graphrefly/graphrefly-ts";
540
- *
541
- * // Unbounded (default)
542
- * mergeMap(state(0), (n) => state((n as number) + 1));
543
- *
544
- * // Limited concurrency
545
- * mergeMap(state(0), (n) => state((n as number) + 1), { concurrent: 3 });
546
- * ```
547
- *
548
- * @category extra
549
- */
550
- declare function mergeMap<T, R>(source: Node<T>, project: (value: T) => NodeInput<R>, opts?: MergeMapOptions): Node<R>;
551
- /**
552
- * RxJS-named alias for {@link mergeMap} — projects each `DATA` to an inner node and merges outputs.
553
- *
554
- * @param source - Upstream node.
555
- * @param project - Returns an inner `Node<R>` per value.
556
- * @param opts - Optional concurrency cap and node options (excluding `describeKind`).
557
- * @returns Merged projection; behavior matches `mergeMap`.
558
- *
559
- * @example
560
- * ```ts
561
- * import { flatMap, state } from "@graphrefly/graphrefly-ts";
562
- *
563
- * flatMap(state(0), (n) => state(n));
564
- * ```
565
- *
566
- * @category extra
567
- */
568
- declare const flatMap: typeof mergeMap;
569
- /**
570
- * Delays phase-2 emissions by `ms` (timers). `DIRTY` still forwards immediately.
571
- *
572
- * @param source - Upstream node.
573
- * @param ms - Delay in milliseconds.
574
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
575
- * @returns `Node<T>` - Same values, shifted in time.
576
- * @example
577
- * ```ts
578
- * import { delay, state } from "@graphrefly/graphrefly-ts";
579
- *
580
- * delay(state(1), 100);
581
- * ```
582
- *
583
- * @category extra
584
- */
585
- declare function delay<T>(source: Node<T>, ms: number, opts?: ExtraOpts): Node<T>;
586
- /**
587
- * Emits the latest value only after `ms` quiet time since the last trigger (`debounce`).
588
- *
589
- * @param source - Upstream node.
590
- * @param ms - Quiet window in milliseconds.
591
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
592
- * @returns `Node<T>` - Debounced stream.
593
- * @example
594
- * ```ts
595
- * import { debounce, state } from "@graphrefly/graphrefly-ts";
596
- *
597
- * debounce(state(0), 50);
598
- * ```
599
- *
600
- * @category extra
601
- */
602
- declare function debounce<T>(source: Node<T>, ms: number, opts?: ExtraOpts): Node<T>;
603
- type ThrottleOptions = {
604
- leading?: boolean;
605
- trailing?: boolean;
606
- };
607
- /**
608
- * Rate-limits emissions to at most once per `ms` window (`throttleTime`).
609
- *
610
- * @param source - Upstream node.
611
- * @param ms - Minimum spacing in milliseconds.
612
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`) plus `leading` / `trailing`.
613
- * @returns `Node<T>` - Throttled stream.
614
- * @example
615
- * ```ts
616
- * import { throttle, state } from "@graphrefly/graphrefly-ts";
617
- *
618
- * throttle(state(0), 1_000, { trailing: false });
619
- * ```
620
- *
621
- * @category extra
622
- */
623
- declare function throttle<T>(source: Node<T>, ms: number, opts?: ExtraOpts & ThrottleOptions): Node<T>;
624
- /**
625
- * Emits the most recent source value whenever `notifier` emits `DATA` (`sample`).
626
- *
627
- * Source `COMPLETE` stops sampling (clears held value); notifier `COMPLETE` terminates the
628
- * operator. `ERROR` from either dep terminates immediately. At most one terminal message is
629
- * emitted downstream (latch). Supports `resubscribable` — `ctx.store` resets automatically.
630
- *
631
- * @param source - Node whose latest value is sampled.
632
- * @param notifier - When this node emits `DATA`, a sample is taken.
633
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
634
- * @returns `Node<T>` - Sampled snapshots of `source`.
635
- * @example
636
- * ```ts
637
- * import { sample, state } from "@graphrefly/graphrefly-ts";
638
- *
639
- * sample(state(1), state(0));
640
- * ```
641
- *
642
- * @category extra
643
- */
644
- declare function sample<T>(source: Node<T>, notifier: Node<unknown>, opts?: ExtraOpts): Node<T>;
645
- /**
646
- * After each source `DATA`, waits `ms` then emits the latest value if another `DATA` has not arrived (`auditTime` / trailing window).
647
- *
648
- * @param source - Upstream node.
649
- * @param ms - Window in milliseconds after each `DATA`.
650
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
651
- * @returns `Node<T>` - Trailing-edge sampled stream.
652
- * @example
653
- * ```ts
654
- * import { audit, state } from "@graphrefly/graphrefly-ts";
655
- *
656
- * audit(state(0), 100);
657
- * ```
658
- *
659
- * @category extra
660
- */
661
- declare function audit<T>(source: Node<T>, ms: number, opts?: ExtraOpts): Node<T>;
662
- /**
663
- * Errors if no `DATA` arrives within `ms` after subscribe or after the previous `DATA`.
664
- *
665
- * @param source - Upstream node.
666
- * @param ms - Idle budget in milliseconds.
667
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`) and `with` for a custom error payload.
668
- * @returns `Node<T>` - Pass-through with idle watchdog.
669
- * @example
670
- * ```ts
671
- * import { timeout, state } from "@graphrefly/graphrefly-ts";
672
- *
673
- * timeout(state(0), 5_000);
674
- * ```
675
- *
676
- * @category extra
677
- */
678
- declare function timeout<T>(source: Node<T>, ms: number, opts?: ExtraOpts & {
679
- with?: unknown;
680
- }): Node<T>;
681
- /**
682
- * Buffers source `DATA` values; flushes an array when `notifier` settles (`buffer`).
683
- *
684
- * @param source - Upstream node.
685
- * @param notifier - Flush trigger on each settlement.
686
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
687
- * @returns `Node<T[]>` - Emits buffered arrays (may be empty-handled via `RESOLVED` when nothing buffered).
688
- * @example
689
- * ```ts
690
- * import { buffer, state } from "@graphrefly/graphrefly-ts";
691
- *
692
- * buffer(state(0), state(0));
693
- * ```
694
- *
695
- * @category extra
696
- */
697
- declare function buffer<T>(source: Node<T>, notifier: Node<unknown>, opts?: ExtraOpts): Node<T[]>;
698
- /**
699
- * Batches consecutive `DATA` values into arrays of length `count` (`bufferCount` / `windowCount`).
700
- *
701
- * @param source - Upstream node.
702
- * @param count - Buffer size before emit; must be > 0.
703
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
704
- * @returns `Node<T[]>` - Emits fixed-size arrays; remainder flushes on `COMPLETE`.
705
- * @example
706
- * ```ts
707
- * import { bufferCount, state } from "@graphrefly/graphrefly-ts";
708
- *
709
- * bufferCount(state(0), 3);
710
- * ```
711
- *
712
- * @category extra
713
- */
714
- declare function bufferCount<T>(source: Node<T>, count: number, opts?: ExtraOpts): Node<T[]>;
715
- /**
716
- * Splits source `DATA` into sub-nodes of `count` values each. Each sub-node completes after `count` items or when source completes.
717
- *
718
- * @param source - Upstream node.
719
- * @param count - Items per window.
720
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
721
- * @returns `Node<Node<T>>` - Each emission is a sub-node carrying that window's values.
722
- *
723
- * @example
724
- * ```ts
725
- * import { windowCount, state } from "@graphrefly/graphrefly-ts";
726
- *
727
- * windowCount(state(0), 3);
728
- * ```
729
- *
730
- * @category extra
731
- */
732
- declare function windowCount<T>(source: Node<T>, count: number, opts?: ExtraOpts): Node<Node<T>>;
733
- /**
734
- * Flushes buffered `DATA` values every `ms` (`bufferTime` / `windowTime`).
735
- *
736
- * @param source - Upstream node.
737
- * @param ms - Flush interval in milliseconds.
738
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
739
- * @returns `Node<T[]>` - Time-windowed batches.
740
- * @example
741
- * ```ts
742
- * import { bufferTime, state } from "@graphrefly/graphrefly-ts";
743
- *
744
- * bufferTime(state(0), 250);
745
- * ```
746
- *
747
- * @category extra
748
- */
749
- declare function bufferTime<T>(source: Node<T>, ms: number, opts?: ExtraOpts): Node<T[]>;
750
- /**
751
- * Splits source `DATA` into time-windowed sub-nodes; each window lasts `ms`.
752
- *
753
- * @param source - Upstream node.
754
- * @param ms - Window duration in milliseconds.
755
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
756
- * @returns `Node<Node<T>>` - Each emission is a sub-node carrying that window's values.
757
- *
758
- * @example
759
- * ```ts
760
- * import { windowTime, state } from "@graphrefly/graphrefly-ts";
761
- *
762
- * windowTime(state(0), 500);
763
- * ```
764
- *
765
- * @category extra
766
- */
767
- declare function windowTime<T>(source: Node<T>, ms: number, opts?: ExtraOpts): Node<Node<T>>;
768
- /**
769
- * Splits source `DATA` into sub-nodes, opening a new window each time `notifier` emits `DATA`.
770
- *
771
- * @param source - Upstream node.
772
- * @param notifier - Each `DATA` from `notifier` closes the current window and opens a new one.
773
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
774
- * @returns `Node<Node<T>>` - Each emission is a sub-node carrying that window's values.
775
- *
776
- * @example
777
- * ```ts
778
- * import { state, window } from "@graphrefly/graphrefly-ts";
779
- *
780
- * window(state(0), state(0));
781
- * ```
782
- *
783
- * @category extra
784
- */
785
- declare function window<T>(source: Node<T>, notifier: Node<unknown>, opts?: ExtraOpts): Node<Node<T>>;
786
- /**
787
- * Increments on each tick (`interval`); uses `setInterval` via {@link producer}.
788
- *
789
- * @param periodMs - Time between ticks.
790
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
791
- * @returns `Node<number>` - Emits `0`, `1`, `2`, … while subscribed.
792
- * @example
793
- * ```ts
794
- * import { interval } from "@graphrefly/graphrefly-ts";
795
- *
796
- * interval(1_000);
797
- * ```
798
- *
799
- * @category extra
800
- */
801
- declare function interval(periodMs: number, opts?: ExtraOpts): Node<number>;
802
- /**
803
- * Subscribes to `source` repeatedly (`count` times, sequentially). Best with a fresh or `resubscribable` source.
804
- *
805
- * @param source - Upstream node to replay.
806
- * @param count - Number of subscription rounds.
807
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
808
- * @returns `Node<T>` - Forwards each round then completes after the last inner `COMPLETE`.
809
- * @example
810
- * ```ts
811
- * import { repeat, state } from "@graphrefly/graphrefly-ts";
812
- *
813
- * repeat(state(1, { resubscribable: true }), 2);
814
- * ```
815
- *
816
- * @category extra
817
- */
818
- declare function repeat<T>(source: Node<T>, count: number, opts?: ExtraOpts): Node<T>;
819
- /**
820
- * Identity passthrough — `pausable()` has been promoted to default node behavior in v5 (§4).
821
- *
822
- * @deprecated Default node behavior now handles PAUSE/RESUME. This operator is a no-op
823
- * identity passthrough kept only for migration compatibility.
824
- *
825
- * @param source - Upstream node.
826
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
827
- * @returns `Node<T>` - Pass-through (identity).
828
- * @example
829
- * ```ts
830
- * import { pausable, state } from "@graphrefly/graphrefly-ts";
831
- *
832
- * // No longer needed — default nodes handle PAUSE/RESUME.
833
- * const s = state(0);
834
- * pausable(s); // identity passthrough
835
- * ```
836
- *
837
- * @category extra
838
- */
839
- declare function pausable<T>(source: Node<T>, opts?: ExtraOpts): Node<T>;
840
- /**
841
- * Replaces an upstream `ERROR` with a recovered value (`catchError`-style).
842
- *
843
- * @param source - Upstream node.
844
- * @param recover - Maps the error payload to a replacement value; if it throws, `ERROR` is forwarded.
845
- * @param opts - Optional {@link NodeOptions} (excluding `describeKind`).
846
- * @returns `Node<T>` - Recovered stream.
847
- * @example
848
- * ```ts
849
- * import { rescue, state } from "@graphrefly/graphrefly-ts";
850
- *
851
- * rescue(state(0), () => 0);
852
- * ```
853
- *
854
- * @category extra
855
- */
856
- declare function rescue<T>(source: Node<T>, recover: (err: unknown) => T, opts?: ExtraOpts): Node<T>;
857
- /**
858
- * Forwards upstream `DATA` only while `control.get()` is truthy; when closed, emits `RESOLVED`
859
- * instead of repeating the last value (value-level valve). For protocol pause/resume, use default
860
- * node PAUSE/RESUME behavior.
861
- *
862
- * @param source - Upstream value node.
863
- * @param control - Boolean node; when falsy, output stays "closed" for that tick.
864
- * @param opts - Optional node options (excluding `describeKind`).
865
- * @returns `Node<T>` gated by `control`.
866
- *
867
- * @example
868
- * ```ts
869
- * import { valve, state } from "@graphrefly/graphrefly-ts";
870
- *
871
- * const data = state(1);
872
- * const open = state(true);
873
- * valve(data, open);
874
- * ```
875
- *
876
- * @category extra
877
- */
878
- declare function valve<T>(source: Node<T>, control: Node<boolean>, opts?: ExtraOpts): Node<T>;
879
- /**
880
- * RxJS-named alias for {@link combine} — emits when any dep updates with latest tuple of values.
881
- *
882
- * @param sources - Upstream nodes as separate arguments (same calling shape as `combine`).
883
- * @returns Combined node; signature matches `combine`.
884
- *
885
- * @example
886
- * ```ts
887
- * import { combineLatest, state } from "@graphrefly/graphrefly-ts";
888
- *
889
- * const n = combineLatest(state(1), state("a"));
890
- * ```
891
- *
892
- * @category extra
893
- */
894
- declare const combineLatest: typeof combine;
895
- /**
896
- * RxJS-named alias for {@link debounce} — drops rapid `DATA` until `ms` of quiet.
897
- *
898
- * @param source - Upstream node.
899
- * @param ms - Quiet period in milliseconds.
900
- * @param opts - Optional node options (excluding `describeKind`).
901
- * @returns Debounced node; behavior matches `debounce`.
902
- *
903
- * @example
904
- * ```ts
905
- * import { debounceTime, state } from "@graphrefly/graphrefly-ts";
906
- *
907
- * debounceTime(state(0), 100);
908
- * ```
909
- *
910
- * @category extra
911
- */
912
- declare const debounceTime: typeof debounce;
913
- /**
914
- * RxJS-named alias for {@link throttle} — emits on leading/trailing edges within `ms`.
915
- *
916
- * @param source - Upstream node.
917
- * @param ms - Minimum spacing in milliseconds.
918
- * @param opts - Optional throttle shape (`leading` / `trailing`) and node options.
919
- * @returns Throttled node; behavior matches `throttle`.
920
- *
921
- * @example
922
- * ```ts
923
- * import { throttleTime, state } from "@graphrefly/graphrefly-ts";
924
- *
925
- * throttleTime(state(0), 100);
926
- * ```
927
- *
928
- * @category extra
929
- */
930
- declare const throttleTime: typeof throttle;
931
- /**
932
- * RxJS-named alias for {@link rescue} — replaces upstream `ERROR` with a recovered value.
933
- *
934
- * @param source - Upstream node.
935
- * @param recover - Maps error payload to replacement value.
936
- * @param opts - Optional node options (excluding `describeKind`).
937
- * @returns Recovered stream; behavior matches `rescue`.
938
- *
939
- * @example
940
- * ```ts
941
- * import { catchError, state } from "@graphrefly/graphrefly-ts";
942
- *
943
- * catchError(state(0), () => 0);
944
- * ```
945
- *
946
- * @category extra
947
- */
948
- declare const catchError: typeof rescue;
949
-
950
- 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, onFirstData, pairwise, pausable, race, reduce, repeat, rescue, sample, scan, skip, switchMap, take, takeUntil, takeWhile, tap, tapFirst, throttle, throttleTime, timeout, valve, window, windowCount, windowTime, withLatestFrom, zip };
1
+ export * from '@graphrefly/pure-ts/extra/operators';