@aiquants/markdown 8.1.1 → 9.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 +102 -4
- package/dist/{abnfDiagram-VRR7QNED-714qd8by.cjs → abnfDiagram-VRR7QNED-BlcBSkWc.cjs} +1 -1
- package/dist/{abnfDiagram-VRR7QNED-ClsV3o7-.js → abnfDiagram-VRR7QNED-DPvv0JN7.js} +3 -3
- package/dist/{arc-Bs2N0CEE.cjs → arc-DnEVH7-N.cjs} +1 -1
- package/dist/arc-b3PXY3wd.js +83 -0
- package/dist/{architectureDiagram-ZJ3FMSHR-l2Kn8D2e.js → architectureDiagram-ZJ3FMSHR-BPDNqRgJ.js} +2 -2
- package/dist/{architectureDiagram-ZJ3FMSHR-SPtbaJq1.cjs → architectureDiagram-ZJ3FMSHR-BPesVaHB.cjs} +1 -1
- package/dist/{blockDiagram-677ZJIJ3-CbCSQo90.js → blockDiagram-677ZJIJ3-Bif7ObTM.js} +3 -3
- package/dist/{blockDiagram-677ZJIJ3-C01MGcBZ.cjs → blockDiagram-677ZJIJ3-D1wkf-um.cjs} +1 -1
- package/dist/{c4Diagram-LMCZKHZV-CdXSplj6.js → c4Diagram-LMCZKHZV-BTR45GVa.js} +2 -2
- package/dist/{c4Diagram-LMCZKHZV-TuT3uTkj.cjs → c4Diagram-LMCZKHZV-ByUwS5Pa.cjs} +1 -1
- package/dist/{channel-inzdTBsL.js → channel-BjDEP12v.js} +1 -1
- package/dist/{channel-DZlQOicJ.cjs → channel-s9lqY49F.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-BlcbsuzR.js → chunk-2Q5K7J3B-3Yxool5g.js} +1 -1
- package/dist/{chunk-2Q5K7J3B-D2t88W5_.cjs → chunk-2Q5K7J3B-GdBcW8di.cjs} +1 -1
- package/dist/{chunk-32BRIVSS-DPtab14v.cjs → chunk-32BRIVSS-B08XoiLi.cjs} +1 -1
- package/dist/{chunk-32BRIVSS-8XP7uEWL.js → chunk-32BRIVSS-CVTMS7GT.js} +1 -1
- package/dist/{chunk-5VM5RSS4-BjciIcJB.cjs → chunk-5VM5RSS4-BQoi-IrE.cjs} +1 -1
- package/dist/{chunk-5VM5RSS4-D03FahtZ.js → chunk-5VM5RSS4-D9iWNvvu.js} +1 -1
- package/dist/{chunk-EX3LRPZG-CwaWU3NG.cjs → chunk-EX3LRPZG-BXIZ7mJ_.cjs} +1 -1
- package/dist/{chunk-EX3LRPZG-Cz4_aUcx.js → chunk-EX3LRPZG-CRf3FYTC.js} +21 -21
- package/dist/{chunk-JWPE2WC7-BhnZoEDO.cjs → chunk-JWPE2WC7-BziKhEzJ.cjs} +1 -1
- package/dist/{chunk-JWPE2WC7-CZnRHc3B.js → chunk-JWPE2WC7-D2PL9wSE.js} +1 -1
- package/dist/{chunk-MOJQB5TN-Bln4G16L.cjs → chunk-MOJQB5TN-BZPg0rA4.cjs} +1 -1
- package/dist/{chunk-MOJQB5TN-CAgrBpGK.js → chunk-MOJQB5TN-DcKI-L1a.js} +7 -7
- package/dist/{chunk-PUDLZKDR-Chc4If4v.js → chunk-PUDLZKDR-DDUAtfaX.js} +6 -6
- package/dist/{chunk-PUDLZKDR-ZSUOxhwQ.cjs → chunk-PUDLZKDR-DtwY_vfa.cjs} +1 -1
- package/dist/{chunk-RYQCIY6F-CmqX9MNK.cjs → chunk-RYQCIY6F-BczXRQc_.cjs} +1 -1
- package/dist/{chunk-RYQCIY6F-BWJMA-CG.js → chunk-RYQCIY6F-CrSm-DUq.js} +5 -5
- package/dist/{chunk-V7JOEXUC-B13vGPTt.cjs → chunk-V7JOEXUC-DHDaKlaz.cjs} +1 -1
- package/dist/{chunk-V7JOEXUC-DxTIfD2Z.js → chunk-V7JOEXUC-fKZqn2BY.js} +15 -15
- package/dist/{chunk-VR4S4FIN-CbzSMdlG.js → chunk-VR4S4FIN-CB1TUCm-.js} +3 -3
- package/dist/{chunk-VR4S4FIN-C67CWetO.cjs → chunk-VR4S4FIN-CbOikBFH.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-D00l-azL.cjs → chunk-XXDRQBXY-BNQCeyB9.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-DF5XNYDF.js → chunk-XXDRQBXY-K8anqUB1.js} +1 -1
- package/dist/{classDiagram-v2-EOCWNBFH-BVXrsjAy.js → classDiagram-OUVF2IWQ-0DLLfHtC.js} +2 -2
- package/dist/{classDiagram-OUVF2IWQ-kTYC0DeX.cjs → classDiagram-OUVF2IWQ-D1vfgcCB.cjs} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-BVXrsjAy.js → classDiagram-v2-EOCWNBFH-0DLLfHtC.js} +2 -2
- package/dist/{classDiagram-v2-EOCWNBFH-kTYC0DeX.cjs → classDiagram-v2-EOCWNBFH-D1vfgcCB.cjs} +1 -1
- package/dist/code-blocks.cjs +1 -0
- package/dist/code-blocks.d.ts +12 -0
- package/dist/code-blocks.js +36 -0
- package/dist/components/MarkdownRenderer.d.ts +6 -1
- package/dist/components/MarkdownViewer.d.ts +5 -1
- package/dist/components/SpreadsheetBlock.d.ts +24 -0
- package/dist/components/SpreadsheetToolbar.d.ts +21 -0
- package/dist/components/controlStyles.d.ts +3 -0
- package/dist/components/mdastNodes/CodeNode.d.ts +1 -0
- package/dist/components/spreadsheetClipboard.d.ts +16 -0
- package/dist/components/spreadsheetLabels.d.ts +33 -0
- package/dist/components/spreadsheetModel.d.ts +31 -0
- package/dist/components/viewerLabels.d.ts +6 -1
- package/dist/converter.wasm +0 -0
- package/dist/{cose-bilkent-JH36ORCC-lZuyWql7.js → cose-bilkent-JH36ORCC-DSrvI7Rp.js} +5 -5
- package/dist/{cose-bilkent-JH36ORCC-CbeyXphF.cjs → cose-bilkent-JH36ORCC-Flvn8Q3R.cjs} +1 -1
- package/dist/{cynefinDiagram-TSTJHNR4-DKAvatlk.js → cynefinDiagram-TSTJHNR4-BGtSNTPQ.js} +56 -56
- package/dist/{cynefinDiagram-TSTJHNR4-Cuqne60m.cjs → cynefinDiagram-TSTJHNR4-BxqOgmm9.cjs} +1 -1
- package/dist/{dagre-VKFMJZFB-DOl32ZLj.js → dagre-VKFMJZFB-Bq5NKuKi.js} +26 -26
- package/dist/{dagre-VKFMJZFB-D9B4A3vP.cjs → dagre-VKFMJZFB-CIQyEWnl.cjs} +1 -1
- package/dist/{diagram-FQU43EPY-DW9s8x-t.js → diagram-FQU43EPY-B4shMan7.js} +31 -31
- package/dist/{diagram-FQU43EPY-CyKNQRDz.cjs → diagram-FQU43EPY-C-3vCuEY.cjs} +1 -1
- package/dist/{diagram-G47NLZAW-JWyg9BAf.js → diagram-G47NLZAW-BnJ5uYMd.js} +49 -49
- package/dist/{diagram-G47NLZAW-Bd402kCS.cjs → diagram-G47NLZAW-BnVPH5jd.cjs} +1 -1
- package/dist/{diagram-NH7WQ7WH-O9D369xQ.cjs → diagram-NH7WQ7WH-4RGgOu7p.cjs} +1 -1
- package/dist/{diagram-NH7WQ7WH-CBVjs5Qb.js → diagram-NH7WQ7WH-9s11j-Nx.js} +15 -15
- package/dist/{diagram-OA4YK3LP-CGFLIsXt.cjs → diagram-OA4YK3LP-BBtbKikh.cjs} +1 -1
- package/dist/{diagram-OA4YK3LP-DwedHmnV.js → diagram-OA4YK3LP-CgqOV0tg.js} +25 -25
- package/dist/{diagram-WEI45ONY-BgJvkrqe.js → diagram-WEI45ONY-CvzP7VJ3.js} +67 -67
- package/dist/{diagram-WEI45ONY-CEsljMQV.cjs → diagram-WEI45ONY-DZKSviH2.cjs} +1 -1
- package/dist/{ebnfDiagram-CCIWWBDH-C7QZ4wXM.js → ebnfDiagram-CCIWWBDH-CJSyu4o9.js} +3 -3
- package/dist/{ebnfDiagram-CCIWWBDH-e9oWuIhA.cjs → ebnfDiagram-CCIWWBDH-DpiouxMS.cjs} +1 -1
- package/dist/{erDiagram-Q63AITRT-BdP8JBuN.cjs → erDiagram-Q63AITRT-BT1bGFxN.cjs} +1 -1
- package/dist/{erDiagram-Q63AITRT-OUarWTK1.js → erDiagram-Q63AITRT-BxRdYBzJ.js} +19 -19
- package/dist/extractHeadings-B-v1O82x.cjs +314 -0
- package/dist/{extractHeadings-CUTXOBTa.js → extractHeadings-SqtThWou.js} +6472 -5968
- package/dist/flowDiagram-23GEKE2U-C-drHfAk.js +7 -0
- package/dist/flowDiagram-23GEKE2U-Cr8_S21X.cjs +1 -0
- package/dist/{ganttDiagram-NO4QXBWP-DjqYneGy.cjs → ganttDiagram-NO4QXBWP-BXUukgtA.cjs} +1 -1
- package/dist/{ganttDiagram-NO4QXBWP-7q1R_3-p.js → ganttDiagram-NO4QXBWP-BbNFbubH.js} +2 -2
- package/dist/{gitGraphDiagram-IHSO6WYX-B5gb3Rqu.js → gitGraphDiagram-IHSO6WYX-BY7URUuV.js} +10 -10
- package/dist/{gitGraphDiagram-IHSO6WYX-BjogZ4FH.cjs → gitGraphDiagram-IHSO6WYX-CtRl8SF8.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.client.cjs +1 -1
- package/dist/index.client.d.ts +3 -1
- package/dist/index.client.js +38 -36
- package/dist/index.js +38 -36
- package/dist/{infoDiagram-FWYZ7A6U-BaKyN9IA.js → infoDiagram-FWYZ7A6U-BwM_aV37.js} +3 -3
- package/dist/{infoDiagram-FWYZ7A6U-BkG_Sltp.cjs → infoDiagram-FWYZ7A6U-DjbpQufv.cjs} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-CSv6cDIC.js → ishikawaDiagram-FXEZZL3T-CWHT2wjh.js} +35 -35
- package/dist/{ishikawaDiagram-FXEZZL3T-CiyiRY0n.cjs → ishikawaDiagram-FXEZZL3T-D0k3NpJW.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-CidOpS4e.cjs → journeyDiagram-5HDEW3XC-BAzrW3sk.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-BSe4iQ8y.js → journeyDiagram-5HDEW3XC-CTBamWVg.js} +30 -30
- package/dist/{kanban-definition-HUTT4EX6-NcWyJMi_.js → kanban-definition-HUTT4EX6-DX8ATmyc.js} +47 -47
- package/dist/{kanban-definition-HUTT4EX6-E7S0-2B0.cjs → kanban-definition-HUTT4EX6-vEBxhqy3.cjs} +1 -1
- package/dist/{linear-DBHjPQ2a.js → linear-CUPbFHK0.js} +5 -5
- package/dist/{linear-DVrRITf5.cjs → linear-DO7t2MIy.cjs} +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-CPgaG7JV.cjs → mindmap-definition-LN4V7U3C-CPgbGhe0.cjs} +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-ddxMumCY.js → mindmap-definition-LN4V7U3C-CZiyButG.js} +11 -11
- package/dist/{pegDiagram-2B236MQR-CLzXETR3.js → pegDiagram-2B236MQR-BTTxMeDC.js} +3 -3
- package/dist/{pegDiagram-2B236MQR-CA_DeqqA.cjs → pegDiagram-2B236MQR-DFSWh2UC.cjs} +1 -1
- package/dist/{pieDiagram-ENE6RG2P-WVn8XJGb.js → pieDiagram-ENE6RG2P-5OqZWuO-.js} +49 -49
- package/dist/{pieDiagram-ENE6RG2P-Dg04F48S.cjs → pieDiagram-ENE6RG2P-DWsTb8I9.cjs} +1 -1
- package/dist/{quadrantDiagram-ABIIQ3AL-BsckSYJt.cjs → quadrantDiagram-ABIIQ3AL-BnIKvRMS.cjs} +1 -1
- package/dist/{quadrantDiagram-ABIIQ3AL-DyWlNOhT.js → quadrantDiagram-ABIIQ3AL-DimV94Rb.js} +45 -45
- package/dist/{railroadDiagram-RFXS5EU6-D3VxK11o.js → railroadDiagram-RFXS5EU6-CO_q8JT9.js} +3 -3
- package/dist/{railroadDiagram-RFXS5EU6-DCnQVXco.cjs → railroadDiagram-RFXS5EU6-D7cUshy0.cjs} +1 -1
- package/dist/{requirementDiagram-TGXJPOKE-BMaGXiNU.js → requirementDiagram-TGXJPOKE-Ceitr12-.js} +3 -3
- package/dist/{requirementDiagram-TGXJPOKE-DXCyNSis.cjs → requirementDiagram-TGXJPOKE-CjPsjAsx.cjs} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-BX6vKeUm.js → sankeyDiagram-HTMAVEWB-CAfuQjzU.js} +47 -47
- package/dist/{sankeyDiagram-HTMAVEWB-D1m7iBLQ.cjs → sankeyDiagram-HTMAVEWB-CQhx84em.cjs} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-0mMExPO7.js → sequenceDiagram-DBY2YBRQ-BZ2yIdO6.js} +3 -3
- package/dist/{sequenceDiagram-DBY2YBRQ-BOZ4f_Hs.cjs → sequenceDiagram-DBY2YBRQ-Cr1VcoK2.cjs} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-0Q0rI-PZ.cjs → sizeCapture-X5ZJPWSS-B5X1945u.cjs} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-CFgV5LdI.js → sizeCapture-X5ZJPWSS-CA-VZP1J.js} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-Co2cQg3S.cjs → stateDiagram-2N3HPSRC-BeP4b2HS.cjs} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-BbQVKPdF.js → stateDiagram-2N3HPSRC-CbAk-IE5.js} +13 -13
- package/dist/{stateDiagram-v2-6OUMAXLB-QePyEJnH.js → stateDiagram-v2-6OUMAXLB-C5uUx1aU.js} +2 -2
- package/dist/{stateDiagram-v2-6OUMAXLB-Boy-ppxx.cjs → stateDiagram-v2-6OUMAXLB-L_ypLgkx.cjs} +1 -1
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/markdown.standalone.css +1 -1
- package/dist/{swimlanes-5IMT3BWC-D4n1siHn.js → swimlanes-5IMT3BWC-BOKZHjmn.js} +313 -313
- package/dist/{swimlanes-5IMT3BWC-Cqs5VVSm.cjs → swimlanes-5IMT3BWC-DGpEXqaM.cjs} +1 -1
- package/dist/{swimlanesDiagram-G3AALYLV-Da8ZZAJn.js → swimlanesDiagram-G3AALYLV-BG07hh3H.js} +2 -2
- package/dist/{swimlanesDiagram-G3AALYLV-DVHw2s5w.cjs → swimlanesDiagram-G3AALYLV-DqChJVS9.cjs} +1 -1
- package/dist/{timeline-definition-FHXFAJF6-BGK-KyNC.js → timeline-definition-FHXFAJF6-Ct3xWe_j.js} +40 -40
- package/dist/{timeline-definition-FHXFAJF6-D25i6kkS.cjs → timeline-definition-FHXFAJF6-O0HVNX0c.cjs} +1 -1
- package/dist/{vennDiagram-L72KCM5P-8XQ-KXbG.cjs → vennDiagram-L72KCM5P-BqOqbGRA.cjs} +1 -1
- package/dist/{vennDiagram-L72KCM5P-CLkAwtsq.js → vennDiagram-L72KCM5P-DCY6NWkD.js} +124 -124
- package/dist/{wardleyDiagram-EHGQE667-DPCJNwRB.cjs → wardleyDiagram-EHGQE667-B2Civob5.cjs} +1 -1
- package/dist/{wardleyDiagram-EHGQE667-C0S3P_7H.js → wardleyDiagram-EHGQE667-CYStGsZi.js} +25 -25
- package/dist/{xychartDiagram-FW5EYKEG-DAacRCtv.js → xychartDiagram-FW5EYKEG-BifGB5it.js} +40 -40
- package/dist/{xychartDiagram-FW5EYKEG-BTE5ffMN.cjs → xychartDiagram-FW5EYKEG-C4GuhADi.cjs} +1 -1
- package/package.json +16 -7
- package/dist/arc-Eb0BfUPO.js +0 -83
- package/dist/extractHeadings-agc-00bD.cjs +0 -311
- package/dist/flowDiagram-23GEKE2U-BZYdQMwk.js +0 -7
- package/dist/flowDiagram-23GEKE2U-DDjpVH-X.cjs +0 -1
|
@@ -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-BziKhEzJ.cjs"),f=require("./extractHeadings-B-v1O82x.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-D2PL9wSE.js";
|
|
2
|
+
import { G as Nt, J as zt, a9 as Lt, a8 as Tt, K as At, O as Xt, _ as u, ao as Et, ai as Yt, ak as J, U as Q, an as It, V as Bt, ae as Ft, Q as V } from "./extractHeadings-SqtThWou.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)
|
|
@@ -11,7 +11,7 @@ var G = /* @__PURE__ */ u((o, r) => {
|
|
|
11
11
|
}, "toPercent"), A = /* @__PURE__ */ u((o, r, e) => ({
|
|
12
12
|
x: G(r, `${e} evolution`),
|
|
13
13
|
y: G(o, `${e} visibility`)
|
|
14
|
-
}), "toCoordinates"),
|
|
14
|
+
}), "toCoordinates"), K = /* @__PURE__ */ u((o) => {
|
|
15
15
|
if (o) {
|
|
16
16
|
if (o === "+<>")
|
|
17
17
|
return "bidirectional";
|
|
@@ -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];
|
|
@@ -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,
|
|
@@ -74,8 +74,8 @@ var G = /* @__PURE__ */ u((o, r) => {
|
|
|
74
74
|
});
|
|
75
75
|
}), o.links.forEach((e) => {
|
|
76
76
|
const h = !!e.arrow && (e.arrow.includes("-.->") || e.arrow.includes(".-."));
|
|
77
|
-
let a =
|
|
78
|
-
const { flow: d, label: w } =
|
|
77
|
+
let a = K(e.fromPort) ?? K(e.toPort);
|
|
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);
|
|
@@ -109,8 +109,8 @@ var G = /* @__PURE__ */ u((o, r) => {
|
|
|
109
109
|
yy: void 0
|
|
110
110
|
},
|
|
111
111
|
parse: /* @__PURE__ */ u(async (o) => {
|
|
112
|
-
const r = await
|
|
113
|
-
|
|
112
|
+
const r = await Ot("wardley", o);
|
|
113
|
+
Q.debug(r);
|
|
114
114
|
const e = tt.parser?.yy;
|
|
115
115
|
if (!e || typeof e.addNode != "function")
|
|
116
116
|
throw new Error(
|
|
@@ -368,18 +368,18 @@ var Gt = {
|
|
|
368
368
|
useMaxWidth: o?.useMaxWidth ?? !0
|
|
369
369
|
};
|
|
370
370
|
}, "getConfigValues"), Vt = /* @__PURE__ */ u((o, r, e, h) => {
|
|
371
|
-
|
|
371
|
+
Q.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);
|
|
@@ -443,12 +443,12 @@ var Gt = {
|
|
|
443
443
|
}
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
|
-
const _ = v.append("g").attr("class", "wardley-links"),
|
|
446
|
+
const _ = v.append("g").attr("class", "wardley-links"), U = /* @__PURE__ */ new Map();
|
|
447
447
|
g.pipelines.forEach((t) => {
|
|
448
|
-
|
|
448
|
+
U.set(t.nodeId, new Set(t.componentIds));
|
|
449
449
|
});
|
|
450
|
-
const
|
|
451
|
-
_.selectAll("line").data(
|
|
450
|
+
const Z = g.links.filter((t) => !(!c.has(t.source) || !c.has(t.target) || U.get(t.target)?.has(t.source)));
|
|
451
|
+
_.selectAll("line").data(Z).enter().append("line").attr("class", (t) => `wardley-link${t.dashed ? " wardley-link--dashed" : ""}`).attr("x1", (t) => {
|
|
452
452
|
const s = c.get(t.source), n = c.get(t.target), p = g.nodes.find((y) => y.id === t.source).isPipelineParent ? w / Math.sqrt(2) : a.nodeRadius, l = n.x - s.x, f = n.y - s.y, x = Math.sqrt(l * l + f * f);
|
|
453
453
|
return s.x + l / x * p;
|
|
454
454
|
}).attr("y1", (t) => {
|
|
@@ -460,7 +460,7 @@ var Gt = {
|
|
|
460
460
|
}).attr("y2", (t) => {
|
|
461
461
|
const s = c.get(t.source), n = c.get(t.target), p = g.nodes.find((y) => y.id === t.target).isPipelineParent ? w / Math.sqrt(2) : a.nodeRadius, l = s.x - n.x, f = s.y - n.y, x = Math.sqrt(l * l + f * f);
|
|
462
462
|
return n.y + f / x * p;
|
|
463
|
-
}).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), _.selectAll("text").data(
|
|
463
|
+
}).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), _.selectAll("text").data(Z.filter((t) => t.label)).enter().append("text").attr("class", "wardley-link-label").attr("x", (t) => {
|
|
464
464
|
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, f = Math.sqrt(l * l + p * p), x = 8, y = p / f;
|
|
465
465
|
return i + y * x;
|
|
466
466
|
}).attr("y", (t) => {
|
|
@@ -601,10 +601,10 @@ var Gt = {
|
|
|
601
601
|
}
|
|
602
602
|
}, "draw"), _t = {
|
|
603
603
|
draw: Vt
|
|
604
|
-
},
|
|
604
|
+
}, Ut = /* @__PURE__ */ u(({
|
|
605
605
|
wardley: o
|
|
606
606
|
} = {}) => {
|
|
607
|
-
const r = Et(), e = Yt(), h =
|
|
607
|
+
const r = Et(), e = Yt(), h = J(r, e.themeVariables), a = J(h.wardley, o);
|
|
608
608
|
return `
|
|
609
609
|
.wardley-background {
|
|
610
610
|
fill: ${a.backgroundColor};
|
|
@@ -668,7 +668,7 @@ var Gt = {
|
|
|
668
668
|
parser: tt,
|
|
669
669
|
db: Gt,
|
|
670
670
|
renderer: _t,
|
|
671
|
-
styles:
|
|
671
|
+
styles: Ut
|
|
672
672
|
};
|
|
673
673
|
export {
|
|
674
674
|
te as diagram
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { G as xi, J as di, a9 as Yt, a8 as fi, K as pi, O as mi, _ as n, U as Nt, an as yi, V as bi, ae as Ai, ai as kt, Y as wi, ak as Ht, al as Ci, ao as Si, be as Ri, aw as Ot } from "./extractHeadings-SqtThWou.js";
|
|
2
2
|
import { i as _i } from "./init-DjUOC4st.js";
|
|
3
3
|
import { o as ki } from "./ordinal-B6-f3MAq.js";
|
|
4
|
-
import { l as Wt } from "./linear-
|
|
4
|
+
import { l as Wt } from "./linear-CUPbFHK0.js";
|
|
5
5
|
function Ti(e, t, i) {
|
|
6
6
|
e = +e, t = +t, i = (a = arguments.length) < 2 ? (t = e, e = 0, 1) : a < 3 ? 1 : +i;
|
|
7
7
|
for (var s = -1, a = Math.max(0, Math.ceil((t - e) / i)) | 0, o = new Array(a); ++s < a; )
|
|
@@ -47,7 +47,7 @@ var Ct = (function() {
|
|
|
47
47
|
var e = /* @__PURE__ */ n(function(F, h, u, g) {
|
|
48
48
|
for (u = u || {}, g = F.length; g--; u[F[g]] = h) ;
|
|
49
49
|
return u;
|
|
50
|
-
}, "o"), t = [1, 10, 12, 14, 16, 18, 19, 21, 23], i = [2, 6], s = [1, 3], a = [1, 5], o = [1, 6], l = [1, 7], f = [1, 5, 10, 12, 14, 16, 18, 19, 21, 23, 36, 37, 38], d = [1, 25], k = [1, 26], T = [1, 28], _ = [1, 29], b = [1, 30], E = [1, 31], L = [1, 32], P = [1, 33], I = [1, 34], m = [1, 35], D = [1, 36], c = [1, 37],
|
|
50
|
+
}, "o"), t = [1, 10, 12, 14, 16, 18, 19, 21, 23], i = [2, 6], s = [1, 3], a = [1, 5], o = [1, 6], l = [1, 7], f = [1, 5, 10, 12, 14, 16, 18, 19, 21, 23, 36, 37, 38], d = [1, 25], k = [1, 26], T = [1, 28], _ = [1, 29], b = [1, 30], E = [1, 31], L = [1, 32], P = [1, 33], I = [1, 34], m = [1, 35], D = [1, 36], c = [1, 37], z = [1, 43], W = [1, 42], X = [1, 47], Y = [1, 50], S = [1, 10, 12, 14, 16, 18, 19, 21, 23, 36, 37, 38], H = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 28, 29, 36, 37, 38], A = [1, 10, 12, 14, 16, 18, 19, 21, 23, 24, 26, 28, 29, 36, 37, 38, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], w = [1, 65], B = [26, 28], R = {
|
|
51
51
|
trace: /* @__PURE__ */ n(function() {
|
|
52
52
|
}, "trace"),
|
|
53
53
|
yy: {},
|
|
@@ -146,7 +146,7 @@ var Ct = (function() {
|
|
|
146
146
|
break;
|
|
147
147
|
}
|
|
148
148
|
}, "anonymous"),
|
|
149
|
-
table: [e(t, i, { 3: 1, 4: 2, 7: 4, 5: s, 36: a, 37: o, 38: l }), { 1: [3] }, e(t, i, { 4: 2, 7: 4, 3: 8, 5: s, 36: a, 37: o, 38: l }), e(t, i, { 4: 2, 7: 4, 6: 9, 3: 10, 5: s, 8: [1, 11], 36: a, 37: o, 38: l }), { 1: [2, 4], 9: 12, 10: [1, 13], 12: [1, 14], 14: [1, 15], 16: [1, 16], 18: [1, 17], 19: [1, 18], 21: [1, 19], 23: [1, 20] }, e(f, [2, 36]), e(f, [2, 37]), e(f, [2, 38]), { 1: [2, 1] }, e(t, i, { 4: 2, 7: 4, 3: 21, 5: s, 36: a, 37: o, 38: l }), { 1: [2, 3] }, e(f, [2, 5]), e(t, [2, 7], { 4: 22, 36: a, 37: o, 38: l }), { 11: 23, 30: d, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 39, 13: 38, 24:
|
|
149
|
+
table: [e(t, i, { 3: 1, 4: 2, 7: 4, 5: s, 36: a, 37: o, 38: l }), { 1: [3] }, e(t, i, { 4: 2, 7: 4, 3: 8, 5: s, 36: a, 37: o, 38: l }), e(t, i, { 4: 2, 7: 4, 6: 9, 3: 10, 5: s, 8: [1, 11], 36: a, 37: o, 38: l }), { 1: [2, 4], 9: 12, 10: [1, 13], 12: [1, 14], 14: [1, 15], 16: [1, 16], 18: [1, 17], 19: [1, 18], 21: [1, 19], 23: [1, 20] }, e(f, [2, 36]), e(f, [2, 37]), e(f, [2, 38]), { 1: [2, 1] }, e(t, i, { 4: 2, 7: 4, 3: 21, 5: s, 36: a, 37: o, 38: l }), { 1: [2, 3] }, e(f, [2, 5]), e(t, [2, 7], { 4: 22, 36: a, 37: o, 38: l }), { 11: 23, 30: d, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 39, 13: 38, 24: z, 29: W, 30: d, 31: 40, 32: 41, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 45, 15: 44, 29: X, 30: d, 35: 46, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 49, 17: 48, 24: Y, 30: d, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 11: 52, 17: 51, 24: Y, 30: d, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, { 20: [1, 53] }, { 22: [1, 54] }, e(S, [2, 18]), { 1: [2, 2] }, e(S, [2, 8]), e(S, [2, 9]), e(H, [2, 39], { 41: 55, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }), e(H, [2, 40]), e(H, [2, 41]), e(A, [2, 42]), e(A, [2, 44]), e(A, [2, 45]), e(A, [2, 46]), e(A, [2, 47]), e(A, [2, 48]), e(A, [2, 49]), e(A, [2, 50]), e(A, [2, 51]), e(A, [2, 52]), e(A, [2, 53]), e(S, [2, 10]), e(S, [2, 24], { 32: 41, 31: 56, 24: z, 29: W }), e(S, [2, 26]), e(S, [2, 27]), { 33: [1, 57] }, { 11: 59, 30: d, 34: 58, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, e(S, [2, 11]), e(S, [2, 32], { 35: 60, 29: X }), e(S, [2, 34]), { 33: [1, 61] }, e(S, [2, 12]), { 17: 62, 24: Y }, { 25: 63, 27: 64, 29: w }, e(S, [2, 14]), { 17: 66, 24: Y }, e(S, [2, 16]), e(S, [2, 17]), e(A, [2, 43]), e(S, [2, 25]), { 29: [1, 67] }, { 26: [1, 68] }, { 26: [2, 31], 28: [1, 69] }, e(S, [2, 33]), { 29: [1, 70] }, e(S, [2, 13]), { 26: [1, 71] }, { 26: [2, 21], 28: [1, 72] }, e(B, [2, 23], { 30: [1, 73] }), e(S, [2, 15]), e(S, [2, 28]), e(S, [2, 29]), { 11: 59, 30: d, 34: 74, 39: 24, 40: k, 41: 27, 42: T, 43: _, 44: b, 45: E, 46: L, 47: P, 48: I, 49: m, 50: D, 51: c }, e(S, [2, 35]), e(S, [2, 19]), { 25: 75, 27: 64, 29: w }, e(B, [2, 22]), { 26: [2, 30] }, { 26: [2, 20] }],
|
|
150
150
|
defaultActions: { 8: [2, 1], 10: [2, 3], 21: [2, 2], 74: [2, 30], 75: [2, 20] },
|
|
151
151
|
parseError: /* @__PURE__ */ n(function(h, u) {
|
|
152
152
|
if (u.recoverable)
|
|
@@ -157,7 +157,7 @@ var Ct = (function() {
|
|
|
157
157
|
}
|
|
158
158
|
}, "parseError"),
|
|
159
159
|
parse: /* @__PURE__ */ n(function(h) {
|
|
160
|
-
var u = this, g = [0], x = [], C = [null], r = [], rt = this.table, p = "", gt = 0, Mt = 0, li = 2,
|
|
160
|
+
var u = this, g = [0], x = [], C = [null], r = [], rt = this.table, p = "", gt = 0, Mt = 0, li = 2, Vt = 1, ci = r.slice.call(arguments, 1), v = Object.create(this.lexer), U = { yy: {} };
|
|
161
161
|
for (var mt in this.yy)
|
|
162
162
|
Object.prototype.hasOwnProperty.call(this.yy, mt) && (U.yy[mt] = this.yy[mt]);
|
|
163
163
|
v.setInput(h, U.yy), U.yy.lexer = v, U.yy.parser = this, typeof v.yylloc > "u" && (v.yylloc = {});
|
|
@@ -165,24 +165,24 @@ var Ct = (function() {
|
|
|
165
165
|
r.push(yt);
|
|
166
166
|
var ui = v.options && v.options.ranges;
|
|
167
167
|
typeof U.yy.parseError == "function" ? this.parseError = U.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
168
|
-
function gi(
|
|
169
|
-
g.length = g.length - 2 *
|
|
168
|
+
function gi(V) {
|
|
169
|
+
g.length = g.length - 2 * V, C.length = C.length - V, r.length = r.length - V;
|
|
170
170
|
}
|
|
171
171
|
n(gi, "popStack");
|
|
172
|
-
function
|
|
173
|
-
var
|
|
174
|
-
return
|
|
172
|
+
function zt() {
|
|
173
|
+
var V;
|
|
174
|
+
return V = x.pop() || v.lex() || Vt, typeof V != "number" && (V instanceof Array && (x = V, V = x.pop()), V = u.symbols_[V] || V), V;
|
|
175
175
|
}
|
|
176
|
-
n(
|
|
177
|
-
for (var M, $, O, bt,
|
|
178
|
-
if ($ = g[g.length - 1], this.defaultActions[$] ? O = this.defaultActions[$] : ((M === null || typeof M > "u") && (M =
|
|
176
|
+
n(zt, "lex");
|
|
177
|
+
for (var M, $, O, bt, q = {}, xt, N, Bt, dt; ; ) {
|
|
178
|
+
if ($ = g[g.length - 1], this.defaultActions[$] ? O = this.defaultActions[$] : ((M === null || typeof M > "u") && (M = zt()), O = rt[$] && rt[$][M]), typeof O > "u" || !O.length || !O[0]) {
|
|
179
179
|
var At = "";
|
|
180
180
|
dt = [];
|
|
181
181
|
for (xt in rt[$])
|
|
182
182
|
this.terminals_[xt] && xt > li && dt.push("'" + this.terminals_[xt] + "'");
|
|
183
183
|
v.showPosition ? At = "Parse error on line " + (gt + 1) + `:
|
|
184
184
|
` + v.showPosition() + `
|
|
185
|
-
Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : At = "Parse error on line " + (gt + 1) + ": Unexpected " + (M ==
|
|
185
|
+
Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : At = "Parse error on line " + (gt + 1) + ": Unexpected " + (M == Vt ? "end of input" : "'" + (this.terminals_[M] || M) + "'"), this.parseError(At, {
|
|
186
186
|
text: v.match,
|
|
187
187
|
token: this.terminals_[M] || M,
|
|
188
188
|
line: v.yylineno,
|
|
@@ -197,15 +197,15 @@ Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : At =
|
|
|
197
197
|
g.push(M), C.push(v.yytext), r.push(v.yylloc), g.push(O[1]), M = null, Mt = v.yyleng, p = v.yytext, gt = v.yylineno, yt = v.yylloc;
|
|
198
198
|
break;
|
|
199
199
|
case 2:
|
|
200
|
-
if (N = this.productions_[O[1]][1],
|
|
200
|
+
if (N = this.productions_[O[1]][1], q.$ = C[C.length - N], q._$ = {
|
|
201
201
|
first_line: r[r.length - (N || 1)].first_line,
|
|
202
202
|
last_line: r[r.length - 1].last_line,
|
|
203
203
|
first_column: r[r.length - (N || 1)].first_column,
|
|
204
204
|
last_column: r[r.length - 1].last_column
|
|
205
|
-
}, ui && (
|
|
205
|
+
}, ui && (q._$.range = [
|
|
206
206
|
r[r.length - (N || 1)].range[0],
|
|
207
207
|
r[r.length - 1].range[1]
|
|
208
|
-
]), bt = this.performAction.apply(
|
|
208
|
+
]), bt = this.performAction.apply(q, [
|
|
209
209
|
p,
|
|
210
210
|
Mt,
|
|
211
211
|
gt,
|
|
@@ -215,7 +215,7 @@ Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : At =
|
|
|
215
215
|
r
|
|
216
216
|
].concat(ci)), typeof bt < "u")
|
|
217
217
|
return bt;
|
|
218
|
-
N && (g = g.slice(0, -1 * N * 2), C = C.slice(0, -1 * N), r = r.slice(0, -1 * N)), g.push(this.productions_[O[1]][0]), C.push(
|
|
218
|
+
N && (g = g.slice(0, -1 * N * 2), C = C.slice(0, -1 * N), r = r.slice(0, -1 * N)), g.push(this.productions_[O[1]][0]), C.push(q.$), r.push(q._$), Bt = rt[g[g.length - 2]][g[g.length - 1]], g.push(Bt);
|
|
219
219
|
break;
|
|
220
220
|
case 3:
|
|
221
221
|
return !0;
|
|
@@ -517,10 +517,10 @@ function ft(e) {
|
|
|
517
517
|
return e.type === "band";
|
|
518
518
|
}
|
|
519
519
|
n(ft, "isBandAxisData");
|
|
520
|
-
function
|
|
520
|
+
function j(e) {
|
|
521
521
|
return e.type === "linear";
|
|
522
522
|
}
|
|
523
|
-
n(
|
|
523
|
+
n(j, "isLinearAxisData");
|
|
524
524
|
var Q, Ut = (Q = class {
|
|
525
525
|
constructor(t) {
|
|
526
526
|
this.parentGroup = t;
|
|
@@ -1048,15 +1048,15 @@ var it, Ei = (it = class {
|
|
|
1048
1048
|
return t;
|
|
1049
1049
|
}
|
|
1050
1050
|
}, n(st, "BasePlot"), st);
|
|
1051
|
-
function
|
|
1051
|
+
function qt(e, t, i) {
|
|
1052
1052
|
return new Mi(e, t, i);
|
|
1053
1053
|
}
|
|
1054
|
-
n(
|
|
1055
|
-
var at,
|
|
1054
|
+
n(qt, "getPlotComponent");
|
|
1055
|
+
var at, Vi = (at = class {
|
|
1056
1056
|
constructor(t, i, s, a) {
|
|
1057
1057
|
this.chartConfig = t, this.chartData = i, this.componentStore = {
|
|
1058
1058
|
title: Gt(t, i, s, a),
|
|
1059
|
-
plot:
|
|
1059
|
+
plot: qt(t, i, s),
|
|
1060
1060
|
xAxis: Rt(
|
|
1061
1061
|
i.xAxis,
|
|
1062
1062
|
t.xAxis,
|
|
@@ -1134,11 +1134,11 @@ var at, zi = (at = class {
|
|
|
1134
1134
|
t.push(...i.getDrawableElements());
|
|
1135
1135
|
return t;
|
|
1136
1136
|
}
|
|
1137
|
-
}, n(at, "Orchestrator"), at), nt,
|
|
1137
|
+
}, n(at, "Orchestrator"), at), nt, zi = (nt = class {
|
|
1138
1138
|
static build(t, i, s, a) {
|
|
1139
|
-
return new
|
|
1139
|
+
return new Vi(t, i, s, a).getDrawableElement();
|
|
1140
1140
|
}
|
|
1141
|
-
}, n(nt, "XYChartBuilder"), nt), ht = 0,
|
|
1141
|
+
}, n(nt, "XYChartBuilder"), nt), ht = 0, jt, lt = vt(), ct = Dt(), y = Lt(), _t = ct.plotColorPalette.split(",").map((e) => e.trim()), pt = !1, Tt = !1;
|
|
1142
1142
|
function Dt() {
|
|
1143
1143
|
const e = Si(), t = kt();
|
|
1144
1144
|
return Ht(e.xyChart, t.themeVariables.xyChart);
|
|
@@ -1176,7 +1176,7 @@ function ut(e) {
|
|
|
1176
1176
|
}
|
|
1177
1177
|
n(ut, "textSanitizer");
|
|
1178
1178
|
function Qt(e) {
|
|
1179
|
-
|
|
1179
|
+
jt = e;
|
|
1180
1180
|
}
|
|
1181
1181
|
n(Qt, "setTmpSVGG");
|
|
1182
1182
|
function Kt(e) {
|
|
@@ -1208,7 +1208,7 @@ function ii(e, t) {
|
|
|
1208
1208
|
}
|
|
1209
1209
|
n(ii, "setYAxisRangeData");
|
|
1210
1210
|
function ei(e) {
|
|
1211
|
-
const t = Math.min(...e), i = Math.max(...e), s =
|
|
1211
|
+
const t = Math.min(...e), i = Math.max(...e), s = j(y.yAxis) ? y.yAxis.min : 1 / 0, a = j(y.yAxis) ? y.yAxis.max : -1 / 0;
|
|
1212
1212
|
y.yAxis = {
|
|
1213
1213
|
type: "linear",
|
|
1214
1214
|
title: y.yAxis.title,
|
|
@@ -1222,10 +1222,10 @@ function Et(e) {
|
|
|
1222
1222
|
if (e.length === 0)
|
|
1223
1223
|
return t;
|
|
1224
1224
|
if (!pt) {
|
|
1225
|
-
const i =
|
|
1225
|
+
const i = j(y.xAxis) ? y.xAxis.min : 1 / 0, s = j(y.xAxis) ? y.xAxis.max : -1 / 0;
|
|
1226
1226
|
Pt(Math.min(i, 1), Math.max(s, e.length));
|
|
1227
1227
|
}
|
|
1228
|
-
if (ft(y.xAxis) && e.length > y.xAxis.categories.length && (e = e.slice(0, y.xAxis.categories.length)), Tt || ei(e), ft(y.xAxis) && (t = y.xAxis.categories.map((i, s) => [i, e[s]])),
|
|
1228
|
+
if (ft(y.xAxis) && e.length > y.xAxis.categories.length && (e = e.slice(0, y.xAxis.categories.length)), Tt || ei(e), ft(y.xAxis) && (t = y.xAxis.categories.map((i, s) => [i, e[s]])), j(y.xAxis)) {
|
|
1229
1229
|
const i = y.xAxis.min, s = y.xAxis.max, a = (s - i) / (e.length - 1), o = [];
|
|
1230
1230
|
for (let l = i; l <= s; l += a)
|
|
1231
1231
|
o.push(`${l}`);
|
|
@@ -1261,7 +1261,7 @@ n(ai, "setBarData");
|
|
|
1261
1261
|
function ni() {
|
|
1262
1262
|
if (y.plots.length === 0)
|
|
1263
1263
|
throw Error("No Plot to render, please provide a plot with some data");
|
|
1264
|
-
return y.title = Yt(),
|
|
1264
|
+
return y.title = Yt(), zi.build(lt, y, ct, jt);
|
|
1265
1265
|
}
|
|
1266
1266
|
n(ni, "getDrawableElem");
|
|
1267
1267
|
function oi() {
|
|
@@ -1319,9 +1319,9 @@ var Bi = /* @__PURE__ */ n(function() {
|
|
|
1319
1319
|
const L = a.getDrawableElem(), P = {};
|
|
1320
1320
|
function I(m) {
|
|
1321
1321
|
let D = b, c = "";
|
|
1322
|
-
for (const [
|
|
1322
|
+
for (const [z] of m.entries()) {
|
|
1323
1323
|
let W = b;
|
|
1324
|
-
|
|
1324
|
+
z > 0 && P[c] && (W = P[c]), c += m[z], D = P[c], D || (D = P[c] = W.append("g").attr("class", m[z]));
|
|
1325
1325
|
}
|
|
1326
1326
|
return D;
|
|
1327
1327
|
}
|
|
@@ -1335,29 +1335,29 @@ var Bi = /* @__PURE__ */ n(function() {
|
|
|
1335
1335
|
if (D.selectAll("rect").data(m.data).enter().append("rect").attr("x", (c) => c.x).attr("y", (c) => c.y).attr("width", (c) => c.width).attr("height", (c) => c.height).attr("fill", (c) => c.fill).attr("stroke", (c) => c.strokeFill).attr("stroke-width", (c) => c.strokeWidth), l.showDataLabel) {
|
|
1336
1336
|
const c = l.showDataLabelOutsideBar;
|
|
1337
1337
|
if (l.chartOrientation === "horizontal") {
|
|
1338
|
-
let
|
|
1338
|
+
let z = function(w, B) {
|
|
1339
1339
|
const { data: R, label: ot } = w;
|
|
1340
1340
|
return B * ot.length * W <= R.width - X;
|
|
1341
1341
|
};
|
|
1342
|
-
n(
|
|
1342
|
+
n(z, "fitsHorizontally");
|
|
1343
1343
|
const W = 0.7, X = 10, Y = m.data.map((w, B) => ({ data: w, label: f[B].toString() })).filter((w) => w.data.width > 0 && w.data.height > 0), S = Y.map((w) => {
|
|
1344
1344
|
const { data: B } = w;
|
|
1345
1345
|
let R = B.height * 0.7;
|
|
1346
|
-
for (; !
|
|
1346
|
+
for (; !z(w, R) && R > 0; )
|
|
1347
1347
|
R -= 1;
|
|
1348
1348
|
return R;
|
|
1349
1349
|
}), H = Math.floor(Math.min(...S)), A = /* @__PURE__ */ n((w) => c ? w.data.x + w.data.width + X : w.data.x + w.data.width - X, "determineLabelXPosition");
|
|
1350
1350
|
D.selectAll("text").data(Y).enter().append("text").attr("x", A).attr("y", (w) => w.data.y + w.data.height / 2).attr("text-anchor", c ? "start" : "end").attr("dominant-baseline", "middle").attr("fill", o.dataLabelColor).attr("font-size", `${H}px`).text((w) => w.label);
|
|
1351
1351
|
} else {
|
|
1352
|
-
let
|
|
1352
|
+
let z = function(A, w, B) {
|
|
1353
1353
|
const { data: R, label: ot } = A, F = w * ot.length * 0.7, h = R.x + R.width / 2, u = h - F / 2, g = h + F / 2, x = u >= R.x && g <= R.x + R.width, C = R.y + B + w <= R.y + R.height;
|
|
1354
1354
|
return x && C;
|
|
1355
1355
|
};
|
|
1356
|
-
n(
|
|
1356
|
+
n(z, "fitsInBar");
|
|
1357
1357
|
const W = 10, X = m.data.map((A, w) => ({ data: A, label: f[w].toString() })).filter((A) => A.data.width > 0 && A.data.height > 0), Y = X.map((A) => {
|
|
1358
1358
|
const { data: w, label: B } = A;
|
|
1359
1359
|
let R = w.width / (B.length * 0.7);
|
|
1360
|
-
for (; !
|
|
1360
|
+
for (; !z(A, R, W) && R > 0; )
|
|
1361
1361
|
R -= 1;
|
|
1362
1362
|
return R;
|
|
1363
1363
|
}), S = Math.floor(Math.min(...Y)), H = /* @__PURE__ */ n((A) => c ? A.data.y - W : A.data.y + W, "determineLabelYPosition");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./extractHeadings-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./extractHeadings-B-v1O82x.cjs"),he=require("./init-CHZsXQcr.cjs"),le=require("./ordinal-CagbB1m8.cjs"),Bt=require("./linear-DO7t2MIy.cjs");function ce(i,t,e){i=+i,t=+t,e=(n=arguments.length)<2?(t=i,i=0,1):n<3?1:+e;for(var s=-1,n=Math.max(0,Math.ceil((t-i)/e))|0,o=new Array(n);++s<n;)o[s]=i+s*e;return o}function At(){var i=le.ordinal().unknown(void 0),t=i.domain,e=i.range,s=0,n=1,o,l,f=!1,d=0,k=0,T=.5;delete i.unknown;function R(){var _=t().length,E=n<s,L=E?n:s,P=E?s:n;o=(P-L)/Math.max(1,_-d+k*2),f&&(o=Math.floor(o)),L+=(P-L-o*(_-d))*T,l=o*(1-d),f&&(L=Math.round(L),l=Math.round(l));var M=ce(_).map(function(m){return L+o*m});return e(E?M.reverse():M)}return i.domain=function(_){return arguments.length?(t(_),R()):t()},i.range=function(_){return arguments.length?([s,n]=_,s=+s,n=+n,R()):[s,n]},i.rangeRound=function(_){return[s,n]=_,s=+s,n=+n,f=!0,R()},i.bandwidth=function(){return l},i.step=function(){return o},i.round=function(_){return arguments.length?(f=!!_,R()):f},i.padding=function(_){return arguments.length?(d=Math.min(1,k=+_),R()):d},i.paddingInner=function(_){return arguments.length?(d=Math.min(1,_),R()):d},i.paddingOuter=function(_){return arguments.length?(k=+_,R()):k},i.align=function(_){return arguments.length?(T=Math.max(0,Math.min(1,_)),R()):T},i.copy=function(){return At(t(),[s,n]).round(f).paddingInner(d).paddingOuter(k).align(T)},he.initRange.apply(R(),arguments)}var wt=(function(){var i=a.__name(function(F,h,u,g){for(u=u||{},g=F.length;g--;u[F[g]]=h);return u},"o"),t=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],n=[1,5],o=[1,6],l=[1,7],f=[1,5,10,12,14,16,18,19,21,23,36,37,38],d=[1,25],k=[1,26],T=[1,28],R=[1,29],_=[1,30],E=[1,31],L=[1,32],P=[1,33],M=[1,34],m=[1,35],D=[1,36],c=[1,37],V=[1,43],W=[1,42],X=[1,47],Y=[1,50],C=[1,10,12,14,16,18,19,21,23,36,37,38],H=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],b=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],A=[1,65],B=[26,28],S={trace:a.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:a.__name(function(h,u,g,x,w,r,rt){var p=r.length-1;switch(w){case 5:x.setOrientation(r[p]);break;case 9:x.setDiagramTitle(r[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[p]);break;case 13:x.setLineData(r[p-1],r[p]);break;case 14:x.setBarData({text:"",type:"text"},r[p]);break;case 15:x.setBarData(r[p-1],r[p]);break;case 16:this.$=r[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[p-1];break;case 20:case 30:this.$=[r[p-2],...r[p]];break;case 21:case 31:this.$=[r[p]];break;case 22:this.$={value:Number(r[p-1]),label:r[p]};break;case 23:this.$={value:Number(r[p]),label:""};break;case 24:x.setXAxisTitle(r[p]);break;case 25:x.setXAxisTitle(r[p-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(r[p]);break;case 28:x.setXAxisRangeData(Number(r[p-2]),Number(r[p]));break;case 29:this.$=r[p-1];break;case 32:x.setYAxisTitle(r[p]);break;case 33:x.setYAxisTitle(r[p-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(r[p-2]),Number(r[p]));break;case 39:this.$={text:r[p],type:"text"};break;case 40:this.$={text:r[p],type:"text"};break;case 41:this.$={text:r[p],type:"markdown"};break;case 42:this.$=r[p];break;case 43:this.$=r[p-1]+""+r[p];break}},"anonymous"),table:[i(t,e,{3:1,4:2,7:4,5:s,36:n,37:o,38:l}),{1:[3]},i(t,e,{4:2,7:4,3:8,5:s,36:n,37:o,38:l}),i(t,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:n,37:o,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},i(f,[2,36]),i(f,[2,37]),i(f,[2,38]),{1:[2,1]},i(t,e,{4:2,7:4,3:21,5:s,36:n,37:o,38:l}),{1:[2,3]},i(f,[2,5]),i(t,[2,7],{4:22,36:n,37:o,38:l}),{11:23,30:d,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},{11:39,13:38,24:V,29:W,30:d,31:40,32:41,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},{11:45,15:44,29:X,30:d,35:46,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},{11:49,17:48,24:Y,30:d,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},{11:52,17:51,24:Y,30:d,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},{20:[1,53]},{22:[1,54]},i(C,[2,18]),{1:[2,2]},i(C,[2,8]),i(C,[2,9]),i(H,[2,39],{41:55,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c}),i(H,[2,40]),i(H,[2,41]),i(b,[2,42]),i(b,[2,44]),i(b,[2,45]),i(b,[2,46]),i(b,[2,47]),i(b,[2,48]),i(b,[2,49]),i(b,[2,50]),i(b,[2,51]),i(b,[2,52]),i(b,[2,53]),i(C,[2,10]),i(C,[2,24],{32:41,31:56,24:V,29:W}),i(C,[2,26]),i(C,[2,27]),{33:[1,57]},{11:59,30:d,34:58,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},i(C,[2,11]),i(C,[2,32],{35:60,29:X}),i(C,[2,34]),{33:[1,61]},i(C,[2,12]),{17:62,24:Y},{25:63,27:64,29:A},i(C,[2,14]),{17:66,24:Y},i(C,[2,16]),i(C,[2,17]),i(b,[2,43]),i(C,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},i(C,[2,33]),{29:[1,70]},i(C,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},i(B,[2,23],{30:[1,73]}),i(C,[2,15]),i(C,[2,28]),i(C,[2,29]),{11:59,30:d,34:74,39:24,40:k,41:27,42:T,43:R,44:_,45:E,46:L,47:P,48:M,49:m,50:D,51:c},i(C,[2,35]),i(C,[2,19]),{25:75,27:64,29:A},i(B,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:a.__name(function(h,u){if(u.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=u,g}},"parseError"),parse:a.__name(function(h){var u=this,g=[0],x=[],w=[null],r=[],rt=this.table,p="",gt=0,Mt=0,ne=2,It=1,ae=r.slice.call(arguments,1),v=Object.create(this.lexer),U={yy:{}};for(var mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,mt)&&(U.yy[mt]=this.yy[mt]);v.setInput(h,U.yy),U.yy.lexer=v,U.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var yt=v.yylloc;r.push(yt);var oe=v.options&&v.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function re(z){g.length=g.length-2*z,w.length=w.length-z,r.length=r.length-z}a.__name(re,"popStack");function zt(){var z;return z=x.pop()||v.lex()||It,typeof z!="number"&&(z instanceof Array&&(x=z,z=x.pop()),z=u.symbols_[z]||z),z}a.__name(zt,"lex");for(var I,$,O,_t,j={},xt,N,Vt,dt;;){if($=g[g.length-1],this.defaultActions[$]?O=this.defaultActions[$]:((I===null||typeof I>"u")&&(I=zt()),O=rt[$]&&rt[$][I]),typeof O>"u"||!O.length||!O[0]){var bt="";dt=[];for(xt in rt[$])this.terminals_[xt]&&xt>ne&&dt.push("'"+this.terminals_[xt]+"'");v.showPosition?bt="Parse error on line "+(gt+1)+`:
|
|
2
2
|
`+v.showPosition()+`
|
|
3
3
|
Expecting `+dt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":bt="Parse error on line "+(gt+1)+": Unexpected "+(I==It?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(bt,{text:v.match,token:this.terminals_[I]||I,line:v.yylineno,loc:yt,expected:dt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+I);switch(O[0]){case 1:g.push(I),w.push(v.yytext),r.push(v.yylloc),g.push(O[1]),I=null,Mt=v.yyleng,p=v.yytext,gt=v.yylineno,yt=v.yylloc;break;case 2:if(N=this.productions_[O[1]][1],j.$=w[w.length-N],j._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},oe&&(j._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),_t=this.performAction.apply(j,[p,Mt,gt,U.yy,O[1],w,r].concat(ae)),typeof _t<"u")return _t;N&&(g=g.slice(0,-1*N*2),w=w.slice(0,-1*N),r=r.slice(0,-1*N)),g.push(this.productions_[O[1]][0]),w.push(j.$),r.push(j._$),Vt=rt[g[g.length-2]][g[g.length-1]],g.push(Vt);break;case 3:return!0}}return!0},"parse")},ot=(function(){var F={EOF:1,parseError:a.__name(function(u,g){if(this.yy.parser)this.yy.parser.parseError(u,g);else throw new Error(u)},"parseError"),setInput:a.__name(function(h,u){return this.yy=u||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a.__name(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a.__name(function(h){var u=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:a.__name(function(){return this._more=!0,this},"more"),reject:a.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a.__name(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a.__name(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a.__name(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a.__name(function(){var h=this.pastInput(),u=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiquants/markdown",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Markdown renderer for React with advanced features",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -49,6 +49,12 @@
|
|
|
49
49
|
"require": "./dist/source-lines.cjs",
|
|
50
50
|
"default": "./dist/source-lines.js"
|
|
51
51
|
},
|
|
52
|
+
"./code-blocks": {
|
|
53
|
+
"types": "./dist/code-blocks.d.ts",
|
|
54
|
+
"import": "./dist/code-blocks.js",
|
|
55
|
+
"require": "./dist/code-blocks.cjs",
|
|
56
|
+
"default": "./dist/code-blocks.js"
|
|
57
|
+
},
|
|
52
58
|
"./converter": {
|
|
53
59
|
"types": "./dist/converter.d.ts",
|
|
54
60
|
"import": "./dist/converter.js",
|
|
@@ -110,12 +116,15 @@
|
|
|
110
116
|
"zenn-content-css": "^0.1.162"
|
|
111
117
|
},
|
|
112
118
|
"peerDependencies": {
|
|
119
|
+
"@aiquants/spreadsheet": "^0.15.0",
|
|
113
120
|
"react": "^19.2.7",
|
|
114
121
|
"react-dom": "^19.2.7",
|
|
115
122
|
"vite": "^7.0.6"
|
|
116
123
|
},
|
|
117
124
|
"devDependencies": {
|
|
118
125
|
"@aiquants/platform-packaging": "0.1.1",
|
|
126
|
+
"@aiquants/spreadsheet": "0.15.0",
|
|
127
|
+
"@aiquants/virtualscroll": "3.22.0",
|
|
119
128
|
"@bufbuild/protoc-gen-es": "^1.10.1",
|
|
120
129
|
"@connectrpc/protoc-gen-connect-es": "^1.7.0",
|
|
121
130
|
"@tailwindcss/cli": "^4.1.18",
|
|
@@ -162,12 +171,12 @@
|
|
|
162
171
|
"access": "public"
|
|
163
172
|
},
|
|
164
173
|
"optionalDependencies": {
|
|
165
|
-
"@aiquants/markdown-linux-x64": "
|
|
166
|
-
"@aiquants/markdown-linux-arm64": "
|
|
167
|
-
"@aiquants/markdown-darwin-x64": "
|
|
168
|
-
"@aiquants/markdown-darwin-arm64": "
|
|
169
|
-
"@aiquants/markdown-win32-x64": "
|
|
170
|
-
"@aiquants/markdown-win32-arm64": "
|
|
174
|
+
"@aiquants/markdown-linux-x64": "9.0.0",
|
|
175
|
+
"@aiquants/markdown-linux-arm64": "9.0.0",
|
|
176
|
+
"@aiquants/markdown-darwin-x64": "9.0.0",
|
|
177
|
+
"@aiquants/markdown-darwin-arm64": "9.0.0",
|
|
178
|
+
"@aiquants/markdown-win32-x64": "9.0.0",
|
|
179
|
+
"@aiquants/markdown-win32-arm64": "9.0.0"
|
|
171
180
|
},
|
|
172
181
|
"scripts": {
|
|
173
182
|
"build": "pnpm -w run workspace:build \"$PNPM_SCRIPT_SRC_DIR\"",
|