@graphrefly/graphrefly 0.42.0 → 0.44.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 (284) hide show
  1. package/dist/{cascading-CH-_VwG9.d.cts → cascading-BglDkMdX.d.cts} +2 -2
  2. package/dist/{cascading-OgKQZjsa.d.ts → cascading-MFgxu7Yo.d.ts} +2 -2
  3. package/dist/chunk-2T7U5EU6.js +1 -0
  4. package/dist/chunk-5M4CCMMD.js +45 -0
  5. package/dist/{chunk-YGL7FPVQ.js → chunk-5XJ6B66J.js} +1 -1
  6. package/dist/{chunk-NWXQIOIB.js → chunk-6X7AFUJV.js} +1 -1
  7. package/dist/chunk-7K6PWTDQ.js +1 -0
  8. package/dist/{chunk-D27JNOLZ.js → chunk-7LIAPXJB.js} +1 -1
  9. package/dist/{chunk-CLD3F4R5.js → chunk-7WPU3UHQ.js} +1 -1
  10. package/dist/{chunk-NNKJUORL.js → chunk-A5WCQ5NO.js} +1 -1
  11. package/dist/chunk-APPIWSGD.js +84 -0
  12. package/dist/{chunk-TZQPPQEQ.js → chunk-BEZWM2SY.js} +1 -1
  13. package/dist/{chunk-5QRRKBUT.js → chunk-CB676TKJ.js} +1 -1
  14. package/dist/{chunk-KT5DTRBP.js → chunk-CE6TI2TL.js} +1 -1
  15. package/dist/{chunk-6YFZMUMR.js → chunk-CLVB32RD.js} +1 -1
  16. package/dist/{chunk-2K5RXLAH.js → chunk-CRVT7D2P.js} +1 -1
  17. package/dist/chunk-D7GPHKFH.js +1 -0
  18. package/dist/{chunk-FUZ6S2DY.js → chunk-DHRX7JX4.js} +1 -1
  19. package/dist/chunk-FZMYDOWV.js +1 -0
  20. package/dist/{chunk-35JTVPOX.js → chunk-GHBWHMRZ.js} +1 -1
  21. package/dist/{chunk-KGKJCHEK.js → chunk-GLERH466.js} +1 -1
  22. package/dist/{chunk-CISGGAIF.js → chunk-HIDYF36O.js} +1 -1
  23. package/dist/chunk-HITNVN6B.js +3 -0
  24. package/dist/{chunk-7ARY3Y3T.js → chunk-HY4DJBA7.js} +1 -1
  25. package/dist/chunk-KZIEYVXN.js +1 -0
  26. package/dist/{chunk-IZM3UEH3.js → chunk-N4MQX6JU.js} +1 -1
  27. package/dist/{chunk-FDZAZNRO.js → chunk-N7FHEL4D.js} +1 -1
  28. package/dist/chunk-NTEURFZH.js +1 -0
  29. package/dist/{chunk-4QH6VJF4.js → chunk-OIVP6KFV.js} +1 -1
  30. package/dist/{chunk-KCACBSJH.js → chunk-OPHBU3LG.js} +1 -1
  31. package/dist/{chunk-Q7QQQA3I.js → chunk-OYQOZP2F.js} +1 -1
  32. package/dist/{chunk-7B7ELAT2.js → chunk-PTZK576G.js} +1 -1
  33. package/dist/{chunk-DEJTNNQC.js → chunk-ST7UXLWR.js} +1 -1
  34. package/dist/chunk-SVY7VUYU.js +1 -0
  35. package/dist/{chunk-WHMUB5QB.js → chunk-TK3NWWD4.js} +1 -1
  36. package/dist/chunk-UNGSTR4X.js +61 -0
  37. package/dist/{chunk-VRALOYRD.js → chunk-VV4N5P64.js} +1 -1
  38. package/dist/chunk-W3I423PS.js +1 -0
  39. package/dist/{chunk-HZKW2AAB.js → chunk-WJR24TAG.js} +1 -1
  40. package/dist/{chunk-F3IGTWCQ.js → chunk-XTGKMHSW.js} +1 -1
  41. package/dist/{chunk-LDQ3IUIP.js → chunk-YBB7ZGTY.js} +1 -1
  42. package/dist/{chunk-G5VBJ5K6.js → chunk-Z4NPUARF.js} +1 -1
  43. package/dist/{chunk-KRH66M4O.js → chunk-ZGNQRPDT.js} +1 -1
  44. package/dist/{chunk-AGNM6RS6.js → chunk-ZKPSFFKU.js} +1 -1
  45. package/dist/{chunk-KY2LMAXU.js → chunk-ZLV5SQSX.js} +1 -1
  46. package/dist/compat/index.cjs +5 -5
  47. package/dist/compat/index.d.cts +16 -16
  48. package/dist/compat/index.d.ts +16 -16
  49. package/dist/compat/index.js +1 -1
  50. package/dist/compat/jotai/index.cjs +1 -1
  51. package/dist/compat/jotai/index.d.cts +2 -2
  52. package/dist/compat/jotai/index.d.ts +2 -2
  53. package/dist/compat/jotai/index.js +1 -1
  54. package/dist/compat/nanostores/index.cjs +1 -1
  55. package/dist/compat/nanostores/index.d.cts +2 -2
  56. package/dist/compat/nanostores/index.d.ts +2 -2
  57. package/dist/compat/nanostores/index.js +1 -1
  58. package/dist/compat/nestjs/index.cjs +5 -5
  59. package/dist/compat/nestjs/index.d.cts +8 -8
  60. package/dist/compat/nestjs/index.d.ts +8 -8
  61. package/dist/compat/nestjs/index.js +1 -1
  62. package/dist/compat/react/index.d.cts +2 -2
  63. package/dist/compat/react/index.d.ts +2 -2
  64. package/dist/compat/solid/index.d.cts +2 -2
  65. package/dist/compat/solid/index.d.ts +2 -2
  66. package/dist/compat/svelte/index.d.cts +2 -2
  67. package/dist/compat/svelte/index.d.ts +2 -2
  68. package/dist/compat/vue/index.d.cts +2 -2
  69. package/dist/compat/vue/index.d.ts +2 -2
  70. package/dist/compat/zustand/index.cjs +3 -3
  71. package/dist/compat/zustand/index.d.cts +4 -4
  72. package/dist/compat/zustand/index.d.ts +4 -4
  73. package/dist/compat/zustand/index.js +1 -1
  74. package/dist/core/index.cjs +1 -1
  75. package/dist/core/index.d.cts +3 -4
  76. package/dist/core/index.d.ts +3 -4
  77. package/dist/core/index.js +1 -1
  78. package/dist/{decay-CdEBmDIs.d.ts → decay-BvOWTZ00.d.ts} +2 -2
  79. package/dist/{decay-2ZukgQ4o.d.cts → decay-CFlLvXUT.d.cts} +2 -2
  80. package/dist/extra/browser.cjs +1 -1
  81. package/dist/extra/browser.d.cts +1 -1
  82. package/dist/extra/browser.d.ts +1 -1
  83. package/dist/extra/browser.js +1 -1
  84. package/dist/extra/index.cjs +15 -15
  85. package/dist/extra/index.d.cts +10 -10
  86. package/dist/extra/index.d.ts +10 -10
  87. package/dist/extra/index.js +1 -1
  88. package/dist/extra/node.cjs +2 -2
  89. package/dist/extra/node.d.cts +1 -1
  90. package/dist/extra/node.d.ts +1 -1
  91. package/dist/extra/node.js +1 -1
  92. package/dist/extra/operators.cjs +1 -1
  93. package/dist/extra/operators.d.cts +9 -1
  94. package/dist/extra/operators.d.ts +9 -1
  95. package/dist/extra/operators.js +1 -1
  96. package/dist/extra/reactive.cjs +1 -1
  97. package/dist/extra/reactive.d.cts +3 -3
  98. package/dist/extra/reactive.d.ts +3 -3
  99. package/dist/extra/reactive.js +1 -1
  100. package/dist/extra/render/index.d.cts +3 -3
  101. package/dist/extra/render/index.d.ts +3 -3
  102. package/dist/extra/sources.cjs +3 -3
  103. package/dist/extra/sources.d.cts +1 -1
  104. package/dist/extra/sources.d.ts +1 -1
  105. package/dist/extra/sources.js +1 -1
  106. package/dist/extra/storage-browser.cjs +1 -1
  107. package/dist/extra/storage-browser.d.cts +1 -1
  108. package/dist/extra/storage-browser.d.ts +1 -1
  109. package/dist/extra/storage-browser.js +1 -1
  110. package/dist/{fallback-Ctlj2tMY.d.cts → fallback-74oxi34l.d.cts} +1 -1
  111. package/dist/{fallback-CqYVLL6X.d.ts → fallback-DUyyBTBK.d.ts} +1 -1
  112. package/dist/graph/index.cjs +7 -7
  113. package/dist/graph/index.d.cts +5 -5
  114. package/dist/graph/index.d.ts +5 -5
  115. package/dist/graph/index.js +1 -1
  116. package/dist/{graph-C4SHb3Ly.d.cts → graph-CWvEUQAq.d.cts} +196 -3
  117. package/dist/{graph-7VguS7a4.d.ts → graph-D9LFnda9.d.ts} +196 -3
  118. package/dist/{index-LIpQQE9f.d.cts → index-5k1T6jl0.d.cts} +9 -9
  119. package/dist/{index-CPNSy-U0.d.cts → index-9770hRuQ.d.cts} +23 -4
  120. package/dist/{index-CEMx8n40.d.cts → index-B-_tFaqV.d.cts} +4 -4
  121. package/dist/{index-2B7u2pVn.d.cts → index-B17QddL1.d.cts} +4 -4
  122. package/dist/{index-B-i4_g3k.d.ts → index-B1F8Enjf.d.ts} +61 -8
  123. package/dist/{index-DBevwHj_.d.ts → index-B5S8ULbU.d.ts} +3 -3
  124. package/dist/{index-Dgs8zcj7.d.ts → index-B8YnZpIR.d.ts} +2 -2
  125. package/dist/{index-B3OTH1dV.d.ts → index-BHskSB8v.d.ts} +28 -17
  126. package/dist/{index-sl4NyzQx.d.cts → index-BIYAkbAi.d.cts} +1 -1
  127. package/dist/{index-C9kSENB4.d.cts → index-BQSKmbuG.d.cts} +1 -1
  128. package/dist/{index-tJoTcnHh.d.cts → index-BaQaY_IQ.d.cts} +2 -2
  129. package/dist/{index-CJK1JkYy.d.ts → index-BmZXHqkE.d.ts} +1 -1
  130. package/dist/{index-pT8sCpOJ.d.ts → index-BoJ5JHxI.d.ts} +12 -3
  131. package/dist/{index-BeT2r7sk.d.ts → index-BocU7pqs.d.ts} +23 -4
  132. package/dist/{index-ChOyVLKm.d.cts → index-BrPrLl4e.d.cts} +1 -1
  133. package/dist/{index-D-Xs74HZ.d.cts → index-BxNs2HB9.d.cts} +33 -9
  134. package/dist/{index-Bf7eqeSF.d.ts → index-Byu-OpX_.d.ts} +2 -2
  135. package/dist/{index-BoLv_OfD.d.cts → index-C1T3d7V-.d.cts} +61 -8
  136. package/dist/{index-BTQtTb_H.d.cts → index-C5ri2Axc.d.cts} +3 -3
  137. package/dist/{index-z96luz5O.d.cts → index-C5stwKcw.d.cts} +1 -1
  138. package/dist/{index-CZmcDtFn.d.ts → index-C9l6OEBL.d.ts} +1 -1
  139. package/dist/{index-CCq87F7t.d.ts → index-CBBLl_rc.d.ts} +1 -1
  140. package/dist/{index-D6egPFAL.d.ts → index-CBGUK09R.d.ts} +4 -4
  141. package/dist/{index-C0-Jv1kP.d.cts → index-CC-AvFTy.d.cts} +12 -3
  142. package/dist/{index-DQo8xBgd.d.ts → index-CJF1URuX.d.ts} +9 -9
  143. package/dist/{index-BJX94aud.d.cts → index-CK29LV56.d.cts} +1 -1
  144. package/dist/{index-BP8a88zx.d.ts → index-CMh5Rz1y.d.ts} +4 -4
  145. package/dist/{index-CvrqGfNS.d.ts → index-CPQlGA29.d.ts} +1 -1
  146. package/dist/{index-Bbkgpt5t.d.ts → index-CR8QpwX8.d.ts} +49 -24
  147. package/dist/{index-Du7u1lSf.d.cts → index-CS0LTlB8.d.cts} +4 -4
  148. package/dist/{index-Bc41FuHp.d.cts → index-CSOmP7xT.d.cts} +2 -2
  149. package/dist/{index-BsT7F2et.d.ts → index-CYq8vAyV.d.ts} +2 -2
  150. package/dist/{index-Bn4zHYLj.d.ts → index-CZ3r5Rxp.d.ts} +4 -4
  151. package/dist/{index-HoU88d5U.d.cts → index-CasX6Pfq.d.cts} +68 -9
  152. package/dist/{index-BG0BN3PB.d.ts → index-CdAlHFEt.d.ts} +1 -1
  153. package/dist/{index-CpyNFqkB.d.ts → index-CdTelp1M.d.ts} +8 -4
  154. package/dist/{index-D8l8hNXn.d.ts → index-CeFiHtAg.d.ts} +4 -4
  155. package/dist/{index-DmAgG5CI.d.cts → index-Cj3WohTd.d.cts} +8 -4
  156. package/dist/{index-BtAsBp8K.d.cts → index-Climxqsu.d.cts} +4 -4
  157. package/dist/{index-CJIuLu2f.d.cts → index-Co7uli2l.d.cts} +28 -17
  158. package/dist/{index-DIOoAZUX.d.ts → index-CviRnE4K.d.ts} +1 -1
  159. package/dist/{index-Dhc7a7Xo.d.cts → index-Cwv0KWcU.d.cts} +2 -2
  160. package/dist/{index-Dn-wI9g4.d.ts → index-CzLVrjxn.d.ts} +2 -2
  161. package/dist/{index-DO9XxMzS.d.ts → index-D0aciIex.d.cts} +3 -18
  162. package/dist/{index-4Uz-e_fL.d.ts → index-DHen9Klo.d.ts} +33 -9
  163. package/dist/{index-3NmAfcH0.d.cts → index-DV_1YuVk.d.cts} +40 -8
  164. package/dist/{index-BdGtBX-X.d.cts → index-Dc4AYqrJ.d.cts} +3 -3
  165. package/dist/{index-Dmqp7KjD.d.ts → index-Dgl1HpPn.d.ts} +1 -1
  166. package/dist/{index-CJQm0g38.d.ts → index-DisjX8a-.d.ts} +40 -8
  167. package/dist/{index-B11anra4.d.cts → index-UPSiS-X7.d.cts} +49 -24
  168. package/dist/{index-DBIqYS43.d.cts → index-Yq60JP3s.d.ts} +3 -18
  169. package/dist/{index-f5IivDUX.d.cts → index-ZVQhLa2i.d.cts} +1 -1
  170. package/dist/{index-hHcaFlJX.d.cts → index-_6ODbuOu.d.cts} +1 -1
  171. package/dist/{index-BVpm6noz.d.cts → index-hcDJ8PSI.d.cts} +1 -1
  172. package/dist/{index-DBHK8O6H.d.ts → index-nozs3fFC.d.ts} +3 -3
  173. package/dist/{index-BUYXac2c.d.ts → index-p09KSrTN.d.ts} +68 -9
  174. package/dist/{index-C7O6r5fV.d.ts → index-sqkqlb1p.d.ts} +1 -1
  175. package/dist/{index-CZjOhcBy.d.cts → index-tRCxuAXF.d.cts} +2 -2
  176. package/dist/index.cjs +48 -48
  177. package/dist/index.d.cts +42 -43
  178. package/dist/index.d.ts +42 -43
  179. package/dist/index.js +1 -1
  180. package/dist/{node-ClS5yC-B.d.cts → node-kK3CvTrR.d.cts} +1 -1
  181. package/dist/{node-ClS5yC-B.d.ts → node-kK3CvTrR.d.ts} +1 -1
  182. package/dist/{observable-BsBzUrcI.d.ts → observable-DWjNfLvC.d.ts} +1 -1
  183. package/dist/{observable-DLGPPtb8.d.cts → observable-e3eiPPFy.d.cts} +1 -1
  184. package/dist/patterns/ai/browser.cjs +5 -5
  185. package/dist/patterns/ai/browser.d.cts +4 -4
  186. package/dist/patterns/ai/browser.d.ts +4 -4
  187. package/dist/patterns/ai/browser.js +1 -1
  188. package/dist/patterns/ai/index.cjs +16 -16
  189. package/dist/patterns/ai/index.d.cts +16 -17
  190. package/dist/patterns/ai/index.d.ts +16 -17
  191. package/dist/patterns/ai/index.js +1 -1
  192. package/dist/patterns/ai/node.cjs +1 -1
  193. package/dist/patterns/ai/node.d.cts +4 -4
  194. package/dist/patterns/ai/node.d.ts +4 -4
  195. package/dist/patterns/ai/node.js +1 -1
  196. package/dist/patterns/cqrs/index.cjs +3 -3
  197. package/dist/patterns/cqrs/index.d.cts +6 -6
  198. package/dist/patterns/cqrs/index.d.ts +6 -6
  199. package/dist/patterns/cqrs/index.js +1 -1
  200. package/dist/patterns/demo-shell/index.cjs +5 -5
  201. package/dist/patterns/demo-shell/index.d.cts +5 -5
  202. package/dist/patterns/demo-shell/index.d.ts +5 -5
  203. package/dist/patterns/demo-shell/index.js +1 -1
  204. package/dist/patterns/domain-templates/index.cjs +3 -3
  205. package/dist/patterns/domain-templates/index.d.cts +4 -4
  206. package/dist/patterns/domain-templates/index.d.ts +4 -4
  207. package/dist/patterns/domain-templates/index.js +1 -1
  208. package/dist/patterns/graphspec/index.cjs +16 -16
  209. package/dist/patterns/graphspec/index.d.cts +5 -5
  210. package/dist/patterns/graphspec/index.d.ts +5 -5
  211. package/dist/patterns/graphspec/index.js +1 -1
  212. package/dist/patterns/harness/index.cjs +9 -9
  213. package/dist/patterns/harness/index.d.cts +10 -11
  214. package/dist/patterns/harness/index.d.ts +10 -11
  215. package/dist/patterns/harness/index.js +1 -1
  216. package/dist/patterns/inspect/index.cjs +3 -3
  217. package/dist/patterns/inspect/index.d.cts +7 -7
  218. package/dist/patterns/inspect/index.d.ts +7 -7
  219. package/dist/patterns/inspect/index.js +1 -1
  220. package/dist/patterns/job-queue/index.cjs +3 -3
  221. package/dist/patterns/job-queue/index.d.cts +6 -6
  222. package/dist/patterns/job-queue/index.d.ts +6 -6
  223. package/dist/patterns/job-queue/index.js +1 -1
  224. package/dist/patterns/memory/index.cjs +3 -3
  225. package/dist/patterns/memory/index.d.cts +6 -6
  226. package/dist/patterns/memory/index.d.ts +6 -6
  227. package/dist/patterns/memory/index.js +1 -1
  228. package/dist/patterns/messaging/index.cjs +3 -3
  229. package/dist/patterns/messaging/index.d.cts +5 -5
  230. package/dist/patterns/messaging/index.d.ts +5 -5
  231. package/dist/patterns/messaging/index.js +1 -1
  232. package/dist/patterns/orchestration/index.cjs +3 -3
  233. package/dist/patterns/orchestration/index.d.cts +6 -7
  234. package/dist/patterns/orchestration/index.d.ts +6 -7
  235. package/dist/patterns/orchestration/index.js +1 -1
  236. package/dist/patterns/process/index.cjs +3 -1
  237. package/dist/patterns/process/index.d.cts +7 -7
  238. package/dist/patterns/process/index.d.ts +7 -7
  239. package/dist/patterns/process/index.js +1 -1
  240. package/dist/patterns/reactive-layout/index.cjs +4 -4
  241. package/dist/patterns/reactive-layout/index.d.cts +5 -5
  242. package/dist/patterns/reactive-layout/index.d.ts +5 -5
  243. package/dist/patterns/reactive-layout/index.js +1 -1
  244. package/dist/patterns/reduction/index.cjs +3 -3
  245. package/dist/patterns/reduction/index.d.cts +4 -4
  246. package/dist/patterns/reduction/index.d.ts +4 -4
  247. package/dist/patterns/reduction/index.js +1 -1
  248. package/dist/patterns/surface/index.cjs +10 -10
  249. package/dist/patterns/surface/index.d.cts +6 -6
  250. package/dist/patterns/surface/index.d.ts +6 -6
  251. package/dist/patterns/surface/index.js +1 -1
  252. package/dist/{pipeline-graph-WBlobVhU.d.cts → pipeline-graph-CIKhynsF.d.cts} +11 -6
  253. package/dist/{pipeline-graph-v8fMvqNk.d.ts → pipeline-graph-Sgj0gCwn.d.ts} +11 -6
  254. package/dist/{reactive-layout-v7KPvxoc.d.ts → reactive-layout-DOTs9P3X.d.ts} +2 -2
  255. package/dist/{reactive-layout-Dsvob4zD.d.cts → reactive-layout-DgctbqZo.d.cts} +2 -2
  256. package/dist/{reactive-log-BezYsbA_.d.ts → reactive-log-BKALbfal.d.ts} +1 -1
  257. package/dist/{reactive-log-B00laMSQ.d.cts → reactive-log-DIGdYqQ6.d.cts} +1 -1
  258. package/dist/{reactive-map-48mnZ-nu.d.cts → reactive-map-CEFGp8TK.d.cts} +1 -1
  259. package/dist/{reactive-map-BVVPdvmi.d.ts → reactive-map-DS_SIAxv.d.ts} +1 -1
  260. package/dist/resilience-6LYQJAC5.js +1 -0
  261. package/dist/sugar-DQjFmVqb.d.cts +399 -0
  262. package/dist/sugar-fhLIE7TT.d.ts +399 -0
  263. package/dist/{topology-tree-BSdfSwMi.d.cts → topology-tree-Bcz27hpF.d.cts} +1 -1
  264. package/dist/{topology-tree-BNGvuG82.d.ts → topology-tree-xvaD0fOX.d.ts} +1 -1
  265. package/dist/{types-B1jDWVsM.d.cts → types-C0_yquda.d.cts} +1 -1
  266. package/dist/{types-DkzUUs0H.d.ts → types-CWFysE9E.d.ts} +1 -1
  267. package/package.json +1 -1
  268. package/dist/chunk-3ERTUW2J.js +0 -45
  269. package/dist/chunk-3K7HA4Y6.js +0 -1
  270. package/dist/chunk-3ZZX7M25.js +0 -1
  271. package/dist/chunk-4I45FVQS.js +0 -1
  272. package/dist/chunk-5ST42ESJ.js +0 -1
  273. package/dist/chunk-7VKFXLZQ.js +0 -84
  274. package/dist/chunk-ACMJ2ZPS.js +0 -3
  275. package/dist/chunk-AS3TV2TV.js +0 -1
  276. package/dist/chunk-LPRWATHB.js +0 -61
  277. package/dist/chunk-LYCLF26R.js +0 -1
  278. package/dist/chunk-VE5SIZEM.js +0 -1
  279. package/dist/chunk-XLQPNNIC.js +0 -1
  280. package/dist/meta-BgVAsg9j.d.ts +0 -102
  281. package/dist/meta-vE8bxW1E.d.cts +0 -102
  282. package/dist/resilience-445VFFXQ.js +0 -1
  283. package/dist/sugar-CH-2ZY90.d.ts +0 -203
  284. package/dist/sugar-DStZfUEK.d.cts +0 -203
