@readme/markdown 7.10.0 → 7.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/components/Columns/index.tsx +4 -2
  2. package/components/Columns/style.scss +6 -0
  3. package/components/Image/index.tsx +1 -1
  4. package/dist/components/Columns/index.d.ts +1 -2
  5. package/dist/lib/migrate.d.ts +3 -1
  6. package/dist/main.css +1 -1
  7. package/dist/main.js +22 -30
  8. package/dist/main.node.js +422 -5473
  9. package/dist/processor/migration/index.d.ts +2 -1
  10. package/dist/processor/migration/table-cell.d.ts +1 -1
  11. package/package.json +2 -2
  12. package/dist/10.node.js +0 -22721
  13. package/dist/11.node.js +0 -1443
  14. package/dist/120.node.js +0 -22
  15. package/dist/134.node.js +0 -22
  16. package/dist/150.node.js +0 -1891
  17. package/dist/17.node.js +0 -1376
  18. package/dist/246.node.js +0 -1932
  19. package/dist/351.node.js +0 -2403
  20. package/dist/366.node.js +0 -1184
  21. package/dist/403.node.js +0 -2195
  22. package/dist/429.node.js +0 -11133
  23. package/dist/485.node.js +0 -517
  24. package/dist/486.node.js +0 -31818
  25. package/dist/488.node.js +0 -58
  26. package/dist/489.node.js +0 -18475
  27. package/dist/510.node.js +0 -249
  28. package/dist/52.node.js +0 -811
  29. package/dist/550.node.js +0 -1456
  30. package/dist/551.node.js +0 -2725
  31. package/dist/617.node.js +0 -22
  32. package/dist/687.node.js +0 -3674
  33. package/dist/745.node.js +0 -7507
  34. package/dist/775.node.js +0 -1903
  35. package/dist/786.node.js +0 -31381
  36. package/dist/788.node.js +0 -1024
  37. package/dist/81.node.js +0 -385
  38. package/dist/849.node.js +0 -2589
  39. package/dist/863.node.js +0 -22
  40. package/dist/867.node.js +0 -1417
  41. package/dist/881.node.js +0 -1279
  42. package/dist/885.node.js +0 -51
  43. package/dist/896.node.js +0 -1616
  44. package/dist/906.node.js +0 -1818
  45. package/dist/91.node.js +0 -22
  46. package/dist/940.node.js +0 -3362
  47. package/dist/952.node.js +0 -246
  48. package/dist/995.node.js +0 -5737
