@sme.up/ketchup2 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/arc-CqG9Hxdf.cjs +1 -0
- package/dist/arc-Klgb378K.js +80 -0
- package/dist/architecture-YZFGNWBL-BRqToLcm.js +3 -0
- package/dist/architecture-YZFGNWBL-BTOWQWD9.cjs +1 -0
- package/dist/architectureDiagram-Q4EWVU46-CX_6DnSJ.cjs +36 -0
- package/dist/architectureDiagram-Q4EWVU46-CnzjcVBn.js +4057 -0
- package/dist/array-D8NZ46Ht.js +6 -0
- package/dist/array-Dxz0O8Q3.cjs +1 -0
- package/dist/assets/buttonListAssets.d.ts +8 -0
- package/dist/assets/buttonListAssets.d.ts.map +1 -1
- package/dist/assets/imageListAssets.d.ts +3 -1
- package/dist/assets/imageListAssets.d.ts.map +1 -1
- package/dist/basic-components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/basic-components/button/button-types.d.ts +4 -0
- package/dist/basic-components/button/button-types.d.ts.map +1 -1
- package/dist/basic-components/button-dropdown/button-dropdown-types.d.ts +16 -0
- package/dist/basic-components/button-dropdown/button-dropdown-types.d.ts.map +1 -0
- package/dist/basic-components/button-dropdown/button-dropdown.d.ts +4 -0
- package/dist/basic-components/button-dropdown/button-dropdown.d.ts.map +1 -0
- package/dist/basic-components/button-list/button-list-types.d.ts +6 -0
- package/dist/basic-components/button-list/button-list-types.d.ts.map +1 -1
- package/dist/basic-components/button-list/button-list.d.ts.map +1 -1
- package/dist/basic-components/cell/cell-utils.d.ts +11 -4
- package/dist/basic-components/cell/cell-utils.d.ts.map +1 -1
- package/dist/basic-components/cell/cell.d.ts.map +1 -1
- package/dist/basic-components/image/image.d.ts.map +1 -1
- package/dist/basic-components/image-cell/image-cell-types.d.ts +12 -3
- package/dist/basic-components/image-cell/image-cell-types.d.ts.map +1 -1
- package/dist/basic-components/image-cell/image-cell.d.ts.map +1 -1
- package/dist/basic-components/list/list-types.d.ts +0 -1
- package/dist/basic-components/list/list-types.d.ts.map +1 -1
- package/dist/basic-components/list/list.d.ts.map +1 -1
- package/dist/basic-components/notification/notification.assets.d.ts.map +1 -1
- package/dist/basic-components/select/select.d.ts.map +1 -1
- package/dist/basic-components/text/text.d.ts.map +1 -1
- package/dist/basic-components/text-editor/text-editor-utils.d.ts.map +1 -1
- package/dist/basic-components/textfield/textfield.d.ts.map +1 -1
- package/dist/blockDiagram-DXYQGD6D-B0NvV2Ph.js +3033 -0
- package/dist/blockDiagram-DXYQGD6D-D6DypQdM.cjs +132 -0
- package/dist/c4Diagram-AHTNJAMY-DPijI3_r.js +2961 -0
- package/dist/c4Diagram-AHTNJAMY-Dgwv-e5O.cjs +10 -0
- package/dist/channel-CRWct3-i.js +5 -0
- package/dist/channel-DkTvdPpU.cjs +1 -0
- package/dist/chunk-2KRD3SAO-Ca3zDQyj.js +23 -0
- package/dist/chunk-2KRD3SAO-oZrIWZvV.cjs +1 -0
- package/dist/chunk-336JU56O-DQhIGd25.cjs +1 -0
- package/dist/chunk-336JU56O-DkZvWJVe.js +49 -0
- package/dist/chunk-426QAEUC-CDXJVpQr.js +9 -0
- package/dist/chunk-426QAEUC-CqN26l3E.cjs +1 -0
- package/dist/chunk-4BX2VUAB-BW54-JWg.js +8 -0
- package/dist/chunk-4BX2VUAB-Qba52sxc.cjs +1 -0
- package/dist/chunk-4TB4RGXK-B0SIkKDf.cjs +206 -0
- package/dist/chunk-4TB4RGXK-D2LRzcEP.js +3253 -0
- package/dist/chunk-55IACEB6-Bu3k0Yz5.js +8 -0
- package/dist/chunk-55IACEB6-DPatBzu7.cjs +1 -0
- package/dist/chunk-5FUZZQ4R-Cj5KbGC7.cjs +62 -0
- package/dist/chunk-5FUZZQ4R-D3C0F0Tr.js +3638 -0
- package/dist/chunk-5PVQY5BW-DEPZKGvb.cjs +2 -0
- package/dist/chunk-5PVQY5BW-Dn8n6moB.js +1299 -0
- package/dist/chunk-67CJDMHE-2Qg7i1xJ.cjs +1 -0
- package/dist/chunk-67CJDMHE-YMBkJcAO.js +23 -0
- package/dist/chunk-7N4EOEYR-C-GuhRgW.js +35 -0
- package/dist/chunk-7N4EOEYR-jNBQwvHx.cjs +1 -0
- package/dist/chunk-AA7GKIK3-B_ZB6dou.js +30 -0
- package/dist/chunk-AA7GKIK3-dqnTmnvO.cjs +1 -0
- package/dist/chunk-BSJP7CBP-CFzYPvgr.cjs +1 -0
- package/dist/chunk-BSJP7CBP-oNTXVRA7.js +82 -0
- package/dist/chunk-CIAEETIT-ClHUj0Su.cjs +1 -0
- package/dist/chunk-CIAEETIT-XlxsAz-4.js +23 -0
- package/dist/chunk-D-IZpNpi.cjs +1 -0
- package/dist/chunk-EDXVE4YY-1dwNWzc7.cjs +1 -0
- package/dist/chunk-EDXVE4YY-CGNVB686.js +25 -0
- package/dist/chunk-ENJZ2VHE-BAWfx0nA.cjs +10 -0
- package/dist/chunk-ENJZ2VHE-CZ7BvL2h.js +560 -0
- package/dist/{chunk-FMBD7UC4-C1wIcaJH.js → chunk-FMBD7UC4-CS9_r76V.cjs} +2 -6
- package/dist/chunk-FMBD7UC4-RRSc9jqt.js +5 -0
- package/dist/chunk-FOC6F5B3-DcZs851j.cjs +1 -0
- package/dist/chunk-FOC6F5B3-E9n6-juB.js +23 -0
- package/dist/chunk-ICPOFSXX-fQJ5ufMR.js +3320 -0
- package/dist/chunk-ICPOFSXX-hY6BIZ4Y.cjs +122 -0
- package/dist/chunk-K5T4RW27-BzDQkjC7.cjs +94 -0
- package/dist/chunk-K5T4RW27-DY7TOEqa.js +16070 -0
- package/dist/chunk-KGLVRYIC-5OJpfQCj.js +23 -0
- package/dist/chunk-KGLVRYIC-DnbIkai8.cjs +1 -0
- package/dist/chunk-LIHQZDEY-59I4-LWb.js +64 -0
- package/dist/chunk-LIHQZDEY-CrogR3nT.cjs +1 -0
- package/dist/chunk-ORNJ4GCN-CcrEtiCn.cjs +1 -0
- package/dist/chunk-ORNJ4GCN-CwkOSFbS.js +31 -0
- package/dist/chunk-OYMX7WX6-CrK-lehh.cjs +231 -0
- package/dist/chunk-OYMX7WX6-DJkGVCqi.js +2014 -0
- package/dist/chunk-QZHKN3VN-Bx8I6l3c.js +15 -0
- package/dist/chunk-QZHKN3VN-CSMKL2rB.cjs +1 -0
- package/dist/chunk-U2HBQHQK-CJ77uizk.cjs +70 -0
- package/dist/chunk-U2HBQHQK-Ceyeq0IV.js +1879 -0
- package/dist/chunk-WQLz0Won.js +20 -0
- package/dist/chunk-X2U36JSP-CtXjVqek.cjs +1 -0
- package/dist/chunk-X2U36JSP-VxRY65ea.js +67 -0
- package/dist/chunk-XPW4576I-BcWkx-AL.js +1146 -0
- package/dist/chunk-XPW4576I-D8Pp6a3j.cjs +32 -0
- package/dist/chunk-YZCP3GAM-D6P3SWmL.js +60 -0
- package/dist/chunk-YZCP3GAM-qxaNo0r8.cjs +1 -0
- package/dist/chunk-ZZ45TVLE-BfSqZnT4.cjs +1 -0
- package/dist/chunk-ZZ45TVLE-X2jolXSO.js +32 -0
- package/dist/classDiagram-6PBFFD2Q-BT4_JTnP.cjs +1 -0
- package/dist/classDiagram-6PBFFD2Q-Dgaxt4wI.js +29 -0
- package/dist/classDiagram-v2-HSJHXN6E-CWhiK6nm.js +29 -0
- package/dist/classDiagram-v2-HSJHXN6E-DkBLzgTv.cjs +1 -0
- package/dist/clone-CQQwPjME.cjs +1 -0
- package/dist/clone-Dwbh_blD.js +8 -0
- package/dist/components/drawer/drawer-types.d.ts +4 -0
- package/dist/components/drawer/drawer-types.d.ts.map +1 -1
- package/dist/components/image-list/components/image-list-command-panel.d.ts +15 -0
- package/dist/components/image-list/components/image-list-command-panel.d.ts.map +1 -0
- package/dist/components/image-list/components/image-list-command-trigger.d.ts +16 -0
- package/dist/components/image-list/components/image-list-command-trigger.d.ts.map +1 -0
- package/dist/components/image-list/components/image-list-filter-picker.d.ts +14 -0
- package/dist/components/image-list/components/image-list-filter-picker.d.ts.map +1 -0
- package/dist/components/image-list/components/image-list-h-strip.d.ts.map +1 -1
- package/dist/components/image-list/components/image-list-json-viewer.d.ts +11 -0
- package/dist/components/image-list/components/image-list-json-viewer.d.ts.map +1 -0
- package/dist/components/image-list/components/image-list-menu.d.ts.map +1 -1
- package/dist/components/image-list/components/image-list-navigation-picker.d.ts +6 -2
- package/dist/components/image-list/components/image-list-navigation-picker.d.ts.map +1 -1
- package/dist/components/image-list/components/image-list-sort-picker.d.ts +14 -0
- package/dist/components/image-list/components/image-list-sort-picker.d.ts.map +1 -0
- package/dist/components/image-list/components/image-list-v-strip.d.ts.map +1 -1
- package/dist/components/image-list/components/items/image-list-card-item.d.ts +5 -0
- package/dist/components/image-list/components/items/image-list-card-item.d.ts.map +1 -0
- package/dist/components/image-list/components/items/image-list-folder-item.d.ts.map +1 -1
- package/dist/components/image-list/components/items/image-list-item.d.ts.map +1 -1
- package/dist/components/image-list/components/menu-nav-item.d.ts.map +1 -1
- package/dist/components/image-list/components/navigation-modes/image-list-catalog.d.ts.map +1 -1
- package/dist/components/image-list/components/navigation-modes/image-list-explorer.d.ts.map +1 -1
- package/dist/components/image-list/components/navigation-modes/image-list-tree.d.ts.map +1 -1
- package/dist/components/image-list/components/strip-item.d.ts.map +1 -1
- package/dist/components/image-list/hooks/useCommandPickers.d.ts +13 -0
- package/dist/components/image-list/hooks/useCommandPickers.d.ts.map +1 -0
- package/dist/components/image-list/image-list-column-utils.d.ts +9 -0
- package/dist/components/image-list/image-list-column-utils.d.ts.map +1 -0
- package/dist/components/image-list/image-list-context.d.ts +5 -2
- package/dist/components/image-list/image-list-context.d.ts.map +1 -1
- package/dist/components/image-list/image-list-debug-utils.d.ts +13 -0
- package/dist/components/image-list/image-list-debug-utils.d.ts.map +1 -0
- package/dist/components/image-list/image-list-filter-context.d.ts +9 -0
- package/dist/components/image-list/image-list-filter-context.d.ts.map +1 -0
- package/dist/components/image-list/image-list-filter-utils.d.ts +12 -0
- package/dist/components/image-list/image-list-filter-utils.d.ts.map +1 -0
- package/dist/components/image-list/image-list-sort-context.d.ts +9 -0
- package/dist/components/image-list/image-list-sort-context.d.ts.map +1 -0
- package/dist/components/image-list/image-list-sort-utils.d.ts +13 -0
- package/dist/components/image-list/image-list-sort-utils.d.ts.map +1 -0
- package/dist/components/image-list/image-list-state-context.d.ts +5 -0
- package/dist/components/image-list/image-list-state-context.d.ts.map +1 -0
- package/dist/components/image-list/image-list-types.d.ts +45 -2
- package/dist/components/image-list/image-list-types.d.ts.map +1 -1
- package/dist/components/image-list/image-list-utils.d.ts +24 -1
- package/dist/components/image-list/image-list-utils.d.ts.map +1 -1
- package/dist/components/image-list/image-list.d.ts +1 -1
- package/dist/components/image-list/image-list.d.ts.map +1 -1
- package/dist/components/planner/planner-assets.d.ts +1 -1
- package/dist/components/planner/planner-assets.d.ts.map +1 -1
- package/dist/components/planner/planner-types.d.ts +1 -1
- package/dist/components/planner/planner-types.d.ts.map +1 -1
- package/dist/components/planner/planner-utils.d.ts +6 -5
- package/dist/components/planner/planner-utils.d.ts.map +1 -1
- package/dist/components/planner/planner.d.ts.map +1 -1
- package/dist/components/scaffold/context/scaffold-provider.d.ts.map +1 -1
- package/dist/components/scaffold/scaffold-types.d.ts +1 -0
- package/dist/components/scaffold/scaffold-types.d.ts.map +1 -1
- package/dist/components/timeline/timeline-types.d.ts +6 -2
- package/dist/components/timeline/timeline-types.d.ts.map +1 -1
- package/dist/components/timeline/timeline.d.ts.map +1 -1
- package/dist/components/toolbar/toolbar.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/cose-bilkent-S5V4N54A-B30Rh9DR.js +2250 -0
- package/dist/cose-bilkent-S5V4N54A-Bhdp-wcb.cjs +1 -0
- package/dist/cytoscape.esm-CPjF_mSK.js +18100 -0
- package/dist/cytoscape.esm-CrBwLFXE.cjs +321 -0
- package/dist/dagre-BcwvU6ZF.cjs +1 -0
- package/dist/dagre-D17h-Z-U.js +1606 -0
- package/dist/dagre-KV5264BT-BnEKAAAn.js +293 -0
- package/dist/dagre-KV5264BT-DRbiLA37.cjs +4 -0
- package/dist/defaultLocale-Dcyuaxxg.js +201 -0
- package/dist/defaultLocale-DtzyZW63.cjs +1 -0
- package/dist/diagram-5BDNPKRD-B_Fa4dpl.js +101 -0
- package/dist/diagram-5BDNPKRD-CPN8m2Hl.cjs +10 -0
- package/dist/diagram-G4DWMVQ6-VpXkNb67.cjs +24 -0
- package/dist/diagram-G4DWMVQ6-iYV58Drq.js +524 -0
- package/dist/diagram-MMDJMWI5-DGk_PUo9.cjs +43 -0
- package/dist/diagram-MMDJMWI5-DUpEI5ug.js +213 -0
- package/dist/diagram-TYMM5635-BH_-vSv9.cjs +24 -0
- package/dist/diagram-TYMM5635-DHHPZ5ZJ.js +133 -0
- package/dist/dist-BgvMZbfo.cjs +1 -0
- package/dist/dist-DL30VIBI.js +60 -0
- package/dist/erDiagram-SMLLAGMA-C8FM7wbJ.js +1700 -0
- package/dist/erDiagram-SMLLAGMA-vuYEmfFA.cjs +85 -0
- package/dist/flatten-BE1bWL-7.js +40 -0
- package/dist/flatten-DxvYSoR8.cjs +1 -0
- package/dist/flowDiagram-DWJPFMVM-BGtX2gw0.js +4145 -0
- package/dist/flowDiagram-DWJPFMVM-DWuKiJeo.cjs +162 -0
- package/dist/functional-components/action/action-types.d.ts +32 -2
- package/dist/functional-components/action/action-types.d.ts.map +1 -1
- package/dist/functional-components/action/action-utils.d.ts +13 -1
- package/dist/functional-components/action/action-utils.d.ts.map +1 -1
- package/dist/functional-components/action/action.d.ts.map +1 -1
- package/dist/functional-components/action-list/action-list.d.ts.map +1 -1
- package/dist/functional-components/action-list/dual-list/dual-list.d.ts.map +1 -1
- package/dist/functional-components/timeline-engine/components/gantt/bar/gantt-bar.d.ts +18 -0
- package/dist/functional-components/timeline-engine/components/gantt/bar/gantt-bar.d.ts.map +1 -0
- package/dist/functional-components/{gantt → timeline-engine/components/gantt}/gantt-assets.d.ts +2 -0
- package/dist/functional-components/timeline-engine/components/gantt/gantt-assets.d.ts.map +1 -0
- package/dist/functional-components/{gantt → timeline-engine/components/gantt}/gantt.d.ts +3 -3
- package/dist/functional-components/timeline-engine/components/gantt/gantt.d.ts.map +1 -0
- package/dist/functional-components/{gantt → timeline-engine/components/gantt}/grid/gantt-grid.d.ts +3 -5
- package/dist/functional-components/timeline-engine/components/gantt/grid/gantt-grid.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/components/gantt/header/gantt-header.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/components/gantt/today-indicator/gantt-today-indicator.d.ts.map +1 -0
- package/dist/functional-components/{gantt → timeline-engine/components/gantt}/types/gantt-types.d.ts +27 -6
- package/dist/functional-components/timeline-engine/components/gantt/types/gantt-types.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/components/task-list/task-list-types.d.ts +27 -0
- package/dist/functional-components/timeline-engine/components/task-list/task-list-types.d.ts.map +1 -0
- package/dist/functional-components/{task-list → timeline-engine/components/task-list}/task-list-utils.d.ts +4 -4
- package/dist/functional-components/timeline-engine/components/task-list/task-list-utils.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/components/task-list/task-list.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/timeline-engine-types.d.ts +24 -0
- package/dist/functional-components/timeline-engine/timeline-engine-types.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/timeline-engine-utils.d.ts +119 -0
- package/dist/functional-components/timeline-engine/timeline-engine-utils.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/timeline-engine-utils.test.d.ts +2 -0
- package/dist/functional-components/timeline-engine/timeline-engine-utils.test.d.ts.map +1 -0
- package/dist/functional-components/timeline-engine/timeline-engine.d.ts +8 -0
- package/dist/functional-components/timeline-engine/timeline-engine.d.ts.map +1 -0
- package/dist/ganttDiagram-T4ZO3ILL-C25CnBTv.cjs +292 -0
- package/dist/ganttDiagram-T4ZO3ILL-PY1BUp5b.js +3077 -0
- package/dist/gitGraph-7Q5UKJZL-DZea3ltD.cjs +1 -0
- package/dist/gitGraph-7Q5UKJZL-sjlqDwJ_.js +3 -0
- package/dist/gitGraphDiagram-UUTBAWPF-0lCBo9nK.cjs +106 -0
- package/dist/gitGraphDiagram-UUTBAWPF-CDIW9-sX.js +728 -0
- package/dist/graphlib-CdgJ32J_.cjs +1 -0
- package/dist/graphlib-DbQkSsC8.js +373 -0
- package/dist/hooks/useClickOutside.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useGanttMath.d.ts +1 -1
- package/dist/hooks/useGanttMath.d.ts.map +1 -1
- package/dist/hooks/useVirtualListScroll.d.ts.map +1 -1
- package/dist/identity-KQSjemTb.cjs +1 -0
- package/dist/identity-g0dsMjx7.js +393 -0
- package/dist/info-OMHHGYJF-Bk0VWVNW.js +3 -0
- package/dist/info-OMHHGYJF-C8QtwF0k.cjs +1 -0
- package/dist/infoDiagram-42DDH7IO-CQLxpytS.js +19 -0
- package/dist/infoDiagram-42DDH7IO-Da__a_a_.cjs +2 -0
- package/dist/init-B2MubQrj.cjs +1 -0
- package/dist/init-BO60vQHJ.js +15 -0
- package/dist/isEmpty-CA3kJuev.cjs +1 -0
- package/dist/isEmpty-RwX-oIQS.js +35 -0
- package/dist/ishikawaDiagram-UXIWVN3A-BblrAmns.js +718 -0
- package/dist/ishikawaDiagram-UXIWVN3A-BfkF39Xv.cjs +70 -0
- package/dist/journeyDiagram-VCZTEJTY-CCOZ1XFK.js +883 -0
- package/dist/journeyDiagram-VCZTEJTY-UwcVOFtb.cjs +139 -0
- package/dist/kanban-definition-6JOO6SKY-BWwfbdd6.js +973 -0
- package/dist/kanban-definition-6JOO6SKY-Coxpi43B.cjs +89 -0
- package/dist/katex-Du5WiYIy.js +22000 -0
- package/dist/katex-SAH56fvc.cjs +257 -0
- package/dist/ketchup2.cjs.js +197 -1
- package/dist/ketchup2.css +2 -1
- package/dist/ketchup2.es.js +132798 -52
- package/dist/line-C7oijaT4.cjs +1 -0
- package/dist/line-CrxZdHmO.js +34 -0
- package/dist/linear-BsPvNLJv.js +289 -0
- package/dist/linear-CxHa1DsM.cjs +1 -0
- package/dist/mermaid-parser.core-CERDf-UG.js +69 -0
- package/dist/mermaid-parser.core-DHpvGOZR.cjs +3 -0
- package/dist/mindmap-definition-QFDTVHPH--xULjpFZ.cjs +96 -0
- package/dist/mindmap-definition-QFDTVHPH-dYQoMeA6.js +978 -0
- package/dist/ordinal-C-VoL0XF.js +65 -0
- package/dist/ordinal-Civr0hZL.cjs +1 -0
- package/dist/packet-4T2RLAQJ-X0BMsNFj.js +3 -0
- package/dist/packet-4T2RLAQJ-lvmQnXPI.cjs +1 -0
- package/dist/path-Civic7PQ.cjs +1 -0
- package/dist/path-CvfwEr8y.js +85 -0
- package/dist/pie-ZZUOXDRM-CJ_fU5k1.js +3 -0
- package/dist/pie-ZZUOXDRM-Dp4APKqR.cjs +1 -0
- package/dist/pieDiagram-DEJITSTG-7we8s9eC.cjs +30 -0
- package/dist/pieDiagram-DEJITSTG-Dj5pX4fC.js +165 -0
- package/dist/quadrantDiagram-34T5L4WZ-B3BFuPYQ.cjs +7 -0
- package/dist/quadrantDiagram-34T5L4WZ-BKNOJBiR.js +1974 -0
- package/dist/radar-PYXPWWZC-BHWJy_E1.cjs +1 -0
- package/dist/radar-PYXPWWZC-DgZIW9Ah.js +3 -0
- package/dist/reduce-B7WW9rkU.cjs +1 -0
- package/dist/reduce-DNnkcf3M.js +532 -0
- package/dist/requirementDiagram-MS252O5E-BemsEy3Y.cjs +84 -0
- package/dist/requirementDiagram-MS252O5E-r3eZu57d.js +2221 -0
- package/dist/rough.esm-1mqTSjCt.js +1352 -0
- package/dist/rough.esm-BLKo1fIQ.cjs +1 -0
- package/dist/sankeyDiagram-XADWPNL6-B9YCkPHh.cjs +10 -0
- package/dist/sankeyDiagram-XADWPNL6-ErTVVewH.js +920 -0
- package/dist/sequenceDiagram-FGHM5R23-BmqbzzHY.js +4157 -0
- package/dist/sequenceDiagram-FGHM5R23-CBpQL6X2.cjs +157 -0
- package/dist/src-BQiFKP24.js +2146 -0
- package/dist/src-DFxq-N5I.cjs +1 -0
- package/dist/stateDiagram-FHFEXIEX-CL9LE-W1.js +217 -0
- package/dist/stateDiagram-FHFEXIEX-Cju5Z2VS.cjs +1 -0
- package/dist/stateDiagram-v2-QKLJ7IA2-BHoytfGp.js +27 -0
- package/dist/stateDiagram-v2-QKLJ7IA2-DO1H6Vqa.cjs +1 -0
- package/dist/timeline-definition-GMOUNBTQ-BeTHmikc.cjs +120 -0
- package/dist/timeline-definition-GMOUNBTQ-DgcI7XnE.js +1068 -0
- package/dist/treeView-SZITEDCU-CT5vX0q9.cjs +1 -0
- package/dist/treeView-SZITEDCU-Df3xzFtO.js +3 -0
- package/dist/treemap-W4RFUUIX-Bk_jVZ7D.cjs +1 -0
- package/dist/treemap-W4RFUUIX-ClUtdSdn.js +3 -0
- package/dist/types/data-structures.d.ts +9 -1
- package/dist/types/data-structures.d.ts.map +1 -1
- package/dist/utils/data-structures.d.ts +2 -0
- package/dist/utils/data-structures.d.ts.map +1 -1
- package/dist/utils/style.d.ts +13 -2
- package/dist/utils/style.d.ts.map +1 -1
- package/dist/utils/translation.d.ts.map +1 -1
- package/dist/v4-6yr83DbP.cjs +1 -0
- package/dist/v4-BR71w5_q.js +33 -0
- package/dist/vennDiagram-DHZGUBPP-7tx3VVDU.js +1858 -0
- package/dist/vennDiagram-DHZGUBPP-C16dnMoe.cjs +34 -0
- package/dist/wardley-RL74JXVD-BtHQbnUy.js +3 -0
- package/dist/wardley-RL74JXVD-y8RO5Iqv.cjs +1 -0
- package/dist/wardleyDiagram-NUSXRM2D-DGKU7A2U.js +578 -0
- package/dist/wardleyDiagram-NUSXRM2D-DY51LHBa.cjs +20 -0
- package/dist/xychartDiagram-5P7HB3ND--7RYyckP.js +2044 -0
- package/dist/xychartDiagram-5P7HB3ND-Cj0HUNew.cjs +7 -0
- package/package.json +31 -31
- package/dist/_basePickBy-CPekwY_Z.js +0 -151
- package/dist/_basePickBy-DDhgLyLp.cjs +0 -1
- package/dist/_baseUniq-CAhfZr5S.js +0 -614
- package/dist/_baseUniq-bLb2QO_4.cjs +0 -1
- package/dist/arc-CnmUepZA.cjs +0 -1
- package/dist/arc-Md6Ds0JZ.js +0 -83
- package/dist/architecture-7HQA4BMR-DLImbuCr.js +0 -6
- package/dist/architecture-7HQA4BMR-zD1jCFXs.cjs +0 -1
- package/dist/architectureDiagram-VXUJARFQ-BkTy7RJA.js +0 -4661
- package/dist/architectureDiagram-VXUJARFQ-Vl-ya9R6.cjs +0 -36
- package/dist/blockDiagram-VD42YOAC-C9AJNM79.js +0 -2256
- package/dist/blockDiagram-VD42YOAC-D_EmYywD.cjs +0 -122
- package/dist/c4Diagram-YG6GDRKO-BfwBYulK.cjs +0 -10
- package/dist/c4Diagram-YG6GDRKO-YW-l-SYp.js +0 -1580
- package/dist/channel-BGeX_R6w.cjs +0 -1
- package/dist/channel-lqmaHMPZ.js +0 -5
- package/dist/chunk-4BX2VUAB-C6nahV0u.cjs +0 -1
- package/dist/chunk-4BX2VUAB-UMbIiF-V.js +0 -8
- package/dist/chunk-55IACEB6-CH_wWg2p.js +0 -8
- package/dist/chunk-55IACEB6-Cxt8uWHb.cjs +0 -1
- package/dist/chunk-B4BG7PRW-CTNZzNh0.js +0 -1375
- package/dist/chunk-B4BG7PRW-ekpXKNa3.cjs +0 -165
- package/dist/chunk-DI55MBZ5-BrLh6Fue.js +0 -1370
- package/dist/chunk-DI55MBZ5-TYqUGYGr.cjs +0 -220
- package/dist/chunk-FMBD7UC4-D0Nmh8EL.cjs +0 -15
- package/dist/chunk-QN33PNHL-B91UelWj.js +0 -19
- package/dist/chunk-QN33PNHL-KGNgU1-8.cjs +0 -1
- package/dist/chunk-QZHKN3VN-IV7jnz-R.js +0 -15
- package/dist/chunk-QZHKN3VN-ajuovO9B.cjs +0 -1
- package/dist/chunk-TZMSLE5B-Bkf7U79o.cjs +0 -1
- package/dist/chunk-TZMSLE5B-DArsm2Pn.js +0 -64
- package/dist/classDiagram-2ON5EDUG-C0_Gqd5k.js +0 -16
- package/dist/classDiagram-2ON5EDUG-Cnous8-m.cjs +0 -1
- package/dist/classDiagram-v2-WZHVMYZB-C0_Gqd5k.js +0 -16
- package/dist/classDiagram-v2-WZHVMYZB-Cnous8-m.cjs +0 -1
- package/dist/clone-B_MxWhab.js +0 -8
- package/dist/clone-D6gFD6F-.cjs +0 -1
- package/dist/cose-bilkent-S5V4N54A-DHZ_jZYH.js +0 -2608
- package/dist/cose-bilkent-S5V4N54A-Da7jSuau.cjs +0 -1
- package/dist/cytoscape.esm-CNUX3VTg.cjs +0 -321
- package/dist/cytoscape.esm-Cvf3sx9F.js +0 -18704
- package/dist/dagre-6UL2VRFP-CI2ww-SU.js +0 -444
- package/dist/dagre-6UL2VRFP-qOR4yAIQ.cjs +0 -4
- package/dist/defaultLocale-D7EN2tov.js +0 -171
- package/dist/defaultLocale-DIVzfLaQ.cjs +0 -1
- package/dist/diagram-PSM6KHXK-1g8345m3.js +0 -531
- package/dist/diagram-PSM6KHXK-DHWL3g5V.cjs +0 -24
- package/dist/diagram-QEK2KX5R-B-VP4dVY.js +0 -217
- package/dist/diagram-QEK2KX5R-DDWbMmAv.cjs +0 -43
- package/dist/diagram-S2PKOQOG-BbSGqLET.js +0 -142
- package/dist/diagram-S2PKOQOG-Djw9RGNh.cjs +0 -24
- package/dist/erDiagram-Q2GNP2WA-CxY1P4hJ.js +0 -841
- package/dist/erDiagram-Q2GNP2WA-Pw9i-eBN.cjs +0 -60
- package/dist/flowDiagram-NV44I4VS-BOr3T0H8.js +0 -1620
- package/dist/flowDiagram-NV44I4VS-D9VKU1cV.cjs +0 -162
- package/dist/functional-components/gantt/bar/gantt-bar.d.ts +0 -17
- package/dist/functional-components/gantt/bar/gantt-bar.d.ts.map +0 -1
- package/dist/functional-components/gantt/gantt-assets.d.ts.map +0 -1
- package/dist/functional-components/gantt/gantt.d.ts.map +0 -1
- package/dist/functional-components/gantt/grid/gantt-grid.d.ts.map +0 -1
- package/dist/functional-components/gantt/header/gantt-header.d.ts.map +0 -1
- package/dist/functional-components/gantt/today-indicator/gantt-today-indicator.d.ts.map +0 -1
- package/dist/functional-components/gantt/types/gantt-types.d.ts.map +0 -1
- package/dist/functional-components/task-list/task-list-types.d.ts +0 -22
- package/dist/functional-components/task-list/task-list-types.d.ts.map +0 -1
- package/dist/functional-components/task-list/task-list-utils.d.ts.map +0 -1
- package/dist/functional-components/task-list/task-list.d.ts.map +0 -1
- package/dist/ganttDiagram-JELNMOA3-B4T6J11z.js +0 -2670
- package/dist/ganttDiagram-JELNMOA3-C4Y4VT0h.cjs +0 -267
- package/dist/gitGraph-G5XIXVHT-C5QaeLIs.cjs +0 -1
- package/dist/gitGraph-G5XIXVHT-bOZ2ppp1.js +0 -6
- package/dist/gitGraphDiagram-V2S2FVAM-CteUW9ML.js +0 -699
- package/dist/gitGraphDiagram-V2S2FVAM-D_v6ae_z.cjs +0 -65
- package/dist/graph-BBPk5jyk.cjs +0 -1
- package/dist/graph-h6vsxKyr.js +0 -247
- package/dist/hooks/usePlannerSync.d.ts +0 -11
- package/dist/hooks/usePlannerSync.d.ts.map +0 -1
- package/dist/index-CYQM-t1d.cjs +0 -390
- package/dist/index-FiV1b00w.js +0 -133122
- package/dist/info-VBDWY6EO-BEIYBsnB.cjs +0 -1
- package/dist/info-VBDWY6EO-BQAW_660.js +0 -6
- package/dist/infoDiagram-HS3SLOUP-DMalb3kC.js +0 -24
- package/dist/infoDiagram-HS3SLOUP-Tepm6ygN.cjs +0 -2
- package/dist/init-CHZsXQcr.cjs +0 -1
- package/dist/init-DjUOC4st.js +0 -16
- package/dist/journeyDiagram-XKPGCS4Q-CzePcKne.cjs +0 -139
- package/dist/journeyDiagram-XKPGCS4Q-D0u-RLFV.js +0 -834
- package/dist/kanban-definition-3W4ZIXB7-BSCzAsMJ.js +0 -719
- package/dist/kanban-definition-3W4ZIXB7-DdbH9sci.cjs +0 -89
- package/dist/katex-C2g-EhzP.cjs +0 -261
- package/dist/katex-CUSbq6rG.js +0 -11692
- package/dist/layout-6z7-eUnZ.js +0 -1335
- package/dist/layout-DbcrMh5B.cjs +0 -1
- package/dist/linear-BKevCbhh.js +0 -259
- package/dist/linear-C7uVEtWW.cjs +0 -1
- package/dist/mermaid-parser.core-Cwy51n_e.js +0 -17907
- package/dist/mermaid-parser.core-DQ2yhapR.cjs +0 -160
- package/dist/mindmap-definition-VGOIOE7T-CcEisj0R.cjs +0 -68
- package/dist/mindmap-definition-VGOIOE7T-xp6GmSIx.js +0 -758
- package/dist/ordinal-B6-f3MAq.js +0 -61
- package/dist/ordinal-CagbB1m8.cjs +0 -1
- package/dist/packet-DYOGHKS2-BGgwnMhM.js +0 -6
- package/dist/packet-DYOGHKS2-BWg8qxI8.cjs +0 -1
- package/dist/pie-VRWISCQL-DhM8CUW4.cjs +0 -1
- package/dist/pie-VRWISCQL-DrWIWm7W.js +0 -6
- package/dist/pieDiagram-ADFJNKIX-BdvacM-Z.cjs +0 -30
- package/dist/pieDiagram-ADFJNKIX-D6Fa7W_r.js +0 -161
- package/dist/quadrantDiagram-AYHSOK5B-CHMoSBvg.js +0 -1022
- package/dist/quadrantDiagram-AYHSOK5B-ddq5zZEg.cjs +0 -7
- package/dist/radar-ZZBFDIW7-CPvW4Njh.js +0 -6
- package/dist/radar-ZZBFDIW7-YJK72BlV.cjs +0 -1
- package/dist/requirementDiagram-UZGBJVZJ-Cr9HnGVO.js +0 -850
- package/dist/requirementDiagram-UZGBJVZJ-NdpzVbnf.cjs +0 -64
- package/dist/sankeyDiagram-TZEHDZUN-3f19WwKd.js +0 -810
- package/dist/sankeyDiagram-TZEHDZUN-D2Hzq4Kr.cjs +0 -10
- package/dist/sequenceDiagram-WL72ISMW-Cu-7V--6.js +0 -2511
- package/dist/sequenceDiagram-WL72ISMW-Nk6vhSK9.cjs +0 -145
- package/dist/stateDiagram-FKZM4ZOC-BSnDKUaW.cjs +0 -1
- package/dist/stateDiagram-FKZM4ZOC-BleTIniP.js +0 -263
- package/dist/stateDiagram-v2-4FDKWEC3-7EjW078x.js +0 -16
- package/dist/stateDiagram-v2-4FDKWEC3-BJPzO53y.cjs +0 -1
- package/dist/timeline-definition-IT6M3QCI-CFTjPpKy.js +0 -795
- package/dist/timeline-definition-IT6M3QCI-CfaGtuF2.cjs +0 -61
- package/dist/treemap-GDKQZRPO-CtDdEOaj.cjs +0 -1
- package/dist/treemap-GDKQZRPO-DlODAdQ2.js +0 -6
- package/dist/utils/wbs-utils.d.ts +0 -143
- package/dist/utils/wbs-utils.d.ts.map +0 -1
- package/dist/xychartDiagram-PRI3JC2R-mShGv2CD.cjs +0 -7
- package/dist/xychartDiagram-PRI3JC2R-vEJER5zT.js +0 -1340
- /package/dist/functional-components/{gantt → timeline-engine/components/gantt}/header/gantt-header.d.ts +0 -0
- /package/dist/functional-components/{gantt → timeline-engine/components/gantt}/today-indicator/gantt-today-indicator.d.ts +0 -0
- /package/dist/functional-components/{task-list → timeline-engine/components/task-list}/task-list.d.ts +0 -0
|
@@ -0,0 +1,578 @@
|
|
|
1
|
+
import { B as e, C as t, L as n, V as r, W as i, _ as a, a as o, b as s, c, v as l } from "./chunk-ICPOFSXX-fQJ5ufMR.js";
|
|
2
|
+
import { g as u, h as d } from "./src-BQiFKP24.js";
|
|
3
|
+
import { t as f } from "./chunk-426QAEUC-CDXJVpQr.js";
|
|
4
|
+
import { t as p } from "./chunk-4BX2VUAB-BW54-JWg.js";
|
|
5
|
+
import { t as m } from "./mermaid-parser.core-CERDf-UG.js";
|
|
6
|
+
//#region node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-NUSXRM2D.mjs
|
|
7
|
+
var h = /* @__PURE__ */ d((e, t) => {
|
|
8
|
+
let n = e <= 1 ? e * 100 : e;
|
|
9
|
+
if (n < 0 || n > 100) throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);
|
|
10
|
+
return n;
|
|
11
|
+
}, "toPercent"), g = /* @__PURE__ */ d((e, t, n) => ({
|
|
12
|
+
x: h(t, `${n} evolution`),
|
|
13
|
+
y: h(e, `${n} visibility`)
|
|
14
|
+
}), "toCoordinates"), _ = /* @__PURE__ */ d((e) => {
|
|
15
|
+
if (e) {
|
|
16
|
+
if (e === "+<>") return "bidirectional";
|
|
17
|
+
if (e === "+<") return "backward";
|
|
18
|
+
if (e === "+>") return "forward";
|
|
19
|
+
}
|
|
20
|
+
}, "getFlowFromPort"), v = /* @__PURE__ */ d((e) => {
|
|
21
|
+
if (!e?.startsWith("+")) return {};
|
|
22
|
+
let t = /^\+'([^']*)'/.exec(e)?.[1];
|
|
23
|
+
return e.includes("<>") ? {
|
|
24
|
+
flow: "bidirectional",
|
|
25
|
+
label: t
|
|
26
|
+
} : e.includes("<") ? {
|
|
27
|
+
flow: "backward",
|
|
28
|
+
label: t
|
|
29
|
+
} : e.includes(">") ? {
|
|
30
|
+
flow: "forward",
|
|
31
|
+
label: t
|
|
32
|
+
} : { label: t };
|
|
33
|
+
}, "extractFlowFromArrow"), y = /* @__PURE__ */ d((e, t) => {
|
|
34
|
+
if (p(e, t), e.size && t.setSize(e.size.width, e.size.height), e.evolution) {
|
|
35
|
+
let n = e.evolution.stages.map((e) => e.secondName ? `${e.name.trim()} / ${e.secondName.trim()}` : e.name.trim()), r = e.evolution.stages.filter((e) => e.boundary !== void 0).map((e) => e.boundary);
|
|
36
|
+
t.updateAxes({
|
|
37
|
+
stages: n,
|
|
38
|
+
stageBoundaries: r
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
if (e.anchors.forEach((e) => {
|
|
42
|
+
let n = g(e.visibility, e.evolution, `Anchor "${e.name}"`);
|
|
43
|
+
t.addNode(e.name, e.name, n.x, n.y, "anchor");
|
|
44
|
+
}), e.components.forEach((e) => {
|
|
45
|
+
let n = g(e.visibility, e.evolution, `Component "${e.name}"`), r = e.label ? (e.label.negX ? -1 : 1) * e.label.offsetX : void 0, i = e.label ? (e.label.negY ? -1 : 1) * e.label.offsetY : void 0, a = e.decorator?.strategy;
|
|
46
|
+
t.addNode(e.name, e.name, n.x, n.y, "component", r, i, e.inertia, a);
|
|
47
|
+
}), e.notes.forEach((e) => {
|
|
48
|
+
let n = g(e.visibility, e.evolution, `Note "${e.text}"`);
|
|
49
|
+
t.addNote(e.text, n.x, n.y);
|
|
50
|
+
}), e.pipelines.forEach((e) => {
|
|
51
|
+
let n = t.getNode(e.parent);
|
|
52
|
+
if (!n || typeof n.y != "number") throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);
|
|
53
|
+
let r = n.y;
|
|
54
|
+
t.startPipeline(e.parent), e.components.forEach((n) => {
|
|
55
|
+
let i = `${e.parent}_${n.name}`, a = n.label ? (n.label.negX ? -1 : 1) * n.label.offsetX : void 0, o = n.label ? (n.label.negY ? -1 : 1) * n.label.offsetY : void 0, s = h(n.evolution, `Pipeline component "${n.name}" evolution`);
|
|
56
|
+
t.addNode(i, n.name, s, r, "pipeline-component", a, o), t.addPipelineComponent(e.parent, i);
|
|
57
|
+
});
|
|
58
|
+
}), e.links.forEach((e) => {
|
|
59
|
+
let n = !!e.arrow && (e.arrow.includes("-.->") || e.arrow.includes(".-.")), r = _(e.fromPort) ?? _(e.toPort), { flow: i, label: a } = v(e.arrow);
|
|
60
|
+
!r && i && (r = i);
|
|
61
|
+
let o = e.linkLabel, s = a ?? o;
|
|
62
|
+
t.addLink(e.from, e.to, n, s, r);
|
|
63
|
+
}), e.evolves.forEach((e) => {
|
|
64
|
+
let n = t.getNode(e.component);
|
|
65
|
+
if (n?.y !== void 0) {
|
|
66
|
+
let r = h(e.target, `Evolve target for "${e.component}"`);
|
|
67
|
+
t.addTrend(e.component, r, n.y);
|
|
68
|
+
}
|
|
69
|
+
}), e.annotations.length > 0) {
|
|
70
|
+
let n = e.annotations[0], r = g(n.x, n.y, "Annotations box");
|
|
71
|
+
t.setAnnotationsBox(r.x, r.y);
|
|
72
|
+
}
|
|
73
|
+
e.annotation.forEach((e) => {
|
|
74
|
+
let n = g(e.x, e.y, `Annotation ${e.number}`);
|
|
75
|
+
t.addAnnotation(e.number, [{
|
|
76
|
+
x: n.x,
|
|
77
|
+
y: n.y
|
|
78
|
+
}], e.text);
|
|
79
|
+
}), e.accelerators.forEach((e) => {
|
|
80
|
+
let n = g(e.x, e.y, `Accelerator "${e.name}"`);
|
|
81
|
+
t.addAccelerator(e.name, n.x, n.y);
|
|
82
|
+
}), e.deaccelerators.forEach((e) => {
|
|
83
|
+
let n = g(e.x, e.y, `Deaccelerator "${e.name}"`);
|
|
84
|
+
t.addDeaccelerator(e.name, n.x, n.y);
|
|
85
|
+
});
|
|
86
|
+
}, "populateDb"), b = {
|
|
87
|
+
parser: { yy: void 0 },
|
|
88
|
+
parse: /* @__PURE__ */ d(async (e) => {
|
|
89
|
+
let t = await m("wardley", e);
|
|
90
|
+
u.debug(t);
|
|
91
|
+
let n = b.parser?.yy;
|
|
92
|
+
if (!n || typeof n.addNode != "function") throw Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
|
|
93
|
+
y(t, n);
|
|
94
|
+
}, "parse")
|
|
95
|
+
}, x = new class {
|
|
96
|
+
constructor() {
|
|
97
|
+
this.nodes = /* @__PURE__ */ new Map(), this.links = [], this.trends = /* @__PURE__ */ new Map(), this.pipelines = /* @__PURE__ */ new Map(), this.annotations = [], this.notes = [], this.accelerators = [], this.deaccelerators = [], this.axes = {};
|
|
98
|
+
}
|
|
99
|
+
static {
|
|
100
|
+
d(this, "WardleyBuilder");
|
|
101
|
+
}
|
|
102
|
+
addNode(e) {
|
|
103
|
+
let t = this.nodes.get(e.id) ?? {
|
|
104
|
+
id: e.id,
|
|
105
|
+
label: e.label
|
|
106
|
+
}, n = {
|
|
107
|
+
...t,
|
|
108
|
+
...e,
|
|
109
|
+
className: e.className ?? t.className,
|
|
110
|
+
labelOffsetX: e.labelOffsetX ?? t.labelOffsetX,
|
|
111
|
+
labelOffsetY: e.labelOffsetY ?? t.labelOffsetY
|
|
112
|
+
};
|
|
113
|
+
this.nodes.set(e.id, n);
|
|
114
|
+
}
|
|
115
|
+
addLink(e) {
|
|
116
|
+
this.links.push(e);
|
|
117
|
+
}
|
|
118
|
+
addTrend(e) {
|
|
119
|
+
this.trends.set(e.nodeId, e);
|
|
120
|
+
}
|
|
121
|
+
startPipeline(e) {
|
|
122
|
+
this.pipelines.set(e, {
|
|
123
|
+
nodeId: e,
|
|
124
|
+
componentIds: []
|
|
125
|
+
});
|
|
126
|
+
let t = this.nodes.get(e);
|
|
127
|
+
t && (t.isPipelineParent = !0);
|
|
128
|
+
}
|
|
129
|
+
addPipelineComponent(e, t) {
|
|
130
|
+
let n = this.pipelines.get(e);
|
|
131
|
+
n && n.componentIds.push(t);
|
|
132
|
+
let r = this.nodes.get(t);
|
|
133
|
+
r && (r.inPipeline = !0);
|
|
134
|
+
}
|
|
135
|
+
addAnnotation(e) {
|
|
136
|
+
this.annotations.push(e);
|
|
137
|
+
}
|
|
138
|
+
addNote(e) {
|
|
139
|
+
this.notes.push(e);
|
|
140
|
+
}
|
|
141
|
+
addAccelerator(e) {
|
|
142
|
+
this.accelerators.push(e);
|
|
143
|
+
}
|
|
144
|
+
addDeaccelerator(e) {
|
|
145
|
+
this.deaccelerators.push(e);
|
|
146
|
+
}
|
|
147
|
+
setAnnotationsBox(e, t) {
|
|
148
|
+
this.annotationsBox = {
|
|
149
|
+
x: e,
|
|
150
|
+
y: t
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
setAxes(e) {
|
|
154
|
+
this.axes = {
|
|
155
|
+
...this.axes,
|
|
156
|
+
...e
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
setSize(e, t) {
|
|
160
|
+
this.size = {
|
|
161
|
+
width: e,
|
|
162
|
+
height: t
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
getNode(e) {
|
|
166
|
+
return this.nodes.get(e);
|
|
167
|
+
}
|
|
168
|
+
build() {
|
|
169
|
+
let e = [];
|
|
170
|
+
for (let t of this.nodes.values()) {
|
|
171
|
+
if (typeof t.x != "number" || typeof t.y != "number") throw Error(`Node "${t.label}" is missing coordinates`);
|
|
172
|
+
e.push(t);
|
|
173
|
+
}
|
|
174
|
+
return {
|
|
175
|
+
nodes: e,
|
|
176
|
+
links: [...this.links],
|
|
177
|
+
trends: [...this.trends.values()],
|
|
178
|
+
pipelines: [...this.pipelines.values()],
|
|
179
|
+
annotations: [...this.annotations],
|
|
180
|
+
notes: [...this.notes],
|
|
181
|
+
accelerators: [...this.accelerators],
|
|
182
|
+
deaccelerators: [...this.deaccelerators],
|
|
183
|
+
annotationsBox: this.annotationsBox,
|
|
184
|
+
axes: { ...this.axes },
|
|
185
|
+
size: this.size
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
clear() {
|
|
189
|
+
this.nodes.clear(), this.links = [], this.trends.clear(), this.pipelines.clear(), this.annotations = [], this.notes = [], this.accelerators = [], this.deaccelerators = [], this.annotationsBox = void 0, this.axes = {}, this.size = void 0;
|
|
190
|
+
}
|
|
191
|
+
}();
|
|
192
|
+
function S(e) {
|
|
193
|
+
let t = s();
|
|
194
|
+
return n(e.trim(), t);
|
|
195
|
+
}
|
|
196
|
+
d(S, "textSanitizer");
|
|
197
|
+
function C() {
|
|
198
|
+
return s()["wardley-beta"];
|
|
199
|
+
}
|
|
200
|
+
d(C, "getConfig");
|
|
201
|
+
function w(e, t, n, r, i, a, o, s, c) {
|
|
202
|
+
x.addNode({
|
|
203
|
+
id: e,
|
|
204
|
+
label: S(t),
|
|
205
|
+
x: n,
|
|
206
|
+
y: r,
|
|
207
|
+
className: i,
|
|
208
|
+
labelOffsetX: a,
|
|
209
|
+
labelOffsetY: o,
|
|
210
|
+
inertia: s,
|
|
211
|
+
sourceStrategy: c
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
d(w, "addNode");
|
|
215
|
+
function T(e, t, n = !1, r, i) {
|
|
216
|
+
x.addLink({
|
|
217
|
+
source: e,
|
|
218
|
+
target: t,
|
|
219
|
+
dashed: n,
|
|
220
|
+
label: r,
|
|
221
|
+
flow: i
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
d(T, "addLink");
|
|
225
|
+
function E(e, t, n) {
|
|
226
|
+
x.addTrend({
|
|
227
|
+
nodeId: e,
|
|
228
|
+
targetX: t,
|
|
229
|
+
targetY: n
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
d(E, "addTrend");
|
|
233
|
+
function D(e, t, n) {
|
|
234
|
+
x.addAnnotation({
|
|
235
|
+
number: e,
|
|
236
|
+
coordinates: t,
|
|
237
|
+
text: n ? S(n) : void 0
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
d(D, "addAnnotation");
|
|
241
|
+
function O(e, t, n) {
|
|
242
|
+
x.addNote({
|
|
243
|
+
text: S(e),
|
|
244
|
+
x: t,
|
|
245
|
+
y: n
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
d(O, "addNote");
|
|
249
|
+
function k(e, t, n) {
|
|
250
|
+
x.addAccelerator({
|
|
251
|
+
name: S(e),
|
|
252
|
+
x: t,
|
|
253
|
+
y: n
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
d(k, "addAccelerator");
|
|
257
|
+
function A(e, t, n) {
|
|
258
|
+
x.addDeaccelerator({
|
|
259
|
+
name: S(e),
|
|
260
|
+
x: t,
|
|
261
|
+
y: n
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
d(A, "addDeaccelerator");
|
|
265
|
+
function j(e, t) {
|
|
266
|
+
x.setAnnotationsBox(e, t);
|
|
267
|
+
}
|
|
268
|
+
d(j, "setAnnotationsBox");
|
|
269
|
+
function M(e, t) {
|
|
270
|
+
x.setSize(e, t);
|
|
271
|
+
}
|
|
272
|
+
d(M, "setSize");
|
|
273
|
+
function N(e) {
|
|
274
|
+
x.startPipeline(e);
|
|
275
|
+
}
|
|
276
|
+
d(N, "startPipeline");
|
|
277
|
+
function P(e, t) {
|
|
278
|
+
x.addPipelineComponent(e, t);
|
|
279
|
+
}
|
|
280
|
+
d(P, "addPipelineComponent");
|
|
281
|
+
function F(e) {
|
|
282
|
+
let t = {};
|
|
283
|
+
e.xLabel && (t.xLabel = S(e.xLabel)), e.yLabel && (t.yLabel = S(e.yLabel)), e.stages && (t.stages = e.stages.map((e) => S(e))), e.stageBoundaries && (t.stageBoundaries = e.stageBoundaries), x.setAxes(t);
|
|
284
|
+
}
|
|
285
|
+
d(F, "updateAxes");
|
|
286
|
+
function I(e) {
|
|
287
|
+
return x.getNode(e);
|
|
288
|
+
}
|
|
289
|
+
d(I, "getNode");
|
|
290
|
+
function L() {
|
|
291
|
+
return x.build();
|
|
292
|
+
}
|
|
293
|
+
d(L, "getWardleyData");
|
|
294
|
+
function R() {
|
|
295
|
+
x.clear(), o();
|
|
296
|
+
}
|
|
297
|
+
d(R, "clear");
|
|
298
|
+
var z = {
|
|
299
|
+
getConfig: C,
|
|
300
|
+
addNode: w,
|
|
301
|
+
addLink: T,
|
|
302
|
+
addTrend: E,
|
|
303
|
+
addAnnotation: D,
|
|
304
|
+
addNote: O,
|
|
305
|
+
addAccelerator: k,
|
|
306
|
+
addDeaccelerator: A,
|
|
307
|
+
setAnnotationsBox: j,
|
|
308
|
+
setSize: M,
|
|
309
|
+
startPipeline: N,
|
|
310
|
+
addPipelineComponent: P,
|
|
311
|
+
updateAxes: F,
|
|
312
|
+
getNode: I,
|
|
313
|
+
getWardleyData: L,
|
|
314
|
+
clear: R,
|
|
315
|
+
setAccTitle: r,
|
|
316
|
+
getAccTitle: l,
|
|
317
|
+
setDiagramTitle: i,
|
|
318
|
+
getDiagramTitle: t,
|
|
319
|
+
getAccDescription: a,
|
|
320
|
+
setAccDescription: e
|
|
321
|
+
}, B = [
|
|
322
|
+
"Genesis",
|
|
323
|
+
"Custom Built",
|
|
324
|
+
"Product",
|
|
325
|
+
"Commodity"
|
|
326
|
+
], V = /* @__PURE__ */ d(() => {
|
|
327
|
+
let { themeVariables: e } = s();
|
|
328
|
+
return {
|
|
329
|
+
backgroundColor: e.wardley?.backgroundColor ?? e.background ?? "#fff",
|
|
330
|
+
axisColor: e.wardley?.axisColor ?? "#000",
|
|
331
|
+
axisTextColor: e.wardley?.axisTextColor ?? e.primaryTextColor ?? "#222",
|
|
332
|
+
gridColor: e.wardley?.gridColor ?? "rgba(100, 100, 100, 0.2)",
|
|
333
|
+
componentFill: e.wardley?.componentFill ?? "#fff",
|
|
334
|
+
componentStroke: e.wardley?.componentStroke ?? "#000",
|
|
335
|
+
componentLabelColor: e.wardley?.componentLabelColor ?? e.primaryTextColor ?? "#222",
|
|
336
|
+
linkStroke: e.wardley?.linkStroke ?? "#000",
|
|
337
|
+
evolutionStroke: e.wardley?.evolutionStroke ?? "#dc3545",
|
|
338
|
+
annotationStroke: e.wardley?.annotationStroke ?? "#000",
|
|
339
|
+
annotationTextColor: e.wardley?.annotationTextColor ?? e.primaryTextColor ?? "#222",
|
|
340
|
+
annotationFill: e.wardley?.annotationFill ?? e.background ?? "#fff"
|
|
341
|
+
};
|
|
342
|
+
}, "getTheme"), H = /* @__PURE__ */ d(() => {
|
|
343
|
+
let e = s()["wardley-beta"];
|
|
344
|
+
return {
|
|
345
|
+
width: e?.width ?? 900,
|
|
346
|
+
height: e?.height ?? 600,
|
|
347
|
+
padding: e?.padding ?? 48,
|
|
348
|
+
nodeRadius: e?.nodeRadius ?? 6,
|
|
349
|
+
nodeLabelOffset: e?.nodeLabelOffset ?? 8,
|
|
350
|
+
axisFontSize: e?.axisFontSize ?? 12,
|
|
351
|
+
labelFontSize: e?.labelFontSize ?? 10,
|
|
352
|
+
showGrid: e?.showGrid ?? !1,
|
|
353
|
+
useMaxWidth: e?.useMaxWidth ?? !0
|
|
354
|
+
};
|
|
355
|
+
}, "getConfigValues"), U = {
|
|
356
|
+
parser: b,
|
|
357
|
+
db: z,
|
|
358
|
+
renderer: { draw: /* @__PURE__ */ d((e, t, n, r) => {
|
|
359
|
+
u.debug("Rendering Wardley map\n" + e);
|
|
360
|
+
let i = H(), a = V(), o = i.nodeRadius * 1.6, s = r.db, l = s.getWardleyData(), p = s.getDiagramTitle(), m = l.size?.width ?? i.width, h = l.size?.height ?? i.height, g = f(t);
|
|
361
|
+
g.selectAll("*").remove(), c(g, h, m, i.useMaxWidth), g.attr("viewBox", `0 0 ${m} ${h}`);
|
|
362
|
+
let _ = g.append("g").attr("class", "wardley-map"), v = g.append("defs");
|
|
363
|
+
v.append("marker").attr("id", `arrow-${t}`).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerWidth", 6).attr("markerHeight", 6).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("fill", a.evolutionStroke).attr("stroke", "none"), v.append("marker").attr("id", `link-arrow-end-${t}`).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerWidth", 5).attr("markerHeight", 5).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("fill", a.linkStroke).attr("stroke", "none"), v.append("marker").attr("id", `link-arrow-start-${t}`).attr("viewBox", "0 0 10 10").attr("refX", 1).attr("refY", 5).attr("markerWidth", 5).attr("markerHeight", 5).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z").attr("fill", a.linkStroke).attr("stroke", "none"), _.append("rect").attr("class", "wardley-background").attr("width", m).attr("height", h).attr("fill", a.backgroundColor);
|
|
364
|
+
let y = m - i.padding * 2, b = h - i.padding * 2;
|
|
365
|
+
p && _.append("text").attr("class", "wardley-title").attr("x", m / 2).attr("y", i.padding / 2).attr("fill", a.axisTextColor).attr("font-size", i.axisFontSize * 1.05).attr("font-weight", "bold").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(p);
|
|
366
|
+
let x = /* @__PURE__ */ d((e) => i.padding + e / 100 * y, "projectX"), S = /* @__PURE__ */ d((e) => h - i.padding - e / 100 * b, "projectY"), C = _.append("g").attr("class", "wardley-axes");
|
|
367
|
+
C.append("line").attr("x1", i.padding).attr("x2", m - i.padding).attr("y1", h - i.padding).attr("y2", h - i.padding).attr("stroke", a.axisColor).attr("stroke-width", 1), C.append("line").attr("x1", i.padding).attr("x2", i.padding).attr("y1", i.padding).attr("y2", h - i.padding).attr("stroke", a.axisColor).attr("stroke-width", 1);
|
|
368
|
+
let w = l.axes.xLabel ?? "Evolution", T = l.axes.yLabel ?? "Visibility";
|
|
369
|
+
C.append("text").attr("class", "wardley-axis-label wardley-axis-label-x").attr("x", i.padding + y / 2).attr("y", h - i.padding / 4).attr("fill", a.axisTextColor).attr("font-size", i.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").text(w), C.append("text").attr("class", "wardley-axis-label wardley-axis-label-y").attr("x", i.padding / 3).attr("y", i.padding + b / 2).attr("fill", a.axisTextColor).attr("font-size", i.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").attr("transform", `rotate(-90 ${i.padding / 3} ${i.padding + b / 2})`).text(T);
|
|
370
|
+
let E = l.axes.stages && l.axes.stages.length > 0 ? l.axes.stages : B;
|
|
371
|
+
if (E.length > 0) {
|
|
372
|
+
let e = _.append("g").attr("class", "wardley-stages"), t = l.axes.stageBoundaries, n = [];
|
|
373
|
+
if (t && t.length === E.length) {
|
|
374
|
+
let e = 0;
|
|
375
|
+
t.forEach((t) => {
|
|
376
|
+
n.push({
|
|
377
|
+
start: e,
|
|
378
|
+
end: t
|
|
379
|
+
}), e = t;
|
|
380
|
+
});
|
|
381
|
+
} else {
|
|
382
|
+
let e = 1 / E.length;
|
|
383
|
+
E.forEach((t, r) => {
|
|
384
|
+
n.push({
|
|
385
|
+
start: r * e,
|
|
386
|
+
end: (r + 1) * e
|
|
387
|
+
});
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
E.forEach((t, r) => {
|
|
391
|
+
let o = n[r], s = i.padding + o.start * y, c = (s + (i.padding + o.end * y)) / 2;
|
|
392
|
+
r > 0 && e.append("line").attr("x1", s).attr("x2", s).attr("y1", i.padding).attr("y2", h - i.padding).attr("stroke", "#000").attr("stroke-width", 1).attr("stroke-dasharray", "5 5").attr("opacity", .8), e.append("text").attr("class", "wardley-stage-label").attr("x", c).attr("y", h - i.padding / 1.5).attr("fill", a.axisTextColor).attr("font-size", i.axisFontSize - 2).attr("text-anchor", "middle").text(t);
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
if (i.showGrid) {
|
|
396
|
+
let e = _.append("g").attr("class", "wardley-grid");
|
|
397
|
+
for (let t = 1; t < 4; t++) {
|
|
398
|
+
let n = t / 4, r = i.padding + y * n;
|
|
399
|
+
e.append("line").attr("x1", r).attr("x2", r).attr("y1", i.padding).attr("y2", h - i.padding).attr("stroke", a.gridColor).attr("stroke-dasharray", "2 6"), e.append("line").attr("x1", i.padding).attr("x2", m - i.padding).attr("y1", h - i.padding - b * n).attr("y2", h - i.padding - b * n).attr("stroke", a.gridColor).attr("stroke-dasharray", "2 6");
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
let D = /* @__PURE__ */ new Map();
|
|
403
|
+
if (l.nodes.forEach((e) => {
|
|
404
|
+
D.set(e.id, {
|
|
405
|
+
x: x(e.x),
|
|
406
|
+
y: S(e.y),
|
|
407
|
+
node: e
|
|
408
|
+
});
|
|
409
|
+
}), l.pipelines.length > 0) {
|
|
410
|
+
let e = _.append("g").attr("class", "wardley-pipelines"), t = _.append("g").attr("class", "wardley-pipeline-links");
|
|
411
|
+
l.pipelines.forEach((n) => {
|
|
412
|
+
if (n.componentIds.length === 0) return;
|
|
413
|
+
let r = n.componentIds.map((e) => ({
|
|
414
|
+
id: e,
|
|
415
|
+
pos: D.get(e),
|
|
416
|
+
node: l.nodes.find((t) => t.id === e)
|
|
417
|
+
})).filter((e) => e.pos && e.node).sort((e, t) => e.node.x - t.node.x);
|
|
418
|
+
for (let e = 0; e < r.length - 1; e++) {
|
|
419
|
+
let n = r[e], i = r[e + 1];
|
|
420
|
+
t.append("line").attr("class", "wardley-pipeline-evolution-link").attr("x1", n.pos.x).attr("y1", n.pos.y).attr("x2", i.pos.x).attr("y2", i.pos.y).attr("stroke", a.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4");
|
|
421
|
+
}
|
|
422
|
+
let s = Infinity, c = -Infinity, u = 0;
|
|
423
|
+
if (n.componentIds.forEach((e) => {
|
|
424
|
+
let t = D.get(e);
|
|
425
|
+
t && (s = Math.min(s, t.x), c = Math.max(c, t.x), u = t.y);
|
|
426
|
+
}), s !== Infinity && c !== -Infinity) {
|
|
427
|
+
let t = i.nodeRadius * 4, r = u - t / 2, l = D.get(n.nodeId);
|
|
428
|
+
l && (l.x = (s + c) / 2, l.y = r - o / 6), e.append("rect").attr("class", "wardley-pipeline-box").attr("x", s - 15).attr("y", r).attr("width", c - s + 30).attr("height", t).attr("fill", "none").attr("stroke", a.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
let O = _.append("g").attr("class", "wardley-links"), k = /* @__PURE__ */ new Map();
|
|
433
|
+
l.pipelines.forEach((e) => {
|
|
434
|
+
k.set(e.nodeId, new Set(e.componentIds));
|
|
435
|
+
});
|
|
436
|
+
let A = l.links.filter((e) => !(!D.has(e.source) || !D.has(e.target) || k.get(e.target)?.has(e.source)));
|
|
437
|
+
O.selectAll("line").data(A).enter().append("line").attr("class", (e) => `wardley-link${e.dashed ? " wardley-link--dashed" : ""}`).attr("x1", (e) => {
|
|
438
|
+
let t = D.get(e.source), n = D.get(e.target), r = l.nodes.find((t) => t.id === e.source).isPipelineParent ? o / Math.sqrt(2) : i.nodeRadius, a = n.x - t.x, s = n.y - t.y, c = Math.sqrt(a * a + s * s);
|
|
439
|
+
return t.x + a / c * r;
|
|
440
|
+
}).attr("y1", (e) => {
|
|
441
|
+
let t = D.get(e.source), n = D.get(e.target), r = l.nodes.find((t) => t.id === e.source).isPipelineParent ? o / Math.sqrt(2) : i.nodeRadius, a = n.x - t.x, s = n.y - t.y, c = Math.sqrt(a * a + s * s);
|
|
442
|
+
return t.y + s / c * r;
|
|
443
|
+
}).attr("x2", (e) => {
|
|
444
|
+
let t = D.get(e.source), n = D.get(e.target), r = l.nodes.find((t) => t.id === e.target).isPipelineParent ? o / Math.sqrt(2) : i.nodeRadius, a = t.x - n.x, s = t.y - n.y, c = Math.sqrt(a * a + s * s);
|
|
445
|
+
return n.x + a / c * r;
|
|
446
|
+
}).attr("y2", (e) => {
|
|
447
|
+
let t = D.get(e.source), n = D.get(e.target), r = l.nodes.find((t) => t.id === e.target).isPipelineParent ? o / Math.sqrt(2) : i.nodeRadius, a = t.x - n.x, s = t.y - n.y, c = Math.sqrt(a * a + s * s);
|
|
448
|
+
return n.y + s / c * r;
|
|
449
|
+
}).attr("stroke", a.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", (e) => e.dashed ? "6 6" : null).attr("marker-end", (e) => e.flow === "forward" || e.flow === "bidirectional" ? `url(#link-arrow-end-${t})` : null).attr("marker-start", (e) => e.flow === "backward" || e.flow === "bidirectional" ? `url(#link-arrow-start-${t})` : null), O.selectAll("text").data(A.filter((e) => e.label)).enter().append("text").attr("class", "wardley-link-label").attr("x", (e) => {
|
|
450
|
+
let t = D.get(e.source), n = D.get(e.target), r = (t.x + n.x) / 2, i = n.y - t.y, a = n.x - t.x;
|
|
451
|
+
return r + i / Math.sqrt(a * a + i * i) * 8;
|
|
452
|
+
}).attr("y", (e) => {
|
|
453
|
+
let t = D.get(e.source), n = D.get(e.target), r = (t.y + n.y) / 2, i = n.x - t.x, a = n.y - t.y, o = Math.sqrt(i * i + a * a);
|
|
454
|
+
return r + -i / o * 8;
|
|
455
|
+
}).attr("fill", a.axisTextColor).attr("font-size", i.labelFontSize).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("transform", (e) => {
|
|
456
|
+
let t = D.get(e.source), n = D.get(e.target), r = (t.x + n.x) / 2, i = (t.y + n.y) / 2, a = n.x - t.x, o = n.y - t.y, s = Math.sqrt(a * a + o * o), c = o / s, l = -a / s, u = r + c * 8, d = i + l * 8, f = Math.atan2(o, a) * 180 / Math.PI;
|
|
457
|
+
return (f > 90 || f < -90) && (f += 180), `rotate(${f} ${u} ${d})`;
|
|
458
|
+
}).text((e) => e.label);
|
|
459
|
+
let j = _.append("g").attr("class", "wardley-trends"), M = l.trends.map((e) => {
|
|
460
|
+
let t = D.get(e.nodeId);
|
|
461
|
+
if (!t) return null;
|
|
462
|
+
let n = x(e.targetX), r = S(e.targetY), a = n - t.x, o = r - t.y, s = Math.sqrt(a * a + o * o), c = i.nodeRadius + 2;
|
|
463
|
+
return {
|
|
464
|
+
origin: t,
|
|
465
|
+
targetX: n,
|
|
466
|
+
targetY: r,
|
|
467
|
+
adjustedX2: s > c ? n - a / s * c : n,
|
|
468
|
+
adjustedY2: s > c ? r - o / s * c : r
|
|
469
|
+
};
|
|
470
|
+
}).filter((e) => e !== null);
|
|
471
|
+
j.selectAll("line").data(M).enter().append("line").attr("class", "wardley-trend").attr("x1", (e) => e.origin.x).attr("y1", (e) => e.origin.y).attr("x2", (e) => e.adjustedX2).attr("y2", (e) => e.adjustedY2).attr("stroke", a.evolutionStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4").attr("marker-end", `url(#arrow-${t})`);
|
|
472
|
+
let N = _.append("g").attr("class", "wardley-nodes").selectAll("g").data(l.nodes).enter().append("g").attr("class", (e) => ["wardley-node", e.className ? `wardley-node--${e.className}` : ""].filter(Boolean).join(" "));
|
|
473
|
+
N.filter((e) => e.sourceStrategy === "outsource").append("circle").attr("class", "wardley-outsource-overlay").attr("cx", (e) => D.get(e.id).x).attr("cy", (e) => D.get(e.id).y).attr("r", i.nodeRadius * 2).attr("fill", "#666").attr("stroke", a.componentStroke).attr("stroke-width", 1), N.filter((e) => e.sourceStrategy === "buy").append("circle").attr("class", "wardley-buy-overlay").attr("cx", (e) => D.get(e.id).x).attr("cy", (e) => D.get(e.id).y).attr("r", i.nodeRadius * 2).attr("fill", "#ccc").attr("stroke", a.componentStroke).attr("stroke-width", 1), N.filter((e) => e.sourceStrategy === "build").append("circle").attr("class", "wardley-build-overlay").attr("cx", (e) => D.get(e.id).x).attr("cy", (e) => D.get(e.id).y).attr("r", i.nodeRadius * 2).attr("fill", "#eee").attr("stroke", "#000").attr("stroke-width", 1);
|
|
474
|
+
let P = N.filter((e) => e.sourceStrategy === "market");
|
|
475
|
+
P.append("circle").attr("class", "wardley-market-overlay").attr("cx", (e) => D.get(e.id).x).attr("cy", (e) => D.get(e.id).y).attr("r", i.nodeRadius * 2).attr("fill", "white").attr("stroke", a.componentStroke).attr("stroke-width", 1), N.filter((e) => !e.isPipelineParent && e.sourceStrategy !== "market" && e.className !== "anchor").append("circle").attr("cx", (e) => D.get(e.id).x).attr("cy", (e) => D.get(e.id).y).attr("r", i.nodeRadius).attr("fill", a.componentFill).attr("stroke", a.componentStroke).attr("stroke-width", 1);
|
|
476
|
+
let F = i.nodeRadius * .7, I = i.nodeRadius * 1.2;
|
|
477
|
+
if (P.append("line").attr("class", "wardley-market-line").attr("x1", (e) => D.get(e.id).x).attr("y1", (e) => D.get(e.id).y - I).attr("x2", (e) => D.get(e.id).x - I * Math.cos(Math.PI / 6)).attr("y2", (e) => D.get(e.id).y + I * Math.sin(Math.PI / 6)).attr("stroke", a.componentStroke).attr("stroke-width", 1), P.append("line").attr("class", "wardley-market-line").attr("x1", (e) => D.get(e.id).x - I * Math.cos(Math.PI / 6)).attr("y1", (e) => D.get(e.id).y + I * Math.sin(Math.PI / 6)).attr("x2", (e) => D.get(e.id).x + I * Math.cos(Math.PI / 6)).attr("y2", (e) => D.get(e.id).y + I * Math.sin(Math.PI / 6)).attr("stroke", a.componentStroke).attr("stroke-width", 1), P.append("line").attr("class", "wardley-market-line").attr("x1", (e) => D.get(e.id).x + I * Math.cos(Math.PI / 6)).attr("y1", (e) => D.get(e.id).y + I * Math.sin(Math.PI / 6)).attr("x2", (e) => D.get(e.id).x).attr("y2", (e) => D.get(e.id).y - I).attr("stroke", a.componentStroke).attr("stroke-width", 1), P.append("circle").attr("class", "wardley-market-dot").attr("cx", (e) => D.get(e.id).x).attr("cy", (e) => D.get(e.id).y - I).attr("r", F).attr("fill", "white").attr("stroke", a.componentStroke).attr("stroke-width", 2), P.append("circle").attr("class", "wardley-market-dot").attr("cx", (e) => D.get(e.id).x - I * Math.cos(Math.PI / 6)).attr("cy", (e) => D.get(e.id).y + I * Math.sin(Math.PI / 6)).attr("r", F).attr("fill", "white").attr("stroke", a.componentStroke).attr("stroke-width", 2), P.append("circle").attr("class", "wardley-market-dot").attr("cx", (e) => D.get(e.id).x + I * Math.cos(Math.PI / 6)).attr("cy", (e) => D.get(e.id).y + I * Math.sin(Math.PI / 6)).attr("r", F).attr("fill", "white").attr("stroke", a.componentStroke).attr("stroke-width", 2), N.filter((e) => e.isPipelineParent === !0).append("rect").attr("x", (e) => D.get(e.id).x - o / 2).attr("y", (e) => D.get(e.id).y - o / 2).attr("width", o).attr("height", o).attr("fill", a.componentFill).attr("stroke", a.componentStroke).attr("stroke-width", 1), N.filter((e) => e.inertia === !0).append("line").attr("class", "wardley-inertia").attr("x1", (e) => {
|
|
478
|
+
let t = D.get(e.id), n = e.isPipelineParent ? o / 2 + 15 : i.nodeRadius + 15;
|
|
479
|
+
return e.sourceStrategy && (n += i.nodeRadius + 10), t.x + n;
|
|
480
|
+
}).attr("y1", (e) => {
|
|
481
|
+
let t = D.get(e.id), n = e.isPipelineParent ? o : i.nodeRadius * 2;
|
|
482
|
+
return t.y - n / 2;
|
|
483
|
+
}).attr("x2", (e) => {
|
|
484
|
+
let t = D.get(e.id), n = e.isPipelineParent ? o / 2 + 15 : i.nodeRadius + 15;
|
|
485
|
+
return e.sourceStrategy && (n += i.nodeRadius + 10), t.x + n;
|
|
486
|
+
}).attr("y2", (e) => {
|
|
487
|
+
let t = D.get(e.id), n = e.isPipelineParent ? o : i.nodeRadius * 2;
|
|
488
|
+
return t.y + n / 2;
|
|
489
|
+
}).attr("stroke", a.componentStroke).attr("stroke-width", 6), N.append("text").attr("x", (e) => {
|
|
490
|
+
let t = D.get(e.id);
|
|
491
|
+
if (e.className === "anchor") return e.labelOffsetX === void 0 ? t.x : t.x + e.labelOffsetX;
|
|
492
|
+
let n = i.nodeLabelOffset;
|
|
493
|
+
e.sourceStrategy && e.labelOffsetX === void 0 && (n += 10);
|
|
494
|
+
let r = e.labelOffsetX ?? n;
|
|
495
|
+
return t.x + r;
|
|
496
|
+
}).attr("y", (e) => {
|
|
497
|
+
let t = D.get(e.id);
|
|
498
|
+
if (e.className === "anchor") return e.labelOffsetY === void 0 ? t.y - 3 : t.y + e.labelOffsetY;
|
|
499
|
+
let n = -i.nodeLabelOffset;
|
|
500
|
+
e.sourceStrategy && e.labelOffsetY === void 0 && (n -= 10);
|
|
501
|
+
let r = e.labelOffsetY ?? n;
|
|
502
|
+
return t.y + r;
|
|
503
|
+
}).attr("class", "wardley-node-label").attr("fill", (e) => e.className === "evolved" ? a.evolutionStroke : e.className === "anchor" ? "#000" : a.componentLabelColor).attr("font-size", i.labelFontSize).attr("font-weight", (e) => e.className === "anchor" ? "bold" : "normal").attr("text-anchor", (e) => e.className === "anchor" ? "middle" : "start").attr("dominant-baseline", (e) => e.className === "anchor" ? "middle" : "auto").text((e) => e.label), l.annotations.length > 0) {
|
|
504
|
+
let e = _.append("g").attr("class", "wardley-annotations");
|
|
505
|
+
if (l.annotations.forEach((t) => {
|
|
506
|
+
let n = t.coordinates.map((e) => ({
|
|
507
|
+
x: x(e.x),
|
|
508
|
+
y: S(e.y)
|
|
509
|
+
}));
|
|
510
|
+
if (n.length > 1) for (let t = 0; t < n.length - 1; t++) e.append("line").attr("class", "wardley-annotation-line").attr("x1", n[t].x).attr("y1", n[t].y).attr("x2", n[t + 1].x).attr("y2", n[t + 1].y).attr("stroke", a.axisColor).attr("stroke-width", 1.5).attr("stroke-dasharray", "4 4");
|
|
511
|
+
n.forEach((n) => {
|
|
512
|
+
let r = e.append("g").attr("class", "wardley-annotation");
|
|
513
|
+
r.append("circle").attr("cx", n.x).attr("cy", n.y).attr("r", 10).attr("fill", "white").attr("stroke", a.axisColor).attr("stroke-width", 1.5), r.append("text").attr("x", n.x).attr("y", n.y).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", 10).attr("fill", a.axisTextColor).attr("font-weight", "bold").text(t.number);
|
|
514
|
+
});
|
|
515
|
+
}), l.annotationsBox) {
|
|
516
|
+
let t = x(l.annotationsBox.x), n = S(l.annotationsBox.y), r = e.append("g").attr("class", "wardley-annotations-box"), o = [...l.annotations].filter((e) => e.text).sort((e, t) => e.number - t.number), s = [];
|
|
517
|
+
if (o.forEach((e, i) => {
|
|
518
|
+
let o = r.append("text").attr("x", t + 10).attr("y", n + 10 + (i + 1) * 16).attr("font-size", 11).attr("fill", a.axisTextColor).attr("text-anchor", "start").attr("dominant-baseline", "middle").text(`${e.number}. ${e.text}`);
|
|
519
|
+
s.push(o);
|
|
520
|
+
}), s.length > 0) {
|
|
521
|
+
let e = 0, c = 0;
|
|
522
|
+
s.forEach((t) => {
|
|
523
|
+
let n = t.node(), r = n.getComputedTextLength();
|
|
524
|
+
e = Math.max(e, r);
|
|
525
|
+
let i = n.getBBox();
|
|
526
|
+
c = Math.max(c, i.height);
|
|
527
|
+
});
|
|
528
|
+
let l = e + 20 + 105, u = o.length * 16 + 20 + c / 2, d = i.padding, f = m - i.padding - l, p = i.padding, g = h - i.padding - u;
|
|
529
|
+
t = Math.max(d, Math.min(t, f)), n = Math.max(p, Math.min(n, g)), s.forEach((e, r) => {
|
|
530
|
+
e.attr("x", t + 10).attr("y", n + 10 + (r + 1) * 16);
|
|
531
|
+
}), r.insert("rect", "text").attr("x", t).attr("y", n).attr("width", l).attr("height", u).attr("fill", "white").attr("stroke", a.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
if (l.notes.length > 0) {
|
|
536
|
+
let e = _.append("g").attr("class", "wardley-notes");
|
|
537
|
+
l.notes.forEach((t) => {
|
|
538
|
+
let n = x(t.x), r = S(t.y);
|
|
539
|
+
e.append("text").attr("x", n).attr("y", r).attr("text-anchor", "start").attr("font-size", 11).attr("fill", a.axisTextColor).attr("font-weight", "bold").text(t.text);
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
if (l.accelerators.length > 0) {
|
|
543
|
+
let e = _.append("g").attr("class", "wardley-accelerators");
|
|
544
|
+
l.accelerators.forEach((t) => {
|
|
545
|
+
let n = x(t.x), r = S(t.y), i = `
|
|
546
|
+
M ${n} ${r - 30 / 2}
|
|
547
|
+
L ${n + 60 - 20} ${r - 30 / 2}
|
|
548
|
+
L ${n + 60 - 20} ${r - 30 / 2 - 8}
|
|
549
|
+
L ${n + 60} ${r}
|
|
550
|
+
L ${n + 60 - 20} ${r + 30 / 2 + 8}
|
|
551
|
+
L ${n + 60 - 20} ${r + 30 / 2}
|
|
552
|
+
L ${n} ${r + 30 / 2}
|
|
553
|
+
Z
|
|
554
|
+
`;
|
|
555
|
+
e.append("path").attr("d", i).attr("fill", "white").attr("stroke", a.componentStroke).attr("stroke-width", 1), e.append("text").attr("x", n + 60 / 2).attr("y", r + 30 / 2 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", a.axisTextColor).attr("font-weight", "bold").text(t.name);
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
if (l.deaccelerators.length > 0) {
|
|
559
|
+
let e = _.append("g").attr("class", "wardley-deaccelerators");
|
|
560
|
+
l.deaccelerators.forEach((t) => {
|
|
561
|
+
let n = x(t.x), r = S(t.y), i = `
|
|
562
|
+
M ${n + 60} ${r - 30 / 2}
|
|
563
|
+
L ${n + 20} ${r - 30 / 2}
|
|
564
|
+
L ${n + 20} ${r - 30 / 2 - 8}
|
|
565
|
+
L ${n} ${r}
|
|
566
|
+
L ${n + 20} ${r + 30 / 2 + 8}
|
|
567
|
+
L ${n + 20} ${r + 30 / 2}
|
|
568
|
+
L ${n + 60} ${r + 30 / 2}
|
|
569
|
+
Z
|
|
570
|
+
`;
|
|
571
|
+
e.append("path").attr("d", i).attr("fill", "white").attr("stroke", a.componentStroke).attr("stroke-width", 1), e.append("text").attr("x", n + 60 / 2).attr("y", r + 30 / 2 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", a.axisTextColor).attr("font-weight", "bold").text(t.name);
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
}, "draw") },
|
|
575
|
+
styles: /* @__PURE__ */ d(() => "", "styles")
|
|
576
|
+
};
|
|
577
|
+
//#endregion
|
|
578
|
+
export { U as diagram };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
require(`./chunk-D-IZpNpi.cjs`);const e=require(`./chunk-ICPOFSXX-hY6BIZ4Y.cjs`),t=require(`./src-DFxq-N5I.cjs`),n=require(`./chunk-426QAEUC-CqN26l3E.cjs`),r=require(`./chunk-4BX2VUAB-Qba52sxc.cjs`),i=require(`./mermaid-parser.core-DHpvGOZR.cjs`);var a=t.h((e,t)=>{let n=e<=1?e*100:e;if(n<0||n>100)throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return n},`toPercent`),o=t.h((e,t,n)=>({x:a(t,`${n} evolution`),y:a(e,`${n} visibility`)}),`toCoordinates`),s=t.h(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),c=t.h(e=>{if(!e?.startsWith(`+`))return{};let t=/^\+'([^']*)'/.exec(e)?.[1];return e.includes(`<>`)?{flow:`bidirectional`,label:t}:e.includes(`<`)?{flow:`backward`,label:t}:e.includes(`>`)?{flow:`forward`,label:t}:{label:t}},`extractFlowFromArrow`),l=t.h((e,t)=>{if(r.t(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let n=e.evolution.stages.map(e=>e.secondName?`${e.name.trim()} / ${e.secondName.trim()}`:e.name.trim()),r=e.evolution.stages.filter(e=>e.boundary!==void 0).map(e=>e.boundary);t.updateAxes({stages:n,stageBoundaries:r})}if(e.anchors.forEach(e=>{let n=o(e.visibility,e.evolution,`Anchor "${e.name}"`);t.addNode(e.name,e.name,n.x,n.y,`anchor`)}),e.components.forEach(e=>{let n=o(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,a=e.decorator?.strategy;t.addNode(e.name,e.name,n.x,n.y,`component`,r,i,e.inertia,a)}),e.notes.forEach(e=>{let n=o(e.visibility,e.evolution,`Note "${e.text}"`);t.addNote(e.text,n.x,n.y)}),e.pipelines.forEach(e=>{let n=t.getNode(e.parent);if(!n||typeof n.y!=`number`)throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);let r=n.y;t.startPipeline(e.parent),e.components.forEach(n=>{let i=`${e.parent}_${n.name}`,o=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,s=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,c=a(n.evolution,`Pipeline component "${n.name}" evolution`);t.addNode(i,n.name,c,r,`pipeline-component`,o,s),t.addPipelineComponent(e.parent,i)})}),e.links.forEach(e=>{let n=!!e.arrow&&(e.arrow.includes(`-.->`)||e.arrow.includes(`.-.`)),r=s(e.fromPort)??s(e.toPort),{flow:i,label:a}=c(e.arrow);!r&&i&&(r=i);let o=e.linkLabel,l=a??o;t.addLink(e.from,e.to,n,l,r)}),e.evolves.forEach(e=>{let n=t.getNode(e.component);if(n?.y!==void 0){let r=a(e.target,`Evolve target for "${e.component}"`);t.addTrend(e.component,r,n.y)}}),e.annotations.length>0){let n=e.annotations[0],r=o(n.x,n.y,`Annotations box`);t.setAnnotationsBox(r.x,r.y)}e.annotation.forEach(e=>{let n=o(e.x,e.y,`Annotation ${e.number}`);t.addAnnotation(e.number,[{x:n.x,y:n.y}],e.text)}),e.accelerators.forEach(e=>{let n=o(e.x,e.y,`Accelerator "${e.name}"`);t.addAccelerator(e.name,n.x,n.y)}),e.deaccelerators.forEach(e=>{let n=o(e.x,e.y,`Deaccelerator "${e.name}"`);t.addDeaccelerator(e.name,n.x,n.y)})},`populateDb`),u={parser:{yy:void 0},parse:t.h(async e=>{let n=await i.t(`wardley`,e);t.g.debug(n);let r=u.parser?.yy;if(!r||typeof r.addNode!=`function`)throw Error(`parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);l(n,r)},`parse`)},d=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{t.h(this,`WardleyBuilder`)}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},n={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,n)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let n=this.pipelines.get(e);n&&n.componentIds.push(t);let r=this.nodes.get(t);r&&(r.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!=`number`||typeof t.y!=`number`)throw Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function f(t){let n=e.b();return e.L(t.trim(),n)}t.h(f,`textSanitizer`);function p(){return e.b()[`wardley-beta`]}t.h(p,`getConfig`);function m(e,t,n,r,i,a,o,s,c){d.addNode({id:e,label:f(t),x:n,y:r,className:i,labelOffsetX:a,labelOffsetY:o,inertia:s,sourceStrategy:c})}t.h(m,`addNode`);function h(e,t,n=!1,r,i){d.addLink({source:e,target:t,dashed:n,label:r,flow:i})}t.h(h,`addLink`);function g(e,t,n){d.addTrend({nodeId:e,targetX:t,targetY:n})}t.h(g,`addTrend`);function _(e,t,n){d.addAnnotation({number:e,coordinates:t,text:n?f(n):void 0})}t.h(_,`addAnnotation`);function v(e,t,n){d.addNote({text:f(e),x:t,y:n})}t.h(v,`addNote`);function y(e,t,n){d.addAccelerator({name:f(e),x:t,y:n})}t.h(y,`addAccelerator`);function b(e,t,n){d.addDeaccelerator({name:f(e),x:t,y:n})}t.h(b,`addDeaccelerator`);function x(e,t){d.setAnnotationsBox(e,t)}t.h(x,`setAnnotationsBox`);function S(e,t){d.setSize(e,t)}t.h(S,`setSize`);function C(e){d.startPipeline(e)}t.h(C,`startPipeline`);function w(e,t){d.addPipelineComponent(e,t)}t.h(w,`addPipelineComponent`);function T(e){let t={};e.xLabel&&(t.xLabel=f(e.xLabel)),e.yLabel&&(t.yLabel=f(e.yLabel)),e.stages&&(t.stages=e.stages.map(e=>f(e))),e.stageBoundaries&&(t.stageBoundaries=e.stageBoundaries),d.setAxes(t)}t.h(T,`updateAxes`);function E(e){return d.getNode(e)}t.h(E,`getNode`);function D(){return d.build()}t.h(D,`getWardleyData`);function O(){d.clear(),e.a()}t.h(O,`clear`);var k={getConfig:p,addNode:m,addLink:h,addTrend:g,addAnnotation:_,addNote:v,addAccelerator:y,addDeaccelerator:b,setAnnotationsBox:x,setSize:S,startPipeline:C,addPipelineComponent:w,updateAxes:T,getNode:E,getWardleyData:D,clear:O,setAccTitle:e.V,getAccTitle:e.v,setDiagramTitle:e.W,getDiagramTitle:e.C,getAccDescription:e._,setAccDescription:e.B},A=[`Genesis`,`Custom Built`,`Product`,`Commodity`],j=t.h(()=>{let{themeVariables:t}=e.b();return{backgroundColor:t.wardley?.backgroundColor??t.background??`#fff`,axisColor:t.wardley?.axisColor??`#000`,axisTextColor:t.wardley?.axisTextColor??t.primaryTextColor??`#222`,gridColor:t.wardley?.gridColor??`rgba(100, 100, 100, 0.2)`,componentFill:t.wardley?.componentFill??`#fff`,componentStroke:t.wardley?.componentStroke??`#000`,componentLabelColor:t.wardley?.componentLabelColor??t.primaryTextColor??`#222`,linkStroke:t.wardley?.linkStroke??`#000`,evolutionStroke:t.wardley?.evolutionStroke??`#dc3545`,annotationStroke:t.wardley?.annotationStroke??`#000`,annotationTextColor:t.wardley?.annotationTextColor??t.primaryTextColor??`#222`,annotationFill:t.wardley?.annotationFill??t.background??`#fff`}},`getTheme`),M=t.h(()=>{let t=e.b()[`wardley-beta`];return{width:t?.width??900,height:t?.height??600,padding:t?.padding??48,nodeRadius:t?.nodeRadius??6,nodeLabelOffset:t?.nodeLabelOffset??8,axisFontSize:t?.axisFontSize??12,labelFontSize:t?.labelFontSize??10,showGrid:t?.showGrid??!1,useMaxWidth:t?.useMaxWidth??!0}},`getConfigValues`),N={parser:u,db:k,renderer:{draw:t.h((r,i,a,o)=>{t.g.debug(`Rendering Wardley map
|
|
2
|
+
`+r);let s=M(),c=j(),l=s.nodeRadius*1.6,u=o.db,d=u.getWardleyData(),f=u.getDiagramTitle(),p=d.size?.width??s.width,m=d.size?.height??s.height,h=n.t(i);h.selectAll(`*`).remove(),e.c(h,m,p,s.useMaxWidth),h.attr(`viewBox`,`0 0 ${p} ${m}`);let g=h.append(`g`).attr(`class`,`wardley-map`),_=h.append(`defs`);_.append(`marker`).attr(`id`,`arrow-${i}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,c.evolutionStroke).attr(`stroke`,`none`),_.append(`marker`).attr(`id`,`link-arrow-end-${i}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,c.linkStroke).attr(`stroke`,`none`),_.append(`marker`).attr(`id`,`link-arrow-start-${i}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,1).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`).attr(`fill`,c.linkStroke).attr(`stroke`,`none`),g.append(`rect`).attr(`class`,`wardley-background`).attr(`width`,p).attr(`height`,m).attr(`fill`,c.backgroundColor);let v=p-s.padding*2,y=m-s.padding*2;f&&g.append(`text`).attr(`class`,`wardley-title`).attr(`x`,p/2).attr(`y`,s.padding/2).attr(`fill`,c.axisTextColor).attr(`font-size`,s.axisFontSize*1.05).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let b=t.h(e=>s.padding+e/100*v,`projectX`),x=t.h(e=>m-s.padding-e/100*y,`projectY`),S=g.append(`g`).attr(`class`,`wardley-axes`);S.append(`line`).attr(`x1`,s.padding).attr(`x2`,p-s.padding).attr(`y1`,m-s.padding).attr(`y2`,m-s.padding).attr(`stroke`,c.axisColor).attr(`stroke-width`,1),S.append(`line`).attr(`x1`,s.padding).attr(`x2`,s.padding).attr(`y1`,s.padding).attr(`y2`,m-s.padding).attr(`stroke`,c.axisColor).attr(`stroke-width`,1);let C=d.axes.xLabel??`Evolution`,w=d.axes.yLabel??`Visibility`;S.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-x`).attr(`x`,s.padding+v/2).attr(`y`,m-s.padding/4).attr(`fill`,c.axisTextColor).attr(`font-size`,s.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).text(C),S.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-y`).attr(`x`,s.padding/3).attr(`y`,s.padding+y/2).attr(`fill`,c.axisTextColor).attr(`font-size`,s.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`transform`,`rotate(-90 ${s.padding/3} ${s.padding+y/2})`).text(w);let T=d.axes.stages&&d.axes.stages.length>0?d.axes.stages:A;if(T.length>0){let e=g.append(`g`).attr(`class`,`wardley-stages`),t=d.axes.stageBoundaries,n=[];if(t&&t.length===T.length){let e=0;t.forEach(t=>{n.push({start:e,end:t}),e=t})}else{let e=1/T.length;T.forEach((t,r)=>{n.push({start:r*e,end:(r+1)*e})})}T.forEach((t,r)=>{let i=n[r],a=s.padding+i.start*v,o=(a+(s.padding+i.end*v))/2;r>0&&e.append(`line`).attr(`x1`,a).attr(`x2`,a).attr(`y1`,s.padding).attr(`y2`,m-s.padding).attr(`stroke`,`#000`).attr(`stroke-width`,1).attr(`stroke-dasharray`,`5 5`).attr(`opacity`,.8),e.append(`text`).attr(`class`,`wardley-stage-label`).attr(`x`,o).attr(`y`,m-s.padding/1.5).attr(`fill`,c.axisTextColor).attr(`font-size`,s.axisFontSize-2).attr(`text-anchor`,`middle`).text(t)})}if(s.showGrid){let e=g.append(`g`).attr(`class`,`wardley-grid`);for(let t=1;t<4;t++){let n=t/4,r=s.padding+v*n;e.append(`line`).attr(`x1`,r).attr(`x2`,r).attr(`y1`,s.padding).attr(`y2`,m-s.padding).attr(`stroke`,c.gridColor).attr(`stroke-dasharray`,`2 6`),e.append(`line`).attr(`x1`,s.padding).attr(`x2`,p-s.padding).attr(`y1`,m-s.padding-y*n).attr(`y2`,m-s.padding-y*n).attr(`stroke`,c.gridColor).attr(`stroke-dasharray`,`2 6`)}}let E=new Map;if(d.nodes.forEach(e=>{E.set(e.id,{x:b(e.x),y:x(e.y),node:e})}),d.pipelines.length>0){let e=g.append(`g`).attr(`class`,`wardley-pipelines`),t=g.append(`g`).attr(`class`,`wardley-pipeline-links`);d.pipelines.forEach(n=>{if(n.componentIds.length===0)return;let r=n.componentIds.map(e=>({id:e,pos:E.get(e),node:d.nodes.find(t=>t.id===e)})).filter(e=>e.pos&&e.node).sort((e,t)=>e.node.x-t.node.x);for(let e=0;e<r.length-1;e++){let n=r[e],i=r[e+1];t.append(`line`).attr(`class`,`wardley-pipeline-evolution-link`).attr(`x1`,n.pos.x).attr(`y1`,n.pos.y).attr(`x2`,i.pos.x).attr(`y2`,i.pos.y).attr(`stroke`,c.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`)}let i=1/0,a=-1/0,o=0;if(n.componentIds.forEach(e=>{let t=E.get(e);t&&(i=Math.min(i,t.x),a=Math.max(a,t.x),o=t.y)}),i!==1/0&&a!==-1/0){let t=s.nodeRadius*4,r=o-t/2,u=E.get(n.nodeId);u&&(u.x=(i+a)/2,u.y=r-l/6),e.append(`rect`).attr(`class`,`wardley-pipeline-box`).attr(`x`,i-15).attr(`y`,r).attr(`width`,a-i+30).attr(`height`,t).attr(`fill`,`none`).attr(`stroke`,c.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}})}let D=g.append(`g`).attr(`class`,`wardley-links`),O=new Map;d.pipelines.forEach(e=>{O.set(e.nodeId,new Set(e.componentIds))});let k=d.links.filter(e=>!(!E.has(e.source)||!E.has(e.target)||O.get(e.target)?.has(e.source)));D.selectAll(`line`).data(k).enter().append(`line`).attr(`class`,e=>`wardley-link${e.dashed?` wardley-link--dashed`:``}`).attr(`x1`,e=>{let t=E.get(e.source),n=E.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):s.nodeRadius,i=n.x-t.x,a=n.y-t.y,o=Math.sqrt(i*i+a*a);return t.x+i/o*r}).attr(`y1`,e=>{let t=E.get(e.source),n=E.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):s.nodeRadius,i=n.x-t.x,a=n.y-t.y,o=Math.sqrt(i*i+a*a);return t.y+a/o*r}).attr(`x2`,e=>{let t=E.get(e.source),n=E.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):s.nodeRadius,i=t.x-n.x,a=t.y-n.y,o=Math.sqrt(i*i+a*a);return n.x+i/o*r}).attr(`y2`,e=>{let t=E.get(e.source),n=E.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):s.nodeRadius,i=t.x-n.x,a=t.y-n.y,o=Math.sqrt(i*i+a*a);return n.y+a/o*r}).attr(`stroke`,c.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,e=>e.dashed?`6 6`:null).attr(`marker-end`,e=>e.flow===`forward`||e.flow===`bidirectional`?`url(#link-arrow-end-${i})`:null).attr(`marker-start`,e=>e.flow===`backward`||e.flow===`bidirectional`?`url(#link-arrow-start-${i})`:null),D.selectAll(`text`).data(k.filter(e=>e.label)).enter().append(`text`).attr(`class`,`wardley-link-label`).attr(`x`,e=>{let t=E.get(e.source),n=E.get(e.target),r=(t.x+n.x)/2,i=n.y-t.y,a=n.x-t.x;return r+i/Math.sqrt(a*a+i*i)*8}).attr(`y`,e=>{let t=E.get(e.source),n=E.get(e.target),r=(t.y+n.y)/2,i=n.x-t.x,a=n.y-t.y,o=Math.sqrt(i*i+a*a);return r+-i/o*8}).attr(`fill`,c.axisTextColor).attr(`font-size`,s.labelFontSize).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`transform`,e=>{let t=E.get(e.source),n=E.get(e.target),r=(t.x+n.x)/2,i=(t.y+n.y)/2,a=n.x-t.x,o=n.y-t.y,s=Math.sqrt(a*a+o*o),c=o/s,l=-a/s,u=r+c*8,d=i+l*8,f=Math.atan2(o,a)*180/Math.PI;return(f>90||f<-90)&&(f+=180),`rotate(${f} ${u} ${d})`}).text(e=>e.label);let N=g.append(`g`).attr(`class`,`wardley-trends`),P=d.trends.map(e=>{let t=E.get(e.nodeId);if(!t)return null;let n=b(e.targetX),r=x(e.targetY),i=n-t.x,a=r-t.y,o=Math.sqrt(i*i+a*a),c=s.nodeRadius+2;return{origin:t,targetX:n,targetY:r,adjustedX2:o>c?n-i/o*c:n,adjustedY2:o>c?r-a/o*c:r}}).filter(e=>e!==null);N.selectAll(`line`).data(P).enter().append(`line`).attr(`class`,`wardley-trend`).attr(`x1`,e=>e.origin.x).attr(`y1`,e=>e.origin.y).attr(`x2`,e=>e.adjustedX2).attr(`y2`,e=>e.adjustedY2).attr(`stroke`,c.evolutionStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`).attr(`marker-end`,`url(#arrow-${i})`);let F=g.append(`g`).attr(`class`,`wardley-nodes`).selectAll(`g`).data(d.nodes).enter().append(`g`).attr(`class`,e=>[`wardley-node`,e.className?`wardley-node--${e.className}`:``].filter(Boolean).join(` `));F.filter(e=>e.sourceStrategy===`outsource`).append(`circle`).attr(`class`,`wardley-outsource-overlay`).attr(`cx`,e=>E.get(e.id).x).attr(`cy`,e=>E.get(e.id).y).attr(`r`,s.nodeRadius*2).attr(`fill`,`#666`).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),F.filter(e=>e.sourceStrategy===`buy`).append(`circle`).attr(`class`,`wardley-buy-overlay`).attr(`cx`,e=>E.get(e.id).x).attr(`cy`,e=>E.get(e.id).y).attr(`r`,s.nodeRadius*2).attr(`fill`,`#ccc`).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),F.filter(e=>e.sourceStrategy===`build`).append(`circle`).attr(`class`,`wardley-build-overlay`).attr(`cx`,e=>E.get(e.id).x).attr(`cy`,e=>E.get(e.id).y).attr(`r`,s.nodeRadius*2).attr(`fill`,`#eee`).attr(`stroke`,`#000`).attr(`stroke-width`,1);let I=F.filter(e=>e.sourceStrategy===`market`);I.append(`circle`).attr(`class`,`wardley-market-overlay`).attr(`cx`,e=>E.get(e.id).x).attr(`cy`,e=>E.get(e.id).y).attr(`r`,s.nodeRadius*2).attr(`fill`,`white`).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),F.filter(e=>!e.isPipelineParent&&e.sourceStrategy!==`market`&&e.className!==`anchor`).append(`circle`).attr(`cx`,e=>E.get(e.id).x).attr(`cy`,e=>E.get(e.id).y).attr(`r`,s.nodeRadius).attr(`fill`,c.componentFill).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1);let L=s.nodeRadius*.7,R=s.nodeRadius*1.2;if(I.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>E.get(e.id).x).attr(`y1`,e=>E.get(e.id).y-R).attr(`x2`,e=>E.get(e.id).x-R*Math.cos(Math.PI/6)).attr(`y2`,e=>E.get(e.id).y+R*Math.sin(Math.PI/6)).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),I.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>E.get(e.id).x-R*Math.cos(Math.PI/6)).attr(`y1`,e=>E.get(e.id).y+R*Math.sin(Math.PI/6)).attr(`x2`,e=>E.get(e.id).x+R*Math.cos(Math.PI/6)).attr(`y2`,e=>E.get(e.id).y+R*Math.sin(Math.PI/6)).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),I.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>E.get(e.id).x+R*Math.cos(Math.PI/6)).attr(`y1`,e=>E.get(e.id).y+R*Math.sin(Math.PI/6)).attr(`x2`,e=>E.get(e.id).x).attr(`y2`,e=>E.get(e.id).y-R).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),I.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>E.get(e.id).x).attr(`cy`,e=>E.get(e.id).y-R).attr(`r`,L).attr(`fill`,`white`).attr(`stroke`,c.componentStroke).attr(`stroke-width`,2),I.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>E.get(e.id).x-R*Math.cos(Math.PI/6)).attr(`cy`,e=>E.get(e.id).y+R*Math.sin(Math.PI/6)).attr(`r`,L).attr(`fill`,`white`).attr(`stroke`,c.componentStroke).attr(`stroke-width`,2),I.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>E.get(e.id).x+R*Math.cos(Math.PI/6)).attr(`cy`,e=>E.get(e.id).y+R*Math.sin(Math.PI/6)).attr(`r`,L).attr(`fill`,`white`).attr(`stroke`,c.componentStroke).attr(`stroke-width`,2),F.filter(e=>e.isPipelineParent===!0).append(`rect`).attr(`x`,e=>E.get(e.id).x-l/2).attr(`y`,e=>E.get(e.id).y-l/2).attr(`width`,l).attr(`height`,l).attr(`fill`,c.componentFill).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),F.filter(e=>e.inertia===!0).append(`line`).attr(`class`,`wardley-inertia`).attr(`x1`,e=>{let t=E.get(e.id),n=e.isPipelineParent?l/2+15:s.nodeRadius+15;return e.sourceStrategy&&(n+=s.nodeRadius+10),t.x+n}).attr(`y1`,e=>{let t=E.get(e.id),n=e.isPipelineParent?l:s.nodeRadius*2;return t.y-n/2}).attr(`x2`,e=>{let t=E.get(e.id),n=e.isPipelineParent?l/2+15:s.nodeRadius+15;return e.sourceStrategy&&(n+=s.nodeRadius+10),t.x+n}).attr(`y2`,e=>{let t=E.get(e.id),n=e.isPipelineParent?l:s.nodeRadius*2;return t.y+n/2}).attr(`stroke`,c.componentStroke).attr(`stroke-width`,6),F.append(`text`).attr(`x`,e=>{let t=E.get(e.id);if(e.className===`anchor`)return e.labelOffsetX===void 0?t.x:t.x+e.labelOffsetX;let n=s.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetX===void 0&&(n+=10);let r=e.labelOffsetX??n;return t.x+r}).attr(`y`,e=>{let t=E.get(e.id);if(e.className===`anchor`)return e.labelOffsetY===void 0?t.y-3:t.y+e.labelOffsetY;let n=-s.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetY===void 0&&(n-=10);let r=e.labelOffsetY??n;return t.y+r}).attr(`class`,`wardley-node-label`).attr(`fill`,e=>e.className===`evolved`?c.evolutionStroke:e.className===`anchor`?`#000`:c.componentLabelColor).attr(`font-size`,s.labelFontSize).attr(`font-weight`,e=>e.className===`anchor`?`bold`:`normal`).attr(`text-anchor`,e=>e.className===`anchor`?`middle`:`start`).attr(`dominant-baseline`,e=>e.className===`anchor`?`middle`:`auto`).text(e=>e.label),d.annotations.length>0){let e=g.append(`g`).attr(`class`,`wardley-annotations`);if(d.annotations.forEach(t=>{let n=t.coordinates.map(e=>({x:b(e.x),y:x(e.y)}));if(n.length>1)for(let t=0;t<n.length-1;t++)e.append(`line`).attr(`class`,`wardley-annotation-line`).attr(`x1`,n[t].x).attr(`y1`,n[t].y).attr(`x2`,n[t+1].x).attr(`y2`,n[t+1].y).attr(`stroke`,c.axisColor).attr(`stroke-width`,1.5).attr(`stroke-dasharray`,`4 4`);n.forEach(n=>{let r=e.append(`g`).attr(`class`,`wardley-annotation`);r.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`fill`,`white`).attr(`stroke`,c.axisColor).attr(`stroke-width`,1.5),r.append(`text`).attr(`x`,n.x).attr(`y`,n.y).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).attr(`font-size`,10).attr(`fill`,c.axisTextColor).attr(`font-weight`,`bold`).text(t.number)})}),d.annotationsBox){let t=b(d.annotationsBox.x),n=x(d.annotationsBox.y),r=e.append(`g`).attr(`class`,`wardley-annotations-box`),i=[...d.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),a=[];if(i.forEach((e,i)=>{let o=r.append(`text`).attr(`x`,t+10).attr(`y`,n+10+(i+1)*16).attr(`font-size`,11).attr(`fill`,c.axisTextColor).attr(`text-anchor`,`start`).attr(`dominant-baseline`,`middle`).text(`${e.number}. ${e.text}`);a.push(o)}),a.length>0){let e=0,o=0;a.forEach(t=>{let n=t.node(),r=n.getComputedTextLength();e=Math.max(e,r);let i=n.getBBox();o=Math.max(o,i.height)});let l=e+20+105,u=i.length*16+20+o/2,d=s.padding,f=p-s.padding-l,h=s.padding,g=m-s.padding-u;t=Math.max(d,Math.min(t,f)),n=Math.max(h,Math.min(n,g)),a.forEach((e,r)=>{e.attr(`x`,t+10).attr(`y`,n+10+(r+1)*16)}),r.insert(`rect`,`text`).attr(`x`,t).attr(`y`,n).attr(`width`,l).attr(`height`,u).attr(`fill`,`white`).attr(`stroke`,c.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}}}if(d.notes.length>0){let e=g.append(`g`).attr(`class`,`wardley-notes`);d.notes.forEach(t=>{let n=b(t.x),r=x(t.y);e.append(`text`).attr(`x`,n).attr(`y`,r).attr(`text-anchor`,`start`).attr(`font-size`,11).attr(`fill`,c.axisTextColor).attr(`font-weight`,`bold`).text(t.text)})}if(d.accelerators.length>0){let e=g.append(`g`).attr(`class`,`wardley-accelerators`);d.accelerators.forEach(t=>{let n=b(t.x),r=x(t.y),i=`
|
|
3
|
+
M ${n} ${r-30/2}
|
|
4
|
+
L ${n+60-20} ${r-30/2}
|
|
5
|
+
L ${n+60-20} ${r-30/2-8}
|
|
6
|
+
L ${n+60} ${r}
|
|
7
|
+
L ${n+60-20} ${r+30/2+8}
|
|
8
|
+
L ${n+60-20} ${r+30/2}
|
|
9
|
+
L ${n} ${r+30/2}
|
|
10
|
+
Z
|
|
11
|
+
`;e.append(`path`).attr(`d`,i).attr(`fill`,`white`).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),e.append(`text`).attr(`x`,n+60/2).attr(`y`,r+30/2+15).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,c.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}if(d.deaccelerators.length>0){let e=g.append(`g`).attr(`class`,`wardley-deaccelerators`);d.deaccelerators.forEach(t=>{let n=b(t.x),r=x(t.y),i=`
|
|
12
|
+
M ${n+60} ${r-30/2}
|
|
13
|
+
L ${n+20} ${r-30/2}
|
|
14
|
+
L ${n+20} ${r-30/2-8}
|
|
15
|
+
L ${n} ${r}
|
|
16
|
+
L ${n+20} ${r+30/2+8}
|
|
17
|
+
L ${n+20} ${r+30/2}
|
|
18
|
+
L ${n+60} ${r+30/2}
|
|
19
|
+
Z
|
|
20
|
+
`;e.append(`path`).attr(`d`,i).attr(`fill`,`white`).attr(`stroke`,c.componentStroke).attr(`stroke-width`,1),e.append(`text`).attr(`x`,n+60/2).attr(`y`,r+30/2+15).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,c.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}},`draw`)},styles:t.h(()=>``,`styles`)};exports.diagram=N;
|