@zukhruf/diagram 0.3.30 → 0.3.32
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/dist/lib/layouts/graph/areas.d.ts +27 -0
- package/dist/lib/layouts/graph/areas.d.ts.map +1 -0
- package/dist/lib/layouts/graph/areas.js +196 -0
- package/dist/lib/layouts/graph/areas.js.map +1 -0
- package/dist/lib/layouts/graph/graph-layout-result.d.ts +95 -0
- package/dist/lib/layouts/graph/graph-layout-result.d.ts.map +1 -0
- package/dist/lib/layouts/graph/graph-layout-result.js +2 -0
- package/dist/lib/layouts/graph/graph-layout-result.js.map +1 -0
- package/dist/lib/layouts/graph/graph-layout.d.ts +2 -1
- package/dist/lib/layouts/graph/graph-layout.d.ts.map +1 -1
- package/dist/lib/layouts/graph/graph-layout.js +5 -3
- package/dist/lib/layouts/graph/graph-layout.js.map +1 -1
- package/dist/lib/layouts/graph/gutters.d.ts +25 -0
- package/dist/lib/layouts/graph/gutters.d.ts.map +1 -0
- package/dist/lib/layouts/graph/gutters.js +124 -0
- package/dist/lib/layouts/graph/gutters.js.map +1 -0
- package/dist/lib/layouts/graph/layout.d.ts +10 -0
- package/dist/lib/layouts/graph/layout.d.ts.map +1 -0
- package/dist/lib/layouts/graph/layout.js +164 -0
- package/dist/lib/layouts/graph/layout.js.map +1 -0
- package/dist/lib/layouts/graph/legacy-graph-layout.d.ts +6 -0
- package/dist/lib/layouts/graph/legacy-graph-layout.d.ts.map +1 -0
- package/dist/lib/layouts/graph/legacy-graph-layout.js +542 -0
- package/dist/lib/layouts/graph/legacy-graph-layout.js.map +1 -0
- package/dist/lib/layouts/graph/measure.d.ts +44 -0
- package/dist/lib/layouts/graph/measure.d.ts.map +1 -0
- package/dist/lib/layouts/graph/measure.js +372 -0
- package/dist/lib/layouts/graph/measure.js.map +1 -0
- package/dist/lib/layouts/graph/node-content.d.ts +16 -0
- package/dist/lib/layouts/graph/node-content.d.ts.map +1 -0
- package/dist/lib/layouts/graph/node-content.js +323 -0
- package/dist/lib/layouts/graph/node-content.js.map +1 -0
- package/dist/lib/layouts/graph/text-block.d.ts +19 -0
- package/dist/lib/layouts/graph/text-block.d.ts.map +1 -0
- package/dist/lib/layouts/graph/text-block.js +86 -0
- package/dist/lib/layouts/graph/text-block.js.map +1 -0
- package/dist/lib/layouts/graph/tokens.d.ts +53 -0
- package/dist/lib/layouts/graph/tokens.d.ts.map +1 -0
- package/dist/lib/layouts/graph/tokens.js +95 -0
- package/dist/lib/layouts/graph/tokens.js.map +1 -0
- package/dist/lib/layouts/graph/tracks.d.ts +20 -0
- package/dist/lib/layouts/graph/tracks.d.ts.map +1 -0
- package/dist/lib/layouts/graph/tracks.js +47 -0
- package/dist/lib/layouts/graph/tracks.js.map +1 -0
- package/dist/lib/layouts/text/font-metrics.generated.d.ts +18 -0
- package/dist/lib/layouts/text/font-metrics.generated.d.ts.map +1 -0
- package/dist/lib/layouts/text/font-metrics.generated.js +1043 -0
- package/dist/lib/layouts/text/font-metrics.generated.js.map +1 -0
- package/dist/lib/layouts/text/font.d.ts +14 -0
- package/dist/lib/layouts/text/font.d.ts.map +1 -0
- package/dist/lib/layouts/text/font.js +11 -0
- package/dist/lib/layouts/text/font.js.map +1 -0
- package/dist/lib/layouts/text/measure-text.d.ts +13 -0
- package/dist/lib/layouts/text/measure-text.d.ts.map +1 -0
- package/dist/lib/layouts/text/measure-text.js +67 -0
- package/dist/lib/layouts/text/measure-text.js.map +1 -0
- package/dist/lib/model/diagram-ir.d.ts +11 -1
- package/dist/lib/model/diagram-ir.d.ts.map +1 -1
- package/dist/lib/model/diagram-ir.js.map +1 -1
- package/dist/lib/renderers/canvas/graph-canvas.d.ts.map +1 -1
- package/dist/lib/renderers/canvas/graph-canvas.js +148 -138
- package/dist/lib/renderers/canvas/graph-canvas.js.map +1 -1
- package/dist/lib/renderers/html/graph-html.d.ts.map +1 -1
- package/dist/lib/renderers/html/graph-html.js +462 -511
- package/dist/lib/renderers/html/graph-html.js.map +1 -1
- package/dist/lib/renderers/shared/graph-parts.d.ts +15 -13
- package/dist/lib/renderers/shared/graph-parts.d.ts.map +1 -1
- package/dist/lib/renderers/shared/graph-parts.js +649 -644
- package/dist/lib/renderers/shared/graph-parts.js.map +1 -1
- package/dist/lib/renderers/shared/node-parts.d.ts +20 -19
- package/dist/lib/renderers/shared/node-parts.d.ts.map +1 -1
- package/dist/lib/renderers/shared/node-parts.js +678 -811
- package/dist/lib/renderers/shared/node-parts.js.map +1 -1
- package/dist/lib/renderers/shared/run-spans.d.ts +8 -0
- package/dist/lib/renderers/shared/run-spans.d.ts.map +1 -0
- package/dist/lib/renderers/shared/run-spans.js +18 -0
- package/dist/lib/renderers/shared/run-spans.js.map +1 -0
- package/dist/lib/renderers/shared/text-runs.d.ts +21 -0
- package/dist/lib/renderers/shared/text-runs.d.ts.map +1 -0
- package/dist/lib/renderers/shared/text-runs.js +44 -0
- package/dist/lib/renderers/shared/text-runs.js.map +1 -0
- package/dist/lib/renderers/svg/graph-svg.d.ts.map +1 -1
- package/dist/lib/renderers/svg/graph-svg.js +304 -465
- package/dist/lib/renderers/svg/graph-svg.js.map +1 -1
- package/dist/lib/renderers/svg/timeline-svg.d.ts.map +1 -1
- package/dist/lib/renderers/svg/timeline-svg.js +10 -5
- package/dist/lib/renderers/svg/timeline-svg.js.map +1 -1
- package/dist/lib/renderers/webgpu/graph-flow-effects.d.ts +2 -2
- package/dist/lib/renderers/webgpu/graph-flow-effects.d.ts.map +1 -1
- package/dist/lib/renderers/webgpu/graph-flow-effects.js.map +1 -1
- package/package.json +3 -1
- package/styles.css +8 -0
|
@@ -1,18 +1,45 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { motion, useTransform } from 'motion/react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { ANNOTATION_NOTE_PREFIX } from "../../layouts/graph/legacy-graph-layout.js";
|
|
4
|
+
import { FONT_FAMILY } from "../../layouts/text/font.js";
|
|
5
|
+
import { DIAGRAM_BG, DIAGRAM_DIM, DIAGRAM_NEUTRAL, DIAGRAM_TEXT, resolveDiagramToneFill, useDiagramTheme } from "../../react/chrome/index.js";
|
|
6
|
+
import { DiagramNodeIcon, PortMarkers, accentToneStroke, nodeTextFill, textureFill } from "./graph-parts.js";
|
|
7
|
+
import { RunSpans } from "./run-spans.js";
|
|
6
8
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
9
|
export const ANNOTATION_REVEAL_START = 0.85;
|
|
8
10
|
export function isSpecialNode(node) {
|
|
9
11
|
return node.kind !== undefined && node.kind !== 'node';
|
|
10
12
|
}
|
|
13
|
+
function isNote(layout) {
|
|
14
|
+
return layout.node.kind === 'note';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Splits the graph's own nodes from the notes that stand for annotations. */
|
|
18
|
+
export function splitNotes(nodes) {
|
|
19
|
+
return {
|
|
20
|
+
graphNodes: nodes.filter(layout => !isNote(layout)),
|
|
21
|
+
notes: nodes.filter(isNote)
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function textAttrs(first) {
|
|
25
|
+
return {
|
|
26
|
+
x: first.x,
|
|
27
|
+
y: first.y,
|
|
28
|
+
textAnchor: first.anchor,
|
|
29
|
+
fontFamily: FONT_FAMILY[first.font.face],
|
|
30
|
+
fontSize: first.font.size,
|
|
31
|
+
fontWeight: first.font.weight
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function junctionFillColor(node, themeAccent) {
|
|
35
|
+
if (node.accent) return themeAccent;
|
|
36
|
+
if (node.tone) return resolveDiagramToneFill(node.tone);
|
|
37
|
+
return DIAGRAM_BG;
|
|
38
|
+
}
|
|
11
39
|
export function SpecialNode(t0) {
|
|
12
|
-
const $ = _c(
|
|
40
|
+
const $ = _c(177);
|
|
13
41
|
const {
|
|
14
|
-
|
|
15
|
-
box,
|
|
42
|
+
layout,
|
|
16
43
|
progress,
|
|
17
44
|
start,
|
|
18
45
|
end
|
|
@@ -67,131 +94,110 @@ export function SpecialNode(t0) {
|
|
|
67
94
|
t6 = $[9];
|
|
68
95
|
}
|
|
69
96
|
const translateY = useTransform(progress, t4, t5, t6);
|
|
70
|
-
|
|
71
|
-
|
|
97
|
+
const {
|
|
98
|
+
node,
|
|
99
|
+
box,
|
|
100
|
+
radius,
|
|
101
|
+
icon,
|
|
102
|
+
text,
|
|
103
|
+
appliance
|
|
104
|
+
} = layout;
|
|
72
105
|
let fill;
|
|
73
|
-
let
|
|
74
|
-
let lines;
|
|
106
|
+
let first;
|
|
75
107
|
let t7;
|
|
76
|
-
if ($[10] !==
|
|
108
|
+
if ($[10] !== appliance || $[11] !== box || $[12] !== icon || $[13] !== ids || $[14] !== layout || $[15] !== node || $[16] !== opacity || $[17] !== radius || $[18] !== text || $[19] !== themeAccent || $[20] !== translateY) {
|
|
77
109
|
t7 = Symbol.for("react.early_return_sentinel");
|
|
78
110
|
bb0: {
|
|
79
111
|
fill = nodeTextFill(node, node.frame ?? "solid", themeAccent);
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
lineHeight = Math.max(12, fontSize + 2);
|
|
83
|
-
centerY = box.y + box.h / 2;
|
|
84
|
-
cx = box.x + box.w / 2;
|
|
85
|
-
if (node.kind === "appliance") {
|
|
112
|
+
[first] = text;
|
|
113
|
+
if (node.kind === "appliance" && appliance) {
|
|
86
114
|
let t8;
|
|
87
|
-
if ($[
|
|
88
|
-
t8 = node
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
92
|
-
$[25] = t8;
|
|
115
|
+
if ($[24] !== node || $[25] !== themeAccent) {
|
|
116
|
+
t8 = accentToneStroke(node, themeAccent, DIAGRAM_NEUTRAL);
|
|
117
|
+
$[24] = node;
|
|
118
|
+
$[25] = themeAccent;
|
|
119
|
+
$[26] = t8;
|
|
93
120
|
} else {
|
|
94
|
-
t8 = $[
|
|
121
|
+
t8 = $[26];
|
|
95
122
|
}
|
|
96
123
|
const applianceStroke = t8;
|
|
97
124
|
let t9;
|
|
98
|
-
if ($[
|
|
125
|
+
if ($[27] !== node.tone) {
|
|
99
126
|
t9 = node.tone ? resolveDiagramToneFill(node.tone) : DIAGRAM_BG;
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
127
|
+
$[27] = node.tone;
|
|
128
|
+
$[28] = t9;
|
|
102
129
|
} else {
|
|
103
|
-
t9 = $[
|
|
130
|
+
t9 = $[28];
|
|
104
131
|
}
|
|
105
132
|
const applianceFill = t9;
|
|
106
133
|
const t10 = node.texture ?? "none";
|
|
107
134
|
let t11;
|
|
108
|
-
if ($[
|
|
135
|
+
if ($[29] !== ids || $[30] !== t10) {
|
|
109
136
|
t11 = textureFill(t10, ids);
|
|
110
|
-
$[
|
|
111
|
-
$[
|
|
112
|
-
$[
|
|
137
|
+
$[29] = ids;
|
|
138
|
+
$[30] = t10;
|
|
139
|
+
$[31] = t11;
|
|
113
140
|
} else {
|
|
114
|
-
t11 = $[
|
|
141
|
+
t11 = $[31];
|
|
115
142
|
}
|
|
116
143
|
const applianceTexture = t11;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
const t12 = `M ${bodyX + slant} ${bodyY}`;
|
|
123
|
-
const t13 = `L ${bodyX + bodyW} ${bodyY + 6}`;
|
|
124
|
-
const t14 = `L ${bodyX + bodyW - slant} ${bodyY + bodyH}`;
|
|
125
|
-
const t15 = `L ${bodyX} ${bodyY + bodyH - 6}`;
|
|
126
|
-
let t16;
|
|
127
|
-
if ($[31] !== t12 || $[32] !== t13 || $[33] !== t14 || $[34] !== t15) {
|
|
128
|
-
t16 = [t12, t13, t14, t15, "Z"];
|
|
129
|
-
$[31] = t12;
|
|
130
|
-
$[32] = t13;
|
|
131
|
-
$[33] = t14;
|
|
132
|
-
$[34] = t15;
|
|
133
|
-
$[35] = t16;
|
|
144
|
+
let t12;
|
|
145
|
+
if ($[32] !== appliance.body) {
|
|
146
|
+
t12 = [...appliance.body.map(_temp), "Z"];
|
|
147
|
+
$[32] = appliance.body;
|
|
148
|
+
$[33] = t12;
|
|
134
149
|
} else {
|
|
135
|
-
|
|
150
|
+
t12 = $[33];
|
|
136
151
|
}
|
|
137
|
-
const bodyPath =
|
|
138
|
-
const
|
|
139
|
-
const
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
const labelY = bodyY + bodyH + Math.max(12, fontSize + 2);
|
|
145
|
-
const t17 = node.id;
|
|
146
|
-
let t18;
|
|
147
|
-
if ($[36] !== opacity || $[37] !== translateY) {
|
|
148
|
-
t18 = {
|
|
152
|
+
const bodyPath = t12.join(" ");
|
|
153
|
+
const [faceFrom, faceTo] = appliance.face;
|
|
154
|
+
const [rod, mast] = appliance.antenna;
|
|
155
|
+
const t13 = node.id;
|
|
156
|
+
let t14;
|
|
157
|
+
if ($[34] !== opacity || $[35] !== translateY) {
|
|
158
|
+
t14 = {
|
|
149
159
|
opacity,
|
|
150
160
|
y: translateY
|
|
151
161
|
};
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
$[
|
|
162
|
+
$[34] = opacity;
|
|
163
|
+
$[35] = translateY;
|
|
164
|
+
$[36] = t14;
|
|
155
165
|
} else {
|
|
156
|
-
|
|
166
|
+
t14 = $[36];
|
|
157
167
|
}
|
|
158
|
-
let
|
|
159
|
-
if ($[
|
|
160
|
-
|
|
168
|
+
let t15;
|
|
169
|
+
if ($[37] !== applianceStroke || $[38] !== mast || $[39] !== node.id || $[40] !== rod) {
|
|
170
|
+
t15 = rod && mast && /*#__PURE__*/_jsxs("g", {
|
|
161
171
|
"data-diagram-appliance-antenna": node.id,
|
|
162
172
|
children: [/*#__PURE__*/_jsx("line", {
|
|
163
|
-
x1:
|
|
164
|
-
y1:
|
|
165
|
-
x2:
|
|
166
|
-
y2:
|
|
173
|
+
x1: rod[0].x,
|
|
174
|
+
y1: rod[0].y,
|
|
175
|
+
x2: rod[1].x,
|
|
176
|
+
y2: rod[1].y,
|
|
167
177
|
stroke: applianceStroke,
|
|
168
178
|
strokeWidth: 1.5,
|
|
169
179
|
strokeLinecap: "round"
|
|
170
180
|
}), /*#__PURE__*/_jsx("line", {
|
|
171
|
-
x1:
|
|
172
|
-
y1:
|
|
173
|
-
x2:
|
|
174
|
-
y2:
|
|
181
|
+
x1: mast[0].x,
|
|
182
|
+
y1: mast[0].y,
|
|
183
|
+
x2: mast[1].x,
|
|
184
|
+
y2: mast[1].y,
|
|
175
185
|
stroke: applianceStroke,
|
|
176
186
|
strokeWidth: 1,
|
|
177
187
|
strokeLinecap: "round"
|
|
178
188
|
})]
|
|
179
189
|
});
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
$[
|
|
184
|
-
$[
|
|
185
|
-
$[44] = node.id;
|
|
186
|
-
$[45] = showAntenna;
|
|
187
|
-
$[46] = slant;
|
|
188
|
-
$[47] = t19;
|
|
190
|
+
$[37] = applianceStroke;
|
|
191
|
+
$[38] = mast;
|
|
192
|
+
$[39] = node.id;
|
|
193
|
+
$[40] = rod;
|
|
194
|
+
$[41] = t15;
|
|
189
195
|
} else {
|
|
190
|
-
|
|
196
|
+
t15 = $[41];
|
|
191
197
|
}
|
|
192
|
-
let
|
|
193
|
-
if ($[
|
|
194
|
-
|
|
198
|
+
let t16;
|
|
199
|
+
if ($[42] !== applianceFill || $[43] !== applianceStroke || $[44] !== bodyPath || $[45] !== node.id || $[46] !== node.tone) {
|
|
200
|
+
t16 = /*#__PURE__*/_jsx("path", {
|
|
195
201
|
"data-diagram-node": node.id,
|
|
196
202
|
"data-diagram-node-tone": node.tone,
|
|
197
203
|
"data-diagram-appliance-body": node.id,
|
|
@@ -201,216 +207,178 @@ export function SpecialNode(t0) {
|
|
|
201
207
|
strokeWidth: 1.5,
|
|
202
208
|
strokeLinejoin: "round"
|
|
203
209
|
});
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
+
$[42] = applianceFill;
|
|
211
|
+
$[43] = applianceStroke;
|
|
212
|
+
$[44] = bodyPath;
|
|
213
|
+
$[45] = node.id;
|
|
214
|
+
$[46] = node.tone;
|
|
215
|
+
$[47] = t16;
|
|
210
216
|
} else {
|
|
211
|
-
|
|
217
|
+
t16 = $[47];
|
|
212
218
|
}
|
|
213
|
-
let
|
|
214
|
-
if ($[
|
|
215
|
-
|
|
219
|
+
let t17;
|
|
220
|
+
if ($[48] !== applianceTexture || $[49] !== bodyPath || $[50] !== node.id || $[51] !== node.texture) {
|
|
221
|
+
t17 = applianceTexture && /*#__PURE__*/_jsx("path", {
|
|
216
222
|
"data-diagram-node-texture": `${node.id}:${node.texture ?? "none"}`,
|
|
217
223
|
d: bodyPath,
|
|
218
224
|
fill: applianceTexture,
|
|
219
225
|
pointerEvents: "none"
|
|
220
226
|
});
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
227
|
+
$[48] = applianceTexture;
|
|
228
|
+
$[49] = bodyPath;
|
|
229
|
+
$[50] = node.id;
|
|
230
|
+
$[51] = node.texture;
|
|
231
|
+
$[52] = t17;
|
|
226
232
|
} else {
|
|
227
|
-
|
|
233
|
+
t17 = $[52];
|
|
228
234
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
const t25 = bodyY + bodyH + 3;
|
|
233
|
-
let t26;
|
|
234
|
-
if ($[59] !== applianceStroke || $[60] !== node.id || $[61] !== t22 || $[62] !== t23 || $[63] !== t24 || $[64] !== t25) {
|
|
235
|
-
t26 = /*#__PURE__*/_jsx("line", {
|
|
235
|
+
let t18;
|
|
236
|
+
if ($[53] !== applianceStroke || $[54] !== faceFrom.x || $[55] !== faceFrom.y || $[56] !== faceTo.x || $[57] !== faceTo.y || $[58] !== node.id) {
|
|
237
|
+
t18 = /*#__PURE__*/_jsx("line", {
|
|
236
238
|
"data-diagram-appliance-face": node.id,
|
|
237
|
-
x1:
|
|
238
|
-
y1:
|
|
239
|
-
x2:
|
|
240
|
-
y2:
|
|
239
|
+
x1: faceFrom.x,
|
|
240
|
+
y1: faceFrom.y,
|
|
241
|
+
x2: faceTo.x,
|
|
242
|
+
y2: faceTo.y,
|
|
241
243
|
stroke: applianceStroke,
|
|
242
244
|
strokeWidth: 1,
|
|
243
245
|
strokeLinecap: "round",
|
|
244
246
|
opacity: 0.85
|
|
245
247
|
});
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
248
|
+
$[53] = applianceStroke;
|
|
249
|
+
$[54] = faceFrom.x;
|
|
250
|
+
$[55] = faceFrom.y;
|
|
251
|
+
$[56] = faceTo.x;
|
|
252
|
+
$[57] = faceTo.y;
|
|
253
|
+
$[58] = node.id;
|
|
254
|
+
$[59] = t18;
|
|
253
255
|
} else {
|
|
254
|
-
|
|
256
|
+
t18 = $[59];
|
|
255
257
|
}
|
|
256
|
-
let
|
|
257
|
-
if ($[
|
|
258
|
-
let
|
|
259
|
-
if ($[
|
|
260
|
-
|
|
261
|
-
"data-diagram-appliance-port": `${node.id}:${
|
|
262
|
-
x:
|
|
263
|
-
y:
|
|
264
|
-
width:
|
|
265
|
-
height:
|
|
258
|
+
let t19;
|
|
259
|
+
if ($[60] !== appliance.jacks || $[61] !== applianceStroke || $[62] !== node.id) {
|
|
260
|
+
let t20;
|
|
261
|
+
if ($[64] !== applianceStroke || $[65] !== node.id) {
|
|
262
|
+
t20 = (jack, i_0) => /*#__PURE__*/_jsx("rect", {
|
|
263
|
+
"data-diagram-appliance-port": `${node.id}:${i_0}`,
|
|
264
|
+
x: jack.x,
|
|
265
|
+
y: jack.y,
|
|
266
|
+
width: jack.w,
|
|
267
|
+
height: jack.h,
|
|
266
268
|
rx: 1,
|
|
267
269
|
fill: DIAGRAM_BG,
|
|
268
270
|
stroke: applianceStroke,
|
|
269
271
|
strokeWidth: 1
|
|
270
|
-
},
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
$[
|
|
274
|
-
$[76] = portStartX;
|
|
275
|
-
$[77] = portY;
|
|
276
|
-
$[78] = t28;
|
|
272
|
+
}, i_0);
|
|
273
|
+
$[64] = applianceStroke;
|
|
274
|
+
$[65] = node.id;
|
|
275
|
+
$[66] = t20;
|
|
277
276
|
} else {
|
|
278
|
-
|
|
277
|
+
t20 = $[66];
|
|
279
278
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
$[
|
|
284
|
-
$[
|
|
285
|
-
$[68] = portSpacing;
|
|
286
|
-
$[69] = portStartX;
|
|
287
|
-
$[70] = portY;
|
|
288
|
-
$[71] = visualPortCount;
|
|
289
|
-
$[72] = t27;
|
|
279
|
+
t19 = appliance.jacks.map(t20);
|
|
280
|
+
$[60] = appliance.jacks;
|
|
281
|
+
$[61] = applianceStroke;
|
|
282
|
+
$[62] = node.id;
|
|
283
|
+
$[63] = t19;
|
|
290
284
|
} else {
|
|
291
|
-
|
|
285
|
+
t19 = $[63];
|
|
292
286
|
}
|
|
293
|
-
const
|
|
287
|
+
const t20 = first && /*#__PURE__*/_jsx("text", {
|
|
294
288
|
"data-diagram-appliance-label": node.id,
|
|
295
|
-
|
|
296
|
-
y: labelY,
|
|
297
|
-
textAnchor: "middle",
|
|
298
|
-
fontFamily: "ui-sans-serif, system-ui, sans-serif",
|
|
299
|
-
fontSize: fontSize,
|
|
300
|
-
fontWeight: node.fontWeight ?? 600,
|
|
289
|
+
...textAttrs(first),
|
|
301
290
|
fill: fill,
|
|
302
|
-
children:
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
x: cx,
|
|
307
|
-
dy: i_0 === 0 ? 0 : lineHeight,
|
|
308
|
-
fill: lineFill,
|
|
309
|
-
fontWeight: typeof line_0 === "string" ? node.fontWeight ?? 600 : line_0.fontWeight ?? node.fontWeight ?? 600,
|
|
310
|
-
children: lineText
|
|
311
|
-
}, i_0);
|
|
291
|
+
children: /*#__PURE__*/_jsx(RunSpans, {
|
|
292
|
+
runs: text,
|
|
293
|
+
fill: fill,
|
|
294
|
+
accent: themeAccent
|
|
312
295
|
})
|
|
313
296
|
});
|
|
314
|
-
let
|
|
315
|
-
let
|
|
316
|
-
if ($[
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
box: box
|
|
297
|
+
let t21;
|
|
298
|
+
let t22;
|
|
299
|
+
if ($[67] !== layout) {
|
|
300
|
+
t21 = /*#__PURE__*/_jsx(NodePorts, {
|
|
301
|
+
layout: layout
|
|
320
302
|
});
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
box: box
|
|
303
|
+
t22 = /*#__PURE__*/_jsx(NodeCaption, {
|
|
304
|
+
layout: layout
|
|
324
305
|
});
|
|
325
|
-
$[
|
|
326
|
-
$[
|
|
327
|
-
$[
|
|
328
|
-
$[82] = t30;
|
|
306
|
+
$[67] = layout;
|
|
307
|
+
$[68] = t21;
|
|
308
|
+
$[69] = t22;
|
|
329
309
|
} else {
|
|
330
|
-
|
|
331
|
-
|
|
310
|
+
t21 = $[68];
|
|
311
|
+
t22 = $[69];
|
|
332
312
|
}
|
|
333
|
-
let
|
|
334
|
-
if ($[
|
|
335
|
-
|
|
336
|
-
"data-diagram-appliance":
|
|
337
|
-
style:
|
|
338
|
-
children: [
|
|
313
|
+
let t23;
|
|
314
|
+
if ($[70] !== node.id || $[71] !== t14 || $[72] !== t15 || $[73] !== t16 || $[74] !== t17 || $[75] !== t18 || $[76] !== t19 || $[77] !== t20 || $[78] !== t21 || $[79] !== t22) {
|
|
315
|
+
t23 = /*#__PURE__*/_jsxs(motion.g, {
|
|
316
|
+
"data-diagram-appliance": t13,
|
|
317
|
+
style: t14,
|
|
318
|
+
children: [t15, t16, t17, t18, t19, t20, t21, t22]
|
|
339
319
|
});
|
|
340
|
-
$[
|
|
341
|
-
$[
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
320
|
+
$[70] = node.id;
|
|
321
|
+
$[71] = t14;
|
|
322
|
+
$[72] = t15;
|
|
323
|
+
$[73] = t16;
|
|
324
|
+
$[74] = t17;
|
|
325
|
+
$[75] = t18;
|
|
326
|
+
$[76] = t19;
|
|
327
|
+
$[77] = t20;
|
|
328
|
+
$[78] = t21;
|
|
329
|
+
$[79] = t22;
|
|
330
|
+
$[80] = t23;
|
|
351
331
|
} else {
|
|
352
|
-
|
|
332
|
+
t23 = $[80];
|
|
353
333
|
}
|
|
354
|
-
t7 =
|
|
334
|
+
t7 = t23;
|
|
355
335
|
break bb0;
|
|
356
336
|
}
|
|
357
337
|
if (node.kind === "connector") {
|
|
358
338
|
let t8;
|
|
359
|
-
if ($[
|
|
360
|
-
t8 = node
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
364
|
-
$[97] = t8;
|
|
339
|
+
if ($[81] !== node || $[82] !== themeAccent) {
|
|
340
|
+
t8 = accentToneStroke(node, themeAccent, DIAGRAM_NEUTRAL);
|
|
341
|
+
$[81] = node;
|
|
342
|
+
$[82] = themeAccent;
|
|
343
|
+
$[83] = t8;
|
|
365
344
|
} else {
|
|
366
|
-
t8 = $[
|
|
345
|
+
t8 = $[83];
|
|
367
346
|
}
|
|
368
347
|
const connectorStroke = t8;
|
|
369
348
|
let t9;
|
|
370
|
-
if ($[
|
|
349
|
+
if ($[84] !== node.tone) {
|
|
371
350
|
t9 = node.tone ? resolveDiagramToneFill(node.tone) : DIAGRAM_BG;
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
351
|
+
$[84] = node.tone;
|
|
352
|
+
$[85] = t9;
|
|
374
353
|
} else {
|
|
375
|
-
t9 = $[
|
|
354
|
+
t9 = $[85];
|
|
376
355
|
}
|
|
377
356
|
const connectorFill = t9;
|
|
378
357
|
const t10 = node.texture ?? (node.tone ? "dots" : "none");
|
|
379
358
|
let t11;
|
|
380
|
-
if ($[
|
|
359
|
+
if ($[86] !== ids || $[87] !== t10) {
|
|
381
360
|
t11 = textureFill(t10, ids);
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
361
|
+
$[86] = ids;
|
|
362
|
+
$[87] = t10;
|
|
363
|
+
$[88] = t11;
|
|
385
364
|
} else {
|
|
386
|
-
t11 = $[
|
|
365
|
+
t11 = $[88];
|
|
387
366
|
}
|
|
388
367
|
const connectorTexture = t11;
|
|
389
|
-
const connectorRx = node.rx ?? Math.min(12, box.h / 2);
|
|
390
|
-
const connectorIconSize = node.iconSize ?? 18;
|
|
391
|
-
const connectorFontSize = node.fontSize ?? 10;
|
|
392
|
-
const connectorLineHeight = Math.max(12, connectorFontSize + 2);
|
|
393
|
-
const connectorLines = lines.filter(_temp2);
|
|
394
|
-
const hasConnectorText = connectorLines.length > 0;
|
|
395
|
-
const iconX = box.x + 10;
|
|
396
|
-
const iconY = centerY - connectorIconSize / 2;
|
|
397
|
-
const textX = node.icon ? iconX + connectorIconSize + 8 : box.x + box.w / 2;
|
|
398
|
-
const textAnchor = node.icon ? "start" : "middle";
|
|
399
|
-
const textY = centerY - (connectorLines.length - 1) * connectorLineHeight / 2 + connectorFontSize * 0.35;
|
|
400
368
|
let t12;
|
|
401
|
-
if ($[
|
|
369
|
+
if ($[89] !== opacity || $[90] !== translateY) {
|
|
402
370
|
t12 = {
|
|
403
371
|
opacity,
|
|
404
372
|
y: translateY
|
|
405
373
|
};
|
|
406
|
-
$[
|
|
407
|
-
$[
|
|
408
|
-
$[
|
|
374
|
+
$[89] = opacity;
|
|
375
|
+
$[90] = translateY;
|
|
376
|
+
$[91] = t12;
|
|
409
377
|
} else {
|
|
410
|
-
t12 = $[
|
|
378
|
+
t12 = $[91];
|
|
411
379
|
}
|
|
412
380
|
let t13;
|
|
413
|
-
if ($[
|
|
381
|
+
if ($[92] !== box.h || $[93] !== box.w || $[94] !== box.x || $[95] !== box.y || $[96] !== connectorFill || $[97] !== connectorStroke || $[98] !== node.id || $[99] !== node.tone || $[100] !== radius) {
|
|
414
382
|
t13 = /*#__PURE__*/_jsx("rect", {
|
|
415
383
|
"data-diagram-node": node.id,
|
|
416
384
|
"data-diagram-connector": node.id,
|
|
@@ -419,584 +387,499 @@ export function SpecialNode(t0) {
|
|
|
419
387
|
y: box.y,
|
|
420
388
|
width: box.w,
|
|
421
389
|
height: box.h,
|
|
422
|
-
rx:
|
|
390
|
+
rx: radius,
|
|
423
391
|
fill: connectorFill,
|
|
424
392
|
stroke: connectorStroke,
|
|
425
393
|
strokeWidth: 1.25
|
|
426
394
|
});
|
|
427
|
-
$[
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
$[
|
|
432
|
-
$[
|
|
433
|
-
$[
|
|
434
|
-
$[
|
|
435
|
-
$[
|
|
436
|
-
$[
|
|
395
|
+
$[92] = box.h;
|
|
396
|
+
$[93] = box.w;
|
|
397
|
+
$[94] = box.x;
|
|
398
|
+
$[95] = box.y;
|
|
399
|
+
$[96] = connectorFill;
|
|
400
|
+
$[97] = connectorStroke;
|
|
401
|
+
$[98] = node.id;
|
|
402
|
+
$[99] = node.tone;
|
|
403
|
+
$[100] = radius;
|
|
404
|
+
$[101] = t13;
|
|
437
405
|
} else {
|
|
438
|
-
t13 = $[
|
|
406
|
+
t13 = $[101];
|
|
439
407
|
}
|
|
440
408
|
let t14;
|
|
441
|
-
if ($[
|
|
409
|
+
if ($[102] !== box.h || $[103] !== box.w || $[104] !== box.x || $[105] !== box.y || $[106] !== connectorTexture || $[107] !== node.id || $[108] !== node.texture || $[109] !== radius) {
|
|
442
410
|
t14 = connectorTexture && /*#__PURE__*/_jsx("rect", {
|
|
443
411
|
"data-diagram-node-texture": `${node.id}:${node.texture ?? "dots"}`,
|
|
444
412
|
x: box.x,
|
|
445
413
|
y: box.y,
|
|
446
414
|
width: box.w,
|
|
447
415
|
height: box.h,
|
|
448
|
-
rx:
|
|
416
|
+
rx: radius,
|
|
449
417
|
fill: connectorTexture,
|
|
450
418
|
pointerEvents: "none"
|
|
451
419
|
});
|
|
452
|
-
$[
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
455
|
-
$[
|
|
456
|
-
$[
|
|
457
|
-
$[
|
|
458
|
-
$[
|
|
459
|
-
$[
|
|
460
|
-
$[
|
|
420
|
+
$[102] = box.h;
|
|
421
|
+
$[103] = box.w;
|
|
422
|
+
$[104] = box.x;
|
|
423
|
+
$[105] = box.y;
|
|
424
|
+
$[106] = connectorTexture;
|
|
425
|
+
$[107] = node.id;
|
|
426
|
+
$[108] = node.texture;
|
|
427
|
+
$[109] = radius;
|
|
428
|
+
$[110] = t14;
|
|
461
429
|
} else {
|
|
462
|
-
t14 = $[
|
|
430
|
+
t14 = $[110];
|
|
463
431
|
}
|
|
464
|
-
const t15 = node.icon && /*#__PURE__*/_jsx(DiagramNodeIcon, {
|
|
432
|
+
const t15 = node.icon && icon && /*#__PURE__*/_jsx(DiagramNodeIcon, {
|
|
465
433
|
icon: node.icon,
|
|
466
|
-
x:
|
|
467
|
-
y:
|
|
468
|
-
size:
|
|
434
|
+
x: icon.x,
|
|
435
|
+
y: icon.y,
|
|
436
|
+
size: icon.size,
|
|
469
437
|
color: fill
|
|
470
438
|
});
|
|
471
|
-
const t16 =
|
|
439
|
+
const t16 = first && /*#__PURE__*/_jsx("text", {
|
|
472
440
|
"data-diagram-connector-label": node.id,
|
|
473
|
-
|
|
474
|
-
y: textY,
|
|
475
|
-
textAnchor: textAnchor,
|
|
476
|
-
fontFamily: "ui-sans-serif, system-ui, sans-serif",
|
|
477
|
-
fontSize: connectorFontSize,
|
|
478
|
-
fontWeight: node.fontWeight ?? 700,
|
|
441
|
+
...textAttrs(first),
|
|
479
442
|
fill: fill,
|
|
480
|
-
children:
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
x: textX,
|
|
485
|
-
dy: i_1 === 0 ? 0 : connectorLineHeight,
|
|
486
|
-
fill: lineFill_0,
|
|
487
|
-
fontWeight: typeof line_2 === "string" ? node.fontWeight ?? 700 : line_2.fontWeight ?? node.fontWeight ?? 700,
|
|
488
|
-
children: lineText_0
|
|
489
|
-
}, i_1);
|
|
443
|
+
children: /*#__PURE__*/_jsx(RunSpans, {
|
|
444
|
+
runs: text,
|
|
445
|
+
fill: fill,
|
|
446
|
+
accent: themeAccent
|
|
490
447
|
})
|
|
491
448
|
});
|
|
492
449
|
let t17;
|
|
493
450
|
let t18;
|
|
494
|
-
if ($[
|
|
451
|
+
if ($[111] !== layout) {
|
|
495
452
|
t17 = /*#__PURE__*/_jsx(NodePorts, {
|
|
496
|
-
|
|
497
|
-
box: box
|
|
453
|
+
layout: layout
|
|
498
454
|
});
|
|
499
455
|
t18 = /*#__PURE__*/_jsx(NodeCaption, {
|
|
500
|
-
|
|
501
|
-
box: box
|
|
456
|
+
layout: layout
|
|
502
457
|
});
|
|
503
|
-
$[
|
|
504
|
-
$[
|
|
505
|
-
$[
|
|
506
|
-
$[128] = t18;
|
|
458
|
+
$[111] = layout;
|
|
459
|
+
$[112] = t17;
|
|
460
|
+
$[113] = t18;
|
|
507
461
|
} else {
|
|
508
|
-
t17 = $[
|
|
509
|
-
t18 = $[
|
|
462
|
+
t17 = $[112];
|
|
463
|
+
t18 = $[113];
|
|
510
464
|
}
|
|
511
465
|
let t19;
|
|
512
|
-
if ($[
|
|
466
|
+
if ($[114] !== t12 || $[115] !== t13 || $[116] !== t14 || $[117] !== t15 || $[118] !== t16 || $[119] !== t17 || $[120] !== t18) {
|
|
513
467
|
t19 = /*#__PURE__*/_jsxs(motion.g, {
|
|
514
468
|
style: t12,
|
|
515
469
|
children: [t13, t14, t15, t16, t17, t18]
|
|
516
470
|
});
|
|
517
|
-
$[
|
|
518
|
-
$[
|
|
519
|
-
$[
|
|
520
|
-
$[
|
|
521
|
-
$[
|
|
522
|
-
$[
|
|
523
|
-
$[
|
|
524
|
-
$[
|
|
471
|
+
$[114] = t12;
|
|
472
|
+
$[115] = t13;
|
|
473
|
+
$[116] = t14;
|
|
474
|
+
$[117] = t15;
|
|
475
|
+
$[118] = t16;
|
|
476
|
+
$[119] = t17;
|
|
477
|
+
$[120] = t18;
|
|
478
|
+
$[121] = t19;
|
|
525
479
|
} else {
|
|
526
|
-
t19 = $[
|
|
480
|
+
t19 = $[121];
|
|
527
481
|
}
|
|
528
482
|
t7 = t19;
|
|
529
483
|
break bb0;
|
|
530
484
|
}
|
|
531
|
-
if (node.kind === "marker") {
|
|
532
|
-
const
|
|
533
|
-
const markerFontSize = node.fontSize ?? 11;
|
|
534
|
-
const markerLineHeight = Math.max(12, markerFontSize + 2);
|
|
535
|
-
const markerLines = lines.filter(_temp3);
|
|
536
|
-
const labelGap = markerLines.length > 0 ? 8 : 0;
|
|
537
|
-
const labelBlockHeight = markerLines.length * markerLineHeight;
|
|
538
|
-
const totalHeight = markerIconSize + labelGap + labelBlockHeight;
|
|
485
|
+
if (node.kind === "marker" && icon) {
|
|
486
|
+
const markerStroke = accentToneStroke(node, themeAccent, fill);
|
|
539
487
|
let t8;
|
|
540
|
-
if ($[
|
|
541
|
-
t8 =
|
|
542
|
-
$[137] = cx;
|
|
543
|
-
$[138] = markerIconSize;
|
|
544
|
-
$[139] = t8;
|
|
545
|
-
} else {
|
|
546
|
-
t8 = $[139];
|
|
547
|
-
}
|
|
548
|
-
const iconX_0 = t8;
|
|
549
|
-
const iconY_0 = Math.round(box.y + (box.h - totalHeight) / 2);
|
|
550
|
-
const markerLabelY = iconY_0 + markerIconSize + labelGap + markerFontSize;
|
|
551
|
-
const markerStroke = node.accent ? themeAccent : node.tone ? resolveDiagramToneStroke(node.tone) : fill;
|
|
552
|
-
let t9;
|
|
553
|
-
if ($[140] !== opacity || $[141] !== translateY) {
|
|
554
|
-
t9 = {
|
|
488
|
+
if ($[122] !== opacity || $[123] !== translateY) {
|
|
489
|
+
t8 = {
|
|
555
490
|
opacity,
|
|
556
491
|
y: translateY
|
|
557
492
|
};
|
|
558
|
-
$[
|
|
559
|
-
$[
|
|
560
|
-
$[
|
|
493
|
+
$[122] = opacity;
|
|
494
|
+
$[123] = translateY;
|
|
495
|
+
$[124] = t8;
|
|
561
496
|
} else {
|
|
562
|
-
|
|
497
|
+
t8 = $[124];
|
|
563
498
|
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
t11 = /*#__PURE__*/_jsx("rect", {
|
|
499
|
+
let t9;
|
|
500
|
+
if ($[125] !== box.h || $[126] !== box.w || $[127] !== box.x || $[128] !== box.y || $[129] !== node.id || $[130] !== radius) {
|
|
501
|
+
t9 = /*#__PURE__*/_jsx("rect", {
|
|
568
502
|
"data-diagram-node": node.id,
|
|
569
503
|
"data-diagram-marker-bounds": node.id,
|
|
570
504
|
x: box.x,
|
|
571
505
|
y: box.y,
|
|
572
506
|
width: box.w,
|
|
573
507
|
height: box.h,
|
|
574
|
-
rx:
|
|
508
|
+
rx: radius,
|
|
575
509
|
fill: "transparent",
|
|
576
510
|
stroke: "none"
|
|
577
511
|
});
|
|
578
|
-
$[
|
|
579
|
-
$[
|
|
580
|
-
$[
|
|
581
|
-
$[
|
|
582
|
-
$[
|
|
583
|
-
$[
|
|
584
|
-
$[
|
|
512
|
+
$[125] = box.h;
|
|
513
|
+
$[126] = box.w;
|
|
514
|
+
$[127] = box.x;
|
|
515
|
+
$[128] = box.y;
|
|
516
|
+
$[129] = node.id;
|
|
517
|
+
$[130] = radius;
|
|
518
|
+
$[131] = t9;
|
|
585
519
|
} else {
|
|
586
|
-
|
|
520
|
+
t9 = $[131];
|
|
587
521
|
}
|
|
588
|
-
|
|
589
|
-
let
|
|
590
|
-
if ($[
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
box: box
|
|
522
|
+
const t10 = node.icon ?? "ellipsis";
|
|
523
|
+
let t11;
|
|
524
|
+
if ($[132] !== icon.size || $[133] !== icon.x || $[134] !== icon.y || $[135] !== markerStroke || $[136] !== t10) {
|
|
525
|
+
t11 = /*#__PURE__*/_jsx(DiagramNodeIcon, {
|
|
526
|
+
icon: t10,
|
|
527
|
+
x: icon.x,
|
|
528
|
+
y: icon.y,
|
|
529
|
+
size: icon.size,
|
|
530
|
+
color: markerStroke
|
|
598
531
|
});
|
|
599
|
-
$[
|
|
600
|
-
$[
|
|
601
|
-
$[
|
|
602
|
-
$[
|
|
532
|
+
$[132] = icon.size;
|
|
533
|
+
$[133] = icon.x;
|
|
534
|
+
$[134] = icon.y;
|
|
535
|
+
$[135] = markerStroke;
|
|
536
|
+
$[136] = t10;
|
|
537
|
+
$[137] = t11;
|
|
603
538
|
} else {
|
|
604
|
-
|
|
605
|
-
t13 = $[153];
|
|
539
|
+
t11 = $[137];
|
|
606
540
|
}
|
|
607
|
-
|
|
608
|
-
"data-diagram-marker": node.id,
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
y: iconY_0,
|
|
614
|
-
size: markerIconSize,
|
|
615
|
-
color: markerStroke
|
|
616
|
-
}), markerLines.length > 0 && /*#__PURE__*/_jsx("text", {
|
|
617
|
-
"data-diagram-marker-label": node.id,
|
|
618
|
-
x: cx,
|
|
619
|
-
y: markerLabelY,
|
|
620
|
-
textAnchor: "middle",
|
|
621
|
-
fontFamily: "ui-sans-serif, system-ui, sans-serif",
|
|
622
|
-
fontSize: markerFontSize,
|
|
623
|
-
fontWeight: node.fontWeight ?? 700,
|
|
541
|
+
const t12 = first && /*#__PURE__*/_jsx("text", {
|
|
542
|
+
"data-diagram-marker-label": node.id,
|
|
543
|
+
...textAttrs(first),
|
|
544
|
+
fill: fill,
|
|
545
|
+
children: /*#__PURE__*/_jsx(RunSpans, {
|
|
546
|
+
runs: text,
|
|
624
547
|
fill: fill,
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
const lineFill_1 = labelLineFill(line_4, fill, themeAccent);
|
|
628
|
-
return /*#__PURE__*/_jsx("tspan", {
|
|
629
|
-
x: cx,
|
|
630
|
-
dy: i_2 === 0 ? 0 : markerLineHeight,
|
|
631
|
-
fill: lineFill_1,
|
|
632
|
-
fontWeight: typeof line_4 === "string" ? node.fontWeight ?? 700 : line_4.fontWeight ?? node.fontWeight ?? 700,
|
|
633
|
-
children: lineText_1
|
|
634
|
-
}, i_2);
|
|
635
|
-
})
|
|
636
|
-
}), t12, t13]
|
|
548
|
+
accent: themeAccent
|
|
549
|
+
})
|
|
637
550
|
});
|
|
551
|
+
let t13;
|
|
552
|
+
let t14;
|
|
553
|
+
if ($[138] !== layout) {
|
|
554
|
+
t13 = /*#__PURE__*/_jsx(NodePorts, {
|
|
555
|
+
layout: layout
|
|
556
|
+
});
|
|
557
|
+
t14 = /*#__PURE__*/_jsx(NodeCaption, {
|
|
558
|
+
layout: layout
|
|
559
|
+
});
|
|
560
|
+
$[138] = layout;
|
|
561
|
+
$[139] = t13;
|
|
562
|
+
$[140] = t14;
|
|
563
|
+
} else {
|
|
564
|
+
t13 = $[139];
|
|
565
|
+
t14 = $[140];
|
|
566
|
+
}
|
|
567
|
+
let t15;
|
|
568
|
+
if ($[141] !== node.id || $[142] !== t11 || $[143] !== t12 || $[144] !== t13 || $[145] !== t14 || $[146] !== t8 || $[147] !== t9) {
|
|
569
|
+
t15 = /*#__PURE__*/_jsxs(motion.g, {
|
|
570
|
+
"data-diagram-marker": node.id,
|
|
571
|
+
style: t8,
|
|
572
|
+
children: [t9, t11, t12, t13, t14]
|
|
573
|
+
});
|
|
574
|
+
$[141] = node.id;
|
|
575
|
+
$[142] = t11;
|
|
576
|
+
$[143] = t12;
|
|
577
|
+
$[144] = t13;
|
|
578
|
+
$[145] = t14;
|
|
579
|
+
$[146] = t8;
|
|
580
|
+
$[147] = t9;
|
|
581
|
+
$[148] = t15;
|
|
582
|
+
} else {
|
|
583
|
+
t15 = $[148];
|
|
584
|
+
}
|
|
585
|
+
t7 = t15;
|
|
638
586
|
break bb0;
|
|
639
587
|
}
|
|
640
588
|
}
|
|
641
|
-
$[10] =
|
|
642
|
-
$[11] =
|
|
643
|
-
$[12] =
|
|
644
|
-
$[13] =
|
|
645
|
-
$[14] =
|
|
646
|
-
$[15] =
|
|
647
|
-
$[16] =
|
|
648
|
-
$[17] =
|
|
649
|
-
$[18] =
|
|
650
|
-
$[19] =
|
|
651
|
-
$[20] =
|
|
652
|
-
$[21] =
|
|
589
|
+
$[10] = appliance;
|
|
590
|
+
$[11] = box;
|
|
591
|
+
$[12] = icon;
|
|
592
|
+
$[13] = ids;
|
|
593
|
+
$[14] = layout;
|
|
594
|
+
$[15] = node;
|
|
595
|
+
$[16] = opacity;
|
|
596
|
+
$[17] = radius;
|
|
597
|
+
$[18] = text;
|
|
598
|
+
$[19] = themeAccent;
|
|
599
|
+
$[20] = translateY;
|
|
600
|
+
$[21] = fill;
|
|
601
|
+
$[22] = first;
|
|
602
|
+
$[23] = t7;
|
|
653
603
|
} else {
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
lineHeight = $[19];
|
|
658
|
-
lines = $[20];
|
|
659
|
-
t7 = $[21];
|
|
604
|
+
fill = $[21];
|
|
605
|
+
first = $[22];
|
|
606
|
+
t7 = $[23];
|
|
660
607
|
}
|
|
661
608
|
if (t7 !== Symbol.for("react.early_return_sentinel")) {
|
|
662
609
|
return t7;
|
|
663
610
|
}
|
|
664
611
|
if (node.kind === "junction") {
|
|
665
612
|
let t8;
|
|
666
|
-
if ($[
|
|
667
|
-
t8 = node
|
|
668
|
-
$[
|
|
669
|
-
$[
|
|
670
|
-
$[
|
|
671
|
-
$[157] = t8;
|
|
613
|
+
if ($[149] !== node || $[150] !== themeAccent) {
|
|
614
|
+
t8 = accentToneStroke(node, themeAccent, DIAGRAM_NEUTRAL);
|
|
615
|
+
$[149] = node;
|
|
616
|
+
$[150] = themeAccent;
|
|
617
|
+
$[151] = t8;
|
|
672
618
|
} else {
|
|
673
|
-
t8 = $[
|
|
619
|
+
t8 = $[151];
|
|
674
620
|
}
|
|
675
621
|
const junctionStroke = t8;
|
|
676
622
|
let t9;
|
|
677
|
-
if ($[
|
|
678
|
-
t9 = node
|
|
679
|
-
$[
|
|
680
|
-
$[
|
|
681
|
-
$[
|
|
682
|
-
$[161] = t9;
|
|
623
|
+
if ($[152] !== node || $[153] !== themeAccent) {
|
|
624
|
+
t9 = junctionFillColor(node, themeAccent);
|
|
625
|
+
$[152] = node;
|
|
626
|
+
$[153] = themeAccent;
|
|
627
|
+
$[154] = t9;
|
|
683
628
|
} else {
|
|
684
|
-
t9 = $[
|
|
629
|
+
t9 = $[154];
|
|
685
630
|
}
|
|
686
631
|
const junctionFill = t9;
|
|
687
632
|
let t10;
|
|
688
|
-
if ($[
|
|
633
|
+
if ($[155] !== opacity || $[156] !== translateY) {
|
|
689
634
|
t10 = {
|
|
690
635
|
opacity,
|
|
691
636
|
y: translateY
|
|
692
637
|
};
|
|
693
|
-
$[
|
|
694
|
-
$[
|
|
695
|
-
$[
|
|
638
|
+
$[155] = opacity;
|
|
639
|
+
$[156] = translateY;
|
|
640
|
+
$[157] = t10;
|
|
696
641
|
} else {
|
|
697
|
-
t10 = $[
|
|
642
|
+
t10 = $[157];
|
|
698
643
|
}
|
|
699
|
-
const t11 =
|
|
700
|
-
const t12 =
|
|
644
|
+
const t11 = box.x + box.w / 2;
|
|
645
|
+
const t12 = box.y + box.h / 2;
|
|
701
646
|
let t13;
|
|
702
|
-
if ($[
|
|
647
|
+
if ($[158] !== junctionFill || $[159] !== junctionStroke || $[160] !== node.id || $[161] !== radius || $[162] !== t11 || $[163] !== t12) {
|
|
703
648
|
t13 = /*#__PURE__*/_jsx("circle", {
|
|
704
|
-
"data-diagram-junction":
|
|
705
|
-
cx:
|
|
706
|
-
cy:
|
|
707
|
-
r:
|
|
649
|
+
"data-diagram-junction": node.id,
|
|
650
|
+
cx: t11,
|
|
651
|
+
cy: t12,
|
|
652
|
+
r: radius,
|
|
708
653
|
fill: junctionFill,
|
|
709
654
|
stroke: junctionStroke,
|
|
710
655
|
strokeWidth: 1.5
|
|
711
656
|
});
|
|
712
|
-
$[
|
|
713
|
-
$[
|
|
714
|
-
$[
|
|
715
|
-
$[
|
|
716
|
-
$[
|
|
717
|
-
$[
|
|
718
|
-
$[
|
|
657
|
+
$[158] = junctionFill;
|
|
658
|
+
$[159] = junctionStroke;
|
|
659
|
+
$[160] = node.id;
|
|
660
|
+
$[161] = radius;
|
|
661
|
+
$[162] = t11;
|
|
662
|
+
$[163] = t12;
|
|
663
|
+
$[164] = t13;
|
|
719
664
|
} else {
|
|
720
|
-
t13 = $[
|
|
665
|
+
t13 = $[164];
|
|
721
666
|
}
|
|
722
667
|
let t14;
|
|
723
|
-
if ($[
|
|
724
|
-
t14 =
|
|
668
|
+
if ($[165] !== fill || $[166] !== first || $[167] !== node.id || $[168] !== text) {
|
|
669
|
+
t14 = first && /*#__PURE__*/_jsx("text", {
|
|
725
670
|
"data-diagram-junction-label": node.id,
|
|
726
|
-
|
|
727
|
-
y: centerY - Math.max(8, box.h / 2 + 6),
|
|
728
|
-
textAnchor: "middle",
|
|
729
|
-
fontFamily: "ui-monospace, 'Geist Mono', monospace",
|
|
730
|
-
fontSize: node.fontSize ?? 10,
|
|
731
|
-
fontWeight: node.fontWeight ?? 600,
|
|
671
|
+
...textAttrs(first),
|
|
732
672
|
fill: fill,
|
|
733
|
-
children:
|
|
734
|
-
|
|
735
|
-
return /*#__PURE__*/_jsx("tspan", {
|
|
736
|
-
x: cx,
|
|
737
|
-
dy: i_3 === 0 ? 0 : lineHeight,
|
|
738
|
-
children: lineText_2
|
|
739
|
-
}, i_3);
|
|
673
|
+
children: /*#__PURE__*/_jsx(RunSpans, {
|
|
674
|
+
runs: text
|
|
740
675
|
})
|
|
741
676
|
});
|
|
742
|
-
$[
|
|
743
|
-
$[
|
|
744
|
-
$[
|
|
745
|
-
$[
|
|
746
|
-
$[
|
|
747
|
-
$[177] = lines;
|
|
748
|
-
$[178] = node.fontSize;
|
|
749
|
-
$[179] = node.fontWeight;
|
|
750
|
-
$[180] = node.id;
|
|
751
|
-
$[181] = t14;
|
|
677
|
+
$[165] = fill;
|
|
678
|
+
$[166] = first;
|
|
679
|
+
$[167] = node.id;
|
|
680
|
+
$[168] = text;
|
|
681
|
+
$[169] = t14;
|
|
752
682
|
} else {
|
|
753
|
-
t14 = $[
|
|
683
|
+
t14 = $[169];
|
|
754
684
|
}
|
|
755
685
|
let t15;
|
|
756
|
-
if ($[
|
|
686
|
+
if ($[170] !== layout) {
|
|
757
687
|
t15 = /*#__PURE__*/_jsx(NodeCaption, {
|
|
758
|
-
|
|
759
|
-
box: box
|
|
688
|
+
layout: layout
|
|
760
689
|
});
|
|
761
|
-
$[
|
|
762
|
-
$[
|
|
763
|
-
$[184] = t15;
|
|
690
|
+
$[170] = layout;
|
|
691
|
+
$[171] = t15;
|
|
764
692
|
} else {
|
|
765
|
-
t15 = $[
|
|
693
|
+
t15 = $[171];
|
|
766
694
|
}
|
|
767
695
|
let t16;
|
|
768
|
-
if ($[
|
|
696
|
+
if ($[172] !== t10 || $[173] !== t13 || $[174] !== t14 || $[175] !== t15) {
|
|
769
697
|
t16 = /*#__PURE__*/_jsxs(motion.g, {
|
|
770
698
|
style: t10,
|
|
771
699
|
children: [t13, t14, t15]
|
|
772
700
|
});
|
|
773
|
-
$[
|
|
774
|
-
$[
|
|
775
|
-
$[
|
|
776
|
-
$[
|
|
777
|
-
$[
|
|
701
|
+
$[172] = t10;
|
|
702
|
+
$[173] = t13;
|
|
703
|
+
$[174] = t14;
|
|
704
|
+
$[175] = t15;
|
|
705
|
+
$[176] = t16;
|
|
778
706
|
} else {
|
|
779
|
-
t16 = $[
|
|
707
|
+
t16 = $[176];
|
|
780
708
|
}
|
|
781
709
|
return t16;
|
|
782
710
|
}
|
|
783
711
|
return null;
|
|
784
712
|
}
|
|
785
|
-
function
|
|
786
|
-
return
|
|
787
|
-
}
|
|
788
|
-
function _temp2(line_1) {
|
|
789
|
-
return typeof line_1 === "string" ? line_1.length > 0 : line_1.text.length > 0;
|
|
790
|
-
}
|
|
791
|
-
function _temp(line) {
|
|
792
|
-
return typeof line === "string" ? line.length > 0 : line.text.length > 0;
|
|
713
|
+
function _temp(point, i) {
|
|
714
|
+
return `${i === 0 ? "M" : "L"} ${point.x} ${point.y}`;
|
|
793
715
|
}
|
|
794
716
|
export function NodeStackFrames({
|
|
795
|
-
|
|
796
|
-
box,
|
|
797
|
-
rx,
|
|
717
|
+
layout,
|
|
798
718
|
fill,
|
|
799
719
|
stroke,
|
|
800
720
|
strokeWidth
|
|
801
721
|
}) {
|
|
802
|
-
const
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
722
|
+
const {
|
|
723
|
+
node,
|
|
724
|
+
frames,
|
|
725
|
+
radius
|
|
726
|
+
} = layout;
|
|
727
|
+
return frames.map((frame, i) => ({
|
|
728
|
+
frame,
|
|
729
|
+
level: i + 1
|
|
730
|
+
})).reverse().map(({
|
|
731
|
+
frame,
|
|
732
|
+
level
|
|
733
|
+
}) => /*#__PURE__*/_jsx("rect", {
|
|
734
|
+
"data-diagram-node-stack": `${node.id}:${level}`,
|
|
735
|
+
x: frame.x,
|
|
736
|
+
y: frame.y,
|
|
737
|
+
width: frame.w,
|
|
738
|
+
height: frame.h,
|
|
739
|
+
rx: radius,
|
|
740
|
+
fill: fill,
|
|
741
|
+
stroke: stroke,
|
|
742
|
+
strokeWidth: strokeWidth
|
|
743
|
+
}, `stack-${level}`));
|
|
820
744
|
}
|
|
821
745
|
export function NodePorts(t0) {
|
|
822
|
-
const $ = _c(
|
|
746
|
+
const $ = _c(4);
|
|
823
747
|
const {
|
|
824
|
-
|
|
825
|
-
box
|
|
748
|
+
layout
|
|
826
749
|
} = t0;
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
$[2] = t2;
|
|
834
|
-
} else {
|
|
835
|
-
t2 = $[2];
|
|
836
|
-
}
|
|
837
|
-
let t3;
|
|
838
|
-
if ($[3] !== node.id || $[4] !== t2) {
|
|
839
|
-
t3 = /*#__PURE__*/_jsx(PortMarkers, {
|
|
840
|
-
ownerId: t1,
|
|
841
|
-
placements: t2
|
|
750
|
+
let t1;
|
|
751
|
+
if ($[0] !== layout.node.id || $[1] !== layout.node.ports || $[2] !== layout.ports) {
|
|
752
|
+
t1 = /*#__PURE__*/_jsx(PortMarkers, {
|
|
753
|
+
ownerId: layout.node.id,
|
|
754
|
+
ports: layout.ports,
|
|
755
|
+
declared: layout.node.ports
|
|
842
756
|
});
|
|
843
|
-
$[
|
|
844
|
-
$[
|
|
845
|
-
$[
|
|
757
|
+
$[0] = layout.node.id;
|
|
758
|
+
$[1] = layout.node.ports;
|
|
759
|
+
$[2] = layout.ports;
|
|
760
|
+
$[3] = t1;
|
|
846
761
|
} else {
|
|
847
|
-
|
|
762
|
+
t1 = $[3];
|
|
848
763
|
}
|
|
849
|
-
return
|
|
764
|
+
return t1;
|
|
765
|
+
}
|
|
766
|
+
function textColorFill(color, accent) {
|
|
767
|
+
if (color === 'accent') return accent;
|
|
768
|
+
if (color === 'dim') return DIAGRAM_DIM;
|
|
769
|
+
return DIAGRAM_TEXT;
|
|
850
770
|
}
|
|
851
771
|
export function NodeCaption(t0) {
|
|
852
|
-
const $ = _c(
|
|
772
|
+
const $ = _c(21);
|
|
853
773
|
const {
|
|
854
|
-
|
|
855
|
-
box
|
|
774
|
+
layout
|
|
856
775
|
} = t0;
|
|
857
776
|
const {
|
|
858
777
|
accent: themeAccent
|
|
859
778
|
} = useDiagramTheme();
|
|
779
|
+
const {
|
|
780
|
+
node,
|
|
781
|
+
caption
|
|
782
|
+
} = layout;
|
|
860
783
|
let t1;
|
|
861
|
-
|
|
862
|
-
|
|
784
|
+
if ($[0] !== caption?.text) {
|
|
785
|
+
t1 = caption?.text ?? [];
|
|
786
|
+
$[0] = caption?.text;
|
|
787
|
+
$[1] = t1;
|
|
788
|
+
} else {
|
|
789
|
+
t1 = $[1];
|
|
790
|
+
}
|
|
791
|
+
const [first] = t1;
|
|
792
|
+
if (!caption || !first) {
|
|
793
|
+
return null;
|
|
794
|
+
}
|
|
863
795
|
let t2;
|
|
796
|
+
if ($[2] !== node.captionColor || $[3] !== themeAccent) {
|
|
797
|
+
t2 = textColorFill(node.captionColor, themeAccent);
|
|
798
|
+
$[2] = node.captionColor;
|
|
799
|
+
$[3] = themeAccent;
|
|
800
|
+
$[4] = t2;
|
|
801
|
+
} else {
|
|
802
|
+
t2 = $[4];
|
|
803
|
+
}
|
|
804
|
+
const fill = t2;
|
|
805
|
+
const frame = caption.framed ? caption.box : null;
|
|
864
806
|
let t3;
|
|
865
|
-
|
|
807
|
+
if ($[5] !== fill || $[6] !== frame || $[7] !== node.id) {
|
|
808
|
+
t3 = frame && /*#__PURE__*/_jsx("rect", {
|
|
809
|
+
"data-diagram-node-caption-frame": node.id,
|
|
810
|
+
x: frame.x,
|
|
811
|
+
y: frame.y,
|
|
812
|
+
width: frame.w,
|
|
813
|
+
height: frame.h,
|
|
814
|
+
rx: frame.h / 2,
|
|
815
|
+
fill: DIAGRAM_BG,
|
|
816
|
+
stroke: fill,
|
|
817
|
+
strokeWidth: 1
|
|
818
|
+
});
|
|
819
|
+
$[5] = fill;
|
|
820
|
+
$[6] = frame;
|
|
821
|
+
$[7] = node.id;
|
|
822
|
+
$[8] = t3;
|
|
823
|
+
} else {
|
|
824
|
+
t3 = $[8];
|
|
825
|
+
}
|
|
826
|
+
const t4 = node.id;
|
|
866
827
|
let t5;
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
if ($[0] !== box || $[1] !== node || $[2] !== themeAccent) {
|
|
872
|
-
t11 = Symbol.for("react.early_return_sentinel");
|
|
873
|
-
bb0: {
|
|
874
|
-
const placement = nodeCaptionPlacement(node, box);
|
|
875
|
-
if (!placement) {
|
|
876
|
-
t11 = null;
|
|
877
|
-
break bb0;
|
|
878
|
-
}
|
|
879
|
-
const fill = node.captionColor === "accent" ? themeAccent : node.captionColor === "dim" ? DIAGRAM_DIM : DIAGRAM_TEXT;
|
|
880
|
-
let t12;
|
|
881
|
-
if ($[14] !== box || $[15] !== node) {
|
|
882
|
-
t12 = node.captionFrame ? nodeCaptionBounds(node, box) : null;
|
|
883
|
-
$[14] = box;
|
|
884
|
-
$[15] = node;
|
|
885
|
-
$[16] = t12;
|
|
886
|
-
} else {
|
|
887
|
-
t12 = $[16];
|
|
888
|
-
}
|
|
889
|
-
const frame = t12;
|
|
890
|
-
if ($[17] !== fill || $[18] !== frame || $[19] !== node.id) {
|
|
891
|
-
t10 = frame && /*#__PURE__*/_jsx("rect", {
|
|
892
|
-
"data-diagram-node-caption-frame": node.id,
|
|
893
|
-
x: frame.x,
|
|
894
|
-
y: frame.y,
|
|
895
|
-
width: frame.w,
|
|
896
|
-
height: frame.h,
|
|
897
|
-
rx: frame.h / 2,
|
|
898
|
-
fill: DIAGRAM_BG,
|
|
899
|
-
stroke: fill,
|
|
900
|
-
strokeWidth: 1
|
|
901
|
-
});
|
|
902
|
-
$[17] = fill;
|
|
903
|
-
$[18] = frame;
|
|
904
|
-
$[19] = node.id;
|
|
905
|
-
$[20] = t10;
|
|
906
|
-
} else {
|
|
907
|
-
t10 = $[20];
|
|
908
|
-
}
|
|
909
|
-
t1 = node.id;
|
|
910
|
-
t2 = placement.x;
|
|
911
|
-
t3 = placement.y;
|
|
912
|
-
t4 = placement.align;
|
|
913
|
-
t5 = "ui-sans-serif, system-ui, sans-serif";
|
|
914
|
-
t6 = placement.fontSize;
|
|
915
|
-
t7 = node.captionFontWeight ?? 600;
|
|
916
|
-
t8 = fill;
|
|
917
|
-
t9 = placement.lines.map((line, i) => /*#__PURE__*/_jsx("tspan", {
|
|
918
|
-
x: placement.x,
|
|
919
|
-
dy: i === 0 ? 0 : placement.lineHeight,
|
|
920
|
-
children: line
|
|
921
|
-
}, i));
|
|
922
|
-
}
|
|
923
|
-
$[0] = box;
|
|
924
|
-
$[1] = node;
|
|
925
|
-
$[2] = themeAccent;
|
|
926
|
-
$[3] = t1;
|
|
927
|
-
$[4] = t10;
|
|
928
|
-
$[5] = t11;
|
|
929
|
-
$[6] = t2;
|
|
930
|
-
$[7] = t3;
|
|
931
|
-
$[8] = t4;
|
|
932
|
-
$[9] = t5;
|
|
933
|
-
$[10] = t6;
|
|
934
|
-
$[11] = t7;
|
|
935
|
-
$[12] = t8;
|
|
936
|
-
$[13] = t9;
|
|
828
|
+
if ($[9] !== first) {
|
|
829
|
+
t5 = textAttrs(first);
|
|
830
|
+
$[9] = first;
|
|
831
|
+
$[10] = t5;
|
|
937
832
|
} else {
|
|
938
|
-
|
|
939
|
-
t10 = $[4];
|
|
940
|
-
t11 = $[5];
|
|
941
|
-
t2 = $[6];
|
|
942
|
-
t3 = $[7];
|
|
943
|
-
t4 = $[8];
|
|
944
|
-
t5 = $[9];
|
|
945
|
-
t6 = $[10];
|
|
946
|
-
t7 = $[11];
|
|
947
|
-
t8 = $[12];
|
|
948
|
-
t9 = $[13];
|
|
833
|
+
t5 = $[10];
|
|
949
834
|
}
|
|
950
|
-
|
|
951
|
-
|
|
835
|
+
let t6;
|
|
836
|
+
if ($[11] !== caption.text) {
|
|
837
|
+
t6 = /*#__PURE__*/_jsx(RunSpans, {
|
|
838
|
+
runs: caption.text
|
|
839
|
+
});
|
|
840
|
+
$[11] = caption.text;
|
|
841
|
+
$[12] = t6;
|
|
842
|
+
} else {
|
|
843
|
+
t6 = $[12];
|
|
952
844
|
}
|
|
953
|
-
let
|
|
954
|
-
if ($[
|
|
955
|
-
|
|
956
|
-
"data-diagram-node-caption":
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
fontFamily: t5,
|
|
961
|
-
fontSize: t6,
|
|
962
|
-
fontWeight: t7,
|
|
963
|
-
fill: t8,
|
|
964
|
-
children: t9
|
|
845
|
+
let t7;
|
|
846
|
+
if ($[13] !== fill || $[14] !== node.id || $[15] !== t5 || $[16] !== t6) {
|
|
847
|
+
t7 = /*#__PURE__*/_jsx("text", {
|
|
848
|
+
"data-diagram-node-caption": t4,
|
|
849
|
+
...t5,
|
|
850
|
+
fill: fill,
|
|
851
|
+
children: t6
|
|
965
852
|
});
|
|
966
|
-
$[
|
|
967
|
-
$[
|
|
968
|
-
$[
|
|
969
|
-
$[
|
|
970
|
-
$[
|
|
971
|
-
$[26] = t6;
|
|
972
|
-
$[27] = t7;
|
|
973
|
-
$[28] = t8;
|
|
974
|
-
$[29] = t9;
|
|
975
|
-
$[30] = t12;
|
|
853
|
+
$[13] = fill;
|
|
854
|
+
$[14] = node.id;
|
|
855
|
+
$[15] = t5;
|
|
856
|
+
$[16] = t6;
|
|
857
|
+
$[17] = t7;
|
|
976
858
|
} else {
|
|
977
|
-
|
|
859
|
+
t7 = $[17];
|
|
978
860
|
}
|
|
979
|
-
let
|
|
980
|
-
if ($[
|
|
981
|
-
|
|
982
|
-
children: [
|
|
861
|
+
let t8;
|
|
862
|
+
if ($[18] !== t3 || $[19] !== t7) {
|
|
863
|
+
t8 = /*#__PURE__*/_jsxs(_Fragment, {
|
|
864
|
+
children: [t3, t7]
|
|
983
865
|
});
|
|
984
|
-
$[
|
|
985
|
-
$[
|
|
986
|
-
$[
|
|
866
|
+
$[18] = t3;
|
|
867
|
+
$[19] = t7;
|
|
868
|
+
$[20] = t8;
|
|
987
869
|
} else {
|
|
988
|
-
|
|
870
|
+
t8 = $[20];
|
|
989
871
|
}
|
|
990
|
-
return
|
|
872
|
+
return t8;
|
|
991
873
|
}
|
|
992
874
|
export function AnnotationText(t0) {
|
|
993
|
-
const $ = _c(
|
|
875
|
+
const $ = _c(46);
|
|
994
876
|
const {
|
|
995
|
-
|
|
877
|
+
note,
|
|
878
|
+
annotations,
|
|
879
|
+
leaders,
|
|
996
880
|
progress,
|
|
997
881
|
start,
|
|
998
|
-
end
|
|
999
|
-
index
|
|
882
|
+
end
|
|
1000
883
|
} = t0;
|
|
1001
884
|
const {
|
|
1002
885
|
accent: themeAccent
|
|
@@ -1024,183 +907,167 @@ export function AnnotationText(t0) {
|
|
|
1024
907
|
t3 = $[4];
|
|
1025
908
|
}
|
|
1026
909
|
const opacity = useTransform(progress, t1, t2, t3);
|
|
1027
|
-
const fill = annotation.color === "accent" ? themeAccent : annotation.color === "dim" ? DIAGRAM_DIM : DIAGRAM_TEXT;
|
|
1028
|
-
const align = annotation.align ?? "middle";
|
|
1029
|
-
const fontSize = annotation.fontSize ?? 11;
|
|
1030
|
-
const fontWeight = annotation.fontWeight ?? 500;
|
|
1031
|
-
const lineGap = annotation.lineGap ?? 4;
|
|
1032
910
|
let t4;
|
|
1033
|
-
if ($[5] !==
|
|
1034
|
-
t4 =
|
|
1035
|
-
$[5] =
|
|
911
|
+
if ($[5] !== note.node.id) {
|
|
912
|
+
t4 = note.node.id.slice(ANNOTATION_NOTE_PREFIX.length);
|
|
913
|
+
$[5] = note.node.id;
|
|
1036
914
|
$[6] = t4;
|
|
1037
915
|
} else {
|
|
1038
916
|
t4 = $[6];
|
|
1039
917
|
}
|
|
1040
|
-
const
|
|
1041
|
-
const
|
|
918
|
+
const index = Number(t4);
|
|
919
|
+
const annotation = annotations[index];
|
|
920
|
+
if (!annotation) {
|
|
921
|
+
return null;
|
|
922
|
+
}
|
|
1042
923
|
let t5;
|
|
1043
|
-
if ($[7] !== annotation.
|
|
1044
|
-
t5 =
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
from: annotation.leaderFrom,
|
|
1049
|
-
to: annotation.leaderTo,
|
|
1050
|
-
points: [annotation.leaderFrom, annotation.leaderTo]
|
|
1051
|
-
}] : []);
|
|
1052
|
-
$[7] = annotation.anchor;
|
|
1053
|
-
$[8] = annotation.leaderFrom;
|
|
1054
|
-
$[9] = annotation.leaderTo;
|
|
1055
|
-
$[10] = annotation.leaders;
|
|
1056
|
-
$[11] = annotation.target;
|
|
1057
|
-
$[12] = t5;
|
|
924
|
+
if ($[7] !== annotation.color || $[8] !== themeAccent) {
|
|
925
|
+
t5 = textColorFill(annotation.color, themeAccent);
|
|
926
|
+
$[7] = annotation.color;
|
|
927
|
+
$[8] = themeAccent;
|
|
928
|
+
$[9] = t5;
|
|
1058
929
|
} else {
|
|
1059
|
-
t5 = $[
|
|
930
|
+
t5 = $[9];
|
|
1060
931
|
}
|
|
1061
|
-
const
|
|
932
|
+
const fill = t5;
|
|
933
|
+
const anchor = annotation.anchor ?? "top";
|
|
934
|
+
const route = annotation.leaderRoute ?? "straight";
|
|
1062
935
|
let t6;
|
|
1063
|
-
if ($[
|
|
1064
|
-
t6 =
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
$[13] = opacity;
|
|
1068
|
-
$[14] = t6;
|
|
936
|
+
if ($[10] !== annotation.targets) {
|
|
937
|
+
t6 = annotation.targets?.join("+");
|
|
938
|
+
$[10] = annotation.targets;
|
|
939
|
+
$[11] = t6;
|
|
1069
940
|
} else {
|
|
1070
|
-
t6 = $[
|
|
941
|
+
t6 = $[11];
|
|
1071
942
|
}
|
|
943
|
+
const annotationTargets = t6;
|
|
944
|
+
const annotationId = annotation.target || annotationTargets ? `${annotation.target ?? annotationTargets}:${anchor}` : `free:${index}`;
|
|
945
|
+
let T0;
|
|
946
|
+
let first;
|
|
1072
947
|
let t7;
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
"data-diagram-annotation-leader-index": leaderIndex,
|
|
1081
|
-
"data-diagram-annotation-leader-route": leader.route,
|
|
1082
|
-
d: annotationLeaderPath(leader.points),
|
|
1083
|
-
fill: "none",
|
|
1084
|
-
stroke: DIAGRAM_NEUTRAL,
|
|
1085
|
-
strokeWidth: 1,
|
|
1086
|
-
strokeLinecap: "round",
|
|
1087
|
-
strokeLinejoin: "round"
|
|
1088
|
-
}, `${leader.target ?? "free"}:${leaderIndex}`) : /*#__PURE__*/_jsx("line", {
|
|
1089
|
-
"data-diagram-annotation-leader": annotationId,
|
|
1090
|
-
"data-diagram-annotation-leader-target": leader.target,
|
|
1091
|
-
"data-diagram-annotation-leader-anchor": leader.anchor,
|
|
1092
|
-
"data-diagram-annotation-leader-index": leaderIndex,
|
|
1093
|
-
"data-diagram-annotation-leader-route": leader.route,
|
|
1094
|
-
x1: leader.from.x,
|
|
1095
|
-
y1: leader.from.y,
|
|
1096
|
-
x2: leader.to.x,
|
|
1097
|
-
y2: leader.to.y,
|
|
1098
|
-
stroke: DIAGRAM_NEUTRAL,
|
|
1099
|
-
strokeWidth: 1,
|
|
1100
|
-
strokeLinecap: "round"
|
|
1101
|
-
}, `${leader.target ?? "free"}:${leaderIndex}`);
|
|
1102
|
-
$[18] = annotationId;
|
|
1103
|
-
$[19] = t8;
|
|
948
|
+
let t8;
|
|
949
|
+
if ($[12] !== anchor || $[13] !== annotationId || $[14] !== leaders || $[15] !== note.node.id || $[16] !== note.text || $[17] !== opacity || $[18] !== route) {
|
|
950
|
+
let t9;
|
|
951
|
+
if ($[23] !== note.node.id) {
|
|
952
|
+
t9 = leader => leader.note === note.node.id;
|
|
953
|
+
$[23] = note.node.id;
|
|
954
|
+
$[24] = t9;
|
|
1104
955
|
} else {
|
|
1105
|
-
|
|
956
|
+
t9 = $[24];
|
|
1106
957
|
}
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
$[
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
958
|
+
const noteLeaders = leaders.filter(t9);
|
|
959
|
+
[first] = note.text;
|
|
960
|
+
T0 = motion.g;
|
|
961
|
+
if ($[25] !== opacity) {
|
|
962
|
+
t7 = {
|
|
963
|
+
opacity
|
|
964
|
+
};
|
|
965
|
+
$[25] = opacity;
|
|
966
|
+
$[26] = t7;
|
|
967
|
+
} else {
|
|
968
|
+
t7 = $[26];
|
|
969
|
+
}
|
|
970
|
+
let t10;
|
|
971
|
+
if ($[27] !== anchor || $[28] !== annotationId || $[29] !== route) {
|
|
972
|
+
t10 = (leader_0, leaderIndex) => {
|
|
973
|
+
const attrs = {
|
|
974
|
+
"data-diagram-annotation-leader": annotationId,
|
|
975
|
+
"data-diagram-annotation-leader-target": leader_0.target,
|
|
976
|
+
"data-diagram-annotation-leader-anchor": anchor,
|
|
977
|
+
"data-diagram-annotation-leader-index": leaderIndex,
|
|
978
|
+
"data-diagram-annotation-leader-route": route
|
|
979
|
+
};
|
|
980
|
+
const from = leader_0.points.at(0);
|
|
981
|
+
const to = leader_0.points.at(-1);
|
|
982
|
+
if (leader_0.points.length > 2 || !from || !to) {
|
|
983
|
+
return /*#__PURE__*/_jsx("path", {
|
|
984
|
+
...attrs,
|
|
985
|
+
d: leader_0.d,
|
|
986
|
+
fill: "none",
|
|
987
|
+
stroke: DIAGRAM_NEUTRAL,
|
|
988
|
+
strokeWidth: 1,
|
|
989
|
+
strokeLinecap: "round",
|
|
990
|
+
strokeLinejoin: "round"
|
|
991
|
+
}, `${leader_0.target}:${leaderIndex}`);
|
|
992
|
+
}
|
|
993
|
+
return /*#__PURE__*/_jsx("line", {
|
|
994
|
+
...attrs,
|
|
995
|
+
x1: from.x,
|
|
996
|
+
y1: from.y,
|
|
997
|
+
x2: to.x,
|
|
998
|
+
y2: to.y,
|
|
999
|
+
stroke: DIAGRAM_NEUTRAL,
|
|
1000
|
+
strokeWidth: 1,
|
|
1001
|
+
strokeLinecap: "round"
|
|
1002
|
+
}, `${leader_0.target}:${leaderIndex}`);
|
|
1003
|
+
};
|
|
1004
|
+
$[27] = anchor;
|
|
1005
|
+
$[28] = annotationId;
|
|
1006
|
+
$[29] = route;
|
|
1007
|
+
$[30] = t10;
|
|
1141
1008
|
} else {
|
|
1142
|
-
|
|
1009
|
+
t10 = $[30];
|
|
1143
1010
|
}
|
|
1144
|
-
|
|
1145
|
-
$[
|
|
1146
|
-
$[
|
|
1147
|
-
$[
|
|
1148
|
-
$[
|
|
1149
|
-
$[
|
|
1011
|
+
t8 = noteLeaders.map(t10);
|
|
1012
|
+
$[12] = anchor;
|
|
1013
|
+
$[13] = annotationId;
|
|
1014
|
+
$[14] = leaders;
|
|
1015
|
+
$[15] = note.node.id;
|
|
1016
|
+
$[16] = note.text;
|
|
1017
|
+
$[17] = opacity;
|
|
1018
|
+
$[18] = route;
|
|
1019
|
+
$[19] = T0;
|
|
1020
|
+
$[20] = first;
|
|
1021
|
+
$[21] = t7;
|
|
1022
|
+
$[22] = t8;
|
|
1150
1023
|
} else {
|
|
1151
|
-
|
|
1024
|
+
T0 = $[19];
|
|
1025
|
+
first = $[20];
|
|
1026
|
+
t7 = $[21];
|
|
1027
|
+
t8 = $[22];
|
|
1152
1028
|
}
|
|
1153
|
-
let
|
|
1154
|
-
if ($[31] !==
|
|
1155
|
-
|
|
1029
|
+
let t9;
|
|
1030
|
+
if ($[31] !== annotation.anchor || $[32] !== annotation.guide || $[33] !== annotation.lineGap || $[34] !== annotation.target || $[35] !== annotation.targets || $[36] !== annotationId || $[37] !== fill || $[38] !== first || $[39] !== note.text) {
|
|
1031
|
+
t9 = first && /*#__PURE__*/_jsx("text", {
|
|
1156
1032
|
"data-diagram-annotation": annotationId,
|
|
1157
|
-
"data-diagram-annotation-target":
|
|
1158
|
-
"data-diagram-annotation-targets":
|
|
1159
|
-
"data-diagram-annotation-anchor":
|
|
1160
|
-
"data-diagram-annotation-guide":
|
|
1161
|
-
"data-diagram-annotation-line-gap":
|
|
1162
|
-
|
|
1163
|
-
y: t14,
|
|
1164
|
-
textAnchor: align,
|
|
1165
|
-
fontFamily: "ui-sans-serif, system-ui, sans-serif",
|
|
1166
|
-
fontSize: fontSize,
|
|
1167
|
-
fontWeight: fontWeight,
|
|
1033
|
+
"data-diagram-annotation-target": annotation.target,
|
|
1034
|
+
"data-diagram-annotation-targets": annotation.targets?.join(" "),
|
|
1035
|
+
"data-diagram-annotation-anchor": annotation.anchor,
|
|
1036
|
+
"data-diagram-annotation-guide": annotation.guide,
|
|
1037
|
+
"data-diagram-annotation-line-gap": annotation.lineGap,
|
|
1038
|
+
...textAttrs(first),
|
|
1168
1039
|
fill: fill,
|
|
1169
|
-
children:
|
|
1040
|
+
children: /*#__PURE__*/_jsx(RunSpans, {
|
|
1041
|
+
runs: note.text
|
|
1042
|
+
})
|
|
1170
1043
|
});
|
|
1171
|
-
$[31] =
|
|
1172
|
-
$[32] = annotation.
|
|
1173
|
-
$[33] = annotation.
|
|
1174
|
-
$[34] = annotation.
|
|
1175
|
-
$[35] = annotation.
|
|
1176
|
-
$[36] =
|
|
1177
|
-
$[37] =
|
|
1178
|
-
$[38] =
|
|
1179
|
-
$[39] =
|
|
1180
|
-
$[40] =
|
|
1181
|
-
$[41] = fontWeight;
|
|
1182
|
-
$[42] = t15;
|
|
1183
|
-
$[43] = t9;
|
|
1184
|
-
$[44] = t16;
|
|
1044
|
+
$[31] = annotation.anchor;
|
|
1045
|
+
$[32] = annotation.guide;
|
|
1046
|
+
$[33] = annotation.lineGap;
|
|
1047
|
+
$[34] = annotation.target;
|
|
1048
|
+
$[35] = annotation.targets;
|
|
1049
|
+
$[36] = annotationId;
|
|
1050
|
+
$[37] = fill;
|
|
1051
|
+
$[38] = first;
|
|
1052
|
+
$[39] = note.text;
|
|
1053
|
+
$[40] = t9;
|
|
1185
1054
|
} else {
|
|
1186
|
-
|
|
1055
|
+
t9 = $[40];
|
|
1187
1056
|
}
|
|
1188
|
-
let
|
|
1189
|
-
if ($[
|
|
1190
|
-
|
|
1191
|
-
style:
|
|
1192
|
-
children: [
|
|
1057
|
+
let t10;
|
|
1058
|
+
if ($[41] !== T0 || $[42] !== t7 || $[43] !== t8 || $[44] !== t9) {
|
|
1059
|
+
t10 = /*#__PURE__*/_jsxs(T0, {
|
|
1060
|
+
style: t7,
|
|
1061
|
+
children: [t8, t9]
|
|
1193
1062
|
});
|
|
1194
|
-
$[
|
|
1195
|
-
$[
|
|
1196
|
-
$[
|
|
1197
|
-
$[
|
|
1063
|
+
$[41] = T0;
|
|
1064
|
+
$[42] = t7;
|
|
1065
|
+
$[43] = t8;
|
|
1066
|
+
$[44] = t9;
|
|
1067
|
+
$[45] = t10;
|
|
1198
1068
|
} else {
|
|
1199
|
-
|
|
1069
|
+
t10 = $[45];
|
|
1200
1070
|
}
|
|
1201
|
-
return
|
|
1202
|
-
}
|
|
1203
|
-
function annotationLeaderPath(points) {
|
|
1204
|
-
return points.map((point, index) => `${index === 0 ? 'M' : 'L'} ${point.x} ${point.y}`).join(' ');
|
|
1071
|
+
return t10;
|
|
1205
1072
|
}
|
|
1206
1073
|
//# sourceMappingURL=node-parts.js.map
|