@aiquants/markdown 2.0.3 → 4.0.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/README.md +266 -14
- package/dist/{abnfDiagram-VRR7QNED-BBmog1I4.cjs → abnfDiagram-VRR7QNED-DL9JJfMF.cjs} +1 -1
- package/dist/{abnfDiagram-VRR7QNED-IjPsliMa.js → abnfDiagram-VRR7QNED-utxwo7Ri.js} +15 -15
- package/dist/{arc-DKsAswGe.cjs → arc-BY7loL0l.cjs} +1 -1
- package/dist/{arc-E1KzF_uD.js → arc-Byq9kr_0.js} +32 -32
- package/dist/{architectureDiagram-ZJ3FMSHR-BLhnaJyB.cjs → architectureDiagram-ZJ3FMSHR-CLLwinmD.cjs} +1 -1
- package/dist/{architectureDiagram-ZJ3FMSHR-u79eEnkY.js → architectureDiagram-ZJ3FMSHR-DpnBy_s1.js} +2 -2
- package/dist/{blockDiagram-677ZJIJ3-DcCNlY_i.js → blockDiagram-677ZJIJ3-C8dybZZU.js} +3 -3
- package/dist/{blockDiagram-677ZJIJ3-D72bpMhN.cjs → blockDiagram-677ZJIJ3-Cs5tpWQ-.cjs} +1 -1
- package/dist/{c4Diagram-LMCZKHZV-Bp9asujr.js → c4Diagram-LMCZKHZV-3aG0bDyP.js} +2 -2
- package/dist/{c4Diagram-LMCZKHZV-D3d1d4zO.cjs → c4Diagram-LMCZKHZV-B-rz2a3v.cjs} +1 -1
- package/dist/{channel-DpcrO3R2.js → channel-BoXFYC1g.js} +1 -1
- package/dist/{channel-DE5LXIMm.cjs → channel-Dn2hPSB8.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-BrnUlAaZ.cjs → chunk-2Q5K7J3B-B7QkO_05.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-OuVdfHE1.js → chunk-2Q5K7J3B-CYpyj9EA.js} +1 -1
- package/dist/{chunk-32BRIVSS-CDxbP_I9.cjs → chunk-32BRIVSS-BjI5igEa.cjs} +1 -1
- package/dist/{chunk-32BRIVSS-w8TMFT10.js → chunk-32BRIVSS-DcLe6F1l.js} +1 -1
- package/dist/{chunk-5VM5RSS4-BHG-YQpQ.js → chunk-5VM5RSS4-C4ILSCRb.js} +1 -1
- package/dist/{chunk-5VM5RSS4-C-cBAbST.cjs → chunk-5VM5RSS4-DafQyxAv.cjs} +1 -1
- package/dist/{chunk-EX3LRPZG-uKd75-FB.cjs → chunk-EX3LRPZG-BXZDK2R1.cjs} +1 -1
- package/dist/{chunk-EX3LRPZG-BNHa-x9z.js → chunk-EX3LRPZG-CTaiVHYY.js} +28 -28
- package/dist/{chunk-JWPE2WC7-DtFuVO4n.js → chunk-JWPE2WC7-B-nuuS4b.js} +1 -1
- package/dist/{chunk-JWPE2WC7-CNFRDah7.cjs → chunk-JWPE2WC7-CNZBI1Pb.cjs} +1 -1
- package/dist/{chunk-MOJQB5TN-DwJ5ntgS.js → chunk-MOJQB5TN-D1oF99aM.js} +9 -9
- package/dist/{chunk-MOJQB5TN-Bs5Jj3Zh.cjs → chunk-MOJQB5TN-Dh_1HfSC.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-DisfuynB.cjs → chunk-PUDLZKDR-CMFJFweY.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-CG9K3aEk.js → chunk-PUDLZKDR-CPadtN2C.js} +6 -6
- package/dist/{chunk-RYQCIY6F-xFTrTO6v.cjs → chunk-RYQCIY6F-C6453DQl.cjs} +1 -1
- package/dist/{chunk-RYQCIY6F-c2KNx-Ia.js → chunk-RYQCIY6F-DxuegR0d.js} +1 -1
- package/dist/{chunk-V7JOEXUC-BvkxRSjK.cjs → chunk-V7JOEXUC-l9PaMPOT.cjs} +1 -1
- package/dist/{chunk-V7JOEXUC-CA3ccBvd.js → chunk-V7JOEXUC-ziE5DrnY.js} +5 -5
- package/dist/{chunk-VR4S4FIN-Cn9aeq2_.js → chunk-VR4S4FIN-BiCYvwb8.js} +3 -3
- package/dist/{chunk-VR4S4FIN-DAwCjhU3.cjs → chunk-VR4S4FIN-CCCnXTuJ.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-pPF9BeL7.js → chunk-XXDRQBXY-BFKT7vFo.js} +1 -1
- package/dist/{chunk-XXDRQBXY-B7vX1DJv.cjs → chunk-XXDRQBXY-D5IbqpUM.cjs} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-BxIt89EK.cjs → classDiagram-OUVF2IWQ-C1AZm4pB.cjs} +1 -1
- package/dist/{classDiagram-v2-EOCWNBFH-MQ0VQAsx.js → classDiagram-OUVF2IWQ-KA_F_TBQ.js} +2 -2
- package/dist/{classDiagram-v2-EOCWNBFH-BxIt89EK.cjs → classDiagram-v2-EOCWNBFH-C1AZm4pB.cjs} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-MQ0VQAsx.js → classDiagram-v2-EOCWNBFH-KA_F_TBQ.js} +2 -2
- package/dist/components/MarkdownRenderer.d.ts +9 -2
- package/dist/components/MarkdownViewer.d.ts +19 -35
- package/dist/components/MermaidDiagram.d.ts +4 -0
- package/dist/components/NodesRenderer.d.ts +2 -1
- package/dist/components/TableOfContents.d.ts +14 -4
- package/dist/components/embeds.d.ts +30 -0
- package/dist/components/htmlSanitizer.d.ts +21 -0
- package/dist/components/labels.d.ts +12 -0
- package/dist/components/links.d.ts +18 -0
- package/dist/components/mathRendering.d.ts +11 -0
- package/dist/components/mdastNodes/HTMLBlockContainerNode.d.ts +3 -2
- package/dist/components/mdastNodes/HTMLNode.d.ts +1 -1
- package/dist/components/mdastNodes/MathNode.d.ts +10 -0
- package/dist/components/mdastNodes/TwitterEmbedNode.d.ts +3 -2
- package/dist/components/mdastNodes/YouTubeEmbedNode.d.ts +4 -2
- package/dist/components/mermaidInteraction.d.ts +1 -4
- package/dist/components/mermaidLabels.d.ts +19 -0
- package/dist/components/plugins/DifyIFramePlugin.d.ts +2 -6
- package/dist/components/plugins/IFramePluginRegistry.d.ts +6 -4
- package/dist/components/rawHtml.d.ts +13 -0
- package/dist/components/toolbarOverlap.d.ts +17 -0
- package/dist/components/viewerLabels.d.ts +31 -0
- package/dist/{cose-bilkent-JH36ORCC-BzL-a0Zv.cjs → cose-bilkent-JH36ORCC-BQ2K2GyI.cjs} +1 -1
- package/dist/{cose-bilkent-JH36ORCC-ukc_ZtcU.js → cose-bilkent-JH36ORCC-B_16TV-v.js} +1 -1
- package/dist/css/details.css +7 -0
- package/dist/css/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/css/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/css/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/css/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/css/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/css/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/css/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/css/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/css/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/css/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/css/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/css/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/css/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/css/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/css/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/css/github-markdown.css +23 -0
- package/dist/css/katex.min.css +1 -1129
- package/dist/css/message.css +2 -0
- package/dist/css/zenn-content.css +14 -0
- package/dist/{cynefinDiagram-TSTJHNR4-C1GqR9hq.js → cynefinDiagram-TSTJHNR4-DTV6ORFc.js} +23 -23
- package/dist/{cynefinDiagram-TSTJHNR4-B1lNDIu_.cjs → cynefinDiagram-TSTJHNR4-Dq7UoRYB.cjs} +1 -1
- package/dist/{dagre-VKFMJZFB-COYURQTh.cjs → dagre-VKFMJZFB-PCi8s-PP.cjs} +1 -1
- package/dist/{dagre-VKFMJZFB-DpiBVdXS.js → dagre-VKFMJZFB-kSrm5dp4.js} +12 -12
- package/dist/{diagram-FQU43EPY-CVw420ny.js → diagram-FQU43EPY-D3dKlAPv.js} +2 -2
- package/dist/{diagram-FQU43EPY-DkgdwwAT.cjs → diagram-FQU43EPY-wTUTIyQQ.cjs} +1 -1
- package/dist/{diagram-G47NLZAW-cr36B9DD.js → diagram-G47NLZAW-HJlhMCYj.js} +131 -131
- package/dist/{diagram-G47NLZAW-CcXcBx81.cjs → diagram-G47NLZAW-_4FrgCGJ.cjs} +1 -1
- package/dist/{diagram-NH7WQ7WH-BMYzS0pm.cjs → diagram-NH7WQ7WH-ByCeah-n.cjs} +1 -1
- package/dist/{diagram-NH7WQ7WH-CoL7cXmX.js → diagram-NH7WQ7WH-CgeHmdJL.js} +11 -11
- package/dist/{diagram-OA4YK3LP-DSeI6RLe.cjs → diagram-OA4YK3LP-C0IhePjD.cjs} +1 -1
- package/dist/{diagram-OA4YK3LP-DRAbN1oy.js → diagram-OA4YK3LP-CwJcZGHD.js} +57 -57
- package/dist/{diagram-WEI45ONY-CCJwQ42c.cjs → diagram-WEI45ONY-Cf-TVNEb.cjs} +1 -1
- package/dist/{diagram-WEI45ONY-CxkNlW0N.js → diagram-WEI45ONY-v1LUmWAx.js} +11 -11
- package/dist/{ebnfDiagram-CCIWWBDH-PADFa1z_.js → ebnfDiagram-CCIWWBDH-DqZtnwGP.js} +5 -5
- package/dist/{ebnfDiagram-CCIWWBDH-D_nz1FvR.cjs → ebnfDiagram-CCIWWBDH-k5XOUGml.cjs} +1 -1
- package/dist/{erDiagram-Q63AITRT-DFD27ud_.js → erDiagram-Q63AITRT-D6kP6d5J.js} +4 -4
- package/dist/{erDiagram-Q63AITRT-2r-lfgSt.cjs → erDiagram-Q63AITRT-DFet1VTy.cjs} +1 -1
- package/dist/{extractHeadings-BUHj1PcO.js → extractHeadings-B2I83li5.js} +6326 -5913
- package/dist/{extractHeadings-BrLI2qQF.cjs → extractHeadings-R7NxLZJP.cjs} +71 -71
- package/dist/flowDiagram-23GEKE2U-BTXvBdte.js +7 -0
- package/dist/flowDiagram-23GEKE2U-C81VZYM7.cjs +1 -0
- package/dist/{ganttDiagram-NO4QXBWP-CNhgpKSH.cjs → ganttDiagram-NO4QXBWP-CEQqLRYx.cjs} +1 -1
- package/dist/{ganttDiagram-NO4QXBWP-CmV2JOI4.js → ganttDiagram-NO4QXBWP-I9DxJwkX.js} +2 -2
- package/dist/gen/markdown/v1/markdown_pb.d.ts +14 -0
- package/dist/{gitGraphDiagram-IHSO6WYX-D6YozD-Z.js → gitGraphDiagram-IHSO6WYX-p_7WQssC.js} +3 -3
- package/dist/{gitGraphDiagram-IHSO6WYX-D5IYosEF.cjs → gitGraphDiagram-IHSO6WYX-yyEwsmHH.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.client.cjs +1 -1
- package/dist/index.client.d.ts +6 -2
- package/dist/index.client.js +39 -35
- package/dist/index.js +39 -35
- package/dist/index.server.cjs +1 -1
- package/dist/index.server.d.ts +1 -1
- package/dist/index.server.js +258 -170
- package/dist/{infoDiagram-FWYZ7A6U-U2OiliOP.cjs → infoDiagram-FWYZ7A6U-BFCkTfAI.cjs} +1 -1
- package/dist/{infoDiagram-FWYZ7A6U-Jthjyrbt.js → infoDiagram-FWYZ7A6U-C9L5rIcg.js} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-DK3M6wrz.cjs → ishikawaDiagram-FXEZZL3T-B3TjOzka.cjs} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-CWrHeeTL.js → ishikawaDiagram-FXEZZL3T-uxcpJtLF.js} +20 -20
- package/dist/{journeyDiagram-5HDEW3XC-B-BfhPr4.cjs → journeyDiagram-5HDEW3XC-CvtPgaNR.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-GOWrusc2.js → journeyDiagram-5HDEW3XC-DMq3piuW.js} +4 -4
- package/dist/{kanban-definition-HUTT4EX6-BvnLv2HN.cjs → kanban-definition-HUTT4EX6-DJ9sXiRP.cjs} +1 -1
- package/dist/{kanban-definition-HUTT4EX6-BebMuVhZ.js → kanban-definition-HUTT4EX6-Dfal8jdL.js} +34 -34
- package/dist/{linear-B9JMAP1U.cjs → linear-CLykHvhQ.cjs} +1 -1
- package/dist/{linear-BdCaKB6J.js → linear-CvzPdVAO.js} +12 -12
- package/dist/markdown.css +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-ChJ71VGh.js → mindmap-definition-LN4V7U3C-C8erO2Mh.js} +20 -20
- package/dist/{mindmap-definition-LN4V7U3C-asDDR5DU.cjs → mindmap-definition-LN4V7U3C-CErimIK1.cjs} +1 -1
- package/dist/{pegDiagram-2B236MQR-BO1fCXl7.js → pegDiagram-2B236MQR-CECcXaCN.js} +5 -5
- package/dist/{pegDiagram-2B236MQR-C3qJlDiV.cjs → pegDiagram-2B236MQR-DBL8X0k9.cjs} +1 -1
- package/dist/{pieDiagram-ENE6RG2P-D5-meW-_.cjs → pieDiagram-ENE6RG2P-B_-x0Nvj.cjs} +1 -1
- package/dist/{pieDiagram-ENE6RG2P-fYjP8dvh.js → pieDiagram-ENE6RG2P-CWlf16nv.js} +41 -41
- package/dist/{quadrantDiagram-ABIIQ3AL-CmqrHJ4C.cjs → quadrantDiagram-ABIIQ3AL-HKlopKX4.cjs} +1 -1
- package/dist/{quadrantDiagram-ABIIQ3AL-CKeeL3uz.js → quadrantDiagram-ABIIQ3AL-JpouSW89.js} +2 -2
- package/dist/{railroadDiagram-RFXS5EU6-a-pSoUg2.cjs → railroadDiagram-RFXS5EU6-B-v61EFn.cjs} +1 -1
- package/dist/{railroadDiagram-RFXS5EU6-D7OWpbvJ.js → railroadDiagram-RFXS5EU6-CLTBEsir.js} +3 -3
- package/dist/remarkProcessor.server.d.ts +11 -1
- package/dist/{requirementDiagram-TGXJPOKE-BaKLflmx.cjs → requirementDiagram-TGXJPOKE-4vCejkrF.cjs} +1 -1
- package/dist/{requirementDiagram-TGXJPOKE-C5_kJLGy.js → requirementDiagram-TGXJPOKE-DtoTpDLe.js} +3 -3
- package/dist/{sankeyDiagram-HTMAVEWB-DuUzdIP0.cjs → sankeyDiagram-HTMAVEWB-Bp8p_ojk.cjs} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-IdJ3gjdw.js → sankeyDiagram-HTMAVEWB-WxnjUz1I.js} +20 -20
- package/dist/{sequenceDiagram-DBY2YBRQ-B29fl34a.cjs → sequenceDiagram-DBY2YBRQ-BUPaWSIG.cjs} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-B_lxtRfw.js → sequenceDiagram-DBY2YBRQ-DGJcC2MQ.js} +3 -3
- package/dist/{sizeCapture-X5ZJPWSS-Dc9QwSOp.js → sizeCapture-X5ZJPWSS-BmP0pJAx.js} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-DAiqtb_j.cjs → sizeCapture-X5ZJPWSS-Dk82fAT8.cjs} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-BXIH2aOp.cjs → stateDiagram-2N3HPSRC-CL5Omkqs.cjs} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-Wu5OaQhD.js → stateDiagram-2N3HPSRC-ZL_eFTbb.js} +9 -9
- package/dist/{stateDiagram-v2-6OUMAXLB-BfTH3hZ6.js → stateDiagram-v2-6OUMAXLB-BgOqjiSL.js} +2 -2
- package/dist/{stateDiagram-v2-6OUMAXLB-8XTokhrn.cjs → stateDiagram-v2-6OUMAXLB-D3Zgp8xl.cjs} +1 -1
- package/dist/styles/markdown.css +1 -1
- package/dist/{swimlanes-5IMT3BWC-BnT290KL.cjs → swimlanes-5IMT3BWC-CuW1KWfs.cjs} +1 -1
- package/dist/{swimlanes-5IMT3BWC-CcYHrJAC.js → swimlanes-5IMT3BWC-GB1p75ou.js} +3 -3
- package/dist/{swimlanesDiagram-G3AALYLV-CAEjADeH.cjs → swimlanesDiagram-G3AALYLV-Di_Nug7g.cjs} +1 -1
- package/dist/{swimlanesDiagram-G3AALYLV-CxHkefqm.js → swimlanesDiagram-G3AALYLV-Jr2ZWz3z.js} +2 -2
- package/dist/{timeline-definition-FHXFAJF6-BjbG4nbM.js → timeline-definition-FHXFAJF6-663e-yVA.js} +34 -34
- package/dist/{timeline-definition-FHXFAJF6-Dqdftl5b.cjs → timeline-definition-FHXFAJF6-BKVe7Qad.cjs} +1 -1
- package/dist/{vennDiagram-L72KCM5P-BxjgXNwH.cjs → vennDiagram-L72KCM5P-2NIIKtsl.cjs} +1 -1
- package/dist/{vennDiagram-L72KCM5P-DnlkQHn-.js → vennDiagram-L72KCM5P-BDGC8Vm3.js} +55 -55
- package/dist/viewer-settings.cjs +1 -0
- package/dist/viewer-settings.d.ts +9 -0
- package/dist/viewer-settings.js +7 -0
- package/dist/{wardleyDiagram-EHGQE667-CurWRCjn.cjs → wardleyDiagram-EHGQE667-BrTNZSmG.cjs} +1 -1
- package/dist/{wardleyDiagram-EHGQE667-2T71AdlP.js → wardleyDiagram-EHGQE667-IbGr9hGV.js} +27 -27
- package/dist/{xychartDiagram-FW5EYKEG-DZCKaSum.js → xychartDiagram-FW5EYKEG-CbxKOQYO.js} +23 -23
- package/dist/{xychartDiagram-FW5EYKEG-D0ltrZo8.cjs → xychartDiagram-FW5EYKEG-MCkmgF8g.cjs} +1 -1
- package/package.json +17 -11
- package/dist/flowDiagram-23GEKE2U-BVLgnxZW.js +0 -7
- package/dist/flowDiagram-23GEKE2U-D3w55eDA.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bQ as Wt, O as Kt, Q as Ht, ae as Xt, ad as Yt, U as Zt, V as Qt, _ as w, an as wt, as as Jt, X as ot, b5 as $t, aF as te, aG as ee, aH as ne, a0 as se, aj as ie, ap as oe, aq as re } from "./extractHeadings-B2I83li5.js";
|
|
2
2
|
const kt = (t, n) => Wt(t, "a", -n), _t = 1e-10;
|
|
3
3
|
function st(t, n) {
|
|
4
4
|
const s = le(t), e = s.filter((l) => ae(l, t));
|
|
@@ -565,9 +565,9 @@ function Dt(t, n, s) {
|
|
|
565
565
|
let f = 1;
|
|
566
566
|
for (; f < i.length; )
|
|
567
567
|
l(i[f], !0, !1), l(i[f + 1], !1, !0), l(i[f + 2], !0, !0), f += 3, o = dt(e);
|
|
568
|
-
return
|
|
568
|
+
return Nt(e);
|
|
569
569
|
}
|
|
570
|
-
function
|
|
570
|
+
function Ot(t, n, s, e, i) {
|
|
571
571
|
const o = Ft(t);
|
|
572
572
|
n -= 2 * e, s -= 2 * e;
|
|
573
573
|
const { xRange: r, yRange: l } = dt(o);
|
|
@@ -580,7 +580,7 @@ function Nt(t, n, s, e, i) {
|
|
|
580
580
|
} else
|
|
581
581
|
f = n / (r.max - r.min), u = s / (l.max - l.min);
|
|
582
582
|
const a = Math.min(u, f), y = (n - (r.max - r.min) * a) / 2, h = (s - (l.max - l.min) * a) / 2;
|
|
583
|
-
return
|
|
583
|
+
return Nt(
|
|
584
584
|
o.map((b) => ({
|
|
585
585
|
radius: a * b.radius,
|
|
586
586
|
x: e + y + (b.x - r.min) * a,
|
|
@@ -589,7 +589,7 @@ function Nt(t, n, s, e, i) {
|
|
|
589
589
|
}))
|
|
590
590
|
);
|
|
591
591
|
}
|
|
592
|
-
function
|
|
592
|
+
function Nt(t) {
|
|
593
593
|
const n = {};
|
|
594
594
|
for (const s of t)
|
|
595
595
|
n[s.setid] = s;
|
|
@@ -625,7 +625,7 @@ function ve(t = {}) {
|
|
|
625
625
|
let I = {}, D = {};
|
|
626
626
|
if (d.length > 0) {
|
|
627
627
|
let k = m(d, { lossFunction: v, distinct: b });
|
|
628
|
-
l && (k = Dt(k, r, h)), I =
|
|
628
|
+
l && (k = Dt(k, r, h)), I = Ot(k, s, e, i, f), D = Lt(I, d, M);
|
|
629
629
|
}
|
|
630
630
|
const U = {};
|
|
631
631
|
d.forEach((k) => {
|
|
@@ -638,28 +638,28 @@ function ve(t = {}) {
|
|
|
638
638
|
return "" + k.sets[0];
|
|
639
639
|
}
|
|
640
640
|
x.selectAll("svg").data([I]).enter().append("svg");
|
|
641
|
-
const
|
|
642
|
-
n ?
|
|
641
|
+
const N = x.select("svg");
|
|
642
|
+
n ? N.attr("viewBox", `0 0 ${s} ${e}`) : N.attr("width", s).attr("height", e);
|
|
643
643
|
const R = {};
|
|
644
644
|
let T = !1;
|
|
645
|
-
|
|
645
|
+
N.selectAll(".venn-area path").each(function(k) {
|
|
646
646
|
const F = this.getAttribute("d");
|
|
647
647
|
k.sets.length == 1 && F && !b && (T = !0, R[k.sets[0]] = Me(F));
|
|
648
648
|
});
|
|
649
649
|
function A(k) {
|
|
650
650
|
return (F) => {
|
|
651
651
|
const H = k.sets.map((et) => {
|
|
652
|
-
let
|
|
653
|
-
return
|
|
654
|
-
x:
|
|
655
|
-
y:
|
|
656
|
-
radius:
|
|
652
|
+
let X = R[et], Z = I[et];
|
|
653
|
+
return X || (X = { x: s / 2, y: e / 2, radius: 1 }), Z || (Z = { x: s / 2, y: e / 2, radius: 1 }), {
|
|
654
|
+
x: X.x * (1 - F) + Z.x * F,
|
|
655
|
+
y: X.y * (1 - F) + Z.y * F,
|
|
656
|
+
radius: X.radius * (1 - F) + Z.radius * F
|
|
657
657
|
};
|
|
658
658
|
});
|
|
659
659
|
return St(H, p);
|
|
660
660
|
};
|
|
661
661
|
}
|
|
662
|
-
const G =
|
|
662
|
+
const G = N.selectAll(".venn-area").data(d, (k) => k.sets), P = G.enter().append("g").attr(
|
|
663
663
|
"class",
|
|
664
664
|
(k) => `venn-area venn-${k.sets.length == 1 ? "circle" : "intersection"}${k.colour || k.color ? " venn-coloured" : ""}`
|
|
665
665
|
).attr("data-venn-sets", (k) => k.sets.join("_")), V = P.append("path"), L = P.append("text").attr("class", "label").text((k) => B(k)).attr("text-anchor", "middle").attr("dy", ".35em").attr("x", s / 2).attr("y", e / 2);
|
|
@@ -669,12 +669,12 @@ function ve(t = {}) {
|
|
|
669
669
|
}
|
|
670
670
|
let z = x;
|
|
671
671
|
T && typeof z.transition == "function" ? (z = K(x), z.selectAll("path").attrTween("d", A)) : z.selectAll("path").attr("d", (k) => St(k.sets.map((F) => I[F])), p);
|
|
672
|
-
const
|
|
673
|
-
u && (T ? "on" in
|
|
672
|
+
const O = z.selectAll("text").filter((k) => k.sets in D).text((k) => B(k)).attr("x", (k) => Math.floor(D[k.sets].x)).attr("y", (k) => Math.floor(D[k.sets].y));
|
|
673
|
+
u && (T ? "on" in O ? O.on("end", rt(I, B)) : O.each("end", rt(I, B)) : O.each(rt(I, B)));
|
|
674
674
|
const j = K(G.exit()).remove();
|
|
675
675
|
typeof G.transition == "function" && j.selectAll("path").attrTween("d", A);
|
|
676
|
-
const
|
|
677
|
-
return y !== null && (L.style("font-size", "0px"),
|
|
676
|
+
const Y = j.selectAll("text").attr("x", s / 2).attr("y", e / 2);
|
|
677
|
+
return y !== null && (L.style("font-size", "0px"), O.style("font-size", y), Y.style("font-size", "0px")), { circles: I, textCentres: D, nodes: G, enter: P, update: z, exit: j };
|
|
678
678
|
}
|
|
679
679
|
return c.wrap = function(x) {
|
|
680
680
|
return arguments.length ? (u = x, c) : u;
|
|
@@ -870,7 +870,7 @@ function Se(t, n = {}) {
|
|
|
870
870
|
distinct: h
|
|
871
871
|
});
|
|
872
872
|
i && (p = Dt(p, o, r));
|
|
873
|
-
const M =
|
|
873
|
+
const M = Ot(p, l, f, u, a), E = Lt(M, t, y), _ = new Map(
|
|
874
874
|
Object.keys(M).map((m) => [
|
|
875
875
|
m,
|
|
876
876
|
{
|
|
@@ -1033,7 +1033,7 @@ var gt = (function() {
|
|
|
1033
1033
|
}
|
|
1034
1034
|
}, "parseError"),
|
|
1035
1035
|
parse: /* @__PURE__ */ w(function(g) {
|
|
1036
|
-
var m = this, v = [0], c = [], x = [null], d = [], C = this.table, I = "", D = 0, U = 0, B = 2,
|
|
1036
|
+
var m = this, v = [0], c = [], x = [null], d = [], C = this.table, I = "", D = 0, U = 0, B = 2, N = 1, R = d.slice.call(arguments, 1), T = Object.create(this.lexer), A = { yy: {} };
|
|
1037
1037
|
for (var G in this.yy)
|
|
1038
1038
|
Object.prototype.hasOwnProperty.call(this.yy, G) && (A.yy[G] = this.yy[G]);
|
|
1039
1039
|
T.setInput(g, A.yy), A.yy.lexer = T, A.yy.parser = this, typeof T.yylloc > "u" && (T.yylloc = {});
|
|
@@ -1047,27 +1047,27 @@ var gt = (function() {
|
|
|
1047
1047
|
w(L, "popStack");
|
|
1048
1048
|
function K() {
|
|
1049
1049
|
var W;
|
|
1050
|
-
return W = c.pop() || T.lex() ||
|
|
1050
|
+
return W = c.pop() || T.lex() || N, typeof W != "number" && (W instanceof Array && (c = W, W = c.pop()), W = m.symbols_[W] || W), W;
|
|
1051
1051
|
}
|
|
1052
1052
|
w(K, "lex");
|
|
1053
|
-
for (var z,
|
|
1054
|
-
if (
|
|
1053
|
+
for (var z, O, j, Y, k = {}, F, H, et, X; ; ) {
|
|
1054
|
+
if (O = v[v.length - 1], this.defaultActions[O] ? j = this.defaultActions[O] : ((z === null || typeof z > "u") && (z = K()), j = C[O] && C[O][z]), typeof j > "u" || !j.length || !j[0]) {
|
|
1055
1055
|
var Z = "";
|
|
1056
|
-
|
|
1057
|
-
for (F in C[
|
|
1058
|
-
this.terminals_[F] && F > B &&
|
|
1056
|
+
X = [];
|
|
1057
|
+
for (F in C[O])
|
|
1058
|
+
this.terminals_[F] && F > B && X.push("'" + this.terminals_[F] + "'");
|
|
1059
1059
|
T.showPosition ? Z = "Parse error on line " + (D + 1) + `:
|
|
1060
1060
|
` + T.showPosition() + `
|
|
1061
|
-
Expecting ` +
|
|
1061
|
+
Expecting ` + X.join(", ") + ", got '" + (this.terminals_[z] || z) + "'" : Z = "Parse error on line " + (D + 1) + ": Unexpected " + (z == N ? "end of input" : "'" + (this.terminals_[z] || z) + "'"), this.parseError(Z, {
|
|
1062
1062
|
text: T.match,
|
|
1063
1063
|
token: this.terminals_[z] || z,
|
|
1064
1064
|
line: T.yylineno,
|
|
1065
1065
|
loc: P,
|
|
1066
|
-
expected:
|
|
1066
|
+
expected: X
|
|
1067
1067
|
});
|
|
1068
1068
|
}
|
|
1069
1069
|
if (j[0] instanceof Array && j.length > 1)
|
|
1070
|
-
throw new Error("Parse Error: multiple actions possible at state: " +
|
|
1070
|
+
throw new Error("Parse Error: multiple actions possible at state: " + O + ", token: " + z);
|
|
1071
1071
|
switch (j[0]) {
|
|
1072
1072
|
case 1:
|
|
1073
1073
|
v.push(z), x.push(T.yytext), d.push(T.yylloc), v.push(j[1]), z = null, U = T.yyleng, I = T.yytext, D = T.yylineno, P = T.yylloc;
|
|
@@ -1081,7 +1081,7 @@ Expecting ` + Y.join(", ") + ", got '" + (this.terminals_[z] || z) + "'" : Z = "
|
|
|
1081
1081
|
}, V && (k._$.range = [
|
|
1082
1082
|
d[d.length - (H || 1)].range[0],
|
|
1083
1083
|
d[d.length - 1].range[1]
|
|
1084
|
-
]),
|
|
1084
|
+
]), Y = this.performAction.apply(k, [
|
|
1085
1085
|
I,
|
|
1086
1086
|
U,
|
|
1087
1087
|
D,
|
|
@@ -1089,8 +1089,8 @@ Expecting ` + Y.join(", ") + ", got '" + (this.terminals_[z] || z) + "'" : Z = "
|
|
|
1089
1089
|
j[1],
|
|
1090
1090
|
x,
|
|
1091
1091
|
d
|
|
1092
|
-
].concat(R)), typeof
|
|
1093
|
-
return
|
|
1092
|
+
].concat(R)), typeof Y < "u")
|
|
1093
|
+
return Y;
|
|
1094
1094
|
H && (v = v.slice(0, -1 * H * 2), x = x.slice(0, -1 * H), d = d.slice(0, -1 * H)), v.push(this.productions_[j[1]][0]), x.push(k.$), d.push(k._$), et = C[v[v.length - 2]][v[v.length - 1]], v.push(et);
|
|
1095
1095
|
break;
|
|
1096
1096
|
case 3:
|
|
@@ -1370,7 +1370,7 @@ var we = gt, yt = [], pt = [], mt = [], bt = /* @__PURE__ */ new Set(), vt, It =
|
|
|
1370
1370
|
const s = it(t).filter((e) => !bt.has(e));
|
|
1371
1371
|
if (s.length > 0)
|
|
1372
1372
|
throw new Error(`unknown set identifier: ${s.join(", ")}`);
|
|
1373
|
-
}, "validateUnionIdentifiers"), De = /* @__PURE__ */ w(() => pt, "getTextData"),
|
|
1373
|
+
}, "validateUnionIdentifiers"), De = /* @__PURE__ */ w(() => pt, "getTextData"), Oe = /* @__PURE__ */ w(() => vt, "getCurrentSets"), Ne = /* @__PURE__ */ w(() => It, "getIndentMode"), Fe = /* @__PURE__ */ w((t) => {
|
|
1374
1374
|
It = t;
|
|
1375
1375
|
}, "setIndentMode"), je = re.venn;
|
|
1376
1376
|
function Bt() {
|
|
@@ -1384,8 +1384,8 @@ var Le = /* @__PURE__ */ w(() => {
|
|
|
1384
1384
|
clear: Le,
|
|
1385
1385
|
setAccTitle: Qt,
|
|
1386
1386
|
getAccTitle: Zt,
|
|
1387
|
-
setDiagramTitle:
|
|
1388
|
-
getDiagramTitle:
|
|
1387
|
+
setDiagramTitle: Yt,
|
|
1388
|
+
getDiagramTitle: Xt,
|
|
1389
1389
|
getAccDescription: Ht,
|
|
1390
1390
|
setAccDescription: Kt,
|
|
1391
1391
|
addSubsetData: _e,
|
|
@@ -1395,8 +1395,8 @@ var Le = /* @__PURE__ */ w(() => {
|
|
|
1395
1395
|
validateUnionIdentifiers: Ce,
|
|
1396
1396
|
getTextData: De,
|
|
1397
1397
|
getStyleData: Re,
|
|
1398
|
-
getCurrentSets:
|
|
1399
|
-
getIndentMode:
|
|
1398
|
+
getCurrentSets: Oe,
|
|
1399
|
+
getIndentMode: Ne,
|
|
1400
1400
|
setIndentMode: Fe
|
|
1401
1401
|
}, Ve = /* @__PURE__ */ w((t) => `
|
|
1402
1402
|
.venn-title {
|
|
@@ -1458,11 +1458,11 @@ var qe = /* @__PURE__ */ w((t, n, s, e) => {
|
|
|
1458
1458
|
x.selectAll(".venn-circle").each(function(R, T) {
|
|
1459
1459
|
const A = ot(this), P = J([...R.sets].sort()), V = p.get(P), L = V?.fill || a[T % a.length] || r.primaryColor;
|
|
1460
1460
|
A.classed(`venn-set-${T % 8}`, !0);
|
|
1461
|
-
const K = V?.["fill-opacity"] ?? 0.1, z = V?.stroke || L,
|
|
1461
|
+
const K = V?.["fill-opacity"] ?? 0.1, z = V?.stroke || L, O = V?.["stroke-width"] || `${5 * g}`;
|
|
1462
1462
|
if (u && C) {
|
|
1463
|
-
const
|
|
1464
|
-
if (
|
|
1465
|
-
const k =
|
|
1463
|
+
const Y = D.get(P);
|
|
1464
|
+
if (Y && Y.circles.length > 0) {
|
|
1465
|
+
const k = Y.circles[0], F = C.circle(k.x, k.y, k.radius * 2, {
|
|
1466
1466
|
roughness: 0.7,
|
|
1467
1467
|
seed: f,
|
|
1468
1468
|
fill: kt(L, 0.7),
|
|
@@ -1471,12 +1471,12 @@ var qe = /* @__PURE__ */ w((t, n, s, e) => {
|
|
|
1471
1471
|
hachureGap: 8,
|
|
1472
1472
|
hachureAngle: -41 + T * 60,
|
|
1473
1473
|
stroke: z,
|
|
1474
|
-
strokeWidth: parseFloat(String(
|
|
1474
|
+
strokeWidth: parseFloat(String(O))
|
|
1475
1475
|
});
|
|
1476
1476
|
A.select("path").remove(), A.node()?.insertBefore(F, A.select("text").node());
|
|
1477
1477
|
}
|
|
1478
1478
|
} else
|
|
1479
|
-
A.select("path").style("fill", L).style("fill-opacity", K).style("stroke", z).style("stroke-width",
|
|
1479
|
+
A.select("path").style("fill", L).style("fill-opacity", K).style("stroke", z).style("stroke-width", O).style("stroke-opacity", 0.95);
|
|
1480
1480
|
const j = V?.color || (U ? ee(L, 30) : ne(L, 30));
|
|
1481
1481
|
A.select("text").style("font-size", `${48 * g}px`).style("fill", j);
|
|
1482
1482
|
}), u && C ? x.selectAll(".venn-intersection").each(function(R) {
|
|
@@ -1493,8 +1493,8 @@ var qe = /* @__PURE__ */ w((t, n, s, e) => {
|
|
|
1493
1493
|
hachureGap: 6,
|
|
1494
1494
|
hachureAngle: 60,
|
|
1495
1495
|
stroke: "none"
|
|
1496
|
-
}),
|
|
1497
|
-
|
|
1496
|
+
}), O = L.node();
|
|
1497
|
+
O?.parentNode?.insertBefore(z, O), L.remove();
|
|
1498
1498
|
}
|
|
1499
1499
|
} else
|
|
1500
1500
|
T.select("path").style("fill-opacity", 0);
|
|
@@ -1509,9 +1509,9 @@ var qe = /* @__PURE__ */ w((t, n, s, e) => {
|
|
|
1509
1509
|
const A = J([...R.sets].sort());
|
|
1510
1510
|
return p.get(A)?.fill ?? "transparent";
|
|
1511
1511
|
}));
|
|
1512
|
-
const B = c.append("g").attr("transform", `translate(0, ${m})`),
|
|
1513
|
-
if (
|
|
1514
|
-
for (const R of [...
|
|
1512
|
+
const B = c.append("g").attr("transform", `translate(0, ${m})`), N = x.select("svg").node();
|
|
1513
|
+
if (N && "childNodes" in N)
|
|
1514
|
+
for (const R of [...N.childNodes])
|
|
1515
1515
|
B.node()?.appendChild(R);
|
|
1516
1516
|
se(c, _, E, o?.useMaxWidth ?? !0);
|
|
1517
1517
|
}, "draw");
|
|
@@ -1529,19 +1529,19 @@ function Ut(t, n, s, e, i, o) {
|
|
|
1529
1529
|
const h = n.get(a);
|
|
1530
1530
|
if (!h?.text)
|
|
1531
1531
|
continue;
|
|
1532
|
-
const b = h.text.x, p = h.text.y, M = Math.min(...h.circles.map((
|
|
1533
|
-
...h.circles.map((
|
|
1532
|
+
const b = h.text.x, p = h.text.y, M = Math.min(...h.circles.map((N) => N.radius)), E = Math.min(
|
|
1533
|
+
...h.circles.map((N) => N.radius - Math.hypot(b - N.x, p - N.y))
|
|
1534
1534
|
);
|
|
1535
1535
|
let _ = Number.isFinite(E) ? Math.max(0, E) : 0;
|
|
1536
1536
|
_ === 0 && Number.isFinite(M) && (_ = M * 0.6);
|
|
1537
1537
|
const S = f.append("g").attr("class", "venn-text-area").attr("font-size", `${40 * i}px`);
|
|
1538
1538
|
r && S.append("circle").attr("class", "venn-text-debug-circle").attr("cx", b).attr("cy", p).attr("r", _).attr("fill", "none").attr("stroke", "purple").attr("stroke-width", 1.5 * i).attr("stroke-dasharray", `${6 * i} ${4 * i}`);
|
|
1539
1539
|
const g = Math.max(80 * i, _ * 2 * 0.95), m = Math.max(60 * i, _ * 2 * 0.95), x = (h.data.label && h.data.label.length > 0 ? Math.min(32 * i, _ * 0.25) : 0) + (y.length <= 2 ? 30 * i : 0), d = b - g / 2, C = p - m / 2 + x, I = Math.max(1, Math.ceil(Math.sqrt(y.length))), D = Math.max(1, Math.ceil(y.length / I)), U = g / I, B = m / D;
|
|
1540
|
-
for (const [
|
|
1541
|
-
const T =
|
|
1540
|
+
for (const [N, R] of y.entries()) {
|
|
1541
|
+
const T = N % I, A = Math.floor(N / I), G = d + U * (T + 0.5), P = C + B * (A + 0.5);
|
|
1542
1542
|
r && S.append("rect").attr("class", "venn-text-debug-cell").attr("x", d + U * T).attr("y", C + B * A).attr("width", U).attr("height", B).attr("fill", "none").attr("stroke", "teal").attr("stroke-width", 1 * i).attr("stroke-dasharray", `${4 * i} ${3 * i}`);
|
|
1543
|
-
const V = U * 0.9, L = B * 0.9, K = S.append("foreignObject").attr("class", "venn-text-node-fo").attr("width", V).attr("height", L).attr("x", G - V / 2).attr("y", P - L / 2).attr("overflow", "visible"), z = o.get(R.id)?.color,
|
|
1544
|
-
z &&
|
|
1543
|
+
const V = U * 0.9, L = B * 0.9, K = S.append("foreignObject").attr("class", "venn-text-node-fo").attr("width", V).attr("height", L).attr("x", G - V / 2).attr("y", P - L / 2).attr("overflow", "visible"), z = o.get(R.id)?.color, O = K.append("xhtml:span").attr("class", "venn-text-node").style("display", "flex").style("width", "100%").style("height", "100%").style("white-space", "normal").style("align-items", "center").style("justify-content", "center").style("text-align", "center").style("overflow-wrap", "normal").style("word-break", "normal").text(R.label ?? R.id);
|
|
1544
|
+
z && O.style("color", z);
|
|
1545
1545
|
}
|
|
1546
1546
|
}
|
|
1547
1547
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=Object.freeze([Object.freeze({name:"None",className:""}),Object.freeze({name:"GitHub",className:"markdown-body"}),Object.freeze({name:"Zenn",className:"znc"})]),t=Object.freeze(["left","center","right"]),n="left",o=(e,N=n)=>e!=null&&t.includes(e)?e:N;exports.CONTENT_ALIGNS=t;exports.DEFAULT_CONTENT_ALIGN=n;exports.DEFAULT_MARKDOWN_STYLES=c;exports.toContentAlign=o;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ContentAlign = "left" | "center" | "right";
|
|
2
|
+
export interface MarkdownStyleOption {
|
|
3
|
+
name: string;
|
|
4
|
+
className: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const DEFAULT_MARKDOWN_STYLES: readonly MarkdownStyleOption[];
|
|
7
|
+
export declare const CONTENT_ALIGNS: readonly ContentAlign[];
|
|
8
|
+
export declare const DEFAULT_CONTENT_ALIGN: ContentAlign;
|
|
9
|
+
export declare const toContentAlign: (value: string | null | undefined, fallback?: ContentAlign) => ContentAlign;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
const o = Object.freeze([Object.freeze({ name: "None", className: "" }), Object.freeze({ name: "GitHub", className: "markdown-body" }), Object.freeze({ name: "Zenn", className: "znc" })]), t = Object.freeze(["left", "center", "right"]), c = "left", s = (e, n = c) => e != null && t.includes(e) ? e : n;
|
|
2
|
+
export {
|
|
3
|
+
t as CONTENT_ALIGNS,
|
|
4
|
+
c as DEFAULT_CONTENT_ALIGN,
|
|
5
|
+
o as DEFAULT_MARKDOWN_STYLES,
|
|
6
|
+
s as toContentAlign
|
|
7
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pt=require("./chunk-JWPE2WC7-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pt=require("./chunk-JWPE2WC7-CNZBI1Pb.cjs"),f=require("./extractHeadings-R7NxLZJP.cjs"),Ct=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var D=f.__name((o,r)=>{const e=o<=1?o*100:o;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${o}`);return e},"toPercent"),L=f.__name((o,r,e)=>({x:D(r,`${e} evolution`),y:D(o,`${e} visibility`)}),"toCoordinates"),J=f.__name(o=>{if(o){if(o==="+<>")return"bidirectional";if(o==="+<")return"backward";if(o==="+>")return"forward"}},"getFlowFromPort"),St=f.__name(o=>{if(!o?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(o)?.[1];return o.includes("<>")?{flow:"bidirectional",label:e}:o.includes("<")?{flow:"backward",label:e}:o.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Mt=f.__name((o,r)=>{if(Pt.populateCommonDb(o,r),o.size&&r.setSize(o.size.width,o.size.height),o.evolution){const e=o.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),g=o.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);r.updateAxes({stages:e,stageBoundaries:g})}if(o.anchors.forEach(e=>{const g=L(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,g.x,g.y,"anchor")}),o.components.forEach(e=>{const g=L(e.visibility,e.evolution,`Component "${e.name}"`),a=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=e.decorator?.strategy;r.addNode(e.name,e.name,g.x,g.y,"component",a,d,e.inertia,m)}),o.notes.forEach(e=>{const g=L(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,g.x,g.y)}),o.pipelines.forEach(e=>{const g=r.getNode(e.parent);if(!g||typeof g.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const a=g.y;r.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,y=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,B=D(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(m,d.name,B,a,"pipeline-component",C,y),r.addPipelineComponent(e.parent,m)})}),o.links.forEach(e=>{const g=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let a=J(e.fromPort)??J(e.toPort);const{flow:d,label:m}=St(e.arrow);!a&&d&&(a=d);const C=e.linkLabel,y=m??C;r.addLink(r.resolveNodeId(e.from),r.resolveNodeId(e.to),g,y,a)}),o.evolves.forEach(e=>{const g=r.getNode(e.component);if(g?.y!==void 0){const a=D(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,a,g.y)}}),o.annotations.length>0){const e=o.annotations[0],g=L(e.x,e.y,"Annotations box");r.setAnnotationsBox(g.x,g.y)}o.annotation.forEach(e=>{const g=L(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:g.x,y:g.y}],e.text)}),o.accelerators.forEach(e=>{const g=L(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,g.x,g.y)}),o.deaccelerators.forEach(e=>{const g=L(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,g.x,g.y)})},"populateDb"),U={parser:{yy:void 0},parse:f.__name(async o=>{const r=await Ct.parse("wardley",o);f.log.debug(r);const e=U.parser?.yy;if(!e||typeof e.addNode!="function")throw new 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.");Mt(r,e)},"parse")},X,_t=(X=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={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},g={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,g)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const g=this.pipelines.get(r);g&&g.componentIds.push(e);const a=this.nodes.get(e);a&&(a.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}resolveNodeId(r){if(this.nodes.has(r))return r;for(const[e,g]of this.nodes)if(g.label===r)return e;return r}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,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}},f.__name(X,"WardleyBuilder"),X),k=new _t;function K(){return f.getConfig2()["wardley-beta"]}f.__name(K,"getConfig");function Q(o,r,e,g,a,d,m,C,y){k.addNode({id:o,label:r,x:e,y:g,className:a,labelOffsetX:d,labelOffsetY:m,inertia:C,sourceStrategy:y})}f.__name(Q,"addNode");function tt(o,r,e=!1,g,a){k.addLink({source:o,target:r,dashed:e,label:g,flow:a})}f.__name(tt,"addLink");function et(o,r,e){k.addTrend({nodeId:o,targetX:r,targetY:e})}f.__name(et,"addTrend");function at(o,r,e){k.addAnnotation({number:o,coordinates:r,text:e})}f.__name(at,"addAnnotation");function rt(o,r,e){k.addNote({text:o,x:r,y:e})}f.__name(rt,"addNote");function ot(o,r,e){k.addAccelerator({name:o,x:r,y:e})}f.__name(ot,"addAccelerator");function nt(o,r,e){k.addDeaccelerator({name:o,x:r,y:e})}f.__name(nt,"addDeaccelerator");function st(o,r){k.setAnnotationsBox(o,r)}f.__name(st,"setAnnotationsBox");function it(o,r){k.setSize(o,r)}f.__name(it,"setSize");function dt(o){k.startPipeline(o)}f.__name(dt,"startPipeline");function lt(o,r){k.addPipelineComponent(o,r)}f.__name(lt,"addPipelineComponent");function ct(o){k.setAxes(o)}f.__name(ct,"updateAxes");function pt(o){return k.getNode(o)}f.__name(pt,"getNode");function ft(o){return k.resolveNodeId(o)}f.__name(ft,"resolveNodeId");function ht(){return k.build()}f.__name(ht,"getWardleyData");function gt(){k.clear(),f.clear()}f.__name(gt,"clear");var Nt={getConfig:K,addNode:Q,addLink:tt,addTrend:et,addAnnotation:at,addNote:rt,addAccelerator:ot,addDeaccelerator:nt,setAnnotationsBox:st,setSize:it,startPipeline:dt,addPipelineComponent:lt,updateAxes:ct,getNode:pt,resolveNodeId:ft,getWardleyData:ht,clear:gt,setAccTitle:f.setAccTitle,getAccTitle:f.getAccTitle,setDiagramTitle:f.setDiagramTitle,getDiagramTitle:f.getDiagramTitle,getAccDescription:f.getAccDescription,setAccDescription:f.setAccDescription},Tt=["Genesis","Custom Built","Product","Commodity"],At=f.__name(()=>{const{themeVariables:o}=f.getConfig2();return{backgroundColor:o.wardley?.backgroundColor??o.background??"#fff",axisColor:o.wardley?.axisColor??"#000",axisTextColor:o.wardley?.axisTextColor??o.primaryTextColor??"#222",gridColor:o.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:o.wardley?.componentFill??"#fff",componentStroke:o.wardley?.componentStroke??"#000",componentLabelColor:o.wardley?.componentLabelColor??o.primaryTextColor??"#222",linkStroke:o.wardley?.linkStroke??"#000",evolutionStroke:o.wardley?.evolutionStroke??"#dc3545",annotationStroke:o.wardley?.annotationStroke??"#000",annotationTextColor:o.wardley?.annotationTextColor??o.primaryTextColor??"#222",annotationFill:o.wardley?.annotationFill??o.background??"#fff"}},"getTheme"),Lt=f.__name(()=>{const o=f.getConfig2()["wardley-beta"];return{width:o?.width??900,height:o?.height??600,padding:o?.padding??48,nodeRadius:o?.nodeRadius??6,nodeLabelOffset:o?.nodeLabelOffset??8,axisFontSize:o?.axisFontSize??12,labelFontSize:o?.labelFontSize??10,showGrid:o?.showGrid??!1,useMaxWidth:o?.useMaxWidth??!0}},"getConfigValues"),zt=f.__name((o,r,e,g)=>{f.log.debug(`Rendering Wardley map
|
|
2
2
|
`+o);const a=Lt(),d=At(),m=a.nodeRadius*1.6,C=g.db,y=C.getWardleyData(),B=C.getDiagramTitle(),S=y.size?.width??a.width,b=y.size?.height??a.height,E=f.selectSvgElement(r);E.selectAll("*").remove(),f.configureSvgSize(E,b,S,a.useMaxWidth),E.attr("viewBox",`0 0 ${S} ${b}`);const v=E.append("g").attr("class","wardley-map"),G=E.append("defs");G.append("marker").attr("id",`arrow-${r}`).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",d.evolutionStroke).attr("stroke","none"),G.append("marker").attr("id",`link-arrow-end-${r}`).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",d.linkStroke).attr("stroke","none"),G.append("marker").attr("id",`link-arrow-start-${r}`).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",d.linkStroke).attr("stroke","none"),v.append("rect").attr("class","wardley-background").attr("width",S).attr("height",b).attr("fill",d.backgroundColor);const Y=S-a.padding*2,I=b-a.padding*2;B&&v.append("text").attr("class","wardley-title").attr("x",S/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(B);const N=f.__name(t=>a.padding+t/100*Y,"projectX"),T=f.__name(t=>b-a.padding-t/100*I,"projectY"),O=v.append("g").attr("class","wardley-axes");O.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),O.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const xt=y.axes.xLabel??"Evolution",yt=y.axes.yLabel??"Visibility";O.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+Y/2).attr("y",b-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(xt),O.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+I/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+I/2})`).text(yt);const F=y.axes.stages&&y.axes.stages.length>0?y.axes.stages:Tt;if(F.length>0){const t=v.append("g").attr("class","wardley-stages"),s=y.axes.stageBoundaries,n=[];if(s&&s.length===F.length){let i=0;s.forEach(p=>{n.push({start:i,end:p}),i=p})}else{const i=1/F.length;F.forEach((p,l)=>{n.push({start:l*i,end:(l+1)*i})})}F.forEach((i,p)=>{const l=n[p],h=a.padding+l.start*Y,x=a.padding+l.end*Y,u=(h+x)/2;p>0&&t.append("line").attr("x1",h).attr("x2",h).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",b-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){const t=v.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){const n=s/4,i=a.padding+Y*n;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding-I*n).attr("y2",b-a.padding-I*n).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(y.nodes.forEach(t=>{c.set(t.id,{x:N(t.x),y:T(t.y),node:t})}),y.pipelines.length>0){const t=v.append("g").attr("class","wardley-pipelines"),s=v.append("g").attr("class","wardley-pipeline-links");y.pipelines.forEach(n=>{if(n.componentIds.length===0)return;const i=n.componentIds.map(x=>({id:x,pos:c.get(x),node:y.nodes.find(u=>u.id===x)})).filter(x=>x.pos&&x.node).sort((x,u)=>x.node.x-u.node.x);for(let x=0;x<i.length-1;x++){const u=i[x],w=i[x+1];s.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",u.pos.x).attr("y1",u.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,h=0;if(n.componentIds.forEach(x=>{const u=c.get(x);u&&(p=Math.min(p,u.x),l=Math.max(l,u.x),h=u.y)}),p!==1/0&&l!==-1/0){const u=a.nodeRadius*4,w=h-u/2,P=c.get(n.nodeId);if(P){const _=(p+l)/2;P.x=_,P.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",w).attr("width",l-p+30).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const j=v.append("g").attr("class","wardley-links"),V=new Map;y.pipelines.forEach(t=>{V.set(t.nodeId,new Set(t.componentIds))});const Z=y.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||V.get(t.target)?.has(t.source)));j.selectAll("line").data(Z).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const s=c.get(t.source),n=c.get(t.target),p=y.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):a.nodeRadius,l=n.x-s.x,h=n.y-s.y,x=Math.sqrt(l*l+h*h);return s.x+l/x*p}).attr("y1",t=>{const s=c.get(t.source),n=c.get(t.target),p=y.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):a.nodeRadius,l=n.x-s.x,h=n.y-s.y,x=Math.sqrt(l*l+h*h);return s.y+h/x*p}).attr("x2",t=>{const s=c.get(t.source),n=c.get(t.target),p=y.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):a.nodeRadius,l=s.x-n.x,h=s.y-n.y,x=Math.sqrt(l*l+h*h);return n.x+l/x*p}).attr("y2",t=>{const s=c.get(t.source),n=c.get(t.target),p=y.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):a.nodeRadius,l=s.x-n.x,h=s.y-n.y,x=Math.sqrt(l*l+h*h);return n.y+h/x*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${r})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${r})`:null),j.selectAll("text").data(Z.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.x+n.x)/2,p=n.y-s.y,l=n.x-s.x,h=Math.sqrt(l*l+p*p),x=8,u=p/h;return i+u*x}).attr("y",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.y+n.y)/2,p=n.x-s.x,l=n.y-s.y,h=Math.sqrt(p*p+l*l),x=8,u=-p/h;return i+u*x}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const s=c.get(t.source),n=c.get(t.target),i=(s.x+n.x)/2,p=(s.y+n.y)/2,l=n.x-s.x,h=n.y-s.y,x=Math.sqrt(l*l+h*h),u=8,w=h/x,P=-l/x,_=i+w*u,R=p+P*u;let z=Math.atan2(h,l)*180/Math.PI;return(z>90||z<-90)&&(z+=180),`rotate(${z} ${_} ${R})`}).text(t=>t.label);const ut=v.append("g").attr("class","wardley-trends"),mt=y.trends.map(t=>{const s=c.get(t.nodeId);if(!s)return null;const n=N(t.targetX),i=T(t.targetY),p=n-s.x,l=i-s.y,h=Math.sqrt(p*p+l*l),x=a.nodeRadius+2,u=h>x?n-p/h*x:n,w=h>x?i-l/h*x:i;return{origin:s,targetX:n,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);ut.selectAll("line").data(mt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`);const M=v.append("g").attr("class","wardley-nodes").selectAll("g").data(y.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));M.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const A=M.filter(t=>t.sourceStrategy==="market");A.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const q=a.nodeRadius*.7,$=a.nodeRadius*1.2;if(A.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),A.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),A.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),A.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),A.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),A.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),M.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const s=c.get(t.id);let n=t.isPipelineParent?m/2+15:a.nodeRadius+15;return t.sourceStrategy&&(n+=a.nodeRadius+10),s.x+n}).attr("y1",t=>{const s=c.get(t.id),n=t.isPipelineParent?m:a.nodeRadius*2;return s.y-n/2}).attr("x2",t=>{const s=c.get(t.id);let n=t.isPipelineParent?m/2+15:a.nodeRadius+15;return t.sourceStrategy&&(n+=a.nodeRadius+10),s.x+n}).attr("y2",t=>{const s=c.get(t.id),n=t.isPipelineParent?m:a.nodeRadius*2;return s.y+n/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),M.append("text").attr("x",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let n=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(n+=10);const i=t.labelOffsetX??n;return s.x+i}).attr("y",t=>{const s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let n=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(n-=10);const i=t.labelOffsetY??n;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),y.annotations.length>0){const t=v.append("g").attr("class","wardley-annotations");if(y.annotations.forEach(s=>{const n=s.coordinates.map(i=>({x:N(i.x),y:T(i.y)}));if(n.length>1)for(let i=0;i<n.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",n[i].x).attr("y1",n[i].y).attr("x2",n[i+1].x).attr("y2",n[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");n.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.number)})}),y.annotationsBox){let s=N(y.annotationsBox.x),n=T(y.annotationsBox.y);const i=10,p=16,l=11,h=t.append("g").attr("class","wardley-annotations-box"),x=[...y.annotations].filter(w=>w.text).sort((w,P)=>w.number-P.number),u=[];if(x.forEach((w,P)=>{const _=h.append("text").attr("x",s+i).attr("y",n+i+(P+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(_)}),u.length>0){let w=0,P=0;u.forEach(H=>{const W=H.node(),$t=W.getComputedTextLength();w=Math.max(w,$t);const vt=W.getBBox();P=Math.max(P,vt.height)});const _=w+i*2+105,R=x.length*p+i*2+P/2,z=a.padding,wt=S-a.padding-_,kt=a.padding,bt=b-a.padding-R;s=Math.max(z,Math.min(s,wt)),n=Math.max(kt,Math.min(n,bt)),u.forEach((H,W)=>{H.attr("x",s+i).attr("y",n+i+(W+1)*p)}),h.insert("rect","text").attr("x",s).attr("y",n).attr("width",_).attr("height",R).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(y.notes.length>0){const t=v.append("g").attr("class","wardley-notes");y.notes.forEach(s=>{const n=N(s.x),i=T(s.y);t.append("text").attr("x",n).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(y.accelerators.length>0){const t=v.append("g").attr("class","wardley-accelerators");y.accelerators.forEach(s=>{const n=N(s.x),i=T(s.y),p=60,l=30,h=20,x=`
|
|
3
3
|
M ${n} ${i-l/2}
|
|
4
4
|
L ${n+p-h} ${i-l/2}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as Mt } from "./chunk-JWPE2WC7-
|
|
2
|
-
import {
|
|
3
|
-
import { p as
|
|
1
|
+
import { p as Mt } from "./chunk-JWPE2WC7-B-nuuS4b.js";
|
|
2
|
+
import { O as Nt, Q as zt, ae as Lt, ad as Tt, U as At, V as Xt, _ as u, at as Et, an as Yt, ap as Q, $ as K, as as It, a0 as Bt, aj as Ft, W as V } from "./extractHeadings-B2I83li5.js";
|
|
3
|
+
import { p as Ot } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
|
|
4
4
|
var G = /* @__PURE__ */ u((o, r) => {
|
|
5
5
|
const e = o <= 1 ? o * 100 : o;
|
|
6
6
|
if (e < 0 || e > 100)
|
|
@@ -8,7 +8,7 @@ var G = /* @__PURE__ */ u((o, r) => {
|
|
|
8
8
|
`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${o}`
|
|
9
9
|
);
|
|
10
10
|
return e;
|
|
11
|
-
}, "toPercent"),
|
|
11
|
+
}, "toPercent"), A = /* @__PURE__ */ u((o, r, e) => ({
|
|
12
12
|
x: G(r, `${e} evolution`),
|
|
13
13
|
y: G(o, `${e} visibility`)
|
|
14
14
|
}), "toCoordinates"), J = /* @__PURE__ */ u((o) => {
|
|
@@ -20,7 +20,7 @@ var G = /* @__PURE__ */ u((o, r) => {
|
|
|
20
20
|
if (o === "+>")
|
|
21
21
|
return "forward";
|
|
22
22
|
}
|
|
23
|
-
}, "getFlowFromPort"),
|
|
23
|
+
}, "getFlowFromPort"), Rt = /* @__PURE__ */ u((o) => {
|
|
24
24
|
if (!o?.startsWith("+"))
|
|
25
25
|
return {};
|
|
26
26
|
const e = /^\+'([^']*)'/.exec(o)?.[1];
|
|
@@ -31,10 +31,10 @@ var G = /* @__PURE__ */ u((o, r) => {
|
|
|
31
31
|
r.updateAxes({ stages: e, stageBoundaries: h });
|
|
32
32
|
}
|
|
33
33
|
if (o.anchors.forEach((e) => {
|
|
34
|
-
const h =
|
|
34
|
+
const h = A(e.visibility, e.evolution, `Anchor "${e.name}"`);
|
|
35
35
|
r.addNode(e.name, e.name, h.x, h.y, "anchor");
|
|
36
36
|
}), o.components.forEach((e) => {
|
|
37
|
-
const h =
|
|
37
|
+
const h = A(
|
|
38
38
|
e.visibility,
|
|
39
39
|
e.evolution,
|
|
40
40
|
`Component "${e.name}"`
|
|
@@ -51,7 +51,7 @@ var G = /* @__PURE__ */ u((o, r) => {
|
|
|
51
51
|
w
|
|
52
52
|
);
|
|
53
53
|
}), o.notes.forEach((e) => {
|
|
54
|
-
const h =
|
|
54
|
+
const h = A(e.visibility, e.evolution, `Note "${e.text}"`);
|
|
55
55
|
r.addNote(e.text, h.x, h.y);
|
|
56
56
|
}), o.pipelines.forEach((e) => {
|
|
57
57
|
const h = r.getNode(e.parent);
|
|
@@ -61,11 +61,11 @@ var G = /* @__PURE__ */ u((o, r) => {
|
|
|
61
61
|
);
|
|
62
62
|
const a = h.y;
|
|
63
63
|
r.startPipeline(e.parent), e.components.forEach((d) => {
|
|
64
|
-
const w = `${e.parent}_${d.name}`, C = d.label ? (d.label.negX ? -1 : 1) * d.label.offsetX : void 0, g = d.label ? (d.label.negY ? -1 : 1) * d.label.offsetY : void 0,
|
|
64
|
+
const w = `${e.parent}_${d.name}`, C = d.label ? (d.label.negX ? -1 : 1) * d.label.offsetX : void 0, g = d.label ? (d.label.negY ? -1 : 1) * d.label.offsetY : void 0, O = G(d.evolution, `Pipeline component "${d.name}" evolution`);
|
|
65
65
|
r.addNode(
|
|
66
66
|
w,
|
|
67
67
|
d.name,
|
|
68
|
-
|
|
68
|
+
O,
|
|
69
69
|
a,
|
|
70
70
|
"pipeline-component",
|
|
71
71
|
C,
|
|
@@ -75,7 +75,7 @@ var G = /* @__PURE__ */ u((o, r) => {
|
|
|
75
75
|
}), o.links.forEach((e) => {
|
|
76
76
|
const h = !!e.arrow && (e.arrow.includes("-.->") || e.arrow.includes(".-."));
|
|
77
77
|
let a = J(e.fromPort) ?? J(e.toPort);
|
|
78
|
-
const { flow: d, label: w } =
|
|
78
|
+
const { flow: d, label: w } = Rt(e.arrow);
|
|
79
79
|
!a && d && (a = d);
|
|
80
80
|
const C = e.linkLabel, g = w ?? C;
|
|
81
81
|
r.addLink(r.resolveNodeId(e.from), r.resolveNodeId(e.to), h, g, a);
|
|
@@ -86,17 +86,17 @@ var G = /* @__PURE__ */ u((o, r) => {
|
|
|
86
86
|
r.addTrend(e.component, a, h.y);
|
|
87
87
|
}
|
|
88
88
|
}), o.annotations.length > 0) {
|
|
89
|
-
const e = o.annotations[0], h =
|
|
89
|
+
const e = o.annotations[0], h = A(e.x, e.y, "Annotations box");
|
|
90
90
|
r.setAnnotationsBox(h.x, h.y);
|
|
91
91
|
}
|
|
92
92
|
o.annotation.forEach((e) => {
|
|
93
|
-
const h =
|
|
93
|
+
const h = A(e.x, e.y, `Annotation ${e.number}`);
|
|
94
94
|
r.addAnnotation(e.number, [{ x: h.x, y: h.y }], e.text);
|
|
95
95
|
}), o.accelerators.forEach((e) => {
|
|
96
|
-
const h =
|
|
96
|
+
const h = A(e.x, e.y, `Accelerator "${e.name}"`);
|
|
97
97
|
r.addAccelerator(e.name, h.x, h.y);
|
|
98
98
|
}), o.deaccelerators.forEach((e) => {
|
|
99
|
-
const h =
|
|
99
|
+
const h = A(
|
|
100
100
|
e.x,
|
|
101
101
|
e.y,
|
|
102
102
|
`Deaccelerator "${e.name}"`
|
|
@@ -109,7 +109,7 @@ var G = /* @__PURE__ */ u((o, r) => {
|
|
|
109
109
|
yy: void 0
|
|
110
110
|
},
|
|
111
111
|
parse: /* @__PURE__ */ u(async (o) => {
|
|
112
|
-
const r = await
|
|
112
|
+
const r = await Ot("wardley", o);
|
|
113
113
|
K.debug(r);
|
|
114
114
|
const e = tt.parser?.yy;
|
|
115
115
|
if (!e || typeof e.addNode != "function")
|
|
@@ -332,8 +332,8 @@ var Gt = {
|
|
|
332
332
|
resolveNodeId: gt,
|
|
333
333
|
getWardleyData: yt,
|
|
334
334
|
clear: ut,
|
|
335
|
-
setAccTitle:
|
|
336
|
-
getAccTitle:
|
|
335
|
+
setAccTitle: Xt,
|
|
336
|
+
getAccTitle: At,
|
|
337
337
|
setDiagramTitle: Tt,
|
|
338
338
|
getDiagramTitle: Lt,
|
|
339
339
|
getAccDescription: zt,
|
|
@@ -370,16 +370,16 @@ var Gt = {
|
|
|
370
370
|
}, "getConfigValues"), Vt = /* @__PURE__ */ u((o, r, e, h) => {
|
|
371
371
|
K.debug(`Rendering Wardley map
|
|
372
372
|
` + o);
|
|
373
|
-
const a = jt(), d = Ht(), w = a.nodeRadius * 1.6, C = h.db, g = C.getWardleyData(),
|
|
373
|
+
const a = jt(), d = Ht(), w = a.nodeRadius * 1.6, C = h.db, g = C.getWardleyData(), O = C.getDiagramTitle(), S = g.size?.width ?? a.width, b = g.size?.height ?? a.height, Y = It(r);
|
|
374
374
|
Y.selectAll("*").remove(), Bt(Y, b, S, a.useMaxWidth), Y.attr("viewBox", `0 0 ${S} ${b}`);
|
|
375
375
|
const v = Y.append("g").attr("class", "wardley-map"), q = Y.append("defs");
|
|
376
376
|
q.append("marker").attr("id", `arrow-${r}`).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", d.evolutionStroke).attr("stroke", "none"), q.append("marker").attr("id", `link-arrow-end-${r}`).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", d.linkStroke).attr("stroke", "none"), q.append("marker").attr("id", `link-arrow-start-${r}`).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", d.linkStroke).attr("stroke", "none"), v.append("rect").attr("class", "wardley-background").attr("width", S).attr("height", b).attr("fill", d.backgroundColor);
|
|
377
377
|
const I = S - a.padding * 2, B = b - a.padding * 2;
|
|
378
|
-
|
|
379
|
-
const z = /* @__PURE__ */ u((t) => a.padding + t / 100 * I, "projectX"), L = /* @__PURE__ */ u((t) => b - a.padding - t / 100 * B, "projectY"),
|
|
380
|
-
|
|
378
|
+
O && v.append("text").attr("class", "wardley-title").attr("x", S / 2).attr("y", a.padding / 2).attr("fill", d.axisTextColor).attr("font-size", a.axisFontSize * 1.05).attr("font-weight", "bold").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(O);
|
|
379
|
+
const z = /* @__PURE__ */ u((t) => a.padding + t / 100 * I, "projectX"), L = /* @__PURE__ */ u((t) => b - a.padding - t / 100 * B, "projectY"), R = v.append("g").attr("class", "wardley-axes");
|
|
380
|
+
R.append("line").attr("x1", a.padding).attr("x2", S - a.padding).attr("y1", b - a.padding).attr("y2", b - a.padding).attr("stroke", d.axisColor).attr("stroke-width", 1), R.append("line").attr("x1", a.padding).attr("x2", a.padding).attr("y1", a.padding).attr("y2", b - a.padding).attr("stroke", d.axisColor).attr("stroke-width", 1);
|
|
381
381
|
const wt = g.axes.xLabel ?? "Evolution", mt = g.axes.yLabel ?? "Visibility";
|
|
382
|
-
|
|
382
|
+
R.append("text").attr("class", "wardley-axis-label wardley-axis-label-x").attr("x", a.padding + I / 2).attr("y", b - a.padding / 4).attr("fill", d.axisTextColor).attr("font-size", a.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").text(wt), R.append("text").attr("class", "wardley-axis-label wardley-axis-label-y").attr("x", a.padding / 3).attr("y", a.padding + B / 2).attr("fill", d.axisTextColor).attr("font-size", a.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").attr(
|
|
383
383
|
"transform",
|
|
384
384
|
`rotate(-90 ${a.padding / 3} ${a.padding + B / 2})`
|
|
385
385
|
).text(mt);
|
|
@@ -468,8 +468,8 @@ var Gt = {
|
|
|
468
468
|
return i + y * x;
|
|
469
469
|
}).attr("fill", d.axisTextColor).attr("font-size", a.labelFontSize).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("transform", (t) => {
|
|
470
470
|
const s = c.get(t.source), n = c.get(t.target), i = (s.x + n.x) / 2, p = (s.y + n.y) / 2, l = n.x - s.x, f = n.y - s.y, x = Math.sqrt(l * l + f * f), y = 8, m = f / x, P = -l / x, N = i + m * y, W = p + P * y;
|
|
471
|
-
let
|
|
472
|
-
return (
|
|
471
|
+
let X = Math.atan2(f, l) * 180 / Math.PI;
|
|
472
|
+
return (X > 90 || X < -90) && (X += 180), `rotate(${X} ${N} ${W})`;
|
|
473
473
|
}).text((t) => t.label);
|
|
474
474
|
const kt = v.append("g").attr("class", "wardley-trends"), bt = g.trends.map((t) => {
|
|
475
475
|
const s = c.get(t.nodeId);
|
|
@@ -553,8 +553,8 @@ var Gt = {
|
|
|
553
553
|
const St = D.getBBox();
|
|
554
554
|
P = Math.max(P, St.height);
|
|
555
555
|
});
|
|
556
|
-
const N = m + i * 2 + 105, W = x.length * p + i * 2 + P / 2,
|
|
557
|
-
s = Math.max(
|
|
556
|
+
const N = m + i * 2 + 105, W = x.length * p + i * 2 + P / 2, X = a.padding, $t = S - a.padding - N, vt = a.padding, Pt = b - a.padding - W;
|
|
557
|
+
s = Math.max(X, Math.min(s, $t)), n = Math.max(vt, Math.min(n, Pt)), y.forEach((j, D) => {
|
|
558
558
|
j.attr("x", s + i).attr("y", n + i + (D + 1) * p);
|
|
559
559
|
}), f.insert("rect", "text").attr("x", s).attr("y", n).attr("width", N).attr("height", W).attr("fill", "white").attr("stroke", d.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
|
|
560
560
|
}
|