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.
- package/dist/components/pro/Flow/Flow.js +419 -407
- package/dist/components/pro/Flow/Flow.js.map +1 -1
- package/dist/components/pro/Flow/archify/build.d.ts +74 -0
- package/dist/components/pro/Flow/archify/build.js +103 -0
- package/dist/components/pro/Flow/archify/build.js.map +1 -0
- package/dist/components/pro/Flow/archify/convert.d.ts +14 -0
- package/dist/components/pro/Flow/archify/convert.js +534 -0
- package/dist/components/pro/Flow/archify/convert.js.map +1 -0
- package/dist/components/pro/Flow/archify/index.d.ts +12 -0
- package/dist/components/pro/Flow/archify/palette.d.ts +64 -0
- package/dist/components/pro/Flow/archify/palette.js +112 -0
- package/dist/components/pro/Flow/archify/palette.js.map +1 -0
- package/dist/components/pro/Flow/archify/presets.d.ts +26 -0
- package/dist/components/pro/Flow/archify/presets.js +43 -0
- package/dist/components/pro/Flow/archify/presets.js.map +1 -0
- package/dist/components/pro/Flow/archify/spec.d.ts +283 -0
- package/dist/components/pro/Flow/archify/spec.js +10 -0
- package/dist/components/pro/Flow/archify/spec.js.map +1 -0
- package/dist/components/pro/Flow/constants.js +14 -0
- package/dist/components/pro/Flow/constants.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useClipboard.d.ts +5 -0
- package/dist/components/pro/Flow/hooks/useClipboard.js +129 -73
- package/dist/components/pro/Flow/hooks/useClipboard.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useFlowImportExport.d.ts +1 -0
- package/dist/components/pro/Flow/hooks/useFlowImportExport.js +108 -93
- package/dist/components/pro/Flow/hooks/useFlowImportExport.js.map +1 -1
- package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.d.ts +1 -0
- package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js +7 -7
- package/dist/components/pro/Flow/hooks/useKeyboardShortcuts.js.map +1 -1
- package/dist/components/pro/Flow/index.d.ts +2 -0
- package/dist/components/pro/Flow/nodes/DataNodeView.d.ts +4 -1
- package/dist/components/pro/Flow/nodes/DataNodeView.js +127 -115
- package/dist/components/pro/Flow/nodes/DataNodeView.js.map +1 -1
- package/dist/components/pro/Flow/nodes/MediaContent.js +72 -67
- package/dist/components/pro/Flow/nodes/MediaContent.js.map +1 -1
- package/dist/components/pro/Flow/nodes/NodeRenderer.d.ts +5 -0
- package/dist/components/pro/Flow/nodes/NodeRenderer.js +216 -115
- package/dist/components/pro/Flow/nodes/NodeRenderer.js.map +1 -1
- package/dist/components/pro/Flow/panels/FlowToolbar.js +208 -169
- package/dist/components/pro/Flow/panels/FlowToolbar.js.map +1 -1
- package/dist/components/pro/Flow/panels/InspectorPanel.js +602 -369
- package/dist/components/pro/Flow/panels/InspectorPanel.js.map +1 -1
- package/dist/components/pro/Flow/panels/ShapePalette.js +50 -39
- package/dist/components/pro/Flow/panels/ShapePalette.js.map +1 -1
- package/dist/components/pro/Flow/panels/toolbarIcons.d.ts +1 -0
- package/dist/components/pro/Flow/panels/toolbarIcons.js +36 -8
- package/dist/components/pro/Flow/panels/toolbarIcons.js.map +1 -1
- package/dist/components/pro/Flow/types.d.ts +30 -0
- package/dist/components/pro/Flow/types.js.map +1 -1
- package/dist/dishui.css +1 -1
- package/dist/flow.js +73 -56
- package/package.json +18 -17
|
@@ -1,342 +1,381 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useFlowContext as
|
|
3
|
-
import { useFlowUI as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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(
|
|
17
|
+
/* @__PURE__ */ o(t, {
|
|
16
18
|
tip: "缩小",
|
|
17
19
|
onClick: () => {
|
|
18
|
-
|
|
19
|
-
...
|
|
20
|
-
zoom: Math.max(0.1,
|
|
20
|
+
s({
|
|
21
|
+
...r,
|
|
22
|
+
zoom: Math.max(0.1, r.zoom / 1.2)
|
|
21
23
|
});
|
|
22
24
|
},
|
|
23
|
-
children: /* @__PURE__ */ o(
|
|
25
|
+
children: /* @__PURE__ */ o($o, {})
|
|
24
26
|
}),
|
|
25
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ n("span", {
|
|
26
28
|
className: "flow-zoom-info",
|
|
27
29
|
children: [k, "%"]
|
|
28
30
|
}),
|
|
29
|
-
/* @__PURE__ */ o(
|
|
31
|
+
/* @__PURE__ */ o(t, {
|
|
30
32
|
tip: "放大",
|
|
31
33
|
onClick: () => {
|
|
32
|
-
|
|
33
|
-
...
|
|
34
|
-
zoom: Math.min(4,
|
|
34
|
+
s({
|
|
35
|
+
...r,
|
|
36
|
+
zoom: Math.min(4, r.zoom * 1.2)
|
|
35
37
|
});
|
|
36
38
|
},
|
|
37
|
-
children: /* @__PURE__ */ o(
|
|
39
|
+
children: /* @__PURE__ */ o(Vo, {})
|
|
38
40
|
}),
|
|
39
|
-
/* @__PURE__ */ o(
|
|
41
|
+
/* @__PURE__ */ o(t, {
|
|
40
42
|
tip: "适应视图",
|
|
41
43
|
onClick: () => {
|
|
42
|
-
|
|
44
|
+
s({
|
|
43
45
|
x: 0,
|
|
44
46
|
y: 0,
|
|
45
47
|
zoom: 1
|
|
46
48
|
});
|
|
47
49
|
},
|
|
48
|
-
children: /* @__PURE__ */ o(
|
|
50
|
+
children: /* @__PURE__ */ o(xo, {})
|
|
49
51
|
}),
|
|
50
|
-
/* @__PURE__ */ o(
|
|
51
|
-
tip:
|
|
52
|
-
active:
|
|
53
|
-
onClick: () =>
|
|
54
|
-
children: /* @__PURE__ */ o(
|
|
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
|
|
60
|
-
const
|
|
61
|
-
return /* @__PURE__ */
|
|
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(
|
|
65
|
+
children: [/* @__PURE__ */ o(ho, {
|
|
64
66
|
size: "xs",
|
|
65
|
-
variant:
|
|
66
|
-
onClick:
|
|
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":
|
|
72
|
+
"aria-label": h,
|
|
71
73
|
style: { display: "inline-flex" },
|
|
72
|
-
children:
|
|
74
|
+
children: m
|
|
73
75
|
})
|
|
74
76
|
}), /* @__PURE__ */ o("span", {
|
|
75
77
|
className: "flow-tip-label",
|
|
76
78
|
role: "tooltip",
|
|
77
|
-
children:
|
|
79
|
+
children: h
|
|
78
80
|
})]
|
|
79
81
|
});
|
|
80
82
|
}
|
|
81
|
-
function
|
|
82
|
-
const { showGrid:
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
}, [
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
}, [
|
|
89
|
-
|
|
90
|
-
}, [])
|
|
91
|
-
|
|
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:
|
|
129
|
+
ref: V,
|
|
96
130
|
type: "file",
|
|
97
131
|
accept: ".json",
|
|
98
132
|
style: { display: "none" },
|
|
99
|
-
onChange: C((
|
|
100
|
-
const
|
|
101
|
-
if (!
|
|
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" &&
|
|
105
|
-
}, c.readAsText(
|
|
106
|
-
}, [
|
|
138
|
+
typeof c.result == "string" && E(c.result);
|
|
139
|
+
}, c.readAsText(l), e.target.value = "";
|
|
140
|
+
}, [E])
|
|
107
141
|
}),
|
|
108
|
-
/* @__PURE__ */ o(
|
|
109
|
-
|
|
142
|
+
/* @__PURE__ */ o(mo, {}),
|
|
143
|
+
r && /* @__PURE__ */ n(N, { children: [/* @__PURE__ */ o("div", {
|
|
110
144
|
className: "flow-toolbar-group",
|
|
111
|
-
children: /* @__PURE__ */ o(
|
|
145
|
+
children: /* @__PURE__ */ o(t, {
|
|
112
146
|
tip: "返回列表",
|
|
113
|
-
onClick:
|
|
114
|
-
children: /* @__PURE__ */ o(
|
|
147
|
+
onClick: r,
|
|
148
|
+
children: /* @__PURE__ */ o(No, {})
|
|
115
149
|
})
|
|
116
150
|
}), /* @__PURE__ */ o("div", { className: "flow-toolbar-divider" })] }),
|
|
117
|
-
(
|
|
151
|
+
(s || a) && /* @__PURE__ */ n("div", {
|
|
118
152
|
className: "flow-toolbar-group",
|
|
119
|
-
children: [
|
|
153
|
+
children: [s && /* @__PURE__ */ o(t, {
|
|
120
154
|
tip: "撤销",
|
|
121
155
|
shortcut: "Ctrl+Z",
|
|
122
|
-
onClick:
|
|
123
|
-
disabled: !
|
|
124
|
-
children: /* @__PURE__ */ o(
|
|
125
|
-
}),
|
|
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:
|
|
162
|
+
onClick: a,
|
|
129
163
|
disabled: !k,
|
|
130
|
-
children: /* @__PURE__ */ o(
|
|
164
|
+
children: /* @__PURE__ */ o(Uo, {})
|
|
131
165
|
})]
|
|
132
166
|
}),
|
|
133
|
-
|
|
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(
|
|
170
|
+
/* @__PURE__ */ o(t, {
|
|
137
171
|
tip: "居左",
|
|
138
|
-
onClick: () =>
|
|
172
|
+
onClick: () => u("left"),
|
|
139
173
|
children: /* @__PURE__ */ o(d, { kind: "left" })
|
|
140
174
|
}),
|
|
141
|
-
/* @__PURE__ */ o(
|
|
175
|
+
/* @__PURE__ */ o(t, {
|
|
142
176
|
tip: "水平居中",
|
|
143
|
-
onClick: () =>
|
|
177
|
+
onClick: () => u("center-h"),
|
|
144
178
|
children: /* @__PURE__ */ o(d, { kind: "center-h" })
|
|
145
179
|
}),
|
|
146
|
-
/* @__PURE__ */ o(
|
|
180
|
+
/* @__PURE__ */ o(t, {
|
|
147
181
|
tip: "居右",
|
|
148
|
-
onClick: () =>
|
|
182
|
+
onClick: () => u("right"),
|
|
149
183
|
children: /* @__PURE__ */ o(d, { kind: "right" })
|
|
150
184
|
}),
|
|
151
|
-
/* @__PURE__ */ o(
|
|
185
|
+
/* @__PURE__ */ o(t, {
|
|
152
186
|
tip: "居上",
|
|
153
|
-
onClick: () =>
|
|
187
|
+
onClick: () => u("top"),
|
|
154
188
|
children: /* @__PURE__ */ o(d, { kind: "top" })
|
|
155
189
|
}),
|
|
156
|
-
/* @__PURE__ */ o(
|
|
190
|
+
/* @__PURE__ */ o(t, {
|
|
157
191
|
tip: "垂直居中",
|
|
158
|
-
onClick: () =>
|
|
192
|
+
onClick: () => u("center-v"),
|
|
159
193
|
children: /* @__PURE__ */ o(d, { kind: "center-v" })
|
|
160
194
|
}),
|
|
161
|
-
/* @__PURE__ */ o(
|
|
195
|
+
/* @__PURE__ */ o(t, {
|
|
162
196
|
tip: "居下",
|
|
163
|
-
onClick: () =>
|
|
197
|
+
onClick: () => u("bottom"),
|
|
164
198
|
children: /* @__PURE__ */ o(d, { kind: "bottom" })
|
|
165
199
|
}),
|
|
166
|
-
/* @__PURE__ */ o(
|
|
200
|
+
/* @__PURE__ */ o(t, {
|
|
167
201
|
tip: "水平平分",
|
|
168
|
-
onClick: () =>
|
|
169
|
-
disabled:
|
|
202
|
+
onClick: () => B("horizontal"),
|
|
203
|
+
disabled: p.nodeIds.size < 3,
|
|
170
204
|
children: /* @__PURE__ */ o(d, { kind: "distribute-h" })
|
|
171
205
|
}),
|
|
172
|
-
/* @__PURE__ */ o(
|
|
206
|
+
/* @__PURE__ */ o(t, {
|
|
173
207
|
tip: "垂直平分",
|
|
174
|
-
onClick: () =>
|
|
175
|
-
disabled:
|
|
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__ */
|
|
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(
|
|
217
|
+
/* @__PURE__ */ o(t, {
|
|
184
218
|
tip: "置于顶层",
|
|
185
219
|
onClick: () => b("front"),
|
|
186
|
-
children: /* @__PURE__ */ o(
|
|
220
|
+
children: /* @__PURE__ */ o(y, { kind: "front" })
|
|
187
221
|
}),
|
|
188
|
-
/* @__PURE__ */ o(
|
|
222
|
+
/* @__PURE__ */ o(t, {
|
|
189
223
|
tip: "上移一层",
|
|
190
224
|
onClick: () => b("up"),
|
|
191
|
-
children: /* @__PURE__ */ o(
|
|
225
|
+
children: /* @__PURE__ */ o(y, { kind: "up" })
|
|
192
226
|
}),
|
|
193
|
-
/* @__PURE__ */ o(
|
|
227
|
+
/* @__PURE__ */ o(t, {
|
|
194
228
|
tip: "下移一层",
|
|
195
229
|
onClick: () => b("down"),
|
|
196
|
-
children: /* @__PURE__ */ o(
|
|
230
|
+
children: /* @__PURE__ */ o(y, { kind: "down" })
|
|
197
231
|
}),
|
|
198
|
-
/* @__PURE__ */ o(
|
|
232
|
+
/* @__PURE__ */ o(t, {
|
|
199
233
|
tip: "置于底层",
|
|
200
234
|
onClick: () => b("back"),
|
|
201
|
-
children: /* @__PURE__ */ o(
|
|
235
|
+
children: /* @__PURE__ */ o(y, { kind: "back" })
|
|
202
236
|
})
|
|
203
237
|
]
|
|
204
238
|
})] }),
|
|
205
|
-
(
|
|
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
|
-
|
|
242
|
+
m && /* @__PURE__ */ o(t, {
|
|
209
243
|
tip: "成组",
|
|
210
244
|
shortcut: "⌘G",
|
|
211
|
-
onClick:
|
|
245
|
+
onClick: m,
|
|
212
246
|
disabled: g < 2,
|
|
213
|
-
children: /* @__PURE__ */ o(
|
|
247
|
+
children: /* @__PURE__ */ o(Ro, {})
|
|
214
248
|
}),
|
|
215
|
-
|
|
249
|
+
h && /* @__PURE__ */ o(t, {
|
|
216
250
|
tip: "几何分组",
|
|
217
251
|
shortcut: "⌘⌥G",
|
|
218
|
-
onClick:
|
|
252
|
+
onClick: h,
|
|
219
253
|
disabled: g < 2,
|
|
220
|
-
children: /* @__PURE__ */ o(
|
|
254
|
+
children: /* @__PURE__ */ o(zo, {})
|
|
221
255
|
}),
|
|
222
|
-
|
|
256
|
+
v && /* @__PURE__ */ o(t, {
|
|
223
257
|
tip: "取消成组",
|
|
224
258
|
shortcut: "⌘⇧G",
|
|
225
|
-
onClick:
|
|
226
|
-
disabled: !
|
|
227
|
-
children: /* @__PURE__ */ o(
|
|
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__ */
|
|
266
|
+
/* @__PURE__ */ n("div", {
|
|
233
267
|
className: "flow-toolbar-group",
|
|
234
268
|
children: [
|
|
235
|
-
/* @__PURE__ */ o(
|
|
269
|
+
/* @__PURE__ */ o(t, {
|
|
236
270
|
tip: "网格",
|
|
237
|
-
active:
|
|
238
|
-
onClick: () =>
|
|
239
|
-
children: /* @__PURE__ */ o(
|
|
271
|
+
active: F,
|
|
272
|
+
onClick: () => H(!F),
|
|
273
|
+
children: /* @__PURE__ */ o(Fo, {})
|
|
240
274
|
}),
|
|
241
|
-
/* @__PURE__ */ o(
|
|
275
|
+
/* @__PURE__ */ o(t, {
|
|
242
276
|
tip: "缩略图",
|
|
243
|
-
active:
|
|
244
|
-
onClick: () =>
|
|
245
|
-
children: /* @__PURE__ */ o(
|
|
277
|
+
active: G,
|
|
278
|
+
onClick: () => oo(!G),
|
|
279
|
+
children: /* @__PURE__ */ o(Lo, {})
|
|
246
280
|
}),
|
|
247
|
-
/* @__PURE__ */ o(
|
|
281
|
+
/* @__PURE__ */ o(t, {
|
|
248
282
|
tip: I ? "隐藏所有 Anchor 对象" : "显示所有 Anchor 对象",
|
|
249
283
|
active: I,
|
|
250
|
-
disabled: !
|
|
284
|
+
disabled: !S,
|
|
251
285
|
onClick: () => {
|
|
252
|
-
|
|
286
|
+
S && to(!I);
|
|
253
287
|
},
|
|
254
|
-
children: /* @__PURE__ */ o(
|
|
288
|
+
children: /* @__PURE__ */ o(Io, { visible: I })
|
|
255
289
|
}),
|
|
256
|
-
/* @__PURE__ */ o(
|
|
290
|
+
/* @__PURE__ */ o(t, {
|
|
257
291
|
tip: "动画预览",
|
|
258
|
-
active:
|
|
259
|
-
onClick: () =>
|
|
292
|
+
active: Z !== null,
|
|
293
|
+
onClick: () => eo(Z ? null : {
|
|
260
294
|
current: 0,
|
|
261
295
|
showAnchor: !1
|
|
262
296
|
}),
|
|
263
|
-
children: /* @__PURE__ */ o(
|
|
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__ */
|
|
307
|
+
/* @__PURE__ */ n("div", {
|
|
269
308
|
className: "flow-toolbar-group",
|
|
270
309
|
children: [
|
|
271
|
-
/* @__PURE__ */ o(
|
|
310
|
+
/* @__PURE__ */ o(t, {
|
|
272
311
|
tip: "形状面板",
|
|
273
|
-
active:
|
|
274
|
-
onClick: () =>
|
|
275
|
-
children: /* @__PURE__ */ o(
|
|
312
|
+
active: R,
|
|
313
|
+
onClick: () => Y(!R),
|
|
314
|
+
children: /* @__PURE__ */ o(Eo, {})
|
|
276
315
|
}),
|
|
277
|
-
/* @__PURE__ */ o(
|
|
316
|
+
/* @__PURE__ */ o(t, {
|
|
278
317
|
tip: "属性面板",
|
|
279
|
-
active:
|
|
280
|
-
onClick: () =>
|
|
281
|
-
children: /* @__PURE__ */ o(
|
|
318
|
+
active: M,
|
|
319
|
+
onClick: () => _(!M),
|
|
320
|
+
children: /* @__PURE__ */ o(jo, {})
|
|
282
321
|
}),
|
|
283
|
-
/* @__PURE__ */ o(
|
|
322
|
+
/* @__PURE__ */ o(t, {
|
|
284
323
|
tip: "大纲",
|
|
285
|
-
active:
|
|
286
|
-
onClick: () =>
|
|
287
|
-
children: /* @__PURE__ */ o(
|
|
324
|
+
active: j,
|
|
325
|
+
onClick: () => K(!j),
|
|
326
|
+
children: /* @__PURE__ */ o(Go, {})
|
|
288
327
|
}),
|
|
289
|
-
/* @__PURE__ */ o(
|
|
328
|
+
/* @__PURE__ */ o(t, {
|
|
290
329
|
tip: "JSON",
|
|
291
|
-
active:
|
|
292
|
-
onClick: () =>
|
|
293
|
-
children: /* @__PURE__ */ o(
|
|
330
|
+
active: J,
|
|
331
|
+
onClick: () => Q(!J),
|
|
332
|
+
children: /* @__PURE__ */ o(Jo, {})
|
|
294
333
|
}),
|
|
295
|
-
/* @__PURE__ */ o(
|
|
334
|
+
/* @__PURE__ */ o(t, {
|
|
296
335
|
tip: "AI 助手",
|
|
297
|
-
active:
|
|
298
|
-
onClick: () =>
|
|
299
|
-
children: /* @__PURE__ */ o(
|
|
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__ */
|
|
343
|
+
/* @__PURE__ */ n("div", {
|
|
305
344
|
className: "flow-toolbar-group",
|
|
306
345
|
children: [
|
|
307
|
-
/* @__PURE__ */ o(
|
|
346
|
+
/* @__PURE__ */ o(t, {
|
|
308
347
|
tip: "导入 JSON",
|
|
309
|
-
onClick:
|
|
310
|
-
children: /* @__PURE__ */ o(
|
|
348
|
+
onClick: ro,
|
|
349
|
+
children: /* @__PURE__ */ o(Mo, {})
|
|
311
350
|
}),
|
|
312
|
-
/* @__PURE__ */ o(
|
|
351
|
+
/* @__PURE__ */ o(t, {
|
|
313
352
|
tip: "导出 JSON",
|
|
314
|
-
onClick:
|
|
315
|
-
children: /* @__PURE__ */ o(
|
|
353
|
+
onClick: lo,
|
|
354
|
+
children: /* @__PURE__ */ o(Ao, {})
|
|
316
355
|
}),
|
|
317
|
-
/* @__PURE__ */ o(
|
|
356
|
+
/* @__PURE__ */ o(t, {
|
|
318
357
|
tip: "导出 Markdown",
|
|
319
|
-
onClick:
|
|
320
|
-
children: /* @__PURE__ */ o(
|
|
358
|
+
onClick: co,
|
|
359
|
+
children: /* @__PURE__ */ o(go, {})
|
|
321
360
|
}),
|
|
322
|
-
|
|
361
|
+
O && /* @__PURE__ */ o(t, {
|
|
323
362
|
tip: "导出 PNG",
|
|
324
363
|
onClick: () => {
|
|
325
|
-
|
|
364
|
+
O();
|
|
326
365
|
},
|
|
327
|
-
children: /* @__PURE__ */ o(
|
|
366
|
+
children: /* @__PURE__ */ o(Oo, {})
|
|
328
367
|
}),
|
|
329
|
-
|
|
368
|
+
x && S && /* @__PURE__ */ o(t, {
|
|
330
369
|
tip: "导出 PDF(按锦点顺序)",
|
|
331
370
|
onClick: () => {
|
|
332
|
-
|
|
371
|
+
x();
|
|
333
372
|
},
|
|
334
|
-
children: /* @__PURE__ */ o(
|
|
373
|
+
children: /* @__PURE__ */ o(So, {})
|
|
335
374
|
}),
|
|
336
|
-
|
|
375
|
+
z && /* @__PURE__ */ o(t, {
|
|
337
376
|
tip: "发布与共享",
|
|
338
|
-
onClick:
|
|
339
|
-
children: /* @__PURE__ */ o(
|
|
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
|
-
|
|
348
|
-
|
|
386
|
+
lt as FlowZoomControls,
|
|
387
|
+
ct as default
|
|
349
388
|
};
|
|
350
389
|
|
|
351
390
|
//# sourceMappingURL=FlowToolbar.js.map
|