@dou-ui/flow 0.1.0-alpha.29 → 0.1.0-alpha.30
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/flow-toolbar.js.map +1 -1
- package/dist/components/flow-toolbar.vue_vue_type_script_setup_true_lang.js +300 -9
- package/dist/components/flow-toolbar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/export/color.js +49 -6
- package/dist/export/color.js.map +1 -1
- package/dist/export/context.js +16 -9
- package/dist/export/context.js.map +1 -1
- package/dist/export/draw.js +6 -5
- package/dist/export/draw.js.map +1 -1
- package/dist/flow-editor.js.map +1 -1
- package/dist/flow-editor.vue_vue_type_script_setup_true_lang.js +318 -87
- package/dist/flow-editor.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/locale.js +90 -3
- package/dist/locale.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/style.js +1 -0
- package/dist/types/core/menu.d.ts +55 -0
- package/dist/types/export/color.d.ts +6 -1
- package/dist/types/flow-editor.vue.d.ts +1 -1
- package/dist/types/index.d.ts +4 -4
- package/dist/types/locale.d.ts +19 -1
- package/dist/types/whiteboard/board-node.vue.d.ts +5 -0
- package/dist/types/whiteboard/colors.d.ts +36 -0
- package/dist/types/whiteboard/index.d.ts +2 -2
- package/dist/types/whiteboard/model.d.ts +22 -3
- package/dist/types/whiteboard/toolbar.d.ts +46 -0
- package/dist/whiteboard/board-node.js.map +1 -1
- package/dist/whiteboard/board-node.vue_vue_type_script_setup_true_lang.js +50 -10
- package/dist/whiteboard/board-node.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/whiteboard/colors.js +84 -0
- package/dist/whiteboard/colors.js.map +1 -0
- package/dist/whiteboard/connector.js +42 -3
- package/dist/whiteboard/connector.js.map +1 -1
- package/dist/whiteboard/draw.js +26 -9
- package/dist/whiteboard/draw.js.map +1 -1
- package/dist/whiteboard/index.js +2 -1
- package/dist/whiteboard/kit.js +2 -0
- package/dist/whiteboard/kit.js.map +1 -1
- package/dist/whiteboard/model.js +2 -1
- package/dist/whiteboard/model.js.map +1 -1
- package/dist/whiteboard/toolbar.js +296 -0
- package/dist/whiteboard/toolbar.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { format } from "../locale.js";
|
|
2
|
+
import { colorDisplayName, normalizeColorValue, normalizeOpaqueColor, resolveFillColor, resolveStrokeColor, resolveTextColor, whiteboardColors } from "./colors.js";
|
|
3
|
+
import { PaintBucketIcon, PaletteIcon, SquareDashedIcon, SquareIcon, TypeIcon } from "@dou-ui/icons";
|
|
4
|
+
// src/whiteboard/toolbar.ts
|
|
5
|
+
var isShape = (node) => (node.type ?? "shape") === "shape";
|
|
6
|
+
var isSticky = (node) => node.type === "sticky";
|
|
7
|
+
var isText = (node) => node.type === "text";
|
|
8
|
+
var isInk = (node) => node.type === "ink";
|
|
9
|
+
function kindOf(node) {
|
|
10
|
+
if (isShape(node)) return "shape";
|
|
11
|
+
if (isSticky(node)) return "sticky";
|
|
12
|
+
if (isText(node)) return "text";
|
|
13
|
+
if (isInk(node)) return "ink";
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
/** Merges `patch` into `base`, omitting keys set to `undefined` for clean JSON data. */
|
|
17
|
+
function cleanData(base, patch) {
|
|
18
|
+
const next = { ...base };
|
|
19
|
+
for (const [key, value] of Object.entries(patch)) if (value === void 0) delete next[key];
|
|
20
|
+
else next[key] = value;
|
|
21
|
+
return next;
|
|
22
|
+
}
|
|
23
|
+
/** Shallow-compares two optional data objects so no-op color picks skip empty history steps. */
|
|
24
|
+
function sameData(a, b) {
|
|
25
|
+
if (a === b) return true;
|
|
26
|
+
if (!a || !b) return false;
|
|
27
|
+
const keysA = Object.keys(a);
|
|
28
|
+
const keysB = Object.keys(b);
|
|
29
|
+
if (keysA.length !== keysB.length) return false;
|
|
30
|
+
for (const key of keysA) if (!Object.prototype.hasOwnProperty.call(b, key) || !Object.is(a[key], b[key])) return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
/** Shared value across a selection, or `null` when items disagree (mixed). */
|
|
34
|
+
function sharedValue(values) {
|
|
35
|
+
const set = new Set(values);
|
|
36
|
+
return set.size === 1 ? [...set][0] : null;
|
|
37
|
+
}
|
|
38
|
+
var dragSeq = 0;
|
|
39
|
+
var activeGroups = /* @__PURE__ */ new WeakMap();
|
|
40
|
+
/** Allocates or closes a transaction group so live drags in `DouColorPanel` undo as one step. */
|
|
41
|
+
function colorTransactionMeta(ctx, scope, live) {
|
|
42
|
+
const current = activeGroups.get(ctx);
|
|
43
|
+
if (live) {
|
|
44
|
+
const entry = current?.scope === scope ? current : {
|
|
45
|
+
scope,
|
|
46
|
+
id: ++dragSeq
|
|
47
|
+
};
|
|
48
|
+
activeGroups.set(ctx, entry);
|
|
49
|
+
return { group: `board-color:${entry.id}` };
|
|
50
|
+
}
|
|
51
|
+
if (current) {
|
|
52
|
+
activeGroups.delete(ctx);
|
|
53
|
+
if (current.scope === scope) return { group: `board-color:${current.id}` };
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** Drops any unclosed live-drag group when the popover closes or selection changes. */
|
|
57
|
+
function resetColorGroup(ctx, scope) {
|
|
58
|
+
const current = activeGroups.get(ctx);
|
|
59
|
+
if (current && (!scope || current.scope === scope)) activeGroups.delete(ctx);
|
|
60
|
+
}
|
|
61
|
+
function palettePresets(kind, t) {
|
|
62
|
+
return whiteboardColors.map((name) => ({
|
|
63
|
+
value: name,
|
|
64
|
+
label: t.colors[name],
|
|
65
|
+
swatch: kind === "fill" ? `var(--dou-whiteboard-fill-${name})` : `var(--dou-whiteboard-color-${name})`
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
/** Builds one color-picker toolbar item shared by board nodes and connectors. */
|
|
69
|
+
function colorToolbarItem(options) {
|
|
70
|
+
const { ctx, key, scope = key, kind, icon, value, swatch, disabled, labelOf, announceSet, noneOption, apply } = options;
|
|
71
|
+
const t = ctx.messages.value.board;
|
|
72
|
+
const isNone = !!noneOption && value === noneOption.value;
|
|
73
|
+
const display = colorDisplayName(value, t, noneOption?.label);
|
|
74
|
+
return {
|
|
75
|
+
key,
|
|
76
|
+
label: format(labelOf, { value: display }),
|
|
77
|
+
icon,
|
|
78
|
+
disabled,
|
|
79
|
+
color: {
|
|
80
|
+
value,
|
|
81
|
+
kind,
|
|
82
|
+
swatch: isNone ? void 0 : swatch,
|
|
83
|
+
none: isNone,
|
|
84
|
+
defaultLabel: t.colorDefault,
|
|
85
|
+
noneOption,
|
|
86
|
+
presets: palettePresets(kind, t),
|
|
87
|
+
customLabel: t.colorCustom,
|
|
88
|
+
select(next, opts) {
|
|
89
|
+
const live = !!opts?.live;
|
|
90
|
+
apply(next, colorTransactionMeta(ctx, scope, live));
|
|
91
|
+
if (!live) {
|
|
92
|
+
const nextName = colorDisplayName(next, ctx.messages.value.board, noneOption?.label);
|
|
93
|
+
ctx.announce(format(announceSet, { value: nextName }));
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
close() {
|
|
97
|
+
resetColorGroup(ctx, scope);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function effectiveFill(node) {
|
|
103
|
+
if (isShape(node)) {
|
|
104
|
+
const data = node.data ?? {};
|
|
105
|
+
const fill = normalizeColorValue(data.fill);
|
|
106
|
+
return (fill && resolveFillColor(fill, "shape") ? fill : void 0) ?? (data.tone && data.tone !== "neutral" ? data.tone : void 0);
|
|
107
|
+
}
|
|
108
|
+
if (isSticky(node)) {
|
|
109
|
+
const data = node.data ?? {};
|
|
110
|
+
const fill = normalizeColorValue(data.fill);
|
|
111
|
+
return (fill && resolveFillColor(fill, "sticky") ? fill : void 0) ?? (data.tone && data.tone !== "warning" ? data.tone : void 0);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
function effectiveStroke(node) {
|
|
115
|
+
const data = node.data ?? {};
|
|
116
|
+
const stroke = normalizeColorValue(data.stroke);
|
|
117
|
+
return (stroke && resolveStrokeColor(stroke) ? stroke : void 0) ?? (data.tone && data.tone !== "neutral" ? data.tone : void 0);
|
|
118
|
+
}
|
|
119
|
+
function effectiveTextColor(node) {
|
|
120
|
+
const raw = isText(node) ? normalizeOpaqueColor(node.data?.color) : normalizeOpaqueColor(node.data?.textColor);
|
|
121
|
+
return raw && resolveTextColor(raw) ? raw : void 0;
|
|
122
|
+
}
|
|
123
|
+
function effectiveInkColor(node) {
|
|
124
|
+
const data = node.data ?? {};
|
|
125
|
+
const raw = normalizeOpaqueColor(data.color);
|
|
126
|
+
return (raw && resolveStrokeColor(raw) ? raw : void 0) ?? (data.tone && data.tone !== "neutral" ? data.tone : void 0);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Fill, border (with borderless toggle), text color and ink color controls
|
|
130
|
+
* over the selected whiteboard nodes.
|
|
131
|
+
*/
|
|
132
|
+
function boardNodeToolbar(ctx, nodes) {
|
|
133
|
+
const kinds = nodes.map(kindOf);
|
|
134
|
+
if (kinds.some((k) => k === null)) return [];
|
|
135
|
+
const t = ctx.messages.value.board;
|
|
136
|
+
const allLocked = nodes.every((node) => node.locked);
|
|
137
|
+
const editable = () => nodes.filter((node) => !node.locked);
|
|
138
|
+
const targetKey = nodes.map((node) => node.id).sort().join(",");
|
|
139
|
+
const items = [];
|
|
140
|
+
const allShapes = kinds.every((k) => k === "shape");
|
|
141
|
+
const allFillable = kinds.every((k) => k === "shape" || k === "sticky");
|
|
142
|
+
const allWritable = kinds.every((k) => k === "shape" || k === "sticky" || k === "text");
|
|
143
|
+
const allInk = kinds.every((k) => k === "ink");
|
|
144
|
+
if (allFillable) {
|
|
145
|
+
const value = sharedValue(nodes.map(effectiveFill));
|
|
146
|
+
const swatch = value && value !== "none" ? resolveStrokeColor(value) : void 0;
|
|
147
|
+
items.push(colorToolbarItem({
|
|
148
|
+
ctx,
|
|
149
|
+
key: "board-fill",
|
|
150
|
+
scope: `board-fill:n:${targetKey}`,
|
|
151
|
+
kind: "fill",
|
|
152
|
+
icon: PaintBucketIcon,
|
|
153
|
+
value,
|
|
154
|
+
swatch: swatch === "none" ? void 0 : swatch,
|
|
155
|
+
disabled: allLocked,
|
|
156
|
+
labelOf: t.fillOf,
|
|
157
|
+
announceSet: t.fillSet,
|
|
158
|
+
noneOption: {
|
|
159
|
+
value: "none",
|
|
160
|
+
label: t.fillNone
|
|
161
|
+
},
|
|
162
|
+
apply(next, meta) {
|
|
163
|
+
const targets = editable();
|
|
164
|
+
if (!targets.length) return;
|
|
165
|
+
ctx.transact((tr) => {
|
|
166
|
+
for (const node of targets) {
|
|
167
|
+
const current = tr.getNode(node.id);
|
|
168
|
+
if (!current || effectiveFill(current) === next) continue;
|
|
169
|
+
if (isShape(current)) {
|
|
170
|
+
const data = current.data ?? {};
|
|
171
|
+
const patch = { fill: next };
|
|
172
|
+
if (data.tone !== void 0) {
|
|
173
|
+
patch.tone = void 0;
|
|
174
|
+
if (data.tone !== "neutral" && data.stroke === void 0) patch.stroke = data.tone;
|
|
175
|
+
}
|
|
176
|
+
const nextData = cleanData(current.data, patch);
|
|
177
|
+
if (!sameData(current.data, nextData)) tr.updateNode(current.id, { data: nextData });
|
|
178
|
+
} else if (isSticky(current)) {
|
|
179
|
+
const nextData = cleanData(current.data, {
|
|
180
|
+
fill: next,
|
|
181
|
+
tone: void 0
|
|
182
|
+
});
|
|
183
|
+
if (!sameData(current.data, nextData)) tr.updateNode(current.id, { data: nextData });
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}, meta);
|
|
187
|
+
}
|
|
188
|
+
}));
|
|
189
|
+
}
|
|
190
|
+
if (allShapes) {
|
|
191
|
+
const value = sharedValue(nodes.map(effectiveStroke));
|
|
192
|
+
const borderless = value === "none";
|
|
193
|
+
const swatch = value && !borderless ? resolveStrokeColor(value) : void 0;
|
|
194
|
+
items.push(colorToolbarItem({
|
|
195
|
+
ctx,
|
|
196
|
+
key: "board-stroke",
|
|
197
|
+
scope: `board-stroke:n:${targetKey}`,
|
|
198
|
+
kind: "stroke",
|
|
199
|
+
icon: borderless ? SquareDashedIcon : SquareIcon,
|
|
200
|
+
value,
|
|
201
|
+
swatch: swatch === "none" ? void 0 : swatch,
|
|
202
|
+
disabled: allLocked,
|
|
203
|
+
labelOf: t.strokeOf,
|
|
204
|
+
announceSet: t.strokeSet,
|
|
205
|
+
noneOption: {
|
|
206
|
+
value: "none",
|
|
207
|
+
label: t.borderNone,
|
|
208
|
+
icon: SquareDashedIcon
|
|
209
|
+
},
|
|
210
|
+
apply(next, meta) {
|
|
211
|
+
const targets = editable();
|
|
212
|
+
if (!targets.length) return;
|
|
213
|
+
ctx.transact((tr) => {
|
|
214
|
+
for (const node of targets) {
|
|
215
|
+
const current = tr.getNode(node.id);
|
|
216
|
+
if (!current || effectiveStroke(current) === next) continue;
|
|
217
|
+
const data = current.data ?? {};
|
|
218
|
+
const patch = { stroke: next };
|
|
219
|
+
if (data.tone !== void 0) {
|
|
220
|
+
patch.tone = void 0;
|
|
221
|
+
if (data.tone !== "neutral" && data.fill === void 0) patch.fill = data.tone;
|
|
222
|
+
}
|
|
223
|
+
const nextData = cleanData(current.data, patch);
|
|
224
|
+
if (!sameData(current.data, nextData)) tr.updateNode(current.id, { data: nextData });
|
|
225
|
+
}
|
|
226
|
+
}, meta);
|
|
227
|
+
}
|
|
228
|
+
}));
|
|
229
|
+
}
|
|
230
|
+
if (allWritable) {
|
|
231
|
+
const value = sharedValue(nodes.map(effectiveTextColor));
|
|
232
|
+
const swatch = value ? resolveTextColor(value) : void 0;
|
|
233
|
+
items.push(colorToolbarItem({
|
|
234
|
+
ctx,
|
|
235
|
+
key: "board-text-color",
|
|
236
|
+
scope: `board-text-color:n:${targetKey}`,
|
|
237
|
+
kind: "text",
|
|
238
|
+
icon: TypeIcon,
|
|
239
|
+
value,
|
|
240
|
+
swatch,
|
|
241
|
+
disabled: allLocked,
|
|
242
|
+
labelOf: t.textColorOf,
|
|
243
|
+
announceSet: t.textColorSet,
|
|
244
|
+
apply(next, meta) {
|
|
245
|
+
const targets = editable();
|
|
246
|
+
if (!targets.length) return;
|
|
247
|
+
const color = next === "none" ? void 0 : next;
|
|
248
|
+
ctx.transact((tr) => {
|
|
249
|
+
for (const node of targets) {
|
|
250
|
+
const current = tr.getNode(node.id);
|
|
251
|
+
if (!current || effectiveTextColor(current) === color) continue;
|
|
252
|
+
const field = isText(current) ? "color" : "textColor";
|
|
253
|
+
const nextData = cleanData(current.data, { [field]: color });
|
|
254
|
+
if (!sameData(current.data, nextData)) tr.updateNode(current.id, { data: nextData });
|
|
255
|
+
}
|
|
256
|
+
}, meta);
|
|
257
|
+
}
|
|
258
|
+
}));
|
|
259
|
+
}
|
|
260
|
+
if (allInk) {
|
|
261
|
+
const value = sharedValue(nodes.map(effectiveInkColor));
|
|
262
|
+
const swatch = value ? resolveStrokeColor(value) : void 0;
|
|
263
|
+
items.push(colorToolbarItem({
|
|
264
|
+
ctx,
|
|
265
|
+
key: "board-ink-color",
|
|
266
|
+
scope: `board-ink-color:n:${targetKey}`,
|
|
267
|
+
kind: "stroke",
|
|
268
|
+
icon: PaletteIcon,
|
|
269
|
+
value,
|
|
270
|
+
swatch: swatch === "none" ? void 0 : swatch,
|
|
271
|
+
disabled: allLocked,
|
|
272
|
+
labelOf: t.lineColorOf,
|
|
273
|
+
announceSet: t.lineColorSet,
|
|
274
|
+
apply(next, meta) {
|
|
275
|
+
const targets = editable();
|
|
276
|
+
if (!targets.length) return;
|
|
277
|
+
const color = next === "none" ? void 0 : next;
|
|
278
|
+
ctx.transact((tr) => {
|
|
279
|
+
for (const node of targets) {
|
|
280
|
+
const current = tr.getNode(node.id);
|
|
281
|
+
if (!current || effectiveInkColor(current) === color) continue;
|
|
282
|
+
const nextData = cleanData(current.data, {
|
|
283
|
+
color,
|
|
284
|
+
tone: void 0
|
|
285
|
+
});
|
|
286
|
+
if (!sameData(current.data, nextData)) tr.updateNode(current.id, { data: nextData });
|
|
287
|
+
}
|
|
288
|
+
}, meta);
|
|
289
|
+
}
|
|
290
|
+
}));
|
|
291
|
+
}
|
|
292
|
+
return items;
|
|
293
|
+
}
|
|
294
|
+
export { boardNodeToolbar, cleanData, colorToolbarItem, colorTransactionMeta, palettePresets, resetColorGroup, sameData, sharedValue };
|
|
295
|
+
|
|
296
|
+
//# sourceMappingURL=toolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.js","names":[],"sources":["../../src/whiteboard/toolbar.ts"],"sourcesContent":["import { PaintBucketIcon, PaletteIcon, SquareDashedIcon, SquareIcon, TypeIcon } from '@dou-ui/icons'\nimport type { Component } from 'vue'\nimport type { FlowEditorContext } from '../context'\nimport type { FlowToolbarColorPreset, FlowToolbarItem } from '../core/menu'\nimport type { FlowData, FlowNode } from '../core/model'\nimport { format, type FlowMessages } from '../locale'\nimport {\n colorDisplayName,\n normalizeColorValue,\n normalizeOpaqueColor,\n resolveFillColor,\n resolveStrokeColor,\n resolveTextColor,\n whiteboardColors,\n} from './colors'\nimport type {\n WhiteboardInkData,\n WhiteboardShapeData,\n WhiteboardStickyData,\n WhiteboardTextData,\n} from './model'\n\ntype BoardKind = 'shape' | 'sticky' | 'text' | 'ink'\n\nconst isShape = (node: FlowNode) => (node.type ?? 'shape') === 'shape'\nconst isSticky = (node: FlowNode) => node.type === 'sticky'\nconst isText = (node: FlowNode) => node.type === 'text'\nconst isInk = (node: FlowNode) => node.type === 'ink'\n\nfunction kindOf(node: FlowNode): BoardKind | null {\n if (isShape(node)) return 'shape'\n if (isSticky(node)) return 'sticky'\n if (isText(node)) return 'text'\n if (isInk(node)) return 'ink'\n return null\n}\n\n/** Merges `patch` into `base`, omitting keys set to `undefined` for clean JSON data. */\nexport function cleanData(\n base: FlowData | undefined,\n patch: Record<string, unknown>,\n): Record<string, unknown> {\n const next: Record<string, unknown> = { ...base }\n for (const [key, value] of Object.entries(patch)) {\n if (value === undefined) delete next[key]\n else next[key] = value\n }\n return next\n}\n\n/** Shallow-compares two optional data objects so no-op color picks skip empty history steps. */\nexport function sameData(a: FlowData | undefined, b: FlowData | undefined): boolean {\n if (a === b) return true\n if (!a || !b) return false\n const keysA = Object.keys(a)\n const keysB = Object.keys(b)\n if (keysA.length !== keysB.length) return false\n for (const key of keysA) {\n if (!Object.prototype.hasOwnProperty.call(b, key) || !Object.is(a[key], b[key])) return false\n }\n return true\n}\n\n/** Shared value across a selection, or `null` when items disagree (mixed). */\nexport function sharedValue(values: (string | undefined)[]): string | null | undefined {\n const set = new Set(values)\n return set.size === 1 ? [...set][0] : null\n}\n\nlet dragSeq = 0\nconst activeGroups = new WeakMap<FlowEditorContext, { scope: string; id: number }>()\n\n/** Allocates or closes a transaction group so live drags in `DouColorPanel` undo as one step. */\nexport function colorTransactionMeta(\n ctx: FlowEditorContext,\n scope: string,\n live: boolean,\n): { group?: string } | undefined {\n const current = activeGroups.get(ctx)\n if (live) {\n const entry = current?.scope === scope ? current : { scope, id: ++dragSeq }\n activeGroups.set(ctx, entry)\n return { group: `board-color:${entry.id}` }\n }\n if (current) {\n activeGroups.delete(ctx)\n if (current.scope === scope) return { group: `board-color:${current.id}` }\n }\n return undefined\n}\n\n/** Drops any unclosed live-drag group when the popover closes or selection changes. */\nexport function resetColorGroup(ctx: FlowEditorContext, scope?: string) {\n const current = activeGroups.get(ctx)\n if (current && (!scope || current.scope === scope)) activeGroups.delete(ctx)\n}\n\nexport function palettePresets(\n kind: 'fill' | 'stroke' | 'text',\n t: FlowMessages['board'],\n): FlowToolbarColorPreset[] {\n return whiteboardColors.map((name) => ({\n value: name,\n label: t.colors[name],\n swatch:\n kind === 'fill'\n ? `var(--dou-whiteboard-fill-${name})`\n : `var(--dou-whiteboard-color-${name})`,\n }))\n}\n\nexport interface ColorToolbarOptions {\n ctx: FlowEditorContext\n key: string\n /** Scope including the selected targets so live drags on different items never merge. */\n scope?: string\n kind: 'fill' | 'stroke' | 'text'\n icon: Component\n value: string | null | undefined\n swatch: string | undefined\n disabled?: boolean\n labelOf: string\n announceSet: string\n noneOption?: { value: string; label: string; icon?: Component }\n apply: (value: string | undefined, meta?: { group?: string }) => void\n}\n\n/** Builds one color-picker toolbar item shared by board nodes and connectors. */\nexport function colorToolbarItem(options: ColorToolbarOptions): FlowToolbarItem {\n const {\n ctx,\n key,\n scope = key,\n kind,\n icon,\n value,\n swatch,\n disabled,\n labelOf,\n announceSet,\n noneOption,\n apply,\n } = options\n const t = ctx.messages.value.board\n const isNone = !!noneOption && value === noneOption.value\n const display = colorDisplayName(value, t, noneOption?.label)\n return {\n key,\n label: format(labelOf, { value: display }),\n icon,\n disabled,\n color: {\n value,\n kind,\n swatch: isNone ? undefined : swatch,\n none: isNone,\n defaultLabel: t.colorDefault,\n noneOption,\n presets: palettePresets(kind, t),\n customLabel: t.colorCustom,\n select(next, opts) {\n const live = !!opts?.live\n apply(next, colorTransactionMeta(ctx, scope, live))\n if (!live) {\n const nextName = colorDisplayName(next, ctx.messages.value.board, noneOption?.label)\n ctx.announce(format(announceSet, { value: nextName }))\n }\n },\n close() {\n resetColorGroup(ctx, scope)\n },\n },\n }\n}\n\nfunction effectiveFill(node: FlowNode): string | undefined {\n if (isShape(node)) {\n const data = (node.data ?? {}) as WhiteboardShapeData\n const fill = normalizeColorValue(data.fill)\n const valid = fill && resolveFillColor(fill, 'shape') ? fill : undefined\n return valid ?? (data.tone && data.tone !== 'neutral' ? data.tone : undefined)\n }\n if (isSticky(node)) {\n const data = (node.data ?? {}) as WhiteboardStickyData\n const fill = normalizeColorValue(data.fill)\n const valid = fill && resolveFillColor(fill, 'sticky') ? fill : undefined\n return valid ?? (data.tone && data.tone !== 'warning' ? data.tone : undefined)\n }\n return undefined\n}\n\nfunction effectiveStroke(node: FlowNode): string | undefined {\n const data = (node.data ?? {}) as WhiteboardShapeData\n const stroke = normalizeColorValue(data.stroke)\n const valid = stroke && resolveStrokeColor(stroke) ? stroke : undefined\n return valid ?? (data.tone && data.tone !== 'neutral' ? data.tone : undefined)\n}\n\nfunction effectiveTextColor(node: FlowNode): string | undefined {\n const raw = isText(node)\n ? normalizeOpaqueColor((node.data as WhiteboardTextData | undefined)?.color)\n : normalizeOpaqueColor(\n (node.data as WhiteboardShapeData | WhiteboardStickyData | undefined)?.textColor,\n )\n return raw && resolveTextColor(raw) ? raw : undefined\n}\n\nfunction effectiveInkColor(node: FlowNode): string | undefined {\n const data = (node.data ?? {}) as WhiteboardInkData\n const raw = normalizeOpaqueColor(data.color)\n const valid = raw && resolveStrokeColor(raw) ? raw : undefined\n return valid ?? (data.tone && data.tone !== 'neutral' ? data.tone : undefined)\n}\n\n/**\n * Fill, border (with borderless toggle), text color and ink color controls\n * over the selected whiteboard nodes.\n */\nexport function boardNodeToolbar(ctx: FlowEditorContext, nodes: FlowNode[]): FlowToolbarItem[] {\n const kinds = nodes.map(kindOf)\n if (kinds.some((k) => k === null)) return []\n const t = ctx.messages.value.board\n const allLocked = nodes.every((node) => node.locked)\n const editable = () => nodes.filter((node) => !node.locked)\n const targetKey = nodes\n .map((node) => node.id)\n // oxlint-disable-next-line unicorn/no-array-sort -- sorts a fresh array\n .sort()\n .join(',')\n const items: FlowToolbarItem[] = []\n\n const allShapes = kinds.every((k) => k === 'shape')\n const allFillable = kinds.every((k) => k === 'shape' || k === 'sticky')\n const allWritable = kinds.every((k) => k === 'shape' || k === 'sticky' || k === 'text')\n const allInk = kinds.every((k) => k === 'ink')\n\n if (allFillable) {\n const value = sharedValue(nodes.map(effectiveFill))\n // Like @dou-ui/sheet, preset fill swatches in the popover show the soft fill token while\n // the button indicator bar uses the matching vivid palette token so it reads cleanly without halos.\n const swatch = value && value !== 'none' ? resolveStrokeColor(value) : undefined\n items.push(\n colorToolbarItem({\n ctx,\n key: 'board-fill',\n scope: `board-fill:n:${targetKey}`,\n kind: 'fill',\n icon: PaintBucketIcon,\n value,\n swatch: swatch === 'none' ? undefined : swatch,\n disabled: allLocked,\n labelOf: t.fillOf,\n announceSet: t.fillSet,\n noneOption: { value: 'none', label: t.fillNone },\n apply(next, meta) {\n const targets = editable()\n if (!targets.length) return\n ctx.transact((tr) => {\n for (const node of targets) {\n const current = tr.getNode(node.id)\n if (!current || effectiveFill(current) === next) continue\n if (isShape(current)) {\n const data = (current.data ?? {}) as WhiteboardShapeData\n const patch: Record<string, unknown> = { fill: next }\n // Preserve untouched stroke from legacy `tone` before dropping `tone`\n // so clearing fill later returns to neutral default instead of snapping back.\n if (data.tone !== undefined) {\n patch.tone = undefined\n if (data.tone !== 'neutral' && data.stroke === undefined) patch.stroke = data.tone\n }\n const nextData = cleanData(current.data, patch)\n if (!sameData(current.data, nextData)) tr.updateNode(current.id, { data: nextData })\n } else if (isSticky(current)) {\n const nextData = cleanData(current.data, { fill: next, tone: undefined })\n if (!sameData(current.data, nextData)) tr.updateNode(current.id, { data: nextData })\n }\n }\n }, meta)\n },\n }),\n )\n }\n\n if (allShapes) {\n const value = sharedValue(nodes.map(effectiveStroke))\n const borderless = value === 'none'\n const swatch = value && !borderless ? resolveStrokeColor(value) : undefined\n items.push(\n colorToolbarItem({\n ctx,\n key: 'board-stroke',\n scope: `board-stroke:n:${targetKey}`,\n kind: 'stroke',\n icon: borderless ? SquareDashedIcon : SquareIcon,\n value,\n swatch: swatch === 'none' ? undefined : swatch,\n disabled: allLocked,\n labelOf: t.strokeOf,\n announceSet: t.strokeSet,\n noneOption: { value: 'none', label: t.borderNone, icon: SquareDashedIcon },\n apply(next, meta) {\n const targets = editable()\n if (!targets.length) return\n ctx.transact((tr) => {\n for (const node of targets) {\n const current = tr.getNode(node.id)\n if (!current || effectiveStroke(current) === next) continue\n const data = (current.data ?? {}) as WhiteboardShapeData\n const patch: Record<string, unknown> = { stroke: next }\n if (data.tone !== undefined) {\n patch.tone = undefined\n if (data.tone !== 'neutral' && data.fill === undefined) patch.fill = data.tone\n }\n const nextData = cleanData(current.data, patch)\n if (!sameData(current.data, nextData)) tr.updateNode(current.id, { data: nextData })\n }\n }, meta)\n },\n }),\n )\n }\n\n if (allWritable) {\n const value = sharedValue(nodes.map(effectiveTextColor))\n const swatch = value ? resolveTextColor(value) : undefined\n items.push(\n colorToolbarItem({\n ctx,\n key: 'board-text-color',\n scope: `board-text-color:n:${targetKey}`,\n kind: 'text',\n icon: TypeIcon,\n value,\n swatch,\n disabled: allLocked,\n labelOf: t.textColorOf,\n announceSet: t.textColorSet,\n apply(next, meta) {\n const targets = editable()\n if (!targets.length) return\n const color = next === 'none' ? undefined : next\n ctx.transact((tr) => {\n for (const node of targets) {\n const current = tr.getNode(node.id)\n if (!current || effectiveTextColor(current) === color) continue\n const field = isText(current) ? 'color' : 'textColor'\n const nextData = cleanData(current.data, { [field]: color })\n if (!sameData(current.data, nextData)) tr.updateNode(current.id, { data: nextData })\n }\n }, meta)\n },\n }),\n )\n }\n\n if (allInk) {\n const value = sharedValue(nodes.map(effectiveInkColor))\n const swatch = value ? resolveStrokeColor(value) : undefined\n items.push(\n colorToolbarItem({\n ctx,\n key: 'board-ink-color',\n scope: `board-ink-color:n:${targetKey}`,\n kind: 'stroke',\n icon: PaletteIcon,\n value,\n swatch: swatch === 'none' ? undefined : swatch,\n disabled: allLocked,\n labelOf: t.lineColorOf,\n announceSet: t.lineColorSet,\n apply(next, meta) {\n const targets = editable()\n if (!targets.length) return\n const color = next === 'none' ? undefined : next\n ctx.transact((tr) => {\n for (const node of targets) {\n const current = tr.getNode(node.id)\n if (!current || effectiveInkColor(current) === color) continue\n const nextData = cleanData(current.data, { color, tone: undefined })\n if (!sameData(current.data, nextData)) tr.updateNode(current.id, { data: nextData })\n }\n }, meta)\n },\n }),\n )\n }\n\n return items\n}\n"],"mappings":";;;;AAwBA,IAAM,WAAW,UAAoB,KAAK,QAAQ,aAAa;AAC/D,IAAM,YAAY,SAAmB,KAAK,SAAS;AACnD,IAAM,UAAU,SAAmB,KAAK,SAAS;AACjD,IAAM,SAAS,SAAmB,KAAK,SAAS;AAEhD,SAAS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,iBAAiB;GACf;GACA,KAAK;GACL,OAAO,qBAAqB;GAC5B,MAAM;GACN,MAAM;GACN;GACA,QAAQ,WAAW,SAAS,KAAA,IAAY;GACxC,UAAU;GACV,SAAS,EAAE;GACX,aAAa,EAAE;GACf,MAAM,MAAM,MAAM;IAChB,MAAM,UAAU,SAAS;IACzB,IAAI,CAAC,QAAQ,QAAQ;IACrB,MAAM,QAAQ,SAAS,SAAS,KAAA,IAAY;IAC5C,IAAI,UAAU,OAAO;KACnB,KAAK,MAAM,QAAQ,SAAS;MAC1B,MAAM,UAAU,GAAG,QAAQ,KAAK,EAAE;MAClC,IAAI,CAAC,WAAW,kBAAkB,OAAO,MAAM,OAAO;MACtD,MAAM,WAAW,UAAU,QAAQ,MAAM;OAAE;OAAO,MAAM,KAAA;MAAU,CAAC;MACnE,IAAI,CAAC,SAAS,QAAQ,MAAM,QAAQ,GAAG,GAAG,WAAW,QAAQ,IAAI,EAAE,MAAM,SAAS,CAAC;KACrF;IACF,GAAG,IAAI;GACT;EACF,CAAC,CACH;CACF;CAEA,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dou-ui/flow",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.30",
|
|
4
4
|
"description": "DouUI 的流程编辑器:在无限画布上拖动节点、连接端口",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"build": "vite build && vue-tsc -p tsconfig.build.json && bun scripts/build-style.ts"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"dou-ui": "0.1.0-alpha.
|
|
57
|
+
"dou-ui": "0.1.0-alpha.30",
|
|
58
58
|
"vue": "^3.5.0",
|
|
59
59
|
"yjs": "^13.6.0"
|
|
60
60
|
},
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@dou-ui/icons": "0.1.0-alpha.
|
|
67
|
+
"@dou-ui/icons": "0.1.0-alpha.30"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"y-protocols": "^1.0.7",
|