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,498 @@
|
|
|
1
|
+
import { n as ce } from "./mermaid-parser.core-uIDZYuBu.js";
|
|
2
|
+
import { n as $ } from "./chunk-Y2CYZVJY-0JxdZxki.js";
|
|
3
|
+
import { m as J, p as j } from "./src-DtRLxcYO.js";
|
|
4
|
+
import { D as he, H as pe, K as ue, U as de, a as fe, b as ee, c as me, f as ge, v as ye, w as Se, y as ve } from "./chunk-WYO6CB5R-DDHkKowO.js";
|
|
5
|
+
import { t as Z } from "./ordinal-BMN81JG2.js";
|
|
6
|
+
import { t as R } from "./defaultLocale-0M_kMcEH.js";
|
|
7
|
+
import { i as Q } from "./chunk-ICXQ74PX-DR8rL-xF.js";
|
|
8
|
+
import { t as xe } from "./chunk-VAUOI2AC-izt0o4id.js";
|
|
9
|
+
import { t as we } from "./chunk-JWPE2WC7-CGEmUMMZ.js";
|
|
10
|
+
import { t as be } from "./chunk-VR4S4FIN-CJi5okl4.js";
|
|
11
|
+
import { i as V, n as Ce } from "./chunk-C7G6YPKG-CA-DNpvI.js";
|
|
12
|
+
function $e(t) {
|
|
13
|
+
var a = 0, n = t.children, r = n && n.length;
|
|
14
|
+
if (!r) a = 1;
|
|
15
|
+
else for (; --r >= 0; ) a += n[r].value;
|
|
16
|
+
t.value = a;
|
|
17
|
+
}
|
|
18
|
+
function Te() {
|
|
19
|
+
return this.eachAfter($e);
|
|
20
|
+
}
|
|
21
|
+
function Le(t, a) {
|
|
22
|
+
let n = -1;
|
|
23
|
+
for (const r of this) t.call(a, r, ++n, this);
|
|
24
|
+
return this;
|
|
25
|
+
}
|
|
26
|
+
function _e(t, a) {
|
|
27
|
+
for (var n = this, r = [n], i, s, c = -1; n = r.pop(); )
|
|
28
|
+
if (t.call(a, n, ++c, this), i = n.children) for (s = i.length - 1; s >= 0; --s) r.push(i[s]);
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
function Ne(t, a) {
|
|
32
|
+
for (var n = this, r = [n], i = [], s, c, p, f = -1; n = r.pop(); )
|
|
33
|
+
if (i.push(n), s = n.children) for (c = 0, p = s.length; c < p; ++c) r.push(s[c]);
|
|
34
|
+
for (; n = i.pop(); ) t.call(a, n, ++f, this);
|
|
35
|
+
return this;
|
|
36
|
+
}
|
|
37
|
+
function ke(t, a) {
|
|
38
|
+
let n = -1;
|
|
39
|
+
for (const r of this) if (t.call(a, r, ++n, this)) return r;
|
|
40
|
+
}
|
|
41
|
+
function Fe(t) {
|
|
42
|
+
return this.eachAfter(function(a) {
|
|
43
|
+
for (var n = +t(a.data) || 0, r = a.children, i = r && r.length; --i >= 0; ) n += r[i].value;
|
|
44
|
+
a.value = n;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function Me(t) {
|
|
48
|
+
return this.eachBefore(function(a) {
|
|
49
|
+
a.children && a.children.sort(t);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function ze(t) {
|
|
53
|
+
for (var a = this, n = Ae(a, t), r = [a]; a !== n; )
|
|
54
|
+
a = a.parent, r.push(a);
|
|
55
|
+
for (var i = r.length; t !== n; )
|
|
56
|
+
r.splice(i, 0, t), t = t.parent;
|
|
57
|
+
return r;
|
|
58
|
+
}
|
|
59
|
+
function Ae(t, a) {
|
|
60
|
+
if (t === a) return t;
|
|
61
|
+
var n = t.ancestors(), r = a.ancestors(), i = null;
|
|
62
|
+
for (t = n.pop(), a = r.pop(); t === a; )
|
|
63
|
+
i = t, t = n.pop(), a = r.pop();
|
|
64
|
+
return i;
|
|
65
|
+
}
|
|
66
|
+
function De() {
|
|
67
|
+
for (var t = this, a = [t]; t = t.parent; ) a.push(t);
|
|
68
|
+
return a;
|
|
69
|
+
}
|
|
70
|
+
function Ve() {
|
|
71
|
+
return Array.from(this);
|
|
72
|
+
}
|
|
73
|
+
function Pe() {
|
|
74
|
+
var t = [];
|
|
75
|
+
return this.eachBefore(function(a) {
|
|
76
|
+
a.children || t.push(a);
|
|
77
|
+
}), t;
|
|
78
|
+
}
|
|
79
|
+
function Be() {
|
|
80
|
+
var t = this, a = [];
|
|
81
|
+
return t.each(function(n) {
|
|
82
|
+
n !== t && a.push({
|
|
83
|
+
source: n.parent,
|
|
84
|
+
target: n
|
|
85
|
+
});
|
|
86
|
+
}), a;
|
|
87
|
+
}
|
|
88
|
+
function* Ee() {
|
|
89
|
+
var t = this, a, n = [t], r, i, s;
|
|
90
|
+
do
|
|
91
|
+
for (a = n.reverse(), n = []; t = a.pop(); )
|
|
92
|
+
if (yield t, r = t.children) for (i = 0, s = r.length; i < s; ++i) n.push(r[i]);
|
|
93
|
+
while (n.length);
|
|
94
|
+
}
|
|
95
|
+
function te(t, a) {
|
|
96
|
+
t instanceof Map ? (t = [void 0, t], a === void 0 && (a = We)) : a === void 0 && (a = Re);
|
|
97
|
+
for (var n = new U(t), r, i = [n], s, c, p, f; r = i.pop(); ) if ((c = a(r.data)) && (f = (c = Array.from(c)).length))
|
|
98
|
+
for (r.children = c, p = f - 1; p >= 0; --p)
|
|
99
|
+
i.push(s = c[p] = new U(c[p])), s.parent = r, s.depth = r.depth + 1;
|
|
100
|
+
return n.eachBefore(Ge);
|
|
101
|
+
}
|
|
102
|
+
function Ie() {
|
|
103
|
+
return te(this).eachBefore(He);
|
|
104
|
+
}
|
|
105
|
+
function Re(t) {
|
|
106
|
+
return t.children;
|
|
107
|
+
}
|
|
108
|
+
function We(t) {
|
|
109
|
+
return Array.isArray(t) ? t[1] : null;
|
|
110
|
+
}
|
|
111
|
+
function He(t) {
|
|
112
|
+
t.data.value !== void 0 && (t.value = t.data.value), t.data = t.data.data;
|
|
113
|
+
}
|
|
114
|
+
function Ge(t) {
|
|
115
|
+
var a = 0;
|
|
116
|
+
do
|
|
117
|
+
t.height = a;
|
|
118
|
+
while ((t = t.parent) && t.height < ++a);
|
|
119
|
+
}
|
|
120
|
+
function U(t) {
|
|
121
|
+
this.data = t, this.depth = this.height = 0, this.parent = null;
|
|
122
|
+
}
|
|
123
|
+
U.prototype = te.prototype = {
|
|
124
|
+
constructor: U,
|
|
125
|
+
count: Te,
|
|
126
|
+
each: Le,
|
|
127
|
+
eachAfter: Ne,
|
|
128
|
+
eachBefore: _e,
|
|
129
|
+
find: ke,
|
|
130
|
+
sum: Fe,
|
|
131
|
+
sort: Me,
|
|
132
|
+
path: ze,
|
|
133
|
+
ancestors: De,
|
|
134
|
+
descendants: Ve,
|
|
135
|
+
leaves: Pe,
|
|
136
|
+
links: Be,
|
|
137
|
+
copy: Ie,
|
|
138
|
+
[Symbol.iterator]: Ee
|
|
139
|
+
};
|
|
140
|
+
function Oe(t) {
|
|
141
|
+
if (typeof t != "function") throw new Error();
|
|
142
|
+
return t;
|
|
143
|
+
}
|
|
144
|
+
function W() {
|
|
145
|
+
return 0;
|
|
146
|
+
}
|
|
147
|
+
function H(t) {
|
|
148
|
+
return function() {
|
|
149
|
+
return t;
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
function qe(t) {
|
|
153
|
+
t.x0 = Math.round(t.x0), t.y0 = Math.round(t.y0), t.x1 = Math.round(t.x1), t.y1 = Math.round(t.y1);
|
|
154
|
+
}
|
|
155
|
+
function je(t, a, n, r, i) {
|
|
156
|
+
for (var s = t.children, c, p = -1, f = s.length, o = t.value && (r - a) / t.value; ++p < f; )
|
|
157
|
+
c = s[p], c.y0 = n, c.y1 = i, c.x0 = a, c.x1 = a += c.value * o;
|
|
158
|
+
}
|
|
159
|
+
function Ue(t, a, n, r, i) {
|
|
160
|
+
for (var s = t.children, c, p = -1, f = s.length, o = t.value && (i - n) / t.value; ++p < f; )
|
|
161
|
+
c = s[p], c.x0 = a, c.x1 = r, c.y0 = n, c.y1 = n += c.value * o;
|
|
162
|
+
}
|
|
163
|
+
var Ye = (1 + Math.sqrt(5)) / 2;
|
|
164
|
+
function Ke(t, a, n, r, i, s) {
|
|
165
|
+
for (var c = [], p = a.children, f, o, u = 0, x = 0, l = p.length, v, y, S = a.value, d, m, M, N, z, B, _; u < l; ) {
|
|
166
|
+
v = i - n, y = s - r;
|
|
167
|
+
do
|
|
168
|
+
d = p[x++].value;
|
|
169
|
+
while (!d && x < l);
|
|
170
|
+
for (m = M = d, B = Math.max(y / v, v / y) / (S * t), _ = d * d * B, z = Math.max(M / _, _ / m); x < l; ++x) {
|
|
171
|
+
if (d += o = p[x].value, o < m && (m = o), o > M && (M = o), _ = d * d * B, N = Math.max(M / _, _ / m), N > z) {
|
|
172
|
+
d -= o;
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
z = N;
|
|
176
|
+
}
|
|
177
|
+
c.push(f = {
|
|
178
|
+
value: d,
|
|
179
|
+
dice: v < y,
|
|
180
|
+
children: p.slice(u, x)
|
|
181
|
+
}), f.dice ? je(f, n, r, i, S ? r += y * d / S : s) : Ue(f, n, r, S ? n += v * d / S : i, s), S -= d, u = x;
|
|
182
|
+
}
|
|
183
|
+
return c;
|
|
184
|
+
}
|
|
185
|
+
var Xe = (function t(a) {
|
|
186
|
+
function n(r, i, s, c, p) {
|
|
187
|
+
Ke(a, r, i, s, c, p);
|
|
188
|
+
}
|
|
189
|
+
return n.ratio = function(r) {
|
|
190
|
+
return t((r = +r) > 1 ? r : 1);
|
|
191
|
+
}, n;
|
|
192
|
+
})(Ye);
|
|
193
|
+
function Ze() {
|
|
194
|
+
var t = Xe, a = !1, n = 1, r = 1, i = [0], s = W, c = W, p = W, f = W, o = W;
|
|
195
|
+
function u(l) {
|
|
196
|
+
return l.x0 = l.y0 = 0, l.x1 = n, l.y1 = r, l.eachBefore(x), i = [0], a && l.eachBefore(qe), l;
|
|
197
|
+
}
|
|
198
|
+
function x(l) {
|
|
199
|
+
var v = i[l.depth], y = l.x0 + v, S = l.y0 + v, d = l.x1 - v, m = l.y1 - v;
|
|
200
|
+
d < y && (y = d = (y + d) / 2), m < S && (S = m = (S + m) / 2), l.x0 = y, l.y0 = S, l.x1 = d, l.y1 = m, l.children && (v = i[l.depth + 1] = s(l) / 2, y += o(l) - v, S += c(l) - v, d -= p(l) - v, m -= f(l) - v, d < y && (y = d = (y + d) / 2), m < S && (S = m = (S + m) / 2), t(l, y, S, d, m));
|
|
201
|
+
}
|
|
202
|
+
return u.round = function(l) {
|
|
203
|
+
return arguments.length ? (a = !!l, u) : a;
|
|
204
|
+
}, u.size = function(l) {
|
|
205
|
+
return arguments.length ? (n = +l[0], r = +l[1], u) : [n, r];
|
|
206
|
+
}, u.tile = function(l) {
|
|
207
|
+
return arguments.length ? (t = Oe(l), u) : t;
|
|
208
|
+
}, u.padding = function(l) {
|
|
209
|
+
return arguments.length ? u.paddingInner(l).paddingOuter(l) : u.paddingInner();
|
|
210
|
+
}, u.paddingInner = function(l) {
|
|
211
|
+
return arguments.length ? (s = typeof l == "function" ? l : H(+l), u) : s;
|
|
212
|
+
}, u.paddingOuter = function(l) {
|
|
213
|
+
return arguments.length ? u.paddingTop(l).paddingRight(l).paddingBottom(l).paddingLeft(l) : u.paddingTop();
|
|
214
|
+
}, u.paddingTop = function(l) {
|
|
215
|
+
return arguments.length ? (c = typeof l == "function" ? l : H(+l), u) : c;
|
|
216
|
+
}, u.paddingRight = function(l) {
|
|
217
|
+
return arguments.length ? (p = typeof l == "function" ? l : H(+l), u) : p;
|
|
218
|
+
}, u.paddingBottom = function(l) {
|
|
219
|
+
return arguments.length ? (f = typeof l == "function" ? l : H(+l), u) : f;
|
|
220
|
+
}, u.paddingLeft = function(l) {
|
|
221
|
+
return arguments.length ? (o = typeof l == "function" ? l : H(+l), u) : o;
|
|
222
|
+
}, u;
|
|
223
|
+
}
|
|
224
|
+
var re = class {
|
|
225
|
+
constructor() {
|
|
226
|
+
this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = de, this.getAccTitle = ve, this.setDiagramTitle = ue, this.getDiagramTitle = Se, this.getAccDescription = ye, this.setAccDescription = pe;
|
|
227
|
+
}
|
|
228
|
+
static {
|
|
229
|
+
$(this, "TreeMapDB");
|
|
230
|
+
}
|
|
231
|
+
getNodes() {
|
|
232
|
+
return this.nodes;
|
|
233
|
+
}
|
|
234
|
+
getConfig() {
|
|
235
|
+
const t = ge, a = ee();
|
|
236
|
+
return Q({
|
|
237
|
+
...t.treemap,
|
|
238
|
+
...a.treemap ?? {}
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
addNode(t, a) {
|
|
242
|
+
this.nodes.push(t), this.levels.set(t, a), a === 0 && (this.outerNodes.push(t), this.root ??= t);
|
|
243
|
+
}
|
|
244
|
+
getRoot() {
|
|
245
|
+
return {
|
|
246
|
+
name: "",
|
|
247
|
+
children: this.outerNodes
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
addClass(t, a) {
|
|
251
|
+
const n = this.classes.get(t) ?? {
|
|
252
|
+
id: t,
|
|
253
|
+
styles: [],
|
|
254
|
+
textStyles: []
|
|
255
|
+
}, r = a.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
|
|
256
|
+
r && r.forEach((i) => {
|
|
257
|
+
Ce(i) && (n?.textStyles ? n.textStyles.push(i) : n.textStyles = [i]), n?.styles ? n.styles.push(i) : n.styles = [i];
|
|
258
|
+
}), this.classes.set(t, n);
|
|
259
|
+
}
|
|
260
|
+
getClasses() {
|
|
261
|
+
return this.classes;
|
|
262
|
+
}
|
|
263
|
+
getStylesForClass(t) {
|
|
264
|
+
return this.classes.get(t)?.styles ?? [];
|
|
265
|
+
}
|
|
266
|
+
clear() {
|
|
267
|
+
fe(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
function le(t) {
|
|
271
|
+
if (!t.length) return [];
|
|
272
|
+
const a = [], n = [];
|
|
273
|
+
return t.forEach((r) => {
|
|
274
|
+
const i = {
|
|
275
|
+
name: r.name,
|
|
276
|
+
children: r.type === "Leaf" ? void 0 : []
|
|
277
|
+
};
|
|
278
|
+
for (i.classSelector = r?.classSelector, r?.cssCompiledStyles && (i.cssCompiledStyles = r.cssCompiledStyles), r.type === "Leaf" && r.value !== void 0 && (i.value = r.value); n.length > 0 && n[n.length - 1].level >= r.level; ) n.pop();
|
|
279
|
+
if (n.length === 0) a.push(i);
|
|
280
|
+
else {
|
|
281
|
+
const s = n[n.length - 1].node;
|
|
282
|
+
s.children ? s.children.push(i) : s.children = [i];
|
|
283
|
+
}
|
|
284
|
+
r.type !== "Leaf" && n.push({
|
|
285
|
+
node: i,
|
|
286
|
+
level: r.level
|
|
287
|
+
});
|
|
288
|
+
}), a;
|
|
289
|
+
}
|
|
290
|
+
$(le, "buildHierarchy");
|
|
291
|
+
var Je = /* @__PURE__ */ $((t, a) => {
|
|
292
|
+
we(t, a);
|
|
293
|
+
const n = [];
|
|
294
|
+
for (const s of t.TreemapRows ?? []) s.$type === "ClassDefStatement" && a.addClass(s.className ?? "", s.styleText ?? "");
|
|
295
|
+
for (const s of t.TreemapRows ?? []) {
|
|
296
|
+
const c = s.item;
|
|
297
|
+
if (!c) continue;
|
|
298
|
+
const p = s.indent ? parseInt(s.indent) : 0, f = Qe(c), o = c.classSelector ? a.getStylesForClass(c.classSelector) : [], u = o.length > 0 ? o : void 0, x = {
|
|
299
|
+
level: p,
|
|
300
|
+
name: f,
|
|
301
|
+
type: c.$type,
|
|
302
|
+
value: c.value,
|
|
303
|
+
classSelector: c.classSelector,
|
|
304
|
+
cssCompiledStyles: u
|
|
305
|
+
};
|
|
306
|
+
n.push(x);
|
|
307
|
+
}
|
|
308
|
+
const r = le(n), i = /* @__PURE__ */ $((s, c) => {
|
|
309
|
+
for (const p of s)
|
|
310
|
+
a.addNode(p, c), p.children && p.children.length > 0 && i(p.children, c + 1);
|
|
311
|
+
}, "addNodesRecursively");
|
|
312
|
+
i(r, 0);
|
|
313
|
+
}, "populate"), Qe = /* @__PURE__ */ $((t) => t.name ? String(t.name) : "", "getItemName"), se = {
|
|
314
|
+
parser: { yy: void 0 },
|
|
315
|
+
parse: /* @__PURE__ */ $(async (t) => {
|
|
316
|
+
try {
|
|
317
|
+
const a = await ce("treemap", t);
|
|
318
|
+
J.debug("Treemap AST:", a);
|
|
319
|
+
const n = se.parser?.yy;
|
|
320
|
+
if (!(n instanceof re)) throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
|
|
321
|
+
Je(a, n);
|
|
322
|
+
} catch (a) {
|
|
323
|
+
throw J.error("Error parsing treemap:", a), a;
|
|
324
|
+
}
|
|
325
|
+
}, "parse")
|
|
326
|
+
}, et = 10, P = 10, G = 25, tt = {
|
|
327
|
+
draw: /* @__PURE__ */ $((t, a, n, r) => {
|
|
328
|
+
const i = r.db, s = i.getConfig(), c = s.padding ?? et, p = i.getDiagramTitle(), f = i.getRoot(), { themeVariables: o } = ee();
|
|
329
|
+
if (!f) return;
|
|
330
|
+
const u = p ? 30 : 0, x = xe(a), l = s.nodeWidth ? s.nodeWidth * P : 960, v = s.nodeHeight ? s.nodeHeight * P : 500, y = l, S = v + u;
|
|
331
|
+
x.attr("viewBox", `0 0 ${y} ${S}`), me(x, S, y, s.useMaxWidth);
|
|
332
|
+
let d;
|
|
333
|
+
try {
|
|
334
|
+
const e = s.valueFormat || ",";
|
|
335
|
+
if (e === "$0,0") d = /* @__PURE__ */ $((h) => "$" + R(",")(h), "valueFormat");
|
|
336
|
+
else if (e.startsWith("$") && e.includes(",")) {
|
|
337
|
+
const h = /\.\d+/.exec(e), b = h ? h[0] : "";
|
|
338
|
+
d = /* @__PURE__ */ $((L) => "$" + R("," + b)(L), "valueFormat");
|
|
339
|
+
} else if (e.startsWith("$")) {
|
|
340
|
+
const h = e.substring(1);
|
|
341
|
+
d = /* @__PURE__ */ $((b) => "$" + R(h || "")(b), "valueFormat");
|
|
342
|
+
} else d = R(e);
|
|
343
|
+
} catch (e) {
|
|
344
|
+
J.error("Error creating format function:", e), d = R(",");
|
|
345
|
+
}
|
|
346
|
+
const m = Z().range([
|
|
347
|
+
"transparent",
|
|
348
|
+
o.cScale0,
|
|
349
|
+
o.cScale1,
|
|
350
|
+
o.cScale2,
|
|
351
|
+
o.cScale3,
|
|
352
|
+
o.cScale4,
|
|
353
|
+
o.cScale5,
|
|
354
|
+
o.cScale6,
|
|
355
|
+
o.cScale7,
|
|
356
|
+
o.cScale8,
|
|
357
|
+
o.cScale9,
|
|
358
|
+
o.cScale10,
|
|
359
|
+
o.cScale11
|
|
360
|
+
]), M = Z().range([
|
|
361
|
+
"transparent",
|
|
362
|
+
o.cScalePeer0,
|
|
363
|
+
o.cScalePeer1,
|
|
364
|
+
o.cScalePeer2,
|
|
365
|
+
o.cScalePeer3,
|
|
366
|
+
o.cScalePeer4,
|
|
367
|
+
o.cScalePeer5,
|
|
368
|
+
o.cScalePeer6,
|
|
369
|
+
o.cScalePeer7,
|
|
370
|
+
o.cScalePeer8,
|
|
371
|
+
o.cScalePeer9,
|
|
372
|
+
o.cScalePeer10,
|
|
373
|
+
o.cScalePeer11
|
|
374
|
+
]), N = Z().range([
|
|
375
|
+
o.cScaleLabel0,
|
|
376
|
+
o.cScaleLabel1,
|
|
377
|
+
o.cScaleLabel2,
|
|
378
|
+
o.cScaleLabel3,
|
|
379
|
+
o.cScaleLabel4,
|
|
380
|
+
o.cScaleLabel5,
|
|
381
|
+
o.cScaleLabel6,
|
|
382
|
+
o.cScaleLabel7,
|
|
383
|
+
o.cScaleLabel8,
|
|
384
|
+
o.cScaleLabel9,
|
|
385
|
+
o.cScaleLabel10,
|
|
386
|
+
o.cScaleLabel11
|
|
387
|
+
]);
|
|
388
|
+
p && x.append("text").attr("x", y / 2).attr("y", u / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(p);
|
|
389
|
+
const z = x.append("g").attr("transform", `translate(0, ${u})`).attr("class", "treemapContainer"), B = te(f).sum((e) => e.value ?? 0).sort((e, h) => (h.value ?? 0) - (e.value ?? 0)), _ = Ze().size([l, v]).paddingTop((e) => e.children && e.children.length > 0 ? G + P : 0).paddingInner(c).paddingLeft((e) => e.children && e.children.length > 0 ? P : 0).paddingRight((e) => e.children && e.children.length > 0 ? P : 0).paddingBottom((e) => e.children && e.children.length > 0 ? P : 0).round(!0)(B), ie = _.descendants().filter((e) => e.children && e.children.length > 0), E = z.selectAll(".treemapSection").data(ie).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
390
|
+
E.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", G).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), E.append("clipPath").attr("id", (e, h) => `clip-section-${a}-${h}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", G), E.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, h) => `treemapSection section${h}`).attr("fill", (e) => m(e.data.name)).attr("fill-opacity", 0.6).attr("stroke", (e) => M(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (e) => {
|
|
391
|
+
if (e.depth === 0) return "display: none;";
|
|
392
|
+
const h = V({ cssCompiledStyles: e.data.cssCompiledStyles });
|
|
393
|
+
return h.nodeStyles + ";" + h.borderStyles.join(";");
|
|
394
|
+
}), E.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", G / 2).attr("dominant-baseline", "middle").text((e) => e.depth === 0 ? "" : e.data.name).attr("font-weight", "bold").attr("clip-path", (e, h) => `url(#clip-section-${a}-${h})`).attr("style", (e) => e.depth === 0 ? "display: none;" : "dominant-baseline: middle; font-size: 12px; fill:" + N(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" + V({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).each(function(e) {
|
|
395
|
+
if (e.depth === 0) return;
|
|
396
|
+
const h = j(this), b = e.data.name;
|
|
397
|
+
h.text(b);
|
|
398
|
+
const L = e.x1 - e.x0, F = 6;
|
|
399
|
+
let T;
|
|
400
|
+
s.showValues !== !1 && e.value ? T = L - 10 - 30 - 10 - F : T = L - F - 6;
|
|
401
|
+
const C = Math.max(15, T), g = h.node();
|
|
402
|
+
if (g.getComputedTextLength() > C) {
|
|
403
|
+
let w = b;
|
|
404
|
+
for (; w.length > 0; ) {
|
|
405
|
+
if (w = b.substring(0, w.length - 1), w.length === 0) {
|
|
406
|
+
h.text("..."), g.getComputedTextLength() > C && h.text("");
|
|
407
|
+
break;
|
|
408
|
+
}
|
|
409
|
+
if (h.text(w + "..."), g.getComputedTextLength() <= C) break;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}), s.showValues !== !1 && E.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y", G / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((e) => e.value ? d(e.value) : "").attr("font-style", "italic").attr("style", (e) => e.depth === 0 ? "display: none;" : "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + N(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" + V({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:"));
|
|
413
|
+
const ae = _.leaves(), k = ae.length > 20, oe = k ? 16 : 38, O = k ? 14 : 28, A = k ? 4 : 8, D = k ? 4 : 6, Y = k ? 2 : 4, ne = k ? 8 : 10, K = k ? 1 : 2, q = z.selectAll(".treemapLeafGroup").data(ae).enter().append("g").attr("class", (e, h) => `treemapNode treemapLeafGroup leaf${h}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
|
|
414
|
+
q.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? m(e.parent.data.name) : m(e.data.name)).attr("style", (e) => V({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (e) => e.parent ? m(e.parent.data.name) : m(e.data.name)).attr("stroke-width", 3), q.append("clipPath").attr("id", (e, h) => `clip-${a}-${h}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), q.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => `text-anchor: middle; dominant-baseline: middle; font-size: ${oe}px;fill:` + N(e.data.name) + ";" + V({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).attr("clip-path", (e, h) => `url(#clip-${a}-${h})`).text((e) => e.data.name).each(function(e) {
|
|
415
|
+
const h = j(this), b = e.x1 - e.x0, L = e.y1 - e.y0, F = h.node(), T = b - 2 * Y, C = L - 2 * Y;
|
|
416
|
+
if (T < ne || C < ne) {
|
|
417
|
+
h.style("display", "none");
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
let g = parseInt(h.style("font-size"), 10);
|
|
421
|
+
const I = 0.6;
|
|
422
|
+
for (; F.getComputedTextLength() > T && g > A; )
|
|
423
|
+
g--, h.style("font-size", `${g}px`);
|
|
424
|
+
let w = Math.max(D, Math.min(O, Math.round(g * I))), X = g + K + w;
|
|
425
|
+
for (; X > C && g > A && (g--, w = Math.max(D, Math.min(O, Math.round(g * I))), !(w < D && g === A)); )
|
|
426
|
+
h.style("font-size", `${g}px`), X = g + K + w, w <= D && X > C;
|
|
427
|
+
h.style("font-size", `${g}px`), k ? (g < A || C < A) && h.style("display", "none") : (F.getComputedTextLength() > T || g < A || C < g) && h.style("display", "none");
|
|
428
|
+
}), s.showValues !== !1 && q.append("text").attr("class", "treemapValue").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", function(e) {
|
|
429
|
+
return (e.y1 - e.y0) / 2;
|
|
430
|
+
}).attr("style", (e) => `text-anchor: middle; dominant-baseline: hanging; font-size: ${O}px;fill:` + N(e.data.name) + ";" + V({ cssCompiledStyles: e.data.cssCompiledStyles }).labelStyles.replace("color:", "fill:")).attr("clip-path", (e, h) => `url(#clip-${a}-${h})`).text((e) => e.value ? d(e.value) : "").each(function(e) {
|
|
431
|
+
const h = j(this), b = this.parentNode;
|
|
432
|
+
if (!b) {
|
|
433
|
+
h.style("display", "none");
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
const L = j(b).select(".treemapLabel");
|
|
437
|
+
if (L.empty() || L.style("display") === "none") {
|
|
438
|
+
h.style("display", "none");
|
|
439
|
+
return;
|
|
440
|
+
}
|
|
441
|
+
const F = parseFloat(L.style("font-size")), T = Math.max(D, Math.min(O, Math.round(F * 0.6)));
|
|
442
|
+
h.style("font-size", `${T}px`);
|
|
443
|
+
const C = (e.y1 - e.y0) / 2 + F / 2 + K;
|
|
444
|
+
h.attr("y", C);
|
|
445
|
+
const g = e.x1 - e.x0, I = e.y1 - e.y0 - 4, w = g - 2 * Y;
|
|
446
|
+
h.node().getComputedTextLength() > w || C + T > I || T < D ? h.style("display", "none") : h.style("display", null);
|
|
447
|
+
}), be(x, s.diagramPadding ?? 8, "flowchart", s?.useMaxWidth || !1);
|
|
448
|
+
}, "draw"),
|
|
449
|
+
getClasses: /* @__PURE__ */ $(function(t, a) {
|
|
450
|
+
return a.db.getClasses();
|
|
451
|
+
}, "getClasses")
|
|
452
|
+
}, at = {
|
|
453
|
+
sectionStrokeColor: "black",
|
|
454
|
+
sectionStrokeWidth: "1",
|
|
455
|
+
sectionFillColor: "#efefef",
|
|
456
|
+
leafStrokeColor: "black",
|
|
457
|
+
leafStrokeWidth: "1",
|
|
458
|
+
leafFillColor: "#efefef",
|
|
459
|
+
labelFontSize: "12px",
|
|
460
|
+
valueFontSize: "10px",
|
|
461
|
+
titleFontSize: "14px"
|
|
462
|
+
}, ft = {
|
|
463
|
+
parser: se,
|
|
464
|
+
get db() {
|
|
465
|
+
return new re();
|
|
466
|
+
},
|
|
467
|
+
renderer: tt,
|
|
468
|
+
styles: /* @__PURE__ */ $(({ treemap: t } = {}) => {
|
|
469
|
+
const a = Q(he(), ee().themeVariables), n = Q(at, t), r = n.titleColor ?? a.titleColor, i = n.labelColor ?? a.textColor, s = n.valueColor ?? a.textColor;
|
|
470
|
+
return `
|
|
471
|
+
.treemapNode.section {
|
|
472
|
+
stroke: ${n.sectionStrokeColor};
|
|
473
|
+
stroke-width: ${n.sectionStrokeWidth};
|
|
474
|
+
fill: ${n.sectionFillColor};
|
|
475
|
+
}
|
|
476
|
+
.treemapNode.leaf {
|
|
477
|
+
stroke: ${n.leafStrokeColor};
|
|
478
|
+
stroke-width: ${n.leafStrokeWidth};
|
|
479
|
+
fill: ${n.leafFillColor};
|
|
480
|
+
}
|
|
481
|
+
.treemapLabel {
|
|
482
|
+
fill: ${i};
|
|
483
|
+
font-size: ${n.labelFontSize};
|
|
484
|
+
}
|
|
485
|
+
.treemapValue {
|
|
486
|
+
fill: ${s};
|
|
487
|
+
font-size: ${n.valueFontSize};
|
|
488
|
+
}
|
|
489
|
+
.treemapTitle {
|
|
490
|
+
fill: ${r};
|
|
491
|
+
font-size: ${n.titleFontSize};
|
|
492
|
+
}
|
|
493
|
+
`;
|
|
494
|
+
}, "getStyles")
|
|
495
|
+
};
|
|
496
|
+
export {
|
|
497
|
+
ft as diagram
|
|
498
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const C=require("./mermaid-parser.core-DYumW1vq.cjs"),b=require("./chunk-Y2CYZVJY-DPaYLFFP.cjs"),m=require("./src-C9EhKhbk.cjs"),d=require("./chunk-WYO6CB5R-u4mJNOcO.cjs"),w=require("./chunk-ICXQ74PX-BbT9JaEW.cjs"),B=require("./chunk-VAUOI2AC-DfQf5L2_.cjs"),$=require("./chunk-JWPE2WC7-D8EnWK1B.cjs");var S=d.defaultConfig_default.packet,_=class{constructor(){this.packet=[],this.setAccTitle=d.setAccTitle,this.getAccTitle=d.getAccTitle,this.setDiagramTitle=d.setDiagramTitle,this.getDiagramTitle=d.getDiagramTitle,this.getAccDescription=d.getAccDescription,this.setAccDescription=d.setAccDescription}static{b.__name(this,"PacketDB")}getConfig(){const t=w.cleanAndMerge({...S,...d.getConfig().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){d.clear(),this.packet=[]}},P=1e4,q=b.__name((t,e)=>{$.populateCommonDb(t,e);let a=-1,i=[],s=1;const{bitsPerRow:c}=e.getConfig();for(let{start:r,end:n,bits:p,label:l}of t.blocks){if(r!==void 0&&n!==void 0&&n<r)throw new Error(`Packet block ${r} - ${n} is invalid. End must be greater than start.`);if(r??=a+1,r!==a+1)throw new Error(`Packet block ${r} - ${n??r} is not contiguous. It should start from ${a+1}.`);if(p===0)throw new Error(`Packet block ${r} is invalid. Cannot have a zero bit field.`);for(n??=r+(p??1)-1,p??=n-r+1,a=n,m.log.debug(`Packet block ${r} - ${a} with label ${l}`);i.length<=c+1&&e.getPacket().length<P;){const[h,o]=A({start:r,end:n,bits:p,label:l},s,c);if(i.push(h),h.end+1===s*c&&(e.pushWord(i),i=[],s++),!o)break;({start:r,end:n,bits:p,label:l}=o)}}e.pushWord(i)},"populate"),A=b.__name((t,e,a)=>{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*a)return[t,void 0];const i=e*a-1,s=e*a;return[{start:t.start,end:i,label:t.label,bits:i-t.start},{start:s,end:t.end,label:t.label,bits:t.end-s}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:b.__name(async t=>{const e=await C.parse("packet",t),a=v.parser?.yy;if(!(a instanceof _))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");m.log.debug(e),q(e,a)},"parse")},D=b.__name((t,e,a,i)=>{const s=i.db,c=s.getConfig(),{rowHeight:r,paddingY:n,bitWidth:p,bitsPerRow:l}=c,h=s.getPacket(),o=s.getDiagramTitle(),u=r+n,g=u*(h.length+1)-(o?0:r),k=p*l+2,f=B.selectSvgElement(e);f.attr("viewBox",`0 0 ${k} ${g}`),d.configureSvgSize(f,g,k,c.useMaxWidth);for(const[x,y]of h.entries())T(f,y,x,c);f.append("text").text(o).attr("x",k/2).attr("y",g-u/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),T=b.__name((t,e,a,{rowHeight:i,paddingX:s,paddingY:c,bitWidth:r,bitsPerRow:n,showBits:p})=>{const l=t.append("g"),h=a*(i+c)+c;for(const o of e){const u=o.start%n*r+1,g=(o.end-o.start+1)*r-s;if(l.append("rect").attr("x",u).attr("y",h).attr("width",g).attr("height",i).attr("class","packetBlock"),l.append("text").attr("x",u+g/2).attr("y",h+i/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!p)continue;const k=o.end===o.start,f=h-2;l.append("text").attr("x",u+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||l.append("text").attr("x",u+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),E={draw:D},z={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},F={parser:v,get db(){return new _},renderer:E,styles:b.__name(({packet:t}={})=>{const e=w.cleanAndMerge(z,t);return`
|
|
2
|
+
.packetByte {
|
|
3
|
+
font-size: ${e.byteFontSize};
|
|
4
|
+
}
|
|
5
|
+
.packetByte.start {
|
|
6
|
+
fill: ${e.startByteColor};
|
|
7
|
+
}
|
|
8
|
+
.packetByte.end {
|
|
9
|
+
fill: ${e.endByteColor};
|
|
10
|
+
}
|
|
11
|
+
.packetLabel {
|
|
12
|
+
fill: ${e.labelColor};
|
|
13
|
+
font-size: ${e.labelFontSize};
|
|
14
|
+
}
|
|
15
|
+
.packetTitle {
|
|
16
|
+
fill: ${e.titleColor};
|
|
17
|
+
font-size: ${e.titleFontSize};
|
|
18
|
+
}
|
|
19
|
+
.packetBlock {
|
|
20
|
+
stroke: ${e.blockStrokeColor};
|
|
21
|
+
stroke-width: ${e.blockStrokeWidth};
|
|
22
|
+
fill: ${e.blockFillColor};
|
|
23
|
+
}
|
|
24
|
+
`},"styles")};exports.diagram=F;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { n as $ } from "./mermaid-parser.core-uIDZYuBu.js";
|
|
2
|
+
import { n as m } from "./chunk-Y2CYZVJY-0JxdZxki.js";
|
|
3
|
+
import { m as b } from "./src-DtRLxcYO.js";
|
|
4
|
+
import { H as B, K as C, U as S, a as D, b as T, c as P, f as z, v as E, w as F, y as A } from "./chunk-WYO6CB5R-DDHkKowO.js";
|
|
5
|
+
import { i as u } from "./chunk-ICXQ74PX-DR8rL-xF.js";
|
|
6
|
+
import { t as W } from "./chunk-VAUOI2AC-izt0o4id.js";
|
|
7
|
+
import { t as _ } from "./chunk-JWPE2WC7-CGEmUMMZ.js";
|
|
8
|
+
var N = z.packet, w = class {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.packet = [], this.setAccTitle = S, this.getAccTitle = A, this.setDiagramTitle = C, this.getDiagramTitle = F, this.getAccDescription = E, this.setAccDescription = B;
|
|
11
|
+
}
|
|
12
|
+
static {
|
|
13
|
+
m(this, "PacketDB");
|
|
14
|
+
}
|
|
15
|
+
getConfig() {
|
|
16
|
+
const t = u({
|
|
17
|
+
...N,
|
|
18
|
+
...T().packet
|
|
19
|
+
});
|
|
20
|
+
return t.showBits && (t.paddingY += 10), t;
|
|
21
|
+
}
|
|
22
|
+
getPacket() {
|
|
23
|
+
return this.packet;
|
|
24
|
+
}
|
|
25
|
+
pushWord(t) {
|
|
26
|
+
t.length > 0 && this.packet.push(t);
|
|
27
|
+
}
|
|
28
|
+
clear() {
|
|
29
|
+
D(), this.packet = [];
|
|
30
|
+
}
|
|
31
|
+
}, L = 1e4, M = /* @__PURE__ */ m((t, e) => {
|
|
32
|
+
_(t, e);
|
|
33
|
+
let r = -1, o = [], n = 1;
|
|
34
|
+
const { bitsPerRow: l } = e.getConfig();
|
|
35
|
+
for (let { start: a, end: i, bits: d, label: c } of t.blocks) {
|
|
36
|
+
if (a !== void 0 && i !== void 0 && i < a) throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);
|
|
37
|
+
if (a ??= r + 1, a !== r + 1) throw new Error(`Packet block ${a} - ${i ?? a} is not contiguous. It should start from ${r + 1}.`);
|
|
38
|
+
if (d === 0) throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);
|
|
39
|
+
for (i ??= a + (d ?? 1) - 1, d ??= i - a + 1, r = i, b.debug(`Packet block ${a} - ${r} with label ${c}`); o.length <= l + 1 && e.getPacket().length < L; ) {
|
|
40
|
+
const [p, s] = Y({
|
|
41
|
+
start: a,
|
|
42
|
+
end: i,
|
|
43
|
+
bits: d,
|
|
44
|
+
label: c
|
|
45
|
+
}, n, l);
|
|
46
|
+
if (o.push(p), p.end + 1 === n * l && (e.pushWord(o), o = [], n++), !s) break;
|
|
47
|
+
({ start: a, end: i, bits: d, label: c } = s);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
e.pushWord(o);
|
|
51
|
+
}, "populate"), Y = /* @__PURE__ */ m((t, e, r) => {
|
|
52
|
+
if (t.start === void 0) throw new Error("start should have been set during first phase");
|
|
53
|
+
if (t.end === void 0) throw new Error("end should have been set during first phase");
|
|
54
|
+
if (t.start > t.end) throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);
|
|
55
|
+
if (t.end + 1 <= e * r) return [t, void 0];
|
|
56
|
+
const o = e * r - 1, n = e * r;
|
|
57
|
+
return [{
|
|
58
|
+
start: t.start,
|
|
59
|
+
end: o,
|
|
60
|
+
label: t.label,
|
|
61
|
+
bits: o - t.start
|
|
62
|
+
}, {
|
|
63
|
+
start: n,
|
|
64
|
+
end: t.end,
|
|
65
|
+
label: t.label,
|
|
66
|
+
bits: t.end - n
|
|
67
|
+
}];
|
|
68
|
+
}, "getNextFittingBlock"), v = {
|
|
69
|
+
parser: { yy: void 0 },
|
|
70
|
+
parse: /* @__PURE__ */ m(async (t) => {
|
|
71
|
+
const e = await $("packet", t), r = v.parser?.yy;
|
|
72
|
+
if (!(r instanceof w)) throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
|
|
73
|
+
b.debug(e), M(e, r);
|
|
74
|
+
}, "parse")
|
|
75
|
+
}, H = /* @__PURE__ */ m((t, e, r, o) => {
|
|
76
|
+
const n = o.db, l = n.getConfig(), { rowHeight: a, paddingY: i, bitWidth: d, bitsPerRow: c } = l, p = n.getPacket(), s = n.getDiagramTitle(), h = a + i, g = h * (p.length + 1) - (s ? 0 : a), f = d * c + 2, k = W(e);
|
|
77
|
+
k.attr("viewBox", `0 0 ${f} ${g}`), P(k, g, f, l.useMaxWidth);
|
|
78
|
+
for (const [x, y] of p.entries()) I(k, y, x, l);
|
|
79
|
+
k.append("text").text(s).attr("x", f / 2).attr("y", g - h / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
|
|
80
|
+
}, "draw"), I = /* @__PURE__ */ m((t, e, r, { rowHeight: o, paddingX: n, paddingY: l, bitWidth: a, bitsPerRow: i, showBits: d }) => {
|
|
81
|
+
const c = t.append("g"), p = r * (o + l) + l;
|
|
82
|
+
for (const s of e) {
|
|
83
|
+
const h = s.start % i * a + 1, g = (s.end - s.start + 1) * a - n;
|
|
84
|
+
if (c.append("rect").attr("x", h).attr("y", p).attr("width", g).attr("height", o).attr("class", "packetBlock"), c.append("text").attr("x", h + g / 2).attr("y", p + o / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(s.label), !d) continue;
|
|
85
|
+
const f = s.end === s.start, k = p - 2;
|
|
86
|
+
c.append("text").attr("x", h + (f ? g / 2 : 0)).attr("y", k).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", f ? "middle" : "start").text(s.start), f || c.append("text").attr("x", h + g).attr("y", k).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(s.end);
|
|
87
|
+
}
|
|
88
|
+
}, "drawWord"), K = { draw: H }, O = {
|
|
89
|
+
byteFontSize: "10px",
|
|
90
|
+
startByteColor: "black",
|
|
91
|
+
endByteColor: "black",
|
|
92
|
+
labelColor: "black",
|
|
93
|
+
labelFontSize: "12px",
|
|
94
|
+
titleColor: "black",
|
|
95
|
+
titleFontSize: "14px",
|
|
96
|
+
blockStrokeColor: "black",
|
|
97
|
+
blockStrokeWidth: "1",
|
|
98
|
+
blockFillColor: "#efefef"
|
|
99
|
+
}, Q = {
|
|
100
|
+
parser: v,
|
|
101
|
+
get db() {
|
|
102
|
+
return new w();
|
|
103
|
+
},
|
|
104
|
+
renderer: K,
|
|
105
|
+
styles: /* @__PURE__ */ m(({ packet: t } = {}) => {
|
|
106
|
+
const e = u(O, t);
|
|
107
|
+
return `
|
|
108
|
+
.packetByte {
|
|
109
|
+
font-size: ${e.byteFontSize};
|
|
110
|
+
}
|
|
111
|
+
.packetByte.start {
|
|
112
|
+
fill: ${e.startByteColor};
|
|
113
|
+
}
|
|
114
|
+
.packetByte.end {
|
|
115
|
+
fill: ${e.endByteColor};
|
|
116
|
+
}
|
|
117
|
+
.packetLabel {
|
|
118
|
+
fill: ${e.labelColor};
|
|
119
|
+
font-size: ${e.labelFontSize};
|
|
120
|
+
}
|
|
121
|
+
.packetTitle {
|
|
122
|
+
fill: ${e.titleColor};
|
|
123
|
+
font-size: ${e.titleFontSize};
|
|
124
|
+
}
|
|
125
|
+
.packetBlock {
|
|
126
|
+
stroke: ${e.blockStrokeColor};
|
|
127
|
+
stroke-width: ${e.blockStrokeWidth};
|
|
128
|
+
fill: ${e.blockFillColor};
|
|
129
|
+
}
|
|
130
|
+
`;
|
|
131
|
+
}, "styles")
|
|
132
|
+
};
|
|
133
|
+
export {
|
|
134
|
+
Q as diagram
|
|
135
|
+
};
|