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.
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/abnfDiagram-VRR7QNED-CH_pIv_l.cjs +1 -0
- package/dist/abnfDiagram-VRR7QNED-CTsqwzwi.js +95 -0
- package/dist/arc-D25LhgTs.cjs +1 -0
- package/dist/arc-DRPGof21.js +82 -0
- package/dist/architecture-TIHT7OUA-BbBd15_y.cjs +1 -0
- package/dist/architecture-TIHT7OUA-pbFO1xSx.js +5 -0
- package/dist/architectureDiagram-ZJ3FMSHR-8mjyXr-w.js +4279 -0
- package/dist/architectureDiagram-ZJ3FMSHR-D_jWFFZx.cjs +36 -0
- package/dist/array-By5736M5.js +7 -0
- package/dist/array-C3cbN3GY.cjs +1 -0
- package/dist/arrow-down-Bi5kqUrX.js +12 -0
- package/dist/blockDiagram-677ZJIJ3-3F79MOSt.js +3321 -0
- package/dist/blockDiagram-677ZJIJ3-Cx35khWe.cjs +132 -0
- package/dist/builder.d.ts +4 -4
- package/dist/builder.js +39 -30
- package/dist/builtin-BkM0LLof.js +416 -0
- package/dist/button-D0zcnKnG.js +117 -0
- package/dist/button.js +1 -1
- package/dist/c4Diagram-LMCZKHZV-Cxn_gqu_.js +3064 -0
- package/dist/c4Diagram-LMCZKHZV-TRNb3Gvl.cjs +10 -0
- package/dist/{card-BVvXX6KM.js → card-CygMndQS.js} +2 -2
- package/dist/card.js +1 -1
- package/dist/channel-C9WSNwcS.cjs +1 -0
- package/dist/channel-k5-UxdcV.js +5 -0
- package/dist/{checkbox-BtoX9X2Z.js → checkbox-D5om9aJO.js} +10 -10
- package/dist/checkbox.js +1 -1
- package/dist/chunk-2Q5K7J3B-CTMy5FII.cjs +1 -0
- package/dist/chunk-2Q5K7J3B-DlFVJRAn.js +15 -0
- package/dist/chunk-32BRIVSS-BXVdG_nV.cjs +1 -0
- package/dist/chunk-32BRIVSS-jAuAwMVV.js +68 -0
- package/dist/chunk-52WLFC77-BChUrU24.cjs +10 -0
- package/dist/chunk-52WLFC77-wpL7en7e.js +630 -0
- package/dist/chunk-5VM5RSS4-Cni2Ogq2.js +19 -0
- package/dist/chunk-5VM5RSS4-DudUFQ_Z.cjs +15 -0
- package/dist/chunk-7BUUIJ7U-9hiBbc7O.js +87 -0
- package/dist/chunk-7BUUIJ7U-DMv_UkjI.cjs +1 -0
- package/dist/chunk-C7G6YPKG-CA-DNpvI.js +71 -0
- package/dist/chunk-C7G6YPKG-CKEeW9TM.cjs +1 -0
- package/dist/chunk-EX3LRPZG-BCmf0iDq.js +2137 -0
- package/dist/chunk-EX3LRPZG-DbfbNdXo.cjs +231 -0
- package/dist/chunk-FWX5IMBZ-D11-gbhc.cjs +1 -0
- package/dist/chunk-FWX5IMBZ-DZ5VYvm5.js +60 -0
- package/dist/chunk-HOUHSVGY-BGB3dOvI.cjs +1 -0
- package/dist/chunk-HOUHSVGY-DRQcQeMT.js +268 -0
- package/dist/chunk-ICXQ74PX-BbT9JaEW.cjs +2 -0
- package/dist/chunk-ICXQ74PX-DR8rL-xF.js +1377 -0
- package/dist/chunk-JWPE2WC7-CGEmUMMZ.js +8 -0
- package/dist/chunk-JWPE2WC7-D8EnWK1B.cjs +1 -0
- package/dist/chunk-KEIR6QF5-B2Op7cFH.js +22155 -0
- package/dist/chunk-KEIR6QF5-C4fcHpY0.cjs +161 -0
- package/dist/chunk-MOJQB5TN-BC46HDyu.js +516 -0
- package/dist/chunk-MOJQB5TN-oOeq982_.cjs +88 -0
- package/dist/chunk-OGEWGWER-BV51ll2w.js +33 -0
- package/dist/chunk-OGEWGWER-DX8sW1dT.cjs +1 -0
- package/dist/chunk-PUDLZKDR-48YaqVoF.cjs +156 -0
- package/dist/chunk-PUDLZKDR-NdMR0Ft5.js +4282 -0
- package/dist/chunk-Q4XR5HBZ-3BHjjc9u.js +1709 -0
- package/dist/chunk-Q4XR5HBZ-aBnPq509.cjs +70 -0
- package/dist/chunk-RYQCIY6F-BER2T9t0.js +246 -0
- package/dist/chunk-RYQCIY6F-DVRzSnsI.cjs +1 -0
- package/dist/chunk-V7JOEXUC-Cr_hr02u.js +3467 -0
- package/dist/chunk-V7JOEXUC-DHizzTla.cjs +206 -0
- package/dist/chunk-VAUOI2AC-DfQf5L2_.cjs +1 -0
- package/dist/chunk-VAUOI2AC-izt0o4id.js +11 -0
- package/dist/chunk-VR4S4FIN-CJi5okl4.js +26 -0
- package/dist/chunk-VR4S4FIN-KiwnPF31.cjs +1 -0
- package/dist/chunk-WYO6CB5R-DDHkKowO.js +4535 -0
- package/dist/chunk-WYO6CB5R-u4mJNOcO.cjs +127 -0
- package/dist/chunk-XXDRQBXY-BB1i_53q.js +9 -0
- package/dist/chunk-XXDRQBXY-C8VGLZmt.cjs +1 -0
- package/dist/chunk-Y2CYZVJY-0JxdZxki.js +13 -0
- package/dist/chunk-Y2CYZVJY-DPaYLFFP.cjs +1 -0
- package/dist/chunk-ZGVPDNZ5-6uMbTJXy.js +3841 -0
- package/dist/chunk-ZGVPDNZ5-Cw5_HJba.cjs +62 -0
- package/dist/chunk-ZIRB5QZD-C7OH2FI2.js +1280 -0
- package/dist/chunk-ZIRB5QZD-aLu-4ITN.cjs +32 -0
- package/dist/classDiagram-OUVF2IWQ-D6rqYIh0.cjs +1 -0
- package/dist/classDiagram-OUVF2IWQ-Df0ghim9.js +30 -0
- package/dist/classDiagram-v2-EOCWNBFH-D6rqYIh0.cjs +1 -0
- package/dist/classDiagram-v2-EOCWNBFH-Df0ghim9.js +30 -0
- package/dist/{colorpicker-Dukms7ET.js → colorpicker-qWnaTlYX.js} +9 -10
- package/dist/colorpicker.js +1 -1
- package/dist/components/colorpicker/index.d.ts +3 -3
- package/dist/components/glass/index.d.ts +52 -0
- package/dist/components/icon/builtin.d.ts +9 -0
- package/dist/components/icon/core-icons.d.ts +13 -0
- package/dist/components/icon/index.d.ts +8 -0
- package/dist/components/mermaid/index.d.ts +52 -0
- package/dist/components/modal/index.d.ts +9 -0
- package/dist/components/route/index.d.ts +10 -4
- package/dist/components/router/index.d.ts +3 -0
- package/dist/content-Rry-U6ir.js +39 -0
- package/dist/content.js +5 -0
- package/dist/cose-bilkent-JH36ORCC-BUxFTdey.cjs +1 -0
- package/dist/cose-bilkent-JH36ORCC-DTwvJlGw.js +2353 -0
- package/dist/cynefin-VYW2F7L2-6c1GOGXW.cjs +1 -0
- package/dist/cynefin-VYW2F7L2-ALQKF7N6.js +5 -0
- package/dist/cynefinDiagram-TSTJHNR4-Bjt4QTVh.js +355 -0
- package/dist/cynefinDiagram-TSTJHNR4-ISDORSxO.cjs +62 -0
- package/dist/cytoscape.esm-CFq1_DTa.js +18906 -0
- package/dist/cytoscape.esm-pygMw4dR.cjs +321 -0
- package/dist/dagre-D1-W1tt6.cjs +1 -0
- package/dist/dagre-D8GLTwuf.js +1578 -0
- package/dist/dagre-VKFMJZFB-DXI69qAN.cjs +4 -0
- package/dist/dagre-VKFMJZFB-Dfku86Az.js +341 -0
- package/dist/defaultLocale-0M_kMcEH.js +184 -0
- package/dist/defaultLocale-DSqtvhxg.cjs +1 -0
- package/dist/diagram-FQU43EPY-BAiRt5eL.cjs +3 -0
- package/dist/diagram-FQU43EPY-BvQ5jmVn.js +452 -0
- package/dist/diagram-G47NLZAW-DGnmEa8u.cjs +24 -0
- package/dist/diagram-G47NLZAW-DT2BBA0T.js +498 -0
- package/dist/diagram-NH7WQ7WH-DxgkStA3.cjs +24 -0
- package/dist/diagram-NH7WQ7WH-W7jg4Vh8.js +135 -0
- package/dist/diagram-OA4YK3LP-DkvFII73.cjs +30 -0
- package/dist/diagram-OA4YK3LP-jU--aqQl.js +317 -0
- package/dist/diagram-WEI45ONY-C_Qhf4ny.js +215 -0
- package/dist/diagram-WEI45ONY-XvzRFmmY.cjs +41 -0
- package/dist/dist-C0Fwsvsq.js +70 -0
- package/dist/dist-C20XxSsP.cjs +1 -0
- package/dist/{dropdown-BYS1Trdu.js → dropdown-DzdAR1nI.js} +4 -4
- package/dist/dropdown.js +1 -1
- package/dist/ebnfDiagram-CCIWWBDH-Cu8bAlhC.cjs +1 -0
- package/dist/ebnfDiagram-CCIWWBDH-Gnr20Oc1.js +112 -0
- package/dist/erDiagram-Q63AITRT-CxLSa9Yv.cjs +85 -0
- package/dist/erDiagram-Q63AITRT-D0Hh9b-W.js +1822 -0
- package/dist/eventmodeling-45OFAUF4-C6VXxUn1.cjs +1 -0
- package/dist/eventmodeling-45OFAUF4-DMpGs2yI.js +5 -0
- package/dist/factory-BkvRcCOx.js +482 -0
- package/dist/flowDiagram-23GEKE2U-B6gASEYG.cjs +1 -0
- package/dist/flowDiagram-23GEKE2U-BY4wE2vw.js +19 -0
- package/dist/{form-BsB5JhS4.js → form-CUJpeQ7Q.js} +5 -5
- package/dist/form.js +1 -1
- package/dist/ganttDiagram-NO4QXBWP-B40Eabk0.js +3125 -0
- package/dist/ganttDiagram-NO4QXBWP-DZT79qJr.cjs +292 -0
- package/dist/gitGraph-TEB2WS4Q-BbtF3MDr.cjs +1 -0
- package/dist/gitGraph-TEB2WS4Q-D6Ru11Cs.js +5 -0
- package/dist/gitGraphDiagram-IHSO6WYX-BUJNSssA.js +754 -0
- package/dist/gitGraphDiagram-IHSO6WYX-DW06165m.cjs +106 -0
- package/dist/glass-Bj1Zf8Hy.js +115 -0
- package/dist/glass.js +5 -0
- package/dist/graphlib-CCKThIKP.js +1104 -0
- package/dist/graphlib-Du-578Js.cjs +1 -0
- package/dist/{icon-pfolda2m.js → icon-CtlZJISZ.js} +110 -21
- package/dist/icon.js +4 -3
- package/dist/icons.js +5 -0
- package/dist/iife/button.iife.js +1 -1
- package/dist/iife/card.iife.js +1 -1
- package/dist/iife/checkbox.iife.js +1 -1
- package/dist/iife/colorpicker.iife.js +2 -2
- package/dist/iife/content.iife.js +1 -0
- package/dist/iife/dropdown.iife.js +1 -1
- package/dist/iife/form.iife.js +1 -1
- package/dist/iife/glass.iife.js +1 -0
- package/dist/iife/icon.iife.js +1 -1
- package/dist/iife/image.iife.js +1 -1
- package/dist/iife/input.iife.js +1 -1
- package/dist/iife/loading.iife.js +1 -1
- package/dist/iife/math.iife.js +14 -14
- package/dist/iife/mermaid.iife.js +3535 -0
- package/dist/iife/message.iife.js +1 -1
- package/dist/iife/modal.iife.js +1 -1
- package/dist/iife/player.iife.js +8 -8
- package/dist/iife/popover.iife.js +1 -1
- package/dist/iife/progress.iife.js +1 -1
- package/dist/iife/radar.iife.js +1 -1
- package/dist/iife/route.iife.js +1 -1
- package/dist/iife/router.iife.js +1 -1
- package/dist/iife/scratch.iife.js +1 -1
- package/dist/iife/section.iife.js +1 -1
- package/dist/iife/select.iife.js +2 -2
- package/dist/iife/skeleton.iife.js +1 -1
- package/dist/iife/tab.iife.js +1 -1
- package/dist/iife/tabpane.iife.js +1 -1
- package/dist/{image-BXpKQ9sU.js → image-ILZNlaGc.js} +4 -4
- package/dist/image.js +1 -1
- package/dist/index.cjs +257 -23
- package/dist/index.d.ts +11 -1
- package/dist/index.iife.js +3842 -74
- package/dist/index.js +86 -78
- package/dist/info-DKCQHKI2-DNOtUIin.cjs +1 -0
- package/dist/info-DKCQHKI2-Df7h9MSE.js +5 -0
- package/dist/infoDiagram-FWYZ7A6U-C8dZc-Ki.cjs +2 -0
- package/dist/infoDiagram-FWYZ7A6U-Dc0m9qAx.js +21 -0
- package/dist/init-1VpIn1S3.js +16 -0
- package/dist/init-CbDwVtpO.cjs +1 -0
- package/dist/{input-BMMM60e6.js → input-CDH6zY9I.js} +6 -6
- package/dist/input.js +1 -1
- package/dist/ishikawaDiagram-FXEZZL3T-BugNyysB.cjs +70 -0
- package/dist/ishikawaDiagram-FXEZZL3T-DuFtHOmf.js +742 -0
- package/dist/journeyDiagram-5HDEW3XC-Bshelnhq.js +928 -0
- package/dist/journeyDiagram-5HDEW3XC-ItmURvA2.cjs +139 -0
- package/dist/kanban-definition-HUTT4EX6-BL512R2A.cjs +89 -0
- package/dist/kanban-definition-HUTT4EX6-Dogv2paU.js +1050 -0
- package/dist/katex-Cq3Y8cmK.cjs +257 -0
- package/dist/katex-Pg2EqTH0.js +23485 -0
- package/dist/line-BIPmUVxO.js +33 -0
- package/dist/line-CAB5QHC6.cjs +1 -0
- package/dist/linear-B2AM4ZBe.js +259 -0
- package/dist/linear-CSAfNEpl.cjs +1 -0
- package/dist/{link-DURZzd7u.js → link-BCrmHvXP.js} +3 -3
- package/dist/link.js +1 -1
- package/dist/{loading-BScjyeVm.js → loading-DJWGih1g.js} +4 -4
- package/dist/loading.js +1 -1
- package/dist/map-BC2bk_rV.cjs +1 -0
- package/dist/map-DMSWkcq6.js +208 -0
- package/dist/{math-IjzOAwnA.js → math-DRmkEDSQ.js} +4 -4
- package/dist/math.js +1 -1
- package/dist/mermaid-CMhm7npE.js +261 -0
- package/dist/mermaid-parser.core-DYumW1vq.cjs +6 -0
- package/dist/mermaid-parser.core-uIDZYuBu.js +654 -0
- package/dist/mermaid.core-B2d5lQW2.js +1085 -0
- package/dist/mermaid.core-a1hgpWfs.cjs +10 -0
- package/dist/mermaid.js +5 -0
- package/dist/{message-CLpuP8HY.js → message-BpYJBvYn.js} +36 -51
- package/dist/message.js +1 -1
- package/dist/mindmap-definition-LN4V7U3C-DYZgIZym.cjs +96 -0
- package/dist/mindmap-definition-LN4V7U3C-f7s5ZePP.js +1070 -0
- package/dist/{modal-DOTpABRe.js → modal-BeQlDYDP.js} +40 -24
- package/dist/modal.js +1 -1
- package/dist/ordinal-BMN81JG2.js +64 -0
- package/dist/ordinal-BplLHIij.cjs +1 -0
- package/dist/packet-7NZHBO7P-4PLslLZJ.js +5 -0
- package/dist/packet-7NZHBO7P-DeyLCrSn.cjs +1 -0
- package/dist/path-Bja5PoYn.js +82 -0
- package/dist/path-DmfWsuKi.cjs +1 -0
- package/dist/pegDiagram-2B236MQR-B-Xeh55J.js +107 -0
- package/dist/pegDiagram-2B236MQR-Bo5Nj40u.cjs +1 -0
- package/dist/pie-RZYD4A2V-DBE9a8Kz.js +5 -0
- package/dist/pie-RZYD4A2V-pDNZ2ZyB.cjs +1 -0
- package/dist/pieDiagram-ENE6RG2P-BkSiP4iu.cjs +39 -0
- package/dist/pieDiagram-ENE6RG2P-CVSE95zc.js +207 -0
- package/dist/{player-5olrw-qB.js → player-CQ4e3Yeo.js} +196 -195
- package/dist/player.js +1 -1
- package/dist/{popover-DRUQjdPs.js → popover-eZMnL1F3.js} +22 -54
- package/dist/popover.js +1 -1
- package/dist/{progress-BIEXYYd2.js → progress-DyHgW4Ep.js} +5 -5
- package/dist/progress.js +1 -1
- package/dist/quadrantDiagram-ABIIQ3AL-BDmdDGsh.cjs +7 -0
- package/dist/quadrantDiagram-ABIIQ3AL-TJ8FmqES.js +2058 -0
- package/dist/{radar-DAF95_Mj.js → radar-D21Rccap.js} +5 -5
- package/dist/radar-I7S5WNFK-CY5ycn2a.cjs +1 -0
- package/dist/radar-I7S5WNFK-DFTxtd_t.js +5 -0
- package/dist/radar.js +1 -1
- package/dist/railroad-3IZDKUUU-DALJwv16.js +5 -0
- package/dist/railroad-3IZDKUUU-DGzXHqt7.cjs +1 -0
- package/dist/railroad-abnf-AHOZXSZD-BCIHdSw6.cjs +1 -0
- package/dist/railroad-abnf-AHOZXSZD-CntW2udQ.js +5 -0
- package/dist/railroad-ebnf-EBAXGLYW-4vFZrfHF.cjs +1 -0
- package/dist/railroad-ebnf-EBAXGLYW-s_1ZOb_9.js +5 -0
- package/dist/railroad-peg-LSFZ7HO6-CaM5A0Ml.js +5 -0
- package/dist/railroad-peg-LSFZ7HO6-D_oFW1Bo.cjs +1 -0
- package/dist/railroadDiagram-RFXS5EU6-0lS5wYI7.js +83 -0
- package/dist/railroadDiagram-RFXS5EU6-DJKAtnQk.cjs +1 -0
- package/dist/ranui.css +1 -1
- package/dist/requirementDiagram-TGXJPOKE-Bg701bNl.cjs +84 -0
- package/dist/requirementDiagram-TGXJPOKE-viCQLyJd.js +2301 -0
- package/dist/rolldown-runtime-9ZSF5uba.js +16 -0
- package/dist/rolldown-runtime-CAnuVJ4g.cjs +1 -0
- package/dist/rough.esm-BWe9E0Nz.js +1387 -0
- package/dist/rough.esm-BfSi6CZE.cjs +1 -0
- package/dist/route-pR5P4ann.js +116 -0
- package/dist/route.js +1 -1
- package/dist/{router-B9rCrWXm.js → router-CewzSH7O.js} +23 -18
- package/dist/router.js +1 -1
- package/dist/sankeyDiagram-HTMAVEWB-CV6_AuMF.js +974 -0
- package/dist/sankeyDiagram-HTMAVEWB-K-nGMsuS.cjs +40 -0
- package/dist/{scratch-QlPyy1f4.js → scratch-BFVsgl-7.js} +2 -2
- package/dist/scratch.js +1 -1
- package/dist/{section-D0qMm9KM.js → section-DSPCsIxv.js} +2 -2
- package/dist/section.js +1 -1
- package/dist/{select-aAaWoveE.js → select-B58nMfB1.js} +16 -23
- package/dist/select.js +1 -1
- package/dist/sequenceDiagram-DBY2YBRQ-4GdkLnUr.cjs +162 -0
- package/dist/sequenceDiagram-DBY2YBRQ-B9WNesh2.js +4326 -0
- package/dist/sizeCapture-X5ZJPWSS-BUY3-n09.cjs +1 -0
- package/dist/sizeCapture-X5ZJPWSS-D7rGsqTl.js +48 -0
- package/dist/{skeleton-CFqQmKyt.js → skeleton-DoHYMsTn.js} +5 -5
- package/dist/skeleton.js +1 -1
- package/dist/src-C9EhKhbk.cjs +1 -0
- package/dist/src-DtRLxcYO.js +2104 -0
- package/dist/stateDiagram-2N3HPSRC-B7VpgjJu.cjs +1 -0
- package/dist/stateDiagram-2N3HPSRC-DxH4BMSh.js +237 -0
- package/dist/stateDiagram-v2-6OUMAXLB-CQv7GIaO.cjs +1 -0
- package/dist/stateDiagram-v2-6OUMAXLB-CWfn6e7n.js +30 -0
- package/dist/swimlanes-5IMT3BWC-DcADNGpg.js +5258 -0
- package/dist/swimlanes-5IMT3BWC-o-MjdPlw.cjs +1 -0
- package/dist/swimlanesDiagram-G3AALYLV-D-rmAGky.cjs +8 -0
- package/dist/swimlanesDiagram-G3AALYLV-DDtDtl1L.js +31 -0
- package/dist/{tab-CiF2YPck.js → tab-BRPdZ9Ws.js} +5 -5
- package/dist/tab.js +1 -1
- package/dist/{tabpane-B-m3xwqu.js → tabpane-Owf72hw_.js} +5 -5
- package/dist/tabpane.js +1 -1
- package/dist/test/unit/icon.builtin.test.d.ts +1 -0
- package/dist/test/unit/utils.colorpicker.reconnect.test.d.ts +1 -0
- package/dist/test/unit/utils.route.lazy.test.d.ts +1 -0
- package/dist/test/unit/utils.router.match.test.d.ts +1 -0
- package/dist/test/unit/utils.signal.owner.test.d.ts +1 -0
- package/dist/{theme-switch-B09egc6h.js → theme-switch-CZDIIonc.js} +4 -4
- package/dist/theme-switch.js +1 -1
- package/dist/timeline-definition-FHXFAJF6-C80VjPLh.js +1119 -0
- package/dist/timeline-definition-FHXFAJF6-DOwvOb3S.cjs +120 -0
- package/dist/treeView-QDETBFTQ-B1Ejxfpg.cjs +1 -0
- package/dist/treeView-QDETBFTQ-vTKOZls1.js +5 -0
- package/dist/treemap-6X3UGDF4-D0FeO_NX.cjs +1 -0
- package/dist/treemap-6X3UGDF4-Ddzv6Gqd.js +5 -0
- package/dist/utils/builder/core.d.ts +153 -16
- package/dist/utils/builder/factory.d.ts +1 -1
- package/dist/utils/builder/index.d.ts +3 -3
- package/dist/utils/builder/signal.d.ts +93 -64
- package/dist/utils/router/index.d.ts +13 -3
- package/dist/utils/router.js +95 -54
- package/dist/utils/theme.d.ts +1 -1
- package/dist/{utils-DBfrRFoE.js → utils-D1iZnChu.js} +38 -31
- package/dist/vennDiagram-L72KCM5P-BYHB7OW8.js +1955 -0
- package/dist/vennDiagram-L72KCM5P-CidVJK6y.cjs +34 -0
- package/dist/wardley-OPB4EBWU-C1hXbbD4.cjs +1 -0
- package/dist/wardley-OPB4EBWU-DBgFLc64.js +5 -0
- package/dist/wardleyDiagram-EHGQE667--ubmCaWM.js +652 -0
- package/dist/wardleyDiagram-EHGQE667-K6ckkRZS.cjs +78 -0
- package/dist/warning-circle-fill-Cz0qu7AH.js +23 -0
- package/dist/xychartDiagram-FW5EYKEG-CzdokxrM.cjs +7 -0
- package/dist/xychartDiagram-FW5EYKEG-DLqWcTPt.js +2154 -0
- package/docs/BUILDER.md +383 -0
- package/docs/COMPONENTS.md +21 -3
- package/package.json +31 -3
- package/dist/button-Be_uHDZG.js +0 -117
- package/dist/factory-BdsO0dEW.js +0 -165
- package/dist/route-MQZpn2BP.js +0 -88
- package/dist/signal-CSSZxlK5.js +0 -57
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const X=require("./mermaid-parser.core-DYumW1vq.cjs"),g=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs"),$=require("./src-C9EhKhbk.cjs"),m=require("./chunk-WYO6CB5R-u4mJNOcO.cjs"),D=require("./chunk-ICXQ74PX-BbT9JaEW.cjs"),Y=require("./chunk-VAUOI2AC-DfQf5L2_.cjs"),z=require("./chunk-JWPE2WC7-D8EnWK1B.cjs"),E=require("./chunk-HOUHSVGY-BGB3dOvI.cjs"),G=require("./chunk-2Q5K7J3B-CTMy5FII.cjs");var N=/[─━│┃└┗├┣]/,S=/[└┗├┣]/,P=/[─━]/,A=/^[\s│┃]+$/,B=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,T=/^\s*%%/,F=" ";function q(n){return n.some(e=>N.test(e))}g.__name(q,"isBoxDrawingFormat");function L(n){for(const e of n){const t=S.exec(e);if(t?.index&&t.index>0)return t.index}return 4}g.__name(L,"inferSegmentWidth");function M(n,e){return n.replace(/\bline\s+(\d+)\b/gi,(t,r)=>{const i=parseInt(r,10),a=e.get(i);return a?`line ${a}`:t})}g.__name(M,"remapErrorLines");function H(n){const e=n.split(`
|
|
2
|
+
`),t=new Map;let r=-1;for(const[s,o]of e.entries())if(o.trim()==="treeView-beta"){r=s;break}if(r===-1)return{text:n,lineMap:t};const i=[];for(let s=r+1;s<e.length;s++){const o=e[s];o.trim()===""||T.test(o)||B.test(o)||A.test(o)||i.push(o.replace(/\t/g," "))}if(!q(i))return{text:n,lineMap:t};const a=L(i),c=[];let l=0;for(let s=0;s<=r;s++)c.push(e[s]),l++,t.set(l,s+1);for(let s=r+1;s<e.length;s++){const o=e[s],d=o.trim(),h=s+1;if(d===""){c.push(o),l++,t.set(l,h);continue}if(T.test(o)){c.push(o),l++,t.set(l,h);continue}if(B.test(o)){c.push(o),l++,t.set(l,h);continue}if(A.test(o))continue;const u=o.replace(/\t/g," "),x=S.exec(u);if(x?.index!==void 0){const f=x.index,_=Math.round(f/a)+1;let p=f+1;for(;p<u.length&&P.test(u[p]);)p++;for(;p<u.length&&u[p]===" ";)p++;const b=u.slice(p).trimEnd();if(!b)throw new Error(`Line ${h}: Empty node — expected a filename or directory name after the box-drawing prefix`);const R=F.repeat(_);c.push(R+b),l++,t.set(l,h)}else{if(/^[\s─━│┃└┗├┣]+$/.test(u))continue;if(N.test(u))c.push(o),l++,t.set(l,h);else{if(/^\s+/.test(u))throw new Error(`Line ${h}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);c.push(o),l++,t.set(l,h)}}}return{text:c.join(`
|
|
3
|
+
`),lineMap:t}}g.__name(H,"preprocessBoxDrawing");var w=new G.ImperativeState(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),U=g.__name(()=>{w.reset(),m.clear()},"clear"),Z=g.__name(()=>w.records.stack[0],"getRoot"),j=g.__name(()=>w.records.cnt,"getCount"),J=m.defaultConfig_default.treeView,C={clear:U,addNode:g.__name((n,e,t,r,i,a)=>{for(;n<=w.records.stack[w.records.stack.length-1].level;)w.records.stack.pop();const c={id:w.records.cnt++,level:n,name:e,nodeType:t,icon:i,cssClass:r,description:a,children:[]};w.records.stack[w.records.stack.length-1].children.push(c),w.records.stack.push(c)},"addNode"),getRoot:Z,getCount:j,getConfig:g.__name(()=>D.cleanAndMerge(J,m.getConfig().treeView),"getConfig"),getAccTitle:m.getAccTitle,getAccDescription:m.getAccDescription,getDiagramTitle:m.getDiagramTitle,setAccDescription:m.setAccDescription,setAccTitle:m.setAccTitle,setDiagramTitle:m.setDiagramTitle},Q=g.__name(n=>{z.populateCommonDb(n,C);for(const e of n.nodes){const t=typeof e.indent=="number"?e.indent:0;let r=e.name;const i=r.endsWith("/");i&&(r=r.slice(0,-1));const a=i?"directory":"file",c=e.classAnnotation||void 0,l=e.iconAnnotation,s=l!==void 0?l||"none":void 0,o=e.descAnnotation||void 0,d=o?m.sanitizeText(o,m.getConfig()):void 0;C.addNode(t,r,a,c,s,d)}},"populate"),K={parse:g.__name(async n=>{const{text:e,lineMap:t}=H(n);try{const r=await X.parse("treeView",e);$.log.debug(r),Q(r)}catch(r){throw t.size>0&&r instanceof Error&&(r.message=M(r.message,t)),r}},"parse")},v={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function W(n,e){const t=e?.filenameIcons?.[n];if(t)return t;const r=n.lastIndexOf(".");if(r>0){const i=n.substring(r).toLowerCase(),a=e?.extensionIcons;return a?.[i]??a?.[i.slice(1)]}}g.__name(W,"detectIcon");function I(n,e){return n.includes(":")?n:n in v.icons||!e?`${v.prefix}:${n}`:`${e}:${n}`}g.__name(I,"qualifyIcon");function k(n,e){if(n.icon!=="none"){if(n.icon)return I(n.icon,e.defaultIconPack);if(e.showIcons){if(n.nodeType==="file"){const t=W(n.name,e);if(t==="none")return;if(t)return I(t,e.defaultIconPack)}return`${v.prefix}:${n.nodeType==="directory"?"folder":"file"}`}}}g.__name(k,"getNodeIcon");E.registerIconPacks([{name:v.prefix,icons:v}]);var y=14,ee=4,te=16,O=g.__name((n,e)=>`tv-icon-${n}-${e.replace(/[^\w-]/g,"-")}`,"iconSymbolId"),ne=g.__name(async(n,e,t,r)=>{const i=new Set,a=g.__name(s=>{const o=k(s,t);o&&i.add(o),s.children.forEach(a)},"collect");if(a(e),i.size===0)return;const c=await Promise.all([...i].map(async s=>({icon:s,svg:await E.getIconSVG(s,{height:y,width:y})}))),l=n.append("defs");for(const{icon:s,svg:o}of c)l.append("g").attr("id",O(r,s)).html(o)},"injectIconDefs"),re=g.__name((n,e,t,r,i,a)=>{const c=r.append("g");let l="treeView-node-label";t.nodeType==="directory"&&(l+=" treeView-node-dir"),t.cssClass&&(l+=` ${t.cssClass}`);const s=y+ee,o=k(t,i),d=o!==void 0;o&&c.append("use").attr("xlink:href",`#${O(a,o)}`).attr("x",n+i.paddingX).attr("y",e+i.paddingY).attr("class","treeView-node-icon");const h=c.append("text").text(t.name).attr("dominant-baseline","middle").attr("class",l),{height:u,width:x}=h.node().getBBox(),f=u+i.paddingY*2,_=n+i.paddingX+(d?s:0);h.attr("x",_),h.attr("y",e+f/2);const p=_+x;return t.BBox={x:n,y:e,width:x+i.paddingX*2+(d?s:0),height:f},t.cssClass?.split(/\s+/).includes("highlight")&&c.insert("rect",":first-child").attr("x",n).attr("y",e+1).attr("width",0).attr("height",f-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:t,nodeGroup:c,labelRightEdge:p,centerY:e+f/2}},"positionLabel"),V=g.__name((n,e,t,r,i,a)=>n.append("line").attr("x1",e).attr("y1",t).attr("x2",r).attr("y2",i).attr("stroke-width",a).attr("class","treeView-node-line"),"positionLine"),ie=g.__name((n,e,t,r)=>{let i=0,a=0;const c=[],l=g.__name((d,h,u,x)=>{const f=x*(u.rowIndent+u.paddingX),_=re(f,i,h,d,u,r);c.push(_);const{height:p,width:b}=h.BBox;V(d,f-u.rowIndent,i+p/2,f,i+p/2,u.lineThickness),a=Math.max(a,f+b),i+=p},"drawNode"),s=g.__name((d,h=0)=>{l(n,d,t,h),d.children.forEach(_=>{s(_,h+1)});const{x:u,y:x,height:f}=d.BBox;if(d.children.length){const{y:_,height:p}=d.children[d.children.length-1].BBox;V(n,u+t.paddingX,x+f,u+t.paddingX,_+p/2+t.lineThickness/2,t.lineThickness)}},"processNode");s(e);const o=c.filter(d=>d.node.description);if(o.length>0){const d=Math.max(...c.map(h=>h.labelRightEdge))+te;for(const h of o){const u=h.nodeGroup.append("text").text(h.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",d).attr("y",h.centerY).node().getBBox();a=Math.max(a,d+u.width+t.paddingX)}}for(const d of c)if(d.node.cssClass?.split(/\s+/).includes("highlight")){const h=d.nodeGroup.select(".treeView-highlight-bg");if(!h.empty()){const u=a-d.node.BBox.x+8;h.attr("width",u),a=Math.max(a,d.node.BBox.x+u+2)}}return{totalHeight:i,totalWidth:a}},"drawTree"),oe={draw:g.__name(async(n,e,t,r)=>{$.log.debug(`Rendering treeView diagram
|
|
4
|
+
`+n);const i=r.db,a=i.getRoot(),c=i.getConfig(),l=Y.selectSvgElement(e);await ne(l,a,c,e);const s=l.append("g");s.attr("class","tree-view");const{totalHeight:o,totalWidth:d}=ie(s,a,c,e);l.attr("viewBox",`-${c.lineThickness/2} 0 ${d} ${o}`),m.configureSvgSize(l,o,d,c.useMaxWidth)},"draw")},se={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},ae={db:C,renderer:oe,parser:K,styles:g.__name(({treeView:n})=>{const{labelFontSize:e,labelColor:t,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:c,highlightStroke:l}=D.cleanAndMerge(se,n);return`
|
|
5
|
+
.treeView-node-label {
|
|
6
|
+
font-size: ${e};
|
|
7
|
+
fill: ${t};
|
|
8
|
+
white-space: pre;
|
|
9
|
+
}
|
|
10
|
+
.treeView-node-dir {
|
|
11
|
+
font-weight: bold;
|
|
12
|
+
}
|
|
13
|
+
.treeView-node-line {
|
|
14
|
+
stroke: ${r};
|
|
15
|
+
}
|
|
16
|
+
.treeView-node-icon {
|
|
17
|
+
color: ${i};
|
|
18
|
+
}
|
|
19
|
+
.treeView-node-description {
|
|
20
|
+
font-size: ${e};
|
|
21
|
+
fill: ${a};
|
|
22
|
+
font-style: italic;
|
|
23
|
+
white-space: pre;
|
|
24
|
+
}
|
|
25
|
+
.treeView-highlight-bg {
|
|
26
|
+
fill: ${c};
|
|
27
|
+
stroke: ${l};
|
|
28
|
+
stroke-width: 1;
|
|
29
|
+
}
|
|
30
|
+
`},"styles")};exports.diagram=ae;
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { n as X } from "./mermaid-parser.core-uIDZYuBu.js";
|
|
2
|
+
import { n as f } from "./chunk-Y2CYZVJY-0JxdZxki.js";
|
|
3
|
+
import { m as A } from "./src-DtRLxcYO.js";
|
|
4
|
+
import { H as O, K as G, U as Y, a as P, b as N, c as F, f as j, v as U, w as Z, y as q, z as K } from "./chunk-WYO6CB5R-DDHkKowO.js";
|
|
5
|
+
import { i as D } from "./chunk-ICXQ74PX-DR8rL-xF.js";
|
|
6
|
+
import { t as J } from "./chunk-VAUOI2AC-izt0o4id.js";
|
|
7
|
+
import { t as Q } from "./chunk-JWPE2WC7-CGEmUMMZ.js";
|
|
8
|
+
import { r as ee, t as te } from "./chunk-HOUHSVGY-DRQcQeMT.js";
|
|
9
|
+
import { t as ne } from "./chunk-2Q5K7J3B-DlFVJRAn.js";
|
|
10
|
+
var E = /[─━│┃└┗├┣]/, S = /[└┗├┣]/, re = /[─━]/, V = /^[\s│┃]+$/, $ = /^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/, k = /^\s*%%/, ie = " ";
|
|
11
|
+
function L(n) {
|
|
12
|
+
return n.some((e) => E.test(e));
|
|
13
|
+
}
|
|
14
|
+
f(L, "isBoxDrawingFormat");
|
|
15
|
+
function _(n) {
|
|
16
|
+
for (const e of n) {
|
|
17
|
+
const t = S.exec(e);
|
|
18
|
+
if (t?.index && t.index > 0) return t.index;
|
|
19
|
+
}
|
|
20
|
+
return 4;
|
|
21
|
+
}
|
|
22
|
+
f(_, "inferSegmentWidth");
|
|
23
|
+
function M(n, e) {
|
|
24
|
+
return n.replace(/\bline\s+(\d+)\b/gi, (t, r) => {
|
|
25
|
+
const i = parseInt(r, 10), a = e.get(i);
|
|
26
|
+
return a ? `line ${a}` : t;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
f(M, "remapErrorLines");
|
|
30
|
+
function H(n) {
|
|
31
|
+
const e = n.split(`
|
|
32
|
+
`), t = /* @__PURE__ */ new Map();
|
|
33
|
+
let r = -1;
|
|
34
|
+
for (const [s, o] of e.entries()) if (o.trim() === "treeView-beta") {
|
|
35
|
+
r = s;
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
if (r === -1) return {
|
|
39
|
+
text: n,
|
|
40
|
+
lineMap: t
|
|
41
|
+
};
|
|
42
|
+
const i = [];
|
|
43
|
+
for (let s = r + 1; s < e.length; s++) {
|
|
44
|
+
const o = e[s];
|
|
45
|
+
o.trim() === "" || k.test(o) || $.test(o) || V.test(o) || i.push(o.replace(/\t/g, " "));
|
|
46
|
+
}
|
|
47
|
+
if (!L(i)) return {
|
|
48
|
+
text: n,
|
|
49
|
+
lineMap: t
|
|
50
|
+
};
|
|
51
|
+
const a = _(i), c = [];
|
|
52
|
+
let l = 0;
|
|
53
|
+
for (let s = 0; s <= r; s++)
|
|
54
|
+
c.push(e[s]), l++, t.set(l, s + 1);
|
|
55
|
+
for (let s = r + 1; s < e.length; s++) {
|
|
56
|
+
const o = e[s], d = o.trim(), h = s + 1;
|
|
57
|
+
if (d === "") {
|
|
58
|
+
c.push(o), l++, t.set(l, h);
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (k.test(o)) {
|
|
62
|
+
c.push(o), l++, t.set(l, h);
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if ($.test(o)) {
|
|
66
|
+
c.push(o), l++, t.set(l, h);
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if (V.test(o)) continue;
|
|
70
|
+
const p = o.replace(/\t/g, " "), x = S.exec(p);
|
|
71
|
+
if (x?.index !== void 0) {
|
|
72
|
+
const u = x.index, m = Math.round(u / a) + 1;
|
|
73
|
+
let g = u + 1;
|
|
74
|
+
for (; g < p.length && re.test(p[g]); ) g++;
|
|
75
|
+
for (; g < p.length && p[g] === " "; ) g++;
|
|
76
|
+
const b = p.slice(g).trimEnd();
|
|
77
|
+
if (!b) throw new Error(`Line ${h}: Empty node — expected a filename or directory name after the box-drawing prefix`);
|
|
78
|
+
const W = ie.repeat(m);
|
|
79
|
+
c.push(W + b), l++, t.set(l, h);
|
|
80
|
+
} else {
|
|
81
|
+
if (/^[\s─━│┃└┗├┣]+$/.test(p)) continue;
|
|
82
|
+
if (E.test(p))
|
|
83
|
+
c.push(o), l++, t.set(l, h);
|
|
84
|
+
else {
|
|
85
|
+
if (/^\s+/.test(p)) throw new Error(`Line ${h}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);
|
|
86
|
+
c.push(o), l++, t.set(l, h);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
text: c.join(`
|
|
92
|
+
`),
|
|
93
|
+
lineMap: t
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
f(H, "preprocessBoxDrawing");
|
|
97
|
+
var w = new ne(() => ({
|
|
98
|
+
cnt: 1,
|
|
99
|
+
stack: [{
|
|
100
|
+
id: 0,
|
|
101
|
+
level: -1,
|
|
102
|
+
name: "/",
|
|
103
|
+
nodeType: "directory",
|
|
104
|
+
children: []
|
|
105
|
+
}]
|
|
106
|
+
})), oe = /* @__PURE__ */ f(() => {
|
|
107
|
+
w.reset(), P();
|
|
108
|
+
}, "clear"), se = /* @__PURE__ */ f(() => w.records.stack[0], "getRoot"), ae = /* @__PURE__ */ f(() => w.records.cnt, "getCount"), ce = j.treeView, I = {
|
|
109
|
+
clear: oe,
|
|
110
|
+
addNode: /* @__PURE__ */ f((n, e, t, r, i, a) => {
|
|
111
|
+
for (; n <= w.records.stack[w.records.stack.length - 1].level; ) w.records.stack.pop();
|
|
112
|
+
const c = {
|
|
113
|
+
id: w.records.cnt++,
|
|
114
|
+
level: n,
|
|
115
|
+
name: e,
|
|
116
|
+
nodeType: t,
|
|
117
|
+
icon: i,
|
|
118
|
+
cssClass: r,
|
|
119
|
+
description: a,
|
|
120
|
+
children: []
|
|
121
|
+
};
|
|
122
|
+
w.records.stack[w.records.stack.length - 1].children.push(c), w.records.stack.push(c);
|
|
123
|
+
}, "addNode"),
|
|
124
|
+
getRoot: se,
|
|
125
|
+
getCount: ae,
|
|
126
|
+
getConfig: /* @__PURE__ */ f(() => D(ce, N().treeView), "getConfig"),
|
|
127
|
+
getAccTitle: q,
|
|
128
|
+
getAccDescription: U,
|
|
129
|
+
getDiagramTitle: Z,
|
|
130
|
+
setAccDescription: O,
|
|
131
|
+
setAccTitle: Y,
|
|
132
|
+
setDiagramTitle: G
|
|
133
|
+
}, le = /* @__PURE__ */ f((n) => {
|
|
134
|
+
Q(n, I);
|
|
135
|
+
for (const e of n.nodes) {
|
|
136
|
+
const t = typeof e.indent == "number" ? e.indent : 0;
|
|
137
|
+
let r = e.name;
|
|
138
|
+
const i = r.endsWith("/");
|
|
139
|
+
i && (r = r.slice(0, -1));
|
|
140
|
+
const a = i ? "directory" : "file", c = e.classAnnotation || void 0, l = e.iconAnnotation, s = l !== void 0 ? l || "none" : void 0, o = e.descAnnotation || void 0, d = o ? K(o, N()) : void 0;
|
|
141
|
+
I.addNode(t, r, a, c, s, d);
|
|
142
|
+
}
|
|
143
|
+
}, "populate"), de = { parse: /* @__PURE__ */ f(async (n) => {
|
|
144
|
+
const { text: e, lineMap: t } = H(n);
|
|
145
|
+
try {
|
|
146
|
+
const r = await X("treeView", e);
|
|
147
|
+
A.debug(r), le(r);
|
|
148
|
+
} catch (r) {
|
|
149
|
+
throw t.size > 0 && r instanceof Error && (r.message = M(r.message, t)), r;
|
|
150
|
+
}
|
|
151
|
+
}, "parse") }, v = {
|
|
152
|
+
prefix: "mermaid-treeview",
|
|
153
|
+
height: 24,
|
|
154
|
+
width: 24,
|
|
155
|
+
icons: {
|
|
156
|
+
folder: { body: '<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>' },
|
|
157
|
+
file: { body: '<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>' }
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
function z(n, e) {
|
|
161
|
+
const t = e?.filenameIcons?.[n];
|
|
162
|
+
if (t) return t;
|
|
163
|
+
const r = n.lastIndexOf(".");
|
|
164
|
+
if (r > 0) {
|
|
165
|
+
const i = n.substring(r).toLowerCase(), a = e?.extensionIcons;
|
|
166
|
+
return a?.[i] ?? a?.[i.slice(1)];
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
f(z, "detectIcon");
|
|
170
|
+
function C(n, e) {
|
|
171
|
+
return n.includes(":") ? n : n in v.icons || !e ? `${v.prefix}:${n}` : `${e}:${n}`;
|
|
172
|
+
}
|
|
173
|
+
f(C, "qualifyIcon");
|
|
174
|
+
function B(n, e) {
|
|
175
|
+
if (n.icon !== "none") {
|
|
176
|
+
if (n.icon) return C(n.icon, e.defaultIconPack);
|
|
177
|
+
if (e.showIcons) {
|
|
178
|
+
if (n.nodeType === "file") {
|
|
179
|
+
const t = z(n.name, e);
|
|
180
|
+
if (t === "none") return;
|
|
181
|
+
if (t) return C(t, e.defaultIconPack);
|
|
182
|
+
}
|
|
183
|
+
return `${v.prefix}:${n.nodeType === "directory" ? "folder" : "file"}`;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
f(B, "getNodeIcon");
|
|
188
|
+
ee([{
|
|
189
|
+
name: v.prefix,
|
|
190
|
+
icons: v
|
|
191
|
+
}]);
|
|
192
|
+
var y = 14, he = 4, pe = 16, R = /* @__PURE__ */ f((n, e) => `tv-icon-${n}-${e.replace(/[^\w-]/g, "-")}`, "iconSymbolId"), fe = /* @__PURE__ */ f(async (n, e, t, r) => {
|
|
193
|
+
const i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ f((s) => {
|
|
194
|
+
const o = B(s, t);
|
|
195
|
+
o && i.add(o), s.children.forEach(a);
|
|
196
|
+
}, "collect");
|
|
197
|
+
if (a(e), i.size === 0) return;
|
|
198
|
+
const c = await Promise.all([...i].map(async (s) => ({
|
|
199
|
+
icon: s,
|
|
200
|
+
svg: await te(s, {
|
|
201
|
+
height: y,
|
|
202
|
+
width: y
|
|
203
|
+
})
|
|
204
|
+
}))), l = n.append("defs");
|
|
205
|
+
for (const { icon: s, svg: o } of c) l.append("g").attr("id", R(r, s)).html(o);
|
|
206
|
+
}, "injectIconDefs"), ge = /* @__PURE__ */ f((n, e, t, r, i, a) => {
|
|
207
|
+
const c = r.append("g");
|
|
208
|
+
let l = "treeView-node-label";
|
|
209
|
+
t.nodeType === "directory" && (l += " treeView-node-dir"), t.cssClass && (l += ` ${t.cssClass}`);
|
|
210
|
+
const s = y + he, o = B(t, i), d = o !== void 0;
|
|
211
|
+
o && c.append("use").attr("xlink:href", `#${R(a, o)}`).attr("x", n + i.paddingX).attr("y", e + i.paddingY).attr("class", "treeView-node-icon");
|
|
212
|
+
const h = c.append("text").text(t.name).attr("dominant-baseline", "middle").attr("class", l), { height: p, width: x } = h.node().getBBox(), u = p + i.paddingY * 2, m = n + i.paddingX + (d ? s : 0);
|
|
213
|
+
h.attr("x", m), h.attr("y", e + u / 2);
|
|
214
|
+
const g = m + x;
|
|
215
|
+
return t.BBox = {
|
|
216
|
+
x: n,
|
|
217
|
+
y: e,
|
|
218
|
+
width: x + i.paddingX * 2 + (d ? s : 0),
|
|
219
|
+
height: u
|
|
220
|
+
}, t.cssClass?.split(/\s+/).includes("highlight") && c.insert("rect", ":first-child").attr("x", n).attr("y", e + 1).attr("width", 0).attr("height", u - 2).attr("rx", 3).attr("class", "treeView-highlight-bg"), {
|
|
221
|
+
node: t,
|
|
222
|
+
nodeGroup: c,
|
|
223
|
+
labelRightEdge: g,
|
|
224
|
+
centerY: e + u / 2
|
|
225
|
+
};
|
|
226
|
+
}, "positionLabel"), T = /* @__PURE__ */ f((n, e, t, r, i, a) => n.append("line").attr("x1", e).attr("y1", t).attr("x2", r).attr("y2", i).attr("stroke-width", a).attr("class", "treeView-node-line"), "positionLine"), ue = /* @__PURE__ */ f((n, e, t, r) => {
|
|
227
|
+
let i = 0, a = 0;
|
|
228
|
+
const c = [], l = /* @__PURE__ */ f((d, h, p, x) => {
|
|
229
|
+
const u = x * (p.rowIndent + p.paddingX), m = ge(u, i, h, d, p, r);
|
|
230
|
+
c.push(m);
|
|
231
|
+
const { height: g, width: b } = h.BBox;
|
|
232
|
+
T(d, u - p.rowIndent, i + g / 2, u, i + g / 2, p.lineThickness), a = Math.max(a, u + b), i += g;
|
|
233
|
+
}, "drawNode"), s = /* @__PURE__ */ f((d, h = 0) => {
|
|
234
|
+
l(n, d, t, h), d.children.forEach((m) => {
|
|
235
|
+
s(m, h + 1);
|
|
236
|
+
});
|
|
237
|
+
const { x: p, y: x, height: u } = d.BBox;
|
|
238
|
+
if (d.children.length) {
|
|
239
|
+
const { y: m, height: g } = d.children[d.children.length - 1].BBox;
|
|
240
|
+
T(n, p + t.paddingX, x + u, p + t.paddingX, m + g / 2 + t.lineThickness / 2, t.lineThickness);
|
|
241
|
+
}
|
|
242
|
+
}, "processNode");
|
|
243
|
+
s(e);
|
|
244
|
+
const o = c.filter((d) => d.node.description);
|
|
245
|
+
if (o.length > 0) {
|
|
246
|
+
const d = Math.max(...c.map((h) => h.labelRightEdge)) + pe;
|
|
247
|
+
for (const h of o) {
|
|
248
|
+
const p = h.nodeGroup.append("text").text(h.node.description).attr("dominant-baseline", "middle").attr("class", "treeView-node-description").attr("x", d).attr("y", h.centerY).node().getBBox();
|
|
249
|
+
a = Math.max(a, d + p.width + t.paddingX);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
for (const d of c) if (d.node.cssClass?.split(/\s+/).includes("highlight")) {
|
|
253
|
+
const h = d.nodeGroup.select(".treeView-highlight-bg");
|
|
254
|
+
if (!h.empty()) {
|
|
255
|
+
const p = a - d.node.BBox.x + 8;
|
|
256
|
+
h.attr("width", p), a = Math.max(a, d.node.BBox.x + p + 2);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
return {
|
|
260
|
+
totalHeight: i,
|
|
261
|
+
totalWidth: a
|
|
262
|
+
};
|
|
263
|
+
}, "drawTree"), me = { draw: /* @__PURE__ */ f(async (n, e, t, r) => {
|
|
264
|
+
A.debug(`Rendering treeView diagram
|
|
265
|
+
` + n);
|
|
266
|
+
const i = r.db, a = i.getRoot(), c = i.getConfig(), l = J(e);
|
|
267
|
+
await fe(l, a, c, e);
|
|
268
|
+
const s = l.append("g");
|
|
269
|
+
s.attr("class", "tree-view");
|
|
270
|
+
const { totalHeight: o, totalWidth: d } = ue(s, a, c, e);
|
|
271
|
+
l.attr("viewBox", `-${c.lineThickness / 2} 0 ${d} ${o}`), F(l, o, d, c.useMaxWidth);
|
|
272
|
+
}, "draw") }, we = {
|
|
273
|
+
labelFontSize: "16px",
|
|
274
|
+
labelColor: "black",
|
|
275
|
+
lineColor: "black",
|
|
276
|
+
iconColor: "#546e7a",
|
|
277
|
+
descriptionColor: "#6a9955",
|
|
278
|
+
highlightBg: "rgba(255, 193, 7, 0.15)",
|
|
279
|
+
highlightStroke: "#ffc107"
|
|
280
|
+
}, ke = {
|
|
281
|
+
db: I,
|
|
282
|
+
renderer: me,
|
|
283
|
+
parser: de,
|
|
284
|
+
styles: /* @__PURE__ */ f(({ treeView: n }) => {
|
|
285
|
+
const { labelFontSize: e, labelColor: t, lineColor: r, iconColor: i, descriptionColor: a, highlightBg: c, highlightStroke: l } = D(we, n);
|
|
286
|
+
return `
|
|
287
|
+
.treeView-node-label {
|
|
288
|
+
font-size: ${e};
|
|
289
|
+
fill: ${t};
|
|
290
|
+
white-space: pre;
|
|
291
|
+
}
|
|
292
|
+
.treeView-node-dir {
|
|
293
|
+
font-weight: bold;
|
|
294
|
+
}
|
|
295
|
+
.treeView-node-line {
|
|
296
|
+
stroke: ${r};
|
|
297
|
+
}
|
|
298
|
+
.treeView-node-icon {
|
|
299
|
+
color: ${i};
|
|
300
|
+
}
|
|
301
|
+
.treeView-node-description {
|
|
302
|
+
font-size: ${e};
|
|
303
|
+
fill: ${a};
|
|
304
|
+
font-style: italic;
|
|
305
|
+
white-space: pre;
|
|
306
|
+
}
|
|
307
|
+
.treeView-highlight-bg {
|
|
308
|
+
fill: ${c};
|
|
309
|
+
stroke: ${l};
|
|
310
|
+
stroke-width: 1;
|
|
311
|
+
}
|
|
312
|
+
`;
|
|
313
|
+
}, "styles")
|
|
314
|
+
};
|
|
315
|
+
export {
|
|
316
|
+
ke as diagram
|
|
317
|
+
};
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { n as S } from "./mermaid-parser.core-uIDZYuBu.js";
|
|
2
|
+
import { n as c } from "./chunk-Y2CYZVJY-0JxdZxki.js";
|
|
3
|
+
import { m as O } from "./src-DtRLxcYO.js";
|
|
4
|
+
import { D as k, H as R, K as I, U as D, a as E, b as w, c as F, f as _, v as P, w as z, y as G } from "./chunk-WYO6CB5R-DDHkKowO.js";
|
|
5
|
+
import { i as f } from "./chunk-ICXQ74PX-DR8rL-xF.js";
|
|
6
|
+
import { t as B } from "./chunk-VAUOI2AC-izt0o4id.js";
|
|
7
|
+
import { t as W } from "./chunk-JWPE2WC7-CGEmUMMZ.js";
|
|
8
|
+
var x = {
|
|
9
|
+
showLegend: !0,
|
|
10
|
+
ticks: 5,
|
|
11
|
+
max: null,
|
|
12
|
+
min: 0,
|
|
13
|
+
graticule: "circle"
|
|
14
|
+
}, C = {
|
|
15
|
+
axes: [],
|
|
16
|
+
curves: [],
|
|
17
|
+
options: x
|
|
18
|
+
}, g = structuredClone(C), H = _.radar, j = /* @__PURE__ */ c(() => f({
|
|
19
|
+
...H,
|
|
20
|
+
...w().radar
|
|
21
|
+
}), "getConfig"), b = /* @__PURE__ */ c(() => g.axes, "getAxes"), U = /* @__PURE__ */ c(() => g.curves, "getCurves"), V = /* @__PURE__ */ c(() => g.options, "getOptions"), K = /* @__PURE__ */ c((a) => {
|
|
22
|
+
g.axes = a.map((t) => ({
|
|
23
|
+
name: t.name,
|
|
24
|
+
label: t.label ?? t.name
|
|
25
|
+
}));
|
|
26
|
+
}, "setAxes"), N = /* @__PURE__ */ c((a) => {
|
|
27
|
+
g.curves = a.map((t) => ({
|
|
28
|
+
name: t.name,
|
|
29
|
+
label: t.label ?? t.name,
|
|
30
|
+
entries: X(t.entries)
|
|
31
|
+
}));
|
|
32
|
+
}, "setCurves"), X = /* @__PURE__ */ c((a) => {
|
|
33
|
+
if (a[0].axis == null) return a.map((e) => e.value);
|
|
34
|
+
const t = b();
|
|
35
|
+
if (t.length === 0) throw new Error("Axes must be populated before curves for reference entries");
|
|
36
|
+
return t.map((e) => {
|
|
37
|
+
const r = a.find((s) => s.axis?.$refText === e.name);
|
|
38
|
+
if (r === void 0) throw new Error("Missing entry for axis " + e.label);
|
|
39
|
+
return r.value;
|
|
40
|
+
});
|
|
41
|
+
}, "computeCurveEntries"), h = {
|
|
42
|
+
getAxes: b,
|
|
43
|
+
getCurves: U,
|
|
44
|
+
getOptions: V,
|
|
45
|
+
setAxes: K,
|
|
46
|
+
setCurves: N,
|
|
47
|
+
setOptions: /* @__PURE__ */ c((a) => {
|
|
48
|
+
const t = a.reduce((e, r) => (e[r.name] = r, e), {});
|
|
49
|
+
g.options = {
|
|
50
|
+
showLegend: t.showLegend?.value ?? x.showLegend,
|
|
51
|
+
ticks: t.ticks?.value ?? x.ticks,
|
|
52
|
+
max: t.max?.value ?? x.max,
|
|
53
|
+
min: t.min?.value ?? x.min,
|
|
54
|
+
graticule: t.graticule?.value ?? x.graticule
|
|
55
|
+
};
|
|
56
|
+
}, "setOptions"),
|
|
57
|
+
getConfig: j,
|
|
58
|
+
clear: /* @__PURE__ */ c(() => {
|
|
59
|
+
E(), g = structuredClone(C);
|
|
60
|
+
}, "clear"),
|
|
61
|
+
setAccTitle: D,
|
|
62
|
+
getAccTitle: G,
|
|
63
|
+
setDiagramTitle: I,
|
|
64
|
+
getDiagramTitle: z,
|
|
65
|
+
getAccDescription: P,
|
|
66
|
+
setAccDescription: R
|
|
67
|
+
}, Y = /* @__PURE__ */ c((a) => {
|
|
68
|
+
W(a, h);
|
|
69
|
+
const { axes: t, curves: e, options: r } = a;
|
|
70
|
+
h.setAxes(t), h.setCurves(e), h.setOptions(r);
|
|
71
|
+
}, "populate"), Z = { parse: /* @__PURE__ */ c(async (a) => {
|
|
72
|
+
const t = await S("radar", a);
|
|
73
|
+
O.debug(t), Y(t);
|
|
74
|
+
}, "parse") }, q = /* @__PURE__ */ c((a, t, e, r) => {
|
|
75
|
+
const s = r.db, i = s.getAxes(), l = s.getCurves(), n = s.getOptions(), o = s.getConfig(), d = s.getDiagramTitle(), u = J(B(t), o), p = n.max ?? Math.max(...l.map(($) => Math.max(...$.entries))), m = n.min, v = Math.min(o.width, o.height) / 2;
|
|
76
|
+
Q(u, i, v, n.ticks, n.graticule), tt(u, i, v, o), A(u, i, l, m, p, n.graticule, o), T(u, l, n.showLegend, o), u.append("text").attr("class", "radarTitle").text(d).attr("x", 0).attr("y", -o.height / 2 - o.marginTop);
|
|
77
|
+
}, "draw"), J = /* @__PURE__ */ c((a, t) => {
|
|
78
|
+
const e = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, s = {
|
|
79
|
+
x: t.marginLeft + t.width / 2,
|
|
80
|
+
y: t.marginTop + t.height / 2
|
|
81
|
+
};
|
|
82
|
+
return F(a, r, e, t.useMaxWidth ?? !0), a.attr("viewBox", `0 0 ${e} ${r}`).attr("overflow", "visible"), a.append("g").attr("transform", `translate(${s.x}, ${s.y})`);
|
|
83
|
+
}, "drawFrame"), Q = /* @__PURE__ */ c((a, t, e, r, s) => {
|
|
84
|
+
if (s === "circle") for (let i = 0; i < r; i++) {
|
|
85
|
+
const l = e * (i + 1) / r;
|
|
86
|
+
a.append("circle").attr("r", l).attr("class", "radarGraticule");
|
|
87
|
+
}
|
|
88
|
+
else if (s === "polygon") {
|
|
89
|
+
const i = t.length;
|
|
90
|
+
for (let l = 0; l < r; l++) {
|
|
91
|
+
const n = e * (l + 1) / r, o = t.map((d, u) => {
|
|
92
|
+
const p = 2 * u * Math.PI / i - Math.PI / 2;
|
|
93
|
+
return `${n * Math.cos(p)},${n * Math.sin(p)}`;
|
|
94
|
+
}).join(" ");
|
|
95
|
+
a.append("polygon").attr("points", o).attr("class", "radarGraticule");
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}, "drawGraticule"), tt = /* @__PURE__ */ c((a, t, e, r) => {
|
|
99
|
+
const s = t.length;
|
|
100
|
+
for (let i = 0; i < s; i++) {
|
|
101
|
+
const l = t[i].label, n = 2 * i * Math.PI / s - Math.PI / 2, o = Math.cos(n), d = Math.sin(n);
|
|
102
|
+
a.append("line").attr("x1", 0).attr("y1", 0).attr("x2", e * r.axisScaleFactor * o).attr("y2", e * r.axisScaleFactor * d).attr("class", "radarAxisLine");
|
|
103
|
+
const u = o > 0.01 ? "start" : o < -0.01 ? "end" : "middle", p = d > 0.01 ? "hanging" : d < -0.01 ? "auto" : "central", m = 4;
|
|
104
|
+
a.append("text").text(l).attr("x", e * r.axisLabelFactor * o + m * o).attr("y", e * r.axisLabelFactor * d + m * d).attr("text-anchor", u).attr("dominant-baseline", p).attr("class", "radarAxisLabel");
|
|
105
|
+
}
|
|
106
|
+
}, "drawAxes");
|
|
107
|
+
function A(a, t, e, r, s, i, l) {
|
|
108
|
+
const n = t.length, o = Math.min(l.width, l.height) / 2;
|
|
109
|
+
e.forEach((d, u) => {
|
|
110
|
+
if (d.entries.length !== n) return;
|
|
111
|
+
const p = d.entries.map((m, v) => {
|
|
112
|
+
const $ = 2 * Math.PI * v / n - Math.PI / 2, y = M(m, r, s, o);
|
|
113
|
+
return {
|
|
114
|
+
x: y * Math.cos($),
|
|
115
|
+
y: y * Math.sin($)
|
|
116
|
+
};
|
|
117
|
+
});
|
|
118
|
+
i === "circle" ? a.append("path").attr("d", L(p, l.curveTension)).attr("class", `radarCurve-${u}`) : i === "polygon" && a.append("polygon").attr("points", p.map((m) => `${m.x},${m.y}`).join(" ")).attr("class", `radarCurve-${u}`);
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
c(A, "drawCurves");
|
|
122
|
+
function M(a, t, e, r) {
|
|
123
|
+
return r * (Math.min(Math.max(a, t), e) - t) / (e - t);
|
|
124
|
+
}
|
|
125
|
+
c(M, "relativeRadius");
|
|
126
|
+
function L(a, t) {
|
|
127
|
+
const e = a.length;
|
|
128
|
+
let r = `M${a[0].x},${a[0].y}`;
|
|
129
|
+
for (let s = 0; s < e; s++) {
|
|
130
|
+
const i = a[(s - 1 + e) % e], l = a[s], n = a[(s + 1) % e], o = a[(s + 2) % e], d = {
|
|
131
|
+
x: l.x + (n.x - i.x) * t,
|
|
132
|
+
y: l.y + (n.y - i.y) * t
|
|
133
|
+
}, u = {
|
|
134
|
+
x: n.x - (o.x - l.x) * t,
|
|
135
|
+
y: n.y - (o.y - l.y) * t
|
|
136
|
+
};
|
|
137
|
+
r += ` C${d.x},${d.y} ${u.x},${u.y} ${n.x},${n.y}`;
|
|
138
|
+
}
|
|
139
|
+
return `${r} Z`;
|
|
140
|
+
}
|
|
141
|
+
c(L, "closedRoundCurve");
|
|
142
|
+
function T(a, t, e, r) {
|
|
143
|
+
if (!e) return;
|
|
144
|
+
const s = (r.width / 2 + r.marginRight) * 3 / 4, i = -(r.height / 2 + r.marginTop) * 3 / 4, l = 20;
|
|
145
|
+
t.forEach((n, o) => {
|
|
146
|
+
const d = a.append("g").attr("transform", `translate(${s}, ${i + o * l})`);
|
|
147
|
+
d.append("rect").attr("width", 12).attr("height", 12).attr("class", `radarLegendBox-${o}`), d.append("text").attr("x", 16).attr("y", 0).attr("class", "radarLegendText").text(n.label);
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
c(T, "drawLegend");
|
|
151
|
+
var et = { draw: q }, at = /* @__PURE__ */ c((a, t) => {
|
|
152
|
+
let e = "";
|
|
153
|
+
for (let r = 0; r < a.THEME_COLOR_LIMIT; r++) {
|
|
154
|
+
const s = a[`cScale${r}`];
|
|
155
|
+
e += `
|
|
156
|
+
.radarCurve-${r} {
|
|
157
|
+
color: ${s};
|
|
158
|
+
fill: ${s};
|
|
159
|
+
fill-opacity: ${t.curveOpacity};
|
|
160
|
+
stroke: ${s};
|
|
161
|
+
stroke-width: ${t.curveStrokeWidth};
|
|
162
|
+
}
|
|
163
|
+
.radarLegendBox-${r} {
|
|
164
|
+
fill: ${s};
|
|
165
|
+
fill-opacity: ${t.curveOpacity};
|
|
166
|
+
stroke: ${s};
|
|
167
|
+
}
|
|
168
|
+
`;
|
|
169
|
+
}
|
|
170
|
+
return e;
|
|
171
|
+
}, "genIndexStyles"), rt = /* @__PURE__ */ c((a) => {
|
|
172
|
+
const t = f(k(), w().themeVariables);
|
|
173
|
+
return {
|
|
174
|
+
themeVariables: t,
|
|
175
|
+
radarOptions: f(t.radar, a)
|
|
176
|
+
};
|
|
177
|
+
}, "buildRadarStyleOptions"), ut = {
|
|
178
|
+
parser: Z,
|
|
179
|
+
db: h,
|
|
180
|
+
renderer: et,
|
|
181
|
+
styles: /* @__PURE__ */ c(({ radar: a } = {}) => {
|
|
182
|
+
const { themeVariables: t, radarOptions: e } = rt(a);
|
|
183
|
+
return `
|
|
184
|
+
.radarTitle {
|
|
185
|
+
font-size: ${t.fontSize};
|
|
186
|
+
color: ${t.titleColor};
|
|
187
|
+
dominant-baseline: hanging;
|
|
188
|
+
text-anchor: middle;
|
|
189
|
+
}
|
|
190
|
+
.radarAxisLine {
|
|
191
|
+
stroke: ${e.axisColor};
|
|
192
|
+
stroke-width: ${e.axisStrokeWidth};
|
|
193
|
+
}
|
|
194
|
+
.radarAxisLabel {
|
|
195
|
+
font-size: ${e.axisLabelFontSize}px;
|
|
196
|
+
color: ${e.axisColor};
|
|
197
|
+
}
|
|
198
|
+
.radarGraticule {
|
|
199
|
+
fill: ${e.graticuleColor};
|
|
200
|
+
fill-opacity: ${e.graticuleOpacity};
|
|
201
|
+
stroke: ${e.graticuleColor};
|
|
202
|
+
stroke-width: ${e.graticuleStrokeWidth};
|
|
203
|
+
}
|
|
204
|
+
.radarLegendText {
|
|
205
|
+
text-anchor: start;
|
|
206
|
+
font-size: ${e.legendFontSize}px;
|
|
207
|
+
dominant-baseline: hanging;
|
|
208
|
+
}
|
|
209
|
+
${at(t, e)}
|
|
210
|
+
`;
|
|
211
|
+
}, "styles")
|
|
212
|
+
};
|
|
213
|
+
export {
|
|
214
|
+
ut as diagram
|
|
215
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const T=require("./mermaid-parser.core-DYumW1vq.cjs"),c=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs"),k=require("./src-C9EhKhbk.cjs"),m=require("./chunk-WYO6CB5R-u4mJNOcO.cjs"),y=require("./chunk-ICXQ74PX-BbT9JaEW.cjs"),O=require("./chunk-VAUOI2AC-DfQf5L2_.cjs"),S=require("./chunk-JWPE2WC7-D8EnWK1B.cjs");var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},f={axes:[],curves:[],options:x},h=structuredClone(f),q=m.defaultConfig_default.radar,D=c.__name(()=>y.cleanAndMerge({...q,...m.getConfig().radar}),"getConfig"),A=c.__name(()=>h.axes,"getAxes"),I=c.__name(()=>h.curves,"getCurves"),R=c.__name(()=>h.options,"getOptions"),E=c.__name(a=>{h.axes=a.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),F=c.__name(a=>{h.curves=a.map(e=>({name:e.name,label:e.label??e.name,entries:P(e.entries)}))},"setCurves"),P=c.__name(a=>{if(a[0].axis==null)return a.map(t=>t.value);const e=A();if(e.length===0)throw new Error("Axes must be populated before curves for reference entries");return e.map(t=>{const r=a.find(n=>n.axis?.$refText===t.name);if(r===void 0)throw new Error("Missing entry for axis "+t.label);return r.value})},"computeCurveEntries"),_={getAxes:A,getCurves:I,getOptions:R,setAxes:E,setCurves:F,setOptions:c.__name(a=>{const e=a.reduce((t,r)=>(t[r.name]=r,t),{});h.options={showLegend:e.showLegend?.value??x.showLegend,ticks:e.ticks?.value??x.ticks,max:e.max?.value??x.max,min:e.min?.value??x.min,graticule:e.graticule?.value??x.graticule}},"setOptions"),getConfig:D,clear:c.__name(()=>{m.clear(),h=structuredClone(f)},"clear"),setAccTitle:m.setAccTitle,getAccTitle:m.getAccTitle,setDiagramTitle:m.setDiagramTitle,getDiagramTitle:m.getDiagramTitle,getAccDescription:m.getAccDescription,setAccDescription:m.setAccDescription},W=c.__name(a=>{S.populateCommonDb(a,_);const{axes:e,curves:t,options:r}=a;_.setAxes(e),_.setCurves(t),_.setOptions(r)},"populate"),z={parse:c.__name(async a=>{const e=await T.parse("radar",a);k.log.debug(e),W(e)},"parse")},G=c.__name((a,e,t,r)=>{const n=r.db,o=n.getAxes(),l=n.getCurves(),s=n.getOptions(),i=n.getConfig(),d=n.getDiagramTitle(),u=B(O.selectSvgElement(e),i),g=s.max??Math.max(...l.map($=>Math.max(...$.entries))),p=s.min,v=Math.min(i.width,i.height)/2;Y(u,o,v,s.ticks,s.graticule),V(u,o,v,i),w(u,o,l,p,g,s.graticule,i),L(u,l,s.showLegend,i),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-i.height/2-i.marginTop)},"draw"),B=c.__name((a,e)=>{const t=e.width+e.marginLeft+e.marginRight,r=e.height+e.marginTop+e.marginBottom,n={x:e.marginLeft+e.width/2,y:e.marginTop+e.height/2};return m.configureSvgSize(a,r,t,e.useMaxWidth??!0),a.attr("viewBox",`0 0 ${t} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${n.x}, ${n.y})`)},"drawFrame"),Y=c.__name((a,e,t,r,n)=>{if(n==="circle")for(let o=0;o<r;o++){const l=t*(o+1)/r;a.append("circle").attr("r",l).attr("class","radarGraticule")}else if(n==="polygon"){const o=e.length;for(let l=0;l<r;l++){const s=t*(l+1)/r,i=e.map((d,u)=>{const g=2*u*Math.PI/o-Math.PI/2;return`${s*Math.cos(g)},${s*Math.sin(g)}`}).join(" ");a.append("polygon").attr("points",i).attr("class","radarGraticule")}}},"drawGraticule"),V=c.__name((a,e,t,r)=>{const n=e.length;for(let o=0;o<n;o++){const l=e[o].label,s=2*o*Math.PI/n-Math.PI/2,i=Math.cos(s),d=Math.sin(s);a.append("line").attr("x1",0).attr("y1",0).attr("x2",t*r.axisScaleFactor*i).attr("y2",t*r.axisScaleFactor*d).attr("class","radarAxisLine");const u=i>.01?"start":i<-.01?"end":"middle",g=d>.01?"hanging":d<-.01?"auto":"central",p=4;a.append("text").text(l).attr("x",t*r.axisLabelFactor*i+p*i).attr("y",t*r.axisLabelFactor*d+p*d).attr("text-anchor",u).attr("dominant-baseline",g).attr("class","radarAxisLabel")}},"drawAxes");function w(a,e,t,r,n,o,l){const s=e.length,i=Math.min(l.width,l.height)/2;t.forEach((d,u)=>{if(d.entries.length!==s)return;const g=d.entries.map((p,v)=>{const $=2*Math.PI*v/s-Math.PI/2,C=b(p,r,n,i);return{x:C*Math.cos($),y:C*Math.sin($)}});o==="circle"?a.append("path").attr("d",M(g,l.curveTension)).attr("class",`radarCurve-${u}`):o==="polygon"&&a.append("polygon").attr("points",g.map(p=>`${p.x},${p.y}`).join(" ")).attr("class",`radarCurve-${u}`)})}c.__name(w,"drawCurves");function b(a,e,t,r){return r*(Math.min(Math.max(a,e),t)-e)/(t-e)}c.__name(b,"relativeRadius");function M(a,e){const t=a.length;let r=`M${a[0].x},${a[0].y}`;for(let n=0;n<t;n++){const o=a[(n-1+t)%t],l=a[n],s=a[(n+1)%t],i=a[(n+2)%t],d={x:l.x+(s.x-o.x)*e,y:l.y+(s.y-o.y)*e},u={x:s.x-(i.x-l.x)*e,y:s.y-(i.y-l.y)*e};r+=` C${d.x},${d.y} ${u.x},${u.y} ${s.x},${s.y}`}return`${r} Z`}c.__name(M,"closedRoundCurve");function L(a,e,t,r){if(!t)return;const n=(r.width/2+r.marginRight)*3/4,o=-(r.height/2+r.marginTop)*3/4,l=20;e.forEach((s,i)=>{const d=a.append("g").attr("transform",`translate(${n}, ${o+i*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${i}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(s.label)})}c.__name(L,"drawLegend");var H={draw:G},X=c.__name((a,e)=>{let t="";for(let r=0;r<a.THEME_COLOR_LIMIT;r++){const n=a[`cScale${r}`];t+=`
|
|
2
|
+
.radarCurve-${r} {
|
|
3
|
+
color: ${n};
|
|
4
|
+
fill: ${n};
|
|
5
|
+
fill-opacity: ${e.curveOpacity};
|
|
6
|
+
stroke: ${n};
|
|
7
|
+
stroke-width: ${e.curveStrokeWidth};
|
|
8
|
+
}
|
|
9
|
+
.radarLegendBox-${r} {
|
|
10
|
+
fill: ${n};
|
|
11
|
+
fill-opacity: ${e.curveOpacity};
|
|
12
|
+
stroke: ${n};
|
|
13
|
+
}
|
|
14
|
+
`}return t},"genIndexStyles"),j=c.__name(a=>{const e=y.cleanAndMerge(m.getThemeVariables3(),m.getConfig().themeVariables);return{themeVariables:e,radarOptions:y.cleanAndMerge(e.radar,a)}},"buildRadarStyleOptions"),J={parser:z,db:_,renderer:H,styles:c.__name(({radar:a}={})=>{const{themeVariables:e,radarOptions:t}=j(a);return`
|
|
15
|
+
.radarTitle {
|
|
16
|
+
font-size: ${e.fontSize};
|
|
17
|
+
color: ${e.titleColor};
|
|
18
|
+
dominant-baseline: hanging;
|
|
19
|
+
text-anchor: middle;
|
|
20
|
+
}
|
|
21
|
+
.radarAxisLine {
|
|
22
|
+
stroke: ${t.axisColor};
|
|
23
|
+
stroke-width: ${t.axisStrokeWidth};
|
|
24
|
+
}
|
|
25
|
+
.radarAxisLabel {
|
|
26
|
+
font-size: ${t.axisLabelFontSize}px;
|
|
27
|
+
color: ${t.axisColor};
|
|
28
|
+
}
|
|
29
|
+
.radarGraticule {
|
|
30
|
+
fill: ${t.graticuleColor};
|
|
31
|
+
fill-opacity: ${t.graticuleOpacity};
|
|
32
|
+
stroke: ${t.graticuleColor};
|
|
33
|
+
stroke-width: ${t.graticuleStrokeWidth};
|
|
34
|
+
}
|
|
35
|
+
.radarLegendText {
|
|
36
|
+
text-anchor: start;
|
|
37
|
+
font-size: ${t.legendFontSize}px;
|
|
38
|
+
dominant-baseline: hanging;
|
|
39
|
+
}
|
|
40
|
+
${X(e,t)}
|
|
41
|
+
`},"styles")};exports.diagram=J;
|