ranui 0.2.0-alpha.7 → 0.2.1-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/README.md +1 -1
  2. package/README.zh-CN.md +1 -1
  3. package/dist/abnfDiagram-VRR7QNED-CH_pIv_l.cjs +1 -0
  4. package/dist/abnfDiagram-VRR7QNED-CTsqwzwi.js +95 -0
  5. package/dist/arc-D25LhgTs.cjs +1 -0
  6. package/dist/arc-DRPGof21.js +82 -0
  7. package/dist/architecture-TIHT7OUA-BbBd15_y.cjs +1 -0
  8. package/dist/architecture-TIHT7OUA-pbFO1xSx.js +5 -0
  9. package/dist/architectureDiagram-ZJ3FMSHR-8mjyXr-w.js +4279 -0
  10. package/dist/architectureDiagram-ZJ3FMSHR-D_jWFFZx.cjs +36 -0
  11. package/dist/array-By5736M5.js +7 -0
  12. package/dist/array-C3cbN3GY.cjs +1 -0
  13. package/dist/arrow-down-Bi5kqUrX.js +12 -0
  14. package/dist/blockDiagram-677ZJIJ3-3F79MOSt.js +3321 -0
  15. package/dist/blockDiagram-677ZJIJ3-Cx35khWe.cjs +132 -0
  16. package/dist/builder.d.ts +4 -4
  17. package/dist/builder.js +39 -30
  18. package/dist/builtin-BkM0LLof.js +416 -0
  19. package/dist/button-D0zcnKnG.js +117 -0
  20. package/dist/button.js +1 -1
  21. package/dist/c4Diagram-LMCZKHZV-Cxn_gqu_.js +3064 -0
  22. package/dist/c4Diagram-LMCZKHZV-TRNb3Gvl.cjs +10 -0
  23. package/dist/{card-BVvXX6KM.js → card-CygMndQS.js} +2 -2
  24. package/dist/card.js +1 -1
  25. package/dist/channel-C9WSNwcS.cjs +1 -0
  26. package/dist/channel-k5-UxdcV.js +5 -0
  27. package/dist/{checkbox-BtoX9X2Z.js → checkbox-D5om9aJO.js} +10 -10
  28. package/dist/checkbox.js +1 -1
  29. package/dist/chunk-2Q5K7J3B-CTMy5FII.cjs +1 -0
  30. package/dist/chunk-2Q5K7J3B-DlFVJRAn.js +15 -0
  31. package/dist/chunk-32BRIVSS-BXVdG_nV.cjs +1 -0
  32. package/dist/chunk-32BRIVSS-jAuAwMVV.js +68 -0
  33. package/dist/chunk-52WLFC77-BChUrU24.cjs +10 -0
  34. package/dist/chunk-52WLFC77-wpL7en7e.js +630 -0
  35. package/dist/chunk-5VM5RSS4-Cni2Ogq2.js +19 -0
  36. package/dist/chunk-5VM5RSS4-DudUFQ_Z.cjs +15 -0
  37. package/dist/chunk-7BUUIJ7U-9hiBbc7O.js +87 -0
  38. package/dist/chunk-7BUUIJ7U-DMv_UkjI.cjs +1 -0
  39. package/dist/chunk-C7G6YPKG-CA-DNpvI.js +71 -0
  40. package/dist/chunk-C7G6YPKG-CKEeW9TM.cjs +1 -0
  41. package/dist/chunk-EX3LRPZG-BCmf0iDq.js +2137 -0
  42. package/dist/chunk-EX3LRPZG-DbfbNdXo.cjs +231 -0
  43. package/dist/chunk-FWX5IMBZ-D11-gbhc.cjs +1 -0
  44. package/dist/chunk-FWX5IMBZ-DZ5VYvm5.js +60 -0
  45. package/dist/chunk-HOUHSVGY-BGB3dOvI.cjs +1 -0
  46. package/dist/chunk-HOUHSVGY-DRQcQeMT.js +268 -0
  47. package/dist/chunk-ICXQ74PX-BbT9JaEW.cjs +2 -0
  48. package/dist/chunk-ICXQ74PX-DR8rL-xF.js +1377 -0
  49. package/dist/chunk-JWPE2WC7-CGEmUMMZ.js +8 -0
  50. package/dist/chunk-JWPE2WC7-D8EnWK1B.cjs +1 -0
  51. package/dist/chunk-KEIR6QF5-B2Op7cFH.js +22155 -0
  52. package/dist/chunk-KEIR6QF5-C4fcHpY0.cjs +161 -0
  53. package/dist/chunk-MOJQB5TN-BC46HDyu.js +516 -0
  54. package/dist/chunk-MOJQB5TN-oOeq982_.cjs +88 -0
  55. package/dist/chunk-OGEWGWER-BV51ll2w.js +33 -0
  56. package/dist/chunk-OGEWGWER-DX8sW1dT.cjs +1 -0
  57. package/dist/chunk-PUDLZKDR-48YaqVoF.cjs +156 -0
  58. package/dist/chunk-PUDLZKDR-NdMR0Ft5.js +4282 -0
  59. package/dist/chunk-Q4XR5HBZ-3BHjjc9u.js +1709 -0
  60. package/dist/chunk-Q4XR5HBZ-aBnPq509.cjs +70 -0
  61. package/dist/chunk-RYQCIY6F-BER2T9t0.js +246 -0
  62. package/dist/chunk-RYQCIY6F-DVRzSnsI.cjs +1 -0
  63. package/dist/chunk-V7JOEXUC-Cr_hr02u.js +3467 -0
  64. package/dist/chunk-V7JOEXUC-DHizzTla.cjs +206 -0
  65. package/dist/chunk-VAUOI2AC-DfQf5L2_.cjs +1 -0
  66. package/dist/chunk-VAUOI2AC-izt0o4id.js +11 -0
  67. package/dist/chunk-VR4S4FIN-CJi5okl4.js +26 -0
  68. package/dist/chunk-VR4S4FIN-KiwnPF31.cjs +1 -0
  69. package/dist/chunk-WYO6CB5R-DDHkKowO.js +4535 -0
  70. package/dist/chunk-WYO6CB5R-u4mJNOcO.cjs +127 -0
  71. package/dist/chunk-XXDRQBXY-BB1i_53q.js +9 -0
  72. package/dist/chunk-XXDRQBXY-C8VGLZmt.cjs +1 -0
  73. package/dist/chunk-Y2CYZVJY-0JxdZxki.js +13 -0
  74. package/dist/chunk-Y2CYZVJY-DPaYLFFP.cjs +1 -0
  75. package/dist/chunk-ZGVPDNZ5-6uMbTJXy.js +3841 -0
  76. package/dist/chunk-ZGVPDNZ5-Cw5_HJba.cjs +62 -0
  77. package/dist/chunk-ZIRB5QZD-C7OH2FI2.js +1280 -0
  78. package/dist/chunk-ZIRB5QZD-aLu-4ITN.cjs +32 -0
  79. package/dist/classDiagram-OUVF2IWQ-D6rqYIh0.cjs +1 -0
  80. package/dist/classDiagram-OUVF2IWQ-Df0ghim9.js +30 -0
  81. package/dist/classDiagram-v2-EOCWNBFH-D6rqYIh0.cjs +1 -0
  82. package/dist/classDiagram-v2-EOCWNBFH-Df0ghim9.js +30 -0
  83. package/dist/{colorpicker-Dukms7ET.js → colorpicker-qWnaTlYX.js} +9 -10
  84. package/dist/colorpicker.js +1 -1
  85. package/dist/components/colorpicker/index.d.ts +3 -3
  86. package/dist/components/glass/index.d.ts +52 -0
  87. package/dist/components/icon/builtin.d.ts +9 -0
  88. package/dist/components/icon/core-icons.d.ts +13 -0
  89. package/dist/components/icon/index.d.ts +8 -0
  90. package/dist/components/mermaid/index.d.ts +52 -0
  91. package/dist/components/modal/index.d.ts +9 -0
  92. package/dist/components/route/index.d.ts +10 -4
  93. package/dist/components/router/index.d.ts +3 -0
  94. package/dist/content-Rry-U6ir.js +39 -0
  95. package/dist/content.js +5 -0
  96. package/dist/cose-bilkent-JH36ORCC-BUxFTdey.cjs +1 -0
  97. package/dist/cose-bilkent-JH36ORCC-DTwvJlGw.js +2353 -0
  98. package/dist/cynefin-VYW2F7L2-6c1GOGXW.cjs +1 -0
  99. package/dist/cynefin-VYW2F7L2-ALQKF7N6.js +5 -0
  100. package/dist/cynefinDiagram-TSTJHNR4-Bjt4QTVh.js +355 -0
  101. package/dist/cynefinDiagram-TSTJHNR4-ISDORSxO.cjs +62 -0
  102. package/dist/cytoscape.esm-CFq1_DTa.js +18906 -0
  103. package/dist/cytoscape.esm-pygMw4dR.cjs +321 -0
  104. package/dist/dagre-D1-W1tt6.cjs +1 -0
  105. package/dist/dagre-D8GLTwuf.js +1578 -0
  106. package/dist/dagre-VKFMJZFB-DXI69qAN.cjs +4 -0
  107. package/dist/dagre-VKFMJZFB-Dfku86Az.js +341 -0
  108. package/dist/defaultLocale-0M_kMcEH.js +184 -0
  109. package/dist/defaultLocale-DSqtvhxg.cjs +1 -0
  110. package/dist/diagram-FQU43EPY-BAiRt5eL.cjs +3 -0
  111. package/dist/diagram-FQU43EPY-BvQ5jmVn.js +452 -0
  112. package/dist/diagram-G47NLZAW-DGnmEa8u.cjs +24 -0
  113. package/dist/diagram-G47NLZAW-DT2BBA0T.js +498 -0
  114. package/dist/diagram-NH7WQ7WH-DxgkStA3.cjs +24 -0
  115. package/dist/diagram-NH7WQ7WH-W7jg4Vh8.js +135 -0
  116. package/dist/diagram-OA4YK3LP-DkvFII73.cjs +30 -0
  117. package/dist/diagram-OA4YK3LP-jU--aqQl.js +317 -0
  118. package/dist/diagram-WEI45ONY-C_Qhf4ny.js +215 -0
  119. package/dist/diagram-WEI45ONY-XvzRFmmY.cjs +41 -0
  120. package/dist/dist-C0Fwsvsq.js +70 -0
  121. package/dist/dist-C20XxSsP.cjs +1 -0
  122. package/dist/{dropdown-BYS1Trdu.js → dropdown-DzdAR1nI.js} +4 -4
  123. package/dist/dropdown.js +1 -1
  124. package/dist/ebnfDiagram-CCIWWBDH-Cu8bAlhC.cjs +1 -0
  125. package/dist/ebnfDiagram-CCIWWBDH-Gnr20Oc1.js +112 -0
  126. package/dist/erDiagram-Q63AITRT-CxLSa9Yv.cjs +85 -0
  127. package/dist/erDiagram-Q63AITRT-D0Hh9b-W.js +1822 -0
  128. package/dist/eventmodeling-45OFAUF4-C6VXxUn1.cjs +1 -0
  129. package/dist/eventmodeling-45OFAUF4-DMpGs2yI.js +5 -0
  130. package/dist/factory-BkvRcCOx.js +482 -0
  131. package/dist/flowDiagram-23GEKE2U-B6gASEYG.cjs +1 -0
  132. package/dist/flowDiagram-23GEKE2U-BY4wE2vw.js +19 -0
  133. package/dist/{form-BsB5JhS4.js → form-CUJpeQ7Q.js} +5 -5
  134. package/dist/form.js +1 -1
  135. package/dist/ganttDiagram-NO4QXBWP-B40Eabk0.js +3125 -0
  136. package/dist/ganttDiagram-NO4QXBWP-DZT79qJr.cjs +292 -0
  137. package/dist/gitGraph-TEB2WS4Q-BbtF3MDr.cjs +1 -0
  138. package/dist/gitGraph-TEB2WS4Q-D6Ru11Cs.js +5 -0
  139. package/dist/gitGraphDiagram-IHSO6WYX-BUJNSssA.js +754 -0
  140. package/dist/gitGraphDiagram-IHSO6WYX-DW06165m.cjs +106 -0
  141. package/dist/glass-Bj1Zf8Hy.js +115 -0
  142. package/dist/glass.js +5 -0
  143. package/dist/graphlib-CCKThIKP.js +1104 -0
  144. package/dist/graphlib-Du-578Js.cjs +1 -0
  145. package/dist/{icon-pfolda2m.js → icon-CtlZJISZ.js} +110 -21
  146. package/dist/icon.js +4 -3
  147. package/dist/icons.js +5 -0
  148. package/dist/iife/button.iife.js +1 -1
  149. package/dist/iife/card.iife.js +1 -1
  150. package/dist/iife/checkbox.iife.js +1 -1
  151. package/dist/iife/colorpicker.iife.js +2 -2
  152. package/dist/iife/content.iife.js +1 -0
  153. package/dist/iife/dropdown.iife.js +1 -1
  154. package/dist/iife/form.iife.js +1 -1
  155. package/dist/iife/glass.iife.js +1 -0
  156. package/dist/iife/icon.iife.js +1 -1
  157. package/dist/iife/image.iife.js +1 -1
  158. package/dist/iife/input.iife.js +1 -1
  159. package/dist/iife/loading.iife.js +1 -1
  160. package/dist/iife/math.iife.js +14 -14
  161. package/dist/iife/mermaid.iife.js +3535 -0
  162. package/dist/iife/message.iife.js +1 -1
  163. package/dist/iife/modal.iife.js +1 -1
  164. package/dist/iife/player.iife.js +8 -8
  165. package/dist/iife/popover.iife.js +1 -1
  166. package/dist/iife/progress.iife.js +1 -1
  167. package/dist/iife/radar.iife.js +1 -1
  168. package/dist/iife/route.iife.js +1 -1
  169. package/dist/iife/router.iife.js +1 -1
  170. package/dist/iife/scratch.iife.js +1 -1
  171. package/dist/iife/section.iife.js +1 -1
  172. package/dist/iife/select.iife.js +2 -2
  173. package/dist/iife/skeleton.iife.js +1 -1
  174. package/dist/iife/tab.iife.js +1 -1
  175. package/dist/iife/tabpane.iife.js +1 -1
  176. package/dist/{image-BXpKQ9sU.js → image-ILZNlaGc.js} +4 -4
  177. package/dist/image.js +1 -1
  178. package/dist/index.cjs +257 -23
  179. package/dist/index.d.ts +11 -1
  180. package/dist/index.iife.js +3842 -74
  181. package/dist/index.js +86 -78
  182. package/dist/info-DKCQHKI2-DNOtUIin.cjs +1 -0
  183. package/dist/info-DKCQHKI2-Df7h9MSE.js +5 -0
  184. package/dist/infoDiagram-FWYZ7A6U-C8dZc-Ki.cjs +2 -0
  185. package/dist/infoDiagram-FWYZ7A6U-Dc0m9qAx.js +21 -0
  186. package/dist/init-1VpIn1S3.js +16 -0
  187. package/dist/init-CbDwVtpO.cjs +1 -0
  188. package/dist/{input-BMMM60e6.js → input-CDH6zY9I.js} +6 -6
  189. package/dist/input.js +1 -1
  190. package/dist/ishikawaDiagram-FXEZZL3T-BugNyysB.cjs +70 -0
  191. package/dist/ishikawaDiagram-FXEZZL3T-DuFtHOmf.js +742 -0
  192. package/dist/journeyDiagram-5HDEW3XC-Bshelnhq.js +928 -0
  193. package/dist/journeyDiagram-5HDEW3XC-ItmURvA2.cjs +139 -0
  194. package/dist/kanban-definition-HUTT4EX6-BL512R2A.cjs +89 -0
  195. package/dist/kanban-definition-HUTT4EX6-Dogv2paU.js +1050 -0
  196. package/dist/katex-Cq3Y8cmK.cjs +257 -0
  197. package/dist/katex-Pg2EqTH0.js +23485 -0
  198. package/dist/line-BIPmUVxO.js +33 -0
  199. package/dist/line-CAB5QHC6.cjs +1 -0
  200. package/dist/linear-B2AM4ZBe.js +259 -0
  201. package/dist/linear-CSAfNEpl.cjs +1 -0
  202. package/dist/{link-DURZzd7u.js → link-BCrmHvXP.js} +3 -3
  203. package/dist/link.js +1 -1
  204. package/dist/{loading-BScjyeVm.js → loading-DJWGih1g.js} +4 -4
  205. package/dist/loading.js +1 -1
  206. package/dist/map-BC2bk_rV.cjs +1 -0
  207. package/dist/map-DMSWkcq6.js +208 -0
  208. package/dist/{math-IjzOAwnA.js → math-DRmkEDSQ.js} +4 -4
  209. package/dist/math.js +1 -1
  210. package/dist/mermaid-CMhm7npE.js +261 -0
  211. package/dist/mermaid-parser.core-DYumW1vq.cjs +6 -0
  212. package/dist/mermaid-parser.core-uIDZYuBu.js +654 -0
  213. package/dist/mermaid.core-B2d5lQW2.js +1085 -0
  214. package/dist/mermaid.core-a1hgpWfs.cjs +10 -0
  215. package/dist/mermaid.js +5 -0
  216. package/dist/{message-CLpuP8HY.js → message-BpYJBvYn.js} +36 -51
  217. package/dist/message.js +1 -1
  218. package/dist/mindmap-definition-LN4V7U3C-DYZgIZym.cjs +96 -0
  219. package/dist/mindmap-definition-LN4V7U3C-f7s5ZePP.js +1070 -0
  220. package/dist/{modal-DOTpABRe.js → modal-BeQlDYDP.js} +40 -24
  221. package/dist/modal.js +1 -1
  222. package/dist/ordinal-BMN81JG2.js +64 -0
  223. package/dist/ordinal-BplLHIij.cjs +1 -0
  224. package/dist/packet-7NZHBO7P-4PLslLZJ.js +5 -0
  225. package/dist/packet-7NZHBO7P-DeyLCrSn.cjs +1 -0
  226. package/dist/path-Bja5PoYn.js +82 -0
  227. package/dist/path-DmfWsuKi.cjs +1 -0
  228. package/dist/pegDiagram-2B236MQR-B-Xeh55J.js +107 -0
  229. package/dist/pegDiagram-2B236MQR-Bo5Nj40u.cjs +1 -0
  230. package/dist/pie-RZYD4A2V-DBE9a8Kz.js +5 -0
  231. package/dist/pie-RZYD4A2V-pDNZ2ZyB.cjs +1 -0
  232. package/dist/pieDiagram-ENE6RG2P-BkSiP4iu.cjs +39 -0
  233. package/dist/pieDiagram-ENE6RG2P-CVSE95zc.js +207 -0
  234. package/dist/{player-5olrw-qB.js → player-CQ4e3Yeo.js} +196 -195
  235. package/dist/player.js +1 -1
  236. package/dist/{popover-DRUQjdPs.js → popover-eZMnL1F3.js} +22 -54
  237. package/dist/popover.js +1 -1
  238. package/dist/{progress-BIEXYYd2.js → progress-DyHgW4Ep.js} +5 -5
  239. package/dist/progress.js +1 -1
  240. package/dist/quadrantDiagram-ABIIQ3AL-BDmdDGsh.cjs +7 -0
  241. package/dist/quadrantDiagram-ABIIQ3AL-TJ8FmqES.js +2058 -0
  242. package/dist/{radar-DAF95_Mj.js → radar-D21Rccap.js} +5 -5
  243. package/dist/radar-I7S5WNFK-CY5ycn2a.cjs +1 -0
  244. package/dist/radar-I7S5WNFK-DFTxtd_t.js +5 -0
  245. package/dist/radar.js +1 -1
  246. package/dist/railroad-3IZDKUUU-DALJwv16.js +5 -0
  247. package/dist/railroad-3IZDKUUU-DGzXHqt7.cjs +1 -0
  248. package/dist/railroad-abnf-AHOZXSZD-BCIHdSw6.cjs +1 -0
  249. package/dist/railroad-abnf-AHOZXSZD-CntW2udQ.js +5 -0
  250. package/dist/railroad-ebnf-EBAXGLYW-4vFZrfHF.cjs +1 -0
  251. package/dist/railroad-ebnf-EBAXGLYW-s_1ZOb_9.js +5 -0
  252. package/dist/railroad-peg-LSFZ7HO6-CaM5A0Ml.js +5 -0
  253. package/dist/railroad-peg-LSFZ7HO6-D_oFW1Bo.cjs +1 -0
  254. package/dist/railroadDiagram-RFXS5EU6-0lS5wYI7.js +83 -0
  255. package/dist/railroadDiagram-RFXS5EU6-DJKAtnQk.cjs +1 -0
  256. package/dist/ranui.css +1 -1
  257. package/dist/requirementDiagram-TGXJPOKE-Bg701bNl.cjs +84 -0
  258. package/dist/requirementDiagram-TGXJPOKE-viCQLyJd.js +2301 -0
  259. package/dist/rolldown-runtime-9ZSF5uba.js +16 -0
  260. package/dist/rolldown-runtime-CAnuVJ4g.cjs +1 -0
  261. package/dist/rough.esm-BWe9E0Nz.js +1387 -0
  262. package/dist/rough.esm-BfSi6CZE.cjs +1 -0
  263. package/dist/route-pR5P4ann.js +116 -0
  264. package/dist/route.js +1 -1
  265. package/dist/{router-B9rCrWXm.js → router-CewzSH7O.js} +23 -18
  266. package/dist/router.js +1 -1
  267. package/dist/sankeyDiagram-HTMAVEWB-CV6_AuMF.js +974 -0
  268. package/dist/sankeyDiagram-HTMAVEWB-K-nGMsuS.cjs +40 -0
  269. package/dist/{scratch-QlPyy1f4.js → scratch-BFVsgl-7.js} +2 -2
  270. package/dist/scratch.js +1 -1
  271. package/dist/{section-D0qMm9KM.js → section-DSPCsIxv.js} +2 -2
  272. package/dist/section.js +1 -1
  273. package/dist/{select-aAaWoveE.js → select-B58nMfB1.js} +16 -23
  274. package/dist/select.js +1 -1
  275. package/dist/sequenceDiagram-DBY2YBRQ-4GdkLnUr.cjs +162 -0
  276. package/dist/sequenceDiagram-DBY2YBRQ-B9WNesh2.js +4326 -0
  277. package/dist/sizeCapture-X5ZJPWSS-BUY3-n09.cjs +1 -0
  278. package/dist/sizeCapture-X5ZJPWSS-D7rGsqTl.js +48 -0
  279. package/dist/{skeleton-CFqQmKyt.js → skeleton-DoHYMsTn.js} +5 -5
  280. package/dist/skeleton.js +1 -1
  281. package/dist/src-C9EhKhbk.cjs +1 -0
  282. package/dist/src-DtRLxcYO.js +2104 -0
  283. package/dist/stateDiagram-2N3HPSRC-B7VpgjJu.cjs +1 -0
  284. package/dist/stateDiagram-2N3HPSRC-DxH4BMSh.js +237 -0
  285. package/dist/stateDiagram-v2-6OUMAXLB-CQv7GIaO.cjs +1 -0
  286. package/dist/stateDiagram-v2-6OUMAXLB-CWfn6e7n.js +30 -0
  287. package/dist/swimlanes-5IMT3BWC-DcADNGpg.js +5258 -0
  288. package/dist/swimlanes-5IMT3BWC-o-MjdPlw.cjs +1 -0
  289. package/dist/swimlanesDiagram-G3AALYLV-D-rmAGky.cjs +8 -0
  290. package/dist/swimlanesDiagram-G3AALYLV-DDtDtl1L.js +31 -0
  291. package/dist/{tab-CiF2YPck.js → tab-BRPdZ9Ws.js} +5 -5
  292. package/dist/tab.js +1 -1
  293. package/dist/{tabpane-B-m3xwqu.js → tabpane-Owf72hw_.js} +5 -5
  294. package/dist/tabpane.js +1 -1
  295. package/dist/test/unit/icon.builtin.test.d.ts +1 -0
  296. package/dist/test/unit/utils.colorpicker.reconnect.test.d.ts +1 -0
  297. package/dist/test/unit/utils.route.lazy.test.d.ts +1 -0
  298. package/dist/test/unit/utils.router.match.test.d.ts +1 -0
  299. package/dist/test/unit/utils.signal.owner.test.d.ts +1 -0
  300. package/dist/{theme-switch-B09egc6h.js → theme-switch-CZDIIonc.js} +4 -4
  301. package/dist/theme-switch.js +1 -1
  302. package/dist/timeline-definition-FHXFAJF6-C80VjPLh.js +1119 -0
  303. package/dist/timeline-definition-FHXFAJF6-DOwvOb3S.cjs +120 -0
  304. package/dist/treeView-QDETBFTQ-B1Ejxfpg.cjs +1 -0
  305. package/dist/treeView-QDETBFTQ-vTKOZls1.js +5 -0
  306. package/dist/treemap-6X3UGDF4-D0FeO_NX.cjs +1 -0
  307. package/dist/treemap-6X3UGDF4-Ddzv6Gqd.js +5 -0
  308. package/dist/utils/builder/core.d.ts +153 -16
  309. package/dist/utils/builder/factory.d.ts +1 -1
  310. package/dist/utils/builder/index.d.ts +3 -3
  311. package/dist/utils/builder/signal.d.ts +93 -64
  312. package/dist/utils/router/index.d.ts +13 -3
  313. package/dist/utils/router.js +95 -54
  314. package/dist/utils/theme.d.ts +1 -1
  315. package/dist/{utils-DBfrRFoE.js → utils-D1iZnChu.js} +38 -31
  316. package/dist/vennDiagram-L72KCM5P-BYHB7OW8.js +1955 -0
  317. package/dist/vennDiagram-L72KCM5P-CidVJK6y.cjs +34 -0
  318. package/dist/wardley-OPB4EBWU-C1hXbbD4.cjs +1 -0
  319. package/dist/wardley-OPB4EBWU-DBgFLc64.js +5 -0
  320. package/dist/wardleyDiagram-EHGQE667--ubmCaWM.js +652 -0
  321. package/dist/wardleyDiagram-EHGQE667-K6ckkRZS.cjs +78 -0
  322. package/dist/warning-circle-fill-Cz0qu7AH.js +23 -0
  323. package/dist/xychartDiagram-FW5EYKEG-CzdokxrM.cjs +7 -0
  324. package/dist/xychartDiagram-FW5EYKEG-DLqWcTPt.js +2154 -0
  325. package/docs/BUILDER.md +383 -0
  326. package/docs/COMPONENTS.md +21 -3
  327. package/package.json +31 -3
  328. package/dist/button-Be_uHDZG.js +0 -117
  329. package/dist/factory-BdsO0dEW.js +0 -165
  330. package/dist/route-MQZpn2BP.js +0 -88
  331. package/dist/signal-CSSZxlK5.js +0 -57
