dishui 0.0.45 → 0.0.46
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/chart.js +46 -0
- package/dist/components/Chart/Chart.d.ts +17 -0
- package/dist/components/Chart/Chart.js +29 -0
- package/dist/components/Chart/Chart.js.map +1 -0
- package/dist/components/Chart/index.d.ts +15 -0
- package/dist/components/Input/index.js +2 -2
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/pro/Flow/Flow.js +492 -392
- package/dist/components/pro/Flow/Flow.js.map +1 -1
- package/dist/components/pro/Flow/FlowCanvas.js +895 -864
- package/dist/components/pro/Flow/FlowCanvas.js.map +1 -1
- package/dist/components/pro/Flow/context/FlowUIContext.d.ts +2 -0
- package/dist/components/pro/Flow/context/FlowUIContext.js +68 -65
- package/dist/components/pro/Flow/context/FlowUIContext.js.map +1 -1
- package/dist/components/pro/Flow/edges/edgePaths.js +234 -216
- package/dist/components/pro/Flow/edges/edgePaths.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js +21 -10
- package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useMindMap.js +138 -134
- package/dist/components/pro/Flow/hooks/useMindMap.js.map +1 -1
- package/dist/components/pro/Flow/index.d.ts +1 -1
- package/dist/components/pro/Flow/nodes/MediaContent.js +47 -25
- package/dist/components/pro/Flow/nodes/MediaContent.js.map +1 -1
- package/dist/components/pro/Flow/nodes/Model3DView.d.ts +7 -0
- package/dist/components/pro/Flow/nodes/Model3DView.js +118 -0
- package/dist/components/pro/Flow/nodes/Model3DView.js.map +1 -0
- package/dist/components/pro/Flow/nodes/NodeHandles.d.ts +2 -1
- package/dist/components/pro/Flow/nodes/NodeHandles.js +4 -2
- package/dist/components/pro/Flow/nodes/NodeHandles.js.map +1 -1
- package/dist/components/pro/Flow/nodes/NodeRenderer.d.ts +2 -0
- package/dist/components/pro/Flow/nodes/NodeRenderer.js +115 -113
- package/dist/components/pro/Flow/nodes/NodeRenderer.js.map +1 -1
- package/dist/components/pro/Flow/nodes/NodeText.d.ts +3 -0
- package/dist/components/pro/Flow/nodes/NodeText.js +26 -17
- package/dist/components/pro/Flow/nodes/NodeText.js.map +1 -1
- package/dist/components/pro/Flow/panels/FlowToolbar.js +85 -79
- package/dist/components/pro/Flow/panels/FlowToolbar.js.map +1 -1
- package/dist/components/pro/Flow/panels/InspectorPanel.js +618 -488
- package/dist/components/pro/Flow/panels/InspectorPanel.js.map +1 -1
- package/dist/components/pro/Flow/panels/OutlinePanel.js +15 -15
- package/dist/components/pro/Flow/panels/OutlinePanel.js.map +1 -1
- package/dist/components/pro/Flow/panels/ShapePalette.js +71 -55
- package/dist/components/pro/Flow/panels/ShapePalette.js.map +1 -1
- package/dist/components/pro/Flow/panels/toolbarIcons.d.ts +1 -0
- package/dist/components/pro/Flow/panels/toolbarIcons.js +59 -41
- package/dist/components/pro/Flow/panels/toolbarIcons.js.map +1 -1
- package/dist/components/pro/Flow/types.d.ts +13 -4
- package/dist/components/pro/Flow/types.js.map +1 -1
- package/dist/dishui.css +1 -1
- package/dist/index-nostyled.d.ts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +145 -143
- package/dist/utils/i18n.d.ts +1 -0
- package/dist/utils/i18n.js +200 -6
- package/dist/utils/i18n.js.map +1 -1
- package/dist/utils/menu.js +26 -10
- package/dist/utils/menu.js.map +1 -1
- package/package.json +14 -3
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { BORDER_STYLE_OPTIONS as
|
|
7
|
-
import { useFlowContext as
|
|
8
|
-
import { useFlowUI as
|
|
9
|
-
import { generateId as
|
|
10
|
-
import { getAllSvgIcons as
|
|
1
|
+
import g from "../../../Button/index.js";
|
|
2
|
+
import w from "../../../Input/index.js";
|
|
3
|
+
import c from "../../../Label/index.js";
|
|
4
|
+
import _ from "../../../Checkbox/index.js";
|
|
5
|
+
import y from "../../../Select/index.js";
|
|
6
|
+
import { BORDER_STYLE_OPTIONS as J, DEFAULT_NODE_DATA as q, EDGE_LINE_STYLE_OPTIONS as Y, EDGE_MARKER_OPTIONS as A, EDGE_TYPE_OPTIONS as Q } from "../constants.js";
|
|
7
|
+
import { useFlowContext as V } from "../context/FlowContext.js";
|
|
8
|
+
import { useFlowUI as D } from "../context/FlowUIContext.js";
|
|
9
|
+
import { generateId as U } from "../nodes/nodeUtils.js";
|
|
10
|
+
import { getAllSvgIcons as ee, getSvgIcon as le } from "../nodes/svgIcons.js";
|
|
11
11
|
import { useDraggablePanel as se } from "../hooks/useDraggablePanel.js";
|
|
12
|
-
import { useResizablePanel as
|
|
12
|
+
import { useResizablePanel as ae } from "../hooks/useResizablePanel.js";
|
|
13
13
|
import { FLOW_NODE_TYPES as ie } from "../types.js";
|
|
14
|
-
import { useMemo as
|
|
15
|
-
import { Fragment as G, jsx as e, jsxs as
|
|
16
|
-
function
|
|
17
|
-
const { showInspector:
|
|
18
|
-
return
|
|
14
|
+
import { useMemo as L, useRef as te, useState as ne } from "react";
|
|
15
|
+
import { Fragment as G, jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
16
|
+
function Ge() {
|
|
17
|
+
const { showInspector: l } = D(), { panelStyle: h, handleProps: r } = se(), { panelWidth: t, resizeHandleProps: m } = ae("left", 240);
|
|
18
|
+
return l ? /* @__PURE__ */ a("div", {
|
|
19
19
|
className: "flow-inspector",
|
|
20
20
|
"data-flow-panel": !0,
|
|
21
21
|
style: {
|
|
22
|
-
...
|
|
23
|
-
width:
|
|
22
|
+
...h,
|
|
23
|
+
width: t
|
|
24
24
|
},
|
|
25
25
|
children: [
|
|
26
26
|
/* @__PURE__ */ e("div", {
|
|
@@ -29,7 +29,7 @@ function Se() {
|
|
|
29
29
|
}),
|
|
30
30
|
/* @__PURE__ */ e("div", {
|
|
31
31
|
className: "flow-panel-drag-handle",
|
|
32
|
-
...
|
|
32
|
+
...r,
|
|
33
33
|
style: {
|
|
34
34
|
fontSize: 11,
|
|
35
35
|
fontWeight: 600,
|
|
@@ -43,78 +43,78 @@ function Se() {
|
|
|
43
43
|
}),
|
|
44
44
|
/* @__PURE__ */ e("div", {
|
|
45
45
|
className: "flow-inspector-content",
|
|
46
|
-
children: /* @__PURE__ */ e(
|
|
46
|
+
children: /* @__PURE__ */ e(oe, {})
|
|
47
47
|
})
|
|
48
48
|
]
|
|
49
49
|
}) : null;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const { currentCanvas:
|
|
53
|
-
if (
|
|
51
|
+
function oe() {
|
|
52
|
+
const { currentCanvas: l, selection: h, setSelection: r, setDoc: t, currentCanvasId: m } = V(), f = L(() => l.nodes.filter((d) => h.nodeIds.has(d.id)), [l.nodes, h.nodeIds]), s = L(() => l.edges.filter((d) => h.edgeIds.has(d.id)), [l.edges, h.edgeIds]), v = L(() => l.lines.filter((d) => h.lineIds.has(d.id)), [l.lines, h.lineIds]), E = f.length > 0 || s.length > 0 || v.length > 0, I = f.length === 1 && (f[0].type === "flowGroup" || f[0].type === "geometryGroup" || f[0].data.isGroup), F = f.length + v.length, O = (d = "flowGroup") => {
|
|
53
|
+
if (F < 2) return;
|
|
54
54
|
const u = 20;
|
|
55
|
-
let o = 1 / 0,
|
|
56
|
-
for (const
|
|
57
|
-
o = Math.min(o,
|
|
58
|
-
for (const
|
|
59
|
-
o = Math.min(o,
|
|
60
|
-
const
|
|
61
|
-
id:
|
|
62
|
-
type:
|
|
55
|
+
let o = 1 / 0, i = 1 / 0, n = -1 / 0, p = -1 / 0;
|
|
56
|
+
for (const x of f)
|
|
57
|
+
o = Math.min(o, x.position.x), i = Math.min(i, x.position.y), n = Math.max(n, x.position.x + x.width), p = Math.max(p, x.position.y + x.height);
|
|
58
|
+
for (const x of v) for (const z of x.points)
|
|
59
|
+
o = Math.min(o, z.x), i = Math.min(i, z.y), n = Math.max(n, z.x), p = Math.max(p, z.y);
|
|
60
|
+
const C = d === "geometryGroup", k = U("group"), N = {
|
|
61
|
+
id: k,
|
|
62
|
+
type: d,
|
|
63
63
|
position: {
|
|
64
64
|
x: o - u,
|
|
65
|
-
y:
|
|
65
|
+
y: i - u
|
|
66
66
|
},
|
|
67
67
|
width: n - o + u * 2,
|
|
68
|
-
height: p -
|
|
68
|
+
height: p - i + u * 2,
|
|
69
69
|
data: {
|
|
70
|
-
...
|
|
71
|
-
label:
|
|
72
|
-
fill:
|
|
70
|
+
...q,
|
|
71
|
+
label: C ? "Geo Group" : "Group",
|
|
72
|
+
fill: C ? "#fefce8" : "#f0f9ff",
|
|
73
73
|
stroke: "#9ca3af",
|
|
74
74
|
strokeWidth: 1.5,
|
|
75
|
-
borderStyle:
|
|
75
|
+
borderStyle: C ? "dashed" : "dotted",
|
|
76
76
|
isGroup: !0
|
|
77
77
|
}
|
|
78
|
-
}, S =
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
return
|
|
82
|
-
...
|
|
78
|
+
}, S = h.nodeIds, b = h.lineIds;
|
|
79
|
+
t((x) => {
|
|
80
|
+
const z = x.canvases[m];
|
|
81
|
+
return z ? {
|
|
82
|
+
...x,
|
|
83
83
|
canvases: {
|
|
84
|
-
...
|
|
84
|
+
...x.canvases,
|
|
85
85
|
[m]: {
|
|
86
|
-
...
|
|
87
|
-
nodes:
|
|
88
|
-
...
|
|
89
|
-
parentId:
|
|
90
|
-
} :
|
|
91
|
-
lines:
|
|
92
|
-
...
|
|
93
|
-
parentId:
|
|
94
|
-
} :
|
|
86
|
+
...z,
|
|
87
|
+
nodes: C ? [N, ...z.nodes] : [N, ...z.nodes.map((T) => S.has(T.id) ? {
|
|
88
|
+
...T,
|
|
89
|
+
parentId: k
|
|
90
|
+
} : T)],
|
|
91
|
+
lines: C ? z.lines : z.lines.map((T) => b.has(T.id) ? {
|
|
92
|
+
...T,
|
|
93
|
+
parentId: k
|
|
94
|
+
} : T)
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
} :
|
|
98
|
-
}),
|
|
99
|
-
nodeIds: /* @__PURE__ */ new Set([
|
|
97
|
+
} : x;
|
|
98
|
+
}), r({
|
|
99
|
+
nodeIds: /* @__PURE__ */ new Set([k]),
|
|
100
100
|
edgeIds: /* @__PURE__ */ new Set(),
|
|
101
101
|
lineIds: /* @__PURE__ */ new Set()
|
|
102
102
|
});
|
|
103
|
-
},
|
|
104
|
-
const
|
|
105
|
-
for (const
|
|
106
|
-
if (
|
|
107
|
-
for (const
|
|
108
|
-
for (const
|
|
109
|
-
|
|
110
|
-
const n =
|
|
103
|
+
}, R = () => {
|
|
104
|
+
const d = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
105
|
+
for (const i of f) (i.type === "flowGroup" || i.type === "geometryGroup" || i.data.isGroup) && d.add(i.id);
|
|
106
|
+
if (d.size !== 0) {
|
|
107
|
+
for (const i of l.nodes) i.parentId && d.has(i.parentId) && u.add(i.id);
|
|
108
|
+
for (const i of l.lines) i.parentId && d.has(i.parentId) && o.add(i.id);
|
|
109
|
+
t((i) => {
|
|
110
|
+
const n = i.canvases[m];
|
|
111
111
|
return n ? {
|
|
112
|
-
...
|
|
112
|
+
...i,
|
|
113
113
|
canvases: {
|
|
114
|
-
...
|
|
114
|
+
...i.canvases,
|
|
115
115
|
[m]: {
|
|
116
116
|
...n,
|
|
117
|
-
nodes: n.nodes.filter((p) => !
|
|
117
|
+
nodes: n.nodes.filter((p) => !d.has(p.id)).map((p) => u.has(p.id) ? {
|
|
118
118
|
...p,
|
|
119
119
|
parentId: void 0
|
|
120
120
|
} : p),
|
|
@@ -124,25 +124,25 @@ function ae() {
|
|
|
124
124
|
} : p)
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
} :
|
|
128
|
-
}),
|
|
127
|
+
} : i;
|
|
128
|
+
}), r({
|
|
129
129
|
nodeIds: u,
|
|
130
130
|
edgeIds: /* @__PURE__ */ new Set(),
|
|
131
131
|
lineIds: o
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
},
|
|
135
|
-
const u =
|
|
136
|
-
u.size !== 0 &&
|
|
137
|
-
const
|
|
138
|
-
if (!
|
|
139
|
-
const n =
|
|
140
|
-
if (!u.has(
|
|
141
|
-
const S =
|
|
142
|
-
let
|
|
143
|
-
return
|
|
144
|
-
...
|
|
145
|
-
zIndex:
|
|
134
|
+
}, B = (d) => {
|
|
135
|
+
const u = h.nodeIds;
|
|
136
|
+
u.size !== 0 && t((o) => {
|
|
137
|
+
const i = o.canvases[m];
|
|
138
|
+
if (!i) return o;
|
|
139
|
+
const n = i.nodes.map((N) => N.zIndex ?? 0), p = n.length > 0 ? Math.max(...n) : 0, C = n.length > 0 ? Math.min(...n) : 0, k = i.nodes.map((N) => {
|
|
140
|
+
if (!u.has(N.id)) return N;
|
|
141
|
+
const S = N.zIndex ?? 0;
|
|
142
|
+
let b = S;
|
|
143
|
+
return d === "front" ? b = p + 1 : d === "back" ? b = C - 1 : d === "up" ? b = S + 1 : d === "down" && (b = S - 1), {
|
|
144
|
+
...N,
|
|
145
|
+
zIndex: b
|
|
146
146
|
};
|
|
147
147
|
});
|
|
148
148
|
return {
|
|
@@ -150,24 +150,24 @@ function ae() {
|
|
|
150
150
|
canvases: {
|
|
151
151
|
...o.canvases,
|
|
152
152
|
[m]: {
|
|
153
|
-
...
|
|
154
|
-
nodes:
|
|
153
|
+
...i,
|
|
154
|
+
nodes: k
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
};
|
|
158
158
|
});
|
|
159
|
-
},
|
|
160
|
-
const u =
|
|
161
|
-
u.size !== 0 &&
|
|
162
|
-
const
|
|
163
|
-
if (!
|
|
164
|
-
const n =
|
|
165
|
-
if (!u.has(
|
|
166
|
-
const S =
|
|
167
|
-
let
|
|
168
|
-
return
|
|
169
|
-
...
|
|
170
|
-
zIndex:
|
|
159
|
+
}, M = (d) => {
|
|
160
|
+
const u = h.lineIds;
|
|
161
|
+
u.size !== 0 && t((o) => {
|
|
162
|
+
const i = o.canvases[m];
|
|
163
|
+
if (!i) return o;
|
|
164
|
+
const n = i.lines.map((N) => N.zIndex ?? 0), p = n.length > 0 ? Math.max(...n) : 0, C = n.length > 0 ? Math.min(...n) : 0, k = i.lines.map((N) => {
|
|
165
|
+
if (!u.has(N.id)) return N;
|
|
166
|
+
const S = N.zIndex ?? 0;
|
|
167
|
+
let b = S;
|
|
168
|
+
return d === "front" ? b = p + 1 : d === "back" ? b = C - 1 : d === "up" ? b = S + 1 : d === "down" && (b = S - 1), {
|
|
169
|
+
...N,
|
|
170
|
+
zIndex: b
|
|
171
171
|
};
|
|
172
172
|
});
|
|
173
173
|
return {
|
|
@@ -175,24 +175,24 @@ function ae() {
|
|
|
175
175
|
canvases: {
|
|
176
176
|
...o.canvases,
|
|
177
177
|
[m]: {
|
|
178
|
-
...
|
|
179
|
-
lines:
|
|
178
|
+
...i,
|
|
179
|
+
lines: k
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
};
|
|
183
183
|
});
|
|
184
|
-
}, Z = (
|
|
185
|
-
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
const
|
|
189
|
-
return
|
|
184
|
+
}, Z = (d, u, o) => {
|
|
185
|
+
P(d, { [u]: o });
|
|
186
|
+
}, P = (d, u) => {
|
|
187
|
+
t((o) => {
|
|
188
|
+
const i = o.canvases[m];
|
|
189
|
+
return i ? {
|
|
190
190
|
...o,
|
|
191
191
|
canvases: {
|
|
192
192
|
...o.canvases,
|
|
193
193
|
[m]: {
|
|
194
|
-
...
|
|
195
|
-
nodes:
|
|
194
|
+
...i,
|
|
195
|
+
nodes: i.nodes.map((n) => n.id === d ? {
|
|
196
196
|
...n,
|
|
197
197
|
data: {
|
|
198
198
|
...n.data,
|
|
@@ -203,33 +203,33 @@ function ae() {
|
|
|
203
203
|
}
|
|
204
204
|
} : o;
|
|
205
205
|
});
|
|
206
|
-
},
|
|
207
|
-
|
|
208
|
-
const n =
|
|
206
|
+
}, X = (d, u, o) => {
|
|
207
|
+
t((i) => {
|
|
208
|
+
const n = i.canvases[m];
|
|
209
209
|
return n ? {
|
|
210
|
-
...
|
|
210
|
+
...i,
|
|
211
211
|
canvases: {
|
|
212
|
-
...
|
|
212
|
+
...i.canvases,
|
|
213
213
|
[m]: {
|
|
214
214
|
...n,
|
|
215
|
-
nodes: n.nodes.map((p) => p.id ===
|
|
215
|
+
nodes: n.nodes.map((p) => p.id === d ? {
|
|
216
216
|
...p,
|
|
217
217
|
[u]: o
|
|
218
218
|
} : p)
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
} :
|
|
221
|
+
} : i;
|
|
222
222
|
});
|
|
223
|
-
},
|
|
224
|
-
|
|
225
|
-
const n =
|
|
223
|
+
}, j = (d, u, o) => {
|
|
224
|
+
t((i) => {
|
|
225
|
+
const n = i.canvases[m];
|
|
226
226
|
return n ? {
|
|
227
|
-
...
|
|
227
|
+
...i,
|
|
228
228
|
canvases: {
|
|
229
|
-
...
|
|
229
|
+
...i.canvases,
|
|
230
230
|
[m]: {
|
|
231
231
|
...n,
|
|
232
|
-
edges: n.edges.map((p) => p.id ===
|
|
232
|
+
edges: n.edges.map((p) => p.id === d ? {
|
|
233
233
|
...p,
|
|
234
234
|
data: {
|
|
235
235
|
...p.data,
|
|
@@ -238,18 +238,18 @@ function ae() {
|
|
|
238
238
|
} : p)
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
-
} :
|
|
241
|
+
} : i;
|
|
242
242
|
});
|
|
243
|
-
},
|
|
244
|
-
|
|
245
|
-
const
|
|
246
|
-
return
|
|
243
|
+
}, H = (d, u) => {
|
|
244
|
+
t((o) => {
|
|
245
|
+
const i = o.canvases[m];
|
|
246
|
+
return i ? {
|
|
247
247
|
...o,
|
|
248
248
|
canvases: {
|
|
249
249
|
...o.canvases,
|
|
250
250
|
[m]: {
|
|
251
|
-
...
|
|
252
|
-
nodes:
|
|
251
|
+
...i,
|
|
252
|
+
nodes: i.nodes.map((n) => n.id === d ? {
|
|
253
253
|
...n,
|
|
254
254
|
type: u
|
|
255
255
|
} : n)
|
|
@@ -257,16 +257,16 @@ function ae() {
|
|
|
257
257
|
}
|
|
258
258
|
} : o;
|
|
259
259
|
});
|
|
260
|
-
},
|
|
261
|
-
|
|
262
|
-
const
|
|
263
|
-
return
|
|
260
|
+
}, K = (d, u) => {
|
|
261
|
+
t((o) => {
|
|
262
|
+
const i = o.canvases[m];
|
|
263
|
+
return i ? {
|
|
264
264
|
...o,
|
|
265
265
|
canvases: {
|
|
266
266
|
...o.canvases,
|
|
267
267
|
[m]: {
|
|
268
|
-
...
|
|
269
|
-
edges:
|
|
268
|
+
...i,
|
|
269
|
+
edges: i.edges.map((n) => n.id === d ? {
|
|
270
270
|
...n,
|
|
271
271
|
type: u
|
|
272
272
|
} : n)
|
|
@@ -274,26 +274,26 @@ function ae() {
|
|
|
274
274
|
}
|
|
275
275
|
} : o;
|
|
276
276
|
});
|
|
277
|
-
}, $ = (
|
|
278
|
-
|
|
279
|
-
const n =
|
|
277
|
+
}, $ = (d, u, o) => {
|
|
278
|
+
t((i) => {
|
|
279
|
+
const n = i.canvases[m];
|
|
280
280
|
return n ? {
|
|
281
|
-
...
|
|
281
|
+
...i,
|
|
282
282
|
canvases: {
|
|
283
|
-
...
|
|
283
|
+
...i.canvases,
|
|
284
284
|
[m]: {
|
|
285
285
|
...n,
|
|
286
|
-
lines: n.lines.map((p) => p.id ===
|
|
286
|
+
lines: n.lines.map((p) => p.id === d ? {
|
|
287
287
|
...p,
|
|
288
288
|
[u]: o
|
|
289
289
|
} : p)
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
} :
|
|
292
|
+
} : i;
|
|
293
293
|
});
|
|
294
294
|
};
|
|
295
|
-
return /* @__PURE__ */
|
|
296
|
-
!
|
|
295
|
+
return /* @__PURE__ */ a(G, { children: [
|
|
296
|
+
!E && /* @__PURE__ */ e("div", {
|
|
297
297
|
style: {
|
|
298
298
|
fontSize: 12,
|
|
299
299
|
color: "oklch(var(--bc) / 0.4)",
|
|
@@ -302,62 +302,62 @@ function ae() {
|
|
|
302
302
|
},
|
|
303
303
|
children: "Select an element to inspect"
|
|
304
304
|
}),
|
|
305
|
-
|
|
306
|
-
node:
|
|
307
|
-
isGroup:
|
|
305
|
+
f.length === 1 && /* @__PURE__ */ e(re, {
|
|
306
|
+
node: f[0],
|
|
307
|
+
isGroup: I,
|
|
308
308
|
onUpdateData: Z,
|
|
309
|
-
onUpdateDataBatch:
|
|
310
|
-
onUpdateDimension:
|
|
311
|
-
onUpdateType:
|
|
309
|
+
onUpdateDataBatch: P,
|
|
310
|
+
onUpdateDimension: X,
|
|
311
|
+
onUpdateType: H
|
|
312
312
|
}),
|
|
313
|
-
|
|
313
|
+
F > 1 && /* @__PURE__ */ a("div", {
|
|
314
314
|
className: "flow-inspector-section",
|
|
315
315
|
children: [
|
|
316
316
|
/* @__PURE__ */ e("div", {
|
|
317
317
|
className: "flow-inspector-section-title",
|
|
318
318
|
children: "Selection"
|
|
319
319
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ a("div", {
|
|
321
321
|
style: {
|
|
322
322
|
fontSize: 12,
|
|
323
323
|
color: "oklch(var(--bc) / 0.5)",
|
|
324
324
|
marginBottom: 8
|
|
325
325
|
},
|
|
326
326
|
children: [
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
327
|
+
f.length > 0 && `${f.length} node${f.length > 1 ? "s" : ""}`,
|
|
328
|
+
f.length > 0 && v.length > 0 && ", ",
|
|
329
|
+
v.length > 0 && `${v.length} line${v.length > 1 ? "s" : ""}`,
|
|
330
330
|
" selected"
|
|
331
331
|
]
|
|
332
332
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ a("div", {
|
|
334
334
|
style: {
|
|
335
335
|
display: "flex",
|
|
336
336
|
flexDirection: "column",
|
|
337
337
|
gap: 4,
|
|
338
338
|
width: "100%"
|
|
339
339
|
},
|
|
340
|
-
children: [/* @__PURE__ */ e(
|
|
340
|
+
children: [/* @__PURE__ */ e(g, {
|
|
341
341
|
size: "xs",
|
|
342
|
-
onClick: () =>
|
|
342
|
+
onClick: () => O("flowGroup"),
|
|
343
343
|
block: !0,
|
|
344
344
|
children: "Group (⌘G)"
|
|
345
|
-
}), /* @__PURE__ */ e(
|
|
345
|
+
}), /* @__PURE__ */ e(g, {
|
|
346
346
|
size: "xs",
|
|
347
347
|
variant: "ghost",
|
|
348
|
-
onClick: () =>
|
|
348
|
+
onClick: () => O("geometryGroup"),
|
|
349
349
|
block: !0,
|
|
350
350
|
children: "Geo Group (⌘⌥G)"
|
|
351
351
|
})]
|
|
352
352
|
})
|
|
353
353
|
]
|
|
354
354
|
}),
|
|
355
|
-
|
|
355
|
+
I && /* @__PURE__ */ a("div", {
|
|
356
356
|
className: "flow-inspector-section",
|
|
357
357
|
children: [
|
|
358
358
|
/* @__PURE__ */ e("div", {
|
|
359
359
|
className: "flow-inspector-section-title",
|
|
360
|
-
children:
|
|
360
|
+
children: f[0].type === "geometryGroup" ? "Geometry Group" : "Group"
|
|
361
361
|
}),
|
|
362
362
|
/* @__PURE__ */ e("div", {
|
|
363
363
|
style: {
|
|
@@ -365,59 +365,59 @@ function ae() {
|
|
|
365
365
|
color: "oklch(var(--bc) / 0.45)",
|
|
366
366
|
marginBottom: 6
|
|
367
367
|
},
|
|
368
|
-
children:
|
|
368
|
+
children: f[0].type === "geometryGroup" ? "Auto-binds spatially contained nodes" : "Explicit membership via add/remove"
|
|
369
369
|
}),
|
|
370
|
-
/* @__PURE__ */ e(
|
|
370
|
+
/* @__PURE__ */ e(g, {
|
|
371
371
|
size: "xs",
|
|
372
372
|
variant: "ghost",
|
|
373
|
-
onClick:
|
|
373
|
+
onClick: R,
|
|
374
374
|
block: !0,
|
|
375
375
|
children: "Ungroup (⌘⇧G)"
|
|
376
376
|
})
|
|
377
377
|
]
|
|
378
378
|
}),
|
|
379
|
-
|
|
379
|
+
f.length > 0 && /* @__PURE__ */ a("div", {
|
|
380
380
|
className: "flow-inspector-section",
|
|
381
381
|
children: [/* @__PURE__ */ e("div", {
|
|
382
382
|
className: "flow-inspector-section-title",
|
|
383
383
|
children: "Layer"
|
|
384
|
-
}), /* @__PURE__ */
|
|
384
|
+
}), /* @__PURE__ */ a("div", {
|
|
385
385
|
style: {
|
|
386
386
|
display: "flex",
|
|
387
387
|
gap: 4
|
|
388
388
|
},
|
|
389
389
|
children: [
|
|
390
|
-
/* @__PURE__ */ e(
|
|
390
|
+
/* @__PURE__ */ e(g, {
|
|
391
391
|
size: "xs",
|
|
392
392
|
variant: "ghost",
|
|
393
|
-
onClick: () =>
|
|
393
|
+
onClick: () => B("front"),
|
|
394
394
|
children: /* @__PURE__ */ e("span", {
|
|
395
395
|
title: "Bring to Front (⌘⇧↑)",
|
|
396
396
|
children: "⤒"
|
|
397
397
|
})
|
|
398
398
|
}),
|
|
399
|
-
/* @__PURE__ */ e(
|
|
399
|
+
/* @__PURE__ */ e(g, {
|
|
400
400
|
size: "xs",
|
|
401
401
|
variant: "ghost",
|
|
402
|
-
onClick: () =>
|
|
402
|
+
onClick: () => B("up"),
|
|
403
403
|
children: /* @__PURE__ */ e("span", {
|
|
404
404
|
title: "Bring Forward (⌘↑)",
|
|
405
405
|
children: "↑"
|
|
406
406
|
})
|
|
407
407
|
}),
|
|
408
|
-
/* @__PURE__ */ e(
|
|
408
|
+
/* @__PURE__ */ e(g, {
|
|
409
409
|
size: "xs",
|
|
410
410
|
variant: "ghost",
|
|
411
|
-
onClick: () =>
|
|
411
|
+
onClick: () => B("down"),
|
|
412
412
|
children: /* @__PURE__ */ e("span", {
|
|
413
413
|
title: "Send Backward (⌘↓)",
|
|
414
414
|
children: "↓"
|
|
415
415
|
})
|
|
416
416
|
}),
|
|
417
|
-
/* @__PURE__ */ e(
|
|
417
|
+
/* @__PURE__ */ e(g, {
|
|
418
418
|
size: "xs",
|
|
419
419
|
variant: "ghost",
|
|
420
|
-
onClick: () =>
|
|
420
|
+
onClick: () => B("back"),
|
|
421
421
|
children: /* @__PURE__ */ e("span", {
|
|
422
422
|
title: "Send to Back (⌘⇧↓)",
|
|
423
423
|
children: "⤓"
|
|
@@ -426,56 +426,56 @@ function ae() {
|
|
|
426
426
|
]
|
|
427
427
|
})]
|
|
428
428
|
}),
|
|
429
|
-
|
|
430
|
-
edge:
|
|
431
|
-
onUpdateData:
|
|
432
|
-
onUpdateType:
|
|
429
|
+
s.length === 1 && /* @__PURE__ */ e(de, {
|
|
430
|
+
edge: s[0],
|
|
431
|
+
onUpdateData: j,
|
|
432
|
+
onUpdateType: K
|
|
433
433
|
}),
|
|
434
|
-
|
|
435
|
-
line:
|
|
434
|
+
v.length === 1 && /* @__PURE__ */ a(G, { children: [/* @__PURE__ */ e(he, {
|
|
435
|
+
line: v[0],
|
|
436
436
|
onUpdateData: $
|
|
437
|
-
}), /* @__PURE__ */
|
|
437
|
+
}), /* @__PURE__ */ a("div", {
|
|
438
438
|
className: "flow-inspector-section",
|
|
439
439
|
children: [/* @__PURE__ */ e("div", {
|
|
440
440
|
className: "flow-inspector-section-title",
|
|
441
441
|
children: "Layer"
|
|
442
|
-
}), /* @__PURE__ */
|
|
442
|
+
}), /* @__PURE__ */ a("div", {
|
|
443
443
|
style: {
|
|
444
444
|
display: "flex",
|
|
445
445
|
gap: 4
|
|
446
446
|
},
|
|
447
447
|
children: [
|
|
448
|
-
/* @__PURE__ */ e(
|
|
448
|
+
/* @__PURE__ */ e(g, {
|
|
449
449
|
size: "xs",
|
|
450
450
|
variant: "ghost",
|
|
451
|
-
onClick: () =>
|
|
451
|
+
onClick: () => M("front"),
|
|
452
452
|
children: /* @__PURE__ */ e("span", {
|
|
453
453
|
title: "Bring to Front",
|
|
454
454
|
children: "⤒"
|
|
455
455
|
})
|
|
456
456
|
}),
|
|
457
|
-
/* @__PURE__ */ e(
|
|
457
|
+
/* @__PURE__ */ e(g, {
|
|
458
458
|
size: "xs",
|
|
459
459
|
variant: "ghost",
|
|
460
|
-
onClick: () =>
|
|
460
|
+
onClick: () => M("up"),
|
|
461
461
|
children: /* @__PURE__ */ e("span", {
|
|
462
462
|
title: "Bring Forward",
|
|
463
463
|
children: "↑"
|
|
464
464
|
})
|
|
465
465
|
}),
|
|
466
|
-
/* @__PURE__ */ e(
|
|
466
|
+
/* @__PURE__ */ e(g, {
|
|
467
467
|
size: "xs",
|
|
468
468
|
variant: "ghost",
|
|
469
|
-
onClick: () =>
|
|
469
|
+
onClick: () => M("down"),
|
|
470
470
|
children: /* @__PURE__ */ e("span", {
|
|
471
471
|
title: "Send Backward",
|
|
472
472
|
children: "↓"
|
|
473
473
|
})
|
|
474
474
|
}),
|
|
475
|
-
/* @__PURE__ */ e(
|
|
475
|
+
/* @__PURE__ */ e(g, {
|
|
476
476
|
size: "xs",
|
|
477
477
|
variant: "ghost",
|
|
478
|
-
onClick: () =>
|
|
478
|
+
onClick: () => M("back"),
|
|
479
479
|
children: /* @__PURE__ */ e("span", {
|
|
480
480
|
title: "Send to Back",
|
|
481
481
|
children: "⤓"
|
|
@@ -486,288 +486,303 @@ function ae() {
|
|
|
486
486
|
})] })
|
|
487
487
|
] });
|
|
488
488
|
}
|
|
489
|
-
function
|
|
490
|
-
return /* @__PURE__ */
|
|
491
|
-
/* @__PURE__ */
|
|
489
|
+
function re({ node: l, isGroup: h, onUpdateData: r, onUpdateDataBatch: t, onUpdateDimension: m, onUpdateType: f }) {
|
|
490
|
+
return /* @__PURE__ */ a(G, { children: [
|
|
491
|
+
/* @__PURE__ */ a("div", {
|
|
492
492
|
className: "flow-inspector-section",
|
|
493
493
|
children: [
|
|
494
494
|
/* @__PURE__ */ e("div", {
|
|
495
495
|
className: "flow-inspector-section-title",
|
|
496
496
|
children: "Node"
|
|
497
497
|
}),
|
|
498
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ a("div", {
|
|
499
499
|
className: "flow-inspector-row",
|
|
500
|
-
children: [/* @__PURE__ */ e(
|
|
500
|
+
children: [/* @__PURE__ */ e(c, {
|
|
501
501
|
size: "xs",
|
|
502
502
|
className: "flow-inspector-label",
|
|
503
503
|
children: "Label"
|
|
504
|
-
}), /* @__PURE__ */ e(
|
|
504
|
+
}), /* @__PURE__ */ e(w, {
|
|
505
505
|
size: "xs",
|
|
506
|
-
value:
|
|
507
|
-
onChange: (
|
|
506
|
+
value: l.data.label,
|
|
507
|
+
onChange: (s) => r(l.id, "label", s.target.value)
|
|
508
508
|
})]
|
|
509
509
|
}),
|
|
510
|
-
/* @__PURE__ */
|
|
510
|
+
/* @__PURE__ */ a("div", {
|
|
511
511
|
className: "flow-inspector-row",
|
|
512
|
-
children: [/* @__PURE__ */ e(
|
|
512
|
+
children: [/* @__PURE__ */ e(c, {
|
|
513
513
|
size: "xs",
|
|
514
514
|
className: "flow-inspector-label",
|
|
515
515
|
children: "Type"
|
|
516
|
-
}), /* @__PURE__ */ e(
|
|
517
|
-
options: ie.map((
|
|
518
|
-
value:
|
|
519
|
-
label:
|
|
516
|
+
}), /* @__PURE__ */ e(y, {
|
|
517
|
+
options: ie.map((s) => ({
|
|
518
|
+
value: s,
|
|
519
|
+
label: s
|
|
520
520
|
})),
|
|
521
|
-
value:
|
|
522
|
-
onChange: (
|
|
521
|
+
value: l.type,
|
|
522
|
+
onChange: (s) => f(l.id, s),
|
|
523
523
|
style: { fontSize: 12 }
|
|
524
524
|
})]
|
|
525
525
|
})
|
|
526
526
|
]
|
|
527
527
|
}),
|
|
528
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ a("div", {
|
|
529
529
|
className: "flow-inspector-section",
|
|
530
530
|
children: [
|
|
531
531
|
/* @__PURE__ */ e("div", {
|
|
532
532
|
className: "flow-inspector-section-title",
|
|
533
533
|
children: "Size"
|
|
534
534
|
}),
|
|
535
|
-
/* @__PURE__ */
|
|
535
|
+
/* @__PURE__ */ a("div", {
|
|
536
536
|
className: "flow-inspector-row",
|
|
537
|
-
children: [/* @__PURE__ */ e(
|
|
537
|
+
children: [/* @__PURE__ */ e(c, {
|
|
538
538
|
size: "xs",
|
|
539
539
|
className: "flow-inspector-label",
|
|
540
540
|
children: "W"
|
|
541
|
-
}), /* @__PURE__ */ e(
|
|
541
|
+
}), /* @__PURE__ */ e(w, {
|
|
542
542
|
size: "xs",
|
|
543
543
|
type: "number",
|
|
544
|
-
value: String(Math.round(
|
|
545
|
-
onChange: (
|
|
544
|
+
value: String(Math.round(l.width * 100) / 100),
|
|
545
|
+
onChange: (s) => m(l.id, "width", Number(s.target.value) || l.width)
|
|
546
546
|
})]
|
|
547
547
|
}),
|
|
548
|
-
/* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ a("div", {
|
|
549
549
|
className: "flow-inspector-row",
|
|
550
|
-
children: [/* @__PURE__ */ e(
|
|
550
|
+
children: [/* @__PURE__ */ e(c, {
|
|
551
551
|
size: "xs",
|
|
552
552
|
className: "flow-inspector-label",
|
|
553
553
|
children: "H"
|
|
554
|
-
}), /* @__PURE__ */ e(
|
|
554
|
+
}), /* @__PURE__ */ e(w, {
|
|
555
555
|
size: "xs",
|
|
556
556
|
type: "number",
|
|
557
|
-
value: String(Math.round(
|
|
558
|
-
onChange: (
|
|
557
|
+
value: String(Math.round(l.height * 100) / 100),
|
|
558
|
+
onChange: (s) => m(l.id, "height", Number(s.target.value) || l.height)
|
|
559
559
|
})]
|
|
560
560
|
})
|
|
561
561
|
]
|
|
562
562
|
}),
|
|
563
|
-
/* @__PURE__ */
|
|
563
|
+
/* @__PURE__ */ a("div", {
|
|
564
564
|
className: "flow-inspector-section",
|
|
565
565
|
children: [
|
|
566
566
|
/* @__PURE__ */ e("div", {
|
|
567
567
|
className: "flow-inspector-section-title",
|
|
568
568
|
children: "Style"
|
|
569
569
|
}),
|
|
570
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ a("div", {
|
|
571
571
|
className: "flow-inspector-row",
|
|
572
|
-
children: [/* @__PURE__ */ e(
|
|
572
|
+
children: [/* @__PURE__ */ e(c, {
|
|
573
573
|
size: "xs",
|
|
574
574
|
className: "flow-inspector-label",
|
|
575
575
|
children: "Fill"
|
|
576
|
-
}), /* @__PURE__ */ e(
|
|
576
|
+
}), /* @__PURE__ */ e(w, {
|
|
577
577
|
type: "color",
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
height: 24,
|
|
583
|
-
border: "none",
|
|
584
|
-
borderRadius: 4,
|
|
585
|
-
cursor: "pointer"
|
|
586
|
-
}
|
|
578
|
+
size: "xs",
|
|
579
|
+
value: l.data.fill === "transparent" ? "#ffffff" : l.data.fill,
|
|
580
|
+
onChange: (s) => r(l.id, "fill", s.target.value),
|
|
581
|
+
className: "flow-inspector-color flow-inspector-compact"
|
|
587
582
|
})]
|
|
588
583
|
}),
|
|
589
|
-
/* @__PURE__ */
|
|
584
|
+
/* @__PURE__ */ a("div", {
|
|
590
585
|
className: "flow-inspector-row",
|
|
591
|
-
children: [/* @__PURE__ */ e(
|
|
586
|
+
children: [/* @__PURE__ */ e(c, {
|
|
592
587
|
size: "xs",
|
|
593
588
|
className: "flow-inspector-label",
|
|
594
589
|
children: "Stroke"
|
|
595
|
-
}), /* @__PURE__ */ e(
|
|
590
|
+
}), /* @__PURE__ */ e(w, {
|
|
596
591
|
type: "color",
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
height: 24,
|
|
602
|
-
border: "none",
|
|
603
|
-
borderRadius: 4,
|
|
604
|
-
cursor: "pointer"
|
|
605
|
-
}
|
|
592
|
+
size: "xs",
|
|
593
|
+
value: l.data.stroke === "transparent" ? "#000000" : l.data.stroke,
|
|
594
|
+
onChange: (s) => r(l.id, "stroke", s.target.value),
|
|
595
|
+
className: "flow-inspector-color flow-inspector-compact"
|
|
606
596
|
})]
|
|
607
597
|
}),
|
|
608
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ a("div", {
|
|
609
599
|
className: "flow-inspector-row",
|
|
610
|
-
children: [/* @__PURE__ */ e(
|
|
600
|
+
children: [/* @__PURE__ */ e(c, {
|
|
611
601
|
size: "xs",
|
|
612
602
|
className: "flow-inspector-label",
|
|
613
603
|
children: "Font"
|
|
614
|
-
}), /* @__PURE__ */ e(
|
|
604
|
+
}), /* @__PURE__ */ e(w, {
|
|
615
605
|
size: "xs",
|
|
616
606
|
type: "number",
|
|
617
|
-
value: String(
|
|
618
|
-
onChange: (
|
|
607
|
+
value: String(l.data.fontSize),
|
|
608
|
+
onChange: (s) => r(l.id, "fontSize", Number(s.target.value) || 14)
|
|
619
609
|
})]
|
|
620
610
|
}),
|
|
621
|
-
/* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ a("div", {
|
|
622
612
|
className: "flow-inspector-row",
|
|
623
|
-
children: [/* @__PURE__ */ e(
|
|
613
|
+
children: [/* @__PURE__ */ e(c, {
|
|
624
614
|
size: "xs",
|
|
625
615
|
className: "flow-inspector-label",
|
|
626
616
|
children: "Color"
|
|
627
|
-
}), /* @__PURE__ */ e(
|
|
617
|
+
}), /* @__PURE__ */ e(w, {
|
|
628
618
|
type: "color",
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
height: 24,
|
|
634
|
-
border: "none",
|
|
635
|
-
borderRadius: 4,
|
|
636
|
-
cursor: "pointer"
|
|
637
|
-
}
|
|
619
|
+
size: "xs",
|
|
620
|
+
value: l.data.color,
|
|
621
|
+
onChange: (s) => r(l.id, "color", s.target.value),
|
|
622
|
+
className: "flow-inspector-color flow-inspector-compact"
|
|
638
623
|
})]
|
|
639
624
|
}),
|
|
640
|
-
/* @__PURE__ */
|
|
625
|
+
/* @__PURE__ */ a("div", {
|
|
641
626
|
className: "flow-inspector-row",
|
|
642
|
-
children: [/* @__PURE__ */ e(
|
|
627
|
+
children: [/* @__PURE__ */ e(c, {
|
|
643
628
|
size: "xs",
|
|
644
629
|
className: "flow-inspector-label",
|
|
645
630
|
children: "Font Color"
|
|
646
|
-
}), /* @__PURE__ */ e(
|
|
631
|
+
}), /* @__PURE__ */ e(w, {
|
|
647
632
|
type: "color",
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
height: 24,
|
|
653
|
-
border: "none",
|
|
654
|
-
borderRadius: 4,
|
|
655
|
-
cursor: "pointer"
|
|
656
|
-
}
|
|
633
|
+
size: "xs",
|
|
634
|
+
value: l.data.labelColor ?? l.data.color,
|
|
635
|
+
onChange: (s) => r(l.id, "labelColor", s.target.value),
|
|
636
|
+
className: "flow-inspector-color flow-inspector-compact"
|
|
657
637
|
})]
|
|
658
638
|
}),
|
|
659
|
-
/* @__PURE__ */
|
|
639
|
+
/* @__PURE__ */ a("div", {
|
|
660
640
|
className: "flow-inspector-row",
|
|
661
|
-
children: [/* @__PURE__ */ e(
|
|
641
|
+
children: [/* @__PURE__ */ e(c, {
|
|
662
642
|
size: "xs",
|
|
663
643
|
className: "flow-inspector-label",
|
|
664
644
|
children: "Border"
|
|
665
|
-
}), /* @__PURE__ */ e(
|
|
645
|
+
}), /* @__PURE__ */ e(y, {
|
|
666
646
|
options: [{
|
|
667
647
|
value: "none",
|
|
668
648
|
label: "none"
|
|
669
|
-
}, ...
|
|
670
|
-
value:
|
|
671
|
-
label:
|
|
649
|
+
}, ...J.map((s) => ({
|
|
650
|
+
value: s,
|
|
651
|
+
label: s
|
|
672
652
|
}))],
|
|
673
|
-
value:
|
|
674
|
-
onChange: (
|
|
653
|
+
value: l.data.borderStyle ?? (h ? l.type === "geometryGroup" ? "dashed" : "dotted" : "solid"),
|
|
654
|
+
onChange: (s) => r(l.id, "borderStyle", s),
|
|
675
655
|
style: { fontSize: 12 }
|
|
676
656
|
})]
|
|
677
657
|
}),
|
|
678
|
-
|
|
679
|
-
/* @__PURE__ */
|
|
658
|
+
l.type === "shapeSvg" && /* @__PURE__ */ a(G, { children: [
|
|
659
|
+
/* @__PURE__ */ a("div", {
|
|
680
660
|
className: "flow-inspector-row",
|
|
681
|
-
children: [/* @__PURE__ */ e(
|
|
661
|
+
children: [/* @__PURE__ */ e(c, {
|
|
682
662
|
size: "xs",
|
|
683
663
|
className: "flow-inspector-label",
|
|
684
664
|
children: "Icon"
|
|
685
|
-
}), /* @__PURE__ */ e(
|
|
686
|
-
options:
|
|
687
|
-
value:
|
|
688
|
-
label:
|
|
665
|
+
}), /* @__PURE__ */ e(y, {
|
|
666
|
+
options: ee().map((s) => ({
|
|
667
|
+
value: s.id,
|
|
668
|
+
label: s.label
|
|
689
669
|
})),
|
|
690
|
-
value:
|
|
670
|
+
value: l.data.svgId ?? "",
|
|
691
671
|
placeholder: "选择图标",
|
|
692
|
-
onChange: (
|
|
693
|
-
const
|
|
694
|
-
|
|
695
|
-
svgId:
|
|
696
|
-
...
|
|
697
|
-
...!
|
|
672
|
+
onChange: (s) => {
|
|
673
|
+
const v = le(String(s));
|
|
674
|
+
t(l.id, {
|
|
675
|
+
svgId: s,
|
|
676
|
+
...v?.brandColor ? { color: v.brandColor } : {},
|
|
677
|
+
...!l.data.label || l.data.label === "Text" ? { label: v?.label ?? String(s) } : {}
|
|
698
678
|
});
|
|
699
679
|
},
|
|
700
680
|
style: { fontSize: 12 }
|
|
701
681
|
})]
|
|
702
682
|
}),
|
|
703
|
-
/* @__PURE__ */
|
|
683
|
+
/* @__PURE__ */ a("div", {
|
|
704
684
|
className: "flow-inspector-row",
|
|
705
|
-
children: [/* @__PURE__ */ e(
|
|
685
|
+
children: [/* @__PURE__ */ e(c, {
|
|
706
686
|
size: "xs",
|
|
707
687
|
className: "flow-inspector-label",
|
|
708
688
|
children: "Box"
|
|
709
|
-
}), /* @__PURE__ */ e(
|
|
689
|
+
}), /* @__PURE__ */ e(_, {
|
|
710
690
|
size: "sm",
|
|
711
|
-
checked:
|
|
712
|
-
onChange: (
|
|
691
|
+
checked: l.data.iconBox ?? !1,
|
|
692
|
+
onChange: (s) => r(l.id, "iconBox", s),
|
|
713
693
|
label: "显示边框"
|
|
714
694
|
})]
|
|
715
695
|
}),
|
|
716
|
-
/* @__PURE__ */
|
|
696
|
+
/* @__PURE__ */ a("div", {
|
|
717
697
|
className: "flow-inspector-row",
|
|
718
|
-
children: [/* @__PURE__ */ e(
|
|
698
|
+
children: [/* @__PURE__ */ e(c, {
|
|
719
699
|
size: "xs",
|
|
720
700
|
className: "flow-inspector-label",
|
|
721
701
|
children: "Label"
|
|
722
|
-
}), /* @__PURE__ */ e(
|
|
702
|
+
}), /* @__PURE__ */ e(y, {
|
|
723
703
|
options: [
|
|
724
704
|
{
|
|
725
|
-
value: "
|
|
726
|
-
label: "
|
|
705
|
+
value: "top",
|
|
706
|
+
label: "top"
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
value: "middle",
|
|
710
|
+
label: "middle"
|
|
727
711
|
},
|
|
728
712
|
{
|
|
729
|
-
value: "
|
|
730
|
-
label: "
|
|
713
|
+
value: "bottom",
|
|
714
|
+
label: "bottom"
|
|
731
715
|
},
|
|
732
716
|
{
|
|
733
|
-
value: "
|
|
734
|
-
label: "
|
|
717
|
+
value: "left",
|
|
718
|
+
label: "left"
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
value: "right",
|
|
722
|
+
label: "right"
|
|
735
723
|
}
|
|
736
724
|
],
|
|
737
|
-
value:
|
|
738
|
-
onChange: (
|
|
725
|
+
value: l.data.labelPlacement === "above" ? "top" : l.data.labelPlacement === "center" ? "middle" : l.data.labelPlacement === "below" ? "bottom" : l.data.labelPlacement ?? "bottom",
|
|
726
|
+
onChange: (s) => r(l.id, "labelPlacement", s),
|
|
739
727
|
style: { fontSize: 12 }
|
|
740
728
|
})]
|
|
729
|
+
}),
|
|
730
|
+
/* @__PURE__ */ a("div", {
|
|
731
|
+
className: "flow-inspector-row",
|
|
732
|
+
children: [/* @__PURE__ */ e(c, {
|
|
733
|
+
size: "xs",
|
|
734
|
+
className: "flow-inspector-label",
|
|
735
|
+
children: "Offset X"
|
|
736
|
+
}), /* @__PURE__ */ e(w, {
|
|
737
|
+
size: "xs",
|
|
738
|
+
type: "number",
|
|
739
|
+
value: String(l.data.labelOffsetX ?? 0),
|
|
740
|
+
onChange: (s) => r(l.id, "labelOffsetX", Number(s.target.value) || 0)
|
|
741
|
+
})]
|
|
742
|
+
}),
|
|
743
|
+
/* @__PURE__ */ a("div", {
|
|
744
|
+
className: "flow-inspector-row",
|
|
745
|
+
children: [/* @__PURE__ */ e(c, {
|
|
746
|
+
size: "xs",
|
|
747
|
+
className: "flow-inspector-label",
|
|
748
|
+
children: "Offset Y"
|
|
749
|
+
}), /* @__PURE__ */ e(w, {
|
|
750
|
+
size: "xs",
|
|
751
|
+
type: "number",
|
|
752
|
+
value: String(l.data.labelOffsetY ?? 0),
|
|
753
|
+
onChange: (s) => r(l.id, "labelOffsetY", Number(s.target.value) || 0)
|
|
754
|
+
})]
|
|
741
755
|
})
|
|
742
756
|
] })
|
|
743
757
|
]
|
|
744
758
|
}),
|
|
745
|
-
|
|
746
|
-
node:
|
|
747
|
-
onUpdateData:
|
|
759
|
+
l.type === "mediaNode" && /* @__PURE__ */ e(ce, {
|
|
760
|
+
node: l,
|
|
761
|
+
onUpdateData: r
|
|
748
762
|
}),
|
|
749
|
-
/* @__PURE__ */
|
|
763
|
+
/* @__PURE__ */ a("div", {
|
|
750
764
|
className: "flow-inspector-section",
|
|
751
765
|
children: [
|
|
752
766
|
/* @__PURE__ */ e("div", {
|
|
753
767
|
className: "flow-inspector-section-title",
|
|
754
768
|
children: "Transform"
|
|
755
769
|
}),
|
|
756
|
-
/* @__PURE__ */
|
|
770
|
+
/* @__PURE__ */ a("div", {
|
|
757
771
|
className: "flow-inspector-row",
|
|
758
772
|
children: [
|
|
759
|
-
/* @__PURE__ */ e(
|
|
773
|
+
/* @__PURE__ */ e(c, {
|
|
760
774
|
size: "xs",
|
|
761
775
|
className: "flow-inspector-label",
|
|
762
776
|
children: "Rotate"
|
|
763
777
|
}),
|
|
764
|
-
/* @__PURE__ */ e(
|
|
778
|
+
/* @__PURE__ */ e(w, {
|
|
765
779
|
size: "xs",
|
|
766
780
|
type: "number",
|
|
767
|
-
value: String(
|
|
768
|
-
onChange: (
|
|
781
|
+
value: String(l.data.rotation ?? 0),
|
|
782
|
+
onChange: (s) => r(l.id, "rotation", Number(s.target.value) || 0)
|
|
769
783
|
}),
|
|
770
784
|
/* @__PURE__ */ e("span", {
|
|
785
|
+
className: "flow-inspector-suffix",
|
|
771
786
|
style: {
|
|
772
787
|
fontSize: 10,
|
|
773
788
|
opacity: 0.5
|
|
@@ -776,28 +791,28 @@ function ne({ node: s, isGroup: f, onUpdateData: c, onUpdateDataBatch: a, onUpda
|
|
|
776
791
|
})
|
|
777
792
|
]
|
|
778
793
|
}),
|
|
779
|
-
/* @__PURE__ */
|
|
794
|
+
/* @__PURE__ */ a("div", {
|
|
780
795
|
className: "flow-inspector-row",
|
|
781
796
|
children: [
|
|
782
|
-
/* @__PURE__ */ e(
|
|
797
|
+
/* @__PURE__ */ e(c, {
|
|
783
798
|
size: "xs",
|
|
784
799
|
className: "flow-inspector-label",
|
|
785
800
|
children: "Flip"
|
|
786
801
|
}),
|
|
787
|
-
/* @__PURE__ */ e(
|
|
802
|
+
/* @__PURE__ */ e(g, {
|
|
788
803
|
size: "xs",
|
|
789
|
-
variant:
|
|
790
|
-
onClick: () =>
|
|
804
|
+
variant: l.data.flipX ? "primary" : "ghost",
|
|
805
|
+
onClick: () => r(l.id, "flipX", !l.data.flipX),
|
|
791
806
|
square: !0,
|
|
792
807
|
children: /* @__PURE__ */ e("span", {
|
|
793
808
|
title: "Flip Horizontal",
|
|
794
809
|
children: "↔"
|
|
795
810
|
})
|
|
796
811
|
}),
|
|
797
|
-
/* @__PURE__ */ e(
|
|
812
|
+
/* @__PURE__ */ e(g, {
|
|
798
813
|
size: "xs",
|
|
799
|
-
variant:
|
|
800
|
-
onClick: () =>
|
|
814
|
+
variant: l.data.flipY ? "primary" : "ghost",
|
|
815
|
+
onClick: () => r(l.id, "flipY", !l.data.flipY),
|
|
801
816
|
square: !0,
|
|
802
817
|
children: /* @__PURE__ */ e("span", {
|
|
803
818
|
title: "Flip Vertical",
|
|
@@ -806,24 +821,24 @@ function ne({ node: s, isGroup: f, onUpdateData: c, onUpdateDataBatch: a, onUpda
|
|
|
806
821
|
})
|
|
807
822
|
]
|
|
808
823
|
}),
|
|
809
|
-
/* @__PURE__ */
|
|
824
|
+
/* @__PURE__ */ a("div", {
|
|
810
825
|
className: "flow-inspector-row",
|
|
811
826
|
children: [
|
|
812
|
-
/* @__PURE__ */ e(
|
|
827
|
+
/* @__PURE__ */ e(c, {
|
|
813
828
|
size: "xs",
|
|
814
829
|
className: "flow-inspector-label",
|
|
815
830
|
children: "Quick"
|
|
816
831
|
}),
|
|
817
|
-
/* @__PURE__ */ e(
|
|
832
|
+
/* @__PURE__ */ e(g, {
|
|
818
833
|
size: "xs",
|
|
819
834
|
variant: "ghost",
|
|
820
|
-
onClick: () =>
|
|
835
|
+
onClick: () => r(l.id, "rotation", ((l.data.rotation ?? 0) + 90) % 360),
|
|
821
836
|
children: "+90°"
|
|
822
837
|
}),
|
|
823
|
-
/* @__PURE__ */ e(
|
|
838
|
+
/* @__PURE__ */ e(g, {
|
|
824
839
|
size: "xs",
|
|
825
840
|
variant: "ghost",
|
|
826
|
-
onClick: () =>
|
|
841
|
+
onClick: () => r(l.id, "rotation", ((l.data.rotation ?? 0) - 90 + 360) % 360),
|
|
827
842
|
children: "−90°"
|
|
828
843
|
})
|
|
829
844
|
]
|
|
@@ -832,52 +847,190 @@ function ne({ node: s, isGroup: f, onUpdateData: c, onUpdateDataBatch: a, onUpda
|
|
|
832
847
|
})
|
|
833
848
|
] });
|
|
834
849
|
}
|
|
835
|
-
function
|
|
836
|
-
const
|
|
837
|
-
|
|
850
|
+
function W({ label: l, value: h, onChange: r, rows: t }) {
|
|
851
|
+
const [m, f] = ne(!1);
|
|
852
|
+
return /* @__PURE__ */ a(G, { children: [/* @__PURE__ */ a("div", {
|
|
853
|
+
className: "flow-inspector-row flow-inspector-multiline",
|
|
854
|
+
children: [/* @__PURE__ */ a("div", {
|
|
855
|
+
className: "flow-inspector-field-heading",
|
|
856
|
+
children: [/* @__PURE__ */ e(c, {
|
|
857
|
+
size: "xs",
|
|
858
|
+
className: "flow-inspector-label",
|
|
859
|
+
children: l
|
|
860
|
+
}), /* @__PURE__ */ e(g, {
|
|
861
|
+
size: "xs",
|
|
862
|
+
variant: "ghost",
|
|
863
|
+
square: !0,
|
|
864
|
+
onClick: () => f(!0),
|
|
865
|
+
children: /* @__PURE__ */ e("span", {
|
|
866
|
+
"aria-label": "全屏编辑",
|
|
867
|
+
title: "全屏编辑",
|
|
868
|
+
children: "↗"
|
|
869
|
+
})
|
|
870
|
+
})]
|
|
871
|
+
}), /* @__PURE__ */ e("textarea", {
|
|
872
|
+
className: "flow-inspector-textarea",
|
|
873
|
+
value: h,
|
|
874
|
+
onChange: (s) => r(s.target.value),
|
|
875
|
+
rows: t,
|
|
876
|
+
spellCheck: !1
|
|
877
|
+
})]
|
|
878
|
+
}), m && /* @__PURE__ */ a("div", {
|
|
879
|
+
className: "flow-editor-fullscreen",
|
|
880
|
+
role: "dialog",
|
|
881
|
+
"aria-modal": "true",
|
|
882
|
+
"aria-label": `${l} 全屏编辑`,
|
|
883
|
+
children: [/* @__PURE__ */ a("div", {
|
|
884
|
+
className: "flow-editor-fullscreen-header",
|
|
885
|
+
children: [/* @__PURE__ */ e("strong", { children: l }), /* @__PURE__ */ e(g, {
|
|
886
|
+
size: "sm",
|
|
887
|
+
variant: "ghost",
|
|
888
|
+
onClick: () => f(!1),
|
|
889
|
+
children: "退出全屏"
|
|
890
|
+
})]
|
|
891
|
+
}), /* @__PURE__ */ e("textarea", {
|
|
892
|
+
className: "flow-inspector-textarea flow-editor-fullscreen-input",
|
|
893
|
+
value: h,
|
|
894
|
+
onChange: (s) => r(s.target.value),
|
|
895
|
+
spellCheck: !1,
|
|
896
|
+
autoFocus: !0
|
|
897
|
+
})]
|
|
898
|
+
})] });
|
|
899
|
+
}
|
|
900
|
+
function ce({ node: l, onUpdateData: h }) {
|
|
901
|
+
const r = l.data.mediaKind ?? "markdown", t = l.data.aiConfig, m = te(null), f = (s, v) => {
|
|
902
|
+
h(l.id, "aiConfig", {
|
|
838
903
|
gateway: "",
|
|
839
904
|
protocol: "openai",
|
|
840
905
|
model: "",
|
|
841
|
-
...
|
|
842
|
-
[
|
|
906
|
+
...t,
|
|
907
|
+
[s]: v
|
|
843
908
|
});
|
|
844
909
|
};
|
|
845
|
-
return /* @__PURE__ */
|
|
910
|
+
return /* @__PURE__ */ a("div", {
|
|
846
911
|
className: "flow-inspector-section",
|
|
847
|
-
children: [/* @__PURE__ */
|
|
912
|
+
children: [/* @__PURE__ */ a("div", {
|
|
848
913
|
className: "flow-inspector-section-title",
|
|
849
|
-
children: ["Media · ",
|
|
850
|
-
}),
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
914
|
+
children: ["Media · ", r]
|
|
915
|
+
}), r === "model3d" ? /* @__PURE__ */ a(G, { children: [
|
|
916
|
+
/* @__PURE__ */ a("div", {
|
|
917
|
+
className: "flow-inspector-row",
|
|
918
|
+
children: [/* @__PURE__ */ e(c, {
|
|
919
|
+
size: "xs",
|
|
920
|
+
className: "flow-inspector-label",
|
|
921
|
+
children: "格式"
|
|
922
|
+
}), /* @__PURE__ */ e(y, {
|
|
923
|
+
options: [
|
|
924
|
+
{
|
|
925
|
+
value: "stl",
|
|
926
|
+
label: "STL"
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
value: "obj",
|
|
930
|
+
label: "OBJ"
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
value: "3mf",
|
|
934
|
+
label: "3MF"
|
|
935
|
+
}
|
|
936
|
+
],
|
|
937
|
+
value: l.data.modelFormat ?? "stl",
|
|
938
|
+
onChange: (s) => h(l.id, "modelFormat", s)
|
|
939
|
+
})]
|
|
940
|
+
}),
|
|
941
|
+
/* @__PURE__ */ a("div", {
|
|
942
|
+
className: "flow-inspector-row flow-inspector-multiline",
|
|
943
|
+
children: [/* @__PURE__ */ e(c, {
|
|
944
|
+
size: "xs",
|
|
945
|
+
className: "flow-inspector-label",
|
|
946
|
+
children: "模型链接"
|
|
947
|
+
}), /* @__PURE__ */ e(w, {
|
|
948
|
+
size: "xs",
|
|
949
|
+
value: l.data.mediaContent ?? "",
|
|
950
|
+
placeholder: "https://example.com/model.stl",
|
|
951
|
+
onChange: (s) => h(l.id, "mediaContent", s.target.value)
|
|
952
|
+
})]
|
|
953
|
+
}),
|
|
954
|
+
/* @__PURE__ */ a("div", {
|
|
955
|
+
className: "flow-inspector-row",
|
|
956
|
+
children: [
|
|
957
|
+
/* @__PURE__ */ e(c, {
|
|
958
|
+
size: "xs",
|
|
959
|
+
className: "flow-inspector-label",
|
|
960
|
+
children: "本地模型"
|
|
961
|
+
}),
|
|
962
|
+
/* @__PURE__ */ e("input", {
|
|
963
|
+
ref: m,
|
|
964
|
+
type: "file",
|
|
965
|
+
accept: ".stl,.obj,.3mf,model/stl,model/obj,model/3mf,application/vnd.ms-package.3dmanufacturing-3dmodel+xml",
|
|
966
|
+
hidden: !0,
|
|
967
|
+
onChange: (s) => {
|
|
968
|
+
const v = s.target.files?.[0];
|
|
969
|
+
if (s.target.value = "", !v) return;
|
|
970
|
+
if (v.size > 10 * 1024 * 1024) {
|
|
971
|
+
window.alert("本地模型不能超过 10 MiB,请改用模型链接。");
|
|
972
|
+
return;
|
|
973
|
+
}
|
|
974
|
+
const E = v.name.split(".").pop()?.toLowerCase();
|
|
975
|
+
if (E !== "stl" && E !== "obj" && E !== "3mf") {
|
|
976
|
+
window.alert("仅支持 STL、OBJ 和 3MF 模型。");
|
|
977
|
+
return;
|
|
978
|
+
}
|
|
979
|
+
const I = new FileReader();
|
|
980
|
+
I.onload = () => {
|
|
981
|
+
typeof I.result == "string" && (h(l.id, "modelFormat", E), h(l.id, "mediaContent", I.result));
|
|
982
|
+
}, I.onerror = () => window.alert("读取本地模型失败。"), I.readAsDataURL(v);
|
|
983
|
+
}
|
|
984
|
+
}),
|
|
985
|
+
/* @__PURE__ */ e(g, {
|
|
986
|
+
size: "xs",
|
|
987
|
+
variant: "neutral",
|
|
988
|
+
onClick: () => m.current?.click(),
|
|
989
|
+
children: "选择文件"
|
|
990
|
+
}),
|
|
991
|
+
l.data.mediaContent?.startsWith("data:") && /* @__PURE__ */ e("span", {
|
|
992
|
+
className: "flow-inspector-file-status",
|
|
993
|
+
children: "已嵌入"
|
|
994
|
+
})
|
|
995
|
+
]
|
|
996
|
+
}),
|
|
997
|
+
/* @__PURE__ */ e("div", {
|
|
998
|
+
className: "flow-inspector-help",
|
|
999
|
+
children: "支持 STL、OBJ、3MF;本地文件将以 Base64 嵌入文档,最大 10 MiB。选中节点后可在内部拖拽旋转、滚轮缩放。"
|
|
1000
|
+
})
|
|
1001
|
+
] }) : r === "image" ? /* @__PURE__ */ a(G, { children: [/* @__PURE__ */ a("div", {
|
|
1002
|
+
className: "flow-inspector-row flow-inspector-multiline",
|
|
1003
|
+
children: [/* @__PURE__ */ e(c, {
|
|
858
1004
|
size: "xs",
|
|
859
1005
|
className: "flow-inspector-label",
|
|
860
|
-
children:
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
}), /* @__PURE__ */ e("textarea", {
|
|
867
|
-
className: "flow-inspector-textarea",
|
|
868
|
-
value: s.data.mediaContent ?? "",
|
|
869
|
-
onChange: (h) => f(s.id, "mediaContent", h.target.value),
|
|
870
|
-
rows: 8,
|
|
871
|
-
spellCheck: !1
|
|
1006
|
+
children: "图片链接"
|
|
1007
|
+
}), /* @__PURE__ */ e(w, {
|
|
1008
|
+
size: "xs",
|
|
1009
|
+
value: l.data.mediaContent ?? "",
|
|
1010
|
+
placeholder: "https://example.com/image.png",
|
|
1011
|
+
onChange: (s) => h(l.id, "mediaContent", s.target.value)
|
|
872
1012
|
})]
|
|
873
|
-
})
|
|
874
|
-
|
|
1013
|
+
}), /* @__PURE__ */ e("div", {
|
|
1014
|
+
className: "flow-inspector-help",
|
|
1015
|
+
children: "支持 HTTP(S) 链接;选中图片节点后可直接粘贴图片并保存为 Base64。"
|
|
1016
|
+
})] }) : r !== "ai" ? /* @__PURE__ */ e(W, {
|
|
1017
|
+
label: {
|
|
1018
|
+
markdown: "Markdown 源码",
|
|
1019
|
+
html: "HTML 源码",
|
|
1020
|
+
mermaid: "Mermaid 图表",
|
|
1021
|
+
math: "LaTeX 公式"
|
|
1022
|
+
}[r] ?? "内容",
|
|
1023
|
+
value: l.data.mediaContent ?? "",
|
|
1024
|
+
onChange: (s) => h(l.id, "mediaContent", s),
|
|
1025
|
+
rows: 8
|
|
1026
|
+
}) : /* @__PURE__ */ a(G, { children: [
|
|
1027
|
+
/* @__PURE__ */ a("div", {
|
|
875
1028
|
className: "flow-inspector-row",
|
|
876
|
-
children: [/* @__PURE__ */ e(
|
|
1029
|
+
children: [/* @__PURE__ */ e(c, {
|
|
877
1030
|
size: "xs",
|
|
878
1031
|
className: "flow-inspector-label",
|
|
879
1032
|
children: "协议"
|
|
880
|
-
}), /* @__PURE__ */ e(
|
|
1033
|
+
}), /* @__PURE__ */ e(y, {
|
|
881
1034
|
options: [{
|
|
882
1035
|
value: "openai",
|
|
883
1036
|
label: "OpenAI 兼容"
|
|
@@ -885,84 +1038,71 @@ function te({ node: s, onUpdateData: f }) {
|
|
|
885
1038
|
value: "anthropic",
|
|
886
1039
|
label: "Anthropic 兼容"
|
|
887
1040
|
}],
|
|
888
|
-
value:
|
|
889
|
-
onChange: (
|
|
1041
|
+
value: t?.protocol ?? "openai",
|
|
1042
|
+
onChange: (s) => f("protocol", s),
|
|
890
1043
|
style: { fontSize: 12 }
|
|
891
1044
|
})]
|
|
892
1045
|
}),
|
|
893
|
-
/* @__PURE__ */
|
|
1046
|
+
/* @__PURE__ */ a("div", {
|
|
894
1047
|
className: "flow-inspector-row",
|
|
895
1048
|
style: {
|
|
896
1049
|
flexDirection: "column",
|
|
897
1050
|
alignItems: "stretch",
|
|
898
1051
|
gap: 4
|
|
899
1052
|
},
|
|
900
|
-
children: [/* @__PURE__ */ e(
|
|
1053
|
+
children: [/* @__PURE__ */ e(c, {
|
|
901
1054
|
size: "xs",
|
|
902
1055
|
className: "flow-inspector-label",
|
|
903
1056
|
children: "接口地址"
|
|
904
|
-
}), /* @__PURE__ */ e(
|
|
1057
|
+
}), /* @__PURE__ */ e(w, {
|
|
905
1058
|
size: "xs",
|
|
906
|
-
value:
|
|
1059
|
+
value: t?.gateway ?? "",
|
|
907
1060
|
placeholder: "https://api.openai.com/v1/chat/completions",
|
|
908
|
-
onChange: (
|
|
1061
|
+
onChange: (s) => f("gateway", s.target.value)
|
|
909
1062
|
})]
|
|
910
1063
|
}),
|
|
911
|
-
/* @__PURE__ */
|
|
1064
|
+
/* @__PURE__ */ a("div", {
|
|
912
1065
|
className: "flow-inspector-row",
|
|
913
1066
|
style: {
|
|
914
1067
|
flexDirection: "column",
|
|
915
1068
|
alignItems: "stretch",
|
|
916
1069
|
gap: 4
|
|
917
1070
|
},
|
|
918
|
-
children: [/* @__PURE__ */ e(
|
|
1071
|
+
children: [/* @__PURE__ */ e(c, {
|
|
919
1072
|
size: "xs",
|
|
920
1073
|
className: "flow-inspector-label",
|
|
921
1074
|
children: "模型"
|
|
922
|
-
}), /* @__PURE__ */ e(
|
|
1075
|
+
}), /* @__PURE__ */ e(w, {
|
|
923
1076
|
size: "xs",
|
|
924
|
-
value:
|
|
1077
|
+
value: t?.model ?? "",
|
|
925
1078
|
placeholder: "gpt-4o-mini",
|
|
926
|
-
onChange: (
|
|
1079
|
+
onChange: (s) => f("model", s.target.value)
|
|
927
1080
|
})]
|
|
928
1081
|
}),
|
|
929
|
-
/* @__PURE__ */
|
|
1082
|
+
/* @__PURE__ */ a("div", {
|
|
930
1083
|
className: "flow-inspector-row",
|
|
931
1084
|
style: {
|
|
932
1085
|
flexDirection: "column",
|
|
933
1086
|
alignItems: "stretch",
|
|
934
1087
|
gap: 4
|
|
935
1088
|
},
|
|
936
|
-
children: [/* @__PURE__ */ e(
|
|
1089
|
+
children: [/* @__PURE__ */ e(c, {
|
|
937
1090
|
size: "xs",
|
|
938
1091
|
className: "flow-inspector-label",
|
|
939
1092
|
children: "API Key"
|
|
940
|
-
}), /* @__PURE__ */ e(
|
|
1093
|
+
}), /* @__PURE__ */ e(w, {
|
|
941
1094
|
size: "xs",
|
|
942
1095
|
type: "password",
|
|
943
|
-
value:
|
|
1096
|
+
value: t?.apiKey ?? "",
|
|
944
1097
|
placeholder: "sk-...",
|
|
945
|
-
onChange: (
|
|
1098
|
+
onChange: (s) => f("apiKey", s.target.value)
|
|
946
1099
|
})]
|
|
947
1100
|
}),
|
|
948
|
-
/* @__PURE__ */
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
gap: 4
|
|
954
|
-
},
|
|
955
|
-
children: [/* @__PURE__ */ e(d, {
|
|
956
|
-
size: "xs",
|
|
957
|
-
className: "flow-inspector-label",
|
|
958
|
-
children: "System Prompt"
|
|
959
|
-
}), /* @__PURE__ */ e("textarea", {
|
|
960
|
-
className: "flow-inspector-textarea",
|
|
961
|
-
value: a?.systemPrompt ?? "",
|
|
962
|
-
onChange: (h) => m("systemPrompt", h.target.value),
|
|
963
|
-
rows: 3,
|
|
964
|
-
spellCheck: !1
|
|
965
|
-
})]
|
|
1101
|
+
/* @__PURE__ */ e(W, {
|
|
1102
|
+
label: "System Prompt",
|
|
1103
|
+
value: t?.systemPrompt ?? "",
|
|
1104
|
+
onChange: (s) => f("systemPrompt", s),
|
|
1105
|
+
rows: 3
|
|
966
1106
|
}),
|
|
967
1107
|
/* @__PURE__ */ e("div", {
|
|
968
1108
|
style: {
|
|
@@ -975,150 +1115,145 @@ function te({ node: s, onUpdateData: f }) {
|
|
|
975
1115
|
] })]
|
|
976
1116
|
});
|
|
977
1117
|
}
|
|
978
|
-
function
|
|
979
|
-
return /* @__PURE__ */
|
|
1118
|
+
function de({ edge: l, onUpdateData: h, onUpdateType: r }) {
|
|
1119
|
+
return /* @__PURE__ */ a("div", {
|
|
980
1120
|
className: "flow-inspector-section",
|
|
981
1121
|
children: [
|
|
982
1122
|
/* @__PURE__ */ e("div", {
|
|
983
1123
|
className: "flow-inspector-section-title",
|
|
984
1124
|
children: "Edge"
|
|
985
1125
|
}),
|
|
986
|
-
/* @__PURE__ */
|
|
1126
|
+
/* @__PURE__ */ a("div", {
|
|
987
1127
|
className: "flow-inspector-row",
|
|
988
|
-
children: [/* @__PURE__ */ e(
|
|
1128
|
+
children: [/* @__PURE__ */ e(c, {
|
|
989
1129
|
size: "xs",
|
|
990
1130
|
className: "flow-inspector-label",
|
|
991
1131
|
children: "Type"
|
|
992
|
-
}), /* @__PURE__ */ e(
|
|
993
|
-
options:
|
|
994
|
-
value:
|
|
995
|
-
label:
|
|
1132
|
+
}), /* @__PURE__ */ e(y, {
|
|
1133
|
+
options: Q.map((t) => ({
|
|
1134
|
+
value: t,
|
|
1135
|
+
label: t
|
|
996
1136
|
})),
|
|
997
|
-
value:
|
|
998
|
-
onChange: (
|
|
1137
|
+
value: l.type,
|
|
1138
|
+
onChange: (t) => r(l.id, t),
|
|
999
1139
|
style: { fontSize: 12 }
|
|
1000
1140
|
})]
|
|
1001
1141
|
}),
|
|
1002
|
-
/* @__PURE__ */
|
|
1142
|
+
/* @__PURE__ */ a("div", {
|
|
1003
1143
|
className: "flow-inspector-row",
|
|
1004
|
-
children: [/* @__PURE__ */ e(
|
|
1144
|
+
children: [/* @__PURE__ */ e(c, {
|
|
1005
1145
|
size: "xs",
|
|
1006
1146
|
className: "flow-inspector-label",
|
|
1007
1147
|
children: "Color"
|
|
1008
|
-
}), /* @__PURE__ */ e(
|
|
1148
|
+
}), /* @__PURE__ */ e(w, {
|
|
1009
1149
|
type: "color",
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
height: 24,
|
|
1015
|
-
border: "none",
|
|
1016
|
-
borderRadius: 4,
|
|
1017
|
-
cursor: "pointer"
|
|
1018
|
-
}
|
|
1150
|
+
size: "xs",
|
|
1151
|
+
value: l.data.strokeColor ?? "#374151",
|
|
1152
|
+
onChange: (t) => h(l.id, "strokeColor", t.target.value),
|
|
1153
|
+
className: "flow-inspector-color flow-inspector-compact"
|
|
1019
1154
|
})]
|
|
1020
1155
|
}),
|
|
1021
|
-
/* @__PURE__ */
|
|
1156
|
+
/* @__PURE__ */ a("div", {
|
|
1022
1157
|
className: "flow-inspector-row",
|
|
1023
|
-
children: [/* @__PURE__ */ e(
|
|
1158
|
+
children: [/* @__PURE__ */ e(c, {
|
|
1024
1159
|
size: "xs",
|
|
1025
1160
|
className: "flow-inspector-label",
|
|
1026
1161
|
children: "Width"
|
|
1027
|
-
}), /* @__PURE__ */ e(
|
|
1162
|
+
}), /* @__PURE__ */ e(w, {
|
|
1028
1163
|
size: "xs",
|
|
1029
1164
|
type: "number",
|
|
1030
|
-
value: String(
|
|
1031
|
-
onChange: (
|
|
1165
|
+
value: String(l.data.strokeWidth ?? 2),
|
|
1166
|
+
onChange: (t) => h(l.id, "strokeWidth", Number(t.target.value) || 2)
|
|
1032
1167
|
})]
|
|
1033
1168
|
}),
|
|
1034
|
-
/* @__PURE__ */
|
|
1169
|
+
/* @__PURE__ */ a("div", {
|
|
1035
1170
|
className: "flow-inspector-row",
|
|
1036
|
-
children: [/* @__PURE__ */ e(
|
|
1171
|
+
children: [/* @__PURE__ */ e(c, {
|
|
1037
1172
|
size: "xs",
|
|
1038
1173
|
className: "flow-inspector-label",
|
|
1039
1174
|
children: "Animation"
|
|
1040
|
-
}), /* @__PURE__ */ e(
|
|
1175
|
+
}), /* @__PURE__ */ e(_, {
|
|
1041
1176
|
size: "sm",
|
|
1042
|
-
checked:
|
|
1043
|
-
onChange: (
|
|
1177
|
+
checked: l.data.animated ?? !1,
|
|
1178
|
+
onChange: (t) => h(l.id, "animated", t),
|
|
1044
1179
|
label: "预览时播放"
|
|
1045
1180
|
})]
|
|
1046
1181
|
}),
|
|
1047
|
-
/* @__PURE__ */
|
|
1182
|
+
/* @__PURE__ */ a("div", {
|
|
1048
1183
|
className: "flow-inspector-row",
|
|
1049
|
-
children: [/* @__PURE__ */ e(
|
|
1184
|
+
children: [/* @__PURE__ */ e(c, {
|
|
1050
1185
|
size: "xs",
|
|
1051
1186
|
className: "flow-inspector-label",
|
|
1052
1187
|
children: "Line"
|
|
1053
|
-
}), /* @__PURE__ */ e(
|
|
1054
|
-
options:
|
|
1055
|
-
value:
|
|
1056
|
-
label:
|
|
1188
|
+
}), /* @__PURE__ */ e(y, {
|
|
1189
|
+
options: Y.map((t) => ({
|
|
1190
|
+
value: t,
|
|
1191
|
+
label: t
|
|
1057
1192
|
})),
|
|
1058
|
-
value:
|
|
1059
|
-
onChange: (
|
|
1193
|
+
value: l.data.lineStyle ?? "solid",
|
|
1194
|
+
onChange: (t) => h(l.id, "lineStyle", t),
|
|
1060
1195
|
style: { fontSize: 12 }
|
|
1061
1196
|
})]
|
|
1062
1197
|
}),
|
|
1063
|
-
/* @__PURE__ */
|
|
1198
|
+
/* @__PURE__ */ a("div", {
|
|
1064
1199
|
className: "flow-inspector-row",
|
|
1065
|
-
children: [/* @__PURE__ */ e(
|
|
1200
|
+
children: [/* @__PURE__ */ e(c, {
|
|
1066
1201
|
size: "xs",
|
|
1067
1202
|
className: "flow-inspector-label",
|
|
1068
1203
|
children: "Start"
|
|
1069
|
-
}), /* @__PURE__ */ e(
|
|
1070
|
-
options:
|
|
1071
|
-
value:
|
|
1072
|
-
label:
|
|
1204
|
+
}), /* @__PURE__ */ e(y, {
|
|
1205
|
+
options: A.map((t) => ({
|
|
1206
|
+
value: t,
|
|
1207
|
+
label: t
|
|
1073
1208
|
})),
|
|
1074
|
-
value:
|
|
1075
|
-
onChange: (
|
|
1209
|
+
value: l.data.markerStart ?? "none",
|
|
1210
|
+
onChange: (t) => h(l.id, "markerStart", t),
|
|
1076
1211
|
style: { fontSize: 12 }
|
|
1077
1212
|
})]
|
|
1078
1213
|
}),
|
|
1079
|
-
/* @__PURE__ */
|
|
1214
|
+
/* @__PURE__ */ a("div", {
|
|
1080
1215
|
className: "flow-inspector-row",
|
|
1081
|
-
children: [/* @__PURE__ */ e(
|
|
1216
|
+
children: [/* @__PURE__ */ e(c, {
|
|
1082
1217
|
size: "xs",
|
|
1083
1218
|
className: "flow-inspector-label",
|
|
1084
1219
|
children: "End"
|
|
1085
|
-
}), /* @__PURE__ */ e(
|
|
1086
|
-
options:
|
|
1087
|
-
value:
|
|
1088
|
-
label:
|
|
1220
|
+
}), /* @__PURE__ */ e(y, {
|
|
1221
|
+
options: A.map((t) => ({
|
|
1222
|
+
value: t,
|
|
1223
|
+
label: t
|
|
1089
1224
|
})),
|
|
1090
|
-
value:
|
|
1091
|
-
onChange: (
|
|
1225
|
+
value: l.data.markerEnd ?? "none",
|
|
1226
|
+
onChange: (t) => h(l.id, "markerEnd", t),
|
|
1092
1227
|
style: { fontSize: 12 }
|
|
1093
1228
|
})]
|
|
1094
1229
|
}),
|
|
1095
|
-
/* @__PURE__ */
|
|
1230
|
+
/* @__PURE__ */ a("div", {
|
|
1096
1231
|
className: "flow-inspector-row",
|
|
1097
|
-
children: [/* @__PURE__ */ e(
|
|
1232
|
+
children: [/* @__PURE__ */ e(c, {
|
|
1098
1233
|
size: "xs",
|
|
1099
1234
|
className: "flow-inspector-label",
|
|
1100
1235
|
children: "Label"
|
|
1101
|
-
}), /* @__PURE__ */ e(
|
|
1236
|
+
}), /* @__PURE__ */ e(w, {
|
|
1102
1237
|
size: "xs",
|
|
1103
|
-
value:
|
|
1104
|
-
onChange: (
|
|
1238
|
+
value: l.data.labelText ?? "",
|
|
1239
|
+
onChange: (t) => h(l.id, "labelText", t.target.value),
|
|
1105
1240
|
placeholder: "Edge label"
|
|
1106
1241
|
})]
|
|
1107
1242
|
})
|
|
1108
1243
|
]
|
|
1109
1244
|
});
|
|
1110
1245
|
}
|
|
1111
|
-
function
|
|
1112
|
-
return /* @__PURE__ */
|
|
1246
|
+
function he({ line: l, onUpdateData: h }) {
|
|
1247
|
+
return /* @__PURE__ */ a("div", {
|
|
1113
1248
|
className: "flow-inspector-section",
|
|
1114
1249
|
children: [
|
|
1115
1250
|
/* @__PURE__ */ e("div", {
|
|
1116
1251
|
className: "flow-inspector-section-title",
|
|
1117
1252
|
children: "Line"
|
|
1118
1253
|
}),
|
|
1119
|
-
/* @__PURE__ */
|
|
1254
|
+
/* @__PURE__ */ a("div", {
|
|
1120
1255
|
className: "flow-inspector-row",
|
|
1121
|
-
children: [/* @__PURE__ */ e(
|
|
1256
|
+
children: [/* @__PURE__ */ e(c, {
|
|
1122
1257
|
size: "xs",
|
|
1123
1258
|
className: "flow-inspector-label",
|
|
1124
1259
|
children: "Type"
|
|
@@ -1127,54 +1262,49 @@ function re({ line: s, onUpdateData: f }) {
|
|
|
1127
1262
|
fontSize: 12,
|
|
1128
1263
|
color: "oklch(var(--bc) / 0.6)"
|
|
1129
1264
|
},
|
|
1130
|
-
children:
|
|
1265
|
+
children: l.type
|
|
1131
1266
|
})]
|
|
1132
1267
|
}),
|
|
1133
|
-
/* @__PURE__ */
|
|
1268
|
+
/* @__PURE__ */ a("div", {
|
|
1134
1269
|
className: "flow-inspector-row",
|
|
1135
|
-
children: [/* @__PURE__ */ e(
|
|
1270
|
+
children: [/* @__PURE__ */ e(c, {
|
|
1136
1271
|
size: "xs",
|
|
1137
1272
|
className: "flow-inspector-label",
|
|
1138
1273
|
children: "Color"
|
|
1139
|
-
}), /* @__PURE__ */ e(
|
|
1274
|
+
}), /* @__PURE__ */ e(w, {
|
|
1140
1275
|
type: "color",
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
height: 24,
|
|
1146
|
-
border: "none",
|
|
1147
|
-
borderRadius: 4,
|
|
1148
|
-
cursor: "pointer"
|
|
1149
|
-
}
|
|
1276
|
+
size: "xs",
|
|
1277
|
+
value: l.strokeColor,
|
|
1278
|
+
onChange: (r) => h(l.id, "strokeColor", r.target.value),
|
|
1279
|
+
className: "flow-inspector-color flow-inspector-compact"
|
|
1150
1280
|
})]
|
|
1151
1281
|
}),
|
|
1152
|
-
/* @__PURE__ */
|
|
1282
|
+
/* @__PURE__ */ a("div", {
|
|
1153
1283
|
className: "flow-inspector-row",
|
|
1154
|
-
children: [/* @__PURE__ */ e(
|
|
1284
|
+
children: [/* @__PURE__ */ e(c, {
|
|
1155
1285
|
size: "xs",
|
|
1156
1286
|
className: "flow-inspector-label",
|
|
1157
1287
|
children: "Width"
|
|
1158
|
-
}), /* @__PURE__ */ e(
|
|
1288
|
+
}), /* @__PURE__ */ e(w, {
|
|
1159
1289
|
size: "xs",
|
|
1160
1290
|
type: "number",
|
|
1161
|
-
value: String(
|
|
1162
|
-
onChange: (
|
|
1291
|
+
value: String(l.strokeWidth),
|
|
1292
|
+
onChange: (r) => h(l.id, "strokeWidth", Number(r.target.value) || 2)
|
|
1163
1293
|
})]
|
|
1164
1294
|
}),
|
|
1165
|
-
/* @__PURE__ */
|
|
1295
|
+
/* @__PURE__ */ a("div", {
|
|
1166
1296
|
className: "flow-inspector-row",
|
|
1167
|
-
children: [/* @__PURE__ */ e(
|
|
1297
|
+
children: [/* @__PURE__ */ e(c, {
|
|
1168
1298
|
size: "xs",
|
|
1169
1299
|
className: "flow-inspector-label",
|
|
1170
1300
|
children: "Style"
|
|
1171
|
-
}), /* @__PURE__ */ e(
|
|
1172
|
-
options:
|
|
1173
|
-
value:
|
|
1174
|
-
label:
|
|
1301
|
+
}), /* @__PURE__ */ e(y, {
|
|
1302
|
+
options: Y.map((r) => ({
|
|
1303
|
+
value: r,
|
|
1304
|
+
label: r
|
|
1175
1305
|
})),
|
|
1176
|
-
value:
|
|
1177
|
-
onChange: (
|
|
1306
|
+
value: l.lineStyle,
|
|
1307
|
+
onChange: (r) => h(l.id, "lineStyle", r),
|
|
1178
1308
|
style: { fontSize: 12 }
|
|
1179
1309
|
})]
|
|
1180
1310
|
})
|
|
@@ -1182,8 +1312,8 @@ function re({ line: s, onUpdateData: f }) {
|
|
|
1182
1312
|
});
|
|
1183
1313
|
}
|
|
1184
1314
|
export {
|
|
1185
|
-
|
|
1186
|
-
|
|
1315
|
+
oe as InspectorPanelContent,
|
|
1316
|
+
Ge as default
|
|
1187
1317
|
};
|
|
1188
1318
|
|
|
1189
1319
|
//# sourceMappingURL=InspectorPanel.js.map
|