@readme/markdown 7.6.6 → 7.7.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.
Files changed (86) hide show
  1. package/README.md +60 -79
  2. package/components/Code/index.tsx +7 -3
  3. package/components/Code/style.scss +6 -0
  4. package/components/CodeTabs/index.tsx +25 -2
  5. package/components/Image/style.scss +7 -4
  6. package/dist/10.js +22718 -0
  7. package/dist/10.node.js +22721 -0
  8. package/dist/11.js +1440 -0
  9. package/dist/11.node.js +1443 -0
  10. package/dist/120.js +19 -0
  11. package/dist/120.node.js +22 -0
  12. package/dist/134.js +19 -0
  13. package/dist/134.node.js +22 -0
  14. package/dist/150.js +1888 -0
  15. package/dist/150.node.js +1891 -0
  16. package/dist/17.js +1373 -0
  17. package/dist/17.node.js +1376 -0
  18. package/dist/246.js +1929 -0
  19. package/dist/246.node.js +1932 -0
  20. package/dist/351.js +2400 -0
  21. package/dist/351.node.js +2403 -0
  22. package/dist/366.js +1181 -0
  23. package/dist/366.node.js +1184 -0
  24. package/dist/403.js +2192 -0
  25. package/dist/403.node.js +2195 -0
  26. package/dist/429.js +11130 -0
  27. package/dist/429.node.js +11133 -0
  28. package/dist/485.js +514 -0
  29. package/dist/485.node.js +517 -0
  30. package/dist/488.js +55 -0
  31. package/dist/488.node.js +58 -0
  32. package/dist/489.js +18472 -0
  33. package/dist/489.node.js +18475 -0
  34. package/dist/510.js +246 -0
  35. package/dist/510.node.js +249 -0
  36. package/dist/52.js +808 -0
  37. package/dist/52.node.js +811 -0
  38. package/dist/550.node.js +1456 -0
  39. package/dist/551.js +2722 -0
  40. package/dist/551.node.js +2725 -0
  41. package/dist/617.js +19 -0
  42. package/dist/617.node.js +22 -0
  43. package/dist/687.js +3671 -0
  44. package/dist/687.node.js +3674 -0
  45. package/dist/745.js +7504 -0
  46. package/dist/745.node.js +7507 -0
  47. package/dist/775.js +1900 -0
  48. package/dist/775.node.js +1903 -0
  49. package/dist/786.js +31378 -0
  50. package/dist/786.node.js +31381 -0
  51. package/dist/788.js +1021 -0
  52. package/dist/788.node.js +1024 -0
  53. package/dist/81.js +382 -0
  54. package/dist/81.node.js +385 -0
  55. package/dist/849.js +2586 -0
  56. package/dist/849.node.js +2589 -0
  57. package/dist/863.js +19 -0
  58. package/dist/863.node.js +22 -0
  59. package/dist/867.js +1414 -0
  60. package/dist/867.node.js +1417 -0
  61. package/dist/871.js +1533 -0
  62. package/dist/881.js +1276 -0
  63. package/dist/881.node.js +1279 -0
  64. package/dist/885.js +48 -0
  65. package/dist/885.node.js +51 -0
  66. package/dist/896.js +1613 -0
  67. package/dist/896.node.js +1616 -0
  68. package/dist/906.js +1815 -0
  69. package/dist/906.node.js +1818 -0
  70. package/dist/91.js +19 -0
  71. package/dist/91.node.js +22 -0
  72. package/dist/940.js +3359 -0
  73. package/dist/940.node.js +3362 -0
  74. package/dist/952.js +243 -0
  75. package/dist/952.node.js +246 -0
  76. package/dist/995.js +5734 -0
  77. package/dist/995.node.js +5737 -0
  78. package/dist/components/Code/index.d.ts +1 -1
  79. package/dist/lib/ast-processor.d.ts +3 -1
  80. package/dist/lib/compile.d.ts +2 -1
  81. package/dist/main.css +1 -1
  82. package/dist/main.js +94787 -73737
  83. package/dist/main.node.js +103724 -82783
  84. package/dist/processor/transform/code-tabs.d.ts +3 -1
  85. package/dist/processor/transform/index.d.ts +12 -1
  86. package/package.json +3 -3
