docmedown 0.1.1 → 0.1.2
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 +38 -20
- package/dist/abnfDiagram-VCTEODGH-CtQBp0Qv.mjs +89 -0
- package/dist/abnfDiagram-VCTEODGH-mccrzlD_.js +1 -0
- package/dist/arc-DgPKXEdT.mjs +82 -0
- package/dist/arc-n7TW7Bis.js +1 -0
- package/dist/architecture-7GRP2DOG-B7myQ46f.js +1 -0
- package/dist/architecture-7GRP2DOG-Cxj1ussQ.mjs +3 -0
- package/dist/architectureDiagram-5GKGNRK7-BdTCu5T3.js +36 -0
- package/dist/architectureDiagram-5GKGNRK7-CkgZa-G1.mjs +4154 -0
- package/dist/array-CApNbSU9.mjs +6 -0
- package/dist/array-DZSRzHA_.js +1 -0
- package/dist/blockDiagram-I7D4REHJ-CSYvpxQw.js +129 -0
- package/dist/blockDiagram-I7D4REHJ-CYngfPD9.mjs +1922 -0
- package/dist/c4Diagram-7LVT6UL2-B-sz5MUK.js +38 -0
- package/dist/c4Diagram-7LVT6UL2-DEzxFf2b.mjs +3010 -0
- package/dist/channel-LgHproiI.mjs +5 -0
- package/dist/channel-yqu0m4cl.js +1 -0
- package/dist/chunk-2E4U76K2-BOyeRQsI.js +1 -0
- package/dist/chunk-2E4U76K2-CoTrgtfg.mjs +348 -0
- package/dist/chunk-2Q5K7J3B-D4EgYPOq.mjs +15 -0
- package/dist/chunk-2Q5K7J3B-DhjCNjaM.js +1 -0
- package/dist/chunk-4HAMMTFA-GFyfmcSO.js +62 -0
- package/dist/chunk-4HAMMTFA-VgWPe1ng.mjs +4188 -0
- package/dist/chunk-5VM5RSS4-GINalzIv.js +15 -0
- package/dist/chunk-5VM5RSS4-TqxtqrwE.mjs +5 -0
- package/dist/chunk-75Z2AOVW-DYouz5MZ.js +2 -0
- package/dist/chunk-75Z2AOVW-Dz0Sko9Y.mjs +1330 -0
- package/dist/chunk-CLGD4ZFX-C5J-e2io.js +1 -0
- package/dist/chunk-CLGD4ZFX-DBkwyMMv.mjs +14 -0
- package/dist/chunk-DU6HZSFF-BEQZSmUu.mjs +3836 -0
- package/dist/chunk-DU6HZSFF-CWc5ewtb.js +127 -0
- package/dist/chunk-F27PBJKO-8jvY_jJK.js +1 -0
- package/dist/chunk-F27PBJKO-DFH3sRZG.mjs +61 -0
- package/dist/chunk-FOHPRMQF-LRqOLsSw.mjs +21456 -0
- package/dist/chunk-FOHPRMQF-tmTlwTeH.js +161 -0
- package/dist/chunk-GMAD6QVW-BZeZ4fdb.mjs +1863 -0
- package/dist/chunk-GMAD6QVW-DEQiTa0c.js +72 -0
- package/dist/chunk-GVQU2GXP-B1D3J05J.mjs +37 -0
- package/dist/chunk-GVQU2GXP-CdJIWN41.js +1 -0
- package/dist/chunk-IMKFNOWR-BmZb9U1f.mjs +2042 -0
- package/dist/chunk-IMKFNOWR-CPJsszGN.js +231 -0
- package/dist/chunk-JWPE2WC7-DIKiF5cm.mjs +8 -0
- package/dist/chunk-JWPE2WC7-p1fYVdYc.js +1 -0
- package/dist/chunk-L3NEJ4N5-TzDiVs78.js +1 -0
- package/dist/chunk-L3NEJ4N5-lal8wUID.mjs +245 -0
- package/dist/chunk-LNGE3PJU-BQX75wkM.js +34 -0
- package/dist/chunk-LNGE3PJU-DJ9JuXV6.mjs +1521 -0
- package/dist/chunk-OSK3NFVY-9AWK88m1.mjs +672 -0
- package/dist/chunk-OSK3NFVY-CHzvVe8m.js +10 -0
- package/dist/chunk-P2QGCYS3-6q3AXPt5.mjs +67 -0
- package/dist/chunk-P2QGCYS3-DKZzpRQW.js +1 -0
- package/dist/chunk-POPQ4Y6H-Dd7J9tx3.mjs +26 -0
- package/dist/chunk-POPQ4Y6H-T5C7wpjf.js +1 -0
- package/dist/chunk-PWAF6VOD-BYG76tEe.mjs +275 -0
- package/dist/chunk-PWAF6VOD-DxZLuCEw.js +1 -0
- package/dist/chunk-SHT3W25Y-B2Wes8jn.mjs +4183 -0
- package/dist/chunk-SHT3W25Y-BQjHSn5K.js +168 -0
- package/dist/chunk-SVP7TREG-BFMd615E.js +88 -0
- package/dist/chunk-SVP7TREG-CynckzeF.mjs +490 -0
- package/dist/chunk-TICWLB2K-BfCuoR1V.mjs +3357 -0
- package/dist/chunk-TICWLB2K-agcyBfUp.js +206 -0
- package/dist/chunk-TLUHSLCS-CUrWaKDG.mjs +59 -0
- package/dist/chunk-TLUHSLCS-Drx_a7am.js +1 -0
- package/dist/chunk-XXDRQBXY-AAk1-Cyg.js +1 -0
- package/dist/chunk-XXDRQBXY-DpR8eYzz.mjs +9 -0
- package/dist/chunk-Y2CYZVJY-CnmLqFtv.js +1 -0
- package/dist/chunk-Y2CYZVJY-i11wjrBe.mjs +12 -0
- package/dist/classDiagram-ZZMXUADV-B7IN9zcX.js +1 -0
- package/dist/classDiagram-ZZMXUADV-tcy6gxSB.mjs +30 -0
- package/dist/classDiagram-v2-VYDZK3BY-B7IN9zcX.js +1 -0
- package/dist/classDiagram-v2-VYDZK3BY-D5wM6Acp.mjs +30 -0
- package/dist/cli.js +87 -58
- package/dist/cose-bilkent-JH36ORCC-DBUPO3qJ.js +1 -0
- package/dist/cose-bilkent-JH36ORCC-Slpx4WIt.mjs +2253 -0
- package/dist/cynefin-OW5HDTMX--QVnfGi1.mjs +3 -0
- package/dist/cynefin-OW5HDTMX-lNKysi7S.js +1 -0
- package/dist/cynefinDiagram-5FMLGOSQ-CsFONYqx.js +62 -0
- package/dist/cynefinDiagram-5FMLGOSQ-DsrxYBcg.mjs +355 -0
- package/dist/cytoscape.esm-C5TvPYYm.mjs +18148 -0
- package/dist/cytoscape.esm-CBmWJr5M.js +321 -0
- package/dist/dagre-CZ6P9L_h.js +1 -0
- package/dist/dagre-GXQ25YYZ-CQszk-7P.js +4 -0
- package/dist/dagre-GXQ25YYZ-ecYByRSn.mjs +425 -0
- package/dist/dagre-J_1oH0eY.mjs +1934 -0
- package/dist/defaultLocale-N-0uLSyg.mjs +198 -0
- package/dist/defaultLocale-ybN1Vtvg.js +1 -0
- package/dist/diagram-S7CK7UJ4-CTMvxX__.js +30 -0
- package/dist/diagram-S7CK7UJ4-DxCghfa-.mjs +301 -0
- package/dist/diagram-UQ7AKVKN-1viEkqlG.js +41 -0
- package/dist/diagram-UQ7AKVKN-BA7Z_oB7.mjs +214 -0
- package/dist/diagram-VSXAHHWV-DgVT19mq.js +3 -0
- package/dist/diagram-VSXAHHWV-Dtqo03M5.mjs +432 -0
- package/dist/diagram-VX7I27RA-CNw0pOX_.js +24 -0
- package/dist/diagram-VX7I27RA-GMPRt8Zh.mjs +527 -0
- package/dist/diagram-Z3DM3KII-C6XdQK_Q.mjs +134 -0
- package/dist/diagram-Z3DM3KII-CPkBr3FT.js +24 -0
- package/dist/dist-CXWJafG_.js +1 -0
- package/dist/dist-DNdLIC8h.mjs +59 -0
- package/dist/docmedown.cjs +65 -48
- package/dist/docmedown.iife.js +3418 -77
- package/dist/docmedown.mjs +6550 -4630
- package/dist/ebnfDiagram-PWID7BFC-CseVsyL3.js +1 -0
- package/dist/ebnfDiagram-PWID7BFC-D_dBDXWC.mjs +100 -0
- package/dist/erDiagram-RLTQ6QDP-DFwfQTRS.js +99 -0
- package/dist/erDiagram-RLTQ6QDP-DP7ddGMH.mjs +1966 -0
- package/dist/eventmodeling-NTZA5JFV-CzxVg0l5.js +1 -0
- package/dist/eventmodeling-NTZA5JFV-Djsy__5n.mjs +3 -0
- package/dist/flowDiagram-HODETNUW-7hSJfI3W.js +1 -0
- package/dist/flowDiagram-HODETNUW-Dqu5Lr19.mjs +17 -0
- package/dist/ganttDiagram-EL5Y4UJY-KNL3tzTD.mjs +3072 -0
- package/dist/ganttDiagram-EL5Y4UJY-aiLqNWgi.js +292 -0
- package/dist/gitGraph-4MIJSDKK-DnElfqX7.js +1 -0
- package/dist/gitGraph-4MIJSDKK-xuKJBT2e.mjs +3 -0
- package/dist/gitGraphDiagram-WWUBYQGX-D4gSo_-e.js +106 -0
- package/dist/gitGraphDiagram-WWUBYQGX-Dooss5fG.mjs +733 -0
- package/dist/graphlib-BaETKKSa.js +1 -0
- package/dist/graphlib-XW-Jr8pF.mjs +1267 -0
- package/dist/info-A6RAGUB7-ClYskpn6.mjs +3 -0
- package/dist/info-A6RAGUB7-DDvvt-fW.js +1 -0
- package/dist/infoDiagram-27XIBGKW-B2-y2mdQ.mjs +20 -0
- package/dist/infoDiagram-27XIBGKW-DYQ9NzfL.js +2 -0
- package/dist/init-BJdqMO10.js +1 -0
- package/dist/init-CsQUQz36.mjs +13 -0
- package/dist/ishikawaDiagram-5VMMS53U-ULIhoYO5.js +70 -0
- package/dist/ishikawaDiagram-5VMMS53U-xAArNh-1.mjs +719 -0
- package/dist/journeyDiagram-3NMN7TZE-BBMYNZRL.js +139 -0
- package/dist/journeyDiagram-3NMN7TZE-BH-uKqP7.mjs +884 -0
- package/dist/kanban-definition-UXKFOSKX-Be49llXr.mjs +976 -0
- package/dist/kanban-definition-UXKFOSKX-CDL5yJkq.js +89 -0
- package/dist/line-BEwhHSLl.js +1 -0
- package/dist/line-CiXRog8O.mjs +34 -0
- package/dist/linear-75tfjrny.js +1 -0
- package/dist/linear-Ncx_RuON.mjs +288 -0
- package/dist/mermaid-parser.core-BBApyu_y.js +6 -0
- package/dist/mermaid-parser.core-BRHibdUE.mjs +638 -0
- package/dist/mindmap-definition-YA3MSWOX-Chy7XP_5.mjs +1006 -0
- package/dist/mindmap-definition-YA3MSWOX-DOda-fkL.js +96 -0
- package/dist/ordinal-B1BNQwUR.mjs +65 -0
- package/dist/ordinal-B9aFWmF9.js +1 -0
- package/dist/packet-AYTQ26CC-CorIy9Ul.js +1 -0
- package/dist/packet-AYTQ26CC-DWH8gXJK.mjs +3 -0
- package/dist/path-CnWkkRiY.mjs +84 -0
- package/dist/path-DIS6ck99.js +1 -0
- package/dist/pegDiagram-XKGWAZYB-Cdw6MeON.js +1 -0
- package/dist/pegDiagram-XKGWAZYB-uNfxRaq1.mjs +94 -0
- package/dist/pie-WAS4IAKB-Cn5eK-5P.mjs +3 -0
- package/dist/pie-WAS4IAKB-D84xrSoY.js +1 -0
- package/dist/pieDiagram-E7YTZNPT-Bd6mvpJw.js +39 -0
- package/dist/pieDiagram-E7YTZNPT-Cczo96a2.mjs +203 -0
- package/dist/quadrantDiagram-AXDQQJYC-BPfgvMsS.js +7 -0
- package/dist/quadrantDiagram-AXDQQJYC-eqRNtVRl.mjs +2001 -0
- package/dist/radar-RG4KPBEZ-DvkxGdO6.mjs +3 -0
- package/dist/radar-RG4KPBEZ-R2sQOLL9.js +1 -0
- package/dist/railroad-74A4TZTK-BOZIf6ts.js +1 -0
- package/dist/railroad-74A4TZTK-CrQzn8Nm.mjs +3 -0
- package/dist/railroad-abnf-HS5TGJTU-BZYetxLz.mjs +3 -0
- package/dist/railroad-abnf-HS5TGJTU-CXU1aC4B.js +1 -0
- package/dist/railroad-ebnf-LZEXJU2U-D29kI3YW.js +1 -0
- package/dist/railroad-ebnf-LZEXJU2U-qgzTOmN6.mjs +3 -0
- package/dist/railroad-peg-WCYAUIDC-Bjs9Ws3P.mjs +3 -0
- package/dist/railroad-peg-WCYAUIDC-CXviP0hz.js +1 -0
- package/dist/railroadDiagram-O6MQD6OU-58kvwt7H.mjs +76 -0
- package/dist/railroadDiagram-O6MQD6OU-CKY3uzTc.js +1 -0
- package/dist/requirementDiagram-BXWQKSXE-0hZ04Q6h.js +84 -0
- package/dist/requirementDiagram-BXWQKSXE-CS673B5n.mjs +2224 -0
- package/dist/rough.esm-ChRLLRha.js +1 -0
- package/dist/rough.esm-DXYGHN3m.mjs +1361 -0
- package/dist/sankeyDiagram-P5KCCOFB-D1D6HfAM.mjs +972 -0
- package/dist/sankeyDiagram-P5KCCOFB-ciJb9Zr8.js +40 -0
- package/dist/sequenceDiagram-WJ2MYXX4-BXEznuI6.js +162 -0
- package/dist/sequenceDiagram-WJ2MYXX4-CI1VT8AG.mjs +4156 -0
- package/dist/sizeCapture-INFHLROL-BihkCH-7.js +1 -0
- package/dist/sizeCapture-INFHLROL-BmxqyOLj.mjs +46 -0
- package/dist/src-B4mN2BMl.js +1 -0
- package/dist/src-D_hsMyeP.mjs +2154 -0
- package/dist/stateDiagram-D77RDMKH-BQrSs72W.mjs +220 -0
- package/dist/stateDiagram-D77RDMKH-D2PtkW2U.js +1 -0
- package/dist/stateDiagram-v2-MP3YSRHH-CCbvNfk-.mjs +30 -0
- package/dist/stateDiagram-v2-MP3YSRHH-Dq1QuPeN.js +1 -0
- package/dist/swimlanes-42K2YHIH-CA316NPm.mjs +4979 -0
- package/dist/swimlanes-42K2YHIH-DlggBCTy.js +1 -0
- package/dist/swimlanesDiagram-VR7AAH4N-BV9PEIoG.js +8 -0
- package/dist/swimlanesDiagram-VR7AAH4N-BfrOCfdf.mjs +31 -0
- package/dist/timeline-definition-24CTP7MA-Bkd8rWNJ.js +120 -0
- package/dist/timeline-definition-24CTP7MA-BvkqNYt1.mjs +1069 -0
- package/dist/treeView-Q6P3EWNA-Aof3Cp1M.mjs +3 -0
- package/dist/treeView-Q6P3EWNA-BTzvdwbb.js +1 -0
- package/dist/treemap-WGGIJYW6-BNXGg99p.mjs +3 -0
- package/dist/treemap-WGGIJYW6-DfR4P2Hh.js +1 -0
- package/dist/types/runtime/components/AppearanceMenu.d.ts +2 -0
- package/dist/types/runtime/components/DmdRegistry.d.ts +3 -1
- package/dist/types/runtime/components/MermaidDiagram.d.ts +16 -0
- package/dist/types/runtime/components/OfflineDownloadButton.d.ts +2 -0
- package/dist/types/runtime/config-schema.d.ts +42 -0
- package/dist/types/runtime/index.d.ts +1 -0
- package/dist/types/runtime/markdown/mermaid.d.ts +82 -1
- package/dist/types/runtime/offline-export.d.ts +26 -0
- package/dist/types/runtime/provider/ThemeProvider.d.ts +11 -4
- package/dist/types/runtime/types.d.ts +4 -1
- package/dist/vennDiagram-4TSXK5OY-BOUFXjso.js +34 -0
- package/dist/vennDiagram-4TSXK5OY-CeOg3-hU.mjs +1880 -0
- package/dist/wardley-WFR3VGLG-BOYcSLd1.mjs +3 -0
- package/dist/wardley-WFR3VGLG-DWDqJSgm.js +1 -0
- package/dist/wardleyDiagram-VM6X3IG4-BhWgMjFr.js +78 -0
- package/dist/wardleyDiagram-VM6X3IG4-C31KoRmF.mjs +645 -0
- package/dist/xychartDiagram-S5SC5T6Z-1yU8zz6I.js +7 -0
- package/dist/xychartDiagram-S5SC5T6Z-BK7upFom.mjs +2210 -0
- package/package.json +6 -3
- package/schemas/docs.schema.json +10 -1
- package/templates/README.md +4 -4
- package/templates/docs.json +4 -2
- package/templates/getting-started.md +1 -1
- package/templates/guides/custom-components.md +2 -0
- package/templates/index.html +2 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./chunk-DU6HZSFF-CWc5ewtb.js");var t=(t,n)=>e.ot.lang.round(e.at.parse(t)[n]);Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./src-B4mN2BMl.js"),t=require("./chunk-Y2CYZVJY-CnmLqFtv.js"),n=require("./chunk-DU6HZSFF-CWc5ewtb.js"),r=require("./chunk-75Z2AOVW-DYouz5MZ.js"),i=require("./chunk-4HAMMTFA-GFyfmcSO.js"),a=require("./chunk-GVQU2GXP-CdJIWN41.js"),o=require("./chunk-L3NEJ4N5-TzDiVs78.js"),s=require("./chunk-OSK3NFVY-CHzvVe8m.js"),c=require("./graphlib-BaETKKSa.js");function l(e,{edgePathsClass:t=`edges edgePaths`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}t.n(l,`createLayoutElementGroups`);async function u(e,t){if(t.label){let{shapeSvg:n,bbox:r}=await i.a(e,t);t.labelBBox={width:r.width,height:r.height},n.remove()}else t.labelBBox={width:0,height:0}}t.n(u,`measureGroupLabel`);async function d(e,t,n){let r=await a.r(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}t.n(d,`insertMeasuredNode`);async function f(e,t){let r=new c.t({multigraph:!0,compound:!0}),i=[...t.edges],a=n.x(),o=l(e),{edgeLabels:f,nodes:p}=o,m=new Map,h=e.node()!=null;await Promise.all(t.nodes.map(async e=>{if(e.isGroup)h&&await u(p,e),r.setNode(e.id,{...e});else{if(h){let t=await d(p,e,{config:a,dir:e.dir});m.set(e.id,t)}r.setNode(e.id,{...e})}}));for(let e of i)h&&s.r(e)&&await s.a(f,e),r.setEdge(e.start,e.end,{...e},e.id),t.edges.some(t=>t.id===e.id)||t.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:n}=await Promise.resolve().then(()=>require("./sizeCapture-INFHLROL-BihkCH-7.js"));n(e,t)}return{graph:r,groups:o,nodeElements:m}}t.n(f,`createGraphWithElements`);var p=new Map,m=new Map,h=new Map,g=t.n(()=>{m.clear(),h.clear(),p.clear()},`clear`),_=t.n((t,n)=>{let r=m.get(n)||[];return e.m.trace(`In isDescendant`,n,` `,t,` = `,r.includes(t)),r.includes(t)},`isDescendant`),v=t.n((t,n)=>{let r=m.get(n)||[];return e.m.info(`Descendants of `,n,` is `,r),e.m.info(`Edge is `,t),t.v===n||t.w===n?!1:r?r.includes(t.v)||_(t.v,n)||_(t.w,n)||r.includes(t.w):(e.m.debug(`Tilt, `,n,`,not in descendants`),!1)},`edgeInCluster`),y=t.n((t,n,r,i)=>{e.m.debug(`Copying children of `,t,`root`,i,`data`,n.node(t),i);let a=n.children(t)||[];t!==i&&a.push(t),e.m.debug(`Copying (nodes) clusterId`,t,`nodes`,a),a.forEach(a=>{if(n.children(a).length>0)y(a,n,r,i);else{let o=n.node(a);e.m.info(`cp `,a,` to `,i,` with parent `,t),r.setNode(a,o),i!==n.parent(a)&&(e.m.debug(`Setting parent`,a,n.parent(a)),r.setParent(a,n.parent(a))),t!==i&&a!==t?(e.m.debug(`Setting parent`,a,t),r.setParent(a,t)):(e.m.info(`In copy `,t,`root`,i,`data`,n.node(t),i),e.m.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,t!==i,`node!==clusterId`,a!==t));let s=n.edges(a);e.m.debug(`Copying Edges`,s),s.forEach(a=>{e.m.info(`Edge`,a);let o=n.edge(a.v,a.w,a.name);e.m.info(`Edge data`,o,i);try{v(a,i)?(e.m.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),e.m.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]))):e.m.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,t)}catch(t){e.m.error(t)}})}e.m.debug(`Removing node`,a),n.removeNode(a)})},`copy`),b=t.n((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)h.set(i,e),r=[...r,...b(i,t)];return r},`extractDescendants`),x=t.n((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),S=t.n((t,n,r)=>{let i=n.children(t);if(e.m.trace(`Searching children of id `,t,i),i.length<1)return t;let a;for(let e of i){let t=S(e,n,r),i=x(n,r,t);if(t){if(i.length>0)a=t;else return t}}return a},`findNonClusterChild`),C=t.n(e=>!p.has(e)||!p.get(e).externalConnections?e:p.has(e)?p.get(e).id:e,`getAnchorId`),w=t.n((t,n)=>{if(!t||n>10){e.m.debug(`Opting out, no graph `);return}e.m.debug(`Opting in, graph `),t.nodes().forEach(function(n){t.children(n).length>0&&(e.m.debug(`Cluster identified`,n,` Replacement id in edges: `,S(n,t,n)),m.set(n,b(n,t)),p.set(n,{id:S(n,t,n),clusterData:t.node(n)}))}),t.nodes().forEach(function(n){let r=t.children(n),i=t.edges();r.length>0?(e.m.debug(`Cluster identified`,n,m),i.forEach(t=>{_(t.v,n)^_(t.w,n)&&(e.m.debug(`Edge: `,t,` leaves cluster `,n),e.m.debug(`Descendants of XXX `,n,`: `,m.get(n)),p.get(n).externalConnections=!0)})):e.m.debug(`Not a cluster `,n,m)});for(let e of p.keys()){let n=p.get(e).id,r=t.parent(n);r!==e&&p.has(r)&&!p.get(r).externalConnections&&(p.get(e).id=r);let i=t.edges().some(t=>t.v===e);if(n&&p.get(e)?.externalConnections&&i&&O(t,n,e)){let r=k(t,e,t.parent(n));r&&(p.get(e).id=r)}}t.edges().forEach(function(n){let r=t.edge(n);e.m.debug(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(n)),e.m.debug(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(t.edge(n)));let i=n.v,a=n.w;if(e.m.debug(`Fix XXX`,p,`ids:`,n.v,n.w,`Translating: `,p.get(n.v),` --- `,p.get(n.w)),p.get(n.v)||p.get(n.w)){if(e.m.debug(`Fixing and trying - removing XXX`,n.v,n.w,n.name),i=C(n.v),a=C(n.w),t.removeEdge(n.v,n.w,n.name),i!==n.v){let e=t.parent(i);p.get(e).externalConnections=!0,r.fromCluster=n.v}if(a!==n.w){let e=t.parent(a);p.get(e).externalConnections=!0,r.toCluster=n.w}e.m.debug(`Fix Replacing with XXX`,i,a,n.name),t.setEdge(i,a,r,n.name)}}),T(t,0),e.m.trace(p)},`adjustClustersAndEdges`),T=t.n((t,n)=>{if(n>10){e.m.error(`Bailing out`);return}let r=t.nodes(),i=!1;for(let e of r){let n=t.children(e);i||=n.length>0}if(!i){e.m.debug(`Done, no node has children`,t.nodes());return}e.m.debug(`Nodes = `,r,n);for(let i of r)if(e.m.debug(`Extracting node`,i,p,p.has(i)&&!p.get(i).externalConnections,!t.parent(i),t.node(i),t.children(`D`),` Depth `,n),!p.has(i))e.m.debug(`Not a cluster`,i,n);else if(!p.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){e.m.debug(`Cluster without external connections, without a parent and with children`,i,n);let r=t.graph().rankdir===`TB`?`LR`:`TB`;p.get(i)?.clusterData?.dir&&(r=p.get(i).clusterData.dir,e.m.debug(`Fixing dir`,p.get(i).clusterData.dir,r));let a=new c.t({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});y(i,t,a,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:p.get(i).clusterData,label:p.get(i).label,graph:a})}else e.m.debug(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!p.get(i).externalConnections,` no parent: `,!t.parent(i),` children `,t.children(i)&&t.children(i).length>0,t.children(`D`),n),e.m.debug(p);r=t.nodes(),e.m.debug(`New list of nodes`,r);for(let i of r){let r=t.node(i);e.m.debug(` Now next level`,i,r),r?.clusterNode&&T(r.graph,n+1)}},`extractor`),E=t.n((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=E(e,e.children(t));n=[...n,...r]}),n},`sorter`),D=t.n(e=>E(e,e.children()),`sortNodesByHierarchy`),O=t.n((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=p.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),k=t.n((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||_(i,n))continue;let r=S(i,e,t);if(r&&!O(e,r,t))return r}return null},`findSafeAnchorNode`);function A({prepareLayout:e,measureLayout:n,runLayoutCore:r,paintLayout:i,afterPaint:a,paintOptions:o}){let c=n??M;return t.n(async function(t,n,l,u){let d=n.select(`g`);(l?.insertMarkers??s.s)(d,t.markers,t.type,t.diagramId),j();let f={element:d,helpers:l,options:u};f.preparedLayout=await e?.(t,f);let p=await c(t,f),m=await r(t,f),h={...f,measure:p};i?await i(t,h,m):await N(t,h,o),await a?.(t,h,m)},`render`)}t.n(A,`createCommonLayoutRenderer`);function j(){a.t(),s.t(),o.t(),g()}t.n(j,`clearLayoutRenderState`);async function M(e,{element:t}){return await f(t,e)}t.n(M,`defaultMeasureLayout`);async function N(e,t,n={}){let{measure:r}=t,{groups:i}=r;for(let r of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(r,t)||await P(i,r,t,n);let a=I(e.nodes);for(let r of e.edges)L(r,n)||await R(i,r,a,e,n,t)}t.n(N,`paintLayoutData`);async function P(e,t,n,r){t.clusterNode?a.i(t):F(t,n,r)?await o.n(e.clusters,t):a.i(t)}t.n(P,`paintLayoutNode`);function F(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}t.n(F,`shouldPaintAsCluster`);function I(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}t.n(I,`buildNodeLookup`);function L(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}t.n(L,`shouldSkipPaintEdge`);async function R(e,t,n,r,i,a){let o=s.i(e.edgePaths,{...t},i.clusterDb??new Map,r.type,z(t.start,t,n,a,i),z(t.end,t,n,a,i),r.diagramId,B(t,i));s.r(t)&&(s.n.has(t.id)||await s.a(e.edgeLabels,t),V(t,o))}t.n(R,`paintLayoutEdge`);function z(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}t.n(z,`getRenderedNode`);function B(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}t.n(B,`shouldSkipIntersect`);function V(t,i){let o=i?.updatedPath??i?.originalPath,c=n.b(),{subGraphTitleTotalMargin:l}=a.n({flowchart:c.flowchart??{}});if(t.label){let n=s.n.get(t.id),a=t.x,c=t.y;if(o){let n=r.g.calcLabelPosition(o);e.m.debug(`Moving label `+t.label+` from (`,a,`,`,c,`) to (`,n.x,`,`,n.y,`) abc88`),i?.updatedPath&&(a=n.x,c=n.y)}n.attr(`transform`,`translate(${a}, ${c+l/2})`)}if(t?.startLabelLeft){let e=s.l.get(t.id).startLeft,n=t?.x,i=t?.y;if(o){let e=r.g.calcTerminalLabelPosition(t.arrowTypeStart?10:0,`start_left`,o);n=e.x,i=e.y}e.attr(`transform`,`translate(${n}, ${i})`)}if(t.startLabelRight){let e=s.l.get(t.id).startRight,n=t.x,i=t.y;if(o){let e=r.g.calcTerminalLabelPosition(t.arrowTypeStart?10:0,`start_right`,o);n=e.x,i=e.y}e.attr(`transform`,`translate(${n}, ${i})`)}if(t.endLabelLeft){let e=s.l.get(t.id).endLeft,n=t.x,i=t.y;if(o){let e=r.g.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,`end_left`,o);n=e.x,i=e.y}e.attr(`transform`,`translate(${n}, ${i})`)}if(t.endLabelRight){let e=s.l.get(t.id).endRight,n=t.x,i=t.y;if(o){let e=r.g.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,`end_right`,o);n=e.x,i=e.y}e.attr(`transform`,`translate(${n}, ${i})`)}}t.n(V,`positionRenderedEdgeLabel`),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return w}});
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import { m as e } from "./src-D_hsMyeP.mjs";
|
|
2
|
+
import { n as t } from "./chunk-Y2CYZVJY-i11wjrBe.mjs";
|
|
3
|
+
import { b as n, x as r } from "./chunk-DU6HZSFF-BEQZSmUu.mjs";
|
|
4
|
+
import { g as i } from "./chunk-75Z2AOVW-Dz0Sko9Y.mjs";
|
|
5
|
+
import { a } from "./chunk-4HAMMTFA-VgWPe1ng.mjs";
|
|
6
|
+
import { i as o, n as s, r as c, t as l } from "./chunk-GVQU2GXP-B1D3J05J.mjs";
|
|
7
|
+
import { n as u, t as d } from "./chunk-L3NEJ4N5-lal8wUID.mjs";
|
|
8
|
+
import { a as f, i as p, l as m, n as h, r as g, s as _, t as v } from "./chunk-OSK3NFVY-9AWK88m1.mjs";
|
|
9
|
+
import { t as y } from "./graphlib-XW-Jr8pF.mjs";
|
|
10
|
+
//#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-2E4U76K2.mjs
|
|
11
|
+
function b(e, { edgePathsClass: t = "edges edgePaths" } = {}) {
|
|
12
|
+
let n = e.insert("g").attr("class", "root");
|
|
13
|
+
return {
|
|
14
|
+
clusters: n.insert("g").attr("class", "clusters"),
|
|
15
|
+
edgePaths: n.insert("g").attr("class", t),
|
|
16
|
+
edgeLabels: n.insert("g").attr("class", "edgeLabels"),
|
|
17
|
+
nodes: n.insert("g").attr("class", "nodes"),
|
|
18
|
+
rootGroups: n
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
t(b, "createLayoutElementGroups");
|
|
22
|
+
async function x(e, t) {
|
|
23
|
+
if (t.label) {
|
|
24
|
+
let { shapeSvg: n, bbox: r } = await a(e, t);
|
|
25
|
+
t.labelBBox = {
|
|
26
|
+
width: r.width,
|
|
27
|
+
height: r.height
|
|
28
|
+
}, n.remove();
|
|
29
|
+
} else t.labelBBox = {
|
|
30
|
+
width: 0,
|
|
31
|
+
height: 0
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
t(x, "measureGroupLabel");
|
|
35
|
+
async function S(e, t, n) {
|
|
36
|
+
let r = await c(e, t, n), i = r.node()?.getBBox() ?? {
|
|
37
|
+
width: 0,
|
|
38
|
+
height: 0
|
|
39
|
+
};
|
|
40
|
+
return t.width = i.width, t.height = i.height, r;
|
|
41
|
+
}
|
|
42
|
+
t(S, "insertMeasuredNode");
|
|
43
|
+
async function C(e, t) {
|
|
44
|
+
let n = new y({
|
|
45
|
+
multigraph: !0,
|
|
46
|
+
compound: !0
|
|
47
|
+
}), i = [...t.edges], a = r(), o = b(e), { edgeLabels: s, nodes: c } = o, l = /* @__PURE__ */ new Map(), u = e.node() != null;
|
|
48
|
+
await Promise.all(t.nodes.map(async (e) => {
|
|
49
|
+
if (e.isGroup) u && await x(c, e), n.setNode(e.id, { ...e });
|
|
50
|
+
else {
|
|
51
|
+
if (u) {
|
|
52
|
+
let t = await S(c, e, {
|
|
53
|
+
config: a,
|
|
54
|
+
dir: e.dir
|
|
55
|
+
});
|
|
56
|
+
l.set(e.id, t);
|
|
57
|
+
}
|
|
58
|
+
n.setNode(e.id, { ...e });
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
61
|
+
for (let e of i) u && g(e) && await f(s, e), n.setEdge(e.start, e.end, { ...e }, e.id), t.edges.some((t) => t.id === e.id) || t.edges.push(e);
|
|
62
|
+
if (globalThis.mermaidCaptureSizes) {
|
|
63
|
+
let { captureNodeSizes: n } = await import("./sizeCapture-INFHLROL-BmxqyOLj.mjs");
|
|
64
|
+
n(e, t);
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
graph: n,
|
|
68
|
+
groups: o,
|
|
69
|
+
nodeElements: l
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
t(C, "createGraphWithElements");
|
|
73
|
+
var w = /* @__PURE__ */ new Map(), T = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ t(() => {
|
|
74
|
+
T.clear(), E.clear(), w.clear();
|
|
75
|
+
}, "clear"), O = /* @__PURE__ */ t((t, n) => {
|
|
76
|
+
let r = T.get(n) || [];
|
|
77
|
+
return e.trace("In isDescendant", n, " ", t, " = ", r.includes(t)), r.includes(t);
|
|
78
|
+
}, "isDescendant"), k = /* @__PURE__ */ t((t, n) => {
|
|
79
|
+
let r = T.get(n) || [];
|
|
80
|
+
return e.info("Descendants of ", n, " is ", r), e.info("Edge is ", t), t.v === n || t.w === n ? !1 : r ? r.includes(t.v) || O(t.v, n) || O(t.w, n) || r.includes(t.w) : (e.debug("Tilt, ", n, ",not in descendants"), !1);
|
|
81
|
+
}, "edgeInCluster"), A = /* @__PURE__ */ t((t, n, r, i) => {
|
|
82
|
+
e.debug("Copying children of ", t, "root", i, "data", n.node(t), i);
|
|
83
|
+
let a = n.children(t) || [];
|
|
84
|
+
t !== i && a.push(t), e.debug("Copying (nodes) clusterId", t, "nodes", a), a.forEach((a) => {
|
|
85
|
+
if (n.children(a).length > 0) A(a, n, r, i);
|
|
86
|
+
else {
|
|
87
|
+
let o = n.node(a);
|
|
88
|
+
e.info("cp ", a, " to ", i, " with parent ", t), r.setNode(a, o), i !== n.parent(a) && (e.debug("Setting parent", a, n.parent(a)), r.setParent(a, n.parent(a))), t !== i && a !== t ? (e.debug("Setting parent", a, t), r.setParent(a, t)) : (e.info("In copy ", t, "root", i, "data", n.node(t), i), e.debug("Not Setting parent for node=", a, "cluster!==rootId", t !== i, "node!==clusterId", a !== t));
|
|
89
|
+
let s = n.edges(a);
|
|
90
|
+
e.debug("Copying Edges", s), s.forEach((a) => {
|
|
91
|
+
e.info("Edge", a);
|
|
92
|
+
let o = n.edge(a.v, a.w, a.name);
|
|
93
|
+
e.info("Edge data", o, i);
|
|
94
|
+
try {
|
|
95
|
+
k(a, i) ? (e.info("Copying as ", a.v, a.w, o, a.name), r.setEdge(a.v, a.w, o, a.name), e.info("newGraph edges ", r.edges(), r.edge(r.edges()[0]))) : e.info("Skipping copy of edge ", a.v, "-->", a.w, " rootId: ", i, " clusterId:", t);
|
|
96
|
+
} catch (t) {
|
|
97
|
+
e.error(t);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
e.debug("Removing node", a), n.removeNode(a);
|
|
102
|
+
});
|
|
103
|
+
}, "copy"), j = /* @__PURE__ */ t((e, t) => {
|
|
104
|
+
let n = t.children(e), r = [...n];
|
|
105
|
+
for (let i of n) E.set(i, e), r = [...r, ...j(i, t)];
|
|
106
|
+
return r;
|
|
107
|
+
}, "extractDescendants"), M = /* @__PURE__ */ t((e, t, n) => {
|
|
108
|
+
let r = e.edges().filter((e) => e.v === t || e.w === t), i = e.edges().filter((e) => e.v === n || e.w === n), a = r.map((e) => ({
|
|
109
|
+
v: e.v === t ? n : e.v,
|
|
110
|
+
w: e.w === t ? t : e.w
|
|
111
|
+
})), o = i.map((e) => ({
|
|
112
|
+
v: e.v,
|
|
113
|
+
w: e.w
|
|
114
|
+
}));
|
|
115
|
+
return a.filter((e) => o.some((t) => e.v === t.v && e.w === t.w));
|
|
116
|
+
}, "findCommonEdges"), N = /* @__PURE__ */ t((t, n, r) => {
|
|
117
|
+
let i = n.children(t);
|
|
118
|
+
if (e.trace("Searching children of id ", t, i), i.length < 1) return t;
|
|
119
|
+
let a;
|
|
120
|
+
for (let e of i) {
|
|
121
|
+
let t = N(e, n, r), i = M(n, r, t);
|
|
122
|
+
if (t) {
|
|
123
|
+
if (i.length > 0) a = t;
|
|
124
|
+
else return t;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return a;
|
|
128
|
+
}, "findNonClusterChild"), P = /* @__PURE__ */ t((e) => !w.has(e) || !w.get(e).externalConnections ? e : w.has(e) ? w.get(e).id : e, "getAnchorId"), F = /* @__PURE__ */ t((t, n) => {
|
|
129
|
+
if (!t || n > 10) {
|
|
130
|
+
e.debug("Opting out, no graph ");
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
e.debug("Opting in, graph "), t.nodes().forEach(function(n) {
|
|
134
|
+
t.children(n).length > 0 && (e.debug("Cluster identified", n, " Replacement id in edges: ", N(n, t, n)), T.set(n, j(n, t)), w.set(n, {
|
|
135
|
+
id: N(n, t, n),
|
|
136
|
+
clusterData: t.node(n)
|
|
137
|
+
}));
|
|
138
|
+
}), t.nodes().forEach(function(n) {
|
|
139
|
+
let r = t.children(n), i = t.edges();
|
|
140
|
+
r.length > 0 ? (e.debug("Cluster identified", n, T), i.forEach((t) => {
|
|
141
|
+
O(t.v, n) ^ O(t.w, n) && (e.debug("Edge: ", t, " leaves cluster ", n), e.debug("Descendants of XXX ", n, ": ", T.get(n)), w.get(n).externalConnections = !0);
|
|
142
|
+
})) : e.debug("Not a cluster ", n, T);
|
|
143
|
+
});
|
|
144
|
+
for (let e of w.keys()) {
|
|
145
|
+
let n = w.get(e).id, r = t.parent(n);
|
|
146
|
+
r !== e && w.has(r) && !w.get(r).externalConnections && (w.get(e).id = r);
|
|
147
|
+
let i = t.edges().some((t) => t.v === e);
|
|
148
|
+
if (n && w.get(e)?.externalConnections && i && z(t, n, e)) {
|
|
149
|
+
let r = B(t, e, t.parent(n));
|
|
150
|
+
r && (w.get(e).id = r);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
t.edges().forEach(function(n) {
|
|
154
|
+
let r = t.edge(n);
|
|
155
|
+
e.debug("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), e.debug("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(t.edge(n)));
|
|
156
|
+
let i = n.v, a = n.w;
|
|
157
|
+
if (e.debug("Fix XXX", w, "ids:", n.v, n.w, "Translating: ", w.get(n.v), " --- ", w.get(n.w)), w.get(n.v) || w.get(n.w)) {
|
|
158
|
+
if (e.debug("Fixing and trying - removing XXX", n.v, n.w, n.name), i = P(n.v), a = P(n.w), t.removeEdge(n.v, n.w, n.name), i !== n.v) {
|
|
159
|
+
let e = t.parent(i);
|
|
160
|
+
w.get(e).externalConnections = !0, r.fromCluster = n.v;
|
|
161
|
+
}
|
|
162
|
+
if (a !== n.w) {
|
|
163
|
+
let e = t.parent(a);
|
|
164
|
+
w.get(e).externalConnections = !0, r.toCluster = n.w;
|
|
165
|
+
}
|
|
166
|
+
e.debug("Fix Replacing with XXX", i, a, n.name), t.setEdge(i, a, r, n.name);
|
|
167
|
+
}
|
|
168
|
+
}), I(t, 0), e.trace(w);
|
|
169
|
+
}, "adjustClustersAndEdges"), I = /* @__PURE__ */ t((t, n) => {
|
|
170
|
+
if (n > 10) {
|
|
171
|
+
e.error("Bailing out");
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
let r = t.nodes(), i = !1;
|
|
175
|
+
for (let e of r) {
|
|
176
|
+
let n = t.children(e);
|
|
177
|
+
i ||= n.length > 0;
|
|
178
|
+
}
|
|
179
|
+
if (!i) {
|
|
180
|
+
e.debug("Done, no node has children", t.nodes());
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
e.debug("Nodes = ", r, n);
|
|
184
|
+
for (let i of r) if (e.debug("Extracting node", i, w, w.has(i) && !w.get(i).externalConnections, !t.parent(i), t.node(i), t.children("D"), " Depth ", n), !w.has(i)) e.debug("Not a cluster", i, n);
|
|
185
|
+
else if (!w.get(i).externalConnections && t.children(i) && t.children(i).length > 0) {
|
|
186
|
+
e.debug("Cluster without external connections, without a parent and with children", i, n);
|
|
187
|
+
let r = t.graph().rankdir === "TB" ? "LR" : "TB";
|
|
188
|
+
w.get(i)?.clusterData?.dir && (r = w.get(i).clusterData.dir, e.debug("Fixing dir", w.get(i).clusterData.dir, r));
|
|
189
|
+
let a = new y({
|
|
190
|
+
multigraph: !0,
|
|
191
|
+
compound: !0
|
|
192
|
+
}).setGraph({
|
|
193
|
+
rankdir: r,
|
|
194
|
+
nodesep: 50,
|
|
195
|
+
ranksep: 50,
|
|
196
|
+
marginx: 8,
|
|
197
|
+
marginy: 8
|
|
198
|
+
}).setDefaultEdgeLabel(function() {
|
|
199
|
+
return {};
|
|
200
|
+
});
|
|
201
|
+
A(i, t, a, i), t.setNode(i, {
|
|
202
|
+
clusterNode: !0,
|
|
203
|
+
id: i,
|
|
204
|
+
clusterData: w.get(i).clusterData,
|
|
205
|
+
label: w.get(i).label,
|
|
206
|
+
graph: a
|
|
207
|
+
});
|
|
208
|
+
} else e.debug("Cluster ** ", i, " **not meeting the criteria !externalConnections:", !w.get(i).externalConnections, " no parent: ", !t.parent(i), " children ", t.children(i) && t.children(i).length > 0, t.children("D"), n), e.debug(w);
|
|
209
|
+
r = t.nodes(), e.debug("New list of nodes", r);
|
|
210
|
+
for (let i of r) {
|
|
211
|
+
let r = t.node(i);
|
|
212
|
+
e.debug(" Now next level", i, r), r?.clusterNode && I(r.graph, n + 1);
|
|
213
|
+
}
|
|
214
|
+
}, "extractor"), L = /* @__PURE__ */ t((e, t) => {
|
|
215
|
+
if (t.length === 0) return [];
|
|
216
|
+
let n = Object.assign([], t);
|
|
217
|
+
return t.forEach((t) => {
|
|
218
|
+
let r = L(e, e.children(t));
|
|
219
|
+
n = [...n, ...r];
|
|
220
|
+
}), n;
|
|
221
|
+
}, "sorter"), R = /* @__PURE__ */ t((e) => L(e, e.children()), "sortNodesByHierarchy"), z = /* @__PURE__ */ t((e, t, n) => {
|
|
222
|
+
let r = e.parent(t);
|
|
223
|
+
for (; r && r !== n;) {
|
|
224
|
+
let t = w.get(r);
|
|
225
|
+
if (t && !t.externalConnections) return !0;
|
|
226
|
+
r = e.parent(r);
|
|
227
|
+
}
|
|
228
|
+
return !1;
|
|
229
|
+
}, "isNodeInExtractableCluster"), B = /* @__PURE__ */ t((e, t, n) => {
|
|
230
|
+
let r = e.children(t) ?? [];
|
|
231
|
+
for (let i of r) {
|
|
232
|
+
if (i === n || O(i, n)) continue;
|
|
233
|
+
let r = N(i, e, t);
|
|
234
|
+
if (r && !z(e, r, t)) return r;
|
|
235
|
+
}
|
|
236
|
+
return null;
|
|
237
|
+
}, "findSafeAnchorNode");
|
|
238
|
+
function V({ prepareLayout: e, measureLayout: n, runLayoutCore: r, paintLayout: i, afterPaint: a, paintOptions: o }) {
|
|
239
|
+
let s = n ?? U;
|
|
240
|
+
return /* @__PURE__ */ t(async function(t, n, c, l) {
|
|
241
|
+
let u = n.select("g");
|
|
242
|
+
(c?.insertMarkers ?? _)(u, t.markers, t.type, t.diagramId), H();
|
|
243
|
+
let d = {
|
|
244
|
+
element: u,
|
|
245
|
+
helpers: c,
|
|
246
|
+
options: l
|
|
247
|
+
};
|
|
248
|
+
d.preparedLayout = await e?.(t, d);
|
|
249
|
+
let f = await s(t, d), p = await r(t, d), m = {
|
|
250
|
+
...d,
|
|
251
|
+
measure: f
|
|
252
|
+
};
|
|
253
|
+
i ? await i(t, m, p) : await W(t, m, o), await a?.(t, m, p);
|
|
254
|
+
}, "render");
|
|
255
|
+
}
|
|
256
|
+
t(V, "createCommonLayoutRenderer");
|
|
257
|
+
function H() {
|
|
258
|
+
l(), v(), d(), D();
|
|
259
|
+
}
|
|
260
|
+
t(H, "clearLayoutRenderState");
|
|
261
|
+
async function U(e, { element: t }) {
|
|
262
|
+
return await C(t, e);
|
|
263
|
+
}
|
|
264
|
+
t(U, "defaultMeasureLayout");
|
|
265
|
+
async function W(e, t, n = {}) {
|
|
266
|
+
let { measure: r } = t, { groups: i } = r;
|
|
267
|
+
for (let r of n.getNodes?.(e, t) ?? e.nodes) n.skipNode?.(r, t) || await G(i, r, t, n);
|
|
268
|
+
let a = q(e.nodes);
|
|
269
|
+
for (let r of e.edges) J(r, n) || await Y(i, r, a, e, n, t);
|
|
270
|
+
}
|
|
271
|
+
t(W, "paintLayoutData");
|
|
272
|
+
async function G(e, t, n, r) {
|
|
273
|
+
t.clusterNode ? o(t) : K(t, n, r) ? await u(e.clusters, t) : o(t);
|
|
274
|
+
}
|
|
275
|
+
t(G, "paintLayoutNode");
|
|
276
|
+
function K(e, t, n) {
|
|
277
|
+
return e.isGroup === !0 && (n.isCluster?.(e, t) ?? !0);
|
|
278
|
+
}
|
|
279
|
+
t(K, "shouldPaintAsCluster");
|
|
280
|
+
function q(e) {
|
|
281
|
+
let t = /* @__PURE__ */ new Map();
|
|
282
|
+
for (let n of e) n?.id && t.set(n.id, n);
|
|
283
|
+
return t;
|
|
284
|
+
}
|
|
285
|
+
t(q, "buildNodeLookup");
|
|
286
|
+
function J(e, t) {
|
|
287
|
+
return e.isLayoutOnly || !!t.skipEdge?.(e);
|
|
288
|
+
}
|
|
289
|
+
t(J, "shouldSkipPaintEdge");
|
|
290
|
+
async function Y(e, t, n, r, i, a) {
|
|
291
|
+
let o = p(e.edgePaths, { ...t }, i.clusterDb ?? /* @__PURE__ */ new Map(), r.type, X(t.start, t, n, a, i), X(t.end, t, n, a, i), r.diagramId, Z(t, i));
|
|
292
|
+
g(t) && (h.has(t.id) || await f(e.edgeLabels, t), Q(t, o));
|
|
293
|
+
}
|
|
294
|
+
t(Y, "paintLayoutEdge");
|
|
295
|
+
function X(e, t, n, r, i) {
|
|
296
|
+
return i.getEdgeNode?.(e, t, r) ?? (e ? n.get(e) ?? {} : {});
|
|
297
|
+
}
|
|
298
|
+
t(X, "getRenderedNode");
|
|
299
|
+
function Z(e, t) {
|
|
300
|
+
return typeof t.skipIntersect == "function" ? t.skipIntersect(e) : t.skipIntersect ?? !1;
|
|
301
|
+
}
|
|
302
|
+
t(Z, "shouldSkipIntersect");
|
|
303
|
+
function Q(t, r) {
|
|
304
|
+
let a = r?.updatedPath ?? r?.originalPath, o = n(), { subGraphTitleTotalMargin: c } = s({ flowchart: o.flowchart ?? {} });
|
|
305
|
+
if (t.label) {
|
|
306
|
+
let n = h.get(t.id), o = t.x, s = t.y;
|
|
307
|
+
if (a) {
|
|
308
|
+
let n = i.calcLabelPosition(a);
|
|
309
|
+
e.debug("Moving label " + t.label + " from (", o, ",", s, ") to (", n.x, ",", n.y, ") abc88"), r?.updatedPath && (o = n.x, s = n.y);
|
|
310
|
+
}
|
|
311
|
+
n.attr("transform", `translate(${o}, ${s + c / 2})`);
|
|
312
|
+
}
|
|
313
|
+
if (t?.startLabelLeft) {
|
|
314
|
+
let e = m.get(t.id).startLeft, n = t?.x, r = t?.y;
|
|
315
|
+
if (a) {
|
|
316
|
+
let e = i.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_left", a);
|
|
317
|
+
n = e.x, r = e.y;
|
|
318
|
+
}
|
|
319
|
+
e.attr("transform", `translate(${n}, ${r})`);
|
|
320
|
+
}
|
|
321
|
+
if (t.startLabelRight) {
|
|
322
|
+
let e = m.get(t.id).startRight, n = t.x, r = t.y;
|
|
323
|
+
if (a) {
|
|
324
|
+
let e = i.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_right", a);
|
|
325
|
+
n = e.x, r = e.y;
|
|
326
|
+
}
|
|
327
|
+
e.attr("transform", `translate(${n}, ${r})`);
|
|
328
|
+
}
|
|
329
|
+
if (t.endLabelLeft) {
|
|
330
|
+
let e = m.get(t.id).endLeft, n = t.x, r = t.y;
|
|
331
|
+
if (a) {
|
|
332
|
+
let e = i.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_left", a);
|
|
333
|
+
n = e.x, r = e.y;
|
|
334
|
+
}
|
|
335
|
+
e.attr("transform", `translate(${n}, ${r})`);
|
|
336
|
+
}
|
|
337
|
+
if (t.endLabelRight) {
|
|
338
|
+
let e = m.get(t.id).endRight, n = t.x, r = t.y;
|
|
339
|
+
if (a) {
|
|
340
|
+
let e = i.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_right", a);
|
|
341
|
+
n = e.x, r = e.y;
|
|
342
|
+
}
|
|
343
|
+
e.attr("transform", `translate(${n}, ${r})`);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
t(Q, "positionRenderedEdgeLabel");
|
|
347
|
+
//#endregion
|
|
348
|
+
export { N as a, b as i, w as n, S as o, V as r, R as s, F as t };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { n as e } from "./chunk-Y2CYZVJY-i11wjrBe.mjs";
|
|
2
|
+
//#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-2Q5K7J3B.mjs
|
|
3
|
+
var t = class {
|
|
4
|
+
constructor(e) {
|
|
5
|
+
this.init = e, this.records = this.init();
|
|
6
|
+
}
|
|
7
|
+
static {
|
|
8
|
+
e(this, "ImperativeState");
|
|
9
|
+
}
|
|
10
|
+
reset() {
|
|
11
|
+
this.records = this.init();
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./chunk-Y2CYZVJY-CnmLqFtv.js");var t=class{constructor(e){this.init=e,this.records=this.init()}static{e.n(this,`ImperativeState`)}reset(){this.records=this.init()}};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
|