dishui 0.0.101 → 0.0.105
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/.release-verified.json +2 -2
- package/dist/components/pro/Flow/context/FlowAIContext.d.ts +2 -0
- package/dist/components/pro/Flow/context/FlowAIContext.js +9 -4
- package/dist/components/pro/Flow/context/FlowAIContext.js.map +1 -1
- package/dist/components/pro/Flow/nodes/MediaContent.d.ts +4 -2
- package/dist/components/pro/Flow/nodes/MediaContent.js +16 -16
- package/dist/components/pro/Flow/nodes/MediaContent.js.map +1 -1
- package/dist/components/pro/Flow/nodes/MediaOverlay.js +26 -23
- package/dist/components/pro/Flow/nodes/MediaOverlay.js.map +1 -1
- package/dist/components/pro/Flow/panels/InspectorPanel.js +396 -384
- package/dist/components/pro/Flow/panels/InspectorPanel.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,23 +6,24 @@ import i from "../../../Select/index.js";
|
|
|
6
6
|
import { BORDER_STYLE_OPTIONS as a, DEFAULT_NODE_DATA as o, EDGE_LINE_STYLE_OPTIONS as s, EDGE_MARKER_OPTIONS as c, EDGE_TYPE_OPTIONS as l } from "../constants.js";
|
|
7
7
|
import { useFlowContext as u } from "../context/FlowContext.js";
|
|
8
8
|
import { useFlowUI as d } from "../context/FlowUIContext.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
9
|
+
import { useFlowAI as f } from "../context/FlowAIContext.js";
|
|
10
|
+
import { COMMON_COLORS as p, THEME_SYNC_TOKEN as m, isThemeToken as h, resolveThemeColor as g, themeTokenCssVar as _ } from "../utils/themeColor.js";
|
|
11
|
+
import { BORDER_SIDE_NAMES as v, BORDER_SIDE_TYPES as y, hasBorderSideOverrides as b } from "../nodes/shapes.js";
|
|
12
|
+
import { generateId as x } from "../nodes/nodeUtils.js";
|
|
13
|
+
import { SVG_ICON_CATEGORIES as S, buildSvgMarkup as C, getAllSvgIcons as w, getSvgIcon as T, getSvgIconsByCategory as E } from "../nodes/svgIcons.js";
|
|
14
|
+
import { COMPONENT_STYLES as D } from "../archify/palette.js";
|
|
15
|
+
import { ARCHIFY_COMPONENT_LABELS as O, ARCHIFY_COMPONENT_ORDER as k, archifyStylePatch as A } from "../archify/presets.js";
|
|
16
|
+
import { useDraggablePanel as j } from "../hooks/useDraggablePanel.js";
|
|
17
|
+
import { useResizablePanel as M } from "../hooks/useResizablePanel.js";
|
|
18
|
+
import { FLOW_NODE_TYPES as N } from "../types.js";
|
|
19
|
+
import { ExpandableTextarea as P } from "./ExpandableTextarea.js";
|
|
20
|
+
import { DataInspectorSection as F } from "./DataInspectorSection.js";
|
|
21
|
+
import { useMemo as I, useRef as L, useState as R } from "react";
|
|
22
|
+
import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
|
|
22
23
|
//#region src/components/pro/Flow/panels/InspectorPanel.tsx
|
|
23
|
-
function
|
|
24
|
-
let { showInspector: e } = d(), { panelStyle: t, handleProps: n } =
|
|
25
|
-
return e ? /* @__PURE__ */
|
|
24
|
+
function H() {
|
|
25
|
+
let { showInspector: e } = d(), { panelStyle: t, handleProps: n } = j(), { panelWidth: r, resizeHandleProps: i } = M("left", 240);
|
|
26
|
+
return e ? /* @__PURE__ */ V("div", {
|
|
26
27
|
className: "flow-inspector",
|
|
27
28
|
"data-flow-panel": !0,
|
|
28
29
|
style: {
|
|
@@ -30,11 +31,11 @@ function V() {
|
|
|
30
31
|
width: r
|
|
31
32
|
},
|
|
32
33
|
children: [
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ B("div", {
|
|
34
35
|
className: "flow-panel-resize-handle flow-panel-resize-handle--left",
|
|
35
36
|
...i
|
|
36
37
|
}),
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ B("div", {
|
|
38
39
|
className: "flow-panel-drag-handle",
|
|
39
40
|
...n,
|
|
40
41
|
style: {
|
|
@@ -48,38 +49,38 @@ function V() {
|
|
|
48
49
|
},
|
|
49
50
|
children: "Inspector"
|
|
50
51
|
}),
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ B("div", {
|
|
52
53
|
className: "flow-inspector-content",
|
|
53
|
-
children: /* @__PURE__ */
|
|
54
|
+
children: /* @__PURE__ */ B(U, {})
|
|
54
55
|
})
|
|
55
56
|
]
|
|
56
57
|
}) : null;
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
-
let { currentCanvas: t, selection: n, setSelection: r, setDoc: i, currentCanvasId: a } = u(), s =
|
|
60
|
-
if (
|
|
61
|
-
let t = Infinity,
|
|
62
|
-
for (let e of
|
|
63
|
-
for (let e of
|
|
64
|
-
let
|
|
65
|
-
id:
|
|
59
|
+
function U() {
|
|
60
|
+
let { currentCanvas: t, selection: n, setSelection: r, setDoc: i, currentCanvasId: a } = u(), { aiConfig: s, hasSharedConfig: c } = f(), l = I(() => t.nodes.filter((e) => n.nodeIds.has(e.id)), [t.nodes, n.nodeIds]), d = I(() => t.edges.filter((e) => n.edgeIds.has(e.id)), [t.edges, n.edgeIds]), p = I(() => t.lines.filter((e) => n.lineIds.has(e.id)), [t.lines, n.lineIds]), m = l.length > 0 || d.length > 0 || p.length > 0, h = l.length === 1 && (l[0].type === "flowGroup" || l[0].type === "geometryGroup" || l[0].data.isGroup), g = l.length + p.length, _ = (e = "flowGroup") => {
|
|
61
|
+
if (g < 2) return;
|
|
62
|
+
let t = Infinity, s = Infinity, c = -Infinity, u = -Infinity;
|
|
63
|
+
for (let e of l) t = Math.min(t, e.position.x), s = Math.min(s, e.position.y), c = Math.max(c, e.position.x + e.width), u = Math.max(u, e.position.y + e.height);
|
|
64
|
+
for (let e of p) for (let n of e.points) t = Math.min(t, n.x), s = Math.min(s, n.y), c = Math.max(c, n.x), u = Math.max(u, n.y);
|
|
65
|
+
let d = e === "geometryGroup", f = x("group"), m = {
|
|
66
|
+
id: f,
|
|
66
67
|
type: e,
|
|
67
68
|
position: {
|
|
68
69
|
x: t - 20,
|
|
69
|
-
y:
|
|
70
|
+
y: s - 20
|
|
70
71
|
},
|
|
71
|
-
width:
|
|
72
|
-
height:
|
|
72
|
+
width: c - t + 40,
|
|
73
|
+
height: u - s + 40,
|
|
73
74
|
data: {
|
|
74
75
|
...o,
|
|
75
|
-
label:
|
|
76
|
-
fill:
|
|
76
|
+
label: d ? "Geo Group" : "Group",
|
|
77
|
+
fill: d ? "#fefce8" : "#f0f9ff",
|
|
77
78
|
stroke: "#9ca3af",
|
|
78
79
|
strokeWidth: 1.5,
|
|
79
|
-
borderStyle:
|
|
80
|
+
borderStyle: d ? "dashed" : "dotted",
|
|
80
81
|
isGroup: !0
|
|
81
82
|
}
|
|
82
|
-
},
|
|
83
|
+
}, h = n.nodeIds, _ = n.lineIds;
|
|
83
84
|
i((e) => {
|
|
84
85
|
let t = e.canvases[a];
|
|
85
86
|
return t ? {
|
|
@@ -88,25 +89,25 @@ function H() {
|
|
|
88
89
|
...e.canvases,
|
|
89
90
|
[a]: {
|
|
90
91
|
...t,
|
|
91
|
-
nodes:
|
|
92
|
+
nodes: d ? [m, ...t.nodes] : [m, ...t.nodes.map((e) => h.has(e.id) ? {
|
|
92
93
|
...e,
|
|
93
|
-
parentId:
|
|
94
|
+
parentId: f
|
|
94
95
|
} : e)],
|
|
95
|
-
lines:
|
|
96
|
+
lines: d ? t.lines : t.lines.map((e) => _.has(e.id) ? {
|
|
96
97
|
...e,
|
|
97
|
-
parentId:
|
|
98
|
+
parentId: f
|
|
98
99
|
} : e)
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
} : e;
|
|
102
103
|
}), r({
|
|
103
|
-
nodeIds: /* @__PURE__ */ new Set([
|
|
104
|
+
nodeIds: /* @__PURE__ */ new Set([f]),
|
|
104
105
|
edgeIds: /* @__PURE__ */ new Set(),
|
|
105
106
|
lineIds: /* @__PURE__ */ new Set()
|
|
106
107
|
});
|
|
107
|
-
},
|
|
108
|
+
}, v = () => {
|
|
108
109
|
let e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
109
|
-
for (let t of
|
|
110
|
+
for (let t of l) (t.type === "flowGroup" || t.type === "geometryGroup" || t.data.isGroup) && e.add(t.id);
|
|
110
111
|
if (e.size !== 0) {
|
|
111
112
|
for (let r of t.nodes) r.parentId && e.has(r.parentId) && n.add(r.id);
|
|
112
113
|
for (let n of t.lines) n.parentId && e.has(n.parentId) && o.add(n.id);
|
|
@@ -135,7 +136,7 @@ function H() {
|
|
|
135
136
|
lineIds: o
|
|
136
137
|
});
|
|
137
138
|
}
|
|
138
|
-
},
|
|
139
|
+
}, y = (e) => {
|
|
139
140
|
let t = n.nodeIds;
|
|
140
141
|
t.size !== 0 && i((n) => {
|
|
141
142
|
let r = n.canvases[a];
|
|
@@ -159,7 +160,7 @@ function H() {
|
|
|
159
160
|
}
|
|
160
161
|
};
|
|
161
162
|
});
|
|
162
|
-
},
|
|
163
|
+
}, b = (e) => {
|
|
163
164
|
let t = n.lineIds;
|
|
164
165
|
t.size !== 0 && i((n) => {
|
|
165
166
|
let r = n.canvases[a];
|
|
@@ -183,9 +184,9 @@ function H() {
|
|
|
183
184
|
}
|
|
184
185
|
};
|
|
185
186
|
});
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
},
|
|
187
|
+
}, S = (e, t, n) => {
|
|
188
|
+
C(e, { [t]: n });
|
|
189
|
+
}, C = (e, t) => {
|
|
189
190
|
i((n) => {
|
|
190
191
|
let r = n.canvases[a];
|
|
191
192
|
return r ? {
|
|
@@ -206,8 +207,8 @@ function H() {
|
|
|
206
207
|
} : n;
|
|
207
208
|
});
|
|
208
209
|
};
|
|
209
|
-
return /* @__PURE__ */
|
|
210
|
-
!
|
|
210
|
+
return /* @__PURE__ */ V(z, { children: [
|
|
211
|
+
!m && /* @__PURE__ */ B("div", {
|
|
211
212
|
style: {
|
|
212
213
|
fontSize: 12,
|
|
213
214
|
color: "color-mix(in oklch, var(--color-base-content) 40%, transparent)",
|
|
@@ -216,11 +217,11 @@ function H() {
|
|
|
216
217
|
},
|
|
217
218
|
children: "Select an element to inspect"
|
|
218
219
|
}),
|
|
219
|
-
|
|
220
|
-
node:
|
|
221
|
-
isGroup:
|
|
222
|
-
onUpdateData:
|
|
223
|
-
onUpdateDataBatch:
|
|
220
|
+
l.length === 1 && /* @__PURE__ */ B(q, {
|
|
221
|
+
node: l[0],
|
|
222
|
+
isGroup: h,
|
|
223
|
+
onUpdateData: S,
|
|
224
|
+
onUpdateDataBatch: C,
|
|
224
225
|
onUpdateDimension: (e, t, n) => {
|
|
225
226
|
i((r) => {
|
|
226
227
|
let i = r.canvases[a];
|
|
@@ -256,117 +257,119 @@ function H() {
|
|
|
256
257
|
}
|
|
257
258
|
} : n;
|
|
258
259
|
});
|
|
259
|
-
}
|
|
260
|
+
},
|
|
261
|
+
globalAIConfig: s,
|
|
262
|
+
useSharedAIConfig: c
|
|
260
263
|
}),
|
|
261
|
-
|
|
264
|
+
g > 1 && /* @__PURE__ */ V("div", {
|
|
262
265
|
className: "flow-inspector-section",
|
|
263
266
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ B("div", {
|
|
265
268
|
className: "flow-inspector-section-title",
|
|
266
269
|
children: "Selection"
|
|
267
270
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ V("div", {
|
|
269
272
|
style: {
|
|
270
273
|
fontSize: 12,
|
|
271
274
|
color: "color-mix(in oklch, var(--color-base-content) 50%, transparent)",
|
|
272
275
|
marginBottom: 8
|
|
273
276
|
},
|
|
274
277
|
children: [
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
+
l.length > 0 && `${l.length} node${l.length > 1 ? "s" : ""}`,
|
|
279
|
+
l.length > 0 && p.length > 0 && ", ",
|
|
280
|
+
p.length > 0 && `${p.length} line${p.length > 1 ? "s" : ""}`,
|
|
278
281
|
" selected"
|
|
279
282
|
]
|
|
280
283
|
}),
|
|
281
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ V("div", {
|
|
282
285
|
style: {
|
|
283
286
|
display: "flex",
|
|
284
287
|
flexDirection: "column",
|
|
285
288
|
gap: 4,
|
|
286
289
|
width: "100%"
|
|
287
290
|
},
|
|
288
|
-
children: [/* @__PURE__ */
|
|
291
|
+
children: [/* @__PURE__ */ B(e, {
|
|
289
292
|
size: "xs",
|
|
290
|
-
onClick: () =>
|
|
293
|
+
onClick: () => _("flowGroup"),
|
|
291
294
|
block: !0,
|
|
292
295
|
children: "Group (⌘G)"
|
|
293
|
-
}), /* @__PURE__ */
|
|
296
|
+
}), /* @__PURE__ */ B(e, {
|
|
294
297
|
size: "xs",
|
|
295
298
|
variant: "ghost",
|
|
296
|
-
onClick: () =>
|
|
299
|
+
onClick: () => _("geometryGroup"),
|
|
297
300
|
block: !0,
|
|
298
301
|
children: "Geo Group (⌘⌥G)"
|
|
299
302
|
})]
|
|
300
303
|
})
|
|
301
304
|
]
|
|
302
305
|
}),
|
|
303
|
-
|
|
306
|
+
h && /* @__PURE__ */ V("div", {
|
|
304
307
|
className: "flow-inspector-section",
|
|
305
308
|
children: [
|
|
306
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ B("div", {
|
|
307
310
|
className: "flow-inspector-section-title",
|
|
308
|
-
children:
|
|
311
|
+
children: l[0].type === "geometryGroup" ? "Geometry Group" : "Group"
|
|
309
312
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ B("div", {
|
|
311
314
|
style: {
|
|
312
315
|
fontSize: 11,
|
|
313
316
|
color: "color-mix(in oklch, var(--color-base-content) 45%, transparent)",
|
|
314
317
|
marginBottom: 6
|
|
315
318
|
},
|
|
316
|
-
children:
|
|
319
|
+
children: l[0].type === "geometryGroup" ? "Auto-binds spatially contained nodes" : "Explicit membership via add/remove"
|
|
317
320
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ B(e, {
|
|
319
322
|
size: "xs",
|
|
320
323
|
variant: "ghost",
|
|
321
|
-
onClick:
|
|
324
|
+
onClick: v,
|
|
322
325
|
block: !0,
|
|
323
326
|
children: "Ungroup (⌘⇧G)"
|
|
324
327
|
})
|
|
325
328
|
]
|
|
326
329
|
}),
|
|
327
|
-
|
|
330
|
+
l.length > 0 && /* @__PURE__ */ V("div", {
|
|
328
331
|
className: "flow-inspector-section",
|
|
329
|
-
children: [/* @__PURE__ */
|
|
332
|
+
children: [/* @__PURE__ */ B("div", {
|
|
330
333
|
className: "flow-inspector-section-title",
|
|
331
334
|
children: "Layer"
|
|
332
|
-
}), /* @__PURE__ */
|
|
335
|
+
}), /* @__PURE__ */ V("div", {
|
|
333
336
|
style: {
|
|
334
337
|
display: "flex",
|
|
335
338
|
gap: 4
|
|
336
339
|
},
|
|
337
340
|
children: [
|
|
338
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ B(e, {
|
|
339
342
|
size: "xs",
|
|
340
343
|
variant: "ghost",
|
|
341
|
-
onClick: () =>
|
|
342
|
-
children: /* @__PURE__ */
|
|
344
|
+
onClick: () => y("front"),
|
|
345
|
+
children: /* @__PURE__ */ B("span", {
|
|
343
346
|
title: "Bring to Front (⌘⇧↑)",
|
|
344
347
|
children: "⤒"
|
|
345
348
|
})
|
|
346
349
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ B(e, {
|
|
348
351
|
size: "xs",
|
|
349
352
|
variant: "ghost",
|
|
350
|
-
onClick: () =>
|
|
351
|
-
children: /* @__PURE__ */
|
|
353
|
+
onClick: () => y("up"),
|
|
354
|
+
children: /* @__PURE__ */ B("span", {
|
|
352
355
|
title: "Bring Forward (⌘↑)",
|
|
353
356
|
children: "↑"
|
|
354
357
|
})
|
|
355
358
|
}),
|
|
356
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ B(e, {
|
|
357
360
|
size: "xs",
|
|
358
361
|
variant: "ghost",
|
|
359
|
-
onClick: () =>
|
|
360
|
-
children: /* @__PURE__ */
|
|
362
|
+
onClick: () => y("down"),
|
|
363
|
+
children: /* @__PURE__ */ B("span", {
|
|
361
364
|
title: "Send Backward (⌘↓)",
|
|
362
365
|
children: "↓"
|
|
363
366
|
})
|
|
364
367
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ B(e, {
|
|
366
369
|
size: "xs",
|
|
367
370
|
variant: "ghost",
|
|
368
|
-
onClick: () =>
|
|
369
|
-
children: /* @__PURE__ */
|
|
371
|
+
onClick: () => y("back"),
|
|
372
|
+
children: /* @__PURE__ */ B("span", {
|
|
370
373
|
title: "Send to Back (⌘⇧↓)",
|
|
371
374
|
children: "⤓"
|
|
372
375
|
})
|
|
@@ -374,8 +377,8 @@ function H() {
|
|
|
374
377
|
]
|
|
375
378
|
})]
|
|
376
379
|
}),
|
|
377
|
-
|
|
378
|
-
edge:
|
|
380
|
+
d.length === 1 && /* @__PURE__ */ B(Y, {
|
|
381
|
+
edge: d[0],
|
|
379
382
|
onUpdateData: (e, t, n) => {
|
|
380
383
|
i((r) => {
|
|
381
384
|
let i = r.canvases[a];
|
|
@@ -416,8 +419,8 @@ function H() {
|
|
|
416
419
|
});
|
|
417
420
|
}
|
|
418
421
|
}),
|
|
419
|
-
|
|
420
|
-
line:
|
|
422
|
+
p.length === 1 && /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ B(X, {
|
|
423
|
+
line: p[0],
|
|
421
424
|
onUpdateData: (e, t, n) => {
|
|
422
425
|
i((r) => {
|
|
423
426
|
let i = r.canvases[a];
|
|
@@ -436,49 +439,49 @@ function H() {
|
|
|
436
439
|
} : r;
|
|
437
440
|
});
|
|
438
441
|
}
|
|
439
|
-
}), /* @__PURE__ */
|
|
442
|
+
}), /* @__PURE__ */ V("div", {
|
|
440
443
|
className: "flow-inspector-section",
|
|
441
|
-
children: [/* @__PURE__ */
|
|
444
|
+
children: [/* @__PURE__ */ B("div", {
|
|
442
445
|
className: "flow-inspector-section-title",
|
|
443
446
|
children: "Layer"
|
|
444
|
-
}), /* @__PURE__ */
|
|
447
|
+
}), /* @__PURE__ */ V("div", {
|
|
445
448
|
style: {
|
|
446
449
|
display: "flex",
|
|
447
450
|
gap: 4
|
|
448
451
|
},
|
|
449
452
|
children: [
|
|
450
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ B(e, {
|
|
451
454
|
size: "xs",
|
|
452
455
|
variant: "ghost",
|
|
453
|
-
onClick: () =>
|
|
454
|
-
children: /* @__PURE__ */
|
|
456
|
+
onClick: () => b("front"),
|
|
457
|
+
children: /* @__PURE__ */ B("span", {
|
|
455
458
|
title: "Bring to Front",
|
|
456
459
|
children: "⤒"
|
|
457
460
|
})
|
|
458
461
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ B(e, {
|
|
460
463
|
size: "xs",
|
|
461
464
|
variant: "ghost",
|
|
462
|
-
onClick: () =>
|
|
463
|
-
children: /* @__PURE__ */
|
|
465
|
+
onClick: () => b("up"),
|
|
466
|
+
children: /* @__PURE__ */ B("span", {
|
|
464
467
|
title: "Bring Forward",
|
|
465
468
|
children: "↑"
|
|
466
469
|
})
|
|
467
470
|
}),
|
|
468
|
-
/* @__PURE__ */
|
|
471
|
+
/* @__PURE__ */ B(e, {
|
|
469
472
|
size: "xs",
|
|
470
473
|
variant: "ghost",
|
|
471
|
-
onClick: () =>
|
|
472
|
-
children: /* @__PURE__ */
|
|
474
|
+
onClick: () => b("down"),
|
|
475
|
+
children: /* @__PURE__ */ B("span", {
|
|
473
476
|
title: "Send Backward",
|
|
474
477
|
children: "↓"
|
|
475
478
|
})
|
|
476
479
|
}),
|
|
477
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ B(e, {
|
|
478
481
|
size: "xs",
|
|
479
482
|
variant: "ghost",
|
|
480
|
-
onClick: () =>
|
|
481
|
-
children: /* @__PURE__ */
|
|
483
|
+
onClick: () => b("back"),
|
|
484
|
+
children: /* @__PURE__ */ B("span", {
|
|
482
485
|
title: "Send to Back",
|
|
483
486
|
children: "⤓"
|
|
484
487
|
})
|
|
@@ -488,21 +491,21 @@ function H() {
|
|
|
488
491
|
})] })
|
|
489
492
|
] });
|
|
490
493
|
}
|
|
491
|
-
function
|
|
492
|
-
let a =
|
|
493
|
-
return /* @__PURE__ */
|
|
494
|
+
function W({ value: e, onChange: t, kind: n, allowTransparent: r, customFallback: i = "#ffffff" }) {
|
|
495
|
+
let a = m[n], o = _(a) ?? "var(--color-base-content)", s = e ?? "", c = s.toLowerCase(), l = h(s), u = s === "transparent", d = p.some((e) => e.value.toLowerCase() === c), f = s === a, g = !!s && !l && !u && !d, v = g ? s : i;
|
|
496
|
+
return /* @__PURE__ */ V("div", {
|
|
494
497
|
className: "flow-color-field",
|
|
495
498
|
children: [
|
|
496
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ B("button", {
|
|
497
500
|
type: "button",
|
|
498
501
|
title: "跟随主题切换",
|
|
499
502
|
"aria-label": "跟随主题切换",
|
|
500
|
-
className: `flow-color-swatch flow-color-swatch--sync${
|
|
503
|
+
className: `flow-color-swatch flow-color-swatch--sync${f ? " is-active" : ""}`,
|
|
501
504
|
style: { background: o },
|
|
502
505
|
onClick: () => t(a)
|
|
503
506
|
}),
|
|
504
|
-
/* @__PURE__ */
|
|
505
|
-
|
|
507
|
+
/* @__PURE__ */ B("span", { className: "flow-color-divider" }),
|
|
508
|
+
p.map((e) => /* @__PURE__ */ B("button", {
|
|
506
509
|
type: "button",
|
|
507
510
|
title: e.label,
|
|
508
511
|
"aria-label": e.label,
|
|
@@ -510,18 +513,18 @@ function U({ value: e, onChange: t, kind: n, allowTransparent: r, customFallback
|
|
|
510
513
|
style: { background: e.value },
|
|
511
514
|
onClick: () => t(e.value)
|
|
512
515
|
}, e.value)),
|
|
513
|
-
/* @__PURE__ */
|
|
514
|
-
/* @__PURE__ */
|
|
515
|
-
className: `flow-color-swatch flow-color-swatch--custom${
|
|
516
|
+
/* @__PURE__ */ B("span", { className: "flow-color-divider" }),
|
|
517
|
+
/* @__PURE__ */ B("label", {
|
|
518
|
+
className: `flow-color-swatch flow-color-swatch--custom${g ? " is-active" : ""}`,
|
|
516
519
|
title: "自定义颜色",
|
|
517
|
-
style:
|
|
518
|
-
children: /* @__PURE__ */
|
|
520
|
+
style: g ? { background: s } : void 0,
|
|
521
|
+
children: /* @__PURE__ */ B("input", {
|
|
519
522
|
type: "color",
|
|
520
523
|
value: v,
|
|
521
524
|
onChange: (e) => t(e.target.value)
|
|
522
525
|
})
|
|
523
526
|
}),
|
|
524
|
-
r && /* @__PURE__ */
|
|
527
|
+
r && /* @__PURE__ */ B("button", {
|
|
525
528
|
type: "button",
|
|
526
529
|
title: "透明",
|
|
527
530
|
"aria-label": "透明",
|
|
@@ -531,26 +534,26 @@ function U({ value: e, onChange: t, kind: n, allowTransparent: r, customFallback
|
|
|
531
534
|
]
|
|
532
535
|
});
|
|
533
536
|
}
|
|
534
|
-
function
|
|
535
|
-
let t =
|
|
537
|
+
function G(e) {
|
|
538
|
+
let t = T(e), n = g(t?.brandColor, "") || "#475569", r = C(e, n);
|
|
536
539
|
return r ? `data:image/svg+xml;utf8,${encodeURIComponent(r)}` : "";
|
|
537
540
|
}
|
|
538
|
-
function
|
|
539
|
-
let [o, s] =
|
|
540
|
-
return /* @__PURE__ */
|
|
541
|
+
function K({ node: r, onUpdateData: a }) {
|
|
542
|
+
let [o, s] = R("lang"), c = I(() => E(o), [o]), l = r.data.titleIcon ?? "", u = r.data.titleIconSide ?? "left";
|
|
543
|
+
return /* @__PURE__ */ V("div", {
|
|
541
544
|
className: "flow-inspector-section",
|
|
542
545
|
children: [
|
|
543
|
-
/* @__PURE__ */
|
|
546
|
+
/* @__PURE__ */ B("div", {
|
|
544
547
|
className: "flow-inspector-section-title",
|
|
545
548
|
children: "Title Icon"
|
|
546
549
|
}),
|
|
547
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ V("div", {
|
|
548
551
|
className: "flow-inspector-row",
|
|
549
|
-
children: [/* @__PURE__ */
|
|
552
|
+
children: [/* @__PURE__ */ B(n, {
|
|
550
553
|
size: "xs",
|
|
551
554
|
className: "flow-inspector-label",
|
|
552
555
|
children: "Icon"
|
|
553
|
-
}), /* @__PURE__ */
|
|
556
|
+
}), /* @__PURE__ */ V("div", {
|
|
554
557
|
style: {
|
|
555
558
|
display: "flex",
|
|
556
559
|
gap: 4,
|
|
@@ -558,8 +561,8 @@ function G({ node: r, onUpdateData: a }) {
|
|
|
558
561
|
flex: 1,
|
|
559
562
|
minWidth: 0
|
|
560
563
|
},
|
|
561
|
-
children: [/* @__PURE__ */
|
|
562
|
-
options:
|
|
564
|
+
children: [/* @__PURE__ */ B(i, {
|
|
565
|
+
options: S.map((e) => ({
|
|
563
566
|
value: e.id,
|
|
564
567
|
label: e.label
|
|
565
568
|
})),
|
|
@@ -570,19 +573,19 @@ function G({ node: r, onUpdateData: a }) {
|
|
|
570
573
|
flex: 1,
|
|
571
574
|
minWidth: 0
|
|
572
575
|
}
|
|
573
|
-
}), /* @__PURE__ */
|
|
576
|
+
}), /* @__PURE__ */ B(e, {
|
|
574
577
|
size: "xs",
|
|
575
578
|
variant: l ? "ghost" : "primary",
|
|
576
579
|
square: !0,
|
|
577
580
|
onClick: () => a(r.id, "titleIcon", void 0),
|
|
578
|
-
children: /* @__PURE__ */
|
|
581
|
+
children: /* @__PURE__ */ B("span", {
|
|
579
582
|
title: "移除标题图标",
|
|
580
583
|
children: "✕"
|
|
581
584
|
})
|
|
582
585
|
})]
|
|
583
586
|
})]
|
|
584
587
|
}),
|
|
585
|
-
l && !c.some((e) => e.id === l) && /* @__PURE__ */
|
|
588
|
+
l && !c.some((e) => e.id === l) && /* @__PURE__ */ B("div", {
|
|
586
589
|
style: {
|
|
587
590
|
fontSize: 10,
|
|
588
591
|
opacity: .55,
|
|
@@ -590,7 +593,7 @@ function G({ node: r, onUpdateData: a }) {
|
|
|
590
593
|
},
|
|
591
594
|
children: "当前图标在其他分类"
|
|
592
595
|
}),
|
|
593
|
-
/* @__PURE__ */
|
|
596
|
+
/* @__PURE__ */ B("div", {
|
|
594
597
|
style: {
|
|
595
598
|
display: "grid",
|
|
596
599
|
gridTemplateColumns: "repeat(auto-fill, minmax(22px, 1fr))",
|
|
@@ -603,8 +606,8 @@ function G({ node: r, onUpdateData: a }) {
|
|
|
603
606
|
marginBottom: 6
|
|
604
607
|
},
|
|
605
608
|
children: c.map((e) => {
|
|
606
|
-
let t =
|
|
607
|
-
return /* @__PURE__ */
|
|
609
|
+
let t = G(e.id), n = l === e.id;
|
|
610
|
+
return /* @__PURE__ */ B("button", {
|
|
608
611
|
type: "button",
|
|
609
612
|
title: e.label,
|
|
610
613
|
"aria-label": e.label,
|
|
@@ -621,7 +624,7 @@ function G({ node: r, onUpdateData: a }) {
|
|
|
621
624
|
border: n ? "1.5px solid var(--color-primary)" : "1px solid transparent",
|
|
622
625
|
background: n ? "color-mix(in oklch, var(--color-primary) 12%, transparent)" : "transparent"
|
|
623
626
|
},
|
|
624
|
-
children: t && /* @__PURE__ */
|
|
627
|
+
children: t && /* @__PURE__ */ B("img", {
|
|
625
628
|
src: t,
|
|
626
629
|
width: 16,
|
|
627
630
|
height: 16,
|
|
@@ -631,14 +634,14 @@ function G({ node: r, onUpdateData: a }) {
|
|
|
631
634
|
}, e.id);
|
|
632
635
|
})
|
|
633
636
|
}),
|
|
634
|
-
l && /* @__PURE__ */
|
|
635
|
-
/* @__PURE__ */
|
|
637
|
+
l && /* @__PURE__ */ V(z, { children: [
|
|
638
|
+
/* @__PURE__ */ V("div", {
|
|
636
639
|
className: "flow-inspector-row",
|
|
637
|
-
children: [/* @__PURE__ */
|
|
640
|
+
children: [/* @__PURE__ */ B(n, {
|
|
638
641
|
size: "xs",
|
|
639
642
|
className: "flow-inspector-label",
|
|
640
643
|
children: "Side"
|
|
641
|
-
}), /* @__PURE__ */
|
|
644
|
+
}), /* @__PURE__ */ B(i, {
|
|
642
645
|
options: [{
|
|
643
646
|
value: "left",
|
|
644
647
|
label: "left"
|
|
@@ -651,21 +654,21 @@ function G({ node: r, onUpdateData: a }) {
|
|
|
651
654
|
style: { fontSize: 12 }
|
|
652
655
|
})]
|
|
653
656
|
}),
|
|
654
|
-
/* @__PURE__ */
|
|
657
|
+
/* @__PURE__ */ V("div", {
|
|
655
658
|
className: "flow-inspector-row",
|
|
656
659
|
children: [
|
|
657
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ B(n, {
|
|
658
661
|
size: "xs",
|
|
659
662
|
className: "flow-inspector-label",
|
|
660
663
|
children: "Size"
|
|
661
664
|
}),
|
|
662
|
-
/* @__PURE__ */
|
|
665
|
+
/* @__PURE__ */ B(t, {
|
|
663
666
|
size: "xs",
|
|
664
667
|
type: "number",
|
|
665
668
|
value: String(r.data.titleIconSize ?? Math.max(8, Math.round(r.data.fontSize * 1.15))),
|
|
666
669
|
onChange: (e) => a(r.id, "titleIconSize", Math.max(8, Number(e.target.value) || 8))
|
|
667
670
|
}),
|
|
668
|
-
/* @__PURE__ */
|
|
671
|
+
/* @__PURE__ */ B("span", {
|
|
669
672
|
className: "flow-inspector-suffix",
|
|
670
673
|
style: {
|
|
671
674
|
fontSize: 10,
|
|
@@ -675,14 +678,14 @@ function G({ node: r, onUpdateData: a }) {
|
|
|
675
678
|
})
|
|
676
679
|
]
|
|
677
680
|
}),
|
|
678
|
-
/* @__PURE__ */
|
|
681
|
+
/* @__PURE__ */ V("div", {
|
|
679
682
|
className: "flow-inspector-row",
|
|
680
|
-
children: [/* @__PURE__ */
|
|
683
|
+
children: [/* @__PURE__ */ B(n, {
|
|
681
684
|
size: "xs",
|
|
682
685
|
className: "flow-inspector-label",
|
|
683
686
|
children: "Color"
|
|
684
|
-
}), /* @__PURE__ */
|
|
685
|
-
value: r.data.titleIconColor ??
|
|
687
|
+
}), /* @__PURE__ */ B(W, {
|
|
688
|
+
value: r.data.titleIconColor ?? T(l)?.brandColor ?? r.data.labelColor ?? r.data.color,
|
|
686
689
|
kind: "stroke",
|
|
687
690
|
customFallback: "#334155",
|
|
688
691
|
onChange: (e) => a(r.id, "titleIconColor", e)
|
|
@@ -692,35 +695,35 @@ function G({ node: r, onUpdateData: a }) {
|
|
|
692
695
|
]
|
|
693
696
|
});
|
|
694
697
|
}
|
|
695
|
-
function
|
|
696
|
-
return /* @__PURE__ */
|
|
697
|
-
/* @__PURE__ */
|
|
698
|
+
function q({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdateDimension: u, onUpdateType: d, globalAIConfig: f, useSharedAIConfig: p }) {
|
|
699
|
+
return /* @__PURE__ */ V(z, { children: [
|
|
700
|
+
/* @__PURE__ */ V("div", {
|
|
698
701
|
className: "flow-inspector-section",
|
|
699
702
|
children: [
|
|
700
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ B("div", {
|
|
701
704
|
className: "flow-inspector-section-title",
|
|
702
705
|
children: "Node"
|
|
703
706
|
}),
|
|
704
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ V("div", {
|
|
705
708
|
className: "flow-inspector-row",
|
|
706
|
-
children: [/* @__PURE__ */
|
|
709
|
+
children: [/* @__PURE__ */ B(n, {
|
|
707
710
|
size: "xs",
|
|
708
711
|
className: "flow-inspector-label",
|
|
709
712
|
children: "Label"
|
|
710
|
-
}), /* @__PURE__ */
|
|
713
|
+
}), /* @__PURE__ */ B(t, {
|
|
711
714
|
size: "xs",
|
|
712
715
|
value: o.data.label,
|
|
713
716
|
onChange: (e) => c(o.id, "label", e.target.value)
|
|
714
717
|
})]
|
|
715
718
|
}),
|
|
716
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ V("div", {
|
|
717
720
|
className: "flow-inspector-row",
|
|
718
|
-
children: [/* @__PURE__ */
|
|
721
|
+
children: [/* @__PURE__ */ B(n, {
|
|
719
722
|
size: "xs",
|
|
720
723
|
className: "flow-inspector-label",
|
|
721
724
|
children: "Type"
|
|
722
|
-
}), /* @__PURE__ */
|
|
723
|
-
options:
|
|
725
|
+
}), /* @__PURE__ */ B(i, {
|
|
726
|
+
options: N.map((e) => ({
|
|
724
727
|
value: e,
|
|
725
728
|
label: e
|
|
726
729
|
})),
|
|
@@ -731,33 +734,33 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
731
734
|
})
|
|
732
735
|
]
|
|
733
736
|
}),
|
|
734
|
-
/* @__PURE__ */
|
|
737
|
+
/* @__PURE__ */ V("div", {
|
|
735
738
|
className: "flow-inspector-section",
|
|
736
739
|
children: [
|
|
737
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ B("div", {
|
|
738
741
|
className: "flow-inspector-section-title",
|
|
739
742
|
children: "Size"
|
|
740
743
|
}),
|
|
741
|
-
/* @__PURE__ */
|
|
744
|
+
/* @__PURE__ */ V("div", {
|
|
742
745
|
className: "flow-inspector-row",
|
|
743
|
-
children: [/* @__PURE__ */
|
|
746
|
+
children: [/* @__PURE__ */ B(n, {
|
|
744
747
|
size: "xs",
|
|
745
748
|
className: "flow-inspector-label",
|
|
746
749
|
children: "W"
|
|
747
|
-
}), /* @__PURE__ */
|
|
750
|
+
}), /* @__PURE__ */ B(t, {
|
|
748
751
|
size: "xs",
|
|
749
752
|
type: "number",
|
|
750
753
|
value: String(Math.round(o.width * 100) / 100),
|
|
751
754
|
onChange: (e) => u(o.id, "width", Number(e.target.value) || o.width)
|
|
752
755
|
})]
|
|
753
756
|
}),
|
|
754
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ V("div", {
|
|
755
758
|
className: "flow-inspector-row",
|
|
756
|
-
children: [/* @__PURE__ */
|
|
759
|
+
children: [/* @__PURE__ */ B(n, {
|
|
757
760
|
size: "xs",
|
|
758
761
|
className: "flow-inspector-label",
|
|
759
762
|
children: "H"
|
|
760
|
-
}), /* @__PURE__ */
|
|
763
|
+
}), /* @__PURE__ */ B(t, {
|
|
761
764
|
size: "xs",
|
|
762
765
|
type: "number",
|
|
763
766
|
value: String(Math.round(o.height * 100) / 100),
|
|
@@ -766,20 +769,20 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
766
769
|
})
|
|
767
770
|
]
|
|
768
771
|
}),
|
|
769
|
-
/* @__PURE__ */
|
|
772
|
+
/* @__PURE__ */ V("div", {
|
|
770
773
|
className: "flow-inspector-section",
|
|
771
774
|
children: [
|
|
772
|
-
/* @__PURE__ */
|
|
775
|
+
/* @__PURE__ */ B("div", {
|
|
773
776
|
className: "flow-inspector-section-title",
|
|
774
777
|
children: "Style"
|
|
775
778
|
}),
|
|
776
|
-
/* @__PURE__ */
|
|
779
|
+
/* @__PURE__ */ V("div", {
|
|
777
780
|
className: "flow-inspector-row",
|
|
778
|
-
children: [/* @__PURE__ */
|
|
781
|
+
children: [/* @__PURE__ */ B(n, {
|
|
779
782
|
size: "xs",
|
|
780
783
|
className: "flow-inspector-label",
|
|
781
784
|
children: "Fill"
|
|
782
|
-
}), /* @__PURE__ */
|
|
785
|
+
}), /* @__PURE__ */ B(W, {
|
|
783
786
|
value: o.data.fill,
|
|
784
787
|
kind: "fill",
|
|
785
788
|
allowTransparent: !0,
|
|
@@ -787,13 +790,13 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
787
790
|
onChange: (e) => c(o.id, "fill", e)
|
|
788
791
|
})]
|
|
789
792
|
}),
|
|
790
|
-
/* @__PURE__ */
|
|
793
|
+
/* @__PURE__ */ V("div", {
|
|
791
794
|
className: "flow-inspector-row",
|
|
792
|
-
children: [/* @__PURE__ */
|
|
795
|
+
children: [/* @__PURE__ */ B(n, {
|
|
793
796
|
size: "xs",
|
|
794
797
|
className: "flow-inspector-label",
|
|
795
798
|
children: "Stroke"
|
|
796
|
-
}), /* @__PURE__ */
|
|
799
|
+
}), /* @__PURE__ */ B(W, {
|
|
797
800
|
value: o.data.stroke,
|
|
798
801
|
kind: "stroke",
|
|
799
802
|
allowTransparent: !0,
|
|
@@ -801,53 +804,53 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
801
804
|
onChange: (e) => c(o.id, "stroke", e)
|
|
802
805
|
})]
|
|
803
806
|
}),
|
|
804
|
-
/* @__PURE__ */
|
|
807
|
+
/* @__PURE__ */ V("div", {
|
|
805
808
|
className: "flow-inspector-row",
|
|
806
|
-
children: [/* @__PURE__ */
|
|
809
|
+
children: [/* @__PURE__ */ B(n, {
|
|
807
810
|
size: "xs",
|
|
808
811
|
className: "flow-inspector-label",
|
|
809
812
|
children: "Font"
|
|
810
|
-
}), /* @__PURE__ */
|
|
813
|
+
}), /* @__PURE__ */ B(t, {
|
|
811
814
|
size: "xs",
|
|
812
815
|
type: "number",
|
|
813
816
|
value: String(o.data.fontSize),
|
|
814
817
|
onChange: (e) => c(o.id, "fontSize", Number(e.target.value) || 14)
|
|
815
818
|
})]
|
|
816
819
|
}),
|
|
817
|
-
/* @__PURE__ */
|
|
820
|
+
/* @__PURE__ */ V("div", {
|
|
818
821
|
className: "flow-inspector-row",
|
|
819
|
-
children: [/* @__PURE__ */
|
|
822
|
+
children: [/* @__PURE__ */ B(n, {
|
|
820
823
|
size: "xs",
|
|
821
824
|
className: "flow-inspector-label",
|
|
822
825
|
children: "Color"
|
|
823
|
-
}), /* @__PURE__ */
|
|
826
|
+
}), /* @__PURE__ */ B(W, {
|
|
824
827
|
value: o.data.color,
|
|
825
828
|
kind: "text",
|
|
826
829
|
customFallback: "#111827",
|
|
827
830
|
onChange: (e) => c(o.id, "color", e)
|
|
828
831
|
})]
|
|
829
832
|
}),
|
|
830
|
-
/* @__PURE__ */
|
|
833
|
+
/* @__PURE__ */ V("div", {
|
|
831
834
|
className: "flow-inspector-row",
|
|
832
|
-
children: [/* @__PURE__ */
|
|
835
|
+
children: [/* @__PURE__ */ B(n, {
|
|
833
836
|
size: "xs",
|
|
834
837
|
className: "flow-inspector-label",
|
|
835
838
|
children: "Font Color"
|
|
836
|
-
}), /* @__PURE__ */
|
|
839
|
+
}), /* @__PURE__ */ B(W, {
|
|
837
840
|
value: o.data.labelColor ?? o.data.color,
|
|
838
841
|
kind: "text",
|
|
839
842
|
customFallback: "#111827",
|
|
840
843
|
onChange: (e) => c(o.id, "labelColor", e)
|
|
841
844
|
})]
|
|
842
845
|
}),
|
|
843
|
-
o.type !== "shapeSvg" && o.type !== "mediaNode" && /* @__PURE__ */
|
|
844
|
-
/* @__PURE__ */
|
|
846
|
+
o.type !== "shapeSvg" && o.type !== "mediaNode" && /* @__PURE__ */ V(z, { children: [
|
|
847
|
+
/* @__PURE__ */ V("div", {
|
|
845
848
|
className: "flow-inspector-row",
|
|
846
|
-
children: [/* @__PURE__ */
|
|
849
|
+
children: [/* @__PURE__ */ B(n, {
|
|
847
850
|
size: "xs",
|
|
848
851
|
className: "flow-inspector-label",
|
|
849
852
|
children: "Text Pos"
|
|
850
|
-
}), /* @__PURE__ */
|
|
853
|
+
}), /* @__PURE__ */ B(i, {
|
|
851
854
|
options: [
|
|
852
855
|
{
|
|
853
856
|
value: "center",
|
|
@@ -891,26 +894,26 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
891
894
|
style: { fontSize: 12 }
|
|
892
895
|
})]
|
|
893
896
|
}),
|
|
894
|
-
/* @__PURE__ */
|
|
897
|
+
/* @__PURE__ */ V("div", {
|
|
895
898
|
className: "flow-inspector-row",
|
|
896
|
-
children: [/* @__PURE__ */
|
|
899
|
+
children: [/* @__PURE__ */ B(n, {
|
|
897
900
|
size: "xs",
|
|
898
901
|
className: "flow-inspector-label",
|
|
899
902
|
children: "Text Off X"
|
|
900
|
-
}), /* @__PURE__ */
|
|
903
|
+
}), /* @__PURE__ */ B(t, {
|
|
901
904
|
size: "xs",
|
|
902
905
|
type: "number",
|
|
903
906
|
value: String(o.data.labelOffsetX ?? 0),
|
|
904
907
|
onChange: (e) => c(o.id, "labelOffsetX", Number(e.target.value) || 0)
|
|
905
908
|
})]
|
|
906
909
|
}),
|
|
907
|
-
/* @__PURE__ */
|
|
910
|
+
/* @__PURE__ */ V("div", {
|
|
908
911
|
className: "flow-inspector-row",
|
|
909
|
-
children: [/* @__PURE__ */
|
|
912
|
+
children: [/* @__PURE__ */ B(n, {
|
|
910
913
|
size: "xs",
|
|
911
914
|
className: "flow-inspector-label",
|
|
912
915
|
children: "Text Off Y"
|
|
913
|
-
}), /* @__PURE__ */
|
|
916
|
+
}), /* @__PURE__ */ B(t, {
|
|
914
917
|
size: "xs",
|
|
915
918
|
type: "number",
|
|
916
919
|
value: String(o.data.labelOffsetY ?? 0),
|
|
@@ -918,13 +921,13 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
918
921
|
})]
|
|
919
922
|
})
|
|
920
923
|
] }),
|
|
921
|
-
/* @__PURE__ */
|
|
924
|
+
/* @__PURE__ */ V("div", {
|
|
922
925
|
className: "flow-inspector-row",
|
|
923
|
-
children: [/* @__PURE__ */
|
|
926
|
+
children: [/* @__PURE__ */ B(n, {
|
|
924
927
|
size: "xs",
|
|
925
928
|
className: "flow-inspector-label",
|
|
926
929
|
children: "Border"
|
|
927
|
-
}), /* @__PURE__ */
|
|
930
|
+
}), /* @__PURE__ */ B(i, {
|
|
928
931
|
options: [{
|
|
929
932
|
value: "none",
|
|
930
933
|
label: "none"
|
|
@@ -937,7 +940,7 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
937
940
|
style: { fontSize: 12 }
|
|
938
941
|
})]
|
|
939
942
|
}),
|
|
940
|
-
|
|
943
|
+
y.has(o.type) && (() => {
|
|
941
944
|
let i = o.data.borderSides ?? {}, a = (e, t) => {
|
|
942
945
|
c(o.id, "borderSides", {
|
|
943
946
|
...o.data.borderSides,
|
|
@@ -952,29 +955,29 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
952
955
|
bottom: "Bottom",
|
|
953
956
|
left: "Left"
|
|
954
957
|
};
|
|
955
|
-
return /* @__PURE__ */
|
|
958
|
+
return /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ V("div", {
|
|
956
959
|
className: "flow-inspector-row",
|
|
957
|
-
children: [/* @__PURE__ */
|
|
960
|
+
children: [/* @__PURE__ */ B(n, {
|
|
958
961
|
size: "xs",
|
|
959
962
|
className: "flow-inspector-label",
|
|
960
963
|
children: "Sides"
|
|
961
|
-
}), /* @__PURE__ */
|
|
964
|
+
}), /* @__PURE__ */ V("div", {
|
|
962
965
|
style: {
|
|
963
966
|
display: "flex",
|
|
964
967
|
alignItems: "center",
|
|
965
968
|
gap: 6,
|
|
966
969
|
flex: 1
|
|
967
970
|
},
|
|
968
|
-
children: [/* @__PURE__ */
|
|
971
|
+
children: [/* @__PURE__ */ B("span", {
|
|
969
972
|
style: {
|
|
970
973
|
fontSize: 10,
|
|
971
974
|
opacity: .55
|
|
972
975
|
},
|
|
973
976
|
children: "上下左右独立边框"
|
|
974
|
-
}),
|
|
977
|
+
}), b(o.data, o.type) && /* @__PURE__ */ B("span", {
|
|
975
978
|
title: "恢复与 Border 设置一致",
|
|
976
979
|
style: { display: "inline-flex" },
|
|
977
|
-
children: /* @__PURE__ */
|
|
980
|
+
children: /* @__PURE__ */ B(e, {
|
|
978
981
|
size: "xs",
|
|
979
982
|
variant: "ghost",
|
|
980
983
|
onClick: () => c(o.id, "borderSides", void 0),
|
|
@@ -982,9 +985,9 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
982
985
|
})
|
|
983
986
|
})]
|
|
984
987
|
})]
|
|
985
|
-
}),
|
|
988
|
+
}), v.map((e) => {
|
|
986
989
|
let n = i[e];
|
|
987
|
-
return /* @__PURE__ */
|
|
990
|
+
return /* @__PURE__ */ V("div", {
|
|
988
991
|
style: {
|
|
989
992
|
display: "flex",
|
|
990
993
|
alignItems: "center",
|
|
@@ -992,7 +995,7 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
992
995
|
marginBottom: 4
|
|
993
996
|
},
|
|
994
997
|
children: [
|
|
995
|
-
/* @__PURE__ */
|
|
998
|
+
/* @__PURE__ */ B("span", {
|
|
996
999
|
title: `独立设置${s[e]}边`,
|
|
997
1000
|
style: {
|
|
998
1001
|
fontSize: 10,
|
|
@@ -1002,28 +1005,28 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
1002
1005
|
},
|
|
1003
1006
|
children: s[e]
|
|
1004
1007
|
}),
|
|
1005
|
-
/* @__PURE__ */
|
|
1008
|
+
/* @__PURE__ */ B("span", {
|
|
1006
1009
|
title: `显示/隐藏 ${s[e]} 边`,
|
|
1007
1010
|
style: { display: "inline-flex" },
|
|
1008
|
-
children: /* @__PURE__ */
|
|
1011
|
+
children: /* @__PURE__ */ B(r, {
|
|
1009
1012
|
size: "sm",
|
|
1010
1013
|
checked: n?.visible ?? !0,
|
|
1011
1014
|
onChange: (t) => a(e, { visible: t })
|
|
1012
1015
|
})
|
|
1013
1016
|
}),
|
|
1014
|
-
/* @__PURE__ */
|
|
1017
|
+
/* @__PURE__ */ B(W, {
|
|
1015
1018
|
value: n?.color ?? o.data.stroke,
|
|
1016
1019
|
kind: "stroke",
|
|
1017
1020
|
customFallback: "#334155",
|
|
1018
1021
|
onChange: (t) => a(e, { color: t })
|
|
1019
1022
|
}),
|
|
1020
|
-
/* @__PURE__ */
|
|
1023
|
+
/* @__PURE__ */ B("span", {
|
|
1021
1024
|
title: `${s[e]} 粗细`,
|
|
1022
1025
|
style: {
|
|
1023
1026
|
display: "inline-flex",
|
|
1024
1027
|
width: 52
|
|
1025
1028
|
},
|
|
1026
|
-
children: /* @__PURE__ */
|
|
1029
|
+
children: /* @__PURE__ */ B(t, {
|
|
1027
1030
|
size: "xs",
|
|
1028
1031
|
type: "number",
|
|
1029
1032
|
value: String(n?.width ?? o.data.strokeWidth),
|
|
@@ -1034,22 +1037,22 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
1034
1037
|
}, e);
|
|
1035
1038
|
})] });
|
|
1036
1039
|
})(),
|
|
1037
|
-
o.type === "shapeSvg" && /* @__PURE__ */
|
|
1038
|
-
/* @__PURE__ */
|
|
1040
|
+
o.type === "shapeSvg" && /* @__PURE__ */ V(z, { children: [
|
|
1041
|
+
/* @__PURE__ */ V("div", {
|
|
1039
1042
|
className: "flow-inspector-row",
|
|
1040
|
-
children: [/* @__PURE__ */
|
|
1043
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1041
1044
|
size: "xs",
|
|
1042
1045
|
className: "flow-inspector-label",
|
|
1043
1046
|
children: "Icon"
|
|
1044
|
-
}), /* @__PURE__ */
|
|
1045
|
-
options:
|
|
1047
|
+
}), /* @__PURE__ */ B(i, {
|
|
1048
|
+
options: w().map((e) => ({
|
|
1046
1049
|
value: e.id,
|
|
1047
1050
|
label: e.label
|
|
1048
1051
|
})),
|
|
1049
1052
|
value: o.data.svgId ?? "",
|
|
1050
1053
|
placeholder: "选择图标",
|
|
1051
1054
|
onChange: (e) => {
|
|
1052
|
-
let t =
|
|
1055
|
+
let t = T(String(e));
|
|
1053
1056
|
l(o.id, {
|
|
1054
1057
|
svgId: e,
|
|
1055
1058
|
...t?.brandColor ? { color: t.brandColor } : {},
|
|
@@ -1059,26 +1062,26 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
1059
1062
|
style: { fontSize: 12 }
|
|
1060
1063
|
})]
|
|
1061
1064
|
}),
|
|
1062
|
-
/* @__PURE__ */
|
|
1065
|
+
/* @__PURE__ */ V("div", {
|
|
1063
1066
|
className: "flow-inspector-row",
|
|
1064
|
-
children: [/* @__PURE__ */
|
|
1067
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1065
1068
|
size: "xs",
|
|
1066
1069
|
className: "flow-inspector-label",
|
|
1067
1070
|
children: "Box"
|
|
1068
|
-
}), /* @__PURE__ */
|
|
1071
|
+
}), /* @__PURE__ */ B(r, {
|
|
1069
1072
|
size: "sm",
|
|
1070
1073
|
checked: o.data.iconBox ?? !1,
|
|
1071
1074
|
onChange: (e) => c(o.id, "iconBox", e),
|
|
1072
1075
|
label: "显示边框"
|
|
1073
1076
|
})]
|
|
1074
1077
|
}),
|
|
1075
|
-
/* @__PURE__ */
|
|
1078
|
+
/* @__PURE__ */ V("div", {
|
|
1076
1079
|
className: "flow-inspector-row",
|
|
1077
|
-
children: [/* @__PURE__ */
|
|
1080
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1078
1081
|
size: "xs",
|
|
1079
1082
|
className: "flow-inspector-label",
|
|
1080
1083
|
children: "Label"
|
|
1081
|
-
}), /* @__PURE__ */
|
|
1084
|
+
}), /* @__PURE__ */ B(i, {
|
|
1082
1085
|
options: [
|
|
1083
1086
|
{
|
|
1084
1087
|
value: "top",
|
|
@@ -1106,26 +1109,26 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
1106
1109
|
style: { fontSize: 12 }
|
|
1107
1110
|
})]
|
|
1108
1111
|
}),
|
|
1109
|
-
/* @__PURE__ */
|
|
1112
|
+
/* @__PURE__ */ V("div", {
|
|
1110
1113
|
className: "flow-inspector-row",
|
|
1111
|
-
children: [/* @__PURE__ */
|
|
1114
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1112
1115
|
size: "xs",
|
|
1113
1116
|
className: "flow-inspector-label",
|
|
1114
1117
|
children: "Offset X"
|
|
1115
|
-
}), /* @__PURE__ */
|
|
1118
|
+
}), /* @__PURE__ */ B(t, {
|
|
1116
1119
|
size: "xs",
|
|
1117
1120
|
type: "number",
|
|
1118
1121
|
value: String(o.data.labelOffsetX ?? 0),
|
|
1119
1122
|
onChange: (e) => c(o.id, "labelOffsetX", Number(e.target.value) || 0)
|
|
1120
1123
|
})]
|
|
1121
1124
|
}),
|
|
1122
|
-
/* @__PURE__ */
|
|
1125
|
+
/* @__PURE__ */ V("div", {
|
|
1123
1126
|
className: "flow-inspector-row",
|
|
1124
|
-
children: [/* @__PURE__ */
|
|
1127
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1125
1128
|
size: "xs",
|
|
1126
1129
|
className: "flow-inspector-label",
|
|
1127
1130
|
children: "Offset Y"
|
|
1128
|
-
}), /* @__PURE__ */
|
|
1131
|
+
}), /* @__PURE__ */ B(t, {
|
|
1129
1132
|
size: "xs",
|
|
1130
1133
|
type: "number",
|
|
1131
1134
|
value: String(o.data.labelOffsetY ?? 0),
|
|
@@ -1135,110 +1138,110 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
1135
1138
|
] })
|
|
1136
1139
|
]
|
|
1137
1140
|
}),
|
|
1138
|
-
o.type === "mediaNode" && /* @__PURE__ */
|
|
1141
|
+
o.type === "mediaNode" && /* @__PURE__ */ V("div", {
|
|
1139
1142
|
className: "flow-inspector-section",
|
|
1140
|
-
children: [/* @__PURE__ */
|
|
1143
|
+
children: [/* @__PURE__ */ B("div", {
|
|
1141
1144
|
className: "flow-inspector-section-title",
|
|
1142
1145
|
children: "Palette (Archify)"
|
|
1143
|
-
}), /* @__PURE__ */
|
|
1146
|
+
}), /* @__PURE__ */ V("div", {
|
|
1144
1147
|
className: "flow-inspector-row",
|
|
1145
|
-
children: [/* @__PURE__ */
|
|
1148
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1146
1149
|
size: "xs",
|
|
1147
1150
|
className: "flow-inspector-label",
|
|
1148
1151
|
children: "Palette"
|
|
1149
|
-
}), /* @__PURE__ */
|
|
1152
|
+
}), /* @__PURE__ */ B("div", {
|
|
1150
1153
|
style: {
|
|
1151
1154
|
display: "flex",
|
|
1152
1155
|
flexWrap: "wrap",
|
|
1153
1156
|
gap: 4
|
|
1154
1157
|
},
|
|
1155
|
-
children:
|
|
1158
|
+
children: k.map((e) => /* @__PURE__ */ B("button", {
|
|
1156
1159
|
type: "button",
|
|
1157
|
-
title:
|
|
1158
|
-
"aria-label":
|
|
1159
|
-
onClick: () => l(o.id,
|
|
1160
|
+
title: O[e],
|
|
1161
|
+
"aria-label": O[e],
|
|
1162
|
+
onClick: () => l(o.id, A(e)),
|
|
1160
1163
|
style: {
|
|
1161
1164
|
width: 18,
|
|
1162
1165
|
height: 18,
|
|
1163
1166
|
borderRadius: 4,
|
|
1164
1167
|
cursor: "pointer",
|
|
1165
|
-
background:
|
|
1166
|
-
border: `1.5px solid ${
|
|
1168
|
+
background: D[e].fill,
|
|
1169
|
+
border: `1.5px solid ${D[e].stroke}`
|
|
1167
1170
|
}
|
|
1168
1171
|
}, e))
|
|
1169
1172
|
})]
|
|
1170
1173
|
})]
|
|
1171
1174
|
}),
|
|
1172
|
-
o.type !== "mediaNode" && o.type !== "shapeSvg" && /* @__PURE__ */
|
|
1175
|
+
o.type !== "mediaNode" && o.type !== "shapeSvg" && /* @__PURE__ */ B(K, {
|
|
1173
1176
|
node: o,
|
|
1174
1177
|
onUpdateData: c
|
|
1175
1178
|
}),
|
|
1176
|
-
o.type !== "mediaNode" && /* @__PURE__ */
|
|
1179
|
+
o.type !== "mediaNode" && /* @__PURE__ */ V("div", {
|
|
1177
1180
|
className: "flow-inspector-section",
|
|
1178
1181
|
children: [
|
|
1179
|
-
/* @__PURE__ */
|
|
1182
|
+
/* @__PURE__ */ B("div", {
|
|
1180
1183
|
className: "flow-inspector-section-title",
|
|
1181
1184
|
children: "Card (Archify)"
|
|
1182
1185
|
}),
|
|
1183
|
-
/* @__PURE__ */
|
|
1186
|
+
/* @__PURE__ */ V("div", {
|
|
1184
1187
|
className: "flow-inspector-row",
|
|
1185
|
-
children: [/* @__PURE__ */
|
|
1188
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1186
1189
|
size: "xs",
|
|
1187
1190
|
className: "flow-inspector-label",
|
|
1188
1191
|
children: "Subtitle"
|
|
1189
|
-
}), /* @__PURE__ */
|
|
1192
|
+
}), /* @__PURE__ */ B(t, {
|
|
1190
1193
|
size: "xs",
|
|
1191
1194
|
value: o.data.sublabel ?? "",
|
|
1192
1195
|
placeholder: "secondary line",
|
|
1193
1196
|
onChange: (e) => c(o.id, "sublabel", e.target.value)
|
|
1194
1197
|
})]
|
|
1195
1198
|
}),
|
|
1196
|
-
/* @__PURE__ */
|
|
1199
|
+
/* @__PURE__ */ V("div", {
|
|
1197
1200
|
className: "flow-inspector-row",
|
|
1198
|
-
children: [/* @__PURE__ */
|
|
1201
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1199
1202
|
size: "xs",
|
|
1200
1203
|
className: "flow-inspector-label",
|
|
1201
1204
|
children: "Sub Color"
|
|
1202
|
-
}), /* @__PURE__ */
|
|
1205
|
+
}), /* @__PURE__ */ B(W, {
|
|
1203
1206
|
value: o.data.sublabelColor ?? "#94a3b8",
|
|
1204
1207
|
kind: "text",
|
|
1205
1208
|
customFallback: "#94a3b8",
|
|
1206
1209
|
onChange: (e) => c(o.id, "sublabelColor", e)
|
|
1207
1210
|
})]
|
|
1208
1211
|
}),
|
|
1209
|
-
/* @__PURE__ */
|
|
1212
|
+
/* @__PURE__ */ V("div", {
|
|
1210
1213
|
className: "flow-inspector-row",
|
|
1211
|
-
children: [/* @__PURE__ */
|
|
1214
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1212
1215
|
size: "xs",
|
|
1213
1216
|
className: "flow-inspector-label",
|
|
1214
1217
|
children: "Tag"
|
|
1215
|
-
}), /* @__PURE__ */
|
|
1218
|
+
}), /* @__PURE__ */ B(t, {
|
|
1216
1219
|
size: "xs",
|
|
1217
1220
|
value: o.data.tag ?? "",
|
|
1218
1221
|
placeholder: "corner pill",
|
|
1219
1222
|
onChange: (e) => c(o.id, "tag", e.target.value)
|
|
1220
1223
|
})]
|
|
1221
1224
|
}),
|
|
1222
|
-
/* @__PURE__ */
|
|
1225
|
+
/* @__PURE__ */ V("div", {
|
|
1223
1226
|
className: "flow-inspector-row",
|
|
1224
|
-
children: [/* @__PURE__ */
|
|
1227
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1225
1228
|
size: "xs",
|
|
1226
1229
|
className: "flow-inspector-label",
|
|
1227
1230
|
children: "Tag Color"
|
|
1228
|
-
}), /* @__PURE__ */
|
|
1231
|
+
}), /* @__PURE__ */ B(W, {
|
|
1229
1232
|
value: o.data.tagColor ?? o.data.stroke,
|
|
1230
1233
|
kind: "stroke",
|
|
1231
1234
|
customFallback: "#334155",
|
|
1232
1235
|
onChange: (e) => c(o.id, "tagColor", e)
|
|
1233
1236
|
})]
|
|
1234
1237
|
}),
|
|
1235
|
-
/* @__PURE__ */
|
|
1238
|
+
/* @__PURE__ */ V("div", {
|
|
1236
1239
|
className: "flow-inspector-row",
|
|
1237
|
-
children: [/* @__PURE__ */
|
|
1240
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1238
1241
|
size: "xs",
|
|
1239
1242
|
className: "flow-inspector-label",
|
|
1240
1243
|
children: "Tag Pos"
|
|
1241
|
-
}), /* @__PURE__ */
|
|
1244
|
+
}), /* @__PURE__ */ B(i, {
|
|
1242
1245
|
options: [
|
|
1243
1246
|
{
|
|
1244
1247
|
value: "top-left",
|
|
@@ -1262,62 +1265,64 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
1262
1265
|
style: { fontSize: 12 }
|
|
1263
1266
|
})]
|
|
1264
1267
|
}),
|
|
1265
|
-
/* @__PURE__ */
|
|
1268
|
+
/* @__PURE__ */ V("div", {
|
|
1266
1269
|
className: "flow-inspector-row",
|
|
1267
|
-
children: [/* @__PURE__ */
|
|
1270
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1268
1271
|
size: "xs",
|
|
1269
1272
|
className: "flow-inspector-label",
|
|
1270
1273
|
children: "Palette"
|
|
1271
|
-
}), /* @__PURE__ */
|
|
1274
|
+
}), /* @__PURE__ */ B("div", {
|
|
1272
1275
|
style: {
|
|
1273
1276
|
display: "flex",
|
|
1274
1277
|
flexWrap: "wrap",
|
|
1275
1278
|
gap: 4
|
|
1276
1279
|
},
|
|
1277
|
-
children:
|
|
1280
|
+
children: k.map((e) => /* @__PURE__ */ B("button", {
|
|
1278
1281
|
type: "button",
|
|
1279
|
-
title:
|
|
1280
|
-
"aria-label":
|
|
1281
|
-
onClick: () => l(o.id,
|
|
1282
|
+
title: O[e],
|
|
1283
|
+
"aria-label": O[e],
|
|
1284
|
+
onClick: () => l(o.id, A(e)),
|
|
1282
1285
|
style: {
|
|
1283
1286
|
width: 18,
|
|
1284
1287
|
height: 18,
|
|
1285
1288
|
borderRadius: 4,
|
|
1286
1289
|
cursor: "pointer",
|
|
1287
|
-
background:
|
|
1288
|
-
border: `1.5px solid ${
|
|
1290
|
+
background: D[e].fill,
|
|
1291
|
+
border: `1.5px solid ${D[e].stroke}`
|
|
1289
1292
|
}
|
|
1290
1293
|
}, e))
|
|
1291
1294
|
})]
|
|
1292
1295
|
})
|
|
1293
1296
|
]
|
|
1294
1297
|
}),
|
|
1295
|
-
o.type === "mediaNode" && /* @__PURE__ */
|
|
1298
|
+
o.type === "mediaNode" && /* @__PURE__ */ B(J, {
|
|
1296
1299
|
node: o,
|
|
1297
|
-
onUpdateData: c
|
|
1300
|
+
onUpdateData: c,
|
|
1301
|
+
globalAIConfig: f,
|
|
1302
|
+
useSharedAIConfig: p
|
|
1298
1303
|
}),
|
|
1299
|
-
/* @__PURE__ */
|
|
1304
|
+
/* @__PURE__ */ V("div", {
|
|
1300
1305
|
className: "flow-inspector-section",
|
|
1301
1306
|
children: [
|
|
1302
|
-
/* @__PURE__ */
|
|
1307
|
+
/* @__PURE__ */ B("div", {
|
|
1303
1308
|
className: "flow-inspector-section-title",
|
|
1304
1309
|
children: "Transform"
|
|
1305
1310
|
}),
|
|
1306
|
-
/* @__PURE__ */
|
|
1311
|
+
/* @__PURE__ */ V("div", {
|
|
1307
1312
|
className: "flow-inspector-row",
|
|
1308
1313
|
children: [
|
|
1309
|
-
/* @__PURE__ */
|
|
1314
|
+
/* @__PURE__ */ B(n, {
|
|
1310
1315
|
size: "xs",
|
|
1311
1316
|
className: "flow-inspector-label",
|
|
1312
1317
|
children: "Rotate"
|
|
1313
1318
|
}),
|
|
1314
|
-
/* @__PURE__ */
|
|
1319
|
+
/* @__PURE__ */ B(t, {
|
|
1315
1320
|
size: "xs",
|
|
1316
1321
|
type: "number",
|
|
1317
1322
|
value: String(o.data.rotation ?? 0),
|
|
1318
1323
|
onChange: (e) => c(o.id, "rotation", Number(e.target.value) || 0)
|
|
1319
1324
|
}),
|
|
1320
|
-
/* @__PURE__ */
|
|
1325
|
+
/* @__PURE__ */ B("span", {
|
|
1321
1326
|
className: "flow-inspector-suffix",
|
|
1322
1327
|
style: {
|
|
1323
1328
|
fontSize: 10,
|
|
@@ -1327,51 +1332,51 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
1327
1332
|
})
|
|
1328
1333
|
]
|
|
1329
1334
|
}),
|
|
1330
|
-
/* @__PURE__ */
|
|
1335
|
+
/* @__PURE__ */ V("div", {
|
|
1331
1336
|
className: "flow-inspector-row",
|
|
1332
1337
|
children: [
|
|
1333
|
-
/* @__PURE__ */
|
|
1338
|
+
/* @__PURE__ */ B(n, {
|
|
1334
1339
|
size: "xs",
|
|
1335
1340
|
className: "flow-inspector-label",
|
|
1336
1341
|
children: "Flip"
|
|
1337
1342
|
}),
|
|
1338
|
-
/* @__PURE__ */
|
|
1343
|
+
/* @__PURE__ */ B(e, {
|
|
1339
1344
|
size: "xs",
|
|
1340
1345
|
variant: o.data.flipX ? "primary" : "ghost",
|
|
1341
1346
|
onClick: () => c(o.id, "flipX", !o.data.flipX),
|
|
1342
1347
|
square: !0,
|
|
1343
|
-
children: /* @__PURE__ */
|
|
1348
|
+
children: /* @__PURE__ */ B("span", {
|
|
1344
1349
|
title: "Flip Horizontal",
|
|
1345
1350
|
children: "↔"
|
|
1346
1351
|
})
|
|
1347
1352
|
}),
|
|
1348
|
-
/* @__PURE__ */
|
|
1353
|
+
/* @__PURE__ */ B(e, {
|
|
1349
1354
|
size: "xs",
|
|
1350
1355
|
variant: o.data.flipY ? "primary" : "ghost",
|
|
1351
1356
|
onClick: () => c(o.id, "flipY", !o.data.flipY),
|
|
1352
1357
|
square: !0,
|
|
1353
|
-
children: /* @__PURE__ */
|
|
1358
|
+
children: /* @__PURE__ */ B("span", {
|
|
1354
1359
|
title: "Flip Vertical",
|
|
1355
1360
|
children: "↕"
|
|
1356
1361
|
})
|
|
1357
1362
|
})
|
|
1358
1363
|
]
|
|
1359
1364
|
}),
|
|
1360
|
-
/* @__PURE__ */
|
|
1365
|
+
/* @__PURE__ */ V("div", {
|
|
1361
1366
|
className: "flow-inspector-row",
|
|
1362
1367
|
children: [
|
|
1363
|
-
/* @__PURE__ */
|
|
1368
|
+
/* @__PURE__ */ B(n, {
|
|
1364
1369
|
size: "xs",
|
|
1365
1370
|
className: "flow-inspector-label",
|
|
1366
1371
|
children: "Quick"
|
|
1367
1372
|
}),
|
|
1368
|
-
/* @__PURE__ */
|
|
1373
|
+
/* @__PURE__ */ B(e, {
|
|
1369
1374
|
size: "xs",
|
|
1370
1375
|
variant: "ghost",
|
|
1371
1376
|
onClick: () => c(o.id, "rotation", ((o.data.rotation ?? 0) + 90) % 360),
|
|
1372
1377
|
children: "+90°"
|
|
1373
1378
|
}),
|
|
1374
|
-
/* @__PURE__ */
|
|
1379
|
+
/* @__PURE__ */ B(e, {
|
|
1375
1380
|
size: "xs",
|
|
1376
1381
|
variant: "ghost",
|
|
1377
1382
|
onClick: () => c(o.id, "rotation", ((o.data.rotation ?? 0) - 90 + 360) % 360),
|
|
@@ -1383,32 +1388,32 @@ function K({ node: o, isGroup: s, onUpdateData: c, onUpdateDataBatch: l, onUpdat
|
|
|
1383
1388
|
})
|
|
1384
1389
|
] });
|
|
1385
1390
|
}
|
|
1386
|
-
function
|
|
1387
|
-
let
|
|
1391
|
+
function J({ node: r, onUpdateData: a, globalAIConfig: o, useSharedAIConfig: s }) {
|
|
1392
|
+
let c = r.data.mediaKind ?? "markdown", l = s ? o : r.data.aiConfig, u = L(null), d = (e, t) => {
|
|
1388
1393
|
a(r.id, "aiConfig", {
|
|
1389
1394
|
gateway: "",
|
|
1390
1395
|
protocol: "openai",
|
|
1391
1396
|
model: "",
|
|
1392
|
-
...
|
|
1397
|
+
...l,
|
|
1393
1398
|
[e]: t
|
|
1394
1399
|
});
|
|
1395
1400
|
};
|
|
1396
|
-
return /* @__PURE__ */
|
|
1401
|
+
return /* @__PURE__ */ V("div", {
|
|
1397
1402
|
className: "flow-inspector-section",
|
|
1398
|
-
children: [/* @__PURE__ */
|
|
1403
|
+
children: [/* @__PURE__ */ V("div", {
|
|
1399
1404
|
className: "flow-inspector-section-title",
|
|
1400
|
-
children: ["Media · ",
|
|
1401
|
-
}),
|
|
1405
|
+
children: ["Media · ", c]
|
|
1406
|
+
}), c === "data" ? /* @__PURE__ */ B(F, {
|
|
1402
1407
|
node: r,
|
|
1403
1408
|
onUpdateData: a
|
|
1404
|
-
}) :
|
|
1405
|
-
/* @__PURE__ */
|
|
1409
|
+
}) : c === "model3d" ? /* @__PURE__ */ V(z, { children: [
|
|
1410
|
+
/* @__PURE__ */ V("div", {
|
|
1406
1411
|
className: "flow-inspector-row",
|
|
1407
|
-
children: [/* @__PURE__ */
|
|
1412
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1408
1413
|
size: "xs",
|
|
1409
1414
|
className: "flow-inspector-label",
|
|
1410
1415
|
children: "格式"
|
|
1411
|
-
}), /* @__PURE__ */
|
|
1416
|
+
}), /* @__PURE__ */ B(i, {
|
|
1412
1417
|
options: [
|
|
1413
1418
|
{
|
|
1414
1419
|
value: "stl",
|
|
@@ -1427,29 +1432,29 @@ function q({ node: r, onUpdateData: a }) {
|
|
|
1427
1432
|
onChange: (e) => a(r.id, "modelFormat", e)
|
|
1428
1433
|
})]
|
|
1429
1434
|
}),
|
|
1430
|
-
/* @__PURE__ */
|
|
1435
|
+
/* @__PURE__ */ V("div", {
|
|
1431
1436
|
className: "flow-inspector-row flow-inspector-multiline",
|
|
1432
|
-
children: [/* @__PURE__ */
|
|
1437
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1433
1438
|
size: "xs",
|
|
1434
1439
|
className: "flow-inspector-label",
|
|
1435
1440
|
children: "模型链接"
|
|
1436
|
-
}), /* @__PURE__ */
|
|
1441
|
+
}), /* @__PURE__ */ B(t, {
|
|
1437
1442
|
size: "xs",
|
|
1438
1443
|
value: r.data.mediaContent ?? "",
|
|
1439
1444
|
placeholder: "https://example.com/model.stl",
|
|
1440
1445
|
onChange: (e) => a(r.id, "mediaContent", e.target.value)
|
|
1441
1446
|
})]
|
|
1442
1447
|
}),
|
|
1443
|
-
/* @__PURE__ */
|
|
1448
|
+
/* @__PURE__ */ V("div", {
|
|
1444
1449
|
className: "flow-inspector-row",
|
|
1445
1450
|
children: [
|
|
1446
|
-
/* @__PURE__ */
|
|
1451
|
+
/* @__PURE__ */ B(n, {
|
|
1447
1452
|
size: "xs",
|
|
1448
1453
|
className: "flow-inspector-label",
|
|
1449
1454
|
children: "本地模型"
|
|
1450
1455
|
}),
|
|
1451
|
-
/* @__PURE__ */
|
|
1452
|
-
ref:
|
|
1456
|
+
/* @__PURE__ */ B("input", {
|
|
1457
|
+
ref: u,
|
|
1453
1458
|
type: "file",
|
|
1454
1459
|
accept: ".stl,.obj,.3mf,model/stl,model/obj,model/3mf,application/vnd.ms-package.3dmanufacturing-3dmodel+xml",
|
|
1455
1460
|
hidden: !0,
|
|
@@ -1471,45 +1476,52 @@ function q({ node: r, onUpdateData: a }) {
|
|
|
1471
1476
|
}, i.onerror = () => window.alert("读取本地模型失败。"), i.readAsDataURL(t);
|
|
1472
1477
|
}
|
|
1473
1478
|
}),
|
|
1474
|
-
/* @__PURE__ */
|
|
1479
|
+
/* @__PURE__ */ B(e, {
|
|
1475
1480
|
size: "xs",
|
|
1476
1481
|
variant: "neutral",
|
|
1477
|
-
onClick: () =>
|
|
1482
|
+
onClick: () => u.current?.click(),
|
|
1478
1483
|
children: "选择文件"
|
|
1479
1484
|
}),
|
|
1480
|
-
r.data.mediaContent?.startsWith("data:") && /* @__PURE__ */
|
|
1485
|
+
r.data.mediaContent?.startsWith("data:") && /* @__PURE__ */ B("span", {
|
|
1481
1486
|
className: "flow-inspector-file-status",
|
|
1482
1487
|
children: "已嵌入"
|
|
1483
1488
|
})
|
|
1484
1489
|
]
|
|
1485
1490
|
}),
|
|
1486
|
-
/* @__PURE__ */
|
|
1491
|
+
/* @__PURE__ */ B("div", {
|
|
1487
1492
|
className: "flow-inspector-help",
|
|
1488
1493
|
children: "支持 STL、OBJ、3MF;本地文件将以 Base64 嵌入文档,最大 10 MiB。选中节点后可在内部拖拽旋转、滚轮缩放。"
|
|
1489
1494
|
})
|
|
1490
|
-
] }) :
|
|
1495
|
+
] }) : c === "image" ? /* @__PURE__ */ V(z, { children: [/* @__PURE__ */ V("div", {
|
|
1491
1496
|
className: "flow-inspector-row flow-inspector-multiline",
|
|
1492
|
-
children: [/* @__PURE__ */
|
|
1497
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1493
1498
|
size: "xs",
|
|
1494
1499
|
className: "flow-inspector-label",
|
|
1495
1500
|
children: "图片链接"
|
|
1496
|
-
}), /* @__PURE__ */
|
|
1501
|
+
}), /* @__PURE__ */ B(t, {
|
|
1497
1502
|
size: "xs",
|
|
1498
1503
|
value: r.data.mediaContent ?? "",
|
|
1499
1504
|
placeholder: "https://example.com/image.png",
|
|
1500
1505
|
onChange: (e) => a(r.id, "mediaContent", e.target.value)
|
|
1501
1506
|
})]
|
|
1502
|
-
}), /* @__PURE__ */
|
|
1507
|
+
}), /* @__PURE__ */ B("div", {
|
|
1503
1508
|
className: "flow-inspector-help",
|
|
1504
1509
|
children: "支持 HTTP(S) 链接;选中图片节点后可直接粘贴图片并保存为 Base64。"
|
|
1505
|
-
})] }) :
|
|
1506
|
-
|
|
1510
|
+
})] }) : c === "ai" ? s ? /* @__PURE__ */ V("div", {
|
|
1511
|
+
className: "flow-inspector-help",
|
|
1512
|
+
children: [
|
|
1513
|
+
"此节点自动使用统一 AI 配置",
|
|
1514
|
+
o.model ? `(${o.model})` : "",
|
|
1515
|
+
",请通过 Flow 顶部的 AI 配置入口修改。"
|
|
1516
|
+
]
|
|
1517
|
+
}) : /* @__PURE__ */ V(z, { children: [
|
|
1518
|
+
/* @__PURE__ */ V("div", {
|
|
1507
1519
|
className: "flow-inspector-row",
|
|
1508
|
-
children: [/* @__PURE__ */
|
|
1520
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1509
1521
|
size: "xs",
|
|
1510
1522
|
className: "flow-inspector-label",
|
|
1511
1523
|
children: "协议"
|
|
1512
|
-
}), /* @__PURE__ */
|
|
1524
|
+
}), /* @__PURE__ */ B(i, {
|
|
1513
1525
|
options: [{
|
|
1514
1526
|
value: "openai",
|
|
1515
1527
|
label: "OpenAI 兼容"
|
|
@@ -1517,73 +1529,73 @@ function q({ node: r, onUpdateData: a }) {
|
|
|
1517
1529
|
value: "anthropic",
|
|
1518
1530
|
label: "Anthropic 兼容"
|
|
1519
1531
|
}],
|
|
1520
|
-
value:
|
|
1521
|
-
onChange: (e) =>
|
|
1532
|
+
value: l?.protocol ?? "openai",
|
|
1533
|
+
onChange: (e) => d("protocol", e),
|
|
1522
1534
|
style: { fontSize: 12 }
|
|
1523
1535
|
})]
|
|
1524
1536
|
}),
|
|
1525
|
-
/* @__PURE__ */
|
|
1537
|
+
/* @__PURE__ */ V("div", {
|
|
1526
1538
|
className: "flow-inspector-row",
|
|
1527
1539
|
style: {
|
|
1528
1540
|
flexDirection: "column",
|
|
1529
1541
|
alignItems: "stretch",
|
|
1530
1542
|
gap: 4
|
|
1531
1543
|
},
|
|
1532
|
-
children: [/* @__PURE__ */
|
|
1544
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1533
1545
|
size: "xs",
|
|
1534
1546
|
className: "flow-inspector-label",
|
|
1535
1547
|
children: "接口地址"
|
|
1536
|
-
}), /* @__PURE__ */
|
|
1548
|
+
}), /* @__PURE__ */ B(t, {
|
|
1537
1549
|
size: "xs",
|
|
1538
|
-
value:
|
|
1550
|
+
value: l?.gateway ?? "",
|
|
1539
1551
|
placeholder: "https://api.openai.com/v1/chat/completions",
|
|
1540
|
-
onChange: (e) =>
|
|
1552
|
+
onChange: (e) => d("gateway", e.target.value)
|
|
1541
1553
|
})]
|
|
1542
1554
|
}),
|
|
1543
|
-
/* @__PURE__ */
|
|
1555
|
+
/* @__PURE__ */ V("div", {
|
|
1544
1556
|
className: "flow-inspector-row",
|
|
1545
1557
|
style: {
|
|
1546
1558
|
flexDirection: "column",
|
|
1547
1559
|
alignItems: "stretch",
|
|
1548
1560
|
gap: 4
|
|
1549
1561
|
},
|
|
1550
|
-
children: [/* @__PURE__ */
|
|
1562
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1551
1563
|
size: "xs",
|
|
1552
1564
|
className: "flow-inspector-label",
|
|
1553
1565
|
children: "模型"
|
|
1554
|
-
}), /* @__PURE__ */
|
|
1566
|
+
}), /* @__PURE__ */ B(t, {
|
|
1555
1567
|
size: "xs",
|
|
1556
|
-
value:
|
|
1568
|
+
value: l?.model ?? "",
|
|
1557
1569
|
placeholder: "gpt-4o-mini",
|
|
1558
|
-
onChange: (e) =>
|
|
1570
|
+
onChange: (e) => d("model", e.target.value)
|
|
1559
1571
|
})]
|
|
1560
1572
|
}),
|
|
1561
|
-
/* @__PURE__ */
|
|
1573
|
+
/* @__PURE__ */ V("div", {
|
|
1562
1574
|
className: "flow-inspector-row",
|
|
1563
1575
|
style: {
|
|
1564
1576
|
flexDirection: "column",
|
|
1565
1577
|
alignItems: "stretch",
|
|
1566
1578
|
gap: 4
|
|
1567
1579
|
},
|
|
1568
|
-
children: [/* @__PURE__ */
|
|
1580
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1569
1581
|
size: "xs",
|
|
1570
1582
|
className: "flow-inspector-label",
|
|
1571
1583
|
children: "API Key"
|
|
1572
|
-
}), /* @__PURE__ */
|
|
1584
|
+
}), /* @__PURE__ */ B(t, {
|
|
1573
1585
|
size: "xs",
|
|
1574
1586
|
type: "password",
|
|
1575
|
-
value:
|
|
1587
|
+
value: l?.apiKey ?? "",
|
|
1576
1588
|
placeholder: "sk-...",
|
|
1577
|
-
onChange: (e) =>
|
|
1589
|
+
onChange: (e) => d("apiKey", e.target.value)
|
|
1578
1590
|
})]
|
|
1579
1591
|
}),
|
|
1580
|
-
/* @__PURE__ */
|
|
1592
|
+
/* @__PURE__ */ B(P, {
|
|
1581
1593
|
label: "System Prompt",
|
|
1582
|
-
value:
|
|
1583
|
-
onChange: (e) =>
|
|
1594
|
+
value: l?.systemPrompt ?? "",
|
|
1595
|
+
onChange: (e) => d("systemPrompt", e),
|
|
1584
1596
|
rows: 3
|
|
1585
1597
|
}),
|
|
1586
|
-
/* @__PURE__ */
|
|
1598
|
+
/* @__PURE__ */ B("div", {
|
|
1587
1599
|
style: {
|
|
1588
1600
|
fontSize: 10,
|
|
1589
1601
|
color: "color-mix(in oklch, var(--color-base-content) 45%, transparent)",
|
|
@@ -1591,34 +1603,34 @@ function q({ node: r, onUpdateData: a }) {
|
|
|
1591
1603
|
},
|
|
1592
1604
|
children: "密钥会随文档 JSON 一同导出,请谨慎分享。"
|
|
1593
1605
|
})
|
|
1594
|
-
] }) : /* @__PURE__ */
|
|
1606
|
+
] }) : /* @__PURE__ */ B(P, {
|
|
1595
1607
|
label: {
|
|
1596
1608
|
markdown: "Markdown 源码",
|
|
1597
1609
|
html: "HTML 源码",
|
|
1598
1610
|
mermaid: "Mermaid 图表",
|
|
1599
1611
|
math: "LaTeX 公式"
|
|
1600
|
-
}[
|
|
1612
|
+
}[c] ?? "内容",
|
|
1601
1613
|
value: r.data.mediaContent ?? "",
|
|
1602
1614
|
onChange: (e) => a(r.id, "mediaContent", e),
|
|
1603
1615
|
rows: 8
|
|
1604
1616
|
})]
|
|
1605
1617
|
});
|
|
1606
1618
|
}
|
|
1607
|
-
function
|
|
1608
|
-
return /* @__PURE__ */
|
|
1619
|
+
function Y({ edge: e, onUpdateData: a, onUpdateType: o }) {
|
|
1620
|
+
return /* @__PURE__ */ V("div", {
|
|
1609
1621
|
className: "flow-inspector-section",
|
|
1610
1622
|
children: [
|
|
1611
|
-
/* @__PURE__ */
|
|
1623
|
+
/* @__PURE__ */ B("div", {
|
|
1612
1624
|
className: "flow-inspector-section-title",
|
|
1613
1625
|
children: "Edge"
|
|
1614
1626
|
}),
|
|
1615
|
-
/* @__PURE__ */
|
|
1627
|
+
/* @__PURE__ */ V("div", {
|
|
1616
1628
|
className: "flow-inspector-row",
|
|
1617
|
-
children: [/* @__PURE__ */
|
|
1629
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1618
1630
|
size: "xs",
|
|
1619
1631
|
className: "flow-inspector-label",
|
|
1620
1632
|
children: "Type"
|
|
1621
|
-
}), /* @__PURE__ */
|
|
1633
|
+
}), /* @__PURE__ */ B(i, {
|
|
1622
1634
|
options: l.map((e) => ({
|
|
1623
1635
|
value: e,
|
|
1624
1636
|
label: e
|
|
@@ -1628,52 +1640,52 @@ function J({ edge: e, onUpdateData: a, onUpdateType: o }) {
|
|
|
1628
1640
|
style: { fontSize: 12 }
|
|
1629
1641
|
})]
|
|
1630
1642
|
}),
|
|
1631
|
-
/* @__PURE__ */
|
|
1643
|
+
/* @__PURE__ */ V("div", {
|
|
1632
1644
|
className: "flow-inspector-row",
|
|
1633
|
-
children: [/* @__PURE__ */
|
|
1645
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1634
1646
|
size: "xs",
|
|
1635
1647
|
className: "flow-inspector-label",
|
|
1636
1648
|
children: "Color"
|
|
1637
|
-
}), /* @__PURE__ */
|
|
1649
|
+
}), /* @__PURE__ */ B(W, {
|
|
1638
1650
|
value: e.data.strokeColor,
|
|
1639
1651
|
kind: "line",
|
|
1640
1652
|
customFallback: "#374151",
|
|
1641
1653
|
onChange: (t) => a(e.id, "strokeColor", t)
|
|
1642
1654
|
})]
|
|
1643
1655
|
}),
|
|
1644
|
-
/* @__PURE__ */
|
|
1656
|
+
/* @__PURE__ */ V("div", {
|
|
1645
1657
|
className: "flow-inspector-row",
|
|
1646
|
-
children: [/* @__PURE__ */
|
|
1658
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1647
1659
|
size: "xs",
|
|
1648
1660
|
className: "flow-inspector-label",
|
|
1649
1661
|
children: "Width"
|
|
1650
|
-
}), /* @__PURE__ */
|
|
1662
|
+
}), /* @__PURE__ */ B(t, {
|
|
1651
1663
|
size: "xs",
|
|
1652
1664
|
type: "number",
|
|
1653
1665
|
value: String(e.data.strokeWidth ?? 2),
|
|
1654
1666
|
onChange: (t) => a(e.id, "strokeWidth", Number(t.target.value) || 2)
|
|
1655
1667
|
})]
|
|
1656
1668
|
}),
|
|
1657
|
-
/* @__PURE__ */
|
|
1669
|
+
/* @__PURE__ */ V("div", {
|
|
1658
1670
|
className: "flow-inspector-row",
|
|
1659
|
-
children: [/* @__PURE__ */
|
|
1671
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1660
1672
|
size: "xs",
|
|
1661
1673
|
className: "flow-inspector-label",
|
|
1662
1674
|
children: "Animation"
|
|
1663
|
-
}), /* @__PURE__ */
|
|
1675
|
+
}), /* @__PURE__ */ B(r, {
|
|
1664
1676
|
size: "sm",
|
|
1665
1677
|
checked: e.data.animated ?? !1,
|
|
1666
1678
|
onChange: (t) => a(e.id, "animated", t),
|
|
1667
1679
|
label: "预览时播放"
|
|
1668
1680
|
})]
|
|
1669
1681
|
}),
|
|
1670
|
-
/* @__PURE__ */
|
|
1682
|
+
/* @__PURE__ */ V("div", {
|
|
1671
1683
|
className: "flow-inspector-row",
|
|
1672
|
-
children: [/* @__PURE__ */
|
|
1684
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1673
1685
|
size: "xs",
|
|
1674
1686
|
className: "flow-inspector-label",
|
|
1675
1687
|
children: "Line"
|
|
1676
|
-
}), /* @__PURE__ */
|
|
1688
|
+
}), /* @__PURE__ */ B(i, {
|
|
1677
1689
|
options: s.map((e) => ({
|
|
1678
1690
|
value: e,
|
|
1679
1691
|
label: e
|
|
@@ -1683,13 +1695,13 @@ function J({ edge: e, onUpdateData: a, onUpdateType: o }) {
|
|
|
1683
1695
|
style: { fontSize: 12 }
|
|
1684
1696
|
})]
|
|
1685
1697
|
}),
|
|
1686
|
-
/* @__PURE__ */
|
|
1698
|
+
/* @__PURE__ */ V("div", {
|
|
1687
1699
|
className: "flow-inspector-row",
|
|
1688
|
-
children: [/* @__PURE__ */
|
|
1700
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1689
1701
|
size: "xs",
|
|
1690
1702
|
className: "flow-inspector-label",
|
|
1691
1703
|
children: "Start"
|
|
1692
|
-
}), /* @__PURE__ */
|
|
1704
|
+
}), /* @__PURE__ */ B(i, {
|
|
1693
1705
|
options: c.map((e) => ({
|
|
1694
1706
|
value: e,
|
|
1695
1707
|
label: e
|
|
@@ -1699,13 +1711,13 @@ function J({ edge: e, onUpdateData: a, onUpdateType: o }) {
|
|
|
1699
1711
|
style: { fontSize: 12 }
|
|
1700
1712
|
})]
|
|
1701
1713
|
}),
|
|
1702
|
-
/* @__PURE__ */
|
|
1714
|
+
/* @__PURE__ */ V("div", {
|
|
1703
1715
|
className: "flow-inspector-row",
|
|
1704
|
-
children: [/* @__PURE__ */
|
|
1716
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1705
1717
|
size: "xs",
|
|
1706
1718
|
className: "flow-inspector-label",
|
|
1707
1719
|
children: "End"
|
|
1708
|
-
}), /* @__PURE__ */
|
|
1720
|
+
}), /* @__PURE__ */ B(i, {
|
|
1709
1721
|
options: c.map((e) => ({
|
|
1710
1722
|
value: e,
|
|
1711
1723
|
label: e
|
|
@@ -1715,13 +1727,13 @@ function J({ edge: e, onUpdateData: a, onUpdateType: o }) {
|
|
|
1715
1727
|
style: { fontSize: 12 }
|
|
1716
1728
|
})]
|
|
1717
1729
|
}),
|
|
1718
|
-
/* @__PURE__ */
|
|
1730
|
+
/* @__PURE__ */ V("div", {
|
|
1719
1731
|
className: "flow-inspector-row",
|
|
1720
|
-
children: [/* @__PURE__ */
|
|
1732
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1721
1733
|
size: "xs",
|
|
1722
1734
|
className: "flow-inspector-label",
|
|
1723
1735
|
children: "Label"
|
|
1724
|
-
}), /* @__PURE__ */
|
|
1736
|
+
}), /* @__PURE__ */ B(t, {
|
|
1725
1737
|
size: "xs",
|
|
1726
1738
|
value: e.data.labelText ?? "",
|
|
1727
1739
|
onChange: (t) => a(e.id, "labelText", t.target.value),
|
|
@@ -1731,21 +1743,21 @@ function J({ edge: e, onUpdateData: a, onUpdateType: o }) {
|
|
|
1731
1743
|
]
|
|
1732
1744
|
});
|
|
1733
1745
|
}
|
|
1734
|
-
function
|
|
1735
|
-
return /* @__PURE__ */
|
|
1746
|
+
function X({ line: e, onUpdateData: r }) {
|
|
1747
|
+
return /* @__PURE__ */ V("div", {
|
|
1736
1748
|
className: "flow-inspector-section",
|
|
1737
1749
|
children: [
|
|
1738
|
-
/* @__PURE__ */
|
|
1750
|
+
/* @__PURE__ */ B("div", {
|
|
1739
1751
|
className: "flow-inspector-section-title",
|
|
1740
1752
|
children: "Line"
|
|
1741
1753
|
}),
|
|
1742
|
-
/* @__PURE__ */
|
|
1754
|
+
/* @__PURE__ */ V("div", {
|
|
1743
1755
|
className: "flow-inspector-row",
|
|
1744
|
-
children: [/* @__PURE__ */
|
|
1756
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1745
1757
|
size: "xs",
|
|
1746
1758
|
className: "flow-inspector-label",
|
|
1747
1759
|
children: "Type"
|
|
1748
|
-
}), /* @__PURE__ */
|
|
1760
|
+
}), /* @__PURE__ */ B("span", {
|
|
1749
1761
|
style: {
|
|
1750
1762
|
fontSize: 12,
|
|
1751
1763
|
color: "color-mix(in oklch, var(--color-base-content) 60%, transparent)"
|
|
@@ -1753,39 +1765,39 @@ function Y({ line: e, onUpdateData: r }) {
|
|
|
1753
1765
|
children: e.type
|
|
1754
1766
|
})]
|
|
1755
1767
|
}),
|
|
1756
|
-
/* @__PURE__ */
|
|
1768
|
+
/* @__PURE__ */ V("div", {
|
|
1757
1769
|
className: "flow-inspector-row",
|
|
1758
|
-
children: [/* @__PURE__ */
|
|
1770
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1759
1771
|
size: "xs",
|
|
1760
1772
|
className: "flow-inspector-label",
|
|
1761
1773
|
children: "Color"
|
|
1762
|
-
}), /* @__PURE__ */
|
|
1774
|
+
}), /* @__PURE__ */ B(W, {
|
|
1763
1775
|
value: e.strokeColor,
|
|
1764
1776
|
kind: "line",
|
|
1765
1777
|
customFallback: "#374151",
|
|
1766
1778
|
onChange: (t) => r(e.id, "strokeColor", t)
|
|
1767
1779
|
})]
|
|
1768
1780
|
}),
|
|
1769
|
-
/* @__PURE__ */
|
|
1781
|
+
/* @__PURE__ */ V("div", {
|
|
1770
1782
|
className: "flow-inspector-row",
|
|
1771
|
-
children: [/* @__PURE__ */
|
|
1783
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1772
1784
|
size: "xs",
|
|
1773
1785
|
className: "flow-inspector-label",
|
|
1774
1786
|
children: "Width"
|
|
1775
|
-
}), /* @__PURE__ */
|
|
1787
|
+
}), /* @__PURE__ */ B(t, {
|
|
1776
1788
|
size: "xs",
|
|
1777
1789
|
type: "number",
|
|
1778
1790
|
value: String(e.strokeWidth),
|
|
1779
1791
|
onChange: (t) => r(e.id, "strokeWidth", Number(t.target.value) || 2)
|
|
1780
1792
|
})]
|
|
1781
1793
|
}),
|
|
1782
|
-
/* @__PURE__ */
|
|
1794
|
+
/* @__PURE__ */ V("div", {
|
|
1783
1795
|
className: "flow-inspector-row",
|
|
1784
|
-
children: [/* @__PURE__ */
|
|
1796
|
+
children: [/* @__PURE__ */ B(n, {
|
|
1785
1797
|
size: "xs",
|
|
1786
1798
|
className: "flow-inspector-label",
|
|
1787
1799
|
children: "Style"
|
|
1788
|
-
}), /* @__PURE__ */
|
|
1800
|
+
}), /* @__PURE__ */ B(i, {
|
|
1789
1801
|
options: s.map((e) => ({
|
|
1790
1802
|
value: e,
|
|
1791
1803
|
label: e
|
|
@@ -1799,6 +1811,6 @@ function Y({ line: e, onUpdateData: r }) {
|
|
|
1799
1811
|
});
|
|
1800
1812
|
}
|
|
1801
1813
|
//#endregion
|
|
1802
|
-
export {
|
|
1814
|
+
export { U as InspectorPanelContent, H as default };
|
|
1803
1815
|
|
|
1804
1816
|
//# sourceMappingURL=InspectorPanel.js.map
|