dishui 0.0.49 → 0.0.50

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 (52) hide show
  1. package/dist/components/pro/Flow/Flow.js +419 -407
  2. package/dist/components/pro/Flow/Flow.js.map +1 -1
  3. package/dist/components/pro/Flow/archify/build.d.ts +74 -0
  4. package/dist/components/pro/Flow/archify/build.js +103 -0
  5. package/dist/components/pro/Flow/archify/build.js.map +1 -0
  6. package/dist/components/pro/Flow/archify/convert.d.ts +14 -0
  7. package/dist/components/pro/Flow/archify/convert.js +534 -0
  8. package/dist/components/pro/Flow/archify/convert.js.map +1 -0
  9. package/dist/components/pro/Flow/archify/index.d.ts +12 -0
  10. package/dist/components/pro/Flow/archify/palette.d.ts +64 -0
  11. package/dist/components/pro/Flow/archify/palette.js +112 -0
  12. package/dist/components/pro/Flow/archify/palette.js.map +1 -0
  13. package/dist/components/pro/Flow/archify/presets.d.ts +26 -0
  14. package/dist/components/pro/Flow/archify/presets.js +43 -0
  15. package/dist/components/pro/Flow/archify/presets.js.map +1 -0
  16. package/dist/components/pro/Flow/archify/spec.d.ts +283 -0
  17. package/dist/components/pro/Flow/archify/spec.js +10 -0
  18. package/dist/components/pro/Flow/archify/spec.js.map +1 -0
  19. package/dist/components/pro/Flow/constants.js +14 -0
  20. package/dist/components/pro/Flow/constants.js.map +1 -1
  21. package/dist/components/pro/Flow/hooks/useClipboard.d.ts +5 -0
  22. package/dist/components/pro/Flow/hooks/useClipboard.js +129 -73
  23. package/dist/components/pro/Flow/hooks/useClipboard.js.map +1 -1
  24. package/dist/components/pro/Flow/hooks/useFlowImportExport.d.ts +1 -0
  25. package/dist/components/pro/Flow/hooks/useFlowImportExport.js +108 -93
  26. package/dist/components/pro/Flow/hooks/useFlowImportExport.js.map +1 -1
  27. package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.d.ts +1 -0
  28. package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js +7 -7
  29. package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js.map +1 -1
  30. package/dist/components/pro/Flow/index.d.ts +2 -0
  31. package/dist/components/pro/Flow/nodes/DataNodeView.d.ts +4 -1
  32. package/dist/components/pro/Flow/nodes/DataNodeView.js +127 -115
  33. package/dist/components/pro/Flow/nodes/DataNodeView.js.map +1 -1
  34. package/dist/components/pro/Flow/nodes/MediaContent.js +72 -67
  35. package/dist/components/pro/Flow/nodes/MediaContent.js.map +1 -1
  36. package/dist/components/pro/Flow/nodes/NodeRenderer.d.ts +5 -0
  37. package/dist/components/pro/Flow/nodes/NodeRenderer.js +216 -115
  38. package/dist/components/pro/Flow/nodes/NodeRenderer.js.map +1 -1
  39. package/dist/components/pro/Flow/panels/FlowToolbar.js +208 -169
  40. package/dist/components/pro/Flow/panels/FlowToolbar.js.map +1 -1
  41. package/dist/components/pro/Flow/panels/InspectorPanel.js +602 -369
  42. package/dist/components/pro/Flow/panels/InspectorPanel.js.map +1 -1
  43. package/dist/components/pro/Flow/panels/ShapePalette.js +50 -39
  44. package/dist/components/pro/Flow/panels/ShapePalette.js.map +1 -1
  45. package/dist/components/pro/Flow/panels/toolbarIcons.d.ts +1 -0
  46. package/dist/components/pro/Flow/panels/toolbarIcons.js +36 -8
  47. package/dist/components/pro/Flow/panels/toolbarIcons.js.map +1 -1
  48. package/dist/components/pro/Flow/types.d.ts +30 -0
  49. package/dist/components/pro/Flow/types.js.map +1 -1
  50. package/dist/dishui.css +1 -1
  51. package/dist/flow.js +73 -56
  52. package/package.json +18 -17
@@ -1,29 +1,31 @@
1
1
  import g from "../../../Button/index.js";
