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.
Files changed (60) hide show
  1. package/dist/chart.js +46 -0
  2. package/dist/components/Chart/Chart.d.ts +17 -0
  3. package/dist/components/Chart/Chart.js +29 -0
  4. package/dist/components/Chart/Chart.js.map +1 -0
  5. package/dist/components/Chart/index.d.ts +15 -0
  6. package/dist/components/Input/index.js +2 -2
  7. package/dist/components/Input/index.js.map +1 -1
  8. package/dist/components/Select/index.js +1 -1
  9. package/dist/components/Select/index.js.map +1 -1
  10. package/dist/components/pro/Flow/Flow.js +492 -392
  11. package/dist/components/pro/Flow/Flow.js.map +1 -1
  12. package/dist/components/pro/Flow/FlowCanvas.js +895 -864
  13. package/dist/components/pro/Flow/FlowCanvas.js.map +1 -1
  14. package/dist/components/pro/Flow/context/FlowUIContext.d.ts +2 -0
  15. package/dist/components/pro/Flow/context/FlowUIContext.js +68 -65
  16. package/dist/components/pro/Flow/context/FlowUIContext.js.map +1 -1
  17. package/dist/components/pro/Flow/edges/edgePaths.js +234 -216
  18. package/dist/components/pro/Flow/edges/edgePaths.js.map +1 -1
  19. package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js +21 -10
  20. package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js.map +1 -1
  21. package/dist/components/pro/Flow/hooks/useMindMap.js +138 -134
  22. package/dist/components/pro/Flow/hooks/useMindMap.js.map +1 -1
  23. package/dist/components/pro/Flow/index.d.ts +1 -1
  24. package/dist/components/pro/Flow/nodes/MediaContent.js +47 -25
  25. package/dist/components/pro/Flow/nodes/MediaContent.js.map +1 -1
  26. package/dist/components/pro/Flow/nodes/Model3DView.d.ts +7 -0
  27. package/dist/components/pro/Flow/nodes/Model3DView.js +118 -0
  28. package/dist/components/pro/Flow/nodes/Model3DView.js.map +1 -0
  29. package/dist/components/pro/Flow/nodes/NodeHandles.d.ts +2 -1
  30. package/dist/components/pro/Flow/nodes/NodeHandles.js +4 -2
  31. package/dist/components/pro/Flow/nodes/NodeHandles.js.map +1 -1
  32. package/dist/components/pro/Flow/nodes/NodeRenderer.d.ts +2 -0
  33. package/dist/components/pro/Flow/nodes/NodeRenderer.js +115 -113
  34. package/dist/components/pro/Flow/nodes/NodeRenderer.js.map +1 -1
  35. package/dist/components/pro/Flow/nodes/NodeText.d.ts +3 -0
  36. package/dist/components/pro/Flow/nodes/NodeText.js +26 -17
  37. package/dist/components/pro/Flow/nodes/NodeText.js.map +1 -1
  38. package/dist/components/pro/Flow/panels/FlowToolbar.js +85 -79
  39. package/dist/components/pro/Flow/panels/FlowToolbar.js.map +1 -1
  40. package/dist/components/pro/Flow/panels/InspectorPanel.js +618 -488
  41. package/dist/components/pro/Flow/panels/InspectorPanel.js.map +1 -1
  42. package/dist/components/pro/Flow/panels/OutlinePanel.js +15 -15
  43. package/dist/components/pro/Flow/panels/OutlinePanel.js.map +1 -1
  44. package/dist/components/pro/Flow/panels/ShapePalette.js +71 -55
  45. package/dist/components/pro/Flow/panels/ShapePalette.js.map +1 -1
  46. package/dist/components/pro/Flow/panels/toolbarIcons.d.ts +1 -0
  47. package/dist/components/pro/Flow/panels/toolbarIcons.js +59 -41
  48. package/dist/components/pro/Flow/panels/toolbarIcons.js.map +1 -1
  49. package/dist/components/pro/Flow/types.d.ts +13 -4
  50. package/dist/components/pro/Flow/types.js.map +1 -1
  51. package/dist/dishui.css +1 -1
  52. package/dist/index-nostyled.d.ts +3 -1
  53. package/dist/index.d.ts +3 -1
  54. package/dist/index.js +145 -143
  55. package/dist/utils/i18n.d.ts +1 -0
  56. package/dist/utils/i18n.js +200 -6
  57. package/dist/utils/i18n.js.map +1 -1
  58. package/dist/utils/menu.js +26 -10
  59. package/dist/utils/menu.js.map +1 -1
  60. package/package.json +14 -3
@@ -1,26 +1,26 @@
1
- import v from "../../../Button/index.js";
2
- import y from "../../../Input/index.js";
3
- import d from "../../../Label/index.js";
4
- import A from "../../../Checkbox/index.js";
5
- import z from "../../../Select/index.js";
6
- import { BORDER_STYLE_OPTIONS as D, DEFAULT_NODE_DATA as j, EDGE_LINE_STYLE_OPTIONS as R, EDGE_MARKER_OPTIONS as O, EDGE_TYPE_OPTIONS as q } from "../constants.js";
7
- import { useFlowContext as J } from "../context/FlowContext.js";
8
- import { useFlowUI as Q } from "../context/FlowUIContext.js";
9
- import { generateId as V } from "../nodes/nodeUtils.js";
10
- import { getAllSvgIcons as U, getSvgIcon as ee } from "../nodes/svgIcons.js";
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 le } from "../hooks/useResizablePanel.js";
12
+ import { useResizablePanel as ae } from "../hooks/useResizablePanel.js";
13
13
  import { FLOW_NODE_TYPES as ie } from "../types.js";
14
- import { useMemo as M } from "react";
15
- import { Fragment as G, jsx as e, jsxs as i } from "react/jsx-runtime";
16
- function Se() {
17
- const { showInspector: s } = Q(), { panelStyle: f, handleProps: c } = se(), { panelWidth: a, resizeHandleProps: m } = le("left", 240);
18
- return s ? /* @__PURE__ */ i("div", {
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
- ...f,
23
- width: a
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
- ...c,
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(ae, {})
46
+ children: /* @__PURE__ */ e(oe, {})
47
47
  })
48
48
  ]