package/dist/81.js ADDED
@@ -0,0 +1,382 @@
1
+ "use strict";
2
+ (self["webpackChunk_readme_markdown"] = self["webpackChunk_readme_markdown"] || []).push([[81],{
3
+
4
+ /***/ 7081:
5
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
+
7
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8
+ /* harmony export */ diagram: () => (/* binding */ diagram)
9
+ /* harmony export */ });
10
+ /* harmony import */ var _chunk_NGC4727B_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4896);
11
+ /* harmony import */ var _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2843);
12
+ /* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6322);
13
+ /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8066);
14
+ /* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(995);
15
+ /* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4416);
16
+
17
+
18
+
19
+
20
+ // src/diagrams/class/classRenderer.js
21
+
22
+
23
+
24
+
25
+ // src/diagrams/class/svgDraw.js
26
+
27
+ var edgeCount = 0;
28
+ var drawEdge = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem, path, relation, conf, diagObj) {
29
+ const getRelationType = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(type) {
30
+ switch (type) {
31
+ case diagObj.db.relationType.AGGREGATION:
32
+ return "aggregation";
33
+ case diagObj.db.relationType.EXTENSION:
34
+ return "extension";
35
+ case diagObj.db.relationType.COMPOSITION:
36
+ return "composition";
37
+ case diagObj.db.relationType.DEPENDENCY:
38
+ return "dependency";
39
+ case diagObj.db.relationType.LOLLIPOP:
40
+ return "lollipop";
41
+ }
42
+ }, "getRelationType");
43
+ path.points = path.points.filter((p) => !Number.isNaN(p.y));
44
+ const lineData = path.points;
45
+ const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .line */ .n8j)().x(function(d) {
46
+ return d.x;
47
+ }).y(function(d) {
48
+ return d.y;
49
+ }).curve(d3__WEBPACK_IMPORTED_MODULE_3__/* .curveBasis */ .qrM);
50
+ const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", "edge" + edgeCount).attr("class", "relation");
51
+ let url = "";
52
+ if (conf.arrowMarkerAbsolute) {
53
+ url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search;
54
+ url = url.replace(/\(/g, "\\(");
55
+ url = url.replace(/\)/g, "\\)");
56
+ }
57
+ if (relation.relation.lineType == 1) {
58
+ svgPath.attr("class", "relation dashed-line");
59
+ }
60
+ if (relation.relation.lineType == 10) {
61
+ svgPath.attr("class", "relation dotted-line");
62
+ }
63
+ if (relation.relation.type1 !== "none") {
64
+ svgPath.attr(
65
+ "marker-start",
66
+ "url(" + url + "#" + getRelationType(relation.relation.type1) + "Start)"
67
+ );
68
+ }
69
+ if (relation.relation.type2 !== "none") {
70
+ svgPath.attr(
71
+ "marker-end",
72
+ "url(" + url + "#" + getRelationType(relation.relation.type2) + "End)"
73
+ );
74
+ }
75
+ let x, y;
76
+ const l = path.points.length;
77
+ let labelPosition = _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .utils_default */ ._K.calcLabelPosition(path.points);
78
+ x = labelPosition.x;
79
+ y = labelPosition.y;
80
+ let p1_card_x, p1_card_y;
81
+ let p2_card_x, p2_card_y;
82
+ if (l % 2 !== 0 && l > 1) {
83
+ let cardinality_1_point = _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .utils_default */ ._K.calcCardinalityPosition(
84
+ relation.relation.type1 !== "none",
85
+ path.points,
86
+ path.points[0]
87
+ );
88
+ let cardinality_2_point = _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .utils_default */ ._K.calcCardinalityPosition(
89
+ relation.relation.type2 !== "none",
90
+ path.points,
91
+ path.points[l - 1]
92
+ );
93
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug("cardinality_1_point " + JSON.stringify(cardinality_1_point));
94
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug("cardinality_2_point " + JSON.stringify(cardinality_2_point));
95
+ p1_card_x = cardinality_1_point.x;
96
+ p1_card_y = cardinality_1_point.y;
97
+ p2_card_x = cardinality_2_point.x;
98
+ p2_card_y = cardinality_2_point.y;
99
+ }
100
+ if (relation.title !== void 0) {
101
+ const g = elem.append("g").attr("class", "classLabel");
102
+ const label = g.append("text").attr("class", "label").attr("x", x).attr("y", y).attr("fill", "red").attr("text-anchor", "middle").text(relation.title);
103
+ window.label = label;
104
+ const bounds = label.node().getBBox();
105
+ g.insert("rect", ":first-child").attr("class", "box").attr("x", bounds.x - conf.padding / 2).attr("y", bounds.y - conf.padding / 2).attr("width", bounds.width + conf.padding).attr("height", bounds.height + conf.padding);
106
+ }
107
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.info("Rendering relation " + JSON.stringify(relation));
108
+ if (relation.relationTitle1 !== void 0 && relation.relationTitle1 !== "none") {
109
+ const g = elem.append("g").attr("class", "cardinality");
110
+ g.append("text").attr("class", "type1").attr("x", p1_card_x).attr("y", p1_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle1);
111
+ }
112
+ if (relation.relationTitle2 !== void 0 && relation.relationTitle2 !== "none") {
113
+ const g = elem.append("g").attr("class", "cardinality");
114
+ g.append("text").attr("class", "type2").attr("x", p2_card_x).attr("y", p2_card_y).attr("fill", "black").attr("font-size", "6").text(relation.relationTitle2);
115
+ }
116
+ edgeCount++;
117
+ }, "drawEdge");
118
+ var drawClass = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem, classDef, conf, diagObj) {
119
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug("Rendering class ", classDef, conf);
120
+ const id = classDef.id;
121
+ const classInfo = {
122
+ id,
123
+ label: classDef.id,
124
+ width: 0,
125
+ height: 0
126
+ };
127
+ const g = elem.append("g").attr("id", diagObj.db.lookUpDomId(id)).attr("class", "classGroup");
128
+ let title;
129
+ if (classDef.link) {
130
+ title = g.append("svg:a").attr("xlink:href", classDef.link).attr("target", classDef.linkTarget).append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0);
131
+ } else {
132
+ title = g.append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0);
133
+ }
134
+ let isFirst = true;
135
+ classDef.annotations.forEach(function(member) {
136
+ const titleText2 = title.append("tspan").text("\xAB" + member + "\xBB");
137
+ if (!isFirst) {
138
+ titleText2.attr("dy", conf.textHeight);
139
+ }
140
+ isFirst = false;
141
+ });
142
+ let classTitleString = getClassTitleString(classDef);
143
+ const classTitle = title.append("tspan").text(classTitleString).attr("class", "title");
144
+ if (!isFirst) {
145
+ classTitle.attr("dy", conf.textHeight);
146
+ }
147
+ const titleHeight = title.node().getBBox().height;
148
+ let membersLine;
149
+ let membersBox;
150
+ let methodsLine;
151
+ if (classDef.members.length > 0) {
152
+ membersLine = g.append("line").attr("x1", 0).attr("y1", conf.padding + titleHeight + conf.dividerMargin / 2).attr("y2", conf.padding + titleHeight + conf.dividerMargin / 2);
153
+ const members = g.append("text").attr("x", conf.padding).attr("y", titleHeight + conf.dividerMargin + conf.textHeight).attr("fill", "white").attr("class", "classText");
154
+ isFirst = true;
155
+ classDef.members.forEach(function(member) {
156
+ addTspan(members, member, isFirst, conf);
157
+ isFirst = false;
158
+ });
159
+ membersBox = members.node().getBBox();
160
+ }
161
+ if (classDef.methods.length > 0) {
162
+ methodsLine = g.append("line").attr("x1", 0).attr("y1", conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr("y2", conf.padding + titleHeight + conf.dividerMargin + membersBox.height);
163
+ const methods = g.append("text").attr("x", conf.padding).attr("y", titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr("fill", "white").attr("class", "classText");
164
+ isFirst = true;
165
+ classDef.methods.forEach(function(method) {
166
+ addTspan(methods, method, isFirst, conf);
167
+ isFirst = false;
168
+ });
169
+ }
170
+ const classBox = g.node().getBBox();
171
+ var cssClassStr = " ";
172
+ if (classDef.cssClasses.length > 0) {
173
+ cssClassStr = cssClassStr + classDef.cssClasses.join(" ");
174
+ }
175
+ const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", classBox.width + 2 * conf.padding).attr("height", classBox.height + conf.padding + 0.5 * conf.dividerMargin).attr("class", cssClassStr);
176
+ const rectWidth = rect.node().getBBox().width;
177
+ title.node().childNodes.forEach(function(x) {
178
+ x.setAttribute("x", (rectWidth - x.getBBox().width) / 2);
179
+ });
180
+ if (classDef.tooltip) {
181
+ title.insert("title").text(classDef.tooltip);
182
+ }
183
+ if (membersLine) {
184
+ membersLine.attr("x2", rectWidth);
185
+ }
186
+ if (methodsLine) {
187
+ methodsLine.attr("x2", rectWidth);
188
+ }
189
+ classInfo.width = rectWidth;
190
+ classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin;
191
+ return classInfo;
192
+ }, "drawClass");
193
+ var getClassTitleString = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(classDef) {
194
+ let classTitleString = classDef.id;
195
+ if (classDef.type) {
196
+ classTitleString += "<" + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .parseGenericTypes */ .QO)(classDef.type) + ">";
197
+ }
198
+ return classTitleString;
199
+ }, "getClassTitleString");
200
+ var drawNote = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem, note, conf, _diagObj) {
201
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug("Rendering note ", note, conf);
202
+ const id = note.id;
203
+ const noteInfo = {
204
+ id,
205
+ text: note.text,
206
+ width: 0,
207
+ height: 0
208
+ };
209
+ const g = elem.append("g").attr("id", id).attr("class", "classGroup");
210
+ let text = g.append("text").attr("y", conf.textHeight + conf.padding).attr("x", 0);
211
+ const lines = JSON.parse(`"${note.text}"`).split("\n");
212
+ lines.forEach(function(line2) {
213
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug(`Adding line: ${line2}`);
214
+ text.append("tspan").text(line2).attr("class", "title").attr("dy", conf.textHeight);
215
+ });
216
+ const noteBox = g.node().getBBox();
217
+ const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", noteBox.width + 2 * conf.padding).attr(
218
+ "height",
219
+ noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin
220
+ );
221
+ const rectWidth = rect.node().getBBox().width;
222
+ text.node().childNodes.forEach(function(x) {
223
+ x.setAttribute("x", (rectWidth - x.getBBox().width) / 2);
224
+ });
225
+ noteInfo.width = rectWidth;
226
+ noteInfo.height = noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin;
227
+ return noteInfo;
228
+ }, "drawNote");
229
+ var addTspan = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(textEl, member, isFirst, conf) {
230
+ const { displayText, cssStyle } = member.getDisplayDetails();
231
+ const tSpan = textEl.append("tspan").attr("x", conf.padding).text(displayText);
232
+ if (cssStyle !== "") {
233
+ tSpan.attr("style", member.cssStyle);
234
+ }
235
+ if (!isFirst) {
236
+ tSpan.attr("dy", conf.textHeight);
237
+ }
238
+ }, "addTspan");
239
+ var svgDraw_default = {
240
+ getClassTitleString,
241
+ drawClass,
242
+ drawEdge,
243
+ drawNote
244
+ };
245
+
246
+ // src/diagrams/class/classRenderer.js
247
+ var idCache = {};
248
+ var padding = 20;
249
+ var getGraphId = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(label) {
250
+ const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);
251
+ if (foundEntry) {
252
+ return foundEntry[0];
253
+ }
254
+ }, "getGraphId");
255
+ var insertMarkers = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
256
+ elem.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z");
257
+ elem.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
258
+ elem.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).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");
259
+ elem.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).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");
260
+ elem.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).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");
261
+ elem.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).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");
262
+ elem.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).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");
263
+ elem.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).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");
264
+ }, "insertMarkers");
265
+ var draw = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(text, id, _version, diagObj) {
266
+ const conf = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getConfig2 */ .D7)().class;
267
+ idCache = {};
268
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.info("Rendering diagram " + text);
269
+ const securityLevel = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getConfig2 */ .D7)().securityLevel;
270
+ let sandboxElement;
271
+ if (securityLevel === "sandbox") {
272
+ sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)("#i" + id);
273
+ }
274
+ const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)("body");
275
+ const diagram2 = root.select(`[id='${id}']`);
276
+ insertMarkers(diagram2);
277
+ const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_5__/* .Graph */ .T({
278
+ multigraph: true
279
+ });
280
+ g.setGraph({
281
+ isMultiGraph: true
282
+ });
283
+ g.setDefaultEdgeLabel(function() {
284
+ return {};
285
+ });
286
+ const classes = diagObj.db.getClasses();
287
+ const keys = [...classes.keys()];
288
+ for (const key of keys) {
289
+ const classDef = classes.get(key);
290
+ const node = svgDraw_default.drawClass(diagram2, classDef, conf, diagObj);
291
+ idCache[node.id] = node;
292
+ g.setNode(node.id, node);
293
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.info("Org height: " + node.height);
294
+ }
295
+ const relations = diagObj.db.getRelations();
296
+ relations.forEach(function(relation) {
297
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.info(
298
+ // cspell:ignore tjoho
299
+ "tjoho" + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)
300
+ );
301
+ g.setEdge(
302
+ getGraphId(relation.id1),
303
+ getGraphId(relation.id2),
304
+ {
305
+ relation
306
+ },
307
+ relation.title || "DEFAULT"
308
+ );
309
+ });
310
+ const notes = diagObj.db.getNotes();
311
+ notes.forEach(function(note) {
312
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug(`Adding note: ${JSON.stringify(note)}`);
313
+ const node = svgDraw_default.drawNote(diagram2, note, conf, diagObj);
314
+ idCache[node.id] = node;
315
+ g.setNode(node.id, node);
316
+ if (note.class && classes.has(note.class)) {
317
+ g.setEdge(
318
+ note.id,
319
+ getGraphId(note.class),
320
+ {
321
+ relation: {
322
+ id1: note.id,
323
+ id2: note.class,
324
+ relation: {
325
+ type1: "none",
326
+ type2: "none",
327
+ lineType: 10
328
+ }
329
+ }
330
+ },
331
+ "DEFAULT"
332
+ );
333
+ }
334
+ });
335
+ (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_4__/* .layout */ .Zp)(g);
336
+ g.nodes().forEach(function(v) {
337
+ if (v !== void 0 && g.node(v) !== void 0) {
338
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug("Node " + v + ": " + JSON.stringify(g.node(v)));
339
+ root.select("#" + (diagObj.db.lookUpDomId(v) || v)).attr(
340
+ "transform",
341
+ "translate(" + (g.node(v).x - g.node(v).width / 2) + "," + (g.node(v).y - g.node(v).height / 2) + " )"
342
+ );
343
+ }
344
+ });
345
+ g.edges().forEach(function(e) {
346
+ if (e !== void 0 && g.edge(e) !== void 0) {
347
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(g.edge(e)));
348
+ svgDraw_default.drawEdge(diagram2, g.edge(e), g.edge(e).relation, conf, diagObj);
349
+ }
350
+ });
351
+ const svgBounds = diagram2.node().getBBox();
352
+ const width = svgBounds.width + padding * 2;
353
+ const height = svgBounds.height + padding * 2;
354
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .configureSvgSize */ .a$)(diagram2, height, width, conf.useMaxWidth);
355
+ const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;
356
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug(`viewBox ${vBox}`);
357
+ diagram2.attr("viewBox", vBox);
358
+ }, "draw");
359
+ var classRenderer_default = {
360
+ draw
361
+ };
362
+
363
+ // src/diagrams/class/classDiagram.ts
364
+ var diagram = {
365
+ parser: _chunk_NGC4727B_mjs__WEBPACK_IMPORTED_MODULE_0__/* .classDiagram_default */ ._$,
366
+ db: _chunk_NGC4727B_mjs__WEBPACK_IMPORTED_MODULE_0__/* .classDb_default */ .z2,
367
+ renderer: classRenderer_default,
368
+ styles: _chunk_NGC4727B_mjs__WEBPACK_IMPORTED_MODULE_0__/* .styles_default */ .tM,
369
+ init: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)((cnf) => {
370
+ if (!cnf.class) {
371
+ cnf.class = {};
372
+ }
373
+ cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
374
+ _chunk_NGC4727B_mjs__WEBPACK_IMPORTED_MODULE_0__/* .classDb_default */ .z2.clear();
375
+ }, "init")
376
+ };
377
+
378
+
379
+
380
+ /***/ })
381
+
382
+ }]);