@@ -1 +0,0 @@
1
- import{a as I,b as P,c as V,d as j,f as _,g as w}from"./chunk-3G5U5QNE.js";import{a as C,b as D,c as $,d as R,g as A,h as S,i as N,j as h,k as T,l as F}from"./chunk-ACMJ2ZPS.js";import{a as m,b as g,c as k,d as v,e as O,f as E,g as G,h as x}from"./chunk-LYCLF26R.js";import{b as u}from"./chunk-CK2E7BTU.js";import{b as H}from"./chunk-QYADASLV.js";var q={};H(q,{ENVELOPE_VERSION:()=>v,GRAPH_META_SEGMENT:()=>S,Graph:()=>h,JsonCodec:()=>m,SIZEOF_OVERHEAD:()=>C,SIZEOF_SYMBOL:()=>D,SNAPSHOT_VERSION:()=>N,createDagCborCodec:()=>g,createDagCborZstdCodec:()=>k,decodeEnvelope:()=>E,diffForWAL:()=>T,encodeEnvelope:()=>O,explainPath:()=>R,graphProfile:()=>A,reachable:()=>F,registerBuiltinCodecs:()=>G,replayWAL:()=>x,sizeof:()=>$,validateGraphObservability:()=>W,validateNoIslands:()=>M,watchTopologyTree:()=>L});function L(n,p){let o=new Map,c=(s,a)=>{if(o.has(s))return;let i={off:()=>{},prefix:a};o.set(s,i);let f=s.topology.subscribe(l=>{for(let t of l){if(t[0]!==u)continue;let e=t[1];if(p(e,s,a),e.kind==="added"&&e.nodeKind==="mount"){let r=s._mounts.get(e.name);if(r instanceof h){let d=`${a}${e.name}::`;c(r,d)}}else if(e.kind==="removed"&&e.nodeKind==="mount"){let r=`${a}${e.name}::`;for(let[d,y]of Array.from(o.entries()))d!==n&&y.prefix.startsWith(r)&&(y.off(),o.delete(d))}}});i.off=f;for(let[l,t]of s._mounts)if(t instanceof h){let e=`${a}${l}::`;c(t,e)}};return c(n,""),()=>{for(let s of o.values())s.off();o.clear()}}function M(n){let p=n.describe({detail:"minimal"}),o=Object.keys(p.nodes),c=new Set;for(let a of o){let i=p.nodes[a];if(!i)continue;let f=i.deps??[];for(let l of f)c.add(l)}let s=[];for(let a of o){let i=p.nodes[a];if(!i)continue;let l=(i.deps??[]).length,t=c.has(a);if(l===0&&!t){let e=i.type??"unknown";s.push({path:a,kind:e})}}return s.sort((a,i)=>a.path<i.path?-1:a.path>i.path?1:0),{ok:s.length===0,orphans:s,summary(){if(s.length===0)return"validateNoIslands: ok (no islands)";let a=s.slice(0,3).map(i=>`${i.path} (${i.kind})`).join(", ");return`validateNoIslands: ${s.length} island node(s) \u2014 ${a}${s.length>3?", \u2026":""}`}}}var K={json:n=>V(n),pretty:n=>w(n),mermaid:n=>j(n),"mermaid-url":n=>_(n),d2:n=>P(n),ascii:n=>I(n)};function W(n,p={}){let o=[],c=p.requireFound??!0;if(p.skipDescribe!==!0)try{let t=n.describe(),e=new Set(Object.keys(t.nodes)),r=[];for(let[d,y]of Object.entries(t.nodes))for(let b of y.deps)b!==""&&!e.has(b)&&r.push(`${d} \u2192 ${b}`);for(let d of t.edges)e.has(d.from)||r.push(`edge.from: ${d.from}`),e.has(d.to)||r.push(`edge.to: ${d.to}`);r.length>0?o.push({kind:"describe",ok:!1,reason:`describe() has ${r.length} dangling pointer(s); nodes \u2289 deps`,danglingDeps:r}):o.push({kind:"describe",ok:!0,nodeCount:e.size,edgeCount:t.edges.length})}catch(t){o.push({kind:"describe",ok:!1,reason:`describe() threw: ${t instanceof Error?t.message:String(t)}`})}if((p.formats?.length??0)>0){let t=n.describe();for(let e of p.formats)try{let r=K[e](t);typeof r!="string"||r.length===0?o.push({kind:"describe-format",ok:!1,format:e,reason:`${e} renderer returned empty or non-string output`}):o.push({kind:"describe-format",ok:!0,format:e,length:r.length})}catch(r){o.push({kind:"describe-format",ok:!1,format:e,reason:r instanceof Error?r.message:String(r)})}}for(let t of p.paths??[])try{n.resolve(t),o.push({kind:"observe",ok:!0,path:t})}catch(e){o.push({kind:"observe",ok:!1,path:t,reason:e instanceof Error?e.message:String(e)})}for(let[t,e]of p.pairs??[])try{let r=n.explain(t,e);c&&r.found===!1?o.push({kind:"explain",ok:!1,from:t,to:e,reason:`explain(${t} \u2192 ${e}) found no path${r.reason?`: ${r.reason}`:""}`}):o.push({kind:"explain",ok:!0,from:t,to:e,found:r.found,steps:r.steps.length})}catch(r){o.push({kind:"explain",ok:!1,from:t,to:e,reason:r instanceof Error?r.message:String(r)})}let s=o.filter(t=>!t.ok),a=s.length===0,i=p.paths?.length??0,f=p.pairs?.length??0,l=p.formats?.length??0;return{ok:a,checks:o,failures:s,summary(){let t=[p.skipDescribe===!0?null:"describe",l>0?`${l} format${l===1?"":"s"}`:null,i>0?`${i} observe path${i===1?"":"s"}`:null,f>0?`${f} explain pair${f===1?"":"s"}`:null].filter(r=>r!=null),e=t.length>0?t.join(", "):"describe-only";return a?`validateGraphObservability: OK (${e})`:`validateGraphObservability: ${s.length} failure(s) across ${e}`}}}export{L as a,M as b,W as c,q as d};
@@ -1,102 +0,0 @@
1
- import { e as NodeDescribeKind, N as Node, A as Actor } from './node-ClS5yC-B.js';
2
-
3
- /**
4
- * JSON-shaped slice of a node for `Graph.describe()`
5
- * (GRAPHREFLY-SPEC §3.6, Appendix B).
6
- */
7
- type DescribeNodeOutput = {
8
- type: NodeDescribeKind;
9
- status?: Node["status"];
10
- deps: string[];
11
- meta?: Record<string, unknown>;
12
- name?: string;
13
- value?: unknown;
14
- /** True when the node is in `"sentinel"` state (no value ever). */
15
- sentinel?: boolean;
16
- v?: {
17
- id: string;
18
- version: number;
19
- cid?: string;
20
- prev?: string | null;
21
- };
22
- guard?: string;
23
- lastMutation?: Readonly<{
24
- actor: Actor;
25
- timestamp_ns: number;
26
- }>;
27
- /**
28
- * Latest annotation attached via `graph.trace(path, annotation)` or via
29
- * `graph.add(node, { name: path, annotation })`, when present. Populated by
30
- * `Graph.describe` only — `describeNode` has no graph context.
31
- */
32
- annotation?: string;
33
- };
34
- /**
35
- * Detail level for progressive disclosure (Phase 3.3b).
36
- *
37
- * - `"minimal"` — `type`, `deps` only.
38
- * - `"standard"` — minimal + `status`, `value`, `meta`, `v`.
39
- * - `"full"` — every field.
40
- * - `"spec"` — Tier 1.5.3 (Session A.1 lock + Phase 3 path (b)). Projects
41
- * spec-relevant fields (`type`, `deps`, `meta` — including
42
- * `meta.factory` / `meta.factoryArgs`) and strips runtime fields
43
- * (`status`, `lastMutation`, `guard`, `sentinel`, `v`). **Retains
44
- * `value` for state nodes only** so the seed initial value round-trips
45
- * through `decompileSpec` → `compileSpec` without forcing every state
46
- * constructor to spawn `meta.factory`/`factoryArgs` companion nodes.
47
- * The output is structurally identical to the `GraphSpec` shape so
48
- * `decompileSpec(g) === describe(g, { detail: "spec" })`.
49
- */
50
- type DescribeDetail = "minimal" | "standard" | "full" | "spec";
51
- /** Valid field names for `describe({ fields: [...] })`. */
52
- type DescribeField = "type" | "status" | "value" | "deps" | "meta" | "v" | "guard" | "lastMutation" | `meta.${string}`;
53
- /** Resolve which fields to include based on detail level or explicit field list. */
54
- declare function resolveDescribeFields(detail?: DescribeDetail, fields?: readonly DescribeField[]): Set<string> | null;
55
- /**
56
- * Walk an arbitrary value, replacing non-JSON-serializable fields with
57
- * descriptive string placeholders (Tier 1.5.3 Phase 2.5 — DG2=ii). Useful for
58
- * `Graph.prototype.tagFactory(name, args)` when the factory's options include
59
- * `LLMAdapter` instances, callbacks, or `Node`s that don't survive
60
- * serialization. Output preserves structure for documentation / audit value;
61
- * recipients of the spec see "<Node>" / "<function>" / etc. in place of the
62
- * unserializable bits.
63
- *
64
- * Heuristics:
65
- * - `null` / `undefined` / boolean / number / string — kept as-is.
66
- * - `function` — `"<function>"`.
67
- * - Object with `subscribe` method — `"<Node>"` (matches Node-shape duck check).
68
- * - Array — recursed.
69
- * - Plain object — recursed.
70
- * - Anything else — `"<unserializable>"`.
71
- */
72
- declare function placeholderArgs(opts: Record<string, unknown>): Record<string, unknown>;
73
- /**
74
- * Build a `meta` fragment that stamps a factory identifier and its construction
75
- * arguments onto a node, so `describe({ detail: "spec" })` exposes enough
76
- * information for `compileSpec` to recreate the node from the snapshot.
77
- *
78
- * Use inside node-producing factories at construction time:
79
- *
80
- * ```ts
81
- * import { factoryTag } from "@graphrefly/graphrefly";
82
- *
83
- * export function rateLimiter<T>(source: NodeInput<T>, opts: RateLimiterOptions): Node<T> {
84
- * return derived([fromAny(source)], fn, {
85
- * name: "rate-limiter",
86
- * meta: { ...factoryTag("rateLimiter", opts), domain: "resilience" },
87
- * });
88
- * }
89
- * ```
90
- *
91
- * `factoryArgs` should be JSON-serializable so the spec round-trips through
92
- * `decompileSpec → compileSpec`. Function-typed args break determinism — use
93
- * the {@link COMPOSITION-GUIDE} §39 `meta.fnId` pattern for those.
94
- *
95
- * Tier 1.5.3 (Session A.1 lock).
96
- */
97
- declare function factoryTag(factory: string, factoryArgs?: unknown): {
98
- factory: string;
99
- factoryArgs?: unknown;
100
- };
101
-
102
- export { type DescribeNodeOutput as D, type DescribeDetail as a, type DescribeField as b, factoryTag as f, placeholderArgs as p, resolveDescribeFields as r };
@@ -1,102 +0,0 @@
1
- import { e as NodeDescribeKind, N as Node, A as Actor } from './node-ClS5yC-B.cjs';
2
-
3
- /**
4
- * JSON-shaped slice of a node for `Graph.describe()`
5
- * (GRAPHREFLY-SPEC §3.6, Appendix B).
6
- */
7
- type DescribeNodeOutput = {
8
- type: NodeDescribeKind;
9
- status?: Node["status"];
10
- deps: string[];
11
- meta?: Record<string, unknown>;
12
- name?: string;
13
- value?: unknown;
14
- /** True when the node is in `"sentinel"` state (no value ever). */
15
- sentinel?: boolean;
16
- v?: {
17
- id: string;
18
- version: number;
19
- cid?: string;
20
- prev?: string | null;
21
- };
22
- guard?: string;
23
- lastMutation?: Readonly<{
24
- actor: Actor;
25
- timestamp_ns: number;
26
- }>;
27
- /**
28
- * Latest annotation attached via `graph.trace(path, annotation)` or via
29
- * `graph.add(node, { name: path, annotation })`, when present. Populated by
30
- * `Graph.describe` only — `describeNode` has no graph context.
31
- */
32
- annotation?: string;
33
- };
34
- /**
35
- * Detail level for progressive disclosure (Phase 3.3b).
36
- *
37
- * - `"minimal"` — `type`, `deps` only.
38
- * - `"standard"` — minimal + `status`, `value`, `meta`, `v`.
39
- * - `"full"` — every field.
40
- * - `"spec"` — Tier 1.5.3 (Session A.1 lock + Phase 3 path (b)). Projects
41
- * spec-relevant fields (`type`, `deps`, `meta` — including
42
- * `meta.factory` / `meta.factoryArgs`) and strips runtime fields
43
- * (`status`, `lastMutation`, `guard`, `sentinel`, `v`). **Retains
44
- * `value` for state nodes only** so the seed initial value round-trips
45
- * through `decompileSpec` → `compileSpec` without forcing every state
46
- * constructor to spawn `meta.factory`/`factoryArgs` companion nodes.
47
- * The output is structurally identical to the `GraphSpec` shape so
48
- * `decompileSpec(g) === describe(g, { detail: "spec" })`.
49
- */
50
- type DescribeDetail = "minimal" | "standard" | "full" | "spec";
51
- /** Valid field names for `describe({ fields: [...] })`. */
52
- type DescribeField = "type" | "status" | "value" | "deps" | "meta" | "v" | "guard" | "lastMutation" | `meta.${string}`;
53
- /** Resolve which fields to include based on detail level or explicit field list. */
54
- declare function resolveDescribeFields(detail?: DescribeDetail, fields?: readonly DescribeField[]): Set<string> | null;
55
- /**
56
- * Walk an arbitrary value, replacing non-JSON-serializable fields with
57
- * descriptive string placeholders (Tier 1.5.3 Phase 2.5 — DG2=ii). Useful for
58
- * `Graph.prototype.tagFactory(name, args)` when the factory's options include
59
- * `LLMAdapter` instances, callbacks, or `Node`s that don't survive
60
- * serialization. Output preserves structure for documentation / audit value;
61
- * recipients of the spec see "<Node>" / "<function>" / etc. in place of the
62
- * unserializable bits.
63
- *
64
- * Heuristics:
65
- * - `null` / `undefined` / boolean / number / string — kept as-is.
66
- * - `function` — `"<function>"`.
67
- * - Object with `subscribe` method — `"<Node>"` (matches Node-shape duck check).
68
- * - Array — recursed.
69
- * - Plain object — recursed.
70
- * - Anything else — `"<unserializable>"`.
71
- */
72
- declare function placeholderArgs(opts: Record<string, unknown>): Record<string, unknown>;
73
- /**
74
- * Build a `meta` fragment that stamps a factory identifier and its construction
75
- * arguments onto a node, so `describe({ detail: "spec" })` exposes enough
76
- * information for `compileSpec` to recreate the node from the snapshot.
77
- *
78
- * Use inside node-producing factories at construction time:
79
- *
80
- * ```ts
81
- * import { factoryTag } from "@graphrefly/graphrefly";
82
- *
83
- * export function rateLimiter<T>(source: NodeInput<T>, opts: RateLimiterOptions): Node<T> {
84
- * return derived([fromAny(source)], fn, {
85
- * name: "rate-limiter",
86
- * meta: { ...factoryTag("rateLimiter", opts), domain: "resilience" },
87
- * });
88
- * }
89
- * ```
90
- *
91
- * `factoryArgs` should be JSON-serializable so the spec round-trips through
92
- * `decompileSpec → compileSpec`. Function-typed args break determinism — use
93
- * the {@link COMPOSITION-GUIDE} §39 `meta.fnId` pattern for those.
94
- *
95
- * Tier 1.5.3 (Session A.1 lock).
96
- */
97
- declare function factoryTag(factory: string, factoryArgs?: unknown): {
98
- factory: string;
99
- factoryArgs?: unknown;
100
- };
101
-
102
- export { type DescribeNodeOutput as D, type DescribeDetail as a, type DescribeField as b, factoryTag as f, placeholderArgs as p, resolveDescribeFields as r };
@@ -1 +0,0 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"./chunk-AS3TV2TV.js";import"./chunk-L6NSJVJZ.js";import"./chunk-XLQPNNIC.js";import"./chunk-3G5U5QNE.js";import"./chunk-C72GO4IZ.js";import"./chunk-ACMJ2ZPS.js";import"./chunk-ESMPEKEV.js";import"./chunk-6YFZMUMR.js";import"./chunk-4VVTGLXJ.js";import"./chunk-2K5RXLAH.js";import"./chunk-35JTVPOX.js";import"./chunk-LYCLF26R.js";import"./chunk-CK2E7BTU.js";import"./chunk-QYADASLV.js";export{e as CircuitOpenError,i as RateLimiterOverflowError,b as ResilientPipelineGraph,l as TimeoutError,a as budgetGate,f as circuitBreaker,m as fallback,j as rateLimiter,c as resilientPipeline,d as retry,n as timeout,h as tokenBucket,g as withBreaker,k as withStatus};
@@ -1,203 +0,0 @@
1
- import { a as NodeOptions, F as FnCtx, N as Node, c as NodeActions, d as NodeFnCleanup } from './node-ClS5yC-B.js';
2
-
3
- /**
4
- * Sugar constructors over the raw `node()` primitive.
5
- *
6
- * Each factory wraps a user-friendly function into the canonical
7
- * `NodeFn = (data, actions, ctx) => cleanup | void` shape, then calls
8
- * `node(...)`. This is the only place `actions.emit(...)` is invoked
9
- * on behalf of the user — if you need finer control (multi-emission,
10
- * raw `actions.down` / `actions.up`, cleanup return), use the raw
11
- * `node()` factory from `./node.js` directly.
12
- *
13
- * See SESSION-foundation-redesign.md §8.5 + §10.6 for the rewrite.
14
- */
15
-
16
- /**
17
- * Creates a manual source node. Drive it with `state.emit(v)` (framed,
18
- * diamond-safe) or `state.down([[DATA, v]])` (raw compat path).
19
- *
20
- * @param initial - Starting cached value. Pass `undefined` or `null`
21
- * explicitly to cache that value; omit to leave the node in `"sentinel"`.
22
- * @param opts - Optional {@link NodeOptions} (excluding `initial`).
23
- */
24
- declare function state<T>(initial: T, opts?: Omit<NodeOptions<T>, "initial">): Node<T>;
25
- /**
26
- * User-level producer compute: runs once on first-subscriber activation.
27
- * Receives `actions` for imperative emission and `ctx` for FnCtx (typically
28
- * only `store` is useful on a producer — no deps means `prevData` and
29
- * `terminalDeps` are empty).
30
- */
31
- type ProducerFn = (actions: NodeActions, ctx: FnCtx) => NodeFnCleanup | void;
32
- /**
33
- * Creates a producer node with no deps; `fn` runs once when the first
34
- * subscriber connects. Return a cleanup function (`() => void` — fires on
35
- * every transition) or an object with granular hooks
36
- * (`{ beforeRun?, deactivate?, invalidate? }` — each hook fires on its named
37
- * transition only) to register teardown. See {@link NodeFnCleanup}.
38
- *
39
- * @example
40
- * ```ts
41
- * const ticker = producer((actions) => {
42
- * const id = setInterval(() => actions.emit(Date.now()), 1000);
43
- * return () => clearInterval(id);
44
- * });
45
- * ```
46
- */
47
- declare function producer<T = unknown>(fn: ProducerFn, opts?: NodeOptions<T>): Node<T>;
48
- /**
49
- * User-level derived compute: receives the latest DATA from each dep and
50
- * returns the new value. The sugar wraps it with `actions.emit(fn(...))`
51
- * so the return value flows through the framed emit pipeline.
52
- *
53
- * For derived nodes that need to inspect `ctx.prevData` / `ctx.terminalDeps`
54
- * / `ctx.store`, accept the optional second parameter.
55
- */
56
- type DerivedFn<T> = (data: readonly unknown[], ctx: FnCtx) => T | undefined | null;
57
- /**
58
- * Creates a derived node that computes **one output per wave** from the latest
59
- * value of each dependency — **snapshot / combine semantics**.
60
- *
61
- * `fn` receives one scalar per dep (the last DATA value seen this wave, or the
62
- * prior-wave value as fallback). It is called once per settled wave and emits
63
- * a single value via `actions.emit`. The equals check then suppresses the
64
- * emission as `RESOLVED` if the output has not changed.
65
- *
66
- * **Not for streaming one-to-one transforms.** If each DATA value in a batch
67
- * must produce a corresponding output (e.g. transforming every item emitted by
68
- * `fromIter` individually), use {@link map} or raw `node()` with full batch
69
- * iteration instead. `derived` only sees the *last* value per dep when a batch
70
- * carries multiple DATAs.
71
- *
72
- * @example
73
- * ```ts
74
- * const a = state(1);
75
- * const b = derived([a], ([x]) => (x as number) * 2);
76
- * ```
77
- */
78
- declare function derived<T = unknown>(deps: readonly Node[], fn: DerivedFn<T>, opts?: NodeOptions<T>): Node<T>;
79
- /**
80
- * User-level effect compute: fires when deps settle. Return value is NOT
81
- * auto-emitted — use `actions.emit(v)` / `actions.down(msgs)` explicitly if
82
- * the effect also wants to produce downstream messages. Return a cleanup
83
- * function (`() => void`) or an object with granular hooks
84
- * (`{ beforeRun?, deactivate?, invalidate? }`) to register teardown.
85
- * See {@link NodeFnCleanup}.
86
- */
87
- type EffectFn = (data: readonly unknown[], actions: NodeActions, ctx: FnCtx) => NodeFnCleanup | void;
88
- /**
89
- * Runs a side-effect when deps settle. Return value is not auto-emitted.
90
- *
91
- * @example
92
- * ```ts
93
- * effect([source], ([v]) => {
94
- * console.log(v);
95
- * });
96
- * ```
97
- */
98
- declare function effect(deps: readonly Node[], fn: EffectFn, opts?: NodeOptions<unknown>): Node<unknown>;
99
- /**
100
- * Proxy handed to a {@link DynamicFn}. `track(dep)` returns the dep's
101
- * latest DATA payload, as delivered through the protocol. Reading from
102
- * `track` does NOT bypass the message protocol — it reads the internal
103
- * `DepRecord.prevData` (the stable end-of-previous-wave value) that
104
- * `_onDepMessage` already populated. If a dep has not yet sent DATA,
105
- * `track` returns `undefined`.
106
- */
107
- type TrackFn = (dep: Node) => unknown;
108
- /** User-level dynamicNode compute. */
109
- type DynamicFn<T> = (track: TrackFn, ctx: FnCtx) => T | undefined | null;
110
- /**
111
- * Sugar over `derived(...)` that exposes dep values via a `track(dep)`
112
- * proxy instead of positional `data[i]`. All declared `allDeps` participate
113
- * in wave tracking, so the first fn run waits for every dep to settle.
114
- * Unused deps that update just re-run fn; `equals` absorbs unchanged
115
- * outputs as RESOLVED.
116
- *
117
- * P3-compliant: `track(dep)` reads from the framework-managed
118
- * `DepRecord.prevData` populated by the protocol, never from
119
- * `dep.cache`.
120
- *
121
- * @example
122
- * ```ts
123
- * const a = state(1);
124
- * const b = state(10);
125
- * const sum = dynamicNode([a, b], (track) => (track(a) as number) + (track(b) as number));
126
- * ```
127
- */
128
- declare function dynamicNode<T = unknown>(allDeps: readonly Node[], fn: DynamicFn<T>, opts?: NodeOptions<T> & {
129
- partial?: boolean;
130
- }): Node<T>;
131
- /**
132
- * Like {@link dynamicNode} but deps are discovered at runtime via `track()`
133
- * calls — no upfront `allDeps` array needed. Designed for pull-based compat
134
- * layers (Jotai atoms, TC39 Signals) where deps are unknown until fn runs.
135
- *
136
- * **Two-phase discovery:**
137
- * 1. fn runs. Each `track(dep)` for an unknown dep: subscribes immediately
138
- * via `_addDep`, returns `dep.cache` as a stub (P3 boundary exception).
139
- * Result is discarded (discovery run).
140
- * 2. New deps settle (DATA from subscribe handshake). Wave machinery
141
- * re-triggers fn. `track(dep)` now returns protocol-delivered `data[i]`.
142
- * If MORE unknown deps appear, repeat step 1.
143
- * 3. Converges when no new deps found → real run → `actions.emit(result)`.
144
- *
145
- * P3 violation is limited to discovery runs. Once all deps are known,
146
- * subsequent waves use protocol-delivered values exclusively.
147
- *
148
- * Re-entrance safety: `_addDep` subscribes immediately. If the dep delivers
149
- * DATA synchronously during fn execution, `_execFn`'s re-entrance guard
150
- * defers the re-run to after the current fn returns.
151
- *
152
- * @param opts - Optional {@link AutoTrackOptions}. Pass `{ partial: true }` to
153
- * allow fn to run before all known deps have delivered their first value
154
- * (useful for optional/secondary deps).
155
- *
156
- * @example
157
- * ```ts
158
- * const a = state(1), b = state(2);
159
- * const sum = autoTrackNode((track) => track(a) + track(b));
160
- * // deps [a, b] discovered automatically on first run
161
- * ```
162
- */
163
- /**
164
- * Options for {@link autoTrackNode}.
165
- */
166
- interface AutoTrackOptions<T> extends NodeOptions<T> {
167
- /**
168
- * When `true`, fn may run before all known deps have delivered their first
169
- * DATA. Unknown deps return `undefined` via `track()`, which the fn must
170
- * handle explicitly. Useful when some deps are "nice-to-have" — e.g. a
171
- * primary computation should continue while a secondary dep is still
172
- * initialising.
173
- *
174
- * When `false` (default), fn is held until every declared dep has delivered
175
- * at least one DATA value — core's first-run gate (spec §2.7) handles this.
176
- * Delegates to {@link NodeOptions.partial}; both semantics are aligned: the
177
- * gate is first-run-only (`_hasCalledFnOnce`), so INVALIDATE on a dep does
178
- * NOT re-gate after fn has fired once. Pull-based compat layers (Signals,
179
- * Jotai) that rely on "consistent compute across INVALIDATE" should
180
- * explicitly wrap their dep reads with null/undefined handling in fn.
181
- *
182
- * @default false
183
- */
184
- partial?: boolean;
185
- }
186
- declare function autoTrackNode<T = unknown>(fn: (track: TrackFn, ctx: FnCtx) => T | undefined | null, opts?: AutoTrackOptions<T>): Node<T>;
187
- /** Unary operator used by {@link pipe}. */
188
- type PipeOperator = (n: Node) => Node;
189
- /**
190
- * Composes unary operators left-to-right; returns the final node.
191
- *
192
- * @example
193
- * ```ts
194
- * const out = pipe(
195
- * source,
196
- * (n) => map(n, (x) => x + 1),
197
- * (n) => filter(n, (x) => x > 0),
198
- * );
199
- * ```
200
- */
201
- declare function pipe(source: Node, ...ops: PipeOperator[]): Node;
202
-
203
- export { type AutoTrackOptions as A, type DerivedFn as D, type EffectFn as E, type PipeOperator as P, type TrackFn as T, type DynamicFn as a, type ProducerFn as b, autoTrackNode as c, derived as d, dynamicNode as e, effect as f, producer as g, pipe as p, state as s };
@@ -1,203 +0,0 @@
1
- import { a as NodeOptions, F as FnCtx, N as Node, c as NodeActions, d as NodeFnCleanup } from './node-ClS5yC-B.cjs';
2
-
3
- /**
4
- * Sugar constructors over the raw `node()` primitive.
5
- *
6
- * Each factory wraps a user-friendly function into the canonical
7
- * `NodeFn = (data, actions, ctx) => cleanup | void` shape, then calls
8
- * `node(...)`. This is the only place `actions.emit(...)` is invoked
9
- * on behalf of the user — if you need finer control (multi-emission,
10
- * raw `actions.down` / `actions.up`, cleanup return), use the raw
11
- * `node()` factory from `./node.js` directly.
12
- *
13
- * See SESSION-foundation-redesign.md §8.5 + §10.6 for the rewrite.
14
- */
15
-
16
- /**
17
- * Creates a manual source node. Drive it with `state.emit(v)` (framed,
18
- * diamond-safe) or `state.down([[DATA, v]])` (raw compat path).
19
- *
20
- * @param initial - Starting cached value. Pass `undefined` or `null`
21
- * explicitly to cache that value; omit to leave the node in `"sentinel"`.
22
- * @param opts - Optional {@link NodeOptions} (excluding `initial`).
23
- */
24
- declare function state<T>(initial: T, opts?: Omit<NodeOptions<T>, "initial">): Node<T>;
25
- /**
26
- * User-level producer compute: runs once on first-subscriber activation.
27
- * Receives `actions` for imperative emission and `ctx` for FnCtx (typically
28
- * only `store` is useful on a producer — no deps means `prevData` and
29
- * `terminalDeps` are empty).
30
- */
31
- type ProducerFn = (actions: NodeActions, ctx: FnCtx) => NodeFnCleanup | void;
32
- /**
33
- * Creates a producer node with no deps; `fn` runs once when the first
34
- * subscriber connects. Return a cleanup function (`() => void` — fires on
35
- * every transition) or an object with granular hooks
36
- * (`{ beforeRun?, deactivate?, invalidate? }` — each hook fires on its named
37
- * transition only) to register teardown. See {@link NodeFnCleanup}.
38
- *
39
- * @example
40
- * ```ts
41
- * const ticker = producer((actions) => {
42
- * const id = setInterval(() => actions.emit(Date.now()), 1000);
43
- * return () => clearInterval(id);
44
- * });
45
- * ```
46
- */
47
- declare function producer<T = unknown>(fn: ProducerFn, opts?: NodeOptions<T>): Node<T>;
48
- /**
49
- * User-level derived compute: receives the latest DATA from each dep and
50
- * returns the new value. The sugar wraps it with `actions.emit(fn(...))`
51
- * so the return value flows through the framed emit pipeline.
52
- *
53
- * For derived nodes that need to inspect `ctx.prevData` / `ctx.terminalDeps`
54
- * / `ctx.store`, accept the optional second parameter.
55
- */
56
- type DerivedFn<T> = (data: readonly unknown[], ctx: FnCtx) => T | undefined | null;
57
- /**
58
- * Creates a derived node that computes **one output per wave** from the latest
59
- * value of each dependency — **snapshot / combine semantics**.
60
- *
61
- * `fn` receives one scalar per dep (the last DATA value seen this wave, or the
62
- * prior-wave value as fallback). It is called once per settled wave and emits
63
- * a single value via `actions.emit`. The equals check then suppresses the
64
- * emission as `RESOLVED` if the output has not changed.
65
- *
66
- * **Not for streaming one-to-one transforms.** If each DATA value in a batch
67
- * must produce a corresponding output (e.g. transforming every item emitted by
68
- * `fromIter` individually), use {@link map} or raw `node()` with full batch
69
- * iteration instead. `derived` only sees the *last* value per dep when a batch
70
- * carries multiple DATAs.
71
- *
72
- * @example
73
- * ```ts
74
- * const a = state(1);
75
- * const b = derived([a], ([x]) => (x as number) * 2);
76
- * ```
77
- */
78
- declare function derived<T = unknown>(deps: readonly Node[], fn: DerivedFn<T>, opts?: NodeOptions<T>): Node<T>;
79
- /**
80
- * User-level effect compute: fires when deps settle. Return value is NOT
81
- * auto-emitted — use `actions.emit(v)` / `actions.down(msgs)` explicitly if
82
- * the effect also wants to produce downstream messages. Return a cleanup
83
- * function (`() => void`) or an object with granular hooks
84
- * (`{ beforeRun?, deactivate?, invalidate? }`) to register teardown.
85
- * See {@link NodeFnCleanup}.
86
- */
87
- type EffectFn = (data: readonly unknown[], actions: NodeActions, ctx: FnCtx) => NodeFnCleanup | void;
88
- /**
89
- * Runs a side-effect when deps settle. Return value is not auto-emitted.
90
- *
91
- * @example
92
- * ```ts
93
- * effect([source], ([v]) => {
94
- * console.log(v);
95
- * });
96
- * ```
97
- */
98
- declare function effect(deps: readonly Node[], fn: EffectFn, opts?: NodeOptions<unknown>): Node<unknown>;
99
- /**
100
- * Proxy handed to a {@link DynamicFn}. `track(dep)` returns the dep's
101
- * latest DATA payload, as delivered through the protocol. Reading from
102
- * `track` does NOT bypass the message protocol — it reads the internal
103
- * `DepRecord.prevData` (the stable end-of-previous-wave value) that
104
- * `_onDepMessage` already populated. If a dep has not yet sent DATA,
105
- * `track` returns `undefined`.
106
- */
107
- type TrackFn = (dep: Node) => unknown;
108
- /** User-level dynamicNode compute. */
109
- type DynamicFn<T> = (track: TrackFn, ctx: FnCtx) => T | undefined | null;
110
- /**
111
- * Sugar over `derived(...)` that exposes dep values via a `track(dep)`
112
- * proxy instead of positional `data[i]`. All declared `allDeps` participate
113
- * in wave tracking, so the first fn run waits for every dep to settle.
114
- * Unused deps that update just re-run fn; `equals` absorbs unchanged
115
- * outputs as RESOLVED.
116
- *
117
- * P3-compliant: `track(dep)` reads from the framework-managed
118
- * `DepRecord.prevData` populated by the protocol, never from
119
- * `dep.cache`.
120
- *
121
- * @example
122
- * ```ts
123
- * const a = state(1);
124
- * const b = state(10);
125
- * const sum = dynamicNode([a, b], (track) => (track(a) as number) + (track(b) as number));
126
- * ```
127
- */
128
- declare function dynamicNode<T = unknown>(allDeps: readonly Node[], fn: DynamicFn<T>, opts?: NodeOptions<T> & {
129
- partial?: boolean;
130
- }): Node<T>;
131
- /**
132
- * Like {@link dynamicNode} but deps are discovered at runtime via `track()`
133
- * calls — no upfront `allDeps` array needed. Designed for pull-based compat
134
- * layers (Jotai atoms, TC39 Signals) where deps are unknown until fn runs.
135
- *
136
- * **Two-phase discovery:**
137
- * 1. fn runs. Each `track(dep)` for an unknown dep: subscribes immediately
138
- * via `_addDep`, returns `dep.cache` as a stub (P3 boundary exception).
139
- * Result is discarded (discovery run).
140
- * 2. New deps settle (DATA from subscribe handshake). Wave machinery
141
- * re-triggers fn. `track(dep)` now returns protocol-delivered `data[i]`.
142
- * If MORE unknown deps appear, repeat step 1.
143
- * 3. Converges when no new deps found → real run → `actions.emit(result)`.
144
- *
145
- * P3 violation is limited to discovery runs. Once all deps are known,
146
- * subsequent waves use protocol-delivered values exclusively.
147
- *
148
- * Re-entrance safety: `_addDep` subscribes immediately. If the dep delivers
149
- * DATA synchronously during fn execution, `_execFn`'s re-entrance guard
150
- * defers the re-run to after the current fn returns.
151
- *
152
- * @param opts - Optional {@link AutoTrackOptions}. Pass `{ partial: true }` to
153
- * allow fn to run before all known deps have delivered their first value
154
- * (useful for optional/secondary deps).
155
- *
156
- * @example
157
- * ```ts
158
- * const a = state(1), b = state(2);
159
- * const sum = autoTrackNode((track) => track(a) + track(b));
160
- * // deps [a, b] discovered automatically on first run
161
- * ```
162
- */
163
- /**
164
- * Options for {@link autoTrackNode}.
165
- */
166
- interface AutoTrackOptions<T> extends NodeOptions<T> {
167
- /**
168
- * When `true`, fn may run before all known deps have delivered their first
169
- * DATA. Unknown deps return `undefined` via `track()`, which the fn must
170
- * handle explicitly. Useful when some deps are "nice-to-have" — e.g. a
171
- * primary computation should continue while a secondary dep is still
172
- * initialising.
173
- *
174
- * When `false` (default), fn is held until every declared dep has delivered
175
- * at least one DATA value — core's first-run gate (spec §2.7) handles this.
176
- * Delegates to {@link NodeOptions.partial}; both semantics are aligned: the
177
- * gate is first-run-only (`_hasCalledFnOnce`), so INVALIDATE on a dep does
178
- * NOT re-gate after fn has fired once. Pull-based compat layers (Signals,
179
- * Jotai) that rely on "consistent compute across INVALIDATE" should
180
- * explicitly wrap their dep reads with null/undefined handling in fn.
181
- *
182
- * @default false
183
- */
184
- partial?: boolean;
185
- }
186
- declare function autoTrackNode<T = unknown>(fn: (track: TrackFn, ctx: FnCtx) => T | undefined | null, opts?: AutoTrackOptions<T>): Node<T>;
187
- /** Unary operator used by {@link pipe}. */
188
- type PipeOperator = (n: Node) => Node;
189
- /**
190
- * Composes unary operators left-to-right; returns the final node.
191
- *
192
- * @example
193
- * ```ts
194
- * const out = pipe(
195
- * source,
196
- * (n) => map(n, (x) => x + 1),
197
- * (n) => filter(n, (x) => x > 0),
198
- * );
199
- * ```
200
- */
201
- declare function pipe(source: Node, ...ops: PipeOperator[]): Node;
202
-
203
- export { type AutoTrackOptions as A, type DerivedFn as D, type EffectFn as E, type PipeOperator as P, type TrackFn as T, type DynamicFn as a, type ProducerFn as b, autoTrackNode as c, derived as d, dynamicNode as e, effect as f, producer as g, pipe as p, state as s };