@@ -0,0 +1,120 @@
1
+ const o=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs"),k=require("./src-C9EhKhbk.cjs"),V=require("./chunk-WYO6CB5R-u4mJNOcO.cjs"),lt=require("./arc-D25LhgTs.cjs"),Mt=require("./chunk-ICXQ74PX-BbT9JaEW.cjs"),At=require("./chunk-VAUOI2AC-DfQf5L2_.cjs");var tt=(function(){var e=o.__name(function(a,l,u,d){for(u=u||{},d=a.length;d--;u[a[d]]=l);return u},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],s=[1,13],r=[1,14],c=[1,15],i=[1,16],h=[1,19],m=[1,20],f={trace:o.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:o.__name(function(l,u,d,p,_,g,S){var x=g.length-1;switch(_){case 1:return g[x-1];case 3:p.setDirection("LR");break;case 4:p.setDirection("TD");break;case 5:this.$=[];break;case 6:g[x-1].push(g[x]),this.$=g[x-1];break;case 7:case 8:this.$=g[x];break;case 9:case 10:this.$=[];break;case 11:p.getCommonDb().setDiagramTitle(g[x].substr(6)),this.$=g[x].substr(6);break;case 12:this.$=g[x].trim(),p.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=g[x].trim(),p.getCommonDb().setAccDescription(this.$);break;case 15:p.addSection(g[x].substr(8)),this.$=g[x].substr(8);break;case 18:p.addTask(g[x],0,""),this.$=g[x];break;case 19:p.addEvent(g[x].substr(2)),this.$=g[x];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:s,17:r,19:c,20:i,21:17,22:18,23:h,24:m},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:s,17:r,19:c,20:i,21:17,22:18,23:h,24:m},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:o.__name(function(l,u){if(u.recoverable)this.trace(l);else{var d=new Error(l);throw d.hash=u,d}},"parseError"),parse:o.__name(function(l){var u=this,d=[0],p=[],_=[null],g=[],S=this.table,x="",P=0,R=0,B=0,F=2,N=1,A=g.slice.call(arguments,1),w=Object.create(this.lexer),L={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(L.yy[O]=this.yy[O]);w.setInput(l,L.yy),L.yy.lexer=w,L.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var T=w.yylloc;g.push(T);var b=w.options&&w.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function E(W){d.length=d.length-2*W,_.length=_.length-W,g.length=g.length-W}o.__name(E,"popStack");function $(){var W=p.pop()||w.lex()||N;return typeof W!="number"&&(W instanceof Array&&(p=W,W=p.pop()),W=u.symbols_[W]||W),W}o.__name($,"lex");for(var v,H,C,I,D,q={},X,z,ot,K;;){if(C=d[d.length-1],this.defaultActions[C]?I=this.defaultActions[C]:((v===null||typeof v>"u")&&(v=$()),I=S[C]&&S[C][v]),typeof I>"u"||!I.length||!I[0]){var Y="";K=[];for(X in S[C])this.terminals_[X]&&X>F&&K.push("'"+this.terminals_[X]+"'");w.showPosition?Y="Parse error on line "+(P+1)+`:
2
+ `+w.showPosition()+`
3
+ Expecting `+K.join(", ")+", got '"+(this.terminals_[v]||v)+"'":Y="Parse error on line "+(P+1)+": Unexpected "+(v==N?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(Y,{text:w.match,token:this.terminals_[v]||v,line:w.yylineno,loc:T,expected:K})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+v);switch(I[0]){case 1:d.push(v),_.push(w.yytext),g.push(w.yylloc),d.push(I[1]),v=null,H?(v=H,H=null):(R=w.yyleng,x=w.yytext,P=w.yylineno,T=w.yylloc,B>0&&B--);break;case 2:if(z=this.productions_[I[1]][1],q.$=_[_.length-z],q._$={first_line:g[g.length-(z||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(z||1)].first_column,last_column:g[g.length-1].last_column},b&&(q._$.range=[g[g.length-(z||1)].range[0],g[g.length-1].range[1]]),D=this.performAction.apply(q,[x,R,P,L.yy,I[1],_,g].concat(A)),typeof D<"u")return D;z&&(d=d.slice(0,-1*z*2),_=_.slice(0,-1*z),g=g.slice(0,-1*z)),d.push(this.productions_[I[1]][0]),_.push(q.$),g.push(q._$),ot=S[d[d.length-2]][d[d.length-1]],d.push(ot);break;case 3:return!0}}return!0},"parse")};f.lexer=(function(){return{EOF:1,parseError:o.__name(function(l,u){if(this.yy.parser)this.yy.parser.parseError(l,u);else throw new Error(l)},"parseError"),setInput:o.__name(function(a,l){return this.yy=l||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o.__name(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:o.__name(function(a){var l=a.length,u=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===d.length?this.yylloc.first_column:0)+d[d.length-u.length].length-u[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o.__name(function(){return this._more=!0,this},"more"),reject:o.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o.__name(function(a){this.unput(this.match.slice(a))},"less"),pastInput:o.__name(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o.__name(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o.__name(function(){var a=this.pastInput(),l=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
5
+ `+l+"^"},"showPosition"),test_match:o.__name(function(a,l){var u,d,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(p.yylloc.range=this.yylloc.range.slice(0))),d=a[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],u=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var _ in p)this[_]=p[_];return!1}return!1},"test_match"),next:o.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,l,u,d;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),_=0;_<p.length;_++)if(u=this._input.match(this.rules[p[_]]),u&&(!l||u[0].length>l[0].length)){if(l=u,d=_,this.options.backtrack_lexer){if(a=this.test_match(u,p[_]),a!==!1)return a;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(a=this.test_match(l,p[d]),a!==!1?a:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o.__name(function(){var l=this.next();return l||this.lex()},"lex"),begin:o.__name(function(l){this.conditionStack.push(l)},"begin"),popState:o.__name(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o.__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o.__name(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:o.__name(function(l){this.begin(l)},"pushState"),stateStackSize:o.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o.__name(function(l,u,d,p){switch(d){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;case 10:return this.popState(),"acc_title_value";case 11:return this.begin("acc_descr"),17;case 12:return this.popState(),"acc_descr_value";case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}}})();function y(){this.yy={}}return o.__name(y,"Parser"),y.prototype=f,f.Parser=y,new y})();tt.parser=tt;var Ct=tt,pt={};o.__export(pt,{addEvent:()=>St,addSection:()=>kt,addTask:()=>wt,addTaskOrg:()=>Et,clear:()=>mt,default:()=>Rt,getCommonDb:()=>_t,getDirection:()=>xt,getSections:()=>bt,getTasks:()=>vt,setDirection:()=>yt});var U="",ft=0,nt="LR",rt=[],j=[],Z=[],_t=o.__name(()=>V.commonDb_exports,"getCommonDb"),mt=o.__name(function(){rt.length=0,j.length=0,U="",Z.length=0,nt="LR",V.clear()},"clear"),yt=o.__name(function(e){nt=e},"setDirection"),xt=o.__name(function(){return nt},"getDirection"),kt=o.__name(function(e){U=e,rt.push(e)},"addSection"),bt=o.__name(function(){return rt},"getSections"),vt=o.__name(function(){let e=ct();const t=100;let n=0;for(;!e&&n<t;)e=ct(),n++;return j.push(...Z),j},"getTasks"),wt=o.__name(function(e,t,n){const s={id:ft++,section:U,type:U,task:e,score:t||0,events:n?[n]:[]};Z.push(s)},"addTask"),St=o.__name(function(e){Z.find(t=>t.id===ft-1).events.push(e)},"addEvent"),Et=o.__name(function(e){const t={section:U,type:U,description:e,task:e,classes:[]};j.push(t)},"addTaskOrg"),ct=o.__name(function(){const e=o.__name(function(n){return Z[n].processed},"compileTask");let t=!0;for(const[n,s]of Z.entries())e(n),t=t&&s.processed;return t},"compileTasks"),Rt={clear:mt,getCommonDb:_t,getDirection:xt,setDirection:yt,addSection:kt,getSections:bt,getTasks:vt,addTask:wt,addTaskOrg:Et,addEvent:St},Tt=0,J=o.__name(function(e,t){const n=e.append("rect");return n.attr("x",t.x),n.attr("y",t.y),n.attr("fill",t.fill),n.attr("stroke",t.stroke),n.attr("width",t.width),n.attr("height",t.height),n.attr("rx",t.rx),n.attr("ry",t.ry),t.class!==void 0&&n.attr("class",t.class),n},"drawRect"),Wt=o.__name(function(e,t){const s=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=e.append("g");r.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function c(m){const f=lt.arc_default().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);m.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}o.__name(c,"smile");function i(m){const f=lt.arc_default().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);m.append("path").attr("class","mouth").attr("d",f).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}o.__name(i,"sad");function h(m){m.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return o.__name(h,"ambivalent"),t.score>3?c(r):t.score<3?i(r):h(r),s},"drawFace"),Pt=o.__name(function(e,t){const n=e.append("circle");return n.attr("cx",t.cx),n.attr("cy",t.cy),n.attr("class","actor-"+t.pos),n.attr("fill",t.fill),n.attr("stroke",t.stroke),n.attr("r",t.r),n.class!==void 0&&n.attr("class",n.class),t.title!==void 0&&n.append("title").text(t.title),n},"drawCircle"),$t=o.__name(function(e,t){const n=t.text.replace(/<br\s*\/?>/gi," "),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class!==void 0&&s.attr("class",t.class);const r=s.append("tspan");return r.attr("x",t.x+t.textMargin*2),r.text(n),s},"drawText"),Vt=o.__name(function(e,t){function n(r,c,i,h,m){return r+","+c+" "+(r+i)+","+c+" "+(r+i)+","+(c+h-m)+" "+(r+i-m*1.2)+","+(c+h)+" "+r+","+(c+h)}o.__name(n,"genPoints");const s=e.append("polygon");s.attr("points",n(t.x,t.y,50,20,7)),s.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,$t(e,t)},"drawLabel"),Bt=o.__name(function(e,t,n){const s=e.append("g"),r=at();r.x=t.x,r.y=t.y,r.fill=t.fill,r.width=n.width,r.height=n.height,r.class="journey-section section-type-"+t.num,r.rx=3,r.ry=3,J(s,r),It(n)(t.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+t.num},n,t.colour)},"drawSection"),et=-1,Ft=o.__name(function(e,t,n,s){const r=t.x+n.width/2,c=e.append("g");et++,c.append("line").attr("id",s+"-task"+et).attr("x1",r).attr("y1",t.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Wt(c,{cx:r,cy:300+(5-t.score)*30,score:t.score});const i=at();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width,i.height=n.height,i.class="task task-type-"+t.num,i.rx=3,i.ry=3,J(c,i),It(n)(t.task,c,i.x,i.y,i.width,i.height,{class:"task"},n,t.colour)},"drawTask"),Ot=o.__name(function(e,t){J(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),zt=o.__name(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),at=o.__name(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),It=(function(){function e(r,c,i,h,m,f,y,a){s(c.append("text").attr("x",i+m/2).attr("y",h+f/2+5).style("font-color",a).style("text-anchor","middle").text(r),y)}o.__name(e,"byText");function t(r,c,i,h,m,f,y,a,l){const{taskFontSize:u,taskFontFamily:d}=a,p=r.split(/<br\s*\/?>/gi);for(let _=0;_<p.length;_++){const g=_*u-u*(p.length-1)/2,S=c.append("text").attr("x",i+m/2).attr("y",h).attr("fill",l).style("text-anchor","middle").style("font-size",u).style("font-family",d);S.append("tspan").attr("x",i+m/2).attr("dy",g).text(p[_]),S.attr("y",h+f/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),s(S,y)}}o.__name(t,"byTspan");function n(r,c,i,h,m,f,y,a){const l=c.append("switch"),u=l.append("foreignObject").attr("x",i).attr("y",h).attr("width",m).attr("height",f).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(r),t(r,l,i,h,m,f,y,a),s(u,y)}o.__name(n,"byFo");function s(r,c){for(const i in c)i in c&&r.attr(i,c[i])}return o.__name(s,"_setTextAttrs"),function(r){return r.textPlacement==="fo"?n:r.textPlacement==="old"?e:t}})(),Gt=o.__name(function(e,t){Tt=0,et=-1,e.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function it(e,t){e.each(function(){var n=k.select_default(this),s=n.text().split(/(\s+|<br>)/).reverse(),r,c=[],i=1.1,h=n.attr("y"),m=parseFloat(n.attr("dy")),f=n.text(null).append("tspan").attr("x",0).attr("y",h).attr("dy",m+"em");for(let y=0;y<s.length;y++)r=s[s.length-1-y],c.push(r),f.text(c.join(" ").trim()),(f.node().getComputedTextLength()>t||r==="<br>")&&(c.pop(),f.text(c.join(" ").trim()),r==="<br>"?c=[""]:c=[r],f=n.append("tspan").attr("x",0).attr("y",h).attr("dy",i+"em").text(r))})}o.__name(it,"wrap");var qt=o.__name(function(e,t,n,s,r,c=!1){const{theme:i,look:h}=s,m=i?.includes("redux"),f=n%(s?.themeVariables?.THEME_COLOR_LIMIT??12)-1,y=e.append("g");t.section=f,y.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+f));const a=y.append("g"),l=y.append("g"),u=l.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(it,t.width).node().getBBox(),d=s.fontSize?.replace?s.fontSize.replace("px",""):s.fontSize;if(t.height=u.height+d*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,l.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),m&&l.attr("transform",`translate(${t.width/2}, ${c?t.padding/2+3:t.padding})`),Xt(a,t,f,r,s),h==="neo"&&(y.attr("data-look","neo"),m)){const p=i.includes("dark"),_=k.select_default(e.node()?.ownerSVGElement??e.node()),g=_.attr("id")??"",S=g?`${g}-drop-shadow`:"drop-shadow";if(_.select(`#${S}`).empty()){const x=_.select("defs");(x.empty()?_.append("defs"):x).append("filter").attr("id",S).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",p?"0.2":"0.06").attr("flood-color",p?"#FFFFFF":"#000000")}}return t},"drawNode"),Dt=o.__name(function(e,t,n){const s=e.append("g"),r=s.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(it,t.width).node().getBBox(),c=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return s.remove(),r.height+c*1.1*.5+t.padding},"getVirtualNodeHeight"),Xt=o.__name(function(e,t,n,s,r){const{theme:c}=r,i=c?.includes("redux")?0:5,h=5,m=i>0?`M0 ${t.height-h} v${-t.height+2*h} q0,-${i},${i},-${i} h${t.width-2*h} q${i},0,${i},${i} v${t.height-h} H0 Z`:`M0 ${t.height-h} v${-(t.height-h)} h${t.width} v${t.height} H0 Z`;e.append("path").attr("id",s+"-node-"+Tt++).attr("class","node-bkg node-"+t.type).attr("d",m),c?.includes("redux")||e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),M={drawRect:J,drawCircle:Pt,drawSection:Bt,drawText:$t,drawLabel:Vt,drawTask:Ft,drawBackgroundRect:Ot,getTextObj:zt,getNoteRect:at,initGraphics:Gt,drawNode:qt,getVirtualNodeHeight:Dt},Ut=o.__name(function(e,t,n,s){const r=V.getConfig2(),{look:c,theme:i,themeVariables:h}=r,{useGradient:m,gradientStart:f,gradientStop:y}=h,a=r.timeline?.leftMargin??50;k.log.debug("timeline",s.db);const l=r.securityLevel;let u;l==="sandbox"&&(u=k.select_default("#i"+t));const d=(l==="sandbox"?k.select_default(u.nodes()[0].contentDocument.body):k.select_default("body")).select("#"+t);d.append("g");const p=s.db.getTasks(),_=s.db.getCommonDb().getDiagramTitle();k.log.debug("task",p),M.initGraphics(d,t);const g=s.db.getSections();k.log.debug("sections",g);let S=0,x=0,P=0,R=0,B=50+a,F=50;R=50;let N=0,A=!0;g.forEach(function(T){const b={number:N,descr:T,section:N,width:150,padding:20,maxHeight:S},E=M.getVirtualNodeHeight(d,b,r);k.log.debug("sectionHeight before draw",E),S=Math.max(S,E+20)});let w=0,L=0;k.log.debug("tasks.length",p.length);for(const[T,b]of p.entries()){const E={number:T,descr:b,section:b.section,width:150,padding:20,maxHeight:x},$=M.getVirtualNodeHeight(d,E,r);k.log.debug("taskHeight before draw",$),x=Math.max(x,$+20),w=Math.max(w,b.events.length);let v=0;for(const H of b.events){const C={descr:H,section:b.section,number:b.section,width:150,padding:20,maxHeight:50};v+=M.getVirtualNodeHeight(d,C,r)}b.events.length>0&&(v+=(b.events.length-1)*10),L=Math.max(L,v)}k.log.debug("maxSectionHeight before draw",S),k.log.debug("maxTaskHeight before draw",x),g&&g.length>0?g.forEach(T=>{const b=p.filter(H=>H.section===T),E={number:N,descr:T,section:N,width:200*Math.max(b.length,1)-50,padding:20,maxHeight:S};k.log.debug("sectionNode",E);const $=d.append("g"),v=M.drawNode($,E,N,r,t);k.log.debug("sectionNode output",v),$.attr("transform",`translate(${B}, ${R})`),F+=S+50,b.length>0&&ht(d,b,N,B,F,x,r,w,L,S,!1,t),B+=200*Math.max(b.length,1),F=R,N++}):(A=!1,ht(d,p,N,B,F,x,r,w,L,S,!0,t));const O=d.node().getBBox();if(k.log.debug("bounds",O),_&&d.append("text").text(_).attr("x",c==="neo"?O.x*2+a:O.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),P=A?S+x+150:x+100,d.append("g").attr("class","lineWrapper").append("line").attr("x1",a).attr("y1",P).attr("x2",O.width+3*a).attr("y2",P).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${t}-arrowhead)`),c==="neo"&&m&&i!=="neutral"){const T=d.select("defs"),b=(T.empty()?d.append("defs"):T).append("linearGradient").attr("id",d.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");b.append("stop").attr("offset","0%").attr("stop-color",f).attr("stop-opacity",1),b.append("stop").attr("offset","100%").attr("stop-color",y).attr("stop-opacity",1)}V.setupGraphViewbox(void 0,d,r.timeline?.padding??50,r.timeline?.useMaxWidth??!1)},"draw"),ht=o.__name(function(e,t,n,s,r,c,i,h,m,f,y,a){for(const l of t){const u={descr:l.task,section:n,number:n,width:150,padding:20,maxHeight:c};k.log.debug("taskNode",u);const d=e.append("g").attr("class","taskWrapper"),p=M.drawNode(d,u,n,i,a).height;if(k.log.debug("taskHeight after draw",p),d.attr("transform",`translate(${s}, ${r})`),c=Math.max(c,p),l.events){const _=e.append("g").attr("class","lineWrapper");let g=c;r+=100,g=g+Zt(e,l.events,n,s,r,i,a),r-=100,_.append("line").attr("x1",s+190/2).attr("y1",r+c).attr("x2",s+190/2).attr("y2",r+c+100+m+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${a}-arrowhead)`).attr("stroke-dasharray","5,5")}s=s+200,y&&!i.timeline?.disableMulticolor&&n++}r=r-10},"drawTasks"),Zt=o.__name(function(e,t,n,s,r,c,i){let h=0;const m=r;r=r+100;for(const f of t){const y={descr:f,section:n,number:n,width:150,padding:20,maxHeight:50};k.log.debug("eventNode",y);const a=e.append("g").attr("class","eventWrapper"),l=M.drawNode(a,y,n,c,i,!0).height;h=h+l,a.attr("transform",`translate(${s}, ${r})`),r=r+10+l}return r=m,h},"drawEvents"),Kt={setConf:o.__name(()=>{},"setConf"),draw:Ut},Q=200,G=5,jt=Q+G*2,st=Q+100,Jt=st+G*2,Nt=10,Qt=0,dt=20,Ht=20,ut=30,Lt=50,Yt=o.__name(function(e,t,n,s){const r=V.getConfig2(),c=r.timeline?.leftMargin??50;k.log.debug("timeline",s.db);const i=At.selectSvgElement(t);i.append("g");const h=s.db.getTasks(),m=s.db.getCommonDb().getDiagramTitle();k.log.debug("task",h),M.initGraphics(i);const f=s.db.getSections();k.log.debug("sections",f);let y=0,a=0;const l=50+c;let u=50;const d=u,p=l,_=jt+Ht,g=Jt+Lt,S=p+_;let x=0;const P=f&&f.length>0,R=P?S:l+_,B=Math.max(50,_+g-G*2);f.forEach(function(b){const E={number:x,descr:b,section:x,width:B,padding:G,maxHeight:y},$=M.getVirtualNodeHeight(i,E,r);k.log.debug("sectionHeight before draw",$),y=Math.max(y,$)});let F=0;k.log.debug("tasks.length",h.length);for(const[b,E]of h.entries()){const $={number:b,descr:E,section:E.section,width:Q,padding:G,maxHeight:a},v=M.getVirtualNodeHeight(i,$,r);k.log.debug("taskHeight before draw",v),a=Math.max(a,v);let H=0;for(const C of E.events){const I={descr:C,section:E.section,number:E.section,width:st,padding:G,maxHeight:50};H+=M.getVirtualNodeHeight(i,I,r)}E.events.length>0&&(H+=(E.events.length-1)*Nt),F=Math.max(F,H)+Qt}k.log.debug("maxSectionHeight before draw",y),k.log.debug("maxTaskHeight before draw",a);const N=Math.max(a,F)+ut;P?f.forEach(b=>{const E=h.filter(X=>X.section===b),$={number:x,descr:b,section:x,width:B,padding:G,maxHeight:y};k.log.debug("sectionNode",$);const v=i.append("g"),H=M.drawNode(v,$,x,r);k.log.debug("sectionNode output",H);const C=R-_;v.attr("transform",`translate(${C}, ${u})`);const I=u+H.height+dt;E.length>0&&gt(i,E,x,R,I,a,r,N,!1);const D=E.length,q=H.height+dt+N*Math.max(D,1)-(D>0?ut*2:0);u+=q,x++}):gt(i,h,x,R,u,a,r,N,!0);let A=i.node()?.getBBox();if(!A)throw new Error("bbox not found");if(k.log.debug("bounds",A),m){if(i.append("text").text(m).attr("x",A.width/2-c).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),A=i.node()?.getBBox(),!A)throw new Error("bbox not found");k.log.debug("bounds after title",A)}const[w]=Mt.parseFontSize(r.fontSize),L=(w??16)*2,O=(w??16)*.5+20,T=i.append("g").attr("class","lineWrapper");T.append("line").attr("x1",R).attr("y1",d-L).attr("x2",R).attr("y2",A.y+A.height+O).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),T.lower(),V.setupGraphViewbox(void 0,i,r.timeline?.padding??50,r.timeline?.useMaxWidth??!1)},"draw"),gt=o.__name(function(e,t,n,s,r,c,i,h,m){for(const f of t){const y={descr:f.task,section:n,number:n,width:Q,padding:G,maxHeight:c};k.log.debug("taskNode",y);const a=e.append("g").attr("class","taskWrapper"),l=M.drawNode(a,y,n,i),u=l.height;k.log.debug("taskHeight after draw",u);const d=s-Ht-l.width;if(a.attr("transform",`translate(${d}, ${r})`),c=Math.max(c,u),f.events&&f.events.length>0){const p=r,_=s+Lt;te(e,f.events,n,s,_,p,i)}r=r+h,m&&!i.timeline?.disableMulticolor&&n++}},"drawTasks"),te=o.__name(function(e,t,n,s,r,c,i){let h=c;for(const m of t){const f={descr:m,section:n,number:n,width:st,padding:G,maxHeight:0};k.log.debug("eventNode",f);const y=e.append("g").attr("class","eventWrapper"),a=M.drawNode(y,f,n,i).height;y.attr("transform",`translate(${r}, ${h})`);const l=e.append("g").attr("class","lineWrapper"),u=h+a/2;l.append("line").attr("x1",s).attr("y1",u).attr("x2",r).attr("y2",u).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),h=h+a+Nt}return h-c},"drawEvents"),ee={setConf:o.__name(()=>{},"setConf"),draw:Yt},ne=o.__name(e=>{const{theme:t}=V.getConfig(),n=t?.includes("dark"),s=t?.includes("color"),r=e.svgId?.replace(/^#/,"")??"",c=r?`url(#${r}-drop-shadow)`:e.dropShadow??"none";let i="";for(let h=0;h<e.THEME_COLOR_LIMIT;h++){const m=`${17-3*h}`,f=s?e.borderColorArray[h]:e.mainBkg,y=s?e.borderColorArray[h]:e.nodeBorder;i+=`
7
+ .section-${h-1} rect,
8
+ .section-${h-1} path,
9
+ .section-${h-1} circle {
10
+ fill: ${n&&s?e.mainBkg:f};
11
+ stroke: ${y};
12
+ stroke-width: ${e.strokeWidth};
13
+ filter: ${c};
14
+ }
15
+
16
+ .section-${h-1} text {
17
+ fill: ${e.nodeBorder};
18
+ font-weight: ${e.fontWeight}
19
+ }
20
+
21
+ .node-icon-${h-1} {
22
+ font-size: 40px;
23
+ color: ${e["cScaleLabel"+h]};
24
+ }
25
+
26
+ .section-edge-${h-1} {
27
+ stroke: ${e["cScale"+h]};
28
+ }
29
+
30
+ .edge-depth-${h-1} {
31
+ stroke-width: ${m};
32
+ }
33
+
34
+ .section-${h-1} line {
35
+ stroke: ${e["cScaleInv"+h]};
36
+ stroke-width: 3;
37
+ }
38
+
39
+ .lineWrapper line {
40
+ stroke: ${e.nodeBorder};
41
+ stroke-width:${e.strokeWidth}
42
+ }
43
+
44
+ .disabled,
45
+ .disabled circle,
46
+ .disabled text {
47
+ fill: ${e.tertiaryColor??"lightgray"};
48
+ }
49
+
50
+ .disabled text {
51
+ fill: ${e.clusterBorder??"#efefef"};
52
+ }
53
+ `}return i},"genReduxSections"),re=o.__name(e=>{let t="";for(let n=0;n<e.THEME_COLOR_LIMIT;n++)e["lineColor"+n]=e["lineColor"+n]||e["cScaleInv"+n],V.isDark(e["lineColor"+n])?e["lineColor"+n]=V.lighten(e["lineColor"+n],20):e["lineColor"+n]=V.darken(e["lineColor"+n],20);for(let n=0;n<e.THEME_COLOR_LIMIT;n++){const s=""+(17-3*n);t+=`
54
+ .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} path {
55
+ fill: ${e["cScale"+n]};
56
+ }
57
+ .section-${n-1} text {
58
+ fill: ${e["cScaleLabel"+n]};
59
+ }
60
+ .node-icon-${n-1} {
61
+ font-size: 40px;
62
+ color: ${e["cScaleLabel"+n]};
63
+ }
64
+ .section-edge-${n-1}{
65
+ stroke: ${e["cScale"+n]};
66
+ }
67
+ .edge-depth-${n-1}{
68
+ stroke-width: ${s};
69
+ }
70
+ .section-${n-1} line {
71
+ stroke: ${e["cScaleInv"+n]} ;
72
+ stroke-width: 3;
73
+ }
74
+
75
+ .lineWrapper line{
76
+ stroke: ${e["cScaleLabel"+n]} ;
77
+ }
78
+
79
+ .disabled, .disabled circle, .disabled text {
80
+ fill: ${e.tertiaryColor??"lightgray"};
81
+ }
82
+ .disabled text {
83
+ fill: ${e.clusterBorder??"#efefef"};
84
+ }
85
+ `}return t},"genSections"),ae={db:pt,renderer:{setConf:o.__name(()=>{},"setConf"),draw:o.__name((e,t,n,s)=>(s?.db?.getDirection?.()??"LR")==="TD"?ee.draw(e,t,n,s):Kt.draw(e,t,n,s),"draw")},parser:Ct,styles:o.__name(e=>{const{theme:t}=V.getConfig(),n=t?.includes("redux"),s=t==="neutral",r=e.svgId?.replace(/^#/,"")??"";let c="";if(e.useGradient&&r&&e.THEME_COLOR_LIMIT&&!s)for(let i=0;i<e.THEME_COLOR_LIMIT;i++)c+=`
86
+ .section-${i-1}[data-look="neo"] rect,
87
+ .section-${i-1}[data-look="neo"] path,
88
+ .section-${i-1}[data-look="neo"] circle {
89
+ fill: ${e.mainBkg};
90
+ stroke: url(#${r}-gradient);
91
+ stroke-width: 2;
92
+ }
93
+ .section-${i-1}[data-look="neo"] line {
94
+ stroke: url(#${r}-gradient);
95
+ stroke-width: 2;
96
+ }`;return`
97
+ .edge {
98
+ stroke-width: 3;
99
+ }
100
+ ${n?ne(e):re(e)}
101
+ ${c}
102
+ .section-root rect, .section-root path, .section-root circle {
103
+ fill: ${e.git0};
104
+ }
105
+ .section-root text {
106
+ fill: ${e.gitBranchLabel0};
107
+ }
108
+ .icon-container {
109
+ height:100%;
110
+ display: flex;
111
+ justify-content: center;
112
+ align-items: center;
113
+ }
114
+ .edge {
115
+ fill: none;
116
+ }
117
+ .eventWrapper {
118
+ filter: brightness(120%);
119
+ }
120
+ `},"getStyles")};exports.diagram=ae;
@@ -0,0 +1 @@
1
+ require("./chunk-KEIR6QF5-C4fcHpY0.cjs");const e=require("./mermaid-parser.core-DYumW1vq.cjs");exports.createTreeViewServices=e.createTreeViewServices;
@@ -0,0 +1,5 @@
1
+ import "./chunk-KEIR6QF5-B2Op7cFH.js";
2
+ import { c as i } from "./mermaid-parser.core-uIDZYuBu.js";
3
+ export {
4
+ i as createTreeViewServices
5
+ };
@@ -0,0 +1 @@
1
+ require("./chunk-KEIR6QF5-C4fcHpY0.cjs");const e=require("./mermaid-parser.core-DYumW1vq.cjs");exports.createTreemapServices=e.createTreemapServices;
@@ -0,0 +1,5 @@
1
+ import "./chunk-KEIR6QF5-B2Op7cFH.js";
2
+ import { o } from "./mermaid-parser.core-uIDZYuBu.js";
3
+ export {
4
+ o as createTreemapServices
5
+ };
@@ -1,28 +1,164 @@
1
1
  import type { EventManager } from './events';
2
+ import { type Getter } from './signal';
2
3
  export interface Ref<T extends HTMLElement = HTMLElement> {
3
4
  current: T | null;
4
5
  }
5
6
  export declare const createRef: <T extends HTMLElement = HTMLElement>() => Ref<T>;
7
+ /** A single directly-appendable child: element, text, nested builder, or nothing.
8
+ * Internal helper — the public, general type is {@link Child}. */
9
+ type StaticChild = HTMLElement | string | ElementBuilder<any> | undefined | null;
10
+ /**
11
+ * The one type every `children()` / `replaceChildren()` argument accepts:
12
+ * a node, text, nested builder, `null`/`undefined`, a (nested) array of those,
13
+ * a getter `() => …` marking a reactive region (re-evaluated when a signal it
14
+ * reads changes; rebuilds the region — see docs), or a {@link For} handle for a
15
+ * keyed list (reuses nodes across updates). On SSR getters / `For` render once.
16
+ */
17
+ export type Child = StaticChild | StaticChild[] | (() => StaticChild | StaticChild[]) | ForHandle | IndexHandle;
18
+ declare const FOR_BRAND = "__ranFor";
19
+ /** Options for {@link For}. */
20
+ export interface ForOptions<T> {
21
+ /** Reactive source array. Read inside an effect, so the list updates on change. */
22
+ each: () => readonly T[] | null | undefined;
23
+ /** Stable identity per item — **must be unique** within the list. Reused across
24
+ * updates to match old nodes to new items (that is what preserves DOM state). */
25
+ key: (item: T, index: number) => string | number;
26
+ /** Render one item to a single node. `index` is a **getter** (reactive): it
27
+ * reflects the item's current position even after the list reorders. Runs once
28
+ * per item (not on every list change) — drive per-item updates with signals. */
29
+ render: (item: T, index: Getter<number>) => StaticChild;
30
+ }
31
+ /** Opaque handle returned by {@link For}; pass it straight to `children()`. */
32
+ export type ForHandle = {
33
+ readonly [FOR_BRAND]: true;
34
+ };
35
+ /**
36
+ * Keyed list for `children()`. Unlike a plain getter child (which rebuilds the
37
+ * whole region on every change), `For` matches items by `key` and **reuses their
38
+ * DOM nodes** — only added/removed/moved items touch the DOM, so focus, scroll,
39
+ * input values and in-flight transitions inside surviving rows are preserved.
40
+ *
41
+ * Ul().children(
42
+ * For({
43
+ * each: () => rows(),
44
+ * key: (r) => r.id,
45
+ * render: (r, i) => Li().text(() => `${i()}. ${r.title}`),
46
+ * }),
47
+ * );
48
+ *
49
+ * On SSR the list is rendered once as a static snapshot. Must be built inside a
50
+ * `createRoot` so per-item scopes are disposed with the page.
51
+ */
52
+ export declare function For<T>(options: ForOptions<T>): ForHandle;
53
+ /** Options for {@link Show}. */
54
+ export interface ShowOptions<T> {
55
+ /** Condition source. Truthy → `children`, falsy → `fallback`. */
56
+ when: () => T;
57
+ /** Built when `when` is truthy. Receives an accessor to the narrowed value —
58
+ * read it inside a binding (`.text(() => v())`) to update without rebuilding. */
59
+ children: (value: () => NonNullable<T>) => StaticChild;
60
+ /** Built when `when` is falsy. Omitted → nothing is rendered. */
61
+ fallback?: () => StaticChild;
62
+ }
63
+ /**
64
+ * Fine-grained conditional child. Unlike a raw getter child (which re-runs on
65
+ * **every** change it reads), `Show` rebuilds the branch **only when the
66
+ * truthiness of `when` flips** — the condition is memoized. Content inside a
67
+ * branch updates through its own bindings, not by re-running `Show`. This is the
68
+ * SwiftUI/Solid model: build once, toggle only when the branch actually changes.
69
+ *
70
+ * Show({
71
+ * when: () => user(), // reads a signal
72
+ * children: (u) => Div().text(() => u().name),
73
+ * fallback: () => Div().text('Signed out'),
74
+ * })
75
+ *
76
+ * `Show` returns a getter, so it is accepted anywhere `children()` takes a child.
77
+ * Must be created inside a `createRoot` (it owns a memo + the branch effect).
78
+ */
79
+ export declare function Show<T>(options: ShowOptions<T>): () => StaticChild;
80
+ /** One branch of a {@link Switch}; build with {@link Match}. */
81
+ export interface MatchClause<T> {
82
+ when: () => T;
83
+ children: (value: () => NonNullable<T>) => StaticChild;
84
+ }
85
+ /** Declare one `Switch` branch (identity helper — gives per-clause type inference). */
86
+ export declare function Match<T>(clause: MatchClause<T>): MatchClause<T>;
87
+ /** Options for {@link Switch}. */
88
+ export interface SwitchOptions {
89
+ /** Branches, tried in order; the first with a truthy `when` renders. Clauses are
90
+ * heterogeneous (each `Match<T>` carries its own `T`), hence `any` here. */
91
+ children: MatchClause<any>[];
92
+ /** Rendered when no branch matches. Omitted → nothing. */
93
+ fallback?: () => StaticChild;
94
+ }
95
+ /**
96
+ * Fine-grained multi-branch conditional (the n-way `Show`). Renders the first
97
+ * `Match` whose `when` is truthy, else `fallback`. Only the **index of the
98
+ * winning branch** is memoized, so it rebuilds only when the active branch
99
+ * changes — not on every change a `when` reads. Evaluation short-circuits at the
100
+ * first match (later branches aren't subscribed while an earlier one wins).
101
+ *
102
+ * Switch({
103
+ * fallback: () => Span().text('idle'),
104
+ * children: [
105
+ * Match({ when: () => status() === 'loading', children: () => Spinner() }),
106
+ * Match({ when: () => error(), children: (e) => ErrorView(e) }),
107
+ * ],
108
+ * })
109
+ */
110
+ export declare function Switch(options: SwitchOptions): () => StaticChild;
111
+ declare const INDEX_BRAND = "__ranIndex";
112
+ /** Options for {@link Index}. */
113
+ export interface IndexOptions<T> {
114
+ /** Reactive source array. */
115
+ each: () => readonly T[] | null | undefined;
116
+ /** Render the slot at a position. `item` is a **getter** (a signal): when the
117
+ * value at this index changes, it updates in place — the node is not rebuilt.
118
+ * `index` is a fixed number (the position never moves). */
119
+ render: (item: () => T, index: number) => StaticChild;
120
+ }
121
+ /** Opaque handle returned by {@link Index}; pass it straight to `children()`. */
122
+ export type IndexHandle = {
123
+ readonly [INDEX_BRAND]: true;
124
+ };
125
+ /**
126
+ * Position-keyed list. The node at index `i` is **reused** across updates and its
127
+ * `item` signal is updated in place — nodes never move. Use it when position is
128
+ * the identity (primitive arrays, fixed-length rows). Use {@link For} instead
129
+ * when items have a stable id and can reorder. SSR renders once.
130
+ *
131
+ * Ul().children(
132
+ * Index({ each: () => nums(), render: (n, i) => Li().text(() => `${i}: ${n()}`) }),
133
+ * );
134
+ */
135
+ export declare function Index<T>(options: IndexOptions<T>): IndexHandle;
6
136
  export declare class ElementBuilder<T extends HTMLElement = HTMLElement> {
7
137
  private el;
8
138
  constructor(tag: string);
9
139
  id(value: string): this;
10
- class(name: string): this;
140
+ /**
141
+ * Apply a value now, or bind it reactively when a getter is passed.
142
+ * A getter creates an effect owned by the current reactive scope (createRoot),
143
+ * so the binding is disposed automatically when that scope is torn down.
144
+ */
145
+ private bind;
146
+ class(name: string | Getter<string>): this;
11
147
  addClass(...names: string[]): this;
12
148
  removeClass(...names: string[]): this;
13
- attr(name: string, value: string): this;
149
+ attr(name: string, value: string | Getter<string>): this;
14
150
  attrs(values: Record<string, string | number | boolean | null | undefined>): this;
15
- boolAttr(name: string, value: boolean, enabledValue?: string): this;
16
- part(value: string): this;
17
- data(key: string, value: string): this;
18
- style(keyOrMap: string | Record<string, string>, value?: string): this;
19
- cssVar(name: string, value: string): this;
20
- aria(key: string, value: string): this;
21
- role(value: string): this;
151
+ boolAttr(name: string, value: boolean | Getter<boolean>, enabledValue?: string): this;
152
+ part(value: string | Getter<string>): this;
153
+ data(key: string, value: string | Getter<string>): this;
154
+ style(keyOrMap: string | Record<string, string>, value?: string | Getter<string>): this;
155
+ cssVar(name: string, value: string | Getter<string>): this;
156
+ aria(key: string, value: string | Getter<string>): this;
157
+ role(value: string | Getter<string>): this;
22
158
  tabIndex(value: number): this;
23
- label(value: string): this;
24
- labelledBy(id: string): this;
25
- describedBy(id: string): this;
159
+ label(value: string | Getter<string>): this;
160
+ labelledBy(id: string | Getter<string>): this;
161
+ describedBy(id: string | Getter<string>): this;
26
162
  ariaHidden(hidden?: boolean): this;
27
163
  /**
28
164
  * Permanent build-time listener — tied to the element's lifetime.
@@ -46,9 +182,9 @@ export declare class ElementBuilder<T extends HTMLElement = HTMLElement> {
46
182
  * .build();
47
183
  */
48
184
  delegate<K extends keyof HTMLElementEventMap>(manager: EventManager, selector: string, type: K, handler: (ev: HTMLElementEventMap[K], target: Element) => void, options?: Omit<AddEventListenerOptions, 'signal'>): this;
49
- children(...items: (HTMLElement | string | ElementBuilder<any> | undefined | null | (HTMLElement | string | ElementBuilder<any> | undefined | null)[])[]): this;
50
- replaceChildren(...items: (HTMLElement | string | ElementBuilder<any> | undefined | null | (HTMLElement | string | ElementBuilder<any> | undefined | null)[])[]): this;
51
- text(value: string): this;
185
+ children(...items: Child[]): this;
186
+ replaceChildren(...items: Child[]): this;
187
+ text(value: string | Getter<string>): this;
52
188
  ref(holder: Ref<T>): this;
53
189
  shadow(options?: ShadowRootInit): ShadowBuilder<T>;
54
190
  build(): T;
@@ -59,7 +195,7 @@ export declare class ShadowBuilder<T extends HTMLElement = HTMLElement> {
59
195
  private hostEl;
60
196
  private options;
61
197
  constructor(host: T, root: ShadowRoot, options: ShadowRootInit);
62
- children(...items: (HTMLElement | string | ElementBuilder<any> | undefined | null | (HTMLElement | string | ElementBuilder<any> | undefined | null)[])[]): this;
198
+ children(...items: Child[]): this;
63
199
  adoptSheet(...sheets: CSSStyleSheet[]): this;
64
200
  css(cssText: string): this;
65
201
  done(): {
@@ -68,3 +204,4 @@ export declare class ShadowBuilder<T extends HTMLElement = HTMLElement> {
68
204
  };
69
205
  serialize(): string;
70
206
  }
207
+ export {};
@@ -15,4 +15,4 @@ export declare const Nav: () => ElementBuilder<HTMLElement>;
15
15
  export declare const Header: () => ElementBuilder<HTMLElement>;
16
16
  export declare const Footer: () => ElementBuilder<HTMLElement>;
17
17
  export declare const Main: () => ElementBuilder<HTMLElement>;
18
- export declare const DeclarativeShadow: (mode?: "open" | "closed", delegatesFocus?: boolean) => ElementBuilder<HTMLTemplateElement>;
18
+ export declare const DeclarativeShadow: (mode?: 'open' | 'closed', delegatesFocus?: boolean) => ElementBuilder<HTMLTemplateElement>;
@@ -1,9 +1,9 @@
1
1
  export { isSSR } from './env';
2
2
  export { EventManager } from './events';
3
- export { signal, createEffect, computed, batch } from './signal';
4
- export type { Getter, Setter, SignalOptions } from './signal';
3
+ export { signal, createEffect, computed, batch, untrack, createRoot, onCleanup, getOwner, runWithOwner, } from './signal';
4
+ export type { Getter, Setter, SignalOptions, Owner } from './signal';
5
5
  export { escapeHtml, escapeHtmlAttribute } from './escape';
6
6
  export { type MockNode, matchSelector, collectMatches } from './selectors';
7
7
  export { DocumentFragmentMock, HTMLElementMock, ShadowRootMock } from './mocks';
8
- export { type Ref, createRef, ElementBuilder, ShadowBuilder } from './core';
8
+ export { type Ref, type Child, type ForOptions, type ForHandle, type IndexOptions, type IndexHandle, type ShowOptions, type SwitchOptions, type MatchClause, createRef, For, Index, Show, Switch, Match, ElementBuilder, ShadowBuilder, } from './core';
9
9
  export { View, Div, Span, Slot, ButtonBuilder, InputBuilder, Style, Label, Ul, Li, Section, Article, Nav, Header, Footer, Main, DeclarativeShadow, } from './factory';
@@ -1,87 +1,116 @@
1
1
  /**
2
- * Reactive primitives — signal / createEffect / computed / batch
3
- *
4
- * Design reference: SwiftUI @Observable + Solid.js fine-grained reactivity
5
- *
6
- * SwiftUI's core model: View = f(State)
7
- * @State / @Observable — reactive source (≈ signal)
8
- * body pure function of state, auto-tracks reads (≈ createEffect)
9
- * computed property — derived, cached ( computed)
10
- *
11
- * Two improvements over a naive signal implementation, both borrowed from Solid.js:
12
- *
13
- * 1. Stale subscription cleanup
14
- * Before each re-run, an effect removes itself from every signal it previously
15
- * subscribed to, then re-subscribes only to signals read in this run.
16
- * Without this, conditional reads leave permanent ghost subscriptions that
17
- * trigger effects for signals they no longer care about.
18
- *
19
- * 2. Batching
20
- * batch(fn) defers all effect executions until fn returns, then flushes once.
21
- * Mirrors SwiftUI's automatic coalescing of mutations in the same event handler.
22
- * Without this, setting two signals triggers each dependent effect twice.
2
+ * Reactive primitives — signal / computed / createEffect / batch, plus an
3
+ * ownership layer (createRoot / onCleanup / getOwner / runWithOwner) and untrack.
4
+ *
5
+ * Design reference: SwiftUI @Observable + Solid.js fine-grained reactivity.
6
+ *
7
+ * View = f(State)
8
+ * signal reactive source (@State)
9
+ * computed — derived, LAZY + memoized (SwiftUI computed property / Solid memo)
10
+ * createEffect— side effect that re-runs when its reads change (≈ body)
11
+ * ownership — effects/memos form an owner tree; disposing a scope disposes
12
+ * everything created under it (critical for MPA: tear down a page
13
+ * and every effect it spawned is cleaned up in one call).
14
+ *
15
+ * Model (push-pull scheduling + lazy memos):
16
+ * - Reading a source inside a computation links them both ways.
17
+ * - Writing a signal marks direct observers DIRTY and their transitive memo
18
+ * observers CHECK ("maybe dirty"), scheduling any dependent effects. Effects
19
+ * flush once (deduped — diamond dependencies run an effect a single time).
20
+ * - Memos recompute lazily on read, and only re-notify their observers when
21
+ * their derived value actually changes (via `equals`). A CHECK computation
22
+ * first pulls its sources up to date; if none changed value, it is skipped —
23
+ * so a memo whose output is stable never wakes the effects behind it.
24
+ * - Every computation is owned; re-running or disposing it first disposes its
25
+ * owned children and runs its cleanups (no leaked nested effects).
23
26
  */
24
27
  export type Getter<T> = () => T;
25
28
  export type Setter<T> = (value: T | ((prev: T) => T)) => void;
26
29
  export interface SignalOptions<T> {
27
- /** Custom equality check. Defaults to Object.is. Return true to skip update. */
30
+ /** Custom equality. Defaults to Object.is. Return true to skip the update. */
28
31
  equals?: (prev: T, next: T) => boolean;
29
32
  }
33
+ /** Anything a computation can subscribe to (a signal, or a memo). */
34
+ interface SourceLike {
35
+ observers: Set<Computation>;
36
+ }
37
+ /** Staleness of a computation. CLEAN → up to date; CHECK → a memo source may
38
+ * have changed (verify before recomputing); DIRTY → definitely recompute. */
39
+ declare const CLEAN = 0;
40
+ declare const CHECK = 1;
41
+ declare const DIRTY = 2;
42
+ type State = typeof CLEAN | typeof CHECK | typeof DIRTY;
43
+ /** An effect or a memo — a node that runs a function and tracks its reads. */
44
+ interface Computation extends Owner {
45
+ fn: () => unknown;
46
+ /** Sources (signals / memos) read during the last run. */
47
+ sources: Set<SourceLike>;
48
+ isEffect: boolean;
49
+ running: boolean;
50
+ disposed: boolean;
51
+ state: State;
52
+ observers: Set<Computation>;
53
+ value: unknown;
54
+ equals: (a: unknown, b: unknown) => boolean;
55
+ }
56
+ /** A node that can own child computations + cleanups (effect, memo, or root). */
57
+ export interface Owner {
58
+ owned: Computation[];
59
+ cleanups: Array<() => void>;
60
+ owner: Owner | null;
61
+ }
30
62
  /**
31
- * Create a reactive value. Returns a [getter, setter] tuple.
63
+ * Create a reactive value. Returns a `[getter, setter]` tuple.
32
64
  *
33
65
  * const [count, setCount] = signal(0);
34
- * count() // read — auto-tracks inside createEffect / computed
35
- * setCount(1) // write — notifies dependents; skips if value unchanged
36
- * setCount(n => n + 1) // updater function form
66
+ * count(); // read — auto-tracked inside computed / createEffect
67
+ * setCount(1); // write — notifies dependents; skipped if unchanged
68
+ * setCount((n) => n + 1) // updater form
37
69
  */
38
70
  export declare function signal<T>(initial: T, options?: SignalOptions<T>): [Getter<T>, Setter<T>];
39
71
  /**
40
- * Run fn immediately and re-run it whenever any signal read inside it changes.
41
- * Returns a dispose function that stops the effect and cleans up subscriptions.
42
- *
43
- * Before each re-run, the effect removes itself from every signal it previously
44
- * subscribed to (stale-subscription cleanup), then re-subscribes only to signals
45
- * read in the new run.
46
- *
47
- * fn may return a cleanup function called before each re-run and on dispose.
72
+ * Derived, read-only, LAZY + memoized value. Recomputes only when read after a
73
+ * dependency changed; unread memos never recompute. When a recompute produces an
74
+ * equal value (default `Object.is`, override via `options.equals`) the memo does
75
+ * NOT notify its observers so effects behind a value-stable memo stay asleep.
76
+ * Owned by the current scope, so it is disposed when that scope is.
77
+ *
78
+ * const fullName = computed(() => `${first()} ${last()}`);
79
+ * fullName(); // computes on first read, caches until a dep's value changes
80
+ */
81
+ export declare function computed<T>(fn: () => T, options?: SignalOptions<T>): Getter<T>;
82
+ /**
83
+ * Run `fn` immediately, then re-run it whenever a signal/memo it read changes.
84
+ * Owned by the current scope. `fn` may return a cleanup, called before each
85
+ * re-run and on dispose. Returns a dispose function.
48
86
  *
49
87
  * const dispose = createEffect(() => {
50
- * document.title = `Count: ${count()}`;
51
- * return () => { document.title = ''; }; // optional cleanup
88
+ * el.textContent = `Count: ${count()}`;
89
+ * return () => {}; // optional cleanup
52
90
  * });
53
- *
54
- * dispose(); // stop tracking, remove from all signals
55
91
  */
56
92
  export declare function createEffect(fn: () => void | (() => void)): () => void;
57
93
  /**
58
- * Derived read-only signal. Recomputes when its dependencies change.
59
- *
60
- * const [firstName, setFirstName] = signal('Jane');
61
- * const [lastName, setLastName] = signal('Doe');
62
- * const fullName = computed(() => `${firstName()} ${lastName()}`);
63
- *
64
- * fullName() // 'Jane Doe'
65
- * setFirstName('John');
66
- * fullName() // 'John Doe'
94
+ * Coalesce multiple writes into one flush. Effects run once after `fn` returns,
95
+ * deduplicated. Nested batches are absorbed by the outermost one.
67
96
  */
68
- export declare function computed<T>(fn: () => T): Getter<T>;
97
+ export declare function batch(fn: () => void): void;
98
+ /** Read signals without subscribing the current computation to them. */
99
+ export declare function untrack<T>(fn: () => T): T;
69
100
  /**
70
- * Run multiple signal writes as a single atomic update.
71
- * All effects are deferred until fn returns, then flushed once (deduplicated).
101
+ * Create a disposable reactive scope. Effects/memos created inside are owned by
102
+ * it; calling the passed `dispose` tears them all down. Use one per page/route
103
+ * in an MPA/SPA so navigating away cleans up every effect that page spawned.
72
104
  *
73
- * Mirrors SwiftUI's automatic coalescing of mutations within the same event handler.
74
- *
75
- * // Without batch: each setter triggers effects independently (2 runs)
76
- * setFirstName('John');
77
- * setLastName('Smith');
78
- *
79
- * // With batch: one flush after both writes (1 run)
80
- * batch(() => {
81
- * setFirstName('John');
82
- * setLastName('Smith');
83
- * });
84
- *
85
- * Nested batch() calls are safe — inner calls are absorbed by the outer batch.
105
+ * const dispose = createRoot((dispose) => { renderPage(); return dispose; });
106
+ * // ...later, on navigation:
107
+ * dispose();
86
108
  */
87
- export declare function batch(fn: () => void): void;
109
+ export declare function createRoot<T>(fn: (dispose: () => void) => T): T;
110
+ /** Register a cleanup on the current scope, run when it re-runs or is disposed. */
111
+ export declare function onCleanup(fn: () => void): void;
112
+ /** The current owner scope (for advanced integrations, e.g. a router). */
113
+ export declare function getOwner(): Owner | null;
114
+ /** Run `fn` under a specific owner scope (pairs with getOwner). */
115
+ export declare function runWithOwner<T>(owner: Owner | null, fn: () => T): T;
116
+ export {};