package/dist/485.node.js DELETED
@@ -1,517 +0,0 @@
1
- "use strict";
2
- exports.id = 485;
3
- exports.ids = [485];
4
- exports.modules = {
5
-
6
- /***/ 7485:
7
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
-
9
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10
- /* harmony export */ diagram: () => (/* binding */ diagram)
11
- /* harmony export */ });
12
- /* harmony import */ var _chunk_5RIWM3LS_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3246);
13
- /* harmony import */ var _chunk_4LC2V6XN_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4265);
14
- /* harmony import */ var _chunk_U2OMI7UW_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2385);
15
- /* harmony import */ var _chunk_O5FTX4FK_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1285);
16
- /* harmony import */ var _chunk_CTJGIJSU_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4875);
17
- /* harmony import */ var _chunk_I3FGKTZ5_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6971);
18
- /* harmony import */ var _chunk_U7L4IQIU_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5449);
19
- /* harmony import */ var _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(2843);
20
- /* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(6322);
21
- /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(8066);
22
- /* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(995);
23
- /* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(4416);
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
- // src/diagrams/state/stateRenderer.js
35
-
36
-
37
-
38
-
39
- // src/diagrams/state/shapes.js
40
-
41
-
42
- // src/diagrams/state/id-cache.js
43
- var idCache = {};
44
- var set = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)((key, val) => {
45
- idCache[key] = val;
46
- }, "set");
47
- var get = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)((k) => idCache[k], "get");
48
- var keys = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)(() => Object.keys(idCache), "keys");
49
- var size = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)(() => keys().length, "size");
50
- var id_cache_default = {
51
- get,
52
- set,
53
- keys,
54
- size
55
- };
56
-
57
- // src/diagrams/state/shapes.js
58
- var drawStartState = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)((g) => g.append("circle").attr("class", "start-state").attr("r", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.sizeUnit).attr("cx", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.sizeUnit).attr("cy", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.sizeUnit), "drawStartState");
59
- var drawDivider = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)((g) => g.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.textHeight).attr("class", "divider").attr("x2", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.textHeight * 2).attr("y1", 0).attr("y2", 0), "drawDivider");
60
- var drawSimpleState = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)((g, stateDef) => {
61
- const state = g.append("text").attr("x", 2 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).attr("y", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.textHeight + 2 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).attr("font-size", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.fontSize).attr("class", "state-title").text(stateDef.id);
62
- const classBox = state.node().getBBox();
63
- g.insert("rect", ":first-child").attr("x", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).attr("y", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).attr("width", classBox.width + 2 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).attr("height", classBox.height + 2 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).attr("rx", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.radius);
64
- return state;
65
- }, "drawSimpleState");
66
- var drawDescrState = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)((g, stateDef) => {
67
- const addTspan = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)(function(textEl, txt, isFirst2) {
68
- const tSpan = textEl.append("tspan").attr("x", 2 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).text(txt);
69
- if (!isFirst2) {
70
- tSpan.attr("dy", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.textHeight);
71
- }
72
- }, "addTspan");
73
- const title = g.append("text").attr("x", 2 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).attr("y", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.textHeight + 1.3 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).attr("font-size", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.fontSize).attr("class", "state-title").text(stateDef.descriptions[0]);
74
- const titleBox = title.node().getBBox();
75
- const titleHeight = titleBox.height;
76
- const description = g.append("text").attr("x", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).attr(
77
- "y",
78
- titleHeight + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding * 0.4 + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.dividerMargin + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.textHeight
79
- ).attr("class", "state-description");
80
- let isFirst = true;
81
- let isSecond = true;
82
- stateDef.descriptions.forEach(function(descr) {
83
- if (!isFirst) {
84
- addTspan(description, descr, isSecond);
85
- isSecond = false;
86
- }
87
- isFirst = false;
88
- });
89
- const descrLine = g.append("line").attr("x1", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).attr("y1", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding + titleHeight + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.dividerMargin / 2).attr("y2", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding + titleHeight + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.dividerMargin / 2).attr("class", "descr-divider");
90
- const descrBox = description.node().getBBox();
91
- const width = Math.max(descrBox.width, titleBox.width);
92
- descrLine.attr("x2", width + 3 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding);
93
- g.insert("rect", ":first-child").attr("x", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).attr("y", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).attr("width", width + 2 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).attr("height", descrBox.height + titleHeight + 2 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).attr("rx", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.radius);
94
- return g;
95
- }, "drawDescrState");
96
- var addTitleAndBox = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)((g, stateDef, altBkg) => {
97
- const pad = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding;
98
- const dblPad = 2 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding;
99
- const orgBox = g.node().getBBox();
100
- const orgWidth = orgBox.width;
101
- const orgX = orgBox.x;
102
- const title = g.append("text").attr("x", 0).attr("y", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.titleShift).attr("font-size", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.fontSize).attr("class", "state-title").text(stateDef.id);
103
- const titleBox = title.node().getBBox();
104
- const titleWidth = titleBox.width + dblPad;
105
- let width = Math.max(titleWidth, orgWidth);
106
- if (width === orgWidth) {
107
- width = width + dblPad;
108
- }
109
- let startX;
110
- const graphBox = g.node().getBBox();
111
- if (stateDef.doc) {
112
- }
113
- startX = orgX - pad;
114
- if (titleWidth > orgWidth) {
115
- startX = (orgWidth - width) / 2 + pad;
116
- }
117
- if (Math.abs(orgX - graphBox.x) < pad && titleWidth > orgWidth) {
118
- startX = orgX - (titleWidth - orgWidth) / 2;
119
- }
120
- const lineY = 1 - (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.textHeight;
121
- g.insert("rect", ":first-child").attr("x", startX).attr("y", lineY).attr("class", altBkg ? "alt-composit" : "composit").attr("width", width).attr(
122
- "height",
123
- graphBox.height + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.textHeight + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.titleShift + 1
124
- ).attr("rx", "0");
125
- title.attr("x", startX + pad);
126
- if (titleWidth <= orgWidth) {
127
- title.attr("x", orgX + (width - dblPad) / 2 - titleWidth / 2 + pad);
128
- }
129
- g.insert("rect", ":first-child").attr("x", startX).attr(
130
- "y",
131
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.titleShift - (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.textHeight - (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding
132
- ).attr("width", width).attr("height", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.textHeight * 3).attr("rx", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.radius);
133
- g.insert("rect", ":first-child").attr("x", startX).attr(
134
- "y",
135
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.titleShift - (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.textHeight - (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding
136
- ).attr("width", width).attr("height", graphBox.height + 3 + 2 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.textHeight).attr("rx", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.radius);
137
- return g;
138
- }, "addTitleAndBox");
139
- var drawEndState = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)((g) => {
140
- g.append("circle").attr("class", "end-state-outer").attr("r", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.sizeUnit + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.miniPadding).attr(
141
- "cx",
142
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.sizeUnit + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.miniPadding
143
- ).attr(
144
- "cy",
145
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.sizeUnit + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.miniPadding
146
- );
147
- return g.append("circle").attr("class", "end-state-inner").attr("r", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.sizeUnit).attr("cx", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.sizeUnit + 2).attr("cy", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.sizeUnit + 2);
148
- }, "drawEndState");
149
- var drawForkJoinState = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)((g, stateDef) => {
150
- let width = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.forkWidth;
151
- let height = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.forkHeight;
152
- if (stateDef.parentId) {
153
- let tmp = width;
154
- width = height;
155
- height = tmp;
156
- }
157
- return g.append("rect").style("stroke", "black").style("fill", "black").attr("width", width).attr("height", height).attr("x", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).attr("y", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding);
158
- }, "drawForkJoinState");
159
- var _drawLongText = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)((_text, x, y, g) => {
160
- let textHeight = 0;
161
- const textElem = g.append("text");
162
- textElem.style("text-anchor", "start");
163
- textElem.attr("class", "noteText");
164
- let text = _text.replace(/\r\n/g, "<br/>");
165
- text = text.replace(/\n/g, "<br/>");
166
- const lines = text.split(_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .common_default */ .Y2.lineBreakRegex);
167
- let tHeight = 1.25 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.noteMargin;
168
- for (const line2 of lines) {
169
- const txt = line2.trim();
170
- if (txt.length > 0) {
171
- const span = textElem.append("tspan");
172
- span.text(txt);
173
- if (tHeight === 0) {
174
- const textBounds = span.node().getBBox();
175
- tHeight += textBounds.height;
176
- }
177
- textHeight += tHeight;
178
- span.attr("x", x + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.noteMargin);
179
- span.attr("y", y + textHeight + 1.25 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.noteMargin);
180
- }
181
- }
182
- return { textWidth: textElem.node().getBBox().width, textHeight };
183
- }, "_drawLongText");
184
- var drawNote = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)((text, g) => {
185
- g.attr("class", "state-note");
186
- const note = g.append("rect").attr("x", 0).attr("y", (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding);
187
- const rectElem = g.append("g");
188
- const { textWidth, textHeight } = _drawLongText(text, 0, 0, rectElem);
189
- note.attr("height", textHeight + 2 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.noteMargin);
190
- note.attr("width", textWidth + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.noteMargin * 2);
191
- return note;
192
- }, "drawNote");
193
- var drawState = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)(function(elem, stateDef) {
194
- const id = stateDef.id;
195
- const stateInfo = {
196
- id,
197
- label: stateDef.id,
198
- width: 0,
199
- height: 0
200
- };
201
- const g = elem.append("g").attr("id", id).attr("class", "stateGroup");
202
- if (stateDef.type === "start") {
203
- drawStartState(g);
204
- }
205
- if (stateDef.type === "end") {
206
- drawEndState(g);
207
- }
208
- if (stateDef.type === "fork" || stateDef.type === "join") {
209
- drawForkJoinState(g, stateDef);
210
- }
211
- if (stateDef.type === "note") {
212
- drawNote(stateDef.note.text, g);
213
- }
214
- if (stateDef.type === "divider") {
215
- drawDivider(g);
216
- }
217
- if (stateDef.type === "default" && stateDef.descriptions.length === 0) {
218
- drawSimpleState(g, stateDef);
219
- }
220
- if (stateDef.type === "default" && stateDef.descriptions.length > 0) {
221
- drawDescrState(g, stateDef);
222
- }
223
- const stateBox = g.node().getBBox();
224
- stateInfo.width = stateBox.width + 2 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding;
225
- stateInfo.height = stateBox.height + 2 * (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding;
226
- id_cache_default.set(id, stateInfo);
227
- return stateInfo;
228
- }, "drawState");
229
- var edgeCount = 0;
230
- var drawEdge = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)(function(elem, path, relation) {
231
- const getRelationType = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)(function(type) {
232
- switch (type) {
233
- case _chunk_5RIWM3LS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .stateDb_default */ .iP.relationType.AGGREGATION:
234
- return "aggregation";
235
- case _chunk_5RIWM3LS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .stateDb_default */ .iP.relationType.EXTENSION:
236
- return "extension";
237
- case _chunk_5RIWM3LS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .stateDb_default */ .iP.relationType.COMPOSITION:
238
- return "composition";
239
- case _chunk_5RIWM3LS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .stateDb_default */ .iP.relationType.DEPENDENCY:
240
- return "dependency";
241
- }
242
- }, "getRelationType");
243
- path.points = path.points.filter((p) => !Number.isNaN(p.y));
244
- const lineData = path.points;
245
- const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_9__/* .line */ .n8j)().x(function(d) {
246
- return d.x;
247
- }).y(function(d) {
248
- return d.y;
249
- }).curve(d3__WEBPACK_IMPORTED_MODULE_9__/* .curveBasis */ .qrM);
250
- const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", "edge" + edgeCount).attr("class", "transition");
251
- let url = "";
252
- if ((0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.arrowMarkerAbsolute) {
253
- url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search;
254
- url = url.replace(/\(/g, "\\(");
255
- url = url.replace(/\)/g, "\\)");
256
- }
257
- svgPath.attr(
258
- "marker-end",
259
- "url(" + url + "#" + getRelationType(_chunk_5RIWM3LS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .stateDb_default */ .iP.relationType.DEPENDENCY) + "End)"
260
- );
261
- if (relation.title !== void 0) {
262
- const label = elem.append("g").attr("class", "stateLabel");
263
- const { x, y } = _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_7__/* .utils_default */ ._K.calcLabelPosition(path.points);
264
- const rows = _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .common_default */ .Y2.getRows(relation.title);
265
- let titleHeight = 0;
266
- const titleRows = [];
267
- let maxWidth = 0;
268
- let minX = 0;
269
- for (let i = 0; i <= rows.length; i++) {
270
- const title = label.append("text").attr("text-anchor", "middle").text(rows[i]).attr("x", x).attr("y", y + titleHeight);
271
- const boundsTmp = title.node().getBBox();
272
- maxWidth = Math.max(maxWidth, boundsTmp.width);
273
- minX = Math.min(minX, boundsTmp.x);
274
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .log */ .Rm.info(boundsTmp.x, x, y + titleHeight);
275
- if (titleHeight === 0) {
276
- const titleBox = title.node().getBBox();
277
- titleHeight = titleBox.height;
278
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .log */ .Rm.info("Title height", titleHeight, y);
279
- }
280
- titleRows.push(title);
281
- }
282
- let boxHeight = titleHeight * rows.length;
283
- if (rows.length > 1) {
284
- const heightAdj = (rows.length - 1) * titleHeight * 0.5;
285
- titleRows.forEach((title, i) => title.attr("y", y + i * titleHeight - heightAdj));
286
- boxHeight = titleHeight * rows.length;
287
- }
288
- const bounds = label.node().getBBox();
289
- label.insert("rect", ":first-child").attr("class", "box").attr("x", x - maxWidth / 2 - (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding / 2).attr("y", y - boxHeight / 2 - (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding / 2 - 3.5).attr("width", maxWidth + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding).attr("height", boxHeight + (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state.padding);
290
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .log */ .Rm.info(bounds);
291
- }
292
- edgeCount++;
293
- }, "drawEdge");
294
-
295
- // src/diagrams/state/stateRenderer.js
296
- var conf;
297
- var transformationLog = {};
298
- var setConf = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)(function() {
299
- }, "setConf");
300
- var insertMarkers = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)(function(elem) {
301
- 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 19,7 L9,13 L14,7 L9,1 Z");
302
- }, "insertMarkers");
303
- var draw = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)(function(text, id, _version, diagObj) {
304
- conf = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().state;
305
- const securityLevel = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .getConfig2 */ .D7)().securityLevel;
306
- let sandboxElement;
307
- if (securityLevel === "sandbox") {
308
- sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_9__/* .select */ .Ltv)("#i" + id);
309
- }
310
- const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_9__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_9__/* .select */ .Ltv)("body");
311
- const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
312
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .log */ .Rm.debug("Rendering diagram " + text);
313
- const diagram2 = root.select(`[id='${id}']`);
314
- insertMarkers(diagram2);
315
- const rootDoc = diagObj.db.getRootDoc();
316
- renderDoc(rootDoc, diagram2, void 0, false, root, doc, diagObj);
317
- const padding = conf.padding;
318
- const bounds = diagram2.node().getBBox();
319
- const width = bounds.width + padding * 2;
320
- const height = bounds.height + padding * 2;
321
- const svgWidth = width * 1.75;
322
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .configureSvgSize */ .a$)(diagram2, height, svgWidth, conf.useMaxWidth);
323
- diagram2.attr(
324
- "viewBox",
325
- `${bounds.x - conf.padding} ${bounds.y - conf.padding} ` + width + " " + height
326
- );
327
- }, "draw");
328
- var getLabelWidth = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)((text) => {
329
- return text ? text.length * conf.fontSizeFactor : 1;
330
- }, "getLabelWidth");
331
- var renderDoc = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)((doc, diagram2, parentId, altBkg, root, domDocument, diagObj) => {
332
- const graph = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_11__/* .Graph */ .T({
333
- compound: true,
334
- multigraph: true
335
- });
336
- let i;
337
- let edgeFreeDoc = true;
338
- for (i = 0; i < doc.length; i++) {
339
- if (doc[i].stmt === "relation") {
340
- edgeFreeDoc = false;
341
- break;
342
- }
343
- }
344
- if (parentId) {
345
- graph.setGraph({
346
- rankdir: "LR",
347
- multigraph: true,
348
- compound: true,
349
- // acyclicer: 'greedy',
350
- ranker: "tight-tree",
351
- ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,
352
- nodeSep: edgeFreeDoc ? 1 : 50,
353
- isMultiGraph: true
354
- // ranksep: 5,
355
- // nodesep: 1
356
- });
357
- } else {
358
- graph.setGraph({
359
- rankdir: "TB",
360
- multigraph: true,
361
- compound: true,
362
- // isCompound: true,
363
- // acyclicer: 'greedy',
364
- // ranker: 'longest-path'
365
- ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,
366
- nodeSep: edgeFreeDoc ? 1 : 50,
367
- ranker: "tight-tree",
368
- // ranker: 'network-simplex'
369
- isMultiGraph: true
370
- });
371
- }
372
- graph.setDefaultEdgeLabel(function() {
373
- return {};
374
- });
375
- diagObj.db.extract(doc);
376
- const states = diagObj.db.getStates();
377
- const relations = diagObj.db.getRelations();
378
- const keys2 = Object.keys(states);
379
- let first = true;
380
- for (const key of keys2) {
381
- const stateDef = states[key];
382
- if (parentId) {
383
- stateDef.parentId = parentId;
384
- }
385
- let node;
386
- if (stateDef.doc) {
387
- let sub = diagram2.append("g").attr("id", stateDef.id).attr("class", "stateGroup");
388
- node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg, root, domDocument, diagObj);
389
- if (first) {
390
- sub = addTitleAndBox(sub, stateDef, altBkg);
391
- let boxBounds = sub.node().getBBox();
392
- node.width = boxBounds.width;
393
- node.height = boxBounds.height + conf.padding / 2;
394
- transformationLog[stateDef.id] = { y: conf.compositTitleSize };
395
- } else {
396
- let boxBounds = sub.node().getBBox();
397
- node.width = boxBounds.width;
398
- node.height = boxBounds.height;
399
- }
400
- } else {
401
- node = drawState(diagram2, stateDef, graph);
402
- }
403
- if (stateDef.note) {
404
- const noteDef = {
405
- descriptions: [],
406
- id: stateDef.id + "-note",
407
- note: stateDef.note,
408
- type: "note"
409
- };
410
- const note = drawState(diagram2, noteDef, graph);
411
- if (stateDef.note.position === "left of") {
412
- graph.setNode(node.id + "-note", note);
413
- graph.setNode(node.id, node);
414
- } else {
415
- graph.setNode(node.id, node);
416
- graph.setNode(node.id + "-note", note);
417
- }
418
- graph.setParent(node.id, node.id + "-group");
419
- graph.setParent(node.id + "-note", node.id + "-group");
420
- } else {
421
- graph.setNode(node.id, node);
422
- }
423
- }
424
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .log */ .Rm.debug("Count=", graph.nodeCount(), graph);
425
- let cnt = 0;
426
- relations.forEach(function(relation) {
427
- cnt++;
428
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .log */ .Rm.debug("Setting edge", relation);
429
- graph.setEdge(
430
- relation.id1,
431
- relation.id2,
432
- {
433
- relation,
434
- width: getLabelWidth(relation.title),
435
- height: conf.labelHeight * _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .common_default */ .Y2.getRows(relation.title).length,
436
- labelpos: "c"
437
- },
438
- "id" + cnt
439
- );
440
- });
441
- (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_10__/* .layout */ .Zp)(graph);
442
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .log */ .Rm.debug("Graph after layout", graph.nodes());
443
- const svgElem = diagram2.node();
444
- graph.nodes().forEach(function(v) {
445
- if (v !== void 0 && graph.node(v) !== void 0) {
446
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .log */ .Rm.warn("Node " + v + ": " + JSON.stringify(graph.node(v)));
447
- root.select("#" + svgElem.id + " #" + v).attr(
448
- "transform",
449
- "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + " )"
450
- );
451
- root.select("#" + svgElem.id + " #" + v).attr("data-x-shift", graph.node(v).x - graph.node(v).width / 2);
452
- const dividers = domDocument.querySelectorAll("#" + svgElem.id + " #" + v + " .divider");
453
- dividers.forEach((divider) => {
454
- const parent = divider.parentElement;
455
- let pWidth = 0;
456
- let pShift = 0;
457
- if (parent) {
458
- if (parent.parentElement) {
459
- pWidth = parent.parentElement.getBBox().width;
460
- }
461
- pShift = parseInt(parent.getAttribute("data-x-shift"), 10);
462
- if (Number.isNaN(pShift)) {
463
- pShift = 0;
464
- }
465
- }
466
- divider.setAttribute("x1", 0 - pShift + 8);
467
- divider.setAttribute("x2", pWidth - pShift - 8);
468
- });
469
- } else {
470
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .log */ .Rm.debug("No Node " + v + ": " + JSON.stringify(graph.node(v)));
471
- }
472
- });
473
- let stateBox = svgElem.getBBox();
474
- graph.edges().forEach(function(e) {
475
- if (e !== void 0 && graph.edge(e) !== void 0) {
476
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .log */ .Rm.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e)));
477
- drawEdge(diagram2, graph.edge(e), graph.edge(e).relation);
478
- }
479
- });
480
- stateBox = svgElem.getBBox();
481
- const stateInfo = {
482
- id: parentId ? parentId : "root",
483
- label: parentId ? parentId : "root",
484
- width: 0,
485
- height: 0
486
- };
487
- stateInfo.width = stateBox.width + 2 * conf.padding;
488
- stateInfo.height = stateBox.height + 2 * conf.padding;
489
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .log */ .Rm.debug("Doc rendered", stateInfo, graph);
490
- return stateInfo;
491
- }, "renderDoc");
492
- var stateRenderer_default = {
493
- setConf,
494
- draw
495
- };
496
-
497
- // src/diagrams/state/stateDiagram.ts
498
- var diagram = {
499
- parser: _chunk_5RIWM3LS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .stateDiagram_default */ .Zk,
500
- db: _chunk_5RIWM3LS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .stateDb_default */ .iP,
501
- renderer: stateRenderer_default,
502
- styles: _chunk_5RIWM3LS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .styles_default */ .tM,
503
- init: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_8__/* .__name */ .K2)((cnf) => {
504
- if (!cnf.state) {
505
- cnf.state = {};
506
- }
507
- cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;
508
- _chunk_5RIWM3LS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .stateDb_default */ .iP.clear();
509
- }, "init")
510
- };
511
-
512
-
513
-
514
- /***/ })
515
-
516
- };
517
- ;