@zettelgeist/cli 0.1.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/LICENSE +202 -0
- package/README.md +64 -0
- package/dist/bin.js +2211 -0
- package/dist/bin.js.map +7 -0
- package/dist/templates/export.html +27 -0
- package/dist/templates/skill/SKILL.md +220 -0
- package/dist/viewer-bundle/architecture-YZFGNWBL-W2K3EQOM.js +14 -0
- package/dist/viewer-bundle/architecture-YZFGNWBL-W2K3EQOM.js.map +7 -0
- package/dist/viewer-bundle/architectureDiagram-Q4EWVU46-LCGRUEWT.js +8884 -0
- package/dist/viewer-bundle/architectureDiagram-Q4EWVU46-LCGRUEWT.js.map +7 -0
- package/dist/viewer-bundle/base.css +248 -0
- package/dist/viewer-bundle/blockDiagram-DXYQGD6D-KAM7BOAP.js +3777 -0
- package/dist/viewer-bundle/blockDiagram-DXYQGD6D-KAM7BOAP.js.map +7 -0
- package/dist/viewer-bundle/board.css +370 -0
- package/dist/viewer-bundle/c4Diagram-AHTNJAMY-C3FIQYXA.js +2596 -0
- package/dist/viewer-bundle/c4Diagram-AHTNJAMY-C3FIQYXA.js.map +7 -0
- package/dist/viewer-bundle/chunk-2QXGXAO5.js +68 -0
- package/dist/viewer-bundle/chunk-2QXGXAO5.js.map +7 -0
- package/dist/viewer-bundle/chunk-5PZT7VUU.js +67 -0
- package/dist/viewer-bundle/chunk-5PZT7VUU.js.map +7 -0
- package/dist/viewer-bundle/chunk-5YJCJF2C.js +112 -0
- package/dist/viewer-bundle/chunk-5YJCJF2C.js.map +7 -0
- package/dist/viewer-bundle/chunk-6LYV7PBV.js +1011 -0
- package/dist/viewer-bundle/chunk-6LYV7PBV.js.map +7 -0
- package/dist/viewer-bundle/chunk-6VW7D5WX.js +48 -0
- package/dist/viewer-bundle/chunk-6VW7D5WX.js.map +7 -0
- package/dist/viewer-bundle/chunk-76C5OSD4.js +2048 -0
- package/dist/viewer-bundle/chunk-76C5OSD4.js.map +7 -0
- package/dist/viewer-bundle/chunk-7NZMPQDX.js +6957 -0
- package/dist/viewer-bundle/chunk-7NZMPQDX.js.map +7 -0
- package/dist/viewer-bundle/chunk-A634GTZN.js +122 -0
- package/dist/viewer-bundle/chunk-A634GTZN.js.map +7 -0
- package/dist/viewer-bundle/chunk-AJQJUKMU.js +133 -0
- package/dist/viewer-bundle/chunk-AJQJUKMU.js.map +7 -0
- package/dist/viewer-bundle/chunk-BM2KPNFW.js +5556 -0
- package/dist/viewer-bundle/chunk-BM2KPNFW.js.map +7 -0
- package/dist/viewer-bundle/chunk-CIDUOCCG.js +25 -0
- package/dist/viewer-bundle/chunk-CIDUOCCG.js.map +7 -0
- package/dist/viewer-bundle/chunk-CZHJHAOR.js +6397 -0
- package/dist/viewer-bundle/chunk-CZHJHAOR.js.map +7 -0
- package/dist/viewer-bundle/chunk-D5RLIWY4.js +125 -0
- package/dist/viewer-bundle/chunk-D5RLIWY4.js.map +7 -0
- package/dist/viewer-bundle/chunk-DI52DQAC.js +44 -0
- package/dist/viewer-bundle/chunk-DI52DQAC.js.map +7 -0
- package/dist/viewer-bundle/chunk-EXJQLTIV.js +51 -0
- package/dist/viewer-bundle/chunk-EXJQLTIV.js.map +7 -0
- package/dist/viewer-bundle/chunk-G3PPZWPW.js +96 -0
- package/dist/viewer-bundle/chunk-G3PPZWPW.js.map +7 -0
- package/dist/viewer-bundle/chunk-GTW4IDD4.js +30297 -0
- package/dist/viewer-bundle/chunk-GTW4IDD4.js.map +7 -0
- package/dist/viewer-bundle/chunk-GVE7OA3Z.js +59 -0
- package/dist/viewer-bundle/chunk-GVE7OA3Z.js.map +7 -0
- package/dist/viewer-bundle/chunk-JBUVKVPY.js +2042 -0
- package/dist/viewer-bundle/chunk-JBUVKVPY.js.map +7 -0
- package/dist/viewer-bundle/chunk-JQLVOAQB.js +20 -0
- package/dist/viewer-bundle/chunk-JQLVOAQB.js.map +7 -0
- package/dist/viewer-bundle/chunk-LQMQSYLO.js +101 -0
- package/dist/viewer-bundle/chunk-LQMQSYLO.js.map +7 -0
- package/dist/viewer-bundle/chunk-MBFAQ3IK.js +34 -0
- package/dist/viewer-bundle/chunk-MBFAQ3IK.js.map +7 -0
- package/dist/viewer-bundle/chunk-N7G7IIKG.js +25 -0
- package/dist/viewer-bundle/chunk-N7G7IIKG.js.map +7 -0
- package/dist/viewer-bundle/chunk-NW4YG3NS.js +171 -0
- package/dist/viewer-bundle/chunk-NW4YG3NS.js.map +7 -0
- package/dist/viewer-bundle/chunk-ODEP5TKB.js +61 -0
- package/dist/viewer-bundle/chunk-ODEP5TKB.js.map +7 -0
- package/dist/viewer-bundle/chunk-OGKINV23.js +1050 -0
- package/dist/viewer-bundle/chunk-OGKINV23.js.map +7 -0
- package/dist/viewer-bundle/chunk-OGMSNDVH.js +1994 -0
- package/dist/viewer-bundle/chunk-OGMSNDVH.js.map +7 -0
- package/dist/viewer-bundle/chunk-QJVSDNAW.js +25 -0
- package/dist/viewer-bundle/chunk-QJVSDNAW.js.map +7 -0
- package/dist/viewer-bundle/chunk-RBTT26R4.js +2721 -0
- package/dist/viewer-bundle/chunk-RBTT26R4.js.map +7 -0
- package/dist/viewer-bundle/chunk-RQIPIIE2.js +48 -0
- package/dist/viewer-bundle/chunk-RQIPIIE2.js.map +7 -0
- package/dist/viewer-bundle/chunk-SRTYTXTX.js +22 -0
- package/dist/viewer-bundle/chunk-SRTYTXTX.js.map +7 -0
- package/dist/viewer-bundle/chunk-TRL7YIZG.js +1663 -0
- package/dist/viewer-bundle/chunk-TRL7YIZG.js.map +7 -0
- package/dist/viewer-bundle/chunk-U5T7X4BV.js +172 -0
- package/dist/viewer-bundle/chunk-U5T7X4BV.js.map +7 -0
- package/dist/viewer-bundle/chunk-UCAW6C6C.js +48 -0
- package/dist/viewer-bundle/chunk-UCAW6C6C.js.map +7 -0
- package/dist/viewer-bundle/chunk-UEAG4BJQ.js +93 -0
- package/dist/viewer-bundle/chunk-UEAG4BJQ.js.map +7 -0
- package/dist/viewer-bundle/chunk-UVRE3R6A.js +1039 -0
- package/dist/viewer-bundle/chunk-UVRE3R6A.js.map +7 -0
- package/dist/viewer-bundle/chunk-VODO7SV4.js +25029 -0
- package/dist/viewer-bundle/chunk-VODO7SV4.js.map +7 -0
- package/dist/viewer-bundle/chunk-YEU62MVS.js +682 -0
- package/dist/viewer-bundle/chunk-YEU62MVS.js.map +7 -0
- package/dist/viewer-bundle/chunk-YFQT7PPW.js +987 -0
- package/dist/viewer-bundle/chunk-YFQT7PPW.js.map +7 -0
- package/dist/viewer-bundle/chunk-Z4G7FG27.js +48 -0
- package/dist/viewer-bundle/chunk-Z4G7FG27.js.map +7 -0
- package/dist/viewer-bundle/chunk-ZW4Y7DIF.js +2044 -0
- package/dist/viewer-bundle/chunk-ZW4Y7DIF.js.map +7 -0
- package/dist/viewer-bundle/classDiagram-6PBFFD2Q-7VKYXLUX.js +46 -0
- package/dist/viewer-bundle/classDiagram-6PBFFD2Q-7VKYXLUX.js.map +7 -0
- package/dist/viewer-bundle/classDiagram-v2-HSJHXN6E-ACCNN7EN.js +46 -0
- package/dist/viewer-bundle/classDiagram-v2-HSJHXN6E-ACCNN7EN.js.map +7 -0
- package/dist/viewer-bundle/cose-bilkent-S5V4N54A-MUJHAA34.js +5009 -0
- package/dist/viewer-bundle/cose-bilkent-S5V4N54A-MUJHAA34.js.map +7 -0
- package/dist/viewer-bundle/dagre-KV5264BT-YC5VV3WF.js +739 -0
- package/dist/viewer-bundle/dagre-KV5264BT-YC5VV3WF.js.map +7 -0
- package/dist/viewer-bundle/dark.css +13 -0
- package/dist/viewer-bundle/detail.css +539 -0
- package/dist/viewer-bundle/diagram-5BDNPKRD-RXFPVFYK.js +214 -0
- package/dist/viewer-bundle/diagram-5BDNPKRD-RXFPVFYK.js.map +7 -0
- package/dist/viewer-bundle/diagram-G4DWMVQ6-KN7CBNBQ.js +578 -0
- package/dist/viewer-bundle/diagram-G4DWMVQ6-KN7CBNBQ.js.map +7 -0
- package/dist/viewer-bundle/diagram-MMDJMWI5-ZN6TQ7ZC.js +345 -0
- package/dist/viewer-bundle/diagram-MMDJMWI5-ZN6TQ7ZC.js.map +7 -0
- package/dist/viewer-bundle/diagram-TYMM5635-MMTUJ4KA.js +255 -0
- package/dist/viewer-bundle/diagram-TYMM5635-MMTUJ4KA.js.map +7 -0
- package/dist/viewer-bundle/docs.css +88 -0
- package/dist/viewer-bundle/edit-modal-BEGC2AO6.js +176 -0
- package/dist/viewer-bundle/edit-modal-BEGC2AO6.js.map +7 -0
- package/dist/viewer-bundle/erDiagram-SMLLAGMA-TBHMLD2E.js +1349 -0
- package/dist/viewer-bundle/erDiagram-SMLLAGMA-TBHMLD2E.js.map +7 -0
- package/dist/viewer-bundle/flowDiagram-DWJPFMVM-BZHLK6QB.js +2501 -0
- package/dist/viewer-bundle/flowDiagram-DWJPFMVM-BZHLK6QB.js.map +7 -0
- package/dist/viewer-bundle/ganttDiagram-T4ZO3ILL-YBARPTQR.js +2654 -0
- package/dist/viewer-bundle/ganttDiagram-T4ZO3ILL-YBARPTQR.js.map +7 -0
- package/dist/viewer-bundle/gitGraph-7Q5UKJZL-HENKIQDX.js +14 -0
- package/dist/viewer-bundle/gitGraph-7Q5UKJZL-HENKIQDX.js.map +7 -0
- package/dist/viewer-bundle/gitGraphDiagram-UUTBAWPF-M4VV3YVA.js +1946 -0
- package/dist/viewer-bundle/gitGraphDiagram-UUTBAWPF-M4VV3YVA.js.map +7 -0
- package/dist/viewer-bundle/index.html +28 -0
- package/dist/viewer-bundle/info-OMHHGYJF-E773USRS.js +14 -0
- package/dist/viewer-bundle/info-OMHHGYJF-E773USRS.js.map +7 -0
- package/dist/viewer-bundle/infoDiagram-42DDH7IO-C7JGUXKK.js +59 -0
- package/dist/viewer-bundle/infoDiagram-42DDH7IO-C7JGUXKK.js.map +7 -0
- package/dist/viewer-bundle/ishikawaDiagram-UXIWVN3A-YBC4X4VB.js +1012 -0
- package/dist/viewer-bundle/ishikawaDiagram-UXIWVN3A-YBC4X4VB.js.map +7 -0
- package/dist/viewer-bundle/journeyDiagram-VCZTEJTY-6WKVEOOO.js +1303 -0
- package/dist/viewer-bundle/journeyDiagram-VCZTEJTY-6WKVEOOO.js.map +7 -0
- package/dist/viewer-bundle/kanban-definition-6JOO6SKY-URTTHHO4.js +1131 -0
- package/dist/viewer-bundle/kanban-definition-6JOO6SKY-URTTHHO4.js.map +7 -0
- package/dist/viewer-bundle/katex-QN5266ZE.js +14318 -0
- package/dist/viewer-bundle/katex-QN5266ZE.js.map +7 -0
- package/dist/viewer-bundle/light.css +15 -0
- package/dist/viewer-bundle/main.js +4816 -0
- package/dist/viewer-bundle/main.js.map +7 -0
- package/dist/viewer-bundle/mermaid.core-AEBXU2JK.js +1708 -0
- package/dist/viewer-bundle/mermaid.core-AEBXU2JK.js.map +7 -0
- package/dist/viewer-bundle/mindmap-definition-QFDTVHPH-KUMAMRSF.js +1277 -0
- package/dist/viewer-bundle/mindmap-definition-QFDTVHPH-KUMAMRSF.js.map +7 -0
- package/dist/viewer-bundle/packet-4T2RLAQJ-IRYWWA66.js +14 -0
- package/dist/viewer-bundle/packet-4T2RLAQJ-IRYWWA66.js.map +7 -0
- package/dist/viewer-bundle/pico.classless.min.css +4 -0
- package/dist/viewer-bundle/pie-ZZUOXDRM-JYO4VL5N.js +14 -0
- package/dist/viewer-bundle/pie-ZZUOXDRM-JYO4VL5N.js.map +7 -0
- package/dist/viewer-bundle/pieDiagram-DEJITSTG-QOEHQN3N.js +238 -0
- package/dist/viewer-bundle/pieDiagram-DEJITSTG-QOEHQN3N.js.map +7 -0
- package/dist/viewer-bundle/prompt-modal-C4LHI7BS.js +12 -0
- package/dist/viewer-bundle/prompt-modal-C4LHI7BS.js.map +7 -0
- package/dist/viewer-bundle/quadrantDiagram-34T5L4WZ-SJNPUU5N.js +1409 -0
- package/dist/viewer-bundle/quadrantDiagram-34T5L4WZ-SJNPUU5N.js.map +7 -0
- package/dist/viewer-bundle/radar-PYXPWWZC-45BRYQSB.js +14 -0
- package/dist/viewer-bundle/radar-PYXPWWZC-45BRYQSB.js.map +7 -0
- package/dist/viewer-bundle/reason-modal-MK34MQ73.js +68 -0
- package/dist/viewer-bundle/reason-modal-MK34MQ73.js.map +7 -0
- package/dist/viewer-bundle/requirementDiagram-MS252O5E-UOMT3FCC.js +1311 -0
- package/dist/viewer-bundle/requirementDiagram-MS252O5E-UOMT3FCC.js.map +7 -0
- package/dist/viewer-bundle/sankeyDiagram-XADWPNL6-LAVJ5C6A.js +1263 -0
- package/dist/viewer-bundle/sankeyDiagram-XADWPNL6-LAVJ5C6A.js.map +7 -0
- package/dist/viewer-bundle/sequenceDiagram-FGHM5R23-3IWTOUNQ.js +4655 -0
- package/dist/viewer-bundle/sequenceDiagram-FGHM5R23-3IWTOUNQ.js.map +7 -0
- package/dist/viewer-bundle/stateDiagram-FHFEXIEX-S2OVQQON.js +495 -0
- package/dist/viewer-bundle/stateDiagram-FHFEXIEX-S2OVQQON.js.map +7 -0
- package/dist/viewer-bundle/stateDiagram-v2-QKLJ7IA2-XNZ3XXSV.js +44 -0
- package/dist/viewer-bundle/stateDiagram-v2-QKLJ7IA2-XNZ3XXSV.js.map +7 -0
- package/dist/viewer-bundle/timeline-definition-GMOUNBTQ-FHVZ7MHE.js +1646 -0
- package/dist/viewer-bundle/timeline-definition-GMOUNBTQ-FHVZ7MHE.js.map +7 -0
- package/dist/viewer-bundle/treeView-SZITEDCU-RXZXNYAM.js +14 -0
- package/dist/viewer-bundle/treeView-SZITEDCU-RXZXNYAM.js.map +7 -0
- package/dist/viewer-bundle/treemap-W4RFUUIX-2IGOFSJM.js +14 -0
- package/dist/viewer-bundle/treemap-W4RFUUIX-2IGOFSJM.js.map +7 -0
- package/dist/viewer-bundle/vennDiagram-DHZGUBPP-HEAOEXEZ.js +2544 -0
- package/dist/viewer-bundle/vennDiagram-DHZGUBPP-HEAOEXEZ.js.map +7 -0
- package/dist/viewer-bundle/wardley-RL74JXVD-VSPCLOX2.js +14 -0
- package/dist/viewer-bundle/wardley-RL74JXVD-VSPCLOX2.js.map +7 -0
- package/dist/viewer-bundle/wardleyDiagram-NUSXRM2D-EBY4FG3X.js +938 -0
- package/dist/viewer-bundle/wardleyDiagram-NUSXRM2D-EBY4FG3X.js.map +7 -0
- package/dist/viewer-bundle/xychartDiagram-5P7HB3ND-SSMUQEXK.js +1952 -0
- package/dist/viewer-bundle/xychartDiagram-5P7HB3ND-SSMUQEXK.js.map +7 -0
- package/package.json +51 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import {
|
|
2
|
+
parseFontSize
|
|
3
|
+
} from "./chunk-UVRE3R6A.js";
|
|
4
|
+
import {
|
|
5
|
+
defaultConfig_default,
|
|
6
|
+
getConfig2
|
|
7
|
+
} from "./chunk-7NZMPQDX.js";
|
|
8
|
+
import {
|
|
9
|
+
__name
|
|
10
|
+
} from "./chunk-CZHJHAOR.js";
|
|
11
|
+
|
|
12
|
+
// ../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ZZ45TVLE.mjs
|
|
13
|
+
var getSubGraphTitleMargins = /* @__PURE__ */ __name(({
|
|
14
|
+
flowchart
|
|
15
|
+
}) => {
|
|
16
|
+
const subGraphTitleTopMargin = flowchart?.subGraphTitleMargin?.top ?? 0;
|
|
17
|
+
const subGraphTitleBottomMargin = flowchart?.subGraphTitleMargin?.bottom ?? 0;
|
|
18
|
+
const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin;
|
|
19
|
+
return {
|
|
20
|
+
subGraphTitleTopMargin,
|
|
21
|
+
subGraphTitleBottomMargin,
|
|
22
|
+
subGraphTitleTotalMargin
|
|
23
|
+
};
|
|
24
|
+
}, "getSubGraphTitleMargins");
|
|
25
|
+
async function configureLabelImages(container, labelText) {
|
|
26
|
+
const images = container.getElementsByTagName("img");
|
|
27
|
+
if (!images || images.length === 0) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const noImgText = labelText.replace(/<img[^>]*>/g, "").trim() === "";
|
|
31
|
+
await Promise.all(
|
|
32
|
+
[...images].map(
|
|
33
|
+
(img) => new Promise((res) => {
|
|
34
|
+
function setupImage() {
|
|
35
|
+
img.style.display = "flex";
|
|
36
|
+
img.style.flexDirection = "column";
|
|
37
|
+
if (noImgText) {
|
|
38
|
+
const bodyFontSize = getConfig2().fontSize ? getConfig2().fontSize : window.getComputedStyle(document.body).fontSize;
|
|
39
|
+
const enlargingFactor = 5;
|
|
40
|
+
const [parsedBodyFontSize = defaultConfig_default.fontSize] = parseFontSize(bodyFontSize);
|
|
41
|
+
const width = parsedBodyFontSize * enlargingFactor + "px";
|
|
42
|
+
img.style.minWidth = width;
|
|
43
|
+
img.style.maxWidth = width;
|
|
44
|
+
} else {
|
|
45
|
+
img.style.width = "100%";
|
|
46
|
+
}
|
|
47
|
+
res(img);
|
|
48
|
+
}
|
|
49
|
+
__name(setupImage, "setupImage");
|
|
50
|
+
setTimeout(() => {
|
|
51
|
+
if (img.complete) {
|
|
52
|
+
setupImage();
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
img.addEventListener("error", setupImage);
|
|
56
|
+
img.addEventListener("load", setupImage);
|
|
57
|
+
})
|
|
58
|
+
)
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
__name(configureLabelImages, "configureLabelImages");
|
|
62
|
+
|
|
63
|
+
export {
|
|
64
|
+
getSubGraphTitleMargins,
|
|
65
|
+
configureLabelImages
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=chunk-5PZT7VUU.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ZZ45TVLE.mjs"],
|
|
4
|
+
"sourcesContent": ["import {\n parseFontSize\n} from \"./chunk-5PVQY5BW.mjs\";\nimport {\n defaultConfig_default,\n getConfig2 as getConfig\n} from \"./chunk-ICPOFSXX.mjs\";\nimport {\n __name\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/utils/subGraphTitleMargins.ts\nvar getSubGraphTitleMargins = /* @__PURE__ */ __name(({\n flowchart\n}) => {\n const subGraphTitleTopMargin = flowchart?.subGraphTitleMargin?.top ?? 0;\n const subGraphTitleBottomMargin = flowchart?.subGraphTitleMargin?.bottom ?? 0;\n const subGraphTitleTotalMargin = subGraphTitleTopMargin + subGraphTitleBottomMargin;\n return {\n subGraphTitleTopMargin,\n subGraphTitleBottomMargin,\n subGraphTitleTotalMargin\n };\n}, \"getSubGraphTitleMargins\");\n\n// src/rendering-util/rendering-elements/shapes/labelImageUtils.ts\nasync function configureLabelImages(container, labelText) {\n const images = container.getElementsByTagName(\"img\");\n if (!images || images.length === 0) {\n return;\n }\n const noImgText = labelText.replace(/<img[^>]*>/g, \"\").trim() === \"\";\n await Promise.all(\n [...images].map(\n (img) => new Promise((res) => {\n function setupImage() {\n img.style.display = \"flex\";\n img.style.flexDirection = \"column\";\n if (noImgText) {\n const bodyFontSize = getConfig().fontSize ? getConfig().fontSize : window.getComputedStyle(document.body).fontSize;\n const enlargingFactor = 5;\n const [parsedBodyFontSize = defaultConfig_default.fontSize] = parseFontSize(bodyFontSize);\n const width = parsedBodyFontSize * enlargingFactor + \"px\";\n img.style.minWidth = width;\n img.style.maxWidth = width;\n } else {\n img.style.width = \"100%\";\n }\n res(img);\n }\n __name(setupImage, \"setupImage\");\n setTimeout(() => {\n if (img.complete) {\n setupImage();\n }\n });\n img.addEventListener(\"error\", setupImage);\n img.addEventListener(\"load\", setupImage);\n })\n )\n );\n}\n__name(configureLabelImages, \"configureLabelImages\");\n\nexport {\n configureLabelImages,\n getSubGraphTitleMargins\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAYA,IAAI,0BAA0C,uBAAO,CAAC;AAAA,EACpD;AACF,MAAM;AACJ,QAAM,yBAAyB,WAAW,qBAAqB,OAAO;AAC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unk-7NZMPQDX.js";
|
|
4
|
+
import {
|
|
5
|
+
__name
|
|
6
|
+
} from "./chunk-CZHJHAOR.js";
|
|
7
|
+
|
|
8
|
+
// ../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-X2U36JSP.mjs
|
|
9
|
+
var solidStateFill = /* @__PURE__ */ __name((color) => {
|
|
10
|
+
const { handDrawnSeed } = getConfig2();
|
|
11
|
+
return {
|
|
12
|
+
fill: color,
|
|
13
|
+
hachureAngle: 120,
|
|
14
|
+
// angle of hachure,
|
|
15
|
+
hachureGap: 4,
|
|
16
|
+
fillWeight: 2,
|
|
17
|
+
roughness: 0.7,
|
|
18
|
+
stroke: color,
|
|
19
|
+
seed: handDrawnSeed
|
|
20
|
+
};
|
|
21
|
+
}, "solidStateFill");
|
|
22
|
+
var compileStyles = /* @__PURE__ */ __name((node) => {
|
|
23
|
+
const stylesMap = styles2Map([
|
|
24
|
+
...node.cssCompiledStyles || [],
|
|
25
|
+
...node.cssStyles || [],
|
|
26
|
+
...node.labelStyle || []
|
|
27
|
+
]);
|
|
28
|
+
return { stylesMap, stylesArray: [...stylesMap] };
|
|
29
|
+
}, "compileStyles");
|
|
30
|
+
var styles2Map = /* @__PURE__ */ __name((styles) => {
|
|
31
|
+
const styleMap = /* @__PURE__ */ new Map();
|
|
32
|
+
styles.forEach((style) => {
|
|
33
|
+
const [key, value] = style.split(":");
|
|
34
|
+
styleMap.set(key.trim(), value?.trim());
|
|
35
|
+
});
|
|
36
|
+
return styleMap;
|
|
37
|
+
}, "styles2Map");
|
|
38
|
+
var isLabelStyle = /* @__PURE__ */ __name((key) => {
|
|
39
|
+
return key === "color" || key === "font-size" || key === "font-family" || key === "font-weight" || key === "font-style" || key === "text-decoration" || key === "text-align" || key === "text-transform" || key === "line-height" || key === "letter-spacing" || key === "word-spacing" || key === "text-shadow" || key === "text-overflow" || key === "white-space" || key === "word-wrap" || key === "word-break" || key === "overflow-wrap" || key === "hyphens";
|
|
40
|
+
}, "isLabelStyle");
|
|
41
|
+
var styles2String = /* @__PURE__ */ __name((node) => {
|
|
42
|
+
const { stylesArray } = compileStyles(node);
|
|
43
|
+
const labelStyles = [];
|
|
44
|
+
const nodeStyles = [];
|
|
45
|
+
const borderStyles = [];
|
|
46
|
+
const backgroundStyles = [];
|
|
47
|
+
stylesArray.forEach((style) => {
|
|
48
|
+
const key = style[0];
|
|
49
|
+
if (isLabelStyle(key)) {
|
|
50
|
+
labelStyles.push(style.join(":") + " !important");
|
|
51
|
+
} else {
|
|
52
|
+
nodeStyles.push(style.join(":") + " !important");
|
|
53
|
+
if (key.includes("stroke")) {
|
|
54
|
+
borderStyles.push(style.join(":") + " !important");
|
|
55
|
+
}
|
|
56
|
+
if (key === "fill") {
|
|
57
|
+
backgroundStyles.push(style.join(":") + " !important");
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
return {
|
|
62
|
+
labelStyles: labelStyles.join(";"),
|
|
63
|
+
nodeStyles: nodeStyles.join(";"),
|
|
64
|
+
stylesArray,
|
|
65
|
+
borderStyles,
|
|
66
|
+
backgroundStyles
|
|
67
|
+
};
|
|
68
|
+
}, "styles2String");
|
|
69
|
+
var userNodeOverrides = /* @__PURE__ */ __name((node, options) => {
|
|
70
|
+
const { themeVariables, handDrawnSeed } = getConfig2();
|
|
71
|
+
const { nodeBorder, mainBkg } = themeVariables;
|
|
72
|
+
const { stylesMap } = compileStyles(node);
|
|
73
|
+
const result = Object.assign(
|
|
74
|
+
{
|
|
75
|
+
roughness: 0.7,
|
|
76
|
+
fill: stylesMap.get("fill") || mainBkg,
|
|
77
|
+
fillStyle: "hachure",
|
|
78
|
+
// solid fill
|
|
79
|
+
fillWeight: 4,
|
|
80
|
+
hachureGap: 5.2,
|
|
81
|
+
stroke: stylesMap.get("stroke") || nodeBorder,
|
|
82
|
+
seed: handDrawnSeed,
|
|
83
|
+
strokeWidth: stylesMap.get("stroke-width")?.replace("px", "") || 1.3,
|
|
84
|
+
fillLineDash: [0, 0],
|
|
85
|
+
strokeLineDash: getStrokeDashArray(stylesMap.get("stroke-dasharray"))
|
|
86
|
+
},
|
|
87
|
+
options
|
|
88
|
+
);
|
|
89
|
+
return result;
|
|
90
|
+
}, "userNodeOverrides");
|
|
91
|
+
var getStrokeDashArray = /* @__PURE__ */ __name((strokeDasharrayStyle) => {
|
|
92
|
+
if (!strokeDasharrayStyle) {
|
|
93
|
+
return [0, 0];
|
|
94
|
+
}
|
|
95
|
+
const dashArray = strokeDasharrayStyle.trim().split(/\s+/).map(Number);
|
|
96
|
+
if (dashArray.length === 1) {
|
|
97
|
+
const val = isNaN(dashArray[0]) ? 0 : dashArray[0];
|
|
98
|
+
return [val, val];
|
|
99
|
+
}
|
|
100
|
+
const first = isNaN(dashArray[0]) ? 0 : dashArray[0];
|
|
101
|
+
const second = isNaN(dashArray[1]) ? 0 : dashArray[1];
|
|
102
|
+
return [first, second];
|
|
103
|
+
}, "getStrokeDashArray");
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
solidStateFill,
|
|
107
|
+
compileStyles,
|
|
108
|
+
isLabelStyle,
|
|
109
|
+
styles2String,
|
|
110
|
+
userNodeOverrides
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=chunk-5YJCJF2C.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-X2U36JSP.mjs"],
|
|
4
|
+
"sourcesContent": ["import {\n getConfig2 as getConfig\n} from \"./chunk-ICPOFSXX.mjs\";\nimport {\n __name\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.ts\nvar solidStateFill = /* @__PURE__ */ __name((color) => {\n const { handDrawnSeed } = getConfig();\n return {\n fill: color,\n hachureAngle: 120,\n // angle of hachure,\n hachureGap: 4,\n fillWeight: 2,\n roughness: 0.7,\n stroke: color,\n seed: handDrawnSeed\n };\n}, \"solidStateFill\");\nvar compileStyles = /* @__PURE__ */ __name((node) => {\n const stylesMap = styles2Map([\n ...node.cssCompiledStyles || [],\n ...node.cssStyles || [],\n ...node.labelStyle || []\n ]);\n return { stylesMap, stylesArray: [...stylesMap] };\n}, \"compileStyles\");\nvar styles2Map = /* @__PURE__ */ __name((styles) => {\n const styleMap = /* @__PURE__ */ new Map();\n styles.forEach((style) => {\n const [key, value] = style.split(\":\");\n styleMap.set(key.trim(), value?.trim());\n });\n return styleMap;\n}, \"styles2Map\");\nvar isLabelStyle = /* @__PURE__ */ __name((key) => {\n return key === \"color\" || key === \"font-size\" || key === \"font-family\" || key === \"font-weight\" || key === \"font-style\" || key === \"text-decoration\" || key === \"text-align\" || key === \"text-transform\" || key === \"line-height\" || key === \"letter-spacing\" || key === \"word-spacing\" || key === \"text-shadow\" || key === \"text-overflow\" || key === \"white-space\" || key === \"word-wrap\" || key === \"word-break\" || key === \"overflow-wrap\" || key === \"hyphens\";\n}, \"isLabelStyle\");\nvar styles2String = /* @__PURE__ */ __name((node) => {\n const { stylesArray } = compileStyles(node);\n const labelStyles = [];\n const nodeStyles = [];\n const borderStyles = [];\n const backgroundStyles = [];\n stylesArray.forEach((style) => {\n const key = style[0];\n if (isLabelStyle(key)) {\n labelStyles.push(style.join(\":\") + \" !important\");\n } else {\n nodeStyles.push(style.join(\":\") + \" !important\");\n if (key.includes(\"stroke\")) {\n borderStyles.push(style.join(\":\") + \" !important\");\n }\n if (key === \"fill\") {\n backgroundStyles.push(style.join(\":\") + \" !important\");\n }\n }\n });\n return {\n labelStyles: labelStyles.join(\";\"),\n nodeStyles: nodeStyles.join(\";\"),\n stylesArray,\n borderStyles,\n backgroundStyles\n };\n}, \"styles2String\");\nvar userNodeOverrides = /* @__PURE__ */ __name((node, options) => {\n const { themeVariables, handDrawnSeed } = getConfig();\n const { nodeBorder, mainBkg } = themeVariables;\n const { stylesMap } = compileStyles(node);\n const result = Object.assign(\n {\n roughness: 0.7,\n fill: stylesMap.get(\"fill\") || mainBkg,\n fillStyle: \"hachure\",\n // solid fill\n fillWeight: 4,\n hachureGap: 5.2,\n stroke: stylesMap.get(\"stroke\") || nodeBorder,\n seed: handDrawnSeed,\n strokeWidth: stylesMap.get(\"stroke-width\")?.replace(\"px\", \"\") || 1.3,\n fillLineDash: [0, 0],\n strokeLineDash: getStrokeDashArray(stylesMap.get(\"stroke-dasharray\"))\n },\n options\n );\n return result;\n}, \"userNodeOverrides\");\nvar getStrokeDashArray = /* @__PURE__ */ __name((strokeDasharrayStyle) => {\n if (!strokeDasharrayStyle) {\n return [0, 0];\n }\n const dashArray = strokeDasharrayStyle.trim().split(/\\s+/).map(Number);\n if (dashArray.length === 1) {\n const val = isNaN(dashArray[0]) ? 0 : dashArray[0];\n return [val, val];\n }\n const first = isNaN(dashArray[0]) ? 0 : dashArray[0];\n const second = isNaN(dashArray[1]) ? 0 : dashArray[1];\n return [first, second];\n}, \"getStrokeDashArray\");\n\nexport {\n solidStateFill,\n compileStyles,\n isLabelStyle,\n styles2String,\n userNodeOverrides\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAQA,IAAI,iBAAiC,uBAAO,CAAC,UAAU;AACrD,QAAM,EAAE,cAAc,IAAI,WAAU;AACpC,SAAO;AAAA,IACL,MAAM;AAAA,IACN,cAAc;AAAA;AAAA,IAEd,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,MAAM;AAAA,EACR;AACF,GAAG,gBAAgB;AACnB,IAAI,gBAAgC,uBAAO,CAAC,SAAS;AACnD,QAAM,YAAY,WAAW;AAAA,IAC3B,GAAG,KAAK,qBAAqB,CAAC;AAAA,IAC9B,GAAG,KAAK,aAAa,CAAC;AAAA,IACtB,GAAG,KAAK,cAAc,CAAC;AAAA,EACzB,CAAC;AACD,SAAO,EAAE,WAAW,aAAa,CAAC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