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,342 +1,381 @@
1
- import no from "../../../Button/index.js";
2
- import { useFlowContext as lo } from "../context/FlowContext.js";
3
- import { useFlowUI as V } from "../context/FlowUIContext.js";
4
- import co from "./ProjectTitle.js";
5
- import { downloadDataURL as E, safeFileBaseName as T, useFlowImportExport as ro } from "../hooks/useFlowImportExport.js";
6
- import { useLayoutActions as so } from "../hooks/useLayoutActions.js";
7
- import { IconAI as ao, IconAlign as d, IconAnchorVisible as ho, IconAutoFocus as po, IconBack as mo, IconExportJson as uo, IconExportMarkdown as ko, IconExportPdf as wo, IconExportPng as fo, IconFitView as Io, IconGeoGroup as bo, IconGrid as vo, IconGroup as Co, IconImport as No, IconInspector as go, IconJson as Ao, IconLayer as v, IconMiniMap as xo, IconOutline as Oo, IconPresent as So, IconPublish as zo, IconRedo as yo, IconShapes as Fo, IconUndo as Mo, IconUngroup as jo, IconZoomIn as Ro, IconZoomOut as Jo } from "./toolbarIcons.js";
8
- import { useCallback as C, useRef as Lo } from "react";
9
- import { Fragment as N, jsx as o, jsxs as e } from "react/jsx-runtime";
10
- function Do() {
11
- const { viewport: n, setViewport: l, autoFocus: r, setAutoFocus: u } = V(), k = Math.round(n.zoom * 100);
12
- return /* @__PURE__ */ e("div", {
1
+ import ho from "../../../Button/index.js";
2
+ import { useFlowContext as po } from "../context/FlowContext.js";
3
+ import { useFlowUI as q } from "../context/FlowUIContext.js";
4
+ import mo from "./ProjectTitle.js";
5
+ import { variantEdgeStyle as uo } from "../archify/palette.js";
6
+ import { archifyStylePatch as fo, inferComponentType as ko } from "../archify/presets.js";
7
+ import { downloadDataURL as W, safeFileBaseName as D, useFlowImportExport as wo } from "../hooks/useFlowImportExport.js";
8
+ import { useLayoutActions as Co } from "../hooks/useLayoutActions.js";
9
+ import { IconAI as vo, IconAlign as d, IconAnchorVisible as Io, IconArchify as bo, IconAutoFocus as yo, IconBack as No, IconExportJson as Ao, IconExportMarkdown as go, IconExportPdf as So, IconExportPng as Oo, IconFitView as xo, IconGeoGroup as zo, IconGrid as Fo, IconGroup as Ro, IconImport as Mo, IconInspector as jo, IconJson as Jo, IconLayer as y, IconMiniMap as Lo, IconOutline as Go, IconPresent as Zo, IconPublish as Po, IconRedo as Uo, IconShapes as Eo, IconUndo as To, IconUngroup as Bo, IconZoomIn as Vo, IconZoomOut as $o } from "./toolbarIcons.js";
10
+ import { useCallback as C, useRef as Wo } from "react";
11
+ import { Fragment as N, jsx as o, jsxs as n } from "react/jsx-runtime";
12
+ function lt() {
13
+ const { viewport: r, setViewport: s, autoFocus: a, setAutoFocus: f } = q(), k = Math.round(r.zoom * 100);
14
+ return /* @__PURE__ */ n("div", {
13
15
  className: "flow-zoom-controls",
14
16
  children: [
15
- /* @__PURE__ */ o(i, {
17
+ /* @__PURE__ */ o(t, {
16
18
  tip: "缩小",
17
19
  onClick: () => {
18
- l({
19
- ...n,
20
- zoom: Math.max(0.1, n.zoom / 1.2)
20
+ s({
21
+ ...r,
22
+ zoom: Math.max(0.1, r.zoom / 1.2)
21
23
  });
22
24
  },
23
- children: /* @__PURE__ */ o(Jo, {})
25
+ children: /* @__PURE__ */ o($o, {})
24
26
  }),
25
- /* @__PURE__ */ e("span", {
27
+ /* @__PURE__ */ n("span", {
26
28
  className: "flow-zoom-info",
27
29
  children: [k, "%"]
28
30
  }),
29
- /* @__PURE__ */ o(i, {
31
+ /* @__PURE__ */ o(t, {
30
32
  tip: "放大",
31
33
  onClick: () => {
32
- l({
33
- ...n,
34
- zoom: Math.min(4, n.zoom * 1.2)
34
+ s({
35
+ ...r,
36
+ zoom: Math.min(4, r.zoom * 1.2)
35
37
  });
36
38
  },
37
- children: /* @__PURE__ */ o(Ro, {})
39
+ children: /* @__PURE__ */ o(Vo, {})
38
40
  }),
39
- /* @__PURE__ */ o(i, {
41
+ /* @__PURE__ */ o(t, {
40
42
  tip: "适应视图",
41
43
  onClick: () => {
42
- l({
44
+ s({
43
45
  x: 0,
44
46
  y: 0,
45
47
  zoom: 1
46
48
  });
47
49
  },
48
- children: /* @__PURE__ */ o(Io, {})
50
+ children: /* @__PURE__ */ o(xo, {})
49
51
  }),
50
- /* @__PURE__ */ o(i, {
51
- tip: r ? "关闭 Auto Focus" : "开启 Auto Focus",
52
- active: r,
53
- onClick: () => u(!r),
54
- children: /* @__PURE__ */ o(po, {})
52
+ /* @__PURE__ */ o(t, {
53
+ tip: a ? "关闭 Auto Focus" : "开启 Auto Focus",
54
+ active: a,
55
+ onClick: () => f(!a),
56
+ children: /* @__PURE__ */ o(yo, {})
55
57
  })
56
58
  ]
57
59
  });
58
60
  }
59
- function i({ tip: n, shortcut: l, onClick: r, active: u, disabled: k, children: p }) {
60
- const a = l ? `${n} (${l})` : n;
61
- return /* @__PURE__ */ e("span", {
61
+ function t({ tip: r, shortcut: s, onClick: a, active: f, disabled: k, children: m }) {
62
+ const h = s ? `${r} (${s})` : r;
63
+ return /* @__PURE__ */ n("span", {
62
64
  className: "flow-tip",
63
- children: [/* @__PURE__ */ o(no, {
65
+ children: [/* @__PURE__ */ o(ho, {
64
66
  size: "xs",
65
- variant: u ? "primary" : "ghost",
66
- onClick: r,
67
+ variant: f ? "primary" : "ghost",
68
+ onClick: a,
67
69
  disabled: k,
68
70
  square: !0,
69
71
  children: /* @__PURE__ */ o("span", {
70
- "aria-label": a,
72
+ "aria-label": h,
71
73
  style: { display: "inline-flex" },
72
- children: p
74
+ children: m
73
75
  })
74
76
  }), /* @__PURE__ */ o("span", {
75
77
  className: "flow-tip-label",
76
78
  role: "tooltip",
77
- children: a
79
+ children: h
78
80
  })]
79
81
  });
80
82
  }
81
- function Wo({ onBack: n, onUndo: l, onRedo: r, canUndo: u, canRedo: k, onGroup: p, onGeoGroup: a, onUngroup: f, onExportPNG: x, onExportPDF: O, onPublish: S }) {
82
- const { showGrid: z, setShowGrid: $, showPalette: y, setShowPalette: q, showInspector: F, setShowInspector: D, showOutline: M, setShowOutline: W, showJson: j, setShowJson: H, showAI: R, setShowAI: K, showMiniMap: J, setShowMiniMap: Q, showAnchors: I, setShowAnchors: X, presentation: L, setPresentation: Y } = V(), { doc: w, selection: h, currentCanvas: _ } = lo(), { exportJSON: Z, importJSON: P, exportMarkdown: U } = ro(), { align: m, distribute: G, changeZIndex: b } = so(), B = Lo(null), g = h.nodeIds.size + h.lineIds.size, oo = h.nodeIds.size > 0 && _.nodes.some((t) => h.nodeIds.has(t.id) && (t.type === "flowGroup" || t.type === "geometryGroup" || t.data.isGroup)), A = Object.values(w.canvases).some((t) => t.nodes.some((s) => s.type === "animAnchor")), io = C(() => {
83
- const t = Z(), s = new Blob([t], { type: "application/json" }), c = URL.createObjectURL(s);
84
- E(c, `${T(w.title)}.json`), URL.revokeObjectURL(c);
85
- }, [Z, w.title]), eo = C(() => {
86
- const t = U(), s = new Blob([t], { type: "text/markdown" }), c = URL.createObjectURL(s);
87
- E(c, `${T(w.title)}.md`), URL.revokeObjectURL(c);
88
- }, [U, w.title]), to = C(() => {
89
- B.current?.click();
90
- }, []);
91
- return /* @__PURE__ */ e("div", {
83
+ function ct({ onBack: r, onUndo: s, onRedo: a, canUndo: f, canRedo: k, onGroup: m, onGeoGroup: h, onUngroup: v, onExportPNG: O, onExportPDF: x, onPublish: z }) {
84
+ const { showGrid: F, setShowGrid: H, showPalette: R, setShowPalette: Y, showInspector: M, setShowInspector: _, showOutline: j, setShowOutline: K, showJson: J, setShowJson: Q, showAI: L, setShowAI: X, showMiniMap: G, setShowMiniMap: oo, showAnchors: I, setShowAnchors: to, presentation: Z, setPresentation: eo } = q(), { doc: w, selection: p, currentCanvas: io, setDoc: P, currentCanvasId: A } = po(), { exportJSON: U, importJSON: E, exportMarkdown: T } = wo(), { align: u, distribute: B, changeZIndex: b } = Co(), V = Wo(null), g = p.nodeIds.size + p.lineIds.size, no = p.nodeIds.size > 0 && io.nodes.some((e) => p.nodeIds.has(e.id) && (e.type === "flowGroup" || e.type === "geometryGroup" || e.data.isGroup)), S = Object.values(w.canvases).some((e) => e.nodes.some((l) => l.type === "animAnchor")), lo = C(() => {
85
+ const e = U(), l = new Blob([e], { type: "application/json" }), c = URL.createObjectURL(l);
86
+ W(c, `${D(w.title)}.json`), URL.revokeObjectURL(c);
87
+ }, [U, w.title]), co = C(() => {
88
+ const e = T(), l = new Blob([e], { type: "text/markdown" }), c = URL.createObjectURL(l);
89
+ W(c, `${D(w.title)}.md`), URL.revokeObjectURL(c);
90
+ }, [T, w.title]), ro = C(() => {
91
+ V.current?.click();
92
+ }, []), so = C(() => {
93
+ P((e) => {
94
+ const l = e.canvases[A];
95
+ if (!l) return e;
96
+ const c = l.nodes.map((i) => i.type === "animAnchor" || i.type === "shapeSvg" || i.data.isGroup || i.type === "flowGroup" || i.type === "geometryGroup" ? i : {
97
+ ...i,
98
+ data: {
99
+ ...i.data,
100
+ ...fo(ko(i.data))
101
+ }
102
+ }), ao = l.edges.map((i) => {
103
+ const $ = uo(i.data.strokeColor && i.data.strokeColor !== "#64748b" ? "emphasis" : "default");
104
+ return {
105
+ ...i,
106
+ data: {
107
+ ...i.data,
108
+ strokeColor: i.data.strokeColor && i.data.strokeColor.startsWith("theme:") ? $.color : i.data.strokeColor ?? $.color
109
+ }
110
+ };
111
+ });
112
+ return {
113
+ ...e,
114
+ canvases: {
115
+ ...e.canvases,
116
+ [A]: {
117
+ ...l,
118
+ nodes: c,
119
+ edges: ao
120
+ }
121
+ }
122
+ };
123
+ });
124
+ }, [P, A]);
125
+ return /* @__PURE__ */ n("div", {
92
126
  className: "flow-toolbar",
93
127
  children: [
94
128
  /* @__PURE__ */ o("input", {
95
- ref: B,
129
+ ref: V,
96
130
  type: "file",
97
131
  accept: ".json",
98
132
  style: { display: "none" },
99
- onChange: C((t) => {
100
- const s = t.target.files?.[0];
101
- if (!s) return;
133
+ onChange: C((e) => {
134
+ const l = e.target.files?.[0];
135
+ if (!l) return;
102
136
  const c = new FileReader();
103
137
  c.onload = () => {
104
- typeof c.result == "string" && P(c.result);
105
- }, c.readAsText(s), t.target.value = "";
106
- }, [P])
138
+ typeof c.result == "string" && E(c.result);
139
+ }, c.readAsText(l), e.target.value = "";
140
+ }, [E])
107
141
  }),
108
- /* @__PURE__ */ o(co, {}),
109
- n && /* @__PURE__ */ e(N, { children: [/* @__PURE__ */ o("div", {
142
+ /* @__PURE__ */ o(mo, {}),
143
+ r && /* @__PURE__ */ n(N, { children: [/* @__PURE__ */ o("div", {
110
144
  className: "flow-toolbar-group",
111
- children: /* @__PURE__ */ o(i, {
145
+ children: /* @__PURE__ */ o(t, {
112
146
  tip: "返回列表",
113
- onClick: n,
114
- children: /* @__PURE__ */ o(mo, {})
147
+ onClick: r,
148
+ children: /* @__PURE__ */ o(No, {})
115
149
  })
116
150
  }), /* @__PURE__ */ o("div", { className: "flow-toolbar-divider" })] }),
117
- (l || r) && /* @__PURE__ */ e("div", {
151
+ (s || a) && /* @__PURE__ */ n("div", {
118
152
  className: "flow-toolbar-group",
119
- children: [l && /* @__PURE__ */ o(i, {
153
+ children: [s && /* @__PURE__ */ o(t, {
120
154
  tip: "撤销",
121
155
  shortcut: "Ctrl+Z",
122
- onClick: l,
123
- disabled: !u,
124
- children: /* @__PURE__ */ o(Mo, {})
125
- }), r && /* @__PURE__ */ o(i, {
156
+ onClick: s,
157
+ disabled: !f,
158
+ children: /* @__PURE__ */ o(To, {})
159
+ }), a && /* @__PURE__ */ o(t, {
126
160
  tip: "重做",
127
161
  shortcut: "Ctrl+Shift+Z",
128
- onClick: r,
162
+ onClick: a,
129
163
  disabled: !k,
130
- children: /* @__PURE__ */ o(yo, {})
164
+ children: /* @__PURE__ */ o(Uo, {})
131
165
  })]
132
166
  }),
133
- h.nodeIds.size >= 2 && /* @__PURE__ */ e(N, { children: [/* @__PURE__ */ o("div", { className: "flow-toolbar-divider" }), /* @__PURE__ */ e("div", {
167
+ p.nodeIds.size >= 2 && /* @__PURE__ */ n(N, { children: [/* @__PURE__ */ o("div", { className: "flow-toolbar-divider" }), /* @__PURE__ */ n("div", {
134
168
  className: "flow-toolbar-group",
135
169
  children: [
136
- /* @__PURE__ */ o(i, {
170
+ /* @__PURE__ */ o(t, {
137
171
  tip: "居左",
138
- onClick: () => m("left"),
172
+ onClick: () => u("left"),
139
173
  children: /* @__PURE__ */ o(d, { kind: "left" })
140
174
  }),
141
- /* @__PURE__ */ o(i, {
175
+ /* @__PURE__ */ o(t, {
142
176
  tip: "水平居中",
143
- onClick: () => m("center-h"),
177
+ onClick: () => u("center-h"),
144
178
  children: /* @__PURE__ */ o(d, { kind: "center-h" })
145
179
  }),
146
- /* @__PURE__ */ o(i, {
180
+ /* @__PURE__ */ o(t, {
147
181
  tip: "居右",
148
- onClick: () => m("right"),
182
+ onClick: () => u("right"),
149
183
  children: /* @__PURE__ */ o(d, { kind: "right" })
150
184
  }),
151
- /* @__PURE__ */ o(i, {
185
+ /* @__PURE__ */ o(t, {
152
186
  tip: "居上",
153
- onClick: () => m("top"),
187
+ onClick: () => u("top"),
154
188
  children: /* @__PURE__ */ o(d, { kind: "top" })
155
189
  }),
156
- /* @__PURE__ */ o(i, {
190
+ /* @__PURE__ */ o(t, {
157
191
  tip: "垂直居中",
158
- onClick: () => m("center-v"),
192
+ onClick: () => u("center-v"),
159
193
  children: /* @__PURE__ */ o(d, { kind: "center-v" })
160
194
  }),
161
- /* @__PURE__ */ o(i, {
195
+ /* @__PURE__ */ o(t, {
162
196
  tip: "居下",
163
- onClick: () => m("bottom"),
197
+ onClick: () => u("bottom"),
164
198
  children: /* @__PURE__ */ o(d, { kind: "bottom" })
165
199
  }),
166
- /* @__PURE__ */ o(i, {
200
+ /* @__PURE__ */ o(t, {
167
201
  tip: "水平平分",
168
- onClick: () => G("horizontal"),
169
- disabled: h.nodeIds.size < 3,
202
+ onClick: () => B("horizontal"),
203
+ disabled: p.nodeIds.size < 3,
170
204
  children: /* @__PURE__ */ o(d, { kind: "distribute-h" })
171
205
  }),
172
- /* @__PURE__ */ o(i, {
206
+ /* @__PURE__ */ o(t, {
173
207
  tip: "垂直平分",
174
- onClick: () => G("vertical"),
175
- disabled: h.nodeIds.size < 3,
208
+ onClick: () => B("vertical"),
209
+ disabled: p.nodeIds.size < 3,
176
210
  children: /* @__PURE__ */ o(d, { kind: "distribute-v" })
177
211
  })
178
212
  ]
179
213
  })] }),
180
- g >= 1 && /* @__PURE__ */ e(N, { children: [/* @__PURE__ */ o("div", { className: "flow-toolbar-divider" }), /* @__PURE__ */ e("div", {
214
+ g >= 1 && /* @__PURE__ */ n(N, { children: [/* @__PURE__ */ o("div", { className: "flow-toolbar-divider" }), /* @__PURE__ */ n("div", {
181
215
  className: "flow-toolbar-group",
182
216
  children: [
183
- /* @__PURE__ */ o(i, {
217
+ /* @__PURE__ */ o(t, {
184
218
  tip: "置于顶层",
185
219
  onClick: () => b("front"),
186
- children: /* @__PURE__ */ o(v, { kind: "front" })
220
+ children: /* @__PURE__ */ o(y, { kind: "front" })
187
221
  }),
188
- /* @__PURE__ */ o(i, {
222
+ /* @__PURE__ */ o(t, {
189
223
  tip: "上移一层",
190
224
  onClick: () => b("up"),
191
- children: /* @__PURE__ */ o(v, { kind: "up" })
225
+ children: /* @__PURE__ */ o(y, { kind: "up" })
192
226
  }),
193
- /* @__PURE__ */ o(i, {
227
+ /* @__PURE__ */ o(t, {
194
228
  tip: "下移一层",
195
229
  onClick: () => b("down"),
196
- children: /* @__PURE__ */ o(v, { kind: "down" })
230
+ children: /* @__PURE__ */ o(y, { kind: "down" })
197
231
  }),
198
- /* @__PURE__ */ o(i, {
232
+ /* @__PURE__ */ o(t, {
199
233
  tip: "置于底层",
200
234
  onClick: () => b("back"),
201
- children: /* @__PURE__ */ o(v, { kind: "back" })
235
+ children: /* @__PURE__ */ o(y, { kind: "back" })
202
236
  })
203
237
  ]
204
238
  })] }),
205
- (p || a || f) && /* @__PURE__ */ e(N, { children: [/* @__PURE__ */ o("div", { className: "flow-toolbar-divider" }), /* @__PURE__ */ e("div", {
239
+ (m || h || v) && /* @__PURE__ */ n(N, { children: [/* @__PURE__ */ o("div", { className: "flow-toolbar-divider" }), /* @__PURE__ */ n("div", {
206
240
  className: "flow-toolbar-group",
207
241
  children: [
208
- p && /* @__PURE__ */ o(i, {
242
+ m && /* @__PURE__ */ o(t, {
209
243
  tip: "成组",
210
244
  shortcut: "⌘G",
211
- onClick: p,
245
+ onClick: m,
212
246
  disabled: g < 2,
213
- children: /* @__PURE__ */ o(Co, {})
247
+ children: /* @__PURE__ */ o(Ro, {})
214
248
  }),
215
- a && /* @__PURE__ */ o(i, {
249
+ h && /* @__PURE__ */ o(t, {
216
250
  tip: "几何分组",
217
251
  shortcut: "⌘⌥G",
218
- onClick: a,
252
+ onClick: h,
219
253
  disabled: g < 2,
220
- children: /* @__PURE__ */ o(bo, {})
254
+ children: /* @__PURE__ */ o(zo, {})
221
255
  }),
222
- f && /* @__PURE__ */ o(i, {
256
+ v && /* @__PURE__ */ o(t, {
223
257
  tip: "取消成组",
224
258
  shortcut: "⌘⇧G",
225
- onClick: f,
226
- disabled: !oo,
227
- children: /* @__PURE__ */ o(jo, {})
259
+ onClick: v,
260
+ disabled: !no,
261
+ children: /* @__PURE__ */ o(Bo, {})
228
262
  })
229
263
  ]
230
264
  })] }),
231
265
  /* @__PURE__ */ o("div", { className: "flow-toolbar-divider" }),
232
- /* @__PURE__ */ e("div", {
266
+ /* @__PURE__ */ n("div", {
233
267
  className: "flow-toolbar-group",
234
268
  children: [
235
- /* @__PURE__ */ o(i, {
269
+ /* @__PURE__ */ o(t, {
236
270
  tip: "网格",
237
- active: z,
238
- onClick: () => $(!z),
239
- children: /* @__PURE__ */ o(vo, {})
271
+ active: F,
272
+ onClick: () => H(!F),
273
+ children: /* @__PURE__ */ o(Fo, {})
240
274
  }),
241
- /* @__PURE__ */ o(i, {
275
+ /* @__PURE__ */ o(t, {
242
276
  tip: "缩略图",
243
- active: J,
244
- onClick: () => Q(!J),
245
- children: /* @__PURE__ */ o(xo, {})
277
+ active: G,
278
+ onClick: () => oo(!G),
279
+ children: /* @__PURE__ */ o(Lo, {})
246
280
  }),
247
- /* @__PURE__ */ o(i, {
281
+ /* @__PURE__ */ o(t, {
248
282
  tip: I ? "隐藏所有 Anchor 对象" : "显示所有 Anchor 对象",
249
283
  active: I,
250
- disabled: !A,
284
+ disabled: !S,
251
285
  onClick: () => {
252
- A && X(!I);
286
+ S && to(!I);
253
287
  },
254
- children: /* @__PURE__ */ o(ho, { visible: I })
288
+ children: /* @__PURE__ */ o(Io, { visible: I })
255
289
  }),
256
- /* @__PURE__ */ o(i, {
290
+ /* @__PURE__ */ o(t, {
257
291
  tip: "动画预览",
258
- active: L !== null,
259
- onClick: () => Y(L ? null : {
292
+ active: Z !== null,
293
+ onClick: () => eo(Z ? null : {
260
294
  current: 0,
261
295
  showAnchor: !1
262
296
  }),
263
- children: /* @__PURE__ */ o(So, {})
297
+ children: /* @__PURE__ */ o(Zo, {})
298
+ }),
299
+ /* @__PURE__ */ o(t, {
300
+ tip: "应用 Archify 风格(当前画布)",
301
+ onClick: so,
302
+ children: /* @__PURE__ */ o(bo, {})
264
303
  })
265
304
  ]
266
305
  }),
267
306
  /* @__PURE__ */ o("div", { className: "flow-toolbar-divider" }),
268
- /* @__PURE__ */ e("div", {
307
+ /* @__PURE__ */ n("div", {
269
308
  className: "flow-toolbar-group",
270
309
  children: [
271
- /* @__PURE__ */ o(i, {
310
+ /* @__PURE__ */ o(t, {
272
311
  tip: "形状面板",
273
- active: y,
274
- onClick: () => q(!y),
275
- children: /* @__PURE__ */ o(Fo, {})
312
+ active: R,
313
+ onClick: () => Y(!R),
314
+ children: /* @__PURE__ */ o(Eo, {})
276
315
  }),
277
- /* @__PURE__ */ o(i, {
316
+ /* @__PURE__ */ o(t, {
278
317
  tip: "属性面板",
279
- active: F,
280
- onClick: () => D(!F),
281
- children: /* @__PURE__ */ o(go, {})
318
+ active: M,
319
+ onClick: () => _(!M),
320
+ children: /* @__PURE__ */ o(jo, {})
282
321
  }),
283
- /* @__PURE__ */ o(i, {
322
+ /* @__PURE__ */ o(t, {
284
323
  tip: "大纲",
285
- active: M,
286
- onClick: () => W(!M),
287
- children: /* @__PURE__ */ o(Oo, {})
324
+ active: j,
325
+ onClick: () => K(!j),
326
+ children: /* @__PURE__ */ o(Go, {})
288
327
  }),
289
- /* @__PURE__ */ o(i, {
328
+ /* @__PURE__ */ o(t, {
290
329
  tip: "JSON",
291
- active: j,
292
- onClick: () => H(!j),
293
- children: /* @__PURE__ */ o(Ao, {})
330
+ active: J,
331
+ onClick: () => Q(!J),
332
+ children: /* @__PURE__ */ o(Jo, {})
294
333
  }),
295
- /* @__PURE__ */ o(i, {
334
+ /* @__PURE__ */ o(t, {
296
335
  tip: "AI 助手",
297
- active: R,
298
- onClick: () => K(!R),
299
- children: /* @__PURE__ */ o(ao, {})
336
+ active: L,
337
+ onClick: () => X(!L),
338
+ children: /* @__PURE__ */ o(vo, {})
300
339
  })
301
340
  ]
302
341
  }),
303
342
  /* @__PURE__ */ o("div", { className: "flow-toolbar-divider" }),
304
- /* @__PURE__ */ e("div", {
343
+ /* @__PURE__ */ n("div", {
305
344
  className: "flow-toolbar-group",
306
345
  children: [
307
- /* @__PURE__ */ o(i, {
346
+ /* @__PURE__ */ o(t, {
308
347
  tip: "导入 JSON",
309
- onClick: to,
310
- children: /* @__PURE__ */ o(No, {})
348
+ onClick: ro,
349
+ children: /* @__PURE__ */ o(Mo, {})
311
350
  }),
312
- /* @__PURE__ */ o(i, {
351
+ /* @__PURE__ */ o(t, {
313
352
  tip: "导出 JSON",
314
- onClick: io,
315
- children: /* @__PURE__ */ o(uo, {})
353
+ onClick: lo,
354
+ children: /* @__PURE__ */ o(Ao, {})
316
355
  }),
317
- /* @__PURE__ */ o(i, {
356
+ /* @__PURE__ */ o(t, {
318
357
  tip: "导出 Markdown",
319
- onClick: eo,
320
- children: /* @__PURE__ */ o(ko, {})
358
+ onClick: co,
359
+ children: /* @__PURE__ */ o(go, {})
321
360
  }),
322
- x && /* @__PURE__ */ o(i, {
361
+ O && /* @__PURE__ */ o(t, {
323
362
  tip: "导出 PNG",
324
363
  onClick: () => {
325
- x();
364
+ O();
326
365
  },
327
- children: /* @__PURE__ */ o(fo, {})
366
+ children: /* @__PURE__ */ o(Oo, {})
328
367
  }),
329
- O && A && /* @__PURE__ */ o(i, {
368
+ x && S && /* @__PURE__ */ o(t, {
330
369
  tip: "导出 PDF(按锦点顺序)",
331
370
  onClick: () => {
332
- O();
371
+ x();
333
372
  },
334
- children: /* @__PURE__ */ o(wo, {})
373
+ children: /* @__PURE__ */ o(So, {})
335
374
  }),
336
- S && /* @__PURE__ */ o(i, {
375
+ z && /* @__PURE__ */ o(t, {
337
376
  tip: "发布与共享",
338
- onClick: S,
339
- children: /* @__PURE__ */ o(zo, {})
377
+ onClick: z,
378
+ children: /* @__PURE__ */ o(Po, {})
340
379
  })
341
380
  ]
342
381
  })
@@ -344,8 +383,8 @@ function Wo({ onBack: n, onUndo: l, onRedo: r, canUndo: u, canRedo: k, onGroup:
344
383
  });
345
384
  }
346
385
  export {
347
- Do as FlowZoomControls,
348
- Wo as default
386
+ lt as FlowZoomControls,
387
+ ct as default
349
388
  };
350
389
 
351
390
  //# sourceMappingURL=FlowToolbar.js.map