49
49
  }) : null;
50
50
  }
51
- function ae() {
52
- const { currentCanvas: s, selection: f, setSelection: c, setDoc: a, currentCanvasId: m } = J(), h = M(() => s.nodes.filter((r) => f.nodeIds.has(r.id)), [s.nodes, f.nodeIds]), t = M(() => s.edges.filter((r) => f.edgeIds.has(r.id)), [s.edges, f.edgeIds]), g = M(() => s.lines.filter((r) => f.lineIds.has(r.id)), [s.lines, f.lineIds]), _ = h.length > 0 || t.length > 0 || g.length > 0, L = h.length === 1 && (h[0].type === "flowGroup" || h[0].type === "geometryGroup" || h[0].data.isGroup), B = h.length + g.length, P = (r = "flowGroup") => {
53
- if (B < 2) return;
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, l = 1 / 0, n = -1 / 0, p = -1 / 0;
56
- for (const b of h)
57
- o = Math.min(o, b.position.x), l = Math.min(l, b.position.y), n = Math.max(n, b.position.x + b.width), p = Math.max(p, b.position.y + b.height);
58
- for (const b of g) for (const x of b.points)
59
- o = Math.min(o, x.x), l = Math.min(l, x.y), n = Math.max(n, x.x), p = Math.max(p, x.y);
60
- const I = r === "geometryGroup", C = V("group"), w = {
61
- id: C,
62
- type: r,
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: l - u
65
+ y: i - u
66
66
  },
67
67
  width: n - o + u * 2,
68
- height: p - l + u * 2,
68
+ height: p - i + u * 2,
69
69
  data: {
70
- ...j,
71
- label: I ? "Geo Group" : "Group",
72
- fill: I ? "#fefce8" : "#f0f9ff",
70
+ ...q,
71
+ label: C ? "Geo Group" : "Group",
72
+ fill: C ? "#fefce8" : "#f0f9ff",
73
73
  stroke: "#9ca3af",
74
74
  strokeWidth: 1.5,
75
- borderStyle: I ? "dashed" : "dotted",
75
+ borderStyle: C ? "dashed" : "dotted",
76
76
  isGroup: !0
77
77
  }
78
- }, S = f.nodeIds, N = f.lineIds;
79
- a((b) => {
80
- const x = b.canvases[m];
81
- return x ? {
82
- ...b,
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
- ...b.canvases,
84
+ ...x.canvases,
85
85
  [m]: {
86
- ...x,
87
- nodes: I ? [w, ...x.nodes] : [w, ...x.nodes.map((k) => S.has(k.id) ? {
88
- ...k,
89
- parentId: C
90
- } : k)],
91
- lines: I ? x.lines : x.lines.map((k) => N.has(k.id) ? {
92
- ...k,
93
- parentId: C
94
- } : k)
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
- } : b;
98
- }), c({
99
- nodeIds: /* @__PURE__ */ new Set([C]),
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
- }, W = () => {
104
- const r = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
105
- for (const l of h) (l.type === "flowGroup" || l.type === "geometryGroup" || l.data.isGroup) && r.add(l.id);
106
- if (r.size !== 0) {
107
- for (const l of s.nodes) l.parentId && r.has(l.parentId) && u.add(l.id);
108
- for (const l of s.lines) l.parentId && r.has(l.parentId) && o.add(l.id);
109
- a((l) => {
110
- const n = l.canvases[m];
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
- ...l,
112
+ ...i,
113
113
  canvases: {
114
- ...l.canvases,
114
+ ...i.canvases,
115
115
  [m]: {
116
116
  ...n,
117
- nodes: n.nodes.filter((p) => !r.has(p.id)).map((p) => u.has(p.id) ? {
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
- } : l;
128
- }), c({
127
+ } : i;
128
+ }), r({
129
129
  nodeIds: u,
130
130
  edgeIds: /* @__PURE__ */ new Set(),
131
131
  lineIds: o
132
132
  });
133
133
  }
134
- }, E = (r) => {
135
- const u = f.nodeIds;
136
- u.size !== 0 && a((o) => {
137
- const l = o.canvases[m];
138
- if (!l) return o;
139
- const n = l.nodes.map((w) => w.zIndex ?? 0), p = n.length > 0 ? Math.max(...n) : 0, I = n.length > 0 ? Math.min(...n) : 0, C = l.nodes.map((w) => {
140
- if (!u.has(w.id)) return w;
141
- const S = w.zIndex ?? 0;
142
- let N = S;
143
- return r === "front" ? N = p + 1 : r === "back" ? N = I - 1 : r === "up" ? N = S + 1 : r === "down" && (N = S - 1), {
144
- ...w,
145
- zIndex: N
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
- ...l,
154
- nodes: C
153
+ ...i,
154
+ nodes: k
155
155
  }
156
156
  }
157
157
  };
158
158
  });
159
- }, T = (r) => {
160
- const u = f.lineIds;
161
- u.size !== 0 && a((o) => {
162
- const l = o.canvases[m];
163
- if (!l) return o;
164
- const n = l.lines.map((w) => w.zIndex ?? 0), p = n.length > 0 ? Math.max(...n) : 0, I = n.length > 0 ? Math.min(...n) : 0, C = l.lines.map((w) => {
165
- if (!u.has(w.id)) return w;
166
- const S = w.zIndex ?? 0;
167
- let N = S;
168
- return r === "front" ? N = p + 1 : r === "back" ? N = I - 1 : r === "up" ? N = S + 1 : r === "down" && (N = S - 1), {
169
- ...w,
170
- zIndex: N
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
- ...l,
179
- lines: C
178
+ ...i,
179
+ lines: k
180
180
  }
181
181
  }
182
182
  };
183
183
  });
184
- }, Z = (r, u, o) => {
185
- F(r, { [u]: o });
186
- }, F = (r, u) => {
187
- a((o) => {
188
- const l = o.canvases[m];
189
- return l ? {
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
- ...l,
195
- nodes: l.nodes.map((n) => n.id === r ? {
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
- }, Y = (r, u, o) => {
207
- a((l) => {
208
- const n = l.canvases[m];
206
+ }, X = (d, u, o) => {
207
+ t((i) => {
208
+ const n = i.canvases[m];
209
209
  return n ? {
210
- ...l,
210
+ ...i,
211
211
  canvases: {
212
- ...l.canvases,
212
+ ...i.canvases,
213
213
  [m]: {
214
214
  ...n,
215
- nodes: n.nodes.map((p) => p.id === r ? {
215
+ nodes: n.nodes.map((p) => p.id === d ? {
216
216
  ...p,
217
217
  [u]: o
218
218
  } : p)
219
219
  }
220
220
  }
221
- } : l;
221
+ } : i;
222
222
  });
223
- }, X = (r, u, o) => {
224
- a((l) => {
225
- const n = l.canvases[m];
223
+ }, j = (d, u, o) => {
224
+ t((i) => {
225
+ const n = i.canvases[m];
226
226
  return n ? {
227
- ...l,
227
+ ...i,
228
228
  canvases: {
229
- ...l.canvases,
229
+ ...i.canvases,
230
230
  [m]: {
231
231
  ...n,
232
- edges: n.edges.map((p) => p.id === r ? {
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
- } : l;
241
+ } : i;
242
242
  });
243
- }, K = (r, u) => {
244
- a((o) => {
245
- const l = o.canvases[m];
246
- return l ? {
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
- ...l,
252
- nodes: l.nodes.map((n) => n.id === r ? {
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
- }, H = (r, u) => {
261
- a((o) => {
262
- const l = o.canvases[m];
263
- return l ? {
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
- ...l,
269
- edges: l.edges.map((n) => n.id === r ? {
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
- }, $ = (r, u, o) => {
278
- a((l) => {
279
- const n = l.canvases[m];
277
+ }, $ = (d, u, o) => {
278
+ t((i) => {
279
+ const n = i.canvases[m];
280
280
  return n ? {
281
- ...l,
281
+ ...i,
282
282
  canvases: {
283
- ...l.canvases,
283
+ ...i.canvases,
284
284
  [m]: {
285
285
  ...n,
286
- lines: n.lines.map((p) => p.id === r ? {
286
+ lines: n.lines.map((p) => p.id === d ? {
287
287
  ...p,
288
288
  [u]: o
289
289
  } : p)
290
290
  }
291
291
  }
292
- } : l;
292
+ } : i;
293
293
  });
294
294
  };
295
- return /* @__PURE__ */ i(G, { children: [
296
- !_ && /* @__PURE__ */ e("div", {
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
- h.length === 1 && /* @__PURE__ */ e(ne, {
306
- node: h[0],
307
- isGroup: L,
305
+ f.length === 1 && /* @__PURE__ */ e(re, {
306
+ node: f[0],
307
+ isGroup: I,
308
308
  onUpdateData: Z,
309
- onUpdateDataBatch: F,
310
- onUpdateDimension: Y,
311
- onUpdateType: K
309
+ onUpdateDataBatch: P,
310
+ onUpdateDimension: X,
311
+ onUpdateType: H
312
312
  }),
313
- B > 1 && /* @__PURE__ */ i("div", {
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__ */ i("div", {
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
- h.length > 0 && `${h.length} node${h.length > 1 ? "s" : ""}`,
328
- h.length > 0 && g.length > 0 && ", ",
329
- g.length > 0 && `${g.length} line${g.length > 1 ? "s" : ""}`,
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__ */ i("div", {
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(v, {
340
+ children: [/* @__PURE__ */ e(g, {
341
341
  size: "xs",
342
- onClick: () => P("flowGroup"),
342
+ onClick: () => O("flowGroup"),
343
343
  block: !0,
344
344
  children: "Group (⌘G)"
345
- }), /* @__PURE__ */ e(v, {
345
+ }), /* @__PURE__ */ e(g, {
346
346
  size: "xs",
347
347
  variant: "ghost",
348
- onClick: () => P("geometryGroup"),
348
+ onClick: () => O("geometryGroup"),
349
349
  block: !0,
350
350
  children: "Geo Group (⌘⌥G)"
351
351
  })]
352
352
  })
353
353
  ]
354
354
  }),
355
- L && /* @__PURE__ */ i("div", {
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: h[0].type === "geometryGroup" ? "Geometry Group" : "Group"
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: h[0].type === "geometryGroup" ? "Auto-binds spatially contained nodes" : "Explicit membership via add/remove"
368
+ children: f[0].type === "geometryGroup" ? "Auto-binds spatially contained nodes" : "Explicit membership via add/remove"
369
369
  }),
370
- /* @__PURE__ */ e(v, {
370
+ /* @__PURE__ */ e(g, {
371
371
  size: "xs",
372
372
  variant: "ghost",
373
- onClick: W,
373
+ onClick: R,
374
374
  block: !0,
375
375
  children: "Ungroup (⌘⇧G)"
376
376
  })
377
377
  ]
378
378
  }),
379
- h.length > 0 && /* @__PURE__ */ i("div", {
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__ */ i("div", {
384
+ }), /* @__PURE__ */ a("div", {
385
385
  style: {
386
386
  display: "flex",
387
387
  gap: 4
388
388
  },
389
389
  children: [
390
- /* @__PURE__ */ e(v, {
390
+ /* @__PURE__ */ e(g, {
391
391
  size: "xs",
392
392
  variant: "ghost",
393
- onClick: () => E("front"),
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(v, {
399
+ /* @__PURE__ */ e(g, {
400
400
  size: "xs",
401
401
  variant: "ghost",
402
- onClick: () => E("up"),
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(v, {
408
+ /* @__PURE__ */ e(g, {
409
409
  size: "xs",
410
410
  variant: "ghost",
411
- onClick: () => E("down"),
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(v, {
417
+ /* @__PURE__ */ e(g, {
418
418
  size: "xs",
419
419
  variant: "ghost",
420
- onClick: () => E("back"),
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
- t.length === 1 && /* @__PURE__ */ e(oe, {
430
- edge: t[0],
431
- onUpdateData: X,
432
- onUpdateType: H
429
+ s.length === 1 && /* @__PURE__ */ e(de, {
430
+ edge: s[0],
431
+ onUpdateData: j,
432
+ onUpdateType: K
433
433
  }),
434
- g.length === 1 && /* @__PURE__ */ i(G, { children: [/* @__PURE__ */ e(re, {
435
- line: g[0],
434
+ v.length === 1 && /* @__PURE__ */ a(G, { children: [/* @__PURE__ */ e(he, {
435
+ line: v[0],
436
436
  onUpdateData: $
437
- }), /* @__PURE__ */ i("div", {
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__ */ i("div", {
442
+ }), /* @__PURE__ */ a("div", {
443
443
  style: {
444
444
  display: "flex",
445
445
  gap: 4
446
446
  },
447
447
  children: [
448
- /* @__PURE__ */ e(v, {
448
+ /* @__PURE__ */ e(g, {
449
449
  size: "xs",
450
450
  variant: "ghost",
451
- onClick: () => T("front"),
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(v, {
457
+ /* @__PURE__ */ e(g, {
458
458
  size: "xs",
459
459
  variant: "ghost",
460
- onClick: () => T("up"),
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(v, {
466
+ /* @__PURE__ */ e(g, {
467
467
  size: "xs",
468
468
  variant: "ghost",
469
- onClick: () => T("down"),
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(v, {
475
+ /* @__PURE__ */ e(g, {
476
476
  size: "xs",
477
477
  variant: "ghost",
478
- onClick: () => T("back"),
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 ne({ node: s, isGroup: f, onUpdateData: c, onUpdateDataBatch: a, onUpdateDimension: m, onUpdateType: h }) {
490
- return /* @__PURE__ */ i(G, { children: [
491
- /* @__PURE__ */ i("div", {
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__ */ i("div", {
498
+ /* @__PURE__ */ a("div", {
499
499
  className: "flow-inspector-row",
500
- children: [/* @__PURE__ */ e(d, {
500
+ children: [/* @__PURE__ */ e(c, {
501
501
  size: "xs",
502
502
  className: "flow-inspector-label",
503
503
  children: "Label"
504
- }), /* @__PURE__ */ e(y, {
504
+ }), /* @__PURE__ */ e(w, {
505
505
  size: "xs",
506
- value: s.data.label,
507
- onChange: (t) => c(s.id, "label", t.target.value)
506
+ value: l.data.label,
507
+ onChange: (s) => r(l.id, "label", s.target.value)
508
508
  })]
509
509
  }),
510
- /* @__PURE__ */ i("div", {
510
+ /* @__PURE__ */ a("div", {
511
511
  className: "flow-inspector-row",
512
- children: [/* @__PURE__ */ e(d, {
512
+ children: [/* @__PURE__ */ e(c, {
513
513
  size: "xs",
514
514
  className: "flow-inspector-label",
515
515
  children: "Type"
516
- }), /* @__PURE__ */ e(z, {
517
- options: ie.map((t) => ({
518
- value: t,
519
- label: t
516
+ }), /* @__PURE__ */ e(y, {
517
+ options: ie.map((s) => ({
518
+ value: s,
519
+ label: s
520
520
  })),
521
- value: s.type,
522
- onChange: (t) => h(s.id, t),
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__ */ i("div", {
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__ */ i("div", {
535
+ /* @__PURE__ */ a("div", {
536
536
  className: "flow-inspector-row",
537
- children: [/* @__PURE__ */ e(d, {
537
+ children: [/* @__PURE__ */ e(c, {
538
538
  size: "xs",
539
539
  className: "flow-inspector-label",
540
540
  children: "W"
541
- }), /* @__PURE__ */ e(y, {
541
+ }), /* @__PURE__ */ e(w, {
542
542
  size: "xs",
543
543
  type: "number",
544
- value: String(Math.round(s.width * 100) / 100),
545
- onChange: (t) => m(s.id, "width", Number(t.target.value) || s.width)
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__ */ i("div", {
548
+ /* @__PURE__ */ a("div", {
549
549
  className: "flow-inspector-row",
550
- children: [/* @__PURE__ */ e(d, {
550
+ children: [/* @__PURE__ */ e(c, {
551
551
  size: "xs",
552
552
  className: "flow-inspector-label",
553
553
  children: "H"
554
- }), /* @__PURE__ */ e(y, {
554
+ }), /* @__PURE__ */ e(w, {
555
555
  size: "xs",
556
556
  type: "number",
557
- value: String(Math.round(s.height * 100) / 100),
558
- onChange: (t) => m(s.id, "height", Number(t.target.value) || s.height)
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__ */ i("div", {
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__ */ i("div", {
570
+ /* @__PURE__ */ a("div", {
571
571
  className: "flow-inspector-row",
572
- children: [/* @__PURE__ */ e(d, {
572
+ children: [/* @__PURE__ */ e(c, {
573
573
  size: "xs",
574
574
  className: "flow-inspector-label",
575
575
  children: "Fill"
576
- }), /* @__PURE__ */ e("input", {
576
+ }), /* @__PURE__ */ e(w, {
577
577
  type: "color",
578
- value: s.data.fill === "transparent" ? "#ffffff" : s.data.fill,
579
- onChange: (t) => c(s.id, "fill", t.target.value),
580
- style: {
581
- width: 28,
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__ */ i("div", {
584
+ /* @__PURE__ */ a("div", {
590
585
  className: "flow-inspector-row",
591
- children: [/* @__PURE__ */ e(d, {
586
+ children: [/* @__PURE__ */ e(c, {
592
587
  size: "xs",
593
588
  className: "flow-inspector-label",
594
589
  children: "Stroke"
595
- }), /* @__PURE__ */ e("input", {
590
+ }), /* @__PURE__ */ e(w, {
596
591
  type: "color",
597
- value: s.data.stroke === "transparent" ? "#000000" : s.data.stroke,
598
- onChange: (t) => c(s.id, "stroke", t.target.value),
599
- style: {
600
- width: 28,
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__ */ i("div", {
598
+ /* @__PURE__ */ a("div", {
609
599
  className: "flow-inspector-row",
610
- children: [/* @__PURE__ */ e(d, {
600
+ children: [/* @__PURE__ */ e(c, {
611
601
  size: "xs",
612
602
  className: "flow-inspector-label",
613
603
  children: "Font"
614
- }), /* @__PURE__ */ e(y, {
604
+ }), /* @__PURE__ */ e(w, {
615
605
  size: "xs",
616
606
  type: "number",
617
- value: String(s.data.fontSize),
618
- onChange: (t) => c(s.id, "fontSize", Number(t.target.value) || 14)
607
+ value: String(l.data.fontSize),
608
+ onChange: (s) => r(l.id, "fontSize", Number(s.target.value) || 14)
619
609
  })]
620
610
  }),
621
- /* @__PURE__ */ i("div", {
611
+ /* @__PURE__ */ a("div", {
622
612
  className: "flow-inspector-row",
623
- children: [/* @__PURE__ */ e(d, {
613
+ children: [/* @__PURE__ */ e(c, {
624
614
  size: "xs",
625
615
  className: "flow-inspector-label",
626
616
  children: "Color"
627
- }), /* @__PURE__ */ e("input", {
617
+ }), /* @__PURE__ */ e(w, {
628
618
  type: "color",
629
- value: s.data.color,
630
- onChange: (t) => c(s.id, "color", t.target.value),
631
- style: {
632
- width: 28,
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__ */ i("div", {
625
+ /* @__PURE__ */ a("div", {
641
626
  className: "flow-inspector-row",
642
- children: [/* @__PURE__ */ e(d, {
627
+ children: [/* @__PURE__ */ e(c, {
643
628
  size: "xs",
644
629
  className: "flow-inspector-label",
645
630
  children: "Font Color"
646
- }), /* @__PURE__ */ e("input", {
631
+ }), /* @__PURE__ */ e(w, {
647
632
  type: "color",
648
- value: s.data.labelColor ?? s.data.color,
649
- onChange: (t) => c(s.id, "labelColor", t.target.value),
650
- style: {
651
- width: 28,
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__ */ i("div", {
639
+ /* @__PURE__ */ a("div", {
660
640
  className: "flow-inspector-row",
661
- children: [/* @__PURE__ */ e(d, {
641
+ children: [/* @__PURE__ */ e(c, {
662
642
  size: "xs",
663
643
  className: "flow-inspector-label",
664
644
  children: "Border"
665
- }), /* @__PURE__ */ e(z, {
645
+ }), /* @__PURE__ */ e(y, {
666
646
  options: [{
667
647
  value: "none",
668
648
  label: "none"
669
- }, ...D.map((t) => ({
670
- value: t,
671
- label: t
649
+ }, ...J.map((s) => ({
650
+ value: s,
651
+ label: s
672
652
  }))],
673
- value: s.data.borderStyle ?? (f ? s.type === "geometryGroup" ? "dashed" : "dotted" : "solid"),
674
- onChange: (t) => c(s.id, "borderStyle", t),
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
- s.type === "shapeSvg" && /* @__PURE__ */ i(G, { children: [
679
- /* @__PURE__ */ i("div", {
658
+ l.type === "shapeSvg" && /* @__PURE__ */ a(G, { children: [
659
+ /* @__PURE__ */ a("div", {
680
660
  className: "flow-inspector-row",
681
- children: [/* @__PURE__ */ e(d, {
661
+ children: [/* @__PURE__ */ e(c, {
682
662
  size: "xs",
683
663
  className: "flow-inspector-label",
684
664
  children: "Icon"
685
- }), /* @__PURE__ */ e(z, {
686
- options: U().map((t) => ({
687
- value: t.id,
688
- label: t.label
665
+ }), /* @__PURE__ */ e(y, {
666
+ options: ee().map((s) => ({
667
+ value: s.id,
668
+ label: s.label
689
669
  })),
690
- value: s.data.svgId ?? "",
670
+ value: l.data.svgId ?? "",
691
671
  placeholder: "选择图标",
692
- onChange: (t) => {
693
- const g = ee(String(t));
694
- a(s.id, {
695
- svgId: t,
696
- ...g?.brandColor ? { color: g.brandColor } : {},
697
- ...!s.data.label || s.data.label === "Text" ? { label: g?.label ?? String(t) } : {}
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__ */ i("div", {
683
+ /* @__PURE__ */ a("div", {
704
684
  className: "flow-inspector-row",
705
- children: [/* @__PURE__ */ e(d, {
685
+ children: [/* @__PURE__ */ e(c, {
706
686
  size: "xs",
707
687
  className: "flow-inspector-label",
708
688
  children: "Box"
709
- }), /* @__PURE__ */ e(A, {
689
+ }), /* @__PURE__ */ e(_, {
710
690
  size: "sm",
711
- checked: s.data.iconBox ?? !1,
712
- onChange: (t) => c(s.id, "iconBox", t),
691
+ checked: l.data.iconBox ?? !1,
692
+ onChange: (s) => r(l.id, "iconBox", s),
713
693
  label: "显示边框"
714
694
  })]
715
695
  }),
716
- /* @__PURE__ */ i("div", {
696
+ /* @__PURE__ */ a("div", {
717
697
  className: "flow-inspector-row",
718
- children: [/* @__PURE__ */ e(d, {
698
+ children: [/* @__PURE__ */ e(c, {
719
699
  size: "xs",
720
700
  className: "flow-inspector-label",
721
701
  children: "Label"
722
- }), /* @__PURE__ */ e(z, {
702
+ }), /* @__PURE__ */ e(y, {
723
703
  options: [
724
704
  {
725
- value: "below",
726
- label: "下方"
705
+ value: "top",
706
+ label: "top"
707
+ },
708
+ {
709
+ value: "middle",
710
+ label: "middle"
727
711
  },
728
712
  {
729
- value: "center",
730
- label: "居中"
713
+ value: "bottom",
714
+ label: "bottom"
731
715
  },
732
716
  {
733
- value: "above",
734
- label: "上方"
717
+ value: "left",
718
+ label: "left"
719
+ },
720
+ {
721
+ value: "right",
722
+ label: "right"
735
723
  }
736
724
  ],
737
- value: s.data.labelPlacement ?? "below",
738
- onChange: (t) => c(s.id, "labelPlacement", t),
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
- s.type === "mediaNode" && /* @__PURE__ */ e(te, {
746
- node: s,
747
- onUpdateData: c
759
+ l.type === "mediaNode" && /* @__PURE__ */ e(ce, {
760
+ node: l,
761
+ onUpdateData: r
748
762
  }),
749
- /* @__PURE__ */ i("div", {
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__ */ i("div", {
770
+ /* @__PURE__ */ a("div", {
757
771
  className: "flow-inspector-row",
758
772
  children: [
759
- /* @__PURE__ */ e(d, {
773
+ /* @__PURE__ */ e(c, {
760
774
  size: "xs",
761
775
  className: "flow-inspector-label",
762
776
  children: "Rotate"
763
777
  }),
764
- /* @__PURE__ */ e(y, {
778
+ /* @__PURE__ */ e(w, {
765
779
  size: "xs",
766
780
  type: "number",
767
- value: String(s.data.rotation ?? 0),
768
- onChange: (t) => c(s.id, "rotation", Number(t.target.value) || 0)
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__ */ i("div", {
794
+ /* @__PURE__ */ a("div", {
780
795
  className: "flow-inspector-row",
781
796
  children: [
782
- /* @__PURE__ */ e(d, {
797
+ /* @__PURE__ */ e(c, {
783
798
  size: "xs",
784
799
  className: "flow-inspector-label",
785
800
  children: "Flip"
786
801
  }),
787
- /* @__PURE__ */ e(v, {
802
+ /* @__PURE__ */ e(g, {
788
803
  size: "xs",
789
- variant: s.data.flipX ? "primary" : "ghost",
790
- onClick: () => c(s.id, "flipX", !s.data.flipX),
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(v, {
812
+ /* @__PURE__ */ e(g, {
798
813
  size: "xs",
799
- variant: s.data.flipY ? "primary" : "ghost",
800
- onClick: () => c(s.id, "flipY", !s.data.flipY),
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__ */ i("div", {
824
+ /* @__PURE__ */ a("div", {
810
825
  className: "flow-inspector-row",
811
826
  children: [
812
- /* @__PURE__ */ e(d, {
827
+ /* @__PURE__ */ e(c, {
813
828
  size: "xs",
814
829
  className: "flow-inspector-label",
815
830
  children: "Quick"
816
831
  }),
817
- /* @__PURE__ */ e(v, {
832
+ /* @__PURE__ */ e(g, {
818
833
  size: "xs",
819
834
  variant: "ghost",
820
- onClick: () => c(s.id, "rotation", ((s.data.rotation ?? 0) + 90) % 360),
835
+ onClick: () => r(l.id, "rotation", ((l.data.rotation ?? 0) + 90) % 360),
821
836
  children: "+90°"
822
837
  }),
823
- /* @__PURE__ */ e(v, {
838
+ /* @__PURE__ */ e(g, {
824
839
  size: "xs",
825
840
  variant: "ghost",
826
- onClick: () => c(s.id, "rotation", ((s.data.rotation ?? 0) - 90 + 360) % 360),
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 te({ node: s, onUpdateData: f }) {
836
- const c = s.data.mediaKind ?? "markdown", a = s.data.aiConfig, m = (h, t) => {
837
- f(s.id, "aiConfig", {
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
- ...a,
842
- [h]: t
906
+ ...t,
907
+ [s]: v
843
908
  });
844
909
  };
845
- return /* @__PURE__ */ i("div", {
910
+ return /* @__PURE__ */ a("div", {
846
911
  className: "flow-inspector-section",
847
- children: [/* @__PURE__ */ i("div", {
912
+ children: [/* @__PURE__ */ a("div", {
848
913
  className: "flow-inspector-section-title",
849
- children: ["Media · ", c]
850
- }), c !== "ai" ? /* @__PURE__ */ i("div", {
851
- className: "flow-inspector-row",
852
- style: {
853
- flexDirection: "column",
854
- alignItems: "stretch",
855
- gap: 4
856
- },
857
- children: [/* @__PURE__ */ e(d, {
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
- markdown: "Markdown 源码",
862
- html: "HTML 源码",
863
- mermaid: "Mermaid 图表",
864
- math: "LaTeX 公式"
865
- }[c] ?? "内容"
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
- }) : /* @__PURE__ */ i(G, { children: [
874
- /* @__PURE__ */ i("div", {
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(d, {
1029
+ children: [/* @__PURE__ */ e(c, {
877
1030
  size: "xs",
878
1031
  className: "flow-inspector-label",
879
1032
  children: "协议"
880
- }), /* @__PURE__ */ e(z, {
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: a?.protocol ?? "openai",
889
- onChange: (h) => m("protocol", h),
1041
+ value: t?.protocol ?? "openai",
1042
+ onChange: (s) => f("protocol", s),
890
1043
  style: { fontSize: 12 }
891
1044
  })]
892
1045
  }),
893
- /* @__PURE__ */ i("div", {
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(d, {
1053
+ children: [/* @__PURE__ */ e(c, {
901
1054
  size: "xs",
902
1055
  className: "flow-inspector-label",
903
1056
  children: "接口地址"
904
- }), /* @__PURE__ */ e(y, {
1057
+ }), /* @__PURE__ */ e(w, {
905
1058
  size: "xs",
906
- value: a?.gateway ?? "",
1059
+ value: t?.gateway ?? "",
907
1060
  placeholder: "https://api.openai.com/v1/chat/completions",
908
- onChange: (h) => m("gateway", h.target.value)
1061
+ onChange: (s) => f("gateway", s.target.value)
909
1062
  })]
910
1063
  }),
911
- /* @__PURE__ */ i("div", {
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(d, {
1071
+ children: [/* @__PURE__ */ e(c, {
919
1072
  size: "xs",
920
1073
  className: "flow-inspector-label",
921
1074
  children: "模型"
922
- }), /* @__PURE__ */ e(y, {
1075
+ }), /* @__PURE__ */ e(w, {
923
1076
  size: "xs",
924
- value: a?.model ?? "",
1077
+ value: t?.model ?? "",
925
1078
  placeholder: "gpt-4o-mini",
926
- onChange: (h) => m("model", h.target.value)
1079
+ onChange: (s) => f("model", s.target.value)
927
1080
  })]
928
1081
  }),
929
- /* @__PURE__ */ i("div", {
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(d, {
1089
+ children: [/* @__PURE__ */ e(c, {
937
1090
  size: "xs",
938
1091
  className: "flow-inspector-label",
939
1092
  children: "API Key"
940
- }), /* @__PURE__ */ e(y, {
1093
+ }), /* @__PURE__ */ e(w, {
941
1094
  size: "xs",
942
1095
  type: "password",
943
- value: a?.apiKey ?? "",
1096
+ value: t?.apiKey ?? "",
944
1097
  placeholder: "sk-...",
945
- onChange: (h) => m("apiKey", h.target.value)
1098
+ onChange: (s) => f("apiKey", s.target.value)
946
1099
  })]
947
1100
  }),
948
- /* @__PURE__ */ i("div", {
949
- className: "flow-inspector-row",
950
- style: {
951
- flexDirection: "column",
952
- alignItems: "stretch",
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 oe({ edge: s, onUpdateData: f, onUpdateType: c }) {
979
- return /* @__PURE__ */ i("div", {
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__ */ i("div", {
1126
+ /* @__PURE__ */ a("div", {
987
1127
  className: "flow-inspector-row",
988
- children: [/* @__PURE__ */ e(d, {
1128
+ children: [/* @__PURE__ */ e(c, {
989
1129
  size: "xs",
990
1130
  className: "flow-inspector-label",
991
1131
  children: "Type"
992
- }), /* @__PURE__ */ e(z, {
993
- options: q.map((a) => ({
994
- value: a,
995
- label: a
1132
+ }), /* @__PURE__ */ e(y, {
1133
+ options: Q.map((t) => ({
1134
+ value: t,
1135
+ label: t
996
1136
  })),
997
- value: s.type,
998
- onChange: (a) => c(s.id, a),
1137
+ value: l.type,
1138
+ onChange: (t) => r(l.id, t),
999
1139
  style: { fontSize: 12 }
1000
1140
  })]
1001
1141
  }),
1002
- /* @__PURE__ */ i("div", {
1142
+ /* @__PURE__ */ a("div", {
1003
1143
  className: "flow-inspector-row",
1004
- children: [/* @__PURE__ */ e(d, {
1144
+ children: [/* @__PURE__ */ e(c, {
1005
1145
  size: "xs",
1006
1146
  className: "flow-inspector-label",
1007
1147
  children: "Color"
1008
- }), /* @__PURE__ */ e("input", {
1148
+ }), /* @__PURE__ */ e(w, {
1009
1149
  type: "color",
1010
- value: s.data.strokeColor ?? "#374151",
1011
- onChange: (a) => f(s.id, "strokeColor", a.target.value),
1012
- style: {
1013
- width: 28,
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__ */ i("div", {
1156
+ /* @__PURE__ */ a("div", {
1022
1157
  className: "flow-inspector-row",
1023
- children: [/* @__PURE__ */ e(d, {
1158
+ children: [/* @__PURE__ */ e(c, {
1024
1159
  size: "xs",
1025
1160
  className: "flow-inspector-label",
1026
1161
  children: "Width"
1027
- }), /* @__PURE__ */ e(y, {
1162
+ }), /* @__PURE__ */ e(w, {
1028
1163
  size: "xs",
1029
1164
  type: "number",
1030
- value: String(s.data.strokeWidth ?? 2),
1031
- onChange: (a) => f(s.id, "strokeWidth", Number(a.target.value) || 2)
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__ */ i("div", {
1169
+ /* @__PURE__ */ a("div", {
1035
1170
  className: "flow-inspector-row",
1036
- children: [/* @__PURE__ */ e(d, {
1171
+ children: [/* @__PURE__ */ e(c, {
1037
1172
  size: "xs",
1038
1173
  className: "flow-inspector-label",
1039
1174
  children: "Animation"
1040
- }), /* @__PURE__ */ e(A, {
1175
+ }), /* @__PURE__ */ e(_, {
1041
1176
  size: "sm",
1042
- checked: s.data.animated ?? !1,
1043
- onChange: (a) => f(s.id, "animated", a),
1177
+ checked: l.data.animated ?? !1,
1178
+ onChange: (t) => h(l.id, "animated", t),
1044
1179
  label: "预览时播放"
1045
1180
  })]
1046
1181
  }),
1047
- /* @__PURE__ */ i("div", {
1182
+ /* @__PURE__ */ a("div", {
1048
1183
  className: "flow-inspector-row",
1049
- children: [/* @__PURE__ */ e(d, {
1184
+ children: [/* @__PURE__ */ e(c, {
1050
1185
  size: "xs",
1051
1186
  className: "flow-inspector-label",
1052
1187
  children: "Line"
1053
- }), /* @__PURE__ */ e(z, {
1054
- options: R.map((a) => ({
1055
- value: a,
1056
- label: a
1188
+ }), /* @__PURE__ */ e(y, {
1189
+ options: Y.map((t) => ({
1190
+ value: t,
1191
+ label: t
1057
1192
  })),
1058
- value: s.data.lineStyle ?? "solid",
1059
- onChange: (a) => f(s.id, "lineStyle", a),
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__ */ i("div", {
1198
+ /* @__PURE__ */ a("div", {
1064
1199
  className: "flow-inspector-row",
1065
- children: [/* @__PURE__ */ e(d, {
1200
+ children: [/* @__PURE__ */ e(c, {
1066
1201
  size: "xs",
1067
1202
  className: "flow-inspector-label",
1068
1203
  children: "Start"
1069
- }), /* @__PURE__ */ e(z, {
1070
- options: O.map((a) => ({
1071
- value: a,
1072
- label: a
1204
+ }), /* @__PURE__ */ e(y, {
1205
+ options: A.map((t) => ({
1206
+ value: t,
1207
+ label: t
1073
1208
  })),
1074
- value: s.data.markerStart ?? "none",
1075
- onChange: (a) => f(s.id, "markerStart", a),
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__ */ i("div", {
1214
+ /* @__PURE__ */ a("div", {
1080
1215
  className: "flow-inspector-row",
1081
- children: [/* @__PURE__ */ e(d, {
1216
+ children: [/* @__PURE__ */ e(c, {
1082
1217
  size: "xs",
1083
1218
  className: "flow-inspector-label",
1084
1219
  children: "End"
1085
- }), /* @__PURE__ */ e(z, {
1086
- options: O.map((a) => ({
1087
- value: a,
1088
- label: a
1220
+ }), /* @__PURE__ */ e(y, {
1221
+ options: A.map((t) => ({
1222
+ value: t,
1223
+ label: t
1089
1224
  })),
1090
- value: s.data.markerEnd ?? "none",
1091
- onChange: (a) => f(s.id, "markerEnd", a),
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__ */ i("div", {
1230
+ /* @__PURE__ */ a("div", {
1096
1231
  className: "flow-inspector-row",
1097
- children: [/* @__PURE__ */ e(d, {
1232
+ children: [/* @__PURE__ */ e(c, {
1098
1233
  size: "xs",
1099
1234
  className: "flow-inspector-label",
1100
1235
  children: "Label"
1101
- }), /* @__PURE__ */ e(y, {
1236
+ }), /* @__PURE__ */ e(w, {
1102
1237
  size: "xs",
1103
- value: s.data.labelText ?? "",
1104
- onChange: (a) => f(s.id, "labelText", a.target.value),
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 re({ line: s, onUpdateData: f }) {
1112
- return /* @__PURE__ */ i("div", {
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__ */ i("div", {
1254
+ /* @__PURE__ */ a("div", {
1120
1255
  className: "flow-inspector-row",
1121
- children: [/* @__PURE__ */ e(d, {
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: s.type
1265
+ children: l.type
1131
1266
  })]
1132
1267
  }),
1133
- /* @__PURE__ */ i("div", {
1268
+ /* @__PURE__ */ a("div", {
1134
1269
  className: "flow-inspector-row",
1135
- children: [/* @__PURE__ */ e(d, {
1270
+ children: [/* @__PURE__ */ e(c, {
1136
1271
  size: "xs",
1137
1272
  className: "flow-inspector-label",
1138
1273
  children: "Color"
1139
- }), /* @__PURE__ */ e("input", {
1274
+ }), /* @__PURE__ */ e(w, {
1140
1275
  type: "color",
1141
- value: s.strokeColor,
1142
- onChange: (c) => f(s.id, "strokeColor", c.target.value),
1143
- style: {
1144
- width: 28,
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__ */ i("div", {
1282
+ /* @__PURE__ */ a("div", {
1153
1283
  className: "flow-inspector-row",
1154
- children: [/* @__PURE__ */ e(d, {
1284
+ children: [/* @__PURE__ */ e(c, {
1155
1285
  size: "xs",
1156
1286
  className: "flow-inspector-label",
1157
1287
  children: "Width"
1158
- }), /* @__PURE__ */ e(y, {
1288
+ }), /* @__PURE__ */ e(w, {
1159
1289
  size: "xs",
1160
1290
  type: "number",
1161
- value: String(s.strokeWidth),
1162
- onChange: (c) => f(s.id, "strokeWidth", Number(c.target.value) || 2)
1291
+ value: String(l.strokeWidth),
1292
+ onChange: (r) => h(l.id, "strokeWidth", Number(r.target.value) || 2)
1163
1293
  })]
1164
1294
  }),
1165
- /* @__PURE__ */ i("div", {
1295
+ /* @__PURE__ */ a("div", {
1166
1296
  className: "flow-inspector-row",
1167
- children: [/* @__PURE__ */ e(d, {
1297
+ children: [/* @__PURE__ */ e(c, {
1168
1298
  size: "xs",
1169
1299
  className: "flow-inspector-label",
1170
1300
  children: "Style"
1171
- }), /* @__PURE__ */ e(z, {
1172
- options: R.map((c) => ({
1173
- value: c,
1174
- label: c
1301
+ }), /* @__PURE__ */ e(y, {
1302
+ options: Y.map((r) => ({
1303
+ value: r,
1304
+ label: r
1175
1305
  })),
1176
- value: s.lineStyle,
1177
- onChange: (c) => f(s.id, "lineStyle", c),
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
- ae as InspectorPanelContent,
1186
- Se as default
1315
+ oe as InspectorPanelContent,
1316
+ Ge as default
1187
1317
  };
1188
1318
 
1189
1319
  //# sourceMappingURL=InspectorPanel.js.map