2
- import b from "../../../Input/index.js";
3
- import m from "../../../Label/index.js";
4
- import X from "../../../Checkbox/index.js";
5
- import k from "../../../Select/index.js";
6
- import { BORDER_STYLE_OPTIONS as q, DEFAULT_NODE_DATA as Q, EDGE_LINE_STYLE_OPTIONS as $, EDGE_MARKER_OPTIONS as Y, EDGE_TYPE_OPTIONS as D } from "../constants.js";
7
- import { useFlowContext as U } from "../context/FlowContext.js";
8
- import { useFlowUI as ee } from "../context/FlowUIContext.js";
9
- import { COMMON_COLORS as R, THEME_SYNC_TOKEN as le, isThemeToken as se, themeTokenCssVar as ae } from "../utils/themeColor.js";
10
- import { generateId as ie } from "../nodes/nodeUtils.js";
11
- import { getAllSvgIcons as te, getSvgIcon as ne } from "../nodes/svgIcons.js";
12
- import { useDraggablePanel as oe } from "../hooks/useDraggablePanel.js";
13
- import { useResizablePanel as re } from "../hooks/useResizablePanel.js";
14
- import { FLOW_NODE_TYPES as ce } from "../types.js";
15
- import { ExpandableTextarea as Z } from "./ExpandableTextarea.js";
16
- import { DataInspectorSection as de } from "./DataInspectorSection.js";
17
- import { useMemo as A, useRef as me } from "react";
18
- import { Fragment as L, jsx as e, jsxs as a } from "react/jsx-runtime";
19
- function Pe() {
20
- const { showInspector: l } = ee(), { panelStyle: c, handleProps: r } = oe(), { panelWidth: t, resizeHandleProps: p } = re("left", 240);
2
+ import v from "../../../Input/index.js";
3
+ import n from "../../../Label/index.js";
4
+ import K from "../../../Checkbox/index.js";
5
+ import y from "../../../Select/index.js";
6
+ import { BORDER_STYLE_OPTIONS as ee, DEFAULT_NODE_DATA as le, EDGE_LINE_STYLE_OPTIONS as V, EDGE_MARKER_OPTIONS as X, EDGE_TYPE_OPTIONS as se } from "../constants.js";
7
+ import { useFlowContext as ae } from "../context/FlowContext.js";
8
+ import { useFlowUI as te } from "../context/FlowUIContext.js";
9
+ import { COMMON_COLORS as Z, THEME_SYNC_TOKEN as ie, isThemeToken as oe, themeTokenCssVar as ne } from "../utils/themeColor.js";
10
+ import { generateId as re } from "../nodes/nodeUtils.js";
11
+ import { getAllSvgIcons as ce, getSvgIcon as de } from "../nodes/svgIcons.js";
12
+ import { COMPONENT_STYLES as _ } from "../archify/palette.js";
13
+ import { ARCHIFY_COMPONENT_LABELS as A, ARCHIFY_COMPONENT_ORDER as $, archifyStylePatch as H } from "../archify/presets.js";
14
+ import { useDraggablePanel as he } from "../hooks/useDraggablePanel.js";
15
+ import { useResizablePanel as me } from "../hooks/useResizablePanel.js";
16
+ import { FLOW_NODE_TYPES as pe } from "../types.js";
17
+ import { ExpandableTextarea as j } from "./ExpandableTextarea.js";
18
+ import { DataInspectorSection as fe } from "./DataInspectorSection.js";
19
+ import { useMemo as R, useRef as ue } from "react";
20
+ import { Fragment as F, jsx as e, jsxs as a } from "react/jsx-runtime";
21
+ function Xe() {
22
+ const { showInspector: l } = te(), { panelStyle: d, handleProps: o } = he(), { panelWidth: i, resizeHandleProps: p } = me("left", 240);
21
23
  return l ? /* @__PURE__ */ a("div", {
22
24
  className: "flow-inspector",
23
25
  "data-flow-panel": !0,
24
26
  style: {
25
- ...c,
26
- width: t
27
+ ...d,
28
+ width: i
27
29
  },
28
30
  children: [
29
31
  /* @__PURE__ */ e("div", {
@@ -32,7 +34,7 @@ function Pe() {
32
34
  }),
33
35
  /* @__PURE__ */ e("div", {
34
36
  className: "flow-panel-drag-handle",
35
- ...r,
37
+ ...o,
36
38
  style: {
37
39
  fontSize: 11,
38
40
  fontWeight: 600,
@@ -46,31 +48,31 @@ function Pe() {
46
48
  }),
47
49
  /* @__PURE__ */ e("div", {
48
50
  className: "flow-inspector-content",
49
- children: /* @__PURE__ */ e(he, {})
51
+ children: /* @__PURE__ */ e(we, {})
50
52
  })
51
53
  ]
52
54
  }) : null;
53
55
  }
54
- function he() {
55
- const { currentCanvas: l, selection: c, setSelection: r, setDoc: t, currentCanvasId: p } = U(), f = A(() => l.nodes.filter((d) => c.nodeIds.has(d.id)), [l.nodes, c.nodeIds]), s = A(() => l.edges.filter((d) => c.edgeIds.has(d.id)), [l.edges, c.edgeIds]), u = A(() => l.lines.filter((d) => c.lineIds.has(d.id)), [l.lines, c.lineIds]), S = f.length > 0 || s.length > 0 || u.length > 0, z = f.length === 1 && (f[0].type === "flowGroup" || f[0].type === "geometryGroup" || f[0].data.isGroup), M = f.length + u.length, P = (d = "flowGroup") => {
56
- if (M < 2) return;
56
+ function we() {
57
+ const { currentCanvas: l, selection: d, setSelection: o, setDoc: i, currentCanvasId: p } = ae(), f = R(() => l.nodes.filter((h) => d.nodeIds.has(h.id)), [l.nodes, d.nodeIds]), s = R(() => l.edges.filter((h) => d.edgeIds.has(h.id)), [l.edges, d.edgeIds]), u = R(() => l.lines.filter((h) => d.lineIds.has(h.id)), [l.lines, d.lineIds]), k = f.length > 0 || s.length > 0 || u.length > 0, C = f.length === 1 && (f[0].type === "flowGroup" || f[0].type === "geometryGroup" || f[0].data.isGroup), L = f.length + u.length, B = (h = "flowGroup") => {
58
+ if (L < 2) return;
57
59
  const w = 20;
58
- let o = 1 / 0, i = 1 / 0, n = -1 / 0, h = -1 / 0;
60
+ let c = 1 / 0, t = 1 / 0, r = -1 / 0, m = -1 / 0;
59
61
  for (const x of f)
60
- o = Math.min(o, x.position.x), i = Math.min(i, x.position.y), n = Math.max(n, x.position.x + x.width), h = Math.max(h, x.position.y + x.height);
61
- for (const x of u) for (const C of x.points)
62
- o = Math.min(o, C.x), i = Math.min(i, C.y), n = Math.max(n, C.x), h = Math.max(h, C.y);
63
- const I = d === "geometryGroup", E = ie("group"), v = {
62
+ c = Math.min(c, x.position.x), t = Math.min(t, x.position.y), r = Math.max(r, x.position.x + x.width), m = Math.max(m, x.position.y + x.height);
63
+ for (const x of u) for (const S of x.points)
64
+ c = Math.min(c, S.x), t = Math.min(t, S.y), r = Math.max(r, S.x), m = Math.max(m, S.y);
65
+ const I = h === "geometryGroup", E = re("group"), b = {
64
66
  id: E,
65
- type: d,
67
+ type: h,
66
68
  position: {
67
- x: o - w,
68
- y: i - w
69
+ x: c - w,
70
+ y: t - w
69
71
  },
70
- width: n - o + w * 2,
71
- height: h - i + w * 2,
72
+ width: r - c + w * 2,
73
+ height: m - t + w * 2,
72
74
  data: {
73
- ...Q,
75
+ ...le,
74
76
  label: I ? "Geo Group" : "Group",
75
77
  fill: I ? "#fefce8" : "#f0f9ff",
76
78
  stroke: "#9ca3af",
@@ -78,225 +80,225 @@ function he() {
78
80
  borderStyle: I ? "dashed" : "dotted",
79
81
  isGroup: !0
80
82
  }
81
- }, T = c.nodeIds, N = c.lineIds;
82
- t((x) => {
83
- const C = x.canvases[p];
84
- return C ? {
83
+ }, T = d.nodeIds, N = d.lineIds;
84
+ i((x) => {
85
+ const S = x.canvases[p];
86
+ return S ? {
85
87
  ...x,
86
88
  canvases: {
87
89
  ...x.canvases,
88
90
  [p]: {
89
- ...C,
90
- nodes: I ? [v, ...C.nodes] : [v, ...C.nodes.map((F) => T.has(F.id) ? {
91
- ...F,
91
+ ...S,
92
+ nodes: I ? [b, ...S.nodes] : [b, ...S.nodes.map((G) => T.has(G.id) ? {
93
+ ...G,
92
94
  parentId: E
93
- } : F)],
94
- lines: I ? C.lines : C.lines.map((F) => N.has(F.id) ? {
95
- ...F,
95
+ } : G)],
96
+ lines: I ? S.lines : S.lines.map((G) => N.has(G.id) ? {
97
+ ...G,
96
98
  parentId: E
97
- } : F)
99
+ } : G)
98
100
  }
99
101
  }
100
102
  } : x;
101
- }), r({
103
+ }), o({
102
104
  nodeIds: /* @__PURE__ */ new Set([E]),
103
105
  edgeIds: /* @__PURE__ */ new Set(),
104
106
  lineIds: /* @__PURE__ */ new Set()
105
107
  });
106
- }, _ = () => {
107
- const d = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
108
- for (const i of f) (i.type === "flowGroup" || i.type === "geometryGroup" || i.data.isGroup) && d.add(i.id);
109
- if (d.size !== 0) {
110
- for (const i of l.nodes) i.parentId && d.has(i.parentId) && w.add(i.id);
111
- for (const i of l.lines) i.parentId && d.has(i.parentId) && o.add(i.id);
112
- t((i) => {
113
- const n = i.canvases[p];
114
- return n ? {
115
- ...i,
108
+ }, Y = () => {
109
+ const h = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set();
110
+ for (const t of f) (t.type === "flowGroup" || t.type === "geometryGroup" || t.data.isGroup) && h.add(t.id);
111
+ if (h.size !== 0) {
112
+ for (const t of l.nodes) t.parentId && h.has(t.parentId) && w.add(t.id);
113
+ for (const t of l.lines) t.parentId && h.has(t.parentId) && c.add(t.id);
114
+ i((t) => {
115
+ const r = t.canvases[p];
116
+ return r ? {
117
+ ...t,
116
118
  canvases: {
117
- ...i.canvases,
119
+ ...t.canvases,
118
120
  [p]: {
119
- ...n,
120
- nodes: n.nodes.filter((h) => !d.has(h.id)).map((h) => w.has(h.id) ? {
121
- ...h,
121
+ ...r,
122
+ nodes: r.nodes.filter((m) => !h.has(m.id)).map((m) => w.has(m.id) ? {
123
+ ...m,
122
124
  parentId: void 0
123
- } : h),
124
- lines: n.lines.map((h) => o.has(h.id) ? {
125
- ...h,
125
+ } : m),
126
+ lines: r.lines.map((m) => c.has(m.id) ? {
127
+ ...m,
126
128
  parentId: void 0
127
- } : h)
129
+ } : m)
128
130
  }
129
131
  }
130
- } : i;
131
- }), r({
132
+ } : t;
133
+ }), o({
132
134
  nodeIds: w,
133
135
  edgeIds: /* @__PURE__ */ new Set(),
134
- lineIds: o
136
+ lineIds: c
135
137
  });
136
138
  }
137
- }, G = (d) => {
138
- const w = c.nodeIds;
139
- w.size !== 0 && t((o) => {
140
- const i = o.canvases[p];
141
- if (!i) return o;
142
- const n = i.nodes.map((v) => v.zIndex ?? 0), h = n.length > 0 ? Math.max(...n) : 0, I = n.length > 0 ? Math.min(...n) : 0, E = i.nodes.map((v) => {
143
- if (!w.has(v.id)) return v;
144
- const T = v.zIndex ?? 0;
139
+ }, O = (h) => {
140
+ const w = d.nodeIds;
141
+ w.size !== 0 && i((c) => {
142
+ const t = c.canvases[p];
143
+ if (!t) return c;
144
+ const r = t.nodes.map((b) => b.zIndex ?? 0), m = r.length > 0 ? Math.max(...r) : 0, I = r.length > 0 ? Math.min(...r) : 0, E = t.nodes.map((b) => {
145
+ if (!w.has(b.id)) return b;
146
+ const T = b.zIndex ?? 0;
145
147
  let N = T;
146
- return d === "front" ? N = h + 1 : d === "back" ? N = I - 1 : d === "up" ? N = T + 1 : d === "down" && (N = T - 1), {
147
- ...v,
148
+ return h === "front" ? N = m + 1 : h === "back" ? N = I - 1 : h === "up" ? N = T + 1 : h === "down" && (N = T - 1), {
149
+ ...b,
148
150
  zIndex: N
149
151
  };
150
152
  });
151
153
  return {
152
- ...o,
154
+ ...c,
153
155
  canvases: {
154
- ...o.canvases,
156
+ ...c.canvases,
155
157
  [p]: {
156
- ...i,
158
+ ...t,
157
159
  nodes: E
158
160
  }
159
161
  }
160
162
  };
161
163
  });
162
- }, O = (d) => {
163
- const w = c.lineIds;
164
- w.size !== 0 && t((o) => {
165
- const i = o.canvases[p];
166
- if (!i) return o;
167
- const n = i.lines.map((v) => v.zIndex ?? 0), h = n.length > 0 ? Math.max(...n) : 0, I = n.length > 0 ? Math.min(...n) : 0, E = i.lines.map((v) => {
168
- if (!w.has(v.id)) return v;
169
- const T = v.zIndex ?? 0;
164
+ }, M = (h) => {
165
+ const w = d.lineIds;
166
+ w.size !== 0 && i((c) => {
167
+ const t = c.canvases[p];
168
+ if (!t) return c;
169
+ const r = t.lines.map((b) => b.zIndex ?? 0), m = r.length > 0 ? Math.max(...r) : 0, I = r.length > 0 ? Math.min(...r) : 0, E = t.lines.map((b) => {
170
+ if (!w.has(b.id)) return b;
171
+ const T = b.zIndex ?? 0;
170
172
  let N = T;
171
- return d === "front" ? N = h + 1 : d === "back" ? N = I - 1 : d === "up" ? N = T + 1 : d === "down" && (N = T - 1), {
172
- ...v,
173
+ return h === "front" ? N = m + 1 : h === "back" ? N = I - 1 : h === "up" ? N = T + 1 : h === "down" && (N = T - 1), {
174
+ ...b,
173
175
  zIndex: N
174
176
  };
175
177
  });
176
178
  return {
177
- ...o,
179
+ ...c,
178
180
  canvases: {
179
- ...o.canvases,
181
+ ...c.canvases,
180
182
  [p]: {
181
- ...i,
183
+ ...t,
182
184
  lines: E
183
185
  }
184
186
  }
185
187
  };
186
188
  });
187
- }, y = (d, w, o) => {
188
- W(d, { [w]: o });
189
- }, W = (d, w) => {
190
- t((o) => {
191
- const i = o.canvases[p];
192
- return i ? {
193
- ...o,
189
+ }, z = (h, w, c) => {
190
+ W(h, { [w]: c });
191
+ }, W = (h, w) => {
192
+ i((c) => {
193
+ const t = c.canvases[p];
194
+ return t ? {
195
+ ...c,
194
196
  canvases: {
195
- ...o.canvases,
197
+ ...c.canvases,
196
198
  [p]: {
197
- ...i,
198
- nodes: i.nodes.map((n) => n.id === d ? {
199
- ...n,
199
+ ...t,
200
+ nodes: t.nodes.map((r) => r.id === h ? {
201
+ ...r,
200
202
  data: {
201
- ...n.data,
203
+ ...r.data,
202
204
  ...w
203
205
  }
204
- } : n)
206
+ } : r)
205
207
  }
206
208
  }
207
- } : o;
209
+ } : c;
208
210
  });
209
- }, j = (d, w, o) => {
210
- t((i) => {
211
- const n = i.canvases[p];
212
- return n ? {
213
- ...i,
211
+ }, J = (h, w, c) => {
212
+ i((t) => {
213
+ const r = t.canvases[p];
214
+ return r ? {
215
+ ...t,
214
216
  canvases: {
215
- ...i.canvases,
217
+ ...t.canvases,
216
218
  [p]: {
217
- ...n,
218
- nodes: n.nodes.map((h) => h.id === d ? {
219
- ...h,
220
- [w]: o
221
- } : h)
219
+ ...r,
220
+ nodes: r.nodes.map((m) => m.id === h ? {
221
+ ...m,
222
+ [w]: c
223
+ } : m)
222
224
  }
223
225
  }
224
- } : i;
226
+ } : t;
225
227
  });
226
- }, H = (d, w, o) => {
227
- t((i) => {
228
- const n = i.canvases[p];
229
- return n ? {
230
- ...i,
228
+ }, q = (h, w, c) => {
229
+ i((t) => {
230
+ const r = t.canvases[p];
231
+ return r ? {
232
+ ...t,
231
233
  canvases: {
232
- ...i.canvases,
234
+ ...t.canvases,
233
235
  [p]: {
234
- ...n,
235
- edges: n.edges.map((h) => h.id === d ? {
236
- ...h,
236
+ ...r,
237
+ edges: r.edges.map((m) => m.id === h ? {
238
+ ...m,
237
239
  data: {
238
- ...h.data,
239
- [w]: o
240
+ ...m.data,
241
+ [w]: c
240
242
  }
241
- } : h)
243
+ } : m)
242
244
  }
243
245
  }
244
- } : i;
246
+ } : t;
245
247
  });
246
- }, K = (d, w) => {
247
- t((o) => {
248
- const i = o.canvases[p];
249
- return i ? {
250
- ...o,
248
+ }, Q = (h, w) => {
249
+ i((c) => {
250
+ const t = c.canvases[p];
251
+ return t ? {
252
+ ...c,
251
253
  canvases: {
252
- ...o.canvases,
254
+ ...c.canvases,
253
255
  [p]: {
254
- ...i,
255
- nodes: i.nodes.map((n) => n.id === d ? {
256
- ...n,
256
+ ...t,
257
+ nodes: t.nodes.map((r) => r.id === h ? {
258
+ ...r,
257
259
  type: w
258
- } : n)
260
+ } : r)
259
261
  }
260
262
  }
261
- } : o;
263
+ } : c;
262
264
  });
263
- }, V = (d, w) => {
264
- t((o) => {
265
- const i = o.canvases[p];
266
- return i ? {
267
- ...o,
265
+ }, D = (h, w) => {
266
+ i((c) => {
267
+ const t = c.canvases[p];
268
+ return t ? {
269
+ ...c,
268
270
  canvases: {
269
- ...o.canvases,
271
+ ...c.canvases,
270
272
  [p]: {
271
- ...i,
272
- edges: i.edges.map((n) => n.id === d ? {
273
- ...n,
273
+ ...t,
274
+ edges: t.edges.map((r) => r.id === h ? {
275
+ ...r,
274
276
  type: w
275
- } : n)
277
+ } : r)
276
278
  }
277
279
  }
278
- } : o;
280
+ } : c;
279
281
  });
280
- }, J = (d, w, o) => {
281
- t((i) => {
282
- const n = i.canvases[p];
283
- return n ? {
284
- ...i,
282
+ }, U = (h, w, c) => {
283
+ i((t) => {
284
+ const r = t.canvases[p];
285
+ return r ? {
286
+ ...t,
285
287
  canvases: {
286
- ...i.canvases,
288
+ ...t.canvases,
287
289
  [p]: {
288
- ...n,
289
- lines: n.lines.map((h) => h.id === d ? {
290
- ...h,
291
- [w]: o
292
- } : h)
290
+ ...r,
291
+ lines: r.lines.map((m) => m.id === h ? {
292
+ ...m,
293
+ [w]: c
294
+ } : m)
293
295
  }
294
296
  }
295
- } : i;
297
+ } : t;
296
298
  });
297
299
  };
298
- return /* @__PURE__ */ a(L, { children: [
299
- !S && /* @__PURE__ */ e("div", {
300
+ return /* @__PURE__ */ a(F, { children: [
301
+ !k && /* @__PURE__ */ e("div", {
300
302
  style: {
301
303
  fontSize: 12,
302
304
  color: "color-mix(in oklch, var(--color-base-content) 40%, transparent)",
@@ -305,15 +307,15 @@ function he() {
305
307
  },
306
308
  children: "Select an element to inspect"
307
309
  }),
308
- f.length === 1 && /* @__PURE__ */ e(pe, {
310
+ f.length === 1 && /* @__PURE__ */ e(ve, {
309
311
  node: f[0],
310
- isGroup: z,
311
- onUpdateData: y,
312
+ isGroup: C,
313
+ onUpdateData: z,
312
314
  onUpdateDataBatch: W,
313
- onUpdateDimension: j,
314
- onUpdateType: K
315
+ onUpdateDimension: J,
316
+ onUpdateType: Q
315
317
  }),
316
- M > 1 && /* @__PURE__ */ a("div", {
318
+ L > 1 && /* @__PURE__ */ a("div", {
317
319
  className: "flow-inspector-section",
318
320
  children: [
319
321
  /* @__PURE__ */ e("div", {
@@ -342,20 +344,20 @@ function he() {
342
344
  },
343
345
  children: [/* @__PURE__ */ e(g, {
344
346
  size: "xs",
345
- onClick: () => P("flowGroup"),
347
+ onClick: () => B("flowGroup"),
346
348
  block: !0,
347
349
  children: "Group (⌘G)"
348
350
  }), /* @__PURE__ */ e(g, {
349
351
  size: "xs",
350
352
  variant: "ghost",
351
- onClick: () => P("geometryGroup"),
353
+ onClick: () => B("geometryGroup"),
352
354
  block: !0,
353
355
  children: "Geo Group (⌘⌥G)"
354
356
  })]
355
357
  })
356
358
  ]
357
359
  }),
358
- z && /* @__PURE__ */ a("div", {
360
+ C && /* @__PURE__ */ a("div", {
359
361
  className: "flow-inspector-section",
360
362
  children: [
361
363
  /* @__PURE__ */ e("div", {
@@ -373,7 +375,7 @@ function he() {
373
375
  /* @__PURE__ */ e(g, {
374
376
  size: "xs",
375
377
  variant: "ghost",
376
- onClick: _,
378
+ onClick: Y,
377
379
  block: !0,
378
380
  children: "Ungroup (⌘⇧G)"
379
381
  })
@@ -393,7 +395,7 @@ function he() {
393
395
  /* @__PURE__ */ e(g, {
394
396
  size: "xs",
395
397
  variant: "ghost",
396
- onClick: () => G("front"),
398
+ onClick: () => O("front"),
397
399
  children: /* @__PURE__ */ e("span", {
398
400
  title: "Bring to Front (⌘⇧↑)",
399
401
  children: "⤒"
@@ -402,7 +404,7 @@ function he() {
402
404
  /* @__PURE__ */ e(g, {
403
405
  size: "xs",
404
406
  variant: "ghost",
405
- onClick: () => G("up"),
407
+ onClick: () => O("up"),
406
408
  children: /* @__PURE__ */ e("span", {
407
409
  title: "Bring Forward (⌘↑)",
408
410
  children: "↑"
@@ -411,7 +413,7 @@ function he() {
411
413
  /* @__PURE__ */ e(g, {
412
414
  size: "xs",
413
415
  variant: "ghost",
414
- onClick: () => G("down"),
416
+ onClick: () => O("down"),
415
417
  children: /* @__PURE__ */ e("span", {
416
418
  title: "Send Backward (⌘↓)",
417
419
  children: "↓"
@@ -420,7 +422,7 @@ function he() {
420
422
  /* @__PURE__ */ e(g, {
421
423
  size: "xs",
422
424
  variant: "ghost",
423
- onClick: () => G("back"),
425
+ onClick: () => O("back"),
424
426
  children: /* @__PURE__ */ e("span", {
425
427
  title: "Send to Back (⌘⇧↓)",
426
428
  children: "⤓"
@@ -429,14 +431,14 @@ function he() {
429
431
  ]
430
432
  })]
431
433
  }),
432
- s.length === 1 && /* @__PURE__ */ e(ue, {
434
+ s.length === 1 && /* @__PURE__ */ e(ge, {
433
435
  edge: s[0],
434
- onUpdateData: H,
435
- onUpdateType: V
436
+ onUpdateData: q,
437
+ onUpdateType: D
436
438
  }),
437
- u.length === 1 && /* @__PURE__ */ a(L, { children: [/* @__PURE__ */ e(we, {
439
+ u.length === 1 && /* @__PURE__ */ a(F, { children: [/* @__PURE__ */ e(Ne, {
438
440
  line: u[0],
439
- onUpdateData: J
441
+ onUpdateData: U
440
442
  }), /* @__PURE__ */ a("div", {
441
443
  className: "flow-inspector-section",
442
444
  children: [/* @__PURE__ */ e("div", {
@@ -451,7 +453,7 @@ function he() {
451
453
  /* @__PURE__ */ e(g, {
452
454
  size: "xs",
453
455
  variant: "ghost",
454
- onClick: () => O("front"),
456
+ onClick: () => M("front"),
455
457
  children: /* @__PURE__ */ e("span", {
456
458
  title: "Bring to Front",
457
459
  children: "⤒"
@@ -460,7 +462,7 @@ function he() {
460
462
  /* @__PURE__ */ e(g, {
461
463
  size: "xs",
462
464
  variant: "ghost",
463
- onClick: () => O("up"),
465
+ onClick: () => M("up"),
464
466
  children: /* @__PURE__ */ e("span", {
465
467
  title: "Bring Forward",
466
468
  children: "↑"
@@ -469,7 +471,7 @@ function he() {
469
471
  /* @__PURE__ */ e(g, {
470
472
  size: "xs",
471
473
  variant: "ghost",
472
- onClick: () => O("down"),
474
+ onClick: () => M("down"),
473
475
  children: /* @__PURE__ */ e("span", {
474
476
  title: "Send Backward",
475
477
  children: "↓"
@@ -478,7 +480,7 @@ function he() {
478
480
  /* @__PURE__ */ e(g, {
479
481
  size: "xs",
480
482
  variant: "ghost",
481
- onClick: () => O("back"),
483
+ onClick: () => M("back"),
482
484
  children: /* @__PURE__ */ e("span", {
483
485
  title: "Send to Back",
484
486
  children: "⤓"
@@ -489,8 +491,8 @@ function he() {
489
491
  })] })
490
492
  ] });
491
493
  }
492
- function B({ value: l, onChange: c, kind: r, allowTransparent: t, customFallback: p = "#ffffff" }) {
493
- const f = le[r], s = ae(f) ?? "var(--color-base-content)", u = l ?? "", S = u.toLowerCase(), z = se(u), M = u === "transparent", P = R.some((y) => y.value.toLowerCase() === S), _ = u === f, G = !!u && !z && !M && !P, O = G ? u : p;
494
+ function P({ value: l, onChange: d, kind: o, allowTransparent: i, customFallback: p = "#ffffff" }) {
495
+ const f = ie[o], s = ne(f) ?? "var(--color-base-content)", u = l ?? "", k = u.toLowerCase(), C = oe(u), L = u === "transparent", B = Z.some((z) => z.value.toLowerCase() === k), Y = u === f, O = !!u && !C && !L && !B, M = O ? u : p;
494
496
  return /* @__PURE__ */ a("div", {
495
497
  className: "flow-color-field",
496
498
  children: [
@@ -498,42 +500,42 @@ function B({ value: l, onChange: c, kind: r, allowTransparent: t, customFallback
498
500
  type: "button",
499
501
  title: "跟随主题切换",
500
502
  "aria-label": "跟随主题切换",
501
- className: `flow-color-swatch flow-color-swatch--sync${_ ? " is-active" : ""}`,
503
+ className: `flow-color-swatch flow-color-swatch--sync${Y ? " is-active" : ""}`,
502
504
  style: { background: s },
503
- onClick: () => c(f)
505
+ onClick: () => d(f)
504
506
  }),
505
507
  /* @__PURE__ */ e("span", { className: "flow-color-divider" }),
506
- R.map((y) => /* @__PURE__ */ e("button", {
508
+ Z.map((z) => /* @__PURE__ */ e("button", {
507
509
  type: "button",
508
- title: y.label,
509
- "aria-label": y.label,
510
- className: `flow-color-swatch${!z && !M && S === y.value.toLowerCase() ? " is-active" : ""}`,
511
- style: { background: y.value },
512
- onClick: () => c(y.value)
513
- }, y.value)),
510
+ title: z.label,
511
+ "aria-label": z.label,
512
+ className: `flow-color-swatch${!C && !L && k === z.value.toLowerCase() ? " is-active" : ""}`,
513
+ style: { background: z.value },
514
+ onClick: () => d(z.value)
515
+ }, z.value)),
514
516
  /* @__PURE__ */ e("span", { className: "flow-color-divider" }),
515
517
  /* @__PURE__ */ e("label", {
516
- className: `flow-color-swatch flow-color-swatch--custom${G ? " is-active" : ""}`,
518
+ className: `flow-color-swatch flow-color-swatch--custom${O ? " is-active" : ""}`,
517
519
  title: "自定义颜色",
518
- style: G ? { background: u } : void 0,
520
+ style: O ? { background: u } : void 0,
519
521
  children: /* @__PURE__ */ e("input", {
520
522
  type: "color",
521
- value: O,
522
- onChange: (y) => c(y.target.value)
523
+ value: M,
524
+ onChange: (z) => d(z.target.value)
523
525
  })
524
526
  }),
525
- t && /* @__PURE__ */ e("button", {
527
+ i && /* @__PURE__ */ e("button", {
526
528
  type: "button",
527
529
  title: "透明",
528
530
  "aria-label": "透明",
529
- className: `flow-color-swatch flow-color-swatch--transparent${M ? " is-active" : ""}`,
530
- onClick: () => c("transparent")
531
+ className: `flow-color-swatch flow-color-swatch--transparent${L ? " is-active" : ""}`,
532
+ onClick: () => d("transparent")
531
533
  })
532
534
  ]
533
535
  });
534
536
  }
535
- function pe({ node: l, isGroup: c, onUpdateData: r, onUpdateDataBatch: t, onUpdateDimension: p, onUpdateType: f }) {
536
- return /* @__PURE__ */ a(L, { children: [
537
+ function ve({ node: l, isGroup: d, onUpdateData: o, onUpdateDataBatch: i, onUpdateDimension: p, onUpdateType: f }) {
538
+ return /* @__PURE__ */ a(F, { children: [
537
539
  /* @__PURE__ */ a("div", {
538
540
  className: "flow-inspector-section",
539
541
  children: [
@@ -543,24 +545,24 @@ function pe({ node: l, isGroup: c, onUpdateData: r, onUpdateDataBatch: t, onUpda
543
545
  }),
544
546
  /* @__PURE__ */ a("div", {
545
547
  className: "flow-inspector-row",
546
- children: [/* @__PURE__ */ e(m, {
548
+ children: [/* @__PURE__ */ e(n, {
547
549
  size: "xs",
548
550
  className: "flow-inspector-label",
549
551
  children: "Label"
550
- }), /* @__PURE__ */ e(b, {
552
+ }), /* @__PURE__ */ e(v, {
551
553
  size: "xs",
552
554
  value: l.data.label,
553
- onChange: (s) => r(l.id, "label", s.target.value)
555
+ onChange: (s) => o(l.id, "label", s.target.value)
554
556
  })]
555
557
  }),
556
558
  /* @__PURE__ */ a("div", {
557
559
  className: "flow-inspector-row",
558
- children: [/* @__PURE__ */ e(m, {
560
+ children: [/* @__PURE__ */ e(n, {
559
561
  size: "xs",
560
562
  className: "flow-inspector-label",
561
563
  children: "Type"
562
- }), /* @__PURE__ */ e(k, {
563
- options: ce.map((s) => ({
564
+ }), /* @__PURE__ */ e(y, {
565
+ options: pe.map((s) => ({
564
566
  value: s,
565
567
  label: s
566
568
  })),
@@ -580,11 +582,11 @@ function pe({ node: l, isGroup: c, onUpdateData: r, onUpdateDataBatch: t, onUpda
580
582
  }),
581
583
  /* @__PURE__ */ a("div", {
582
584
  className: "flow-inspector-row",
583
- children: [/* @__PURE__ */ e(m, {
585
+ children: [/* @__PURE__ */ e(n, {
584
586
  size: "xs",
585
587
  className: "flow-inspector-label",
586
588
  children: "W"
587
- }), /* @__PURE__ */ e(b, {
589
+ }), /* @__PURE__ */ e(v, {
588
590
  size: "xs",
589
591
  type: "number",
590
592
  value: String(Math.round(l.width * 100) / 100),
@@ -593,11 +595,11 @@ function pe({ node: l, isGroup: c, onUpdateData: r, onUpdateDataBatch: t, onUpda
593
595
  }),
594
596
  /* @__PURE__ */ a("div", {
595
597
  className: "flow-inspector-row",
596
- children: [/* @__PURE__ */ e(m, {
598
+ children: [/* @__PURE__ */ e(n, {
597
599
  size: "xs",
598
600
  className: "flow-inspector-label",
599
601
  children: "H"
600
- }), /* @__PURE__ */ e(b, {
602
+ }), /* @__PURE__ */ e(v, {
601
603
  size: "xs",
602
604
  type: "number",
603
605
  value: String(Math.round(l.height * 100) / 100),
@@ -615,107 +617,185 @@ function pe({ node: l, isGroup: c, onUpdateData: r, onUpdateDataBatch: t, onUpda
615
617
  }),
616
618
  /* @__PURE__ */ a("div", {
617
619
  className: "flow-inspector-row",
618
- children: [/* @__PURE__ */ e(m, {
620
+ children: [/* @__PURE__ */ e(n, {
619
621
  size: "xs",
620
622
  className: "flow-inspector-label",
621
623
  children: "Fill"
622
- }), /* @__PURE__ */ e(B, {
624
+ }), /* @__PURE__ */ e(P, {
623
625
  value: l.data.fill,
624
626
  kind: "fill",
625
627
  allowTransparent: !0,
626
628
  customFallback: "#ffffff",
627
- onChange: (s) => r(l.id, "fill", s)
629
+ onChange: (s) => o(l.id, "fill", s)
628
630
  })]
629
631
  }),
630
632
  /* @__PURE__ */ a("div", {
631
633
  className: "flow-inspector-row",
632
- children: [/* @__PURE__ */ e(m, {
634
+ children: [/* @__PURE__ */ e(n, {
633
635
  size: "xs",
634
636
  className: "flow-inspector-label",
635
637
  children: "Stroke"
636
- }), /* @__PURE__ */ e(B, {
638
+ }), /* @__PURE__ */ e(P, {
637
639
  value: l.data.stroke,
638
640
  kind: "stroke",
639
641
  allowTransparent: !0,
640
642
  customFallback: "#000000",
641
- onChange: (s) => r(l.id, "stroke", s)
643
+ onChange: (s) => o(l.id, "stroke", s)
642
644
  })]
643
645
  }),
644
646
  /* @__PURE__ */ a("div", {
645
647
  className: "flow-inspector-row",
646
- children: [/* @__PURE__ */ e(m, {
648
+ children: [/* @__PURE__ */ e(n, {
647
649
  size: "xs",
648
650
  className: "flow-inspector-label",
649
651
  children: "Font"
650
- }), /* @__PURE__ */ e(b, {
652
+ }), /* @__PURE__ */ e(v, {
651
653
  size: "xs",
652
654
  type: "number",
653
655
  value: String(l.data.fontSize),
654
- onChange: (s) => r(l.id, "fontSize", Number(s.target.value) || 14)
656
+ onChange: (s) => o(l.id, "fontSize", Number(s.target.value) || 14)
655
657
  })]
656
658
  }),
657
659
  /* @__PURE__ */ a("div", {
658
660
  className: "flow-inspector-row",
659
- children: [/* @__PURE__ */ e(m, {
661
+ children: [/* @__PURE__ */ e(n, {
660
662
  size: "xs",
661
663
  className: "flow-inspector-label",
662
664
  children: "Color"
663
- }), /* @__PURE__ */ e(B, {
665
+ }), /* @__PURE__ */ e(P, {
664
666
  value: l.data.color,
665
667
  kind: "text",
666
668
  customFallback: "#111827",
667
- onChange: (s) => r(l.id, "color", s)
669
+ onChange: (s) => o(l.id, "color", s)
668
670
  })]
669
671
  }),
670
672
  /* @__PURE__ */ a("div", {
671
673
  className: "flow-inspector-row",
672
- children: [/* @__PURE__ */ e(m, {
674
+ children: [/* @__PURE__ */ e(n, {
673
675
  size: "xs",
674
676
  className: "flow-inspector-label",
675
677
  children: "Font Color"
676
- }), /* @__PURE__ */ e(B, {
678
+ }), /* @__PURE__ */ e(P, {
677
679
  value: l.data.labelColor ?? l.data.color,
678
680
  kind: "text",
679
681
  customFallback: "#111827",
680
- onChange: (s) => r(l.id, "labelColor", s)
682
+ onChange: (s) => o(l.id, "labelColor", s)
681
683
  })]
682
684
  }),
685
+ l.type !== "shapeSvg" && l.type !== "mediaNode" && /* @__PURE__ */ a(F, { children: [
686
+ /* @__PURE__ */ a("div", {
687
+ className: "flow-inspector-row",
688
+ children: [/* @__PURE__ */ e(n, {
689
+ size: "xs",
690
+ className: "flow-inspector-label",
691
+ children: "Text Pos"
692
+ }), /* @__PURE__ */ e(y, {
693
+ options: [
694
+ {
695
+ value: "center",
696
+ label: "center"
697
+ },
698
+ {
699
+ value: "top",
700
+ label: "top"
701
+ },
702
+ {
703
+ value: "bottom",
704
+ label: "bottom"
705
+ },
706
+ {
707
+ value: "left",
708
+ label: "left"
709
+ },
710
+ {
711
+ value: "right",
712
+ label: "right"
713
+ },
714
+ {
715
+ value: "top-left",
716
+ label: "top-left"
717
+ },
718
+ {
719
+ value: "top-right",
720
+ label: "top-right"
721
+ },
722
+ {
723
+ value: "bottom-left",
724
+ label: "bottom-left"
725
+ },
726
+ {
727
+ value: "bottom-right",
728
+ label: "bottom-right"
729
+ }
730
+ ],
731
+ value: l.data.textPlacement ?? (d || l.type === "animAnchor" ? "top" : "center"),
732
+ onChange: (s) => o(l.id, "textPlacement", s),
733
+ style: { fontSize: 12 }
734
+ })]
735
+ }),
736
+ /* @__PURE__ */ a("div", {
737
+ className: "flow-inspector-row",
738
+ children: [/* @__PURE__ */ e(n, {
739
+ size: "xs",
740
+ className: "flow-inspector-label",
741
+ children: "Text Off X"
742
+ }), /* @__PURE__ */ e(v, {
743
+ size: "xs",
744
+ type: "number",
745
+ value: String(l.data.labelOffsetX ?? 0),
746
+ onChange: (s) => o(l.id, "labelOffsetX", Number(s.target.value) || 0)
747
+ })]
748
+ }),
749
+ /* @__PURE__ */ a("div", {
750
+ className: "flow-inspector-row",
751
+ children: [/* @__PURE__ */ e(n, {
752
+ size: "xs",
753
+ className: "flow-inspector-label",
754
+ children: "Text Off Y"
755
+ }), /* @__PURE__ */ e(v, {
756
+ size: "xs",
757
+ type: "number",
758
+ value: String(l.data.labelOffsetY ?? 0),
759
+ onChange: (s) => o(l.id, "labelOffsetY", Number(s.target.value) || 0)
760
+ })]
761
+ })
762
+ ] }),
683
763
  /* @__PURE__ */ a("div", {
684
764
  className: "flow-inspector-row",
685
- children: [/* @__PURE__ */ e(m, {
765
+ children: [/* @__PURE__ */ e(n, {
686
766
  size: "xs",
687
767
  className: "flow-inspector-label",
688
768
  children: "Border"
689
- }), /* @__PURE__ */ e(k, {
769
+ }), /* @__PURE__ */ e(y, {
690
770
  options: [{
691
771
  value: "none",
692
772
  label: "none"
693
- }, ...q.map((s) => ({
773
+ }, ...ee.map((s) => ({
694
774
  value: s,
695
775
  label: s
696
776
  }))],
697
- value: l.data.borderStyle ?? (c ? l.type === "geometryGroup" ? "dashed" : "dotted" : "solid"),
698
- onChange: (s) => r(l.id, "borderStyle", s),
777
+ value: l.data.borderStyle ?? (d ? l.type === "geometryGroup" ? "dashed" : "dotted" : "solid"),
778
+ onChange: (s) => o(l.id, "borderStyle", s),
699
779
  style: { fontSize: 12 }
700
780
  })]
701
781
  }),
702
- l.type === "shapeSvg" && /* @__PURE__ */ a(L, { children: [
782
+ l.type === "shapeSvg" && /* @__PURE__ */ a(F, { children: [
703
783
  /* @__PURE__ */ a("div", {
704
784
  className: "flow-inspector-row",
705
- children: [/* @__PURE__ */ e(m, {
785
+ children: [/* @__PURE__ */ e(n, {
706
786
  size: "xs",
707
787
  className: "flow-inspector-label",
708
788
  children: "Icon"
709
- }), /* @__PURE__ */ e(k, {
710
- options: te().map((s) => ({
789
+ }), /* @__PURE__ */ e(y, {
790
+ options: ce().map((s) => ({
711
791
  value: s.id,
712
792
  label: s.label
713
793
  })),
714
794
  value: l.data.svgId ?? "",
715
795
  placeholder: "选择图标",
716
796
  onChange: (s) => {
717
- const u = ne(String(s));
718
- t(l.id, {
797
+ const u = de(String(s));
798
+ i(l.id, {
719
799
  svgId: s,
720
800
  ...u?.brandColor ? { color: u.brandColor } : {},
721
801
  ...!l.data.label || l.data.label === "Text" ? { label: u?.label ?? String(s) } : {}
@@ -726,24 +806,24 @@ function pe({ node: l, isGroup: c, onUpdateData: r, onUpdateDataBatch: t, onUpda
726
806
  }),
727
807
  /* @__PURE__ */ a("div", {
728
808
  className: "flow-inspector-row",
729
- children: [/* @__PURE__ */ e(m, {
809
+ children: [/* @__PURE__ */ e(n, {
730
810
  size: "xs",
731
811
  className: "flow-inspector-label",
732
812
  children: "Box"
733
- }), /* @__PURE__ */ e(X, {
813
+ }), /* @__PURE__ */ e(K, {
734
814
  size: "sm",
735
815
  checked: l.data.iconBox ?? !1,
736
- onChange: (s) => r(l.id, "iconBox", s),
816
+ onChange: (s) => o(l.id, "iconBox", s),
737
817
  label: "显示边框"
738
818
  })]
739
819
  }),
740
820
  /* @__PURE__ */ a("div", {
741
821
  className: "flow-inspector-row",
742
- children: [/* @__PURE__ */ e(m, {
822
+ children: [/* @__PURE__ */ e(n, {
743
823
  size: "xs",
744
824
  className: "flow-inspector-label",
745
825
  children: "Label"
746
- }), /* @__PURE__ */ e(k, {
826
+ }), /* @__PURE__ */ e(y, {
747
827
  options: [
748
828
  {
749
829
  value: "top",
@@ -767,42 +847,195 @@ function pe({ node: l, isGroup: c, onUpdateData: r, onUpdateDataBatch: t, onUpda
767
847
  }
768
848
  ],
769
849
  value: l.data.labelPlacement === "above" ? "top" : l.data.labelPlacement === "center" ? "middle" : l.data.labelPlacement === "below" ? "bottom" : l.data.labelPlacement ?? "bottom",
770
- onChange: (s) => r(l.id, "labelPlacement", s),
850
+ onChange: (s) => o(l.id, "labelPlacement", s),
771
851
  style: { fontSize: 12 }
772
852
  })]
773
853
  }),
774
854
  /* @__PURE__ */ a("div", {
775
855
  className: "flow-inspector-row",
776
- children: [/* @__PURE__ */ e(m, {
856
+ children: [/* @__PURE__ */ e(n, {
777
857
  size: "xs",
778
858
  className: "flow-inspector-label",
779
859
  children: "Offset X"
780
- }), /* @__PURE__ */ e(b, {
860
+ }), /* @__PURE__ */ e(v, {
781
861
  size: "xs",
782
862
  type: "number",
783
863
  value: String(l.data.labelOffsetX ?? 0),
784
- onChange: (s) => r(l.id, "labelOffsetX", Number(s.target.value) || 0)
864
+ onChange: (s) => o(l.id, "labelOffsetX", Number(s.target.value) || 0)
785
865
  })]
786
866
  }),
787
867
  /* @__PURE__ */ a("div", {
788
868
  className: "flow-inspector-row",
789
- children: [/* @__PURE__ */ e(m, {
869
+ children: [/* @__PURE__ */ e(n, {
790
870
  size: "xs",
791
871
  className: "flow-inspector-label",
792
872
  children: "Offset Y"
793
- }), /* @__PURE__ */ e(b, {
873
+ }), /* @__PURE__ */ e(v, {
794
874
  size: "xs",
795
875
  type: "number",
796
876
  value: String(l.data.labelOffsetY ?? 0),
797
- onChange: (s) => r(l.id, "labelOffsetY", Number(s.target.value) || 0)
877
+ onChange: (s) => o(l.id, "labelOffsetY", Number(s.target.value) || 0)
798
878
  })]
799
879
  })
800
880
  ] })
801
881
  ]
802
882
  }),
803
- l.type === "mediaNode" && /* @__PURE__ */ e(fe, {
883
+ l.type === "mediaNode" && /* @__PURE__ */ a("div", {
884
+ className: "flow-inspector-section",
885
+ children: [/* @__PURE__ */ e("div", {
886
+ className: "flow-inspector-section-title",
887
+ children: "Palette (Archify)"
888
+ }), /* @__PURE__ */ a("div", {
889
+ className: "flow-inspector-row",
890
+ children: [/* @__PURE__ */ e(n, {
891
+ size: "xs",
892
+ className: "flow-inspector-label",
893
+ children: "Palette"
894
+ }), /* @__PURE__ */ e("div", {
895
+ style: {
896
+ display: "flex",
897
+ flexWrap: "wrap",
898
+ gap: 4
899
+ },
900
+ children: $.map((s) => /* @__PURE__ */ e("button", {
901
+ type: "button",
902
+ title: A[s],
903
+ "aria-label": A[s],
904
+ onClick: () => i(l.id, H(s)),
905
+ style: {
906
+ width: 18,
907
+ height: 18,
908
+ borderRadius: 4,
909
+ cursor: "pointer",
910
+ background: _[s].fill,
911
+ border: `1.5px solid ${_[s].stroke}`
912
+ }
913
+ }, s))
914
+ })]
915
+ })]
916
+ }),
917
+ l.type !== "mediaNode" && /* @__PURE__ */ a("div", {
918
+ className: "flow-inspector-section",
919
+ children: [
920
+ /* @__PURE__ */ e("div", {
921
+ className: "flow-inspector-section-title",
922
+ children: "Card (Archify)"
923
+ }),
924
+ /* @__PURE__ */ a("div", {
925
+ className: "flow-inspector-row",
926
+ children: [/* @__PURE__ */ e(n, {
927
+ size: "xs",
928
+ className: "flow-inspector-label",
929
+ children: "Subtitle"
930
+ }), /* @__PURE__ */ e(v, {
931
+ size: "xs",
932
+ value: l.data.sublabel ?? "",
933
+ placeholder: "secondary line",
934
+ onChange: (s) => o(l.id, "sublabel", s.target.value)
935
+ })]
936
+ }),
937
+ /* @__PURE__ */ a("div", {
938
+ className: "flow-inspector-row",
939
+ children: [/* @__PURE__ */ e(n, {
940
+ size: "xs",
941
+ className: "flow-inspector-label",
942
+ children: "Sub Color"
943
+ }), /* @__PURE__ */ e(P, {
944
+ value: l.data.sublabelColor ?? "#94a3b8",
945
+ kind: "text",
946
+ customFallback: "#94a3b8",
947
+ onChange: (s) => o(l.id, "sublabelColor", s)
948
+ })]
949
+ }),
950
+ /* @__PURE__ */ a("div", {
951
+ className: "flow-inspector-row",
952
+ children: [/* @__PURE__ */ e(n, {
953
+ size: "xs",
954
+ className: "flow-inspector-label",
955
+ children: "Tag"
956
+ }), /* @__PURE__ */ e(v, {
957
+ size: "xs",
958
+ value: l.data.tag ?? "",
959
+ placeholder: "corner pill",
960
+ onChange: (s) => o(l.id, "tag", s.target.value)
961
+ })]
962
+ }),
963
+ /* @__PURE__ */ a("div", {
964
+ className: "flow-inspector-row",
965
+ children: [/* @__PURE__ */ e(n, {
966
+ size: "xs",
967
+ className: "flow-inspector-label",
968
+ children: "Tag Color"
969
+ }), /* @__PURE__ */ e(P, {
970
+ value: l.data.tagColor ?? l.data.stroke,
971
+ kind: "stroke",
972
+ customFallback: "#334155",
973
+ onChange: (s) => o(l.id, "tagColor", s)
974
+ })]
975
+ }),
976
+ /* @__PURE__ */ a("div", {
977
+ className: "flow-inspector-row",
978
+ children: [/* @__PURE__ */ e(n, {
979
+ size: "xs",
980
+ className: "flow-inspector-label",
981
+ children: "Tag Pos"
982
+ }), /* @__PURE__ */ e(y, {
983
+ options: [
984
+ {
985
+ value: "top-left",
986
+ label: "top-left"
987
+ },
988
+ {
989
+ value: "top-right",
990
+ label: "top-right"
991
+ },
992
+ {
993
+ value: "bottom-left",
994
+ label: "bottom-left"
995
+ },
996
+ {
997
+ value: "bottom-right",
998
+ label: "bottom-right"
999
+ }
1000
+ ],
1001
+ value: l.data.tagPlacement ?? "top-right",
1002
+ onChange: (s) => o(l.id, "tagPlacement", s),
1003
+ style: { fontSize: 12 }
1004
+ })]
1005
+ }),
1006
+ /* @__PURE__ */ a("div", {
1007
+ className: "flow-inspector-row",
1008
+ children: [/* @__PURE__ */ e(n, {
1009
+ size: "xs",
1010
+ className: "flow-inspector-label",
1011
+ children: "Palette"
1012
+ }), /* @__PURE__ */ e("div", {
1013
+ style: {
1014
+ display: "flex",
1015
+ flexWrap: "wrap",
1016
+ gap: 4
1017
+ },
1018
+ children: $.map((s) => /* @__PURE__ */ e("button", {
1019
+ type: "button",
1020
+ title: A[s],
1021
+ "aria-label": A[s],
1022
+ onClick: () => i(l.id, H(s)),
1023
+ style: {
1024
+ width: 18,
1025
+ height: 18,
1026
+ borderRadius: 4,
1027
+ cursor: "pointer",
1028
+ background: _[s].fill,
1029
+ border: `1.5px solid ${_[s].stroke}`
1030
+ }
1031
+ }, s))
1032
+ })]
1033
+ })
1034
+ ]
1035
+ }),
1036
+ l.type === "mediaNode" && /* @__PURE__ */ e(be, {
804
1037
  node: l,
805
- onUpdateData: r
1038
+ onUpdateData: o
806
1039
  }),
807
1040
  /* @__PURE__ */ a("div", {
808
1041
  className: "flow-inspector-section",
@@ -814,16 +1047,16 @@ function pe({ node: l, isGroup: c, onUpdateData: r, onUpdateDataBatch: t, onUpda
814
1047
  /* @__PURE__ */ a("div", {
815
1048
  className: "flow-inspector-row",
816
1049
  children: [
817
- /* @__PURE__ */ e(m, {
1050
+ /* @__PURE__ */ e(n, {
818
1051
  size: "xs",
819
1052
  className: "flow-inspector-label",
820
1053
  children: "Rotate"
821
1054
  }),
822
- /* @__PURE__ */ e(b, {
1055
+ /* @__PURE__ */ e(v, {
823
1056
  size: "xs",
824
1057
  type: "number",
825
1058
  value: String(l.data.rotation ?? 0),
826
- onChange: (s) => r(l.id, "rotation", Number(s.target.value) || 0)
1059
+ onChange: (s) => o(l.id, "rotation", Number(s.target.value) || 0)
827
1060
  }),
828
1061
  /* @__PURE__ */ e("span", {
829
1062
  className: "flow-inspector-suffix",
@@ -838,7 +1071,7 @@ function pe({ node: l, isGroup: c, onUpdateData: r, onUpdateDataBatch: t, onUpda
838
1071
  /* @__PURE__ */ a("div", {
839
1072
  className: "flow-inspector-row",
840
1073
  children: [
841
- /* @__PURE__ */ e(m, {
1074
+ /* @__PURE__ */ e(n, {
842
1075
  size: "xs",
843
1076
  className: "flow-inspector-label",
844
1077
  children: "Flip"
@@ -846,7 +1079,7 @@ function pe({ node: l, isGroup: c, onUpdateData: r, onUpdateDataBatch: t, onUpda
846
1079
  /* @__PURE__ */ e(g, {
847
1080
  size: "xs",
848
1081
  variant: l.data.flipX ? "primary" : "ghost",
849
- onClick: () => r(l.id, "flipX", !l.data.flipX),
1082
+ onClick: () => o(l.id, "flipX", !l.data.flipX),
850
1083
  square: !0,
851
1084
  children: /* @__PURE__ */ e("span", {
852
1085
  title: "Flip Horizontal",
@@ -856,7 +1089,7 @@ function pe({ node: l, isGroup: c, onUpdateData: r, onUpdateDataBatch: t, onUpda
856
1089
  /* @__PURE__ */ e(g, {
857
1090
  size: "xs",
858
1091
  variant: l.data.flipY ? "primary" : "ghost",
859
- onClick: () => r(l.id, "flipY", !l.data.flipY),
1092
+ onClick: () => o(l.id, "flipY", !l.data.flipY),
860
1093
  square: !0,
861
1094
  children: /* @__PURE__ */ e("span", {
862
1095
  title: "Flip Vertical",
@@ -868,7 +1101,7 @@ function pe({ node: l, isGroup: c, onUpdateData: r, onUpdateDataBatch: t, onUpda
868
1101
  /* @__PURE__ */ a("div", {
869
1102
  className: "flow-inspector-row",
870
1103
  children: [
871
- /* @__PURE__ */ e(m, {
1104
+ /* @__PURE__ */ e(n, {
872
1105
  size: "xs",
873
1106
  className: "flow-inspector-label",
874
1107
  children: "Quick"
@@ -876,13 +1109,13 @@ function pe({ node: l, isGroup: c, onUpdateData: r, onUpdateDataBatch: t, onUpda
876
1109
  /* @__PURE__ */ e(g, {
877
1110
  size: "xs",
878
1111
  variant: "ghost",
879
- onClick: () => r(l.id, "rotation", ((l.data.rotation ?? 0) + 90) % 360),
1112
+ onClick: () => o(l.id, "rotation", ((l.data.rotation ?? 0) + 90) % 360),
880
1113
  children: "+90°"
881
1114
  }),
882
1115
  /* @__PURE__ */ e(g, {
883
1116
  size: "xs",
884
1117
  variant: "ghost",
885
- onClick: () => r(l.id, "rotation", ((l.data.rotation ?? 0) - 90 + 360) % 360),
1118
+ onClick: () => o(l.id, "rotation", ((l.data.rotation ?? 0) - 90 + 360) % 360),
886
1119
  children: "−90°"
887
1120
  })
888
1121
  ]
@@ -891,13 +1124,13 @@ function pe({ node: l, isGroup: c, onUpdateData: r, onUpdateDataBatch: t, onUpda
891
1124
  })
892
1125
  ] });
893
1126
  }
894
- function fe({ node: l, onUpdateData: c }) {
895
- const r = l.data.mediaKind ?? "markdown", t = l.data.aiConfig, p = me(null), f = (s, u) => {
896
- c(l.id, "aiConfig", {
1127
+ function be({ node: l, onUpdateData: d }) {
1128
+ const o = l.data.mediaKind ?? "markdown", i = l.data.aiConfig, p = ue(null), f = (s, u) => {
1129
+ d(l.id, "aiConfig", {
897
1130
  gateway: "",
898
1131
  protocol: "openai",
899
1132
  model: "",
900
- ...t,
1133
+ ...i,
901
1134
  [s]: u
902
1135
  });
903
1136
  };
@@ -905,18 +1138,18 @@ function fe({ node: l, onUpdateData: c }) {
905
1138
  className: "flow-inspector-section",
906
1139
  children: [/* @__PURE__ */ a("div", {
907
1140
  className: "flow-inspector-section-title",
908
- children: ["Media · ", r]
909
- }), r === "data" ? /* @__PURE__ */ e(de, {
1141
+ children: ["Media · ", o]
1142
+ }), o === "data" ? /* @__PURE__ */ e(fe, {
910
1143
  node: l,
911
- onUpdateData: c
912
- }) : r === "model3d" ? /* @__PURE__ */ a(L, { children: [
1144
+ onUpdateData: d
1145
+ }) : o === "model3d" ? /* @__PURE__ */ a(F, { children: [
913
1146
  /* @__PURE__ */ a("div", {
914
1147
  className: "flow-inspector-row",
915
- children: [/* @__PURE__ */ e(m, {
1148
+ children: [/* @__PURE__ */ e(n, {
916
1149
  size: "xs",
917
1150
  className: "flow-inspector-label",
918
1151
  children: "格式"
919
- }), /* @__PURE__ */ e(k, {
1152
+ }), /* @__PURE__ */ e(y, {
920
1153
  options: [
921
1154
  {
922
1155
  value: "stl",
@@ -932,26 +1165,26 @@ function fe({ node: l, onUpdateData: c }) {
932
1165
  }
933
1166
  ],
934
1167
  value: l.data.modelFormat ?? "stl",
935
- onChange: (s) => c(l.id, "modelFormat", s)
1168
+ onChange: (s) => d(l.id, "modelFormat", s)
936
1169
  })]
937
1170
  }),
938
1171
  /* @__PURE__ */ a("div", {
939
1172
  className: "flow-inspector-row flow-inspector-multiline",
940
- children: [/* @__PURE__ */ e(m, {
1173
+ children: [/* @__PURE__ */ e(n, {
941
1174
  size: "xs",
942
1175
  className: "flow-inspector-label",
943
1176
  children: "模型链接"
944
- }), /* @__PURE__ */ e(b, {
1177
+ }), /* @__PURE__ */ e(v, {
945
1178
  size: "xs",
946
1179
  value: l.data.mediaContent ?? "",
947
1180
  placeholder: "https://example.com/model.stl",
948
- onChange: (s) => c(l.id, "mediaContent", s.target.value)
1181
+ onChange: (s) => d(l.id, "mediaContent", s.target.value)
949
1182
  })]
950
1183
  }),
951
1184
  /* @__PURE__ */ a("div", {
952
1185
  className: "flow-inspector-row",
953
1186
  children: [
954
- /* @__PURE__ */ e(m, {
1187
+ /* @__PURE__ */ e(n, {
955
1188
  size: "xs",
956
1189
  className: "flow-inspector-label",
957
1190
  children: "本地模型"
@@ -968,15 +1201,15 @@ function fe({ node: l, onUpdateData: c }) {
968
1201
  window.alert("本地模型不能超过 10 MiB,请改用模型链接。");
969
1202
  return;
970
1203
  }
971
- const S = u.name.split(".").pop()?.toLowerCase();
972
- if (S !== "stl" && S !== "obj" && S !== "3mf") {
1204
+ const k = u.name.split(".").pop()?.toLowerCase();
1205
+ if (k !== "stl" && k !== "obj" && k !== "3mf") {
973
1206
  window.alert("仅支持 STL、OBJ 和 3MF 模型。");
974
1207
  return;
975
1208
  }
976
- const z = new FileReader();
977
- z.onload = () => {
978
- typeof z.result == "string" && (c(l.id, "modelFormat", S), c(l.id, "mediaContent", z.result));
979
- }, z.onerror = () => window.alert("读取本地模型失败。"), z.readAsDataURL(u);
1209
+ const C = new FileReader();
1210
+ C.onload = () => {
1211
+ typeof C.result == "string" && (d(l.id, "modelFormat", k), d(l.id, "mediaContent", C.result));
1212
+ }, C.onerror = () => window.alert("读取本地模型失败。"), C.readAsDataURL(u);
980
1213
  }
981
1214
  }),
982
1215
  /* @__PURE__ */ e(g, {
@@ -995,39 +1228,39 @@ function fe({ node: l, onUpdateData: c }) {
995
1228
  className: "flow-inspector-help",
996
1229
  children: "支持 STL、OBJ、3MF;本地文件将以 Base64 嵌入文档,最大 10 MiB。选中节点后可在内部拖拽旋转、滚轮缩放。"
997
1230
  })
998
- ] }) : r === "image" ? /* @__PURE__ */ a(L, { children: [/* @__PURE__ */ a("div", {
1231
+ ] }) : o === "image" ? /* @__PURE__ */ a(F, { children: [/* @__PURE__ */ a("div", {
999
1232
  className: "flow-inspector-row flow-inspector-multiline",
1000
- children: [/* @__PURE__ */ e(m, {
1233
+ children: [/* @__PURE__ */ e(n, {
1001
1234
  size: "xs",
1002
1235
  className: "flow-inspector-label",
1003
1236
  children: "图片链接"
1004
- }), /* @__PURE__ */ e(b, {
1237
+ }), /* @__PURE__ */ e(v, {
1005
1238
  size: "xs",
1006
1239
  value: l.data.mediaContent ?? "",
1007
1240
  placeholder: "https://example.com/image.png",
1008
- onChange: (s) => c(l.id, "mediaContent", s.target.value)
1241
+ onChange: (s) => d(l.id, "mediaContent", s.target.value)
1009
1242
  })]
1010
1243
  }), /* @__PURE__ */ e("div", {
1011
1244
  className: "flow-inspector-help",
1012
1245
  children: "支持 HTTP(S) 链接;选中图片节点后可直接粘贴图片并保存为 Base64。"
1013
- })] }) : r !== "ai" ? /* @__PURE__ */ e(Z, {
1246
+ })] }) : o !== "ai" ? /* @__PURE__ */ e(j, {
1014
1247
  label: {
1015
1248
  markdown: "Markdown 源码",
1016
1249
  html: "HTML 源码",
1017
1250
  mermaid: "Mermaid 图表",
1018
1251
  math: "LaTeX 公式"
1019
- }[r] ?? "内容",
1252
+ }[o] ?? "内容",
1020
1253
  value: l.data.mediaContent ?? "",
1021
- onChange: (s) => c(l.id, "mediaContent", s),
1254
+ onChange: (s) => d(l.id, "mediaContent", s),
1022
1255
  rows: 8
1023
- }) : /* @__PURE__ */ a(L, { children: [
1256
+ }) : /* @__PURE__ */ a(F, { children: [
1024
1257
  /* @__PURE__ */ a("div", {
1025
1258
  className: "flow-inspector-row",
1026
- children: [/* @__PURE__ */ e(m, {
1259
+ children: [/* @__PURE__ */ e(n, {
1027
1260
  size: "xs",
1028
1261
  className: "flow-inspector-label",
1029
1262
  children: "协议"
1030
- }), /* @__PURE__ */ e(k, {
1263
+ }), /* @__PURE__ */ e(y, {
1031
1264
  options: [{
1032
1265
  value: "openai",
1033
1266
  label: "OpenAI 兼容"
@@ -1035,7 +1268,7 @@ function fe({ node: l, onUpdateData: c }) {
1035
1268
  value: "anthropic",
1036
1269
  label: "Anthropic 兼容"
1037
1270
  }],
1038
- value: t?.protocol ?? "openai",
1271
+ value: i?.protocol ?? "openai",
1039
1272
  onChange: (s) => f("protocol", s),
1040
1273
  style: { fontSize: 12 }
1041
1274
  })]
@@ -1047,13 +1280,13 @@ function fe({ node: l, onUpdateData: c }) {
1047
1280
  alignItems: "stretch",
1048
1281
  gap: 4
1049
1282
  },
1050
- children: [/* @__PURE__ */ e(m, {
1283
+ children: [/* @__PURE__ */ e(n, {
1051
1284
  size: "xs",
1052
1285
  className: "flow-inspector-label",
1053
1286
  children: "接口地址"
1054
- }), /* @__PURE__ */ e(b, {
1287
+ }), /* @__PURE__ */ e(v, {
1055
1288
  size: "xs",
1056
- value: t?.gateway ?? "",
1289
+ value: i?.gateway ?? "",
1057
1290
  placeholder: "https://api.openai.com/v1/chat/completions",
1058
1291
  onChange: (s) => f("gateway", s.target.value)
1059
1292
  })]
@@ -1065,13 +1298,13 @@ function fe({ node: l, onUpdateData: c }) {
1065
1298
  alignItems: "stretch",
1066
1299
  gap: 4
1067
1300
  },
1068
- children: [/* @__PURE__ */ e(m, {
1301
+ children: [/* @__PURE__ */ e(n, {
1069
1302
  size: "xs",
1070
1303
  className: "flow-inspector-label",
1071
1304
  children: "模型"
1072
- }), /* @__PURE__ */ e(b, {
1305
+ }), /* @__PURE__ */ e(v, {
1073
1306
  size: "xs",
1074
- value: t?.model ?? "",
1307
+ value: i?.model ?? "",
1075
1308
  placeholder: "gpt-4o-mini",
1076
1309
  onChange: (s) => f("model", s.target.value)
1077
1310
  })]
@@ -1083,21 +1316,21 @@ function fe({ node: l, onUpdateData: c }) {
1083
1316
  alignItems: "stretch",
1084
1317
  gap: 4
1085
1318
  },
1086
- children: [/* @__PURE__ */ e(m, {
1319
+ children: [/* @__PURE__ */ e(n, {
1087
1320
  size: "xs",
1088
1321
  className: "flow-inspector-label",
1089
1322
  children: "API Key"
1090
- }), /* @__PURE__ */ e(b, {
1323
+ }), /* @__PURE__ */ e(v, {
1091
1324
  size: "xs",
1092
1325
  type: "password",
1093
- value: t?.apiKey ?? "",
1326
+ value: i?.apiKey ?? "",
1094
1327
  placeholder: "sk-...",
1095
1328
  onChange: (s) => f("apiKey", s.target.value)
1096
1329
  })]
1097
1330
  }),
1098
- /* @__PURE__ */ e(Z, {
1331
+ /* @__PURE__ */ e(j, {
1099
1332
  label: "System Prompt",
1100
- value: t?.systemPrompt ?? "",
1333
+ value: i?.systemPrompt ?? "",
1101
1334
  onChange: (s) => f("systemPrompt", s),
1102
1335
  rows: 3
1103
1336
  }),
@@ -1112,7 +1345,7 @@ function fe({ node: l, onUpdateData: c }) {
1112
1345
  ] })]
1113
1346
  });
1114
1347
  }
1115
- function ue({ edge: l, onUpdateData: c, onUpdateType: r }) {
1348
+ function ge({ edge: l, onUpdateData: d, onUpdateType: o }) {
1116
1349
  return /* @__PURE__ */ a("div", {
1117
1350
  className: "flow-inspector-section",
1118
1351
  children: [
@@ -1122,124 +1355,124 @@ function ue({ edge: l, onUpdateData: c, onUpdateType: r }) {
1122
1355
  }),
1123
1356
  /* @__PURE__ */ a("div", {
1124
1357
  className: "flow-inspector-row",
1125
- children: [/* @__PURE__ */ e(m, {
1358
+ children: [/* @__PURE__ */ e(n, {
1126
1359
  size: "xs",
1127
1360
  className: "flow-inspector-label",
1128
1361
  children: "Type"
1129
- }), /* @__PURE__ */ e(k, {
1130
- options: D.map((t) => ({
1131
- value: t,
1132
- label: t
1362
+ }), /* @__PURE__ */ e(y, {
1363
+ options: se.map((i) => ({
1364
+ value: i,
1365
+ label: i
1133
1366
  })),
1134
1367
  value: l.type,
1135
- onChange: (t) => r(l.id, t),
1368
+ onChange: (i) => o(l.id, i),
1136
1369
  style: { fontSize: 12 }
1137
1370
  })]
1138
1371
  }),
1139
1372
  /* @__PURE__ */ a("div", {
1140
1373
  className: "flow-inspector-row",
1141
- children: [/* @__PURE__ */ e(m, {
1374
+ children: [/* @__PURE__ */ e(n, {
1142
1375
  size: "xs",
1143
1376
  className: "flow-inspector-label",
1144
1377
  children: "Color"
1145
- }), /* @__PURE__ */ e(B, {
1378
+ }), /* @__PURE__ */ e(P, {
1146
1379
  value: l.data.strokeColor,
1147
1380
  kind: "line",
1148
1381
  customFallback: "#374151",
1149
- onChange: (t) => c(l.id, "strokeColor", t)
1382
+ onChange: (i) => d(l.id, "strokeColor", i)
1150
1383
  })]
1151
1384
  }),
1152
1385
  /* @__PURE__ */ a("div", {
1153
1386
  className: "flow-inspector-row",
1154
- children: [/* @__PURE__ */ e(m, {
1387
+ children: [/* @__PURE__ */ e(n, {
1155
1388
  size: "xs",
1156
1389
  className: "flow-inspector-label",
1157
1390
  children: "Width"
1158
- }), /* @__PURE__ */ e(b, {
1391
+ }), /* @__PURE__ */ e(v, {
1159
1392
  size: "xs",
1160
1393
  type: "number",
1161
1394
  value: String(l.data.strokeWidth ?? 2),
1162
- onChange: (t) => c(l.id, "strokeWidth", Number(t.target.value) || 2)
1395
+ onChange: (i) => d(l.id, "strokeWidth", Number(i.target.value) || 2)
1163
1396
  })]
1164
1397
  }),
1165
1398
  /* @__PURE__ */ a("div", {
1166
1399
  className: "flow-inspector-row",
1167
- children: [/* @__PURE__ */ e(m, {
1400
+ children: [/* @__PURE__ */ e(n, {
1168
1401
  size: "xs",
1169
1402
  className: "flow-inspector-label",
1170
1403
  children: "Animation"
1171
- }), /* @__PURE__ */ e(X, {
1404
+ }), /* @__PURE__ */ e(K, {
1172
1405
  size: "sm",
1173
1406
  checked: l.data.animated ?? !1,
1174
- onChange: (t) => c(l.id, "animated", t),
1407
+ onChange: (i) => d(l.id, "animated", i),
1175
1408
  label: "预览时播放"
1176
1409
  })]
1177
1410
  }),
1178
1411
  /* @__PURE__ */ a("div", {
1179
1412
  className: "flow-inspector-row",
1180
- children: [/* @__PURE__ */ e(m, {
1413
+ children: [/* @__PURE__ */ e(n, {
1181
1414
  size: "xs",
1182
1415
  className: "flow-inspector-label",
1183
1416
  children: "Line"
1184
- }), /* @__PURE__ */ e(k, {
1185
- options: $.map((t) => ({
1186
- value: t,
1187
- label: t
1417
+ }), /* @__PURE__ */ e(y, {
1418
+ options: V.map((i) => ({
1419
+ value: i,
1420
+ label: i
1188
1421
  })),
1189
1422
  value: l.data.lineStyle ?? "solid",
1190
- onChange: (t) => c(l.id, "lineStyle", t),
1423
+ onChange: (i) => d(l.id, "lineStyle", i),
1191
1424
  style: { fontSize: 12 }
1192
1425
  })]
1193
1426
  }),
1194
1427
  /* @__PURE__ */ a("div", {
1195
1428
  className: "flow-inspector-row",
1196
- children: [/* @__PURE__ */ e(m, {
1429
+ children: [/* @__PURE__ */ e(n, {
1197
1430
  size: "xs",
1198
1431
  className: "flow-inspector-label",
1199
1432
  children: "Start"
1200
- }), /* @__PURE__ */ e(k, {
1201
- options: Y.map((t) => ({
1202
- value: t,
1203
- label: t
1433
+ }), /* @__PURE__ */ e(y, {
1434
+ options: X.map((i) => ({
1435
+ value: i,
1436
+ label: i
1204
1437
  })),
1205
1438
  value: l.data.markerStart ?? "none",
1206
- onChange: (t) => c(l.id, "markerStart", t),
1439
+ onChange: (i) => d(l.id, "markerStart", i),
1207
1440
  style: { fontSize: 12 }
1208
1441
  })]
1209
1442
  }),
1210
1443
  /* @__PURE__ */ a("div", {
1211
1444
  className: "flow-inspector-row",
1212
- children: [/* @__PURE__ */ e(m, {
1445
+ children: [/* @__PURE__ */ e(n, {
1213
1446
  size: "xs",
1214
1447
  className: "flow-inspector-label",
1215
1448
  children: "End"
1216
- }), /* @__PURE__ */ e(k, {
1217
- options: Y.map((t) => ({
1218
- value: t,
1219
- label: t
1449
+ }), /* @__PURE__ */ e(y, {
1450
+ options: X.map((i) => ({
1451
+ value: i,
1452
+ label: i
1220
1453
  })),
1221
1454
  value: l.data.markerEnd ?? "none",
1222
- onChange: (t) => c(l.id, "markerEnd", t),
1455
+ onChange: (i) => d(l.id, "markerEnd", i),
1223
1456
  style: { fontSize: 12 }
1224
1457
  })]
1225
1458
  }),
1226
1459
  /* @__PURE__ */ a("div", {
1227
1460
  className: "flow-inspector-row",
1228
- children: [/* @__PURE__ */ e(m, {
1461
+ children: [/* @__PURE__ */ e(n, {
1229
1462
  size: "xs",
1230
1463
  className: "flow-inspector-label",
1231
1464
  children: "Label"
1232
- }), /* @__PURE__ */ e(b, {
1465
+ }), /* @__PURE__ */ e(v, {
1233
1466
  size: "xs",
1234
1467
  value: l.data.labelText ?? "",
1235
- onChange: (t) => c(l.id, "labelText", t.target.value),
1468
+ onChange: (i) => d(l.id, "labelText", i.target.value),
1236
1469
  placeholder: "Edge label"
1237
1470
  })]
1238
1471
  })
1239
1472
  ]
1240
1473
  });
1241
1474
  }
1242
- function we({ line: l, onUpdateData: c }) {
1475
+ function Ne({ line: l, onUpdateData: d }) {
1243
1476
  return /* @__PURE__ */ a("div", {
1244
1477
  className: "flow-inspector-section",
1245
1478
  children: [
@@ -1249,7 +1482,7 @@ function we({ line: l, onUpdateData: c }) {
1249
1482
  }),
1250
1483
  /* @__PURE__ */ a("div", {
1251
1484
  className: "flow-inspector-row",
1252
- children: [/* @__PURE__ */ e(m, {
1485
+ children: [/* @__PURE__ */ e(n, {
1253
1486
  size: "xs",
1254
1487
  className: "flow-inspector-label",
1255
1488
  children: "Type"
@@ -1263,43 +1496,43 @@ function we({ line: l, onUpdateData: c }) {
1263
1496
  }),
1264
1497
  /* @__PURE__ */ a("div", {
1265
1498
  className: "flow-inspector-row",
1266
- children: [/* @__PURE__ */ e(m, {
1499
+ children: [/* @__PURE__ */ e(n, {
1267
1500
  size: "xs",
1268
1501
  className: "flow-inspector-label",
1269
1502
  children: "Color"
1270
- }), /* @__PURE__ */ e(B, {
1503
+ }), /* @__PURE__ */ e(P, {
1271
1504
  value: l.strokeColor,
1272
1505
  kind: "line",
1273
1506
  customFallback: "#374151",
1274
- onChange: (r) => c(l.id, "strokeColor", r)
1507
+ onChange: (o) => d(l.id, "strokeColor", o)
1275
1508
  })]
1276
1509
  }),
1277
1510
  /* @__PURE__ */ a("div", {
1278
1511
  className: "flow-inspector-row",
1279
- children: [/* @__PURE__ */ e(m, {
1512
+ children: [/* @__PURE__ */ e(n, {
1280
1513
  size: "xs",
1281
1514
  className: "flow-inspector-label",
1282
1515
  children: "Width"
1283
- }), /* @__PURE__ */ e(b, {
1516
+ }), /* @__PURE__ */ e(v, {
1284
1517
  size: "xs",
1285
1518
  type: "number",
1286
1519
  value: String(l.strokeWidth),
1287
- onChange: (r) => c(l.id, "strokeWidth", Number(r.target.value) || 2)
1520
+ onChange: (o) => d(l.id, "strokeWidth", Number(o.target.value) || 2)
1288
1521
  })]
1289
1522
  }),
1290
1523
  /* @__PURE__ */ a("div", {
1291
1524
  className: "flow-inspector-row",
1292
- children: [/* @__PURE__ */ e(m, {
1525
+ children: [/* @__PURE__ */ e(n, {
1293
1526
  size: "xs",
1294
1527
  className: "flow-inspector-label",
1295
1528
  children: "Style"
1296
- }), /* @__PURE__ */ e(k, {
1297
- options: $.map((r) => ({
1298
- value: r,
1299
- label: r
1529
+ }), /* @__PURE__ */ e(y, {
1530
+ options: V.map((o) => ({
1531
+ value: o,
1532
+ label: o
1300
1533
  })),
1301
1534
  value: l.lineStyle,
1302
- onChange: (r) => c(l.id, "lineStyle", r),
1535
+ onChange: (o) => d(l.id, "lineStyle", o),
1303
1536
  style: { fontSize: 12 }
1304
1537
  })]
1305
1538
  })
@@ -1307,8 +1540,8 @@ function we({ line: l, onUpdateData: c }) {
1307
1540
  });
1308
1541
  }
1309
1542
  export {
1310
- he as InspectorPanelContent,
1311
- Pe as default
1543
+ we as InspectorPanelContent,
1544
+ Xe as default
1312
1545
  };
1313
1546
 
1314
1547
  //# sourceMappingURL=InspectorPanel.js.map