@daasboard/editor 0.0.0-stage → 0.1.0
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/LICENSE +5 -0
- package/README.md +6 -2
- package/dist/camera/CameraInput.d.ts +106 -0
- package/dist/camera/CameraInput.js +398 -0
- package/dist/clipboard/ObjectClipboard.d.ts +40 -0
- package/dist/clipboard/ObjectClipboard.js +243 -0
- package/dist/clipboard/PasteCommitError.d.ts +4 -0
- package/dist/clipboard/PasteCommitError.js +7 -0
- package/dist/clipboard/carrier.d.ts +5 -0
- package/dist/clipboard/carrier.js +59 -0
- package/dist/clipboard/objects.d.ts +21 -0
- package/dist/clipboard/objects.js +362 -0
- package/dist/clipboard/placement.d.ts +11 -0
- package/dist/clipboard/placement.js +21 -0
- package/dist/clipboard/systemImages.d.ts +1 -0
- package/dist/clipboard/systemImages.js +24 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +22 -0
- package/dist/input/TouchInput.d.ts +159 -0
- package/dist/input/TouchInput.js +656 -0
- package/dist/input/visiblePart.d.ts +8 -0
- package/dist/input/visiblePart.js +15 -0
- package/dist/interaction/InteractionLayer.d.ts +83 -0
- package/dist/interaction/InteractionLayer.js +520 -0
- package/dist/props/PropertyController.d.ts +130 -0
- package/dist/props/PropertyController.js +1448 -0
- package/dist/props/PropertyRegistry.d.ts +38 -0
- package/dist/props/PropertyRegistry.js +21 -0
- package/dist/props/builtinProperties.d.ts +23 -0
- package/dist/props/builtinProperties.js +350 -0
- package/dist/props/defaults.d.ts +6 -0
- package/dist/props/defaults.js +29 -0
- package/dist/selection/SelectionModel.d.ts +25 -0
- package/dist/selection/SelectionModel.js +79 -0
- package/dist/text/CanvasEditorView.d.ts +99 -0
- package/dist/text/CanvasEditorView.js +308 -0
- package/dist/text/InputSink.d.ts +157 -0
- package/dist/text/InputSink.js +841 -0
- package/dist/text/TextEditSession.d.ts +173 -0
- package/dist/text/TextEditSession.js +1328 -0
- package/dist/text/clipboard.d.ts +11 -0
- package/dist/text/clipboard.js +489 -0
- package/dist/text/commands.d.ts +48 -0
- package/dist/text/commands.js +329 -0
- package/dist/text/contextMirror.d.ts +51 -0
- package/dist/text/contextMirror.js +292 -0
- package/dist/text/flat.d.ts +35 -0
- package/dist/text/flat.js +556 -0
- package/dist/text/graphemes.d.ts +16 -0
- package/dist/text/graphemes.js +219 -0
- package/dist/text/index.d.ts +13 -0
- package/dist/text/index.js +13 -0
- package/dist/text/inputReducer.d.ts +24 -0
- package/dist/text/inputReducer.js +44 -0
- package/dist/text/keymap.d.ts +17 -0
- package/dist/text/keymap.js +148 -0
- package/dist/text/schema.d.ts +12 -0
- package/dist/text/schema.js +44 -0
- package/dist/text/sessionFocus.d.ts +20 -0
- package/dist/text/sessionFocus.js +51 -0
- package/dist/text/types.d.ts +114 -0
- package/dist/text/types.js +1 -0
- package/dist/tools/CreateTool.d.ts +78 -0
- package/dist/tools/CreateTool.js +258 -0
- package/dist/tools/SelectTool.d.ts +155 -0
- package/dist/tools/SelectTool.js +808 -0
- package/dist/tools/ToolManager.d.ts +63 -0
- package/dist/tools/ToolManager.js +146 -0
- package/dist/tools/connectorEndpoints.d.ts +17 -0
- package/dist/tools/connectorEndpoints.js +53 -0
- package/dist/tools/frameRotation.d.ts +8 -0
- package/dist/tools/frameRotation.js +66 -0
- package/dist/tools/gradientHandles.d.ts +67 -0
- package/dist/tools/gradientHandles.js +110 -0
- package/dist/tools/presetPaths.d.ts +5 -0
- package/dist/tools/presetPaths.js +49 -0
- package/dist/tools/snapResize.d.ts +7 -0
- package/dist/tools/snapResize.js +65 -0
- package/dist/tools/snapping.d.ts +30 -0
- package/dist/tools/snapping.js +280 -0
- package/dist/tools/transform.d.ts +52 -0
- package/dist/tools/transform.js +277 -0
- package/package.json +36 -3
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { Slice } from "prosemirror-model";
|
|
2
|
+
import { EditorState } from "prosemirror-state";
|
|
3
|
+
import { defaultStyle } from "../props/defaults.js";
|
|
4
|
+
import { clipboardTransaction, serializeClipboard } from "../text/clipboard.js";
|
|
5
|
+
import { contentToPm, pmToContent } from "../text/flat.js";
|
|
6
|
+
import { schema } from "../text/schema.js";
|
|
7
|
+
import { CARRIER_ENVELOPE, carriedObjects, carryObjects, namesCarrier } from "./carrier.js";
|
|
8
|
+
import { clipboardImageHashes, decodeObjectPayload, decodeObjects, encodeObjects, MAX_CLIPBOARD_BYTES, OBJECTS_MIME } from "./objects.js";
|
|
9
|
+
import { pasteOffset } from "./placement.js";
|
|
10
|
+
import { PasteCommitError } from "./PasteCommitError.js";
|
|
11
|
+
export const PASTED_TEXT_WIDTH = 400;
|
|
12
|
+
let measurementId = 0;
|
|
13
|
+
function containsPoint(object, point) {
|
|
14
|
+
const dx = point.x - object.x - object.w / 2;
|
|
15
|
+
const dy = point.y - object.y - object.h / 2;
|
|
16
|
+
const c = Math.cos(object.rot), s = Math.sin(object.rot);
|
|
17
|
+
return Math.abs(dx * c + dy * s) <= object.w / 2
|
|
18
|
+
&& Math.abs(dy * c - dx * s) <= object.h / 2;
|
|
19
|
+
}
|
|
20
|
+
function excludedSources(controller, objects) {
|
|
21
|
+
const children = new Map();
|
|
22
|
+
for (const id of controller.doc.order()) {
|
|
23
|
+
const parent = controller.doc.get(id)?.parent;
|
|
24
|
+
if (!parent)
|
|
25
|
+
continue;
|
|
26
|
+
const ids = children.get(parent) ?? [];
|
|
27
|
+
ids.push(id);
|
|
28
|
+
children.set(parent, ids);
|
|
29
|
+
}
|
|
30
|
+
const excluded = new Set(objects.map((object) => object.id));
|
|
31
|
+
for (const id of excluded)
|
|
32
|
+
for (const child of children.get(id) ?? [])
|
|
33
|
+
excluded.add(child);
|
|
34
|
+
return excluded;
|
|
35
|
+
}
|
|
36
|
+
function portableText(object) {
|
|
37
|
+
if (!object.text)
|
|
38
|
+
return null;
|
|
39
|
+
const style = object.style;
|
|
40
|
+
const defaults = {};
|
|
41
|
+
for (const [mark, key] of [["family", "fontFamily"], ["size", "fontSize"], ["weight", "fontWeight"],
|
|
42
|
+
["italic", "italic"], ["underline", "underline"], ["strike", "strike"], ["color", "color"],
|
|
43
|
+
["letterSpacing", "letterSpacing"], ["textCase", "textCase"]]) {
|
|
44
|
+
if (style[key] !== undefined)
|
|
45
|
+
Object.assign(defaults, { [mark]: style[key] });
|
|
46
|
+
}
|
|
47
|
+
return { paragraphs: object.text.paragraphs.map((p) => ({
|
|
48
|
+
...(style.align === undefined ? {} : { align: style.align }),
|
|
49
|
+
...(style.lineHeight === undefined ? {} : { lineHeight: style.lineHeight }),
|
|
50
|
+
...p, runs: p.runs.map((run) => ({ ...defaults, ...run })),
|
|
51
|
+
})) };
|
|
52
|
+
}
|
|
53
|
+
function formats(source) {
|
|
54
|
+
if (!("getData" in source))
|
|
55
|
+
return source;
|
|
56
|
+
const objects = source.getData(OBJECTS_MIME);
|
|
57
|
+
return {
|
|
58
|
+
...(objects || source.types?.includes(OBJECTS_MIME) ? { objects } : {}),
|
|
59
|
+
text: source.getData("text/plain"), html: source.getData("text/html"),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function carried(content, ownerDocument) {
|
|
63
|
+
if (content.objects !== undefined || typeof content.html !== "string")
|
|
64
|
+
return content;
|
|
65
|
+
const objects = carriedObjects(content.html, ownerDocument);
|
|
66
|
+
return objects === undefined ? content : { ...content, objects };
|
|
67
|
+
}
|
|
68
|
+
function withinLimit(content, envelope) {
|
|
69
|
+
const limit = MAX_CLIPBOARD_BYTES + (envelope ? CARRIER_ENVELOPE : 0);
|
|
70
|
+
let units = 0;
|
|
71
|
+
for (const value of [content.objects, content.html, content.text]) {
|
|
72
|
+
if (value !== undefined && typeof value !== "string")
|
|
73
|
+
return false;
|
|
74
|
+
units += value?.length ?? 0;
|
|
75
|
+
if (units > limit)
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
return new TextEncoder().encode((content.objects ?? "") + (content.html ?? "") + (content.text ?? "")).length <= limit;
|
|
79
|
+
}
|
|
80
|
+
export function createObjectClipboard(options) {
|
|
81
|
+
const { controller } = options;
|
|
82
|
+
const available = () => !options.activeText?.();
|
|
83
|
+
const writable = () => available() && !options.readOnly?.();
|
|
84
|
+
const completed = (ids = []) => ({ ids, pending: null });
|
|
85
|
+
const failed = (error) => {
|
|
86
|
+
const committed = error instanceof PasteCommitError;
|
|
87
|
+
try {
|
|
88
|
+
options.onError?.(committed ? error.cause : error);
|
|
89
|
+
}
|
|
90
|
+
catch { }
|
|
91
|
+
return committed ? error.ids : [];
|
|
92
|
+
};
|
|
93
|
+
const copySelection = (writer) => {
|
|
94
|
+
if (!available())
|
|
95
|
+
return null;
|
|
96
|
+
try {
|
|
97
|
+
const objects = controller.copyObjects();
|
|
98
|
+
if (!objects.length)
|
|
99
|
+
return null;
|
|
100
|
+
const shares = {};
|
|
101
|
+
if (options.share)
|
|
102
|
+
for (const hash of clipboardImageHashes(objects)) {
|
|
103
|
+
try {
|
|
104
|
+
const share = options.share(hash);
|
|
105
|
+
if (share && share.expires - Date.now() / 1000 >= 300)
|
|
106
|
+
shares[hash] = share;
|
|
107
|
+
}
|
|
108
|
+
catch { }
|
|
109
|
+
}
|
|
110
|
+
const portable = encodeObjects(objects);
|
|
111
|
+
if (!portable)
|
|
112
|
+
return null;
|
|
113
|
+
let encoded = Object.keys(shares).length ? encodeObjects(objects, shares) ?? portable : portable;
|
|
114
|
+
if (decodeObjects(encoded).length !== objects.length)
|
|
115
|
+
return null;
|
|
116
|
+
const paragraphs = objects.flatMap((object) => portableText(object)?.paragraphs ?? []);
|
|
117
|
+
const rich = serializeClipboard(new Slice(contentToPm({ paragraphs }).content, 0, 0));
|
|
118
|
+
let plain = { objects: encoded, html: rich.html ?? "", text: rich.text };
|
|
119
|
+
if (!withinLimit(plain, false) && encoded !== portable) {
|
|
120
|
+
encoded = portable;
|
|
121
|
+
plain = { ...plain, objects: portable };
|
|
122
|
+
}
|
|
123
|
+
if (!withinLimit(plain, false))
|
|
124
|
+
return null;
|
|
125
|
+
let full = { ...plain, html: carryObjects(plain.html, portable) };
|
|
126
|
+
if (!withinLimit(full, true) && encoded !== portable) {
|
|
127
|
+
const withoutShares = { ...full, objects: portable };
|
|
128
|
+
if (withinLimit(withoutShares, true)) {
|
|
129
|
+
encoded = portable;
|
|
130
|
+
plain = { ...plain, objects: portable };
|
|
131
|
+
full = withoutShares;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
const content = withinLimit(full, true) ? full : { ...plain, html: carryObjects(plain.html, "") };
|
|
135
|
+
if (writer) {
|
|
136
|
+
writer.setData(OBJECTS_MIME, encoded);
|
|
137
|
+
writer.setData("text/html", content.html);
|
|
138
|
+
writer.setData("text/plain", rich.text);
|
|
139
|
+
}
|
|
140
|
+
return { content, objects };
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
const paste = (source, at) => {
|
|
147
|
+
if (!writable())
|
|
148
|
+
return completed();
|
|
149
|
+
try {
|
|
150
|
+
const raw = formats(source);
|
|
151
|
+
if (!withinLimit(raw, raw.objects !== undefined && typeof raw.html === "string" && namesCarrier(raw.html)))
|
|
152
|
+
return completed();
|
|
153
|
+
const content = carried(raw, options.ownerDocument ?? (typeof document === "undefined" ? undefined : document));
|
|
154
|
+
if (content !== raw && !withinLimit(content, true))
|
|
155
|
+
return completed();
|
|
156
|
+
const viewport = options.viewport();
|
|
157
|
+
let objects;
|
|
158
|
+
let assets;
|
|
159
|
+
if (content.objects !== undefined) {
|
|
160
|
+
const payload = decodeObjectPayload(content.objects);
|
|
161
|
+
objects = payload?.objects ?? [];
|
|
162
|
+
if (raw.objects !== undefined)
|
|
163
|
+
assets = payload?.assets;
|
|
164
|
+
if (!objects.length)
|
|
165
|
+
return completed();
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
const state = EditorState.create({ schema });
|
|
169
|
+
const transaction = clipboardTransaction(state, { text: content.text ?? "", ...(content.html ? { html: content.html } : {}) }, options.ownerDocument);
|
|
170
|
+
if (!transaction)
|
|
171
|
+
return completed();
|
|
172
|
+
const text = pmToContent(transaction.doc);
|
|
173
|
+
const style = defaultStyle("text");
|
|
174
|
+
const object = {
|
|
175
|
+
id: `clipboard-text-${++measurementId}`, kind: "text", parent: null, x: 0, y: 0,
|
|
176
|
+
w: PASTED_TEXT_WIDTH, h: 1, rot: 0, style, text, textVersion: 1, version: 0,
|
|
177
|
+
};
|
|
178
|
+
const measured = options.measureText?.(object);
|
|
179
|
+
const height = measured ?? text.paragraphs.reduce((sum, p) => sum + Math.max(1, Math.ceil(p.runs.reduce((n, r) => n + r.text.length, 0) / 40)) * 24, 0);
|
|
180
|
+
if (!Number.isFinite(height))
|
|
181
|
+
return completed();
|
|
182
|
+
object.h = Math.ceil(Math.max(16, height) + (style.paddingTop ?? 0) + (style.paddingBottom ?? 0));
|
|
183
|
+
objects = [object];
|
|
184
|
+
at ??= { x: viewport.x + viewport.w / 2, y: viewport.y + viewport.h / 2 };
|
|
185
|
+
}
|
|
186
|
+
const placement = { ...(at ? { at } : {}), viewport };
|
|
187
|
+
const offset = pasteOffset(objects, placement);
|
|
188
|
+
const inPlace = at === undefined && offset.x === 0 && offset.y === 0;
|
|
189
|
+
const sourceIds = new Set(objects.map((object) => object.id));
|
|
190
|
+
const excluded = excludedSources(controller, objects);
|
|
191
|
+
const parents = [];
|
|
192
|
+
for (const object of objects) {
|
|
193
|
+
if (object.kind === "connector") {
|
|
194
|
+
parents.push([object.id, null]);
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
if (object.parent && sourceIds.has(object.parent))
|
|
198
|
+
continue;
|
|
199
|
+
const point = { x: object.x + object.w / 2 + offset.x, y: object.y + object.h / 2 + offset.y };
|
|
200
|
+
const source = inPlace ? controller.doc.get(object.id) : undefined;
|
|
201
|
+
const parent = source?.parent ? controller.doc.get(source.parent) : undefined;
|
|
202
|
+
if (source && (source.parent === null || (parent && (parent.kind === "frame" || parent.kind === "section") && containsPoint(parent, point)))) {
|
|
203
|
+
parents.push([object.id, source.parent]);
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
parents.push([object.id, options.parentAt?.(point, excluded) ?? null]);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
const target = { ...placement, offset, parents: Object.fromEntries(parents) };
|
|
210
|
+
const commit = (ready, overrides) => !options.readOnly?.() ? controller.paste(ready, { ...target, ...overrides }) : [];
|
|
211
|
+
try {
|
|
212
|
+
const inserted = options.insert ? options.insert(objects, target, commit, assets) : commit(objects);
|
|
213
|
+
return Array.isArray(inserted) ? completed(inserted)
|
|
214
|
+
: { ids: [], pending: Promise.resolve(inserted).catch(failed) };
|
|
215
|
+
}
|
|
216
|
+
catch (error) {
|
|
217
|
+
return completed(failed(error));
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
catch {
|
|
221
|
+
return completed();
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
return {
|
|
225
|
+
copy: (writer) => copySelection(writer)?.content ?? null,
|
|
226
|
+
cut(writer) {
|
|
227
|
+
if (!writable())
|
|
228
|
+
return null;
|
|
229
|
+
const copied = copySelection(writer);
|
|
230
|
+
if (!copied)
|
|
231
|
+
return null;
|
|
232
|
+
controller.cancelPreview();
|
|
233
|
+
controller.doc.transact("Cut", (tx) => {
|
|
234
|
+
for (const object of copied.objects)
|
|
235
|
+
tx.delete(object.id);
|
|
236
|
+
});
|
|
237
|
+
controller.selection.clear();
|
|
238
|
+
return copied.content;
|
|
239
|
+
},
|
|
240
|
+
paste: (source) => paste(source),
|
|
241
|
+
pasteAt: (point, source) => paste(source, point),
|
|
242
|
+
};
|
|
243
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const CARRIER_ATTRIBUTE = "data-daas-objects";
|
|
2
|
+
export declare const CARRIER_ENVELOPE: number;
|
|
3
|
+
export declare function carryObjects(html: string, objects: string): string;
|
|
4
|
+
export declare function namesCarrier(html: string): boolean;
|
|
5
|
+
export declare function carriedObjects(html: string, ownerDocument: Document | undefined): string | undefined;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export const CARRIER_ATTRIBUTE = "data-daas-objects";
|
|
2
|
+
export const CARRIER_ENVELOPE = `<span ${CARRIER_ATTRIBUTE}=""></span>`.length;
|
|
3
|
+
const BASE64 = /^[A-Za-z0-9+/]*={0,2}$/;
|
|
4
|
+
const CHUNK = 0x8000;
|
|
5
|
+
function toBase64(text) {
|
|
6
|
+
const bytes = new TextEncoder().encode(text);
|
|
7
|
+
let binary = "";
|
|
8
|
+
for (let i = 0; i < bytes.length; i += CHUNK)
|
|
9
|
+
binary += String.fromCharCode(...bytes.subarray(i, i + CHUNK));
|
|
10
|
+
return btoa(binary);
|
|
11
|
+
}
|
|
12
|
+
function fromBase64(value) {
|
|
13
|
+
if (!BASE64.test(value) || value.length % 4 !== 0)
|
|
14
|
+
return null;
|
|
15
|
+
try {
|
|
16
|
+
const binary = atob(value);
|
|
17
|
+
const bytes = new Uint8Array(binary.length);
|
|
18
|
+
for (let i = 0; i < binary.length; i++)
|
|
19
|
+
bytes[i] = binary.charCodeAt(i);
|
|
20
|
+
return new TextDecoder("utf-8", { fatal: true }).decode(bytes);
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export function carryObjects(html, objects) {
|
|
27
|
+
return `<span ${CARRIER_ATTRIBUTE}="${objects ? toBase64(objects) : ""}"></span>${html}`;
|
|
28
|
+
}
|
|
29
|
+
export function namesCarrier(html) {
|
|
30
|
+
return /data-daas-objects/i.test(html);
|
|
31
|
+
}
|
|
32
|
+
const OPENING = `<span ${CARRIER_ATTRIBUTE}="`;
|
|
33
|
+
const LITERAL = /^[A-Za-z0-9+/=\s]*$/;
|
|
34
|
+
function leadingValue(html) {
|
|
35
|
+
if (!html.startsWith(OPENING))
|
|
36
|
+
return undefined;
|
|
37
|
+
const end = html.indexOf('"', OPENING.length);
|
|
38
|
+
if (end < 0 || html[end + 1] !== ">")
|
|
39
|
+
return undefined;
|
|
40
|
+
const value = html.slice(OPENING.length, end);
|
|
41
|
+
return LITERAL.test(value) ? value : undefined;
|
|
42
|
+
}
|
|
43
|
+
export function carriedObjects(html, ownerDocument) {
|
|
44
|
+
if (!namesCarrier(html))
|
|
45
|
+
return undefined;
|
|
46
|
+
let value = leadingValue(html);
|
|
47
|
+
if (value === undefined) {
|
|
48
|
+
if (!ownerDocument)
|
|
49
|
+
return undefined;
|
|
50
|
+
const template = ownerDocument.createElement("template");
|
|
51
|
+
template.innerHTML = html;
|
|
52
|
+
const carrier = template.content.querySelector(`[${CARRIER_ATTRIBUTE}]`);
|
|
53
|
+
if (!carrier)
|
|
54
|
+
return undefined;
|
|
55
|
+
value = carrier.getAttribute(CARRIER_ATTRIBUTE) ?? "";
|
|
56
|
+
}
|
|
57
|
+
value = value.replace(/\s+/g, "");
|
|
58
|
+
return value ? fromBase64(value) ?? "" : "";
|
|
59
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { SceneObject } from "@daasboard/render-core";
|
|
2
|
+
export declare const OBJECTS_MIME = "application/x-daas-objects+json";
|
|
3
|
+
export declare const MAX_CLIPBOARD_BYTES: number;
|
|
4
|
+
export declare const MAX_CLIPBOARD_OBJECTS = 10000;
|
|
5
|
+
export declare const MAX_CLIPBOARD_DEPTH = 256;
|
|
6
|
+
export interface ClipboardAssetShare {
|
|
7
|
+
url: string;
|
|
8
|
+
expires: number;
|
|
9
|
+
}
|
|
10
|
+
export type ClipboardAssets = Readonly<Record<string, ClipboardAssetShare>>;
|
|
11
|
+
export declare const MAX_ASSET_SHARE_URL_LENGTH = 4096;
|
|
12
|
+
export interface ObjectClipboardPayload {
|
|
13
|
+
version: 1;
|
|
14
|
+
objects: SceneObject[];
|
|
15
|
+
assets?: ClipboardAssets;
|
|
16
|
+
}
|
|
17
|
+
export declare function validateObjects(values: readonly unknown[]): SceneObject[];
|
|
18
|
+
export declare function clipboardImageHashes(source: readonly SceneObject[]): Set<string>;
|
|
19
|
+
export declare function decodeObjectPayload(raw: string): ObjectClipboardPayload | null;
|
|
20
|
+
export declare function decodeObjects(raw: string): SceneObject[];
|
|
21
|
+
export declare function encodeObjects(source: readonly SceneObject[], shares?: ClipboardAssets): string | null;
|