@g9tm/lynxcontrols-canvas 2.5.10 → 2.5.11
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/catalog/catalog.json +1 -1
- package/catalog/index.md +1 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/board-controller.js +814 -0
- package/dist/board-controller.js.map +1 -0
- package/dist/board-model.js +68 -0
- package/dist/board-model.js.map +1 -0
- package/dist/canvas.js +483 -0
- package/dist/canvas.js.map +1 -0
- package/dist/element-core.js +1106 -0
- package/dist/element-core.js.map +1 -0
- package/dist/export.js +77 -0
- package/dist/export.js.map +1 -0
- package/dist/index.js +7 -0
- package/dist/observable.js +16 -0
- package/dist/observable.js.map +1 -0
- package/dist/protocol.js +4 -0
- package/dist/protocol.js.map +1 -0
- package/dist/scene/edit.js +897 -0
- package/dist/scene/edit.js.map +1 -0
- package/dist/scene/elements.js +394 -0
- package/dist/scene/elements.js.map +1 -0
- package/dist/scene/geometry.js +369 -0
- package/dist/scene/geometry.js.map +1 -0
- package/dist/scene/index.js +6 -0
- package/dist/scene/path-data-parser.js +130 -0
- package/dist/scene/path-data-parser.js.map +1 -0
- package/dist/scene/scene.js +171 -0
- package/dist/scene/scene.js.map +1 -0
- package/dist/scene/shapes.js +809 -0
- package/dist/scene/shapes.js.map +1 -0
- package/dist/scene/types.js +1 -0
- package/dist/words.js +188 -0
- package/dist/words.js.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { isNewer } from "../board-model.js";
|
|
2
|
+
import { bump, compareOrder } from "./elements.js";
|
|
3
|
+
function _define_property(obj, key, value) {
|
|
4
|
+
if (key in obj) Object.defineProperty(obj, key, {
|
|
5
|
+
value: value,
|
|
6
|
+
enumerable: true,
|
|
7
|
+
configurable: true,
|
|
8
|
+
writable: true
|
|
9
|
+
});
|
|
10
|
+
else obj[key] = value;
|
|
11
|
+
return obj;
|
|
12
|
+
}
|
|
13
|
+
const HISTORY_LIMIT = 100;
|
|
14
|
+
class Scene {
|
|
15
|
+
load(elements) {
|
|
16
|
+
this.map.clear();
|
|
17
|
+
for (const element of elements){
|
|
18
|
+
const known = this.map.get(element.id);
|
|
19
|
+
if (!known || isNewer(element, known)) this.map.set(element.id, element);
|
|
20
|
+
}
|
|
21
|
+
this.orderDirty = true;
|
|
22
|
+
this.undoStack.length = 0;
|
|
23
|
+
this.redoStack.length = 0;
|
|
24
|
+
}
|
|
25
|
+
on(listener) {
|
|
26
|
+
this.listeners.add(listener);
|
|
27
|
+
return ()=>this.listeners.delete(listener);
|
|
28
|
+
}
|
|
29
|
+
emit(change) {
|
|
30
|
+
for (const listener of this.listeners)listener(change);
|
|
31
|
+
}
|
|
32
|
+
get(id) {
|
|
33
|
+
return this.map.get(id);
|
|
34
|
+
}
|
|
35
|
+
all() {
|
|
36
|
+
if (this.orderDirty) {
|
|
37
|
+
this.ordered = [
|
|
38
|
+
...this.map.values()
|
|
39
|
+
].sort(compareOrder);
|
|
40
|
+
this.orderDirty = false;
|
|
41
|
+
this.contentDirty = false;
|
|
42
|
+
} else if (this.contentDirty) {
|
|
43
|
+
this.ordered = this.ordered.map((element)=>{
|
|
44
|
+
var _this_map_get;
|
|
45
|
+
return null != (_this_map_get = this.map.get(element.id)) ? _this_map_get : element;
|
|
46
|
+
});
|
|
47
|
+
this.contentDirty = false;
|
|
48
|
+
}
|
|
49
|
+
return this.ordered;
|
|
50
|
+
}
|
|
51
|
+
visible() {
|
|
52
|
+
return this.all().filter((element)=>!element.isDeleted);
|
|
53
|
+
}
|
|
54
|
+
lastIndex() {
|
|
55
|
+
const all = this.all();
|
|
56
|
+
for(let i = all.length - 1; i >= 0; i--)if (all[i].index) return all[i].index;
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
applyRemote(remote) {
|
|
60
|
+
const changed = [];
|
|
61
|
+
let orderChanged = false;
|
|
62
|
+
for (const element of remote){
|
|
63
|
+
const local = this.map.get(element.id);
|
|
64
|
+
if (!(local && (this.editing.has(element.id) || !isNewer(element, local)))) {
|
|
65
|
+
if (!local || local.index !== element.index) orderChanged = true;
|
|
66
|
+
this.map.set(element.id, element);
|
|
67
|
+
changed.push(element);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (orderChanged) this.orderDirty = true;
|
|
71
|
+
if (changed.length) this.contentDirty = true;
|
|
72
|
+
if (changed.length) this.emit({
|
|
73
|
+
changed,
|
|
74
|
+
local: false,
|
|
75
|
+
orderChanged
|
|
76
|
+
});
|
|
77
|
+
return changed;
|
|
78
|
+
}
|
|
79
|
+
commit(elements, history = true) {
|
|
80
|
+
if (!elements.length) return;
|
|
81
|
+
const entry = {
|
|
82
|
+
before: new Map(),
|
|
83
|
+
after: new Map()
|
|
84
|
+
};
|
|
85
|
+
let orderChanged = false;
|
|
86
|
+
for (const element of elements){
|
|
87
|
+
const previous = this.map.get(element.id);
|
|
88
|
+
if (!entry.before.has(element.id)) entry.before.set(element.id, null != previous ? previous : null);
|
|
89
|
+
entry.after.set(element.id, element);
|
|
90
|
+
if (!previous || previous.index !== element.index || previous.isDeleted !== element.isDeleted) orderChanged = true;
|
|
91
|
+
this.map.set(element.id, element);
|
|
92
|
+
}
|
|
93
|
+
if (orderChanged) this.orderDirty = true;
|
|
94
|
+
this.contentDirty = true;
|
|
95
|
+
if (history) {
|
|
96
|
+
this.undoStack.push(entry);
|
|
97
|
+
if (this.undoStack.length > HISTORY_LIMIT) this.undoStack.shift();
|
|
98
|
+
this.redoStack.length = 0;
|
|
99
|
+
}
|
|
100
|
+
this.emit({
|
|
101
|
+
changed: [
|
|
102
|
+
...elements
|
|
103
|
+
],
|
|
104
|
+
local: true,
|
|
105
|
+
orderChanged
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
record(before) {
|
|
109
|
+
const after = new Map();
|
|
110
|
+
for (const id of before.keys()){
|
|
111
|
+
const current = this.map.get(id);
|
|
112
|
+
if (current) after.set(id, current);
|
|
113
|
+
}
|
|
114
|
+
if (!after.size) return;
|
|
115
|
+
this.undoStack.push({
|
|
116
|
+
before,
|
|
117
|
+
after
|
|
118
|
+
});
|
|
119
|
+
if (this.undoStack.length > HISTORY_LIMIT) this.undoStack.shift();
|
|
120
|
+
this.redoStack.length = 0;
|
|
121
|
+
}
|
|
122
|
+
get canUndo() {
|
|
123
|
+
return this.undoStack.length > 0;
|
|
124
|
+
}
|
|
125
|
+
get canRedo() {
|
|
126
|
+
return this.redoStack.length > 0;
|
|
127
|
+
}
|
|
128
|
+
undo() {
|
|
129
|
+
const entry = this.undoStack.pop();
|
|
130
|
+
if (!entry) return [];
|
|
131
|
+
const applied = this.restore(entry.before);
|
|
132
|
+
this.redoStack.push(entry);
|
|
133
|
+
return applied;
|
|
134
|
+
}
|
|
135
|
+
redo() {
|
|
136
|
+
const entry = this.redoStack.pop();
|
|
137
|
+
if (!entry) return [];
|
|
138
|
+
const applied = this.restore(entry.after);
|
|
139
|
+
this.undoStack.push(entry);
|
|
140
|
+
return applied;
|
|
141
|
+
}
|
|
142
|
+
restore(states) {
|
|
143
|
+
const edits = [];
|
|
144
|
+
for (const [id, state] of states){
|
|
145
|
+
const current = this.map.get(id);
|
|
146
|
+
if (!current) continue;
|
|
147
|
+
const target = null != state ? state : {
|
|
148
|
+
...current,
|
|
149
|
+
isDeleted: true
|
|
150
|
+
};
|
|
151
|
+
const { version: _version, versionNonce: _nonce, updated: _updated, ...content } = target;
|
|
152
|
+
edits.push(bump(current, content));
|
|
153
|
+
}
|
|
154
|
+
this.commit(edits, false);
|
|
155
|
+
return edits;
|
|
156
|
+
}
|
|
157
|
+
constructor(elements = []){
|
|
158
|
+
_define_property(this, "map", new Map());
|
|
159
|
+
_define_property(this, "ordered", []);
|
|
160
|
+
_define_property(this, "orderDirty", false);
|
|
161
|
+
_define_property(this, "contentDirty", false);
|
|
162
|
+
_define_property(this, "undoStack", []);
|
|
163
|
+
_define_property(this, "redoStack", []);
|
|
164
|
+
_define_property(this, "listeners", new Set());
|
|
165
|
+
_define_property(this, "editing", new Set());
|
|
166
|
+
this.load(elements);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
export { Scene };
|
|
170
|
+
|
|
171
|
+
//# sourceMappingURL=scene.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scene/scene.js","sources":["../../src/scene/scene.ts"],"sourcesContent":["import { isNewer } from '../board-model';\nimport { bump, compareOrder } from './elements';\nimport type { ExElement } from './types';\n\n/**\n * The scene of one board (Excalidraw's `Scene` + `reconcileElements` + per-user history): every element including\n * tombstones, in Excalidraw's z-order. Local edits come in as already bumped elements (`commit`), remote ones are\n * reconciled per element exactly like the server and the web app (a higher version wins, a tie goes to the lower\n * versionNonce), so all copies converge. Undo/redo only touch my own changes and are themselves ordinary edits.\n */\nexport interface SceneChange {\n /** Elements whose content changed (new versions, including deleted ones). */\n changed: ExElement[];\n /** Mine (to push) or from the server. */\n local: boolean;\n /** The z-order changed (an element was added or its index moved). */\n orderChanged: boolean;\n}\n\ninterface HistoryEntry {\n /** Each element as it was before the action (null: it did not exist). */\n before: Map<string, ExElement | null>;\n after: Map<string, ExElement>;\n}\n\nconst HISTORY_LIMIT = 100;\n\n/** The board's elements by id with their order, history (undo / redo) and remote changes. */\nexport class Scene {\n private readonly map = new Map<string, ExElement>();\n private ordered: ExElement[] = [];\n private orderDirty = false;\n /** Elements changed without moving in the order: the cached list only needs fresh objects. */\n private contentDirty = false;\n private readonly undoStack: HistoryEntry[] = [];\n private readonly redoStack: HistoryEntry[] = [];\n private readonly listeners = new Set<(change: SceneChange) => void>();\n /** Elements being edited here right now (text in the input): a remote copy does not replace them (Excalidraw too). */\n readonly editing = new Set<string>();\n\n constructor(elements: readonly ExElement[] = []) {\n this.load(elements);\n }\n\n load(elements: readonly ExElement[]): void {\n this.map.clear();\n for (const element of elements) {\n const known = this.map.get(element.id);\n if (!known || isNewer(element, known)) this.map.set(element.id, element);\n }\n this.orderDirty = true;\n this.undoStack.length = 0;\n this.redoStack.length = 0;\n }\n\n on(listener: (change: SceneChange) => void): () => void {\n this.listeners.add(listener);\n return () => this.listeners.delete(listener);\n }\n\n private emit(change: SceneChange): void {\n for (const listener of this.listeners) listener(change);\n }\n\n get(id: string): ExElement | undefined {\n return this.map.get(id);\n }\n\n /** Every element, tombstones included, bottom first. */\n all(): readonly ExElement[] {\n if (this.orderDirty) {\n this.ordered = [...this.map.values()].sort(compareOrder);\n this.orderDirty = false;\n this.contentDirty = false;\n } else if (this.contentDirty) {\n this.ordered = this.ordered.map((element) => this.map.get(element.id) ?? element);\n this.contentDirty = false;\n }\n return this.ordered;\n }\n\n /** The elements on the board (not deleted), bottom first. */\n visible(): ExElement[] {\n return this.all().filter((element) => !element.isDeleted);\n }\n\n /** The topmost index on the board (new elements go above it). */\n lastIndex(): string | null {\n const all = this.all();\n for (let i = all.length - 1; i >= 0; i--) if (all[i].index) return all[i].index;\n return null;\n }\n\n // ------------------------------------------------------------------ remote\n\n /** Reconciles elements from the server; returns those that replaced the local copy. */\n applyRemote(remote: readonly ExElement[]): ExElement[] {\n const changed: ExElement[] = [];\n let orderChanged = false;\n for (const element of remote) {\n const local = this.map.get(element.id);\n if (local && (this.editing.has(element.id) || !isNewer(element, local))) continue;\n if (!local || local.index !== element.index) orderChanged = true;\n this.map.set(element.id, element);\n changed.push(element);\n }\n if (orderChanged) this.orderDirty = true;\n if (changed.length) this.contentDirty = true;\n if (changed.length) this.emit({ changed, local: false, orderChanged });\n return changed;\n }\n\n // ------------------------------------------------------------------ local\n\n /**\n * My edit: `elements` are the new versions (made with `bump` or new). Recorded for undo unless `history` is false\n * (a step of a gesture that is recorded as a whole later, or an undo itself).\n */\n commit(elements: readonly ExElement[], history = true): void {\n if (!elements.length) return;\n const entry: HistoryEntry = { before: new Map(), after: new Map() };\n let orderChanged = false;\n for (const element of elements) {\n const previous = this.map.get(element.id);\n if (!entry.before.has(element.id)) entry.before.set(element.id, previous ?? null);\n entry.after.set(element.id, element);\n if (!previous || previous.index !== element.index || previous.isDeleted !== element.isDeleted)\n orderChanged = true;\n this.map.set(element.id, element);\n }\n if (orderChanged) this.orderDirty = true;\n this.contentDirty = true;\n if (history) {\n this.undoStack.push(entry);\n if (this.undoStack.length > HISTORY_LIMIT) this.undoStack.shift();\n this.redoStack.length = 0;\n }\n this.emit({ changed: [...elements], local: true, orderChanged });\n }\n\n /**\n * Records one undo step for changes committed piece by piece without history (text typed live): `before` holds each\n * element as it was before the first piece (null: new).\n */\n record(before: Map<string, ExElement | null>): void {\n const after = new Map<string, ExElement>();\n for (const id of before.keys()) {\n const current = this.map.get(id);\n if (current) after.set(id, current);\n }\n if (!after.size) return;\n this.undoStack.push({ before, after });\n if (this.undoStack.length > HISTORY_LIMIT) this.undoStack.shift();\n this.redoStack.length = 0;\n }\n\n get canUndo(): boolean {\n return this.undoStack.length > 0;\n }\n\n get canRedo(): boolean {\n return this.redoStack.length > 0;\n }\n\n undo(): ExElement[] {\n const entry = this.undoStack.pop();\n if (!entry) return [];\n const applied = this.restore(entry.before);\n this.redoStack.push(entry);\n return applied;\n }\n\n redo(): ExElement[] {\n const entry = this.redoStack.pop();\n if (!entry) return [];\n const applied = this.restore(entry.after);\n this.undoStack.push(entry);\n return applied;\n }\n\n /** Brings elements back to the given states as new versions (so the others take them too). */\n private restore(states: Map<string, ExElement | null>): ExElement[] {\n const edits: ExElement[] = [];\n for (const [id, state] of states) {\n const current = this.map.get(id);\n if (!current) continue;\n const target = state ?? { ...current, isDeleted: true };\n const { version: _version, versionNonce: _nonce, updated: _updated, ...content } = target;\n edits.push(bump(current, content));\n }\n this.commit(edits, false);\n return edits;\n }\n}\n"],"names":["HISTORY_LIMIT","Scene","elements","element","known","isNewer","listener","change","id","compareOrder","_this_map_get","all","i","remote","changed","orderChanged","local","history","entry","Map","previous","before","after","current","applied","states","edits","state","target","_version","_nonce","_updated","content","bump","Set"],"mappings":";;;;;;;;;;;;AAyBA,MAAMA,gBAAgB;AAGf,MAAMC;IAgBX,KAAK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