@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,1050 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createLabel_default
|
|
3
|
+
} from "./chunk-BM2KPNFW.js";
|
|
4
|
+
import {
|
|
5
|
+
at
|
|
6
|
+
} from "./chunk-6LYV7PBV.js";
|
|
7
|
+
import {
|
|
8
|
+
isLabelStyle,
|
|
9
|
+
styles2String
|
|
10
|
+
} from "./chunk-5YJCJF2C.js";
|
|
11
|
+
import {
|
|
12
|
+
computeLabelTransform,
|
|
13
|
+
getLineFunctionsWithOffset,
|
|
14
|
+
markerOffsets,
|
|
15
|
+
markerOffsets2
|
|
16
|
+
} from "./chunk-NW4YG3NS.js";
|
|
17
|
+
import {
|
|
18
|
+
getSubGraphTitleMargins
|
|
19
|
+
} from "./chunk-5PZT7VUU.js";
|
|
20
|
+
import {
|
|
21
|
+
createText
|
|
22
|
+
} from "./chunk-OGMSNDVH.js";
|
|
23
|
+
import {
|
|
24
|
+
handleUndefinedAttr,
|
|
25
|
+
utils_default
|
|
26
|
+
} from "./chunk-UVRE3R6A.js";
|
|
27
|
+
import {
|
|
28
|
+
getConfig,
|
|
29
|
+
getConfig2,
|
|
30
|
+
getEffectiveHtmlLabels
|
|
31
|
+
} from "./chunk-7NZMPQDX.js";
|
|
32
|
+
import {
|
|
33
|
+
__name,
|
|
34
|
+
basis_default,
|
|
35
|
+
bumpX,
|
|
36
|
+
bumpY,
|
|
37
|
+
cardinal_default,
|
|
38
|
+
catmullRom_default,
|
|
39
|
+
line_default,
|
|
40
|
+
linear_default,
|
|
41
|
+
log,
|
|
42
|
+
monotoneX,
|
|
43
|
+
monotoneY,
|
|
44
|
+
natural_default,
|
|
45
|
+
select_default,
|
|
46
|
+
stepAfter,
|
|
47
|
+
stepBefore,
|
|
48
|
+
step_default
|
|
49
|
+
} from "./chunk-CZHJHAOR.js";
|
|
50
|
+
|
|
51
|
+
// ../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ENJZ2VHE.mjs
|
|
52
|
+
var addEdgeMarkers = /* @__PURE__ */ __name((svgPath, edge, url, id, diagramType, useMargin = false, strokeColor) => {
|
|
53
|
+
if (edge.arrowTypeStart) {
|
|
54
|
+
addEdgeMarker(
|
|
55
|
+
svgPath,
|
|
56
|
+
"start",
|
|
57
|
+
edge.arrowTypeStart,
|
|
58
|
+
url,
|
|
59
|
+
id,
|
|
60
|
+
diagramType,
|
|
61
|
+
useMargin,
|
|
62
|
+
strokeColor
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
if (edge.arrowTypeEnd) {
|
|
66
|
+
addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType, useMargin, strokeColor);
|
|
67
|
+
}
|
|
68
|
+
}, "addEdgeMarkers");
|
|
69
|
+
var arrowTypesMap = {
|
|
70
|
+
arrow_cross: { type: "cross", fill: false },
|
|
71
|
+
arrow_point: { type: "point", fill: true },
|
|
72
|
+
arrow_barb: { type: "barb", fill: true },
|
|
73
|
+
arrow_barb_neo: { type: "barb", fill: true },
|
|
74
|
+
arrow_circle: { type: "circle", fill: false },
|
|
75
|
+
aggregation: { type: "aggregation", fill: false },
|
|
76
|
+
extension: { type: "extension", fill: false },
|
|
77
|
+
composition: { type: "composition", fill: true },
|
|
78
|
+
dependency: { type: "dependency", fill: true },
|
|
79
|
+
lollipop: { type: "lollipop", fill: false },
|
|
80
|
+
only_one: { type: "onlyOne", fill: false },
|
|
81
|
+
zero_or_one: { type: "zeroOrOne", fill: false },
|
|
82
|
+
one_or_more: { type: "oneOrMore", fill: false },
|
|
83
|
+
zero_or_more: { type: "zeroOrMore", fill: false },
|
|
84
|
+
requirement_arrow: { type: "requirement_arrow", fill: false },
|
|
85
|
+
requirement_contains: { type: "requirement_contains", fill: false }
|
|
86
|
+
};
|
|
87
|
+
var arrowTypesWithMarginSupport = [
|
|
88
|
+
"cross",
|
|
89
|
+
"point",
|
|
90
|
+
"circle",
|
|
91
|
+
"lollipop",
|
|
92
|
+
"aggregation",
|
|
93
|
+
"extension",
|
|
94
|
+
"composition",
|
|
95
|
+
"dependency",
|
|
96
|
+
"barb"
|
|
97
|
+
];
|
|
98
|
+
var addEdgeMarker = /* @__PURE__ */ __name((svgPath, position, arrowType, url, id, diagramType, useMargin = false, strokeColor) => {
|
|
99
|
+
const arrowTypeInfo = arrowTypesMap[arrowType];
|
|
100
|
+
const marginSupport = arrowTypeInfo && arrowTypesWithMarginSupport.includes(arrowTypeInfo.type);
|
|
101
|
+
if (!arrowTypeInfo) {
|
|
102
|
+
log.warn(`Unknown arrow type: ${arrowType}`);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const endMarkerType = arrowTypeInfo.type;
|
|
106
|
+
const suffix = position === "start" ? "Start" : "End";
|
|
107
|
+
const offset = useMargin && marginSupport ? "-margin" : "";
|
|
108
|
+
const originalMarkerId = `${id}_${diagramType}-${endMarkerType}${suffix}${offset}`;
|
|
109
|
+
if (strokeColor && strokeColor.trim() !== "") {
|
|
110
|
+
const colorId = strokeColor.replace(/[^\dA-Za-z]/g, "_");
|
|
111
|
+
const coloredMarkerId = `${originalMarkerId}_${colorId}`;
|
|
112
|
+
if (!document.getElementById(coloredMarkerId)) {
|
|
113
|
+
const originalMarker = document.getElementById(originalMarkerId);
|
|
114
|
+
if (originalMarker) {
|
|
115
|
+
const coloredMarker = originalMarker.cloneNode(true);
|
|
116
|
+
coloredMarker.id = coloredMarkerId;
|
|
117
|
+
const paths = coloredMarker.querySelectorAll("path, circle, line");
|
|
118
|
+
paths.forEach((path) => {
|
|
119
|
+
path.setAttribute("stroke", strokeColor);
|
|
120
|
+
if (arrowTypeInfo.fill) {
|
|
121
|
+
path.setAttribute("fill", strokeColor);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
originalMarker.parentNode?.appendChild(coloredMarker);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
svgPath.attr(`marker-${position}`, `url(${url}#${coloredMarkerId})`);
|
|
128
|
+
} else {
|
|
129
|
+
svgPath.attr(`marker-${position}`, `url(${url}#${originalMarkerId})`);
|
|
130
|
+
}
|
|
131
|
+
}, "addEdgeMarker");
|
|
132
|
+
var resolveEdgeCurveType = /* @__PURE__ */ __name((edgeCurve) => {
|
|
133
|
+
return typeof edgeCurve === "string" ? edgeCurve : getConfig2()?.flowchart?.curve;
|
|
134
|
+
}, "resolveEdgeCurveType");
|
|
135
|
+
var edgeLabels = /* @__PURE__ */ new Map();
|
|
136
|
+
var terminalLabels = /* @__PURE__ */ new Map();
|
|
137
|
+
var clear = /* @__PURE__ */ __name(() => {
|
|
138
|
+
edgeLabels.clear();
|
|
139
|
+
terminalLabels.clear();
|
|
140
|
+
}, "clear");
|
|
141
|
+
var getLabelStyles = /* @__PURE__ */ __name((styleArray) => {
|
|
142
|
+
if (!styleArray) {
|
|
143
|
+
return "";
|
|
144
|
+
}
|
|
145
|
+
if (typeof styleArray === "string") {
|
|
146
|
+
return styleArray;
|
|
147
|
+
}
|
|
148
|
+
return styleArray.reduce((acc, style) => acc + ";" + style, "");
|
|
149
|
+
}, "getLabelStyles");
|
|
150
|
+
var insertEdgeLabel = /* @__PURE__ */ __name(async (elem, edge) => {
|
|
151
|
+
const config = getConfig2();
|
|
152
|
+
let useHtmlLabels = getEffectiveHtmlLabels(config);
|
|
153
|
+
const { labelStyles } = styles2String(edge);
|
|
154
|
+
edge.labelStyle = labelStyles;
|
|
155
|
+
const edgeLabel = elem.insert("g").attr("class", "edgeLabel");
|
|
156
|
+
const label = edgeLabel.insert("g").attr("class", "label").attr("data-id", edge.id);
|
|
157
|
+
const isMarkdown = edge.labelType === "markdown";
|
|
158
|
+
const markdownWidth = void 0;
|
|
159
|
+
const labelElement = await createText(
|
|
160
|
+
elem,
|
|
161
|
+
edge.label,
|
|
162
|
+
{
|
|
163
|
+
style: getLabelStyles(edge.labelStyle),
|
|
164
|
+
useHtmlLabels,
|
|
165
|
+
addSvgBackground: true,
|
|
166
|
+
isNode: false,
|
|
167
|
+
markdown: isMarkdown,
|
|
168
|
+
// Plain text edge labels should auto-wrap, markdown edge labels respect markdownAutoWrap config
|
|
169
|
+
width: isMarkdown ? markdownWidth : void 0
|
|
170
|
+
},
|
|
171
|
+
config
|
|
172
|
+
);
|
|
173
|
+
label.node().appendChild(labelElement);
|
|
174
|
+
log.info("abc82", edge, edge.labelType);
|
|
175
|
+
let bbox = labelElement.getBBox();
|
|
176
|
+
let transformBbox = bbox;
|
|
177
|
+
if (useHtmlLabels) {
|
|
178
|
+
const div = labelElement.children[0];
|
|
179
|
+
const dv = select_default(labelElement);
|
|
180
|
+
bbox = div.getBoundingClientRect();
|
|
181
|
+
transformBbox = bbox;
|
|
182
|
+
dv.attr("width", bbox.width);
|
|
183
|
+
dv.attr("height", bbox.height);
|
|
184
|
+
} else {
|
|
185
|
+
const textEl = select_default(labelElement).select("text").node();
|
|
186
|
+
if (textEl && typeof textEl.getBBox === "function") {
|
|
187
|
+
transformBbox = textEl.getBBox();
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
label.attr("transform", computeLabelTransform(transformBbox, useHtmlLabels));
|
|
191
|
+
edgeLabels.set(edge.id, edgeLabel);
|
|
192
|
+
edge.width = bbox.width;
|
|
193
|
+
edge.height = bbox.height;
|
|
194
|
+
let fo;
|
|
195
|
+
if (edge.startLabelLeft) {
|
|
196
|
+
const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals");
|
|
197
|
+
const inner = startEdgeLabelLeft.insert("g").attr("class", "inner");
|
|
198
|
+
const startLabelElement = await createLabel_default(
|
|
199
|
+
inner,
|
|
200
|
+
edge.startLabelLeft,
|
|
201
|
+
getLabelStyles(edge.labelStyle) || "",
|
|
202
|
+
false,
|
|
203
|
+
false
|
|
204
|
+
);
|
|
205
|
+
fo = startLabelElement;
|
|
206
|
+
let slBox = startLabelElement.getBBox();
|
|
207
|
+
if (useHtmlLabels) {
|
|
208
|
+
const div = startLabelElement.children[0];
|
|
209
|
+
const dv = select_default(startLabelElement);
|
|
210
|
+
slBox = div.getBoundingClientRect();
|
|
211
|
+
dv.attr("width", slBox.width);
|
|
212
|
+
dv.attr("height", slBox.height);
|
|
213
|
+
}
|
|
214
|
+
inner.attr("transform", computeLabelTransform(slBox, useHtmlLabels));
|
|
215
|
+
if (!terminalLabels.get(edge.id)) {
|
|
216
|
+
terminalLabels.set(edge.id, {});
|
|
217
|
+
}
|
|
218
|
+
terminalLabels.get(edge.id).startLeft = startEdgeLabelLeft;
|
|
219
|
+
setTerminalWidth(fo, edge.startLabelLeft);
|
|
220
|
+
}
|
|
221
|
+
if (edge.startLabelRight) {
|
|
222
|
+
const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals");
|
|
223
|
+
const inner = startEdgeLabelRight.insert("g").attr("class", "inner");
|
|
224
|
+
const startLabelElement = await createLabel_default(
|
|
225
|
+
inner,
|
|
226
|
+
edge.startLabelRight,
|
|
227
|
+
getLabelStyles(edge.labelStyle) || "",
|
|
228
|
+
false,
|
|
229
|
+
false
|
|
230
|
+
);
|
|
231
|
+
fo = startLabelElement;
|
|
232
|
+
inner.node().appendChild(startLabelElement);
|
|
233
|
+
let slBox = startLabelElement.getBBox();
|
|
234
|
+
if (useHtmlLabels) {
|
|
235
|
+
const div = startLabelElement.children[0];
|
|
236
|
+
const dv = select_default(startLabelElement);
|
|
237
|
+
slBox = div.getBoundingClientRect();
|
|
238
|
+
dv.attr("width", slBox.width);
|
|
239
|
+
dv.attr("height", slBox.height);
|
|
240
|
+
}
|
|
241
|
+
inner.attr("transform", computeLabelTransform(slBox, useHtmlLabels));
|
|
242
|
+
if (!terminalLabels.get(edge.id)) {
|
|
243
|
+
terminalLabels.set(edge.id, {});
|
|
244
|
+
}
|
|
245
|
+
terminalLabels.get(edge.id).startRight = startEdgeLabelRight;
|
|
246
|
+
setTerminalWidth(fo, edge.startLabelRight);
|
|
247
|
+
}
|
|
248
|
+
if (edge.endLabelLeft) {
|
|
249
|
+
const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals");
|
|
250
|
+
const inner = endEdgeLabelLeft.insert("g").attr("class", "inner");
|
|
251
|
+
const endLabelElement = await createLabel_default(
|
|
252
|
+
inner,
|
|
253
|
+
edge.endLabelLeft,
|
|
254
|
+
getLabelStyles(edge.labelStyle) || "",
|
|
255
|
+
false,
|
|
256
|
+
false
|
|
257
|
+
);
|
|
258
|
+
fo = endLabelElement;
|
|
259
|
+
let slBox = endLabelElement.getBBox();
|
|
260
|
+
if (useHtmlLabels) {
|
|
261
|
+
const div = endLabelElement.children[0];
|
|
262
|
+
const dv = select_default(endLabelElement);
|
|
263
|
+
slBox = div.getBoundingClientRect();
|
|
264
|
+
dv.attr("width", slBox.width);
|
|
265
|
+
dv.attr("height", slBox.height);
|
|
266
|
+
}
|
|
267
|
+
inner.attr("transform", computeLabelTransform(slBox, useHtmlLabels));
|
|
268
|
+
endEdgeLabelLeft.node().appendChild(endLabelElement);
|
|
269
|
+
if (!terminalLabels.get(edge.id)) {
|
|
270
|
+
terminalLabels.set(edge.id, {});
|
|
271
|
+
}
|
|
272
|
+
terminalLabels.get(edge.id).endLeft = endEdgeLabelLeft;
|
|
273
|
+
setTerminalWidth(fo, edge.endLabelLeft);
|
|
274
|
+
}
|
|
275
|
+
if (edge.endLabelRight) {
|
|
276
|
+
const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals");
|
|
277
|
+
const inner = endEdgeLabelRight.insert("g").attr("class", "inner");
|
|
278
|
+
const endLabelElement = await createLabel_default(
|
|
279
|
+
inner,
|
|
280
|
+
edge.endLabelRight,
|
|
281
|
+
getLabelStyles(edge.labelStyle) || "",
|
|
282
|
+
false,
|
|
283
|
+
false
|
|
284
|
+
);
|
|
285
|
+
fo = endLabelElement;
|
|
286
|
+
let slBox = endLabelElement.getBBox();
|
|
287
|
+
if (useHtmlLabels) {
|
|
288
|
+
const div = endLabelElement.children[0];
|
|
289
|
+
const dv = select_default(endLabelElement);
|
|
290
|
+
slBox = div.getBoundingClientRect();
|
|
291
|
+
dv.attr("width", slBox.width);
|
|
292
|
+
dv.attr("height", slBox.height);
|
|
293
|
+
}
|
|
294
|
+
inner.attr("transform", computeLabelTransform(slBox, useHtmlLabels));
|
|
295
|
+
endEdgeLabelRight.node().appendChild(endLabelElement);
|
|
296
|
+
if (!terminalLabels.get(edge.id)) {
|
|
297
|
+
terminalLabels.set(edge.id, {});
|
|
298
|
+
}
|
|
299
|
+
terminalLabels.get(edge.id).endRight = endEdgeLabelRight;
|
|
300
|
+
setTerminalWidth(fo, edge.endLabelRight);
|
|
301
|
+
}
|
|
302
|
+
return labelElement;
|
|
303
|
+
}, "insertEdgeLabel");
|
|
304
|
+
function setTerminalWidth(fo, value) {
|
|
305
|
+
if (getEffectiveHtmlLabels(getConfig2()) && fo) {
|
|
306
|
+
fo.style.width = value.length * 9 + "px";
|
|
307
|
+
fo.style.height = "12px";
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
__name(setTerminalWidth, "setTerminalWidth");
|
|
311
|
+
var positionEdgeLabel = /* @__PURE__ */ __name((edge, paths) => {
|
|
312
|
+
log.debug("Moving label abc88 ", edge.id, edge.label, edgeLabels.get(edge.id), paths);
|
|
313
|
+
let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;
|
|
314
|
+
const siteConfig = getConfig2();
|
|
315
|
+
const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);
|
|
316
|
+
if (edge.label) {
|
|
317
|
+
const el = edgeLabels.get(edge.id);
|
|
318
|
+
let x = edge.x;
|
|
319
|
+
let y = edge.y;
|
|
320
|
+
if (path) {
|
|
321
|
+
const pos = utils_default.calcLabelPosition(path);
|
|
322
|
+
log.debug(
|
|
323
|
+
"Moving label " + edge.label + " from (",
|
|
324
|
+
x,
|
|
325
|
+
",",
|
|
326
|
+
y,
|
|
327
|
+
") to (",
|
|
328
|
+
pos.x,
|
|
329
|
+
",",
|
|
330
|
+
pos.y,
|
|
331
|
+
") abc88"
|
|
332
|
+
);
|
|
333
|
+
if (paths.updatedPath) {
|
|
334
|
+
x = pos.x;
|
|
335
|
+
y = pos.y;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
el.attr("transform", `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`);
|
|
339
|
+
}
|
|
340
|
+
if (edge.startLabelLeft) {
|
|
341
|
+
const el = terminalLabels.get(edge.id).startLeft;
|
|
342
|
+
let x = edge.x;
|
|
343
|
+
let y = edge.y;
|
|
344
|
+
if (path) {
|
|
345
|
+
const pos = utils_default.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path);
|
|
346
|
+
x = pos.x;
|
|
347
|
+
y = pos.y;
|
|
348
|
+
}
|
|
349
|
+
el.attr("transform", `translate(${x}, ${y})`);
|
|
350
|
+
}
|
|
351
|
+
if (edge.startLabelRight) {
|
|
352
|
+
const el = terminalLabels.get(edge.id).startRight;
|
|
353
|
+
let x = edge.x;
|
|
354
|
+
let y = edge.y;
|
|
355
|
+
if (path) {
|
|
356
|
+
const pos = utils_default.calcTerminalLabelPosition(
|
|
357
|
+
edge.arrowTypeStart ? 10 : 0,
|
|
358
|
+
"start_right",
|
|
359
|
+
path
|
|
360
|
+
);
|
|
361
|
+
x = pos.x;
|
|
362
|
+
y = pos.y;
|
|
363
|
+
}
|
|
364
|
+
el.attr("transform", `translate(${x}, ${y})`);
|
|
365
|
+
}
|
|
366
|
+
if (edge.endLabelLeft) {
|
|
367
|
+
const el = terminalLabels.get(edge.id).endLeft;
|
|
368
|
+
let x = edge.x;
|
|
369
|
+
let y = edge.y;
|
|
370
|
+
if (path) {
|
|
371
|
+
const pos = utils_default.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path);
|
|
372
|
+
x = pos.x;
|
|
373
|
+
y = pos.y;
|
|
374
|
+
}
|
|
375
|
+
el.attr("transform", `translate(${x}, ${y})`);
|
|
376
|
+
}
|
|
377
|
+
if (edge.endLabelRight) {
|
|
378
|
+
const el = terminalLabels.get(edge.id).endRight;
|
|
379
|
+
let x = edge.x;
|
|
380
|
+
let y = edge.y;
|
|
381
|
+
if (path) {
|
|
382
|
+
const pos = utils_default.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path);
|
|
383
|
+
x = pos.x;
|
|
384
|
+
y = pos.y;
|
|
385
|
+
}
|
|
386
|
+
el.attr("transform", `translate(${x}, ${y})`);
|
|
387
|
+
}
|
|
388
|
+
}, "positionEdgeLabel");
|
|
389
|
+
var outsideNode = /* @__PURE__ */ __name((node, point2) => {
|
|
390
|
+
const x = node.x;
|
|
391
|
+
const y = node.y;
|
|
392
|
+
const dx = Math.abs(point2.x - x);
|
|
393
|
+
const dy = Math.abs(point2.y - y);
|
|
394
|
+
const w = node.width / 2;
|
|
395
|
+
const h = node.height / 2;
|
|
396
|
+
return dx >= w || dy >= h;
|
|
397
|
+
}, "outsideNode");
|
|
398
|
+
var intersection = /* @__PURE__ */ __name((node, outsidePoint, insidePoint) => {
|
|
399
|
+
log.debug(`intersection calc abc89:
|
|
400
|
+
outsidePoint: ${JSON.stringify(outsidePoint)}
|
|
401
|
+
insidePoint : ${JSON.stringify(insidePoint)}
|
|
402
|
+
node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);
|
|
403
|
+
const x = node.x;
|
|
404
|
+
const y = node.y;
|
|
405
|
+
const dx = Math.abs(x - insidePoint.x);
|
|
406
|
+
const w = node.width / 2;
|
|
407
|
+
let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;
|
|
408
|
+
const h = node.height / 2;
|
|
409
|
+
const Q = Math.abs(outsidePoint.y - insidePoint.y);
|
|
410
|
+
const R = Math.abs(outsidePoint.x - insidePoint.x);
|
|
411
|
+
if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {
|
|
412
|
+
let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;
|
|
413
|
+
r = R * q / Q;
|
|
414
|
+
const res = {
|
|
415
|
+
x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,
|
|
416
|
+
y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q
|
|
417
|
+
};
|
|
418
|
+
if (r === 0) {
|
|
419
|
+
res.x = outsidePoint.x;
|
|
420
|
+
res.y = outsidePoint.y;
|
|
421
|
+
}
|
|
422
|
+
if (R === 0) {
|
|
423
|
+
res.x = outsidePoint.x;
|
|
424
|
+
}
|
|
425
|
+
if (Q === 0) {
|
|
426
|
+
res.y = outsidePoint.y;
|
|
427
|
+
}
|
|
428
|
+
log.debug(`abc89 top/bottom calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);
|
|
429
|
+
return res;
|
|
430
|
+
} else {
|
|
431
|
+
if (insidePoint.x < outsidePoint.x) {
|
|
432
|
+
r = outsidePoint.x - w - x;
|
|
433
|
+
} else {
|
|
434
|
+
r = x - w - outsidePoint.x;
|
|
435
|
+
}
|
|
436
|
+
let q = Q * r / R;
|
|
437
|
+
let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;
|
|
438
|
+
let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;
|
|
439
|
+
log.debug(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y });
|
|
440
|
+
if (r === 0) {
|
|
441
|
+
_x = outsidePoint.x;
|
|
442
|
+
_y = outsidePoint.y;
|
|
443
|
+
}
|
|
444
|
+
if (R === 0) {
|
|
445
|
+
_x = outsidePoint.x;
|
|
446
|
+
}
|
|
447
|
+
if (Q === 0) {
|
|
448
|
+
_y = outsidePoint.y;
|
|
449
|
+
}
|
|
450
|
+
return { x: _x, y: _y };
|
|
451
|
+
}
|
|
452
|
+
}, "intersection");
|
|
453
|
+
var cutPathAtIntersect = /* @__PURE__ */ __name((_points, boundaryNode) => {
|
|
454
|
+
log.warn("abc88 cutPathAtIntersect", _points, boundaryNode);
|
|
455
|
+
let points = [];
|
|
456
|
+
let lastPointOutside = _points[0];
|
|
457
|
+
let isInside = false;
|
|
458
|
+
_points.forEach((point2) => {
|
|
459
|
+
log.info("abc88 checking point", point2, boundaryNode);
|
|
460
|
+
if (!outsideNode(boundaryNode, point2) && !isInside) {
|
|
461
|
+
const inter = intersection(boundaryNode, lastPointOutside, point2);
|
|
462
|
+
log.debug("abc88 inside", point2, lastPointOutside, inter);
|
|
463
|
+
log.debug("abc88 intersection", inter, boundaryNode);
|
|
464
|
+
let pointPresent = false;
|
|
465
|
+
points.forEach((p) => {
|
|
466
|
+
pointPresent = pointPresent || p.x === inter.x && p.y === inter.y;
|
|
467
|
+
});
|
|
468
|
+
if (!points.some((e) => e.x === inter.x && e.y === inter.y)) {
|
|
469
|
+
points.push(inter);
|
|
470
|
+
} else {
|
|
471
|
+
log.warn("abc88 no intersect", inter, points);
|
|
472
|
+
}
|
|
473
|
+
isInside = true;
|
|
474
|
+
} else {
|
|
475
|
+
log.warn("abc88 outside", point2, lastPointOutside);
|
|
476
|
+
lastPointOutside = point2;
|
|
477
|
+
if (!isInside) {
|
|
478
|
+
points.push(point2);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
});
|
|
482
|
+
log.debug("returning points", points);
|
|
483
|
+
return points;
|
|
484
|
+
}, "cutPathAtIntersect");
|
|
485
|
+
function extractCornerPoints(points) {
|
|
486
|
+
const cornerPoints = [];
|
|
487
|
+
const cornerPointPositions = [];
|
|
488
|
+
for (let i = 1; i < points.length - 1; i++) {
|
|
489
|
+
const prev = points[i - 1];
|
|
490
|
+
const curr = points[i];
|
|
491
|
+
const next = points[i + 1];
|
|
492
|
+
if (prev.x === curr.x && curr.y === next.y && Math.abs(curr.x - next.x) > 5 && Math.abs(curr.y - prev.y) > 5) {
|
|
493
|
+
cornerPoints.push(curr);
|
|
494
|
+
cornerPointPositions.push(i);
|
|
495
|
+
} else if (prev.y === curr.y && curr.x === next.x && Math.abs(curr.x - prev.x) > 5 && Math.abs(curr.y - next.y) > 5) {
|
|
496
|
+
cornerPoints.push(curr);
|
|
497
|
+
cornerPointPositions.push(i);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
return { cornerPoints, cornerPointPositions };
|
|
501
|
+
}
|
|
502
|
+
__name(extractCornerPoints, "extractCornerPoints");
|
|
503
|
+
var findAdjacentPoint = /* @__PURE__ */ __name(function(pointA, pointB, distance) {
|
|
504
|
+
const xDiff = pointB.x - pointA.x;
|
|
505
|
+
const yDiff = pointB.y - pointA.y;
|
|
506
|
+
const length = Math.sqrt(xDiff * xDiff + yDiff * yDiff);
|
|
507
|
+
const ratio = distance / length;
|
|
508
|
+
return { x: pointB.x - ratio * xDiff, y: pointB.y - ratio * yDiff };
|
|
509
|
+
}, "findAdjacentPoint");
|
|
510
|
+
var fixCorners = /* @__PURE__ */ __name(function(lineData) {
|
|
511
|
+
const { cornerPointPositions } = extractCornerPoints(lineData);
|
|
512
|
+
const newLineData = [];
|
|
513
|
+
for (let i = 0; i < lineData.length; i++) {
|
|
514
|
+
if (cornerPointPositions.includes(i)) {
|
|
515
|
+
const prevPoint = lineData[i - 1];
|
|
516
|
+
const nextPoint = lineData[i + 1];
|
|
517
|
+
const cornerPoint = lineData[i];
|
|
518
|
+
const newPrevPoint = findAdjacentPoint(prevPoint, cornerPoint, 5);
|
|
519
|
+
const newNextPoint = findAdjacentPoint(nextPoint, cornerPoint, 5);
|
|
520
|
+
const xDiff = newNextPoint.x - newPrevPoint.x;
|
|
521
|
+
const yDiff = newNextPoint.y - newPrevPoint.y;
|
|
522
|
+
newLineData.push(newPrevPoint);
|
|
523
|
+
const a = Math.sqrt(2) * 2;
|
|
524
|
+
let newCornerPoint = { x: cornerPoint.x, y: cornerPoint.y };
|
|
525
|
+
if (Math.abs(nextPoint.x - prevPoint.x) > 10 && Math.abs(nextPoint.y - prevPoint.y) >= 10) {
|
|
526
|
+
log.debug(
|
|
527
|
+
"Corner point fixing",
|
|
528
|
+
Math.abs(nextPoint.x - prevPoint.x),
|
|
529
|
+
Math.abs(nextPoint.y - prevPoint.y)
|
|
530
|
+
);
|
|
531
|
+
const r = 5;
|
|
532
|
+
if (cornerPoint.x === newPrevPoint.x) {
|
|
533
|
+
newCornerPoint = {
|
|
534
|
+
x: xDiff < 0 ? newPrevPoint.x - r + a : newPrevPoint.x + r - a,
|
|
535
|
+
y: yDiff < 0 ? newPrevPoint.y - a : newPrevPoint.y + a
|
|
536
|
+
};
|
|
537
|
+
} else {
|
|
538
|
+
newCornerPoint = {
|
|
539
|
+
x: xDiff < 0 ? newPrevPoint.x - a : newPrevPoint.x + a,
|
|
540
|
+
y: yDiff < 0 ? newPrevPoint.y - r + a : newPrevPoint.y + r - a
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
} else {
|
|
544
|
+
log.debug(
|
|
545
|
+
"Corner point skipping fixing",
|
|
546
|
+
Math.abs(nextPoint.x - prevPoint.x),
|
|
547
|
+
Math.abs(nextPoint.y - prevPoint.y)
|
|
548
|
+
);
|
|
549
|
+
}
|
|
550
|
+
newLineData.push(newCornerPoint, newNextPoint);
|
|
551
|
+
} else {
|
|
552
|
+
newLineData.push(lineData[i]);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
return newLineData;
|
|
556
|
+
}, "fixCorners");
|
|
557
|
+
var generateDashArray = /* @__PURE__ */ __name((len, oValueS, oValueE) => {
|
|
558
|
+
const middleLength = len - oValueS - oValueE;
|
|
559
|
+
const dashLength = 2;
|
|
560
|
+
const gapLength = 2;
|
|
561
|
+
const dashGapPairLength = dashLength + gapLength;
|
|
562
|
+
const numberOfPairs = Math.floor(middleLength / dashGapPairLength);
|
|
563
|
+
const middlePattern = Array(numberOfPairs).fill(`${dashLength} ${gapLength}`).join(" ");
|
|
564
|
+
const dashArray = `0 ${oValueS} ${middlePattern} ${oValueE}`;
|
|
565
|
+
return dashArray;
|
|
566
|
+
}, "generateDashArray");
|
|
567
|
+
var insertEdge = /* @__PURE__ */ __name(function(elem, edge, clusterDb, diagramType, startNode, endNode, diagramId, skipIntersect = false) {
|
|
568
|
+
if (!diagramId) {
|
|
569
|
+
throw new Error(
|
|
570
|
+
`insertEdge: missing diagramId for edge "${edge.id}" \u2014 edge IDs require a diagram prefix for uniqueness`
|
|
571
|
+
);
|
|
572
|
+
}
|
|
573
|
+
const { handDrawnSeed } = getConfig2();
|
|
574
|
+
let points = edge.points;
|
|
575
|
+
let pointsHasChanged = false;
|
|
576
|
+
const tail = startNode;
|
|
577
|
+
var head = endNode;
|
|
578
|
+
const edgeClassStyles = [];
|
|
579
|
+
for (const key in edge.cssCompiledStyles) {
|
|
580
|
+
if (isLabelStyle(key)) {
|
|
581
|
+
continue;
|
|
582
|
+
}
|
|
583
|
+
edgeClassStyles.push(edge.cssCompiledStyles[key]);
|
|
584
|
+
}
|
|
585
|
+
log.debug("UIO intersect check", edge.points, head.x, tail.x);
|
|
586
|
+
if (head.intersect && tail.intersect && !skipIntersect) {
|
|
587
|
+
points = points.slice(1, edge.points.length - 1);
|
|
588
|
+
points.unshift(tail.intersect(points[0]));
|
|
589
|
+
log.debug(
|
|
590
|
+
"Last point UIO",
|
|
591
|
+
edge.start,
|
|
592
|
+
"-->",
|
|
593
|
+
edge.end,
|
|
594
|
+
points[points.length - 1],
|
|
595
|
+
head,
|
|
596
|
+
head.intersect(points[points.length - 1])
|
|
597
|
+
);
|
|
598
|
+
points.push(head.intersect(points[points.length - 1]));
|
|
599
|
+
}
|
|
600
|
+
const pointsStr = btoa(JSON.stringify(points));
|
|
601
|
+
if (edge.toCluster) {
|
|
602
|
+
log.info("to cluster abc88", clusterDb.get(edge.toCluster));
|
|
603
|
+
points = cutPathAtIntersect(edge.points, clusterDb.get(edge.toCluster).node);
|
|
604
|
+
pointsHasChanged = true;
|
|
605
|
+
}
|
|
606
|
+
if (edge.fromCluster) {
|
|
607
|
+
log.debug(
|
|
608
|
+
"from cluster abc88",
|
|
609
|
+
clusterDb.get(edge.fromCluster),
|
|
610
|
+
JSON.stringify(points, null, 2)
|
|
611
|
+
);
|
|
612
|
+
points = cutPathAtIntersect(points.reverse(), clusterDb.get(edge.fromCluster).node).reverse();
|
|
613
|
+
pointsHasChanged = true;
|
|
614
|
+
}
|
|
615
|
+
let lineData = points.filter((p) => !Number.isNaN(p.y));
|
|
616
|
+
const edgeCurveType = resolveEdgeCurveType(edge.curve);
|
|
617
|
+
if (edgeCurveType !== "rounded") {
|
|
618
|
+
lineData = fixCorners(lineData);
|
|
619
|
+
}
|
|
620
|
+
let curve = linear_default;
|
|
621
|
+
switch (edgeCurveType) {
|
|
622
|
+
case "linear":
|
|
623
|
+
curve = linear_default;
|
|
624
|
+
break;
|
|
625
|
+
case "basis":
|
|
626
|
+
curve = basis_default;
|
|
627
|
+
break;
|
|
628
|
+
case "cardinal":
|
|
629
|
+
curve = cardinal_default;
|
|
630
|
+
break;
|
|
631
|
+
case "bumpX":
|
|
632
|
+
curve = bumpX;
|
|
633
|
+
break;
|
|
634
|
+
case "bumpY":
|
|
635
|
+
curve = bumpY;
|
|
636
|
+
break;
|
|
637
|
+
case "catmullRom":
|
|
638
|
+
curve = catmullRom_default;
|
|
639
|
+
break;
|
|
640
|
+
case "monotoneX":
|
|
641
|
+
curve = monotoneX;
|
|
642
|
+
break;
|
|
643
|
+
case "monotoneY":
|
|
644
|
+
curve = monotoneY;
|
|
645
|
+
break;
|
|
646
|
+
case "natural":
|
|
647
|
+
curve = natural_default;
|
|
648
|
+
break;
|
|
649
|
+
case "step":
|
|
650
|
+
curve = step_default;
|
|
651
|
+
break;
|
|
652
|
+
case "stepAfter":
|
|
653
|
+
curve = stepAfter;
|
|
654
|
+
break;
|
|
655
|
+
case "stepBefore":
|
|
656
|
+
curve = stepBefore;
|
|
657
|
+
break;
|
|
658
|
+
case "rounded":
|
|
659
|
+
curve = linear_default;
|
|
660
|
+
break;
|
|
661
|
+
default:
|
|
662
|
+
curve = basis_default;
|
|
663
|
+
}
|
|
664
|
+
const { x, y } = getLineFunctionsWithOffset(edge);
|
|
665
|
+
const lineFunction = line_default().x(x).y(y).curve(curve);
|
|
666
|
+
let strokeClasses;
|
|
667
|
+
switch (edge.thickness) {
|
|
668
|
+
case "normal":
|
|
669
|
+
strokeClasses = "edge-thickness-normal";
|
|
670
|
+
break;
|
|
671
|
+
case "thick":
|
|
672
|
+
strokeClasses = "edge-thickness-thick";
|
|
673
|
+
break;
|
|
674
|
+
case "invisible":
|
|
675
|
+
strokeClasses = "edge-thickness-invisible";
|
|
676
|
+
break;
|
|
677
|
+
default:
|
|
678
|
+
strokeClasses = "edge-thickness-normal";
|
|
679
|
+
}
|
|
680
|
+
switch (edge.pattern) {
|
|
681
|
+
case "solid":
|
|
682
|
+
strokeClasses += " edge-pattern-solid";
|
|
683
|
+
break;
|
|
684
|
+
case "dotted":
|
|
685
|
+
strokeClasses += " edge-pattern-dotted";
|
|
686
|
+
break;
|
|
687
|
+
case "dashed":
|
|
688
|
+
strokeClasses += " edge-pattern-dashed";
|
|
689
|
+
break;
|
|
690
|
+
default:
|
|
691
|
+
strokeClasses += " edge-pattern-solid";
|
|
692
|
+
}
|
|
693
|
+
let svgPath;
|
|
694
|
+
let linePath = edgeCurveType === "rounded" ? generateRoundedPath(applyMarkerOffsetsToPoints(lineData, edge), 5) : lineFunction(lineData);
|
|
695
|
+
const edgeStyles = Array.isArray(edge.style) ? edge.style : [edge.style];
|
|
696
|
+
let strokeColor = edgeStyles.find((style) => style?.startsWith("stroke:"));
|
|
697
|
+
let animationClass = "";
|
|
698
|
+
if (edge.animate) {
|
|
699
|
+
animationClass = "edge-animation-fast";
|
|
700
|
+
}
|
|
701
|
+
if (edge.animation) {
|
|
702
|
+
animationClass = "edge-animation-" + edge.animation;
|
|
703
|
+
}
|
|
704
|
+
let animatedEdge = false;
|
|
705
|
+
if (edge.look === "handDrawn") {
|
|
706
|
+
const rc = at.svg(elem);
|
|
707
|
+
Object.assign([], lineData);
|
|
708
|
+
const svgPathNode = rc.path(linePath, {
|
|
709
|
+
roughness: 0.3,
|
|
710
|
+
seed: handDrawnSeed
|
|
711
|
+
});
|
|
712
|
+
strokeClasses += " transition";
|
|
713
|
+
svgPath = select_default(svgPathNode).select("path").attr("id", `${diagramId}-${edge.id}`).attr(
|
|
714
|
+
"class",
|
|
715
|
+
" " + strokeClasses + (edge.classes ? " " + edge.classes : "") + (animationClass ? " " + animationClass : "")
|
|
716
|
+
).attr("style", edgeStyles ? edgeStyles.reduce((acc, style) => acc + ";" + style, "") : "");
|
|
717
|
+
let d = svgPath.attr("d");
|
|
718
|
+
svgPath.attr("d", d);
|
|
719
|
+
elem.node().appendChild(svgPath.node());
|
|
720
|
+
} else {
|
|
721
|
+
const stylesFromClasses = edgeClassStyles.join(";");
|
|
722
|
+
const styles = edgeStyles ? edgeStyles.reduce((acc, style) => acc + style + ";", "") : "";
|
|
723
|
+
const pathStyle = (stylesFromClasses ? stylesFromClasses + ";" + styles + ";" : styles) + ";" + (edgeStyles ? edgeStyles.reduce((acc, style) => acc + ";" + style, "") : "");
|
|
724
|
+
svgPath = elem.append("path").attr("d", linePath).attr("id", `${diagramId}-${edge.id}`).attr(
|
|
725
|
+
"class",
|
|
726
|
+
" " + strokeClasses + (edge.classes ? " " + edge.classes : "") + (animationClass ? " " + animationClass : "")
|
|
727
|
+
).attr("style", pathStyle);
|
|
728
|
+
strokeColor = pathStyle.match(/stroke:([^;]+)/)?.[1];
|
|
729
|
+
animatedEdge = edge.animate === true || !!edge.animation || stylesFromClasses.includes("animation");
|
|
730
|
+
const pathNode = svgPath.node();
|
|
731
|
+
const len = typeof pathNode.getTotalLength === "function" ? pathNode.getTotalLength() : 0;
|
|
732
|
+
const oValueS = markerOffsets2[edge.arrowTypeStart] || 0;
|
|
733
|
+
const oValueE = markerOffsets2[edge.arrowTypeEnd] || 0;
|
|
734
|
+
if (edge.look === "neo" && !animatedEdge) {
|
|
735
|
+
const dashArray = edge.pattern === "dotted" || edge.pattern === "dashed" ? generateDashArray(len, oValueS, oValueE) : `0 ${oValueS} ${len - oValueS - oValueE} ${oValueE}`;
|
|
736
|
+
const mOffset = `stroke-dasharray: ${dashArray}; stroke-dashoffset: 0;`;
|
|
737
|
+
svgPath.attr("style", mOffset + svgPath.attr("style"));
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
svgPath.attr("data-edge", true);
|
|
741
|
+
svgPath.attr("data-et", "edge");
|
|
742
|
+
svgPath.attr("data-id", edge.id);
|
|
743
|
+
svgPath.attr("data-points", pointsStr);
|
|
744
|
+
svgPath.attr("data-look", handleUndefinedAttr(edge.look));
|
|
745
|
+
if (edge.showPoints) {
|
|
746
|
+
lineData.forEach((point3) => {
|
|
747
|
+
elem.append("circle").style("stroke", "red").style("fill", "red").attr("r", 1).attr("cx", point3.x).attr("cy", point3.y);
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
let url = "";
|
|
751
|
+
if (getConfig2().flowchart.arrowMarkerAbsolute || getConfig2().state.arrowMarkerAbsolute) {
|
|
752
|
+
url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search;
|
|
753
|
+
url = url.replace(/\(/g, "\\(").replace(/\)/g, "\\)");
|
|
754
|
+
}
|
|
755
|
+
log.info("arrowTypeStart", edge.arrowTypeStart);
|
|
756
|
+
log.info("arrowTypeEnd", edge.arrowTypeEnd);
|
|
757
|
+
const useMargin = !animatedEdge && edge?.look === "neo";
|
|
758
|
+
addEdgeMarkers(svgPath, edge, url, diagramId, diagramType, useMargin, strokeColor);
|
|
759
|
+
const midIndex = Math.floor(points.length / 2);
|
|
760
|
+
const point2 = points[midIndex];
|
|
761
|
+
if (!utils_default.isLabelCoordinateInPath(point2, svgPath.attr("d"))) {
|
|
762
|
+
pointsHasChanged = true;
|
|
763
|
+
}
|
|
764
|
+
let paths = {};
|
|
765
|
+
if (pointsHasChanged) {
|
|
766
|
+
paths.updatedPath = points;
|
|
767
|
+
}
|
|
768
|
+
paths.originalPath = edge.points;
|
|
769
|
+
return paths;
|
|
770
|
+
}, "insertEdge");
|
|
771
|
+
function generateRoundedPath(points, radius) {
|
|
772
|
+
if (points.length < 2) {
|
|
773
|
+
return "";
|
|
774
|
+
}
|
|
775
|
+
let path = "";
|
|
776
|
+
const size = points.length;
|
|
777
|
+
const epsilon = 1e-5;
|
|
778
|
+
for (let i = 0; i < size; i++) {
|
|
779
|
+
const currPoint = points[i];
|
|
780
|
+
const prevPoint = points[i - 1];
|
|
781
|
+
const nextPoint = points[i + 1];
|
|
782
|
+
if (i === 0) {
|
|
783
|
+
path += `M${currPoint.x},${currPoint.y}`;
|
|
784
|
+
} else if (i === size - 1) {
|
|
785
|
+
path += `L${currPoint.x},${currPoint.y}`;
|
|
786
|
+
} else {
|
|
787
|
+
const dx1 = currPoint.x - prevPoint.x;
|
|
788
|
+
const dy1 = currPoint.y - prevPoint.y;
|
|
789
|
+
const dx2 = nextPoint.x - currPoint.x;
|
|
790
|
+
const dy2 = nextPoint.y - currPoint.y;
|
|
791
|
+
const len1 = Math.hypot(dx1, dy1);
|
|
792
|
+
const len2 = Math.hypot(dx2, dy2);
|
|
793
|
+
if (len1 < epsilon || len2 < epsilon) {
|
|
794
|
+
path += `L${currPoint.x},${currPoint.y}`;
|
|
795
|
+
continue;
|
|
796
|
+
}
|
|
797
|
+
const nx1 = dx1 / len1;
|
|
798
|
+
const ny1 = dy1 / len1;
|
|
799
|
+
const nx2 = dx2 / len2;
|
|
800
|
+
const ny2 = dy2 / len2;
|
|
801
|
+
const dot = nx1 * nx2 + ny1 * ny2;
|
|
802
|
+
const clampedDot = Math.max(-1, Math.min(1, dot));
|
|
803
|
+
const angle = Math.acos(clampedDot);
|
|
804
|
+
if (angle < epsilon || Math.abs(Math.PI - angle) < epsilon) {
|
|
805
|
+
path += `L${currPoint.x},${currPoint.y}`;
|
|
806
|
+
continue;
|
|
807
|
+
}
|
|
808
|
+
const cutLen = Math.min(radius / Math.sin(angle / 2), len1 / 2, len2 / 2);
|
|
809
|
+
const startX = currPoint.x - nx1 * cutLen;
|
|
810
|
+
const startY = currPoint.y - ny1 * cutLen;
|
|
811
|
+
const endX = currPoint.x + nx2 * cutLen;
|
|
812
|
+
const endY = currPoint.y + ny2 * cutLen;
|
|
813
|
+
path += `L${startX},${startY}`;
|
|
814
|
+
path += `Q${currPoint.x},${currPoint.y} ${endX},${endY}`;
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
return path;
|
|
818
|
+
}
|
|
819
|
+
__name(generateRoundedPath, "generateRoundedPath");
|
|
820
|
+
function calculateDeltaAndAngle(point1, point2) {
|
|
821
|
+
if (!point1 || !point2) {
|
|
822
|
+
return { angle: 0, deltaX: 0, deltaY: 0 };
|
|
823
|
+
}
|
|
824
|
+
const deltaX = point2.x - point1.x;
|
|
825
|
+
const deltaY = point2.y - point1.y;
|
|
826
|
+
const angle = Math.atan2(deltaY, deltaX);
|
|
827
|
+
return { angle, deltaX, deltaY };
|
|
828
|
+
}
|
|
829
|
+
__name(calculateDeltaAndAngle, "calculateDeltaAndAngle");
|
|
830
|
+
function applyMarkerOffsetsToPoints(points, edge) {
|
|
831
|
+
const newPoints = points.map((point2) => ({ ...point2 }));
|
|
832
|
+
if (points.length >= 2 && markerOffsets[edge.arrowTypeStart]) {
|
|
833
|
+
const offsetValue = markerOffsets[edge.arrowTypeStart];
|
|
834
|
+
const point1 = points[0];
|
|
835
|
+
const point2 = points[1];
|
|
836
|
+
const { angle } = calculateDeltaAndAngle(point1, point2);
|
|
837
|
+
const offsetX = offsetValue * Math.cos(angle);
|
|
838
|
+
const offsetY = offsetValue * Math.sin(angle);
|
|
839
|
+
newPoints[0].x = point1.x + offsetX;
|
|
840
|
+
newPoints[0].y = point1.y + offsetY;
|
|
841
|
+
}
|
|
842
|
+
const n = points.length;
|
|
843
|
+
if (n >= 2 && markerOffsets[edge.arrowTypeEnd]) {
|
|
844
|
+
const offsetValue = markerOffsets[edge.arrowTypeEnd];
|
|
845
|
+
const point1 = points[n - 1];
|
|
846
|
+
const point2 = points[n - 2];
|
|
847
|
+
const { angle } = calculateDeltaAndAngle(point2, point1);
|
|
848
|
+
const offsetX = offsetValue * Math.cos(angle);
|
|
849
|
+
const offsetY = offsetValue * Math.sin(angle);
|
|
850
|
+
newPoints[n - 1].x = point1.x - offsetX;
|
|
851
|
+
newPoints[n - 1].y = point1.y - offsetY;
|
|
852
|
+
}
|
|
853
|
+
return newPoints;
|
|
854
|
+
}
|
|
855
|
+
__name(applyMarkerOffsetsToPoints, "applyMarkerOffsetsToPoints");
|
|
856
|
+
var insertMarkers = /* @__PURE__ */ __name((elem, markerArray, type, id) => {
|
|
857
|
+
markerArray.forEach((markerName) => {
|
|
858
|
+
markers[markerName](elem, type, id);
|
|
859
|
+
});
|
|
860
|
+
}, "insertMarkers");
|
|
861
|
+
var extension = /* @__PURE__ */ __name((elem, type, id) => {
|
|
862
|
+
log.trace("Making markers for ", id);
|
|
863
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M 1,7 L18,13 V 1 Z");
|
|
864
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
|
|
865
|
+
elem.append("marker").attr("id", id + "_" + type + "-extensionStart-margin").attr("class", "marker extension " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").attr("viewBox", "0 0 20 14").append("polygon").attr("points", "10,7 18,13 18,1").style("stroke-width", 2).style("stroke-dasharray", "0");
|
|
866
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd-margin").attr("class", "marker extension " + type).attr("refX", 9).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").attr("viewBox", "0 0 20 14").append("polygon").attr("points", "10,1 10,13 18,7").style("stroke-width", 2).style("stroke-dasharray", "0");
|
|
867
|
+
}, "extension");
|
|
868
|
+
var composition = /* @__PURE__ */ __name((elem, type, id) => {
|
|
869
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
870
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
871
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart-margin").attr("class", "marker composition " + type).attr("refX", 15).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 0).attr("viewBox", "0 0 15 15").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
872
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd-margin").attr("class", "marker composition " + type).attr("refX", 3.5).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 0).attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
873
|
+
}, "composition");
|
|
874
|
+
var aggregation = /* @__PURE__ */ __name((elem, type, id) => {
|
|
875
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
876
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
877
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart-margin").attr("class", "marker aggregation " + type).attr("refX", 15).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 2).attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
878
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd-margin").attr("class", "marker aggregation " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 2).attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
879
|
+
}, "aggregation");
|
|
880
|
+
var dependency = /* @__PURE__ */ __name((elem, type, id) => {
|
|
881
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z");
|
|
882
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
883
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart-margin").attr("class", "marker dependency " + type).attr("refX", 4).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 0).attr("d", "M 5,7 L9,13 L1,7 L9,1 Z");
|
|
884
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd-margin").attr("class", "marker dependency " + type).attr("refX", 16).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 0).attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
885
|
+
}, "dependency");
|
|
886
|
+
var lollipop = /* @__PURE__ */ __name((elem, type, id) => {
|
|
887
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
|
|
888
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
|
|
889
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart-margin").attr("class", "marker lollipop " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("circle").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6).attr("stroke-width", 2);
|
|
890
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd-margin").attr("class", "marker lollipop " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("circle").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6).attr("stroke-width", 2);
|
|
891
|
+
}, "lollipop");
|
|
892
|
+
var point = /* @__PURE__ */ __name((elem, type, id) => {
|
|
893
|
+
elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
894
|
+
elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
895
|
+
elem.append("marker").attr("id", id + "_" + type + "-pointEnd-margin").attr("class", "marker " + type).attr("viewBox", "0 0 11.5 14").attr("refX", 11.5).attr("refY", 7).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 10.5).attr("markerHeight", 14).attr("orient", "auto").append("path").attr("d", "M 0 0 L 11.5 7 L 0 14 z").attr("class", "arrowMarkerPath").style("stroke-width", 0).style("stroke-dasharray", "1,0");
|
|
896
|
+
elem.append("marker").attr("id", id + "_" + type + "-pointStart-margin").attr("class", "marker " + type).attr("viewBox", "0 0 11.5 14").attr("refX", 1).attr("refY", 7).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11.5).attr("markerHeight", 14).attr("orient", "auto").append("polygon").attr("points", "0,7 11.5,14 11.5,0").attr("class", "arrowMarkerPath").style("stroke-width", 0).style("stroke-dasharray", "1,0");
|
|
897
|
+
}, "point");
|
|
898
|
+
var circle = /* @__PURE__ */ __name((elem, type, id) => {
|
|
899
|
+
elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
900
|
+
elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
901
|
+
elem.append("marker").attr("id", id + "_" + type + "-circleEnd-margin").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refY", 5).attr("refX", 12.25).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 14).attr("markerHeight", 14).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 0).style("stroke-dasharray", "1,0");
|
|
902
|
+
elem.append("marker").attr("id", id + "_" + type + "-circleStart-margin").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", -2).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 14).attr("markerHeight", 14).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 0).style("stroke-dasharray", "1,0");
|
|
903
|
+
}, "circle");
|
|
904
|
+
var cross = /* @__PURE__ */ __name((elem, type, id) => {
|
|
905
|
+
elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
906
|
+
elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
907
|
+
elem.append("marker").attr("id", id + "_" + type + "-crossEnd-margin").attr("class", "marker cross " + type).attr("viewBox", "0 0 15 15").attr("refX", 17.7).attr("refY", 7.5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 1,1 L 14,14 M 1,14 L 14,1").attr("class", "arrowMarkerPath").style("stroke-width", 2.5);
|
|
908
|
+
elem.append("marker").attr("id", id + "_" + type + "-crossStart-margin").attr("class", "marker cross " + type).attr("viewBox", "0 0 15 15").attr("refX", -3.5).attr("refY", 7.5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 1,1 L 14,14 M 1,14 L 14,1").attr("class", "arrowMarkerPath").style("stroke-width", 2.5).style("stroke-dasharray", "1,0");
|
|
909
|
+
}, "cross");
|
|
910
|
+
var barb = /* @__PURE__ */ __name((elem, type, id) => {
|
|
911
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
912
|
+
}, "barb");
|
|
913
|
+
var barbNeo = /* @__PURE__ */ __name((elem, type, id) => {
|
|
914
|
+
const config = getConfig();
|
|
915
|
+
const { themeVariables } = config;
|
|
916
|
+
const { transitionColor } = themeVariables;
|
|
917
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L11,14 L13,7 L11,0 Z");
|
|
918
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-barbEnd-margin").attr("refX", 17).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M 19,7 L11,14 L13,7 L11,0 Z").attr("fill", `${transitionColor}`);
|
|
919
|
+
}, "barbNeo");
|
|
920
|
+
var only_one = /* @__PURE__ */ __name((elem, type, id) => {
|
|
921
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-onlyOneStart").attr("class", "marker onlyOne " + type).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("d", "M9,0 L9,18 M15,0 L15,18");
|
|
922
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-onlyOneEnd").attr("class", "marker onlyOne " + type).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("d", "M3,0 L3,18 M9,0 L9,18");
|
|
923
|
+
}, "only_one");
|
|
924
|
+
var zero_or_one = /* @__PURE__ */ __name((elem, type, id) => {
|
|
925
|
+
const startMarker = elem.append("defs").append("marker").attr("id", id + "_" + type + "-zeroOrOneStart").attr("class", "marker zeroOrOne " + type).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
|
|
926
|
+
startMarker.append("circle").attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6);
|
|
927
|
+
startMarker.append("path").attr("d", "M9,0 L9,18");
|
|
928
|
+
const endMarker = elem.append("defs").append("marker").attr("id", id + "_" + type + "-zeroOrOneEnd").attr("class", "marker zeroOrOne " + type).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
|
|
929
|
+
endMarker.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6);
|
|
930
|
+
endMarker.append("path").attr("d", "M21,0 L21,18");
|
|
931
|
+
}, "zero_or_one");
|
|
932
|
+
var one_or_more = /* @__PURE__ */ __name((elem, type, id) => {
|
|
933
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-oneOrMoreStart").attr("class", "marker oneOrMore " + type).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27");
|
|
934
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-oneOrMoreEnd").attr("class", "marker oneOrMore " + type).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18");
|
|
935
|
+
}, "one_or_more");
|
|
936
|
+
var zero_or_more = /* @__PURE__ */ __name((elem, type, id) => {
|
|
937
|
+
const startMarker = elem.append("defs").append("marker").attr("id", id + "_" + type + "-zeroOrMoreStart").attr("class", "marker zeroOrMore " + type).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
|
|
938
|
+
startMarker.append("circle").attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6);
|
|
939
|
+
startMarker.append("path").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18");
|
|
940
|
+
const endMarker = elem.append("defs").append("marker").attr("id", id + "_" + type + "-zeroOrMoreEnd").attr("class", "marker zeroOrMore " + type).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
|
|
941
|
+
endMarker.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6);
|
|
942
|
+
endMarker.append("path").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18");
|
|
943
|
+
}, "zero_or_more");
|
|
944
|
+
var only_one_neo = /* @__PURE__ */ __name((elem, type, id) => {
|
|
945
|
+
const config = getConfig();
|
|
946
|
+
const { themeVariables } = config;
|
|
947
|
+
const { strokeWidth } = themeVariables;
|
|
948
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-onlyOneStart").attr("class", "marker onlyOne " + type).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M9,0 L9,18 M15,0 L15,18").attr("stroke-width", `${strokeWidth}`);
|
|
949
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-onlyOneEnd").attr("class", "marker onlyOne " + type).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M3,0 L3,18 M9,0 L9,18").attr("stroke-width", `${strokeWidth}`);
|
|
950
|
+
}, "only_one_neo");
|
|
951
|
+
var zero_or_one_neo = /* @__PURE__ */ __name((elem, type, id) => {
|
|
952
|
+
const config = getConfig();
|
|
953
|
+
const { themeVariables } = config;
|
|
954
|
+
const { strokeWidth, mainBkg } = themeVariables;
|
|
955
|
+
const startMarker = elem.append("defs").append("marker").attr("id", id + "_" + type + "-zeroOrOneStart").attr("class", "marker zeroOrOne " + type).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse");
|
|
956
|
+
startMarker.append("circle").attr("fill", mainBkg ?? "white").attr("cx", 21).attr("cy", 9).attr("stroke-width", `${strokeWidth}`).attr("r", 6);
|
|
957
|
+
startMarker.append("path").attr("d", "M9,0 L9,18").attr("stroke-width", `${strokeWidth}`);
|
|
958
|
+
const endMarker = elem.append("defs").append("marker").attr("id", id + "_" + type + "-zeroOrOneEnd").attr("class", "marker zeroOrOne " + type).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto");
|
|
959
|
+
endMarker.append("circle").attr("fill", mainBkg ?? "white").attr("cx", 9).attr("cy", 9).attr("stroke-width", `${strokeWidth}`).attr("r", 6);
|
|
960
|
+
endMarker.append("path").attr("d", "M21,0 L21,18").attr("stroke-width", `${strokeWidth}`);
|
|
961
|
+
}, "zero_or_one_neo");
|
|
962
|
+
var one_or_more_neo = /* @__PURE__ */ __name((elem, type, id) => {
|
|
963
|
+
const config = getConfig();
|
|
964
|
+
const { themeVariables } = config;
|
|
965
|
+
const { strokeWidth } = themeVariables;
|
|
966
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-oneOrMoreStart").attr("class", "marker oneOrMore " + type).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width", `${strokeWidth}`);
|
|
967
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-oneOrMoreEnd").attr("class", "marker oneOrMore " + type).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width", `${strokeWidth}`);
|
|
968
|
+
}, "one_or_more_neo");
|
|
969
|
+
var zero_or_more_neo = /* @__PURE__ */ __name((elem, type, id) => {
|
|
970
|
+
const config = getConfig();
|
|
971
|
+
const { themeVariables } = config;
|
|
972
|
+
const { strokeWidth, mainBkg } = themeVariables;
|
|
973
|
+
const startMarker = elem.append("defs").append("marker").attr("id", id + "_" + type + "-zeroOrMoreStart").attr("class", "marker zeroOrMore " + type).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto");
|
|
974
|
+
startMarker.append("circle").attr("fill", mainBkg ?? "white").attr("cx", 45.5).attr("cy", 18).attr("r", 6).attr("stroke-width", `${strokeWidth}`);
|
|
975
|
+
startMarker.append("path").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width", `${strokeWidth}`);
|
|
976
|
+
const endMarker = elem.append("defs").append("marker").attr("id", id + "_" + type + "-zeroOrMoreEnd").attr("class", "marker zeroOrMore " + type).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse");
|
|
977
|
+
endMarker.append("circle").attr("fill", mainBkg ?? "white").attr("cx", 11).attr("cy", 18).attr("r", 6).attr("stroke-width", `${strokeWidth}`);
|
|
978
|
+
endMarker.append("path").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width", `${strokeWidth}`);
|
|
979
|
+
}, "zero_or_more_neo");
|
|
980
|
+
var requirement_arrow = /* @__PURE__ */ __name((elem, type, id) => {
|
|
981
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-requirement_arrowEnd").attr("refX", 20).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("path").attr(
|
|
982
|
+
"d",
|
|
983
|
+
`M0,0
|
|
984
|
+
L20,10
|
|
985
|
+
M20,10
|
|
986
|
+
L0,20`
|
|
987
|
+
);
|
|
988
|
+
}, "requirement_arrow");
|
|
989
|
+
var requirement_arrow_neo = /* @__PURE__ */ __name((elem, type, id) => {
|
|
990
|
+
const config = getConfig();
|
|
991
|
+
const { themeVariables } = config;
|
|
992
|
+
const { strokeWidth } = themeVariables;
|
|
993
|
+
elem.append("defs").append("marker").attr("id", id + "_" + type + "-requirement_arrowEnd").attr("refX", 20).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").attr("stroke-width", `${strokeWidth}`).attr("viewBox", "0 0 25 20").append("path").attr(
|
|
994
|
+
"d",
|
|
995
|
+
`M0,0
|
|
996
|
+
L20,10
|
|
997
|
+
M20,10
|
|
998
|
+
L0,20`
|
|
999
|
+
).attr("stroke-linejoin", "miter");
|
|
1000
|
+
}, "requirement_arrow_neo");
|
|
1001
|
+
var requirement_contains = /* @__PURE__ */ __name((elem, type, id) => {
|
|
1002
|
+
const containsNode = elem.append("defs").append("marker").attr("id", id + "_" + type + "-requirement_containsStart").attr("refX", 0).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("g");
|
|
1003
|
+
containsNode.append("circle").attr("cx", 10).attr("cy", 10).attr("r", 9).attr("fill", "none");
|
|
1004
|
+
containsNode.append("line").attr("x1", 1).attr("x2", 19).attr("y1", 10).attr("y2", 10);
|
|
1005
|
+
containsNode.append("line").attr("y1", 1).attr("y2", 19).attr("x1", 10).attr("x2", 10);
|
|
1006
|
+
}, "requirement_contains");
|
|
1007
|
+
var requirement_contains_neo = /* @__PURE__ */ __name((elem, type, id) => {
|
|
1008
|
+
const config = getConfig();
|
|
1009
|
+
const { themeVariables } = config;
|
|
1010
|
+
const { strokeWidth } = themeVariables;
|
|
1011
|
+
const containsNode = elem.append("defs").append("marker").attr("id", id + "_" + type + "-requirement_containsStart").attr("refX", 0).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("g");
|
|
1012
|
+
containsNode.append("circle").attr("cx", 10).attr("cy", 10).attr("r", 9).attr("fill", "none");
|
|
1013
|
+
containsNode.append("line").attr("x1", 1).attr("x2", 19).attr("y1", 10).attr("y2", 10);
|
|
1014
|
+
containsNode.append("line").attr("y1", 1).attr("y2", 19).attr("x1", 10).attr("x2", 10);
|
|
1015
|
+
containsNode.selectAll("*").attr("stroke-width", `${strokeWidth}`);
|
|
1016
|
+
}, "requirement_contains_neo");
|
|
1017
|
+
var markers = {
|
|
1018
|
+
extension,
|
|
1019
|
+
composition,
|
|
1020
|
+
aggregation,
|
|
1021
|
+
dependency,
|
|
1022
|
+
lollipop,
|
|
1023
|
+
point,
|
|
1024
|
+
circle,
|
|
1025
|
+
cross,
|
|
1026
|
+
barb,
|
|
1027
|
+
barbNeo,
|
|
1028
|
+
only_one,
|
|
1029
|
+
zero_or_one,
|
|
1030
|
+
one_or_more,
|
|
1031
|
+
zero_or_more,
|
|
1032
|
+
only_one_neo,
|
|
1033
|
+
zero_or_one_neo,
|
|
1034
|
+
one_or_more_neo,
|
|
1035
|
+
zero_or_more_neo,
|
|
1036
|
+
requirement_arrow,
|
|
1037
|
+
requirement_contains,
|
|
1038
|
+
requirement_arrow_neo,
|
|
1039
|
+
requirement_contains_neo
|
|
1040
|
+
};
|
|
1041
|
+
var markers_default = insertMarkers;
|
|
1042
|
+
|
|
1043
|
+
export {
|
|
1044
|
+
clear,
|
|
1045
|
+
insertEdgeLabel,
|
|
1046
|
+
positionEdgeLabel,
|
|
1047
|
+
insertEdge,
|
|
1048
|
+
markers_default
|
|
1049
|
+
};
|
|
1050
|
+
//# sourceMappingURL=chunk-OGKINV23.js.map
|