@pixerate/editor 0.243.0 → 0.245.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/dist/agent/index.cjs +34 -32
- package/dist/agent/index.js +6 -4
- package/dist/animation-editor/index.cjs +61 -61
- package/dist/animation-editor/index.js +4 -4
- package/dist/{brushstrokeRender-274HGNZR.js → brushstrokeRender-4542T5HP.js} +2 -2
- package/dist/{brushstrokeRender-C7RJZPMC.cjs → brushstrokeRender-QA5WVIDT.cjs} +5 -5
- package/dist/canvas/changeFeed.d.cts +71 -0
- package/dist/canvas/changeFeed.d.ts +71 -0
- package/dist/canvas/index.cjs +490 -34
- package/dist/canvas/index.d.cts +3 -0
- package/dist/canvas/index.d.ts +3 -0
- package/dist/canvas/index.js +483 -27
- package/dist/canvas/proposal-tools.d.cts +21 -0
- package/dist/canvas/proposal-tools.d.ts +21 -0
- package/dist/canvas/proposals.d.cts +112 -0
- package/dist/canvas/proposals.d.ts +112 -0
- package/dist/chart/index.cjs +21 -21
- package/dist/chart/index.js +2 -2
- package/dist/{chunk-6L3WWIDW.js → chunk-4EQY4TZJ.js} +1 -1
- package/dist/{chunk-5FZS7J7C.cjs → chunk-4T47Z4J3.cjs} +18 -2
- package/dist/{chunk-4I76OCVD.cjs → chunk-5DLCOQOQ.cjs} +16 -1
- package/dist/{chunk-4ZHXLFXS.js → chunk-5RFENYO5.js} +1 -1
- package/dist/{chunk-SRXWDOUI.js → chunk-7YQNKSQ7.js} +1 -1
- package/dist/{chunk-WGN7AUKB.js → chunk-7YW7T5TJ.js} +1 -1
- package/dist/{chunk-X3ZINLIP.js → chunk-AU6MWQKZ.js} +1 -1
- package/dist/{chunk-OONFIFEU.cjs → chunk-BDIH4DYR.cjs} +23 -23
- package/dist/{chunk-AIS56JOO.js → chunk-BVRRIW7F.js} +1 -1
- package/dist/{chunk-KK2FWMA2.cjs → chunk-HZ547SGQ.cjs} +1 -1
- package/dist/{chunk-3WOZEBXZ.cjs → chunk-IZL5V5RK.cjs} +2 -2
- package/dist/{chunk-IXI5KATU.js → chunk-L5PB7EG3.js} +1 -1
- package/dist/{chunk-R2FVAKFH.cjs → chunk-M6JORA5Z.cjs} +86 -86
- package/dist/{chunk-RNSANXPT.js → chunk-NS62CQ2B.js} +112 -14
- package/dist/{chunk-UZU6DIZA.cjs → chunk-NUTMINJZ.cjs} +45 -45
- package/dist/{chunk-H4Z72Z4Z.js → chunk-OSTKS3YN.js} +1 -1
- package/dist/{chunk-HLBTRSQJ.js → chunk-P3NIPIKS.js} +263 -63
- package/dist/{chunk-7V7QMFTI.cjs → chunk-QOBCBGGI.cjs} +2 -2
- package/dist/{chunk-UV7OOZJQ.cjs → chunk-SD23XMVJ.cjs} +35 -35
- package/dist/{chunk-FQVVO5YA.js → chunk-SGPIVHJB.js} +1 -1
- package/dist/{chunk-HQZHOPNE.js → chunk-TBJEMELS.js} +18 -2
- package/dist/{chunk-QTMQ5TGA.js → chunk-UCYW4M66.js} +16 -1
- package/dist/{chunk-XFYLA3ZO.cjs → chunk-VMROIWLL.cjs} +290 -90
- package/dist/{chunk-W7GRGGBH.cjs → chunk-W7L4HUT2.cjs} +8 -8
- package/dist/{chunk-FJ2MSI43.cjs → chunk-WKPXOGZZ.cjs} +124 -26
- package/dist/{chunk-D2SGV525.cjs → chunk-XZNU4DUX.cjs} +2 -2
- package/dist/diagram/index.cjs +2 -2
- package/dist/diagram/index.js +1 -1
- package/dist/effects/index.cjs +4 -4
- package/dist/effects/index.js +2 -2
- package/dist/extensions/index.cjs +5 -5
- package/dist/extensions/index.js +4 -4
- package/dist/gradient/index.cjs +2 -2
- package/dist/gradient/index.js +1 -1
- package/dist/history/HistoryManager.d.cts +20 -1
- package/dist/history/HistoryManager.d.ts +20 -1
- package/dist/history/index.cjs +8 -2
- package/dist/history/index.js +8 -2
- package/dist/history/types.d.cts +31 -0
- package/dist/history/types.d.ts +31 -0
- package/dist/image-editor/index.cjs +785 -777
- package/dist/image-editor/index.js +13 -5
- package/dist/index.cjs +16 -10
- package/dist/index.js +11 -5
- package/dist/kernel-wasm-4KVONDAU.js +9 -0
- package/dist/kernel-wasm-TTYRBGAK.cjs +9 -0
- package/dist/paint/index.cjs +10 -2
- package/dist/paint/index.js +9 -1
- package/dist/paint/wet/film.d.cts +19 -1
- package/dist/paint/wet/film.d.ts +19 -1
- package/dist/paint/wet/gpu-kernels.d.cts +2 -2
- package/dist/paint/wet/gpu-kernels.d.ts +2 -2
- package/dist/paint/wet/kernel-wasm.d.cts +5 -5
- package/dist/paint/wet/kernel-wasm.d.ts +5 -5
- package/dist/paint/wet/kernel.d.cts +1 -1
- package/dist/paint/wet/kernel.d.ts +1 -1
- package/dist/paint/wet/medium.d.cts +3 -1
- package/dist/paint/wet/medium.d.ts +3 -1
- package/dist/paint/wet/model.d.cts +19 -4
- package/dist/paint/wet/model.d.ts +19 -4
- package/dist/paint/wet/world.d.cts +34 -8
- package/dist/paint/wet/world.d.ts +34 -8
- package/dist/paint-editor/backlight.d.cts +77 -0
- package/dist/paint-editor/backlight.d.ts +77 -0
- package/dist/paint-editor/controller.d.cts +11 -0
- package/dist/paint-editor/controller.d.ts +11 -0
- package/dist/paint-editor/index.cjs +685 -397
- package/dist/paint-editor/index.d.cts +1 -0
- package/dist/paint-editor/index.d.ts +1 -0
- package/dist/paint-editor/index.js +308 -20
- package/dist/paint-editor/paper.d.cts +7 -0
- package/dist/paint-editor/paper.d.ts +7 -0
- package/dist/paint-editor/wet.d.cts +9 -0
- package/dist/paint-editor/wet.d.ts +9 -0
- package/dist/parameters/index.cjs +2 -2
- package/dist/parameters/index.js +1 -1
- package/dist/tools/index.cjs +4 -2
- package/dist/tools/index.d.cts +1 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +3 -1
- package/dist/tools/origin.d.cts +22 -0
- package/dist/tools/origin.d.ts +22 -0
- package/dist/vector/index.cjs +964 -964
- package/dist/vector/index.js +5 -5
- package/dist/video-editor/index.cjs +4 -4
- package/dist/video-editor/index.js +2 -2
- package/package.json +1 -1
- package/skills/pixerate-canvas/SKILL.md +25 -0
- package/skills/pixerate-paint-editor/SKILL.md +3 -3
- package/skills/pixerate-paint-editor/references/light-paint.md +30 -7
- package/skills/pixerate-paint-watercolour/SKILL.md +10 -1
- package/skills/pixerate-paint-watercolour/evals/glowing-wash.json +22 -0
- package/skills/pixerate-paint-watercolour/evals/stained-glass.json +16 -0
- package/dist/kernel-wasm-6FPOLVUZ.cjs +0 -9
- package/dist/kernel-wasm-WIMMJUF2.js +0 -9
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
// src/history/types.ts
|
|
2
|
+
var USER_ORIGIN = "user";
|
|
3
|
+
function agentOrigin(agentId) {
|
|
4
|
+
return `agent:${agentId}`;
|
|
5
|
+
}
|
|
6
|
+
function originAgentId(origin) {
|
|
7
|
+
return origin?.startsWith("agent:") ? origin.slice("agent:".length) || null : null;
|
|
8
|
+
}
|
|
9
|
+
|
|
1
10
|
// src/history/HistoryManager.ts
|
|
2
11
|
var sumBytes = (parts) => parts.reduce((n, p) => n + p.bytes, 0);
|
|
3
12
|
function undoParts(parts) {
|
|
@@ -16,6 +25,9 @@ var HistoryManager = class {
|
|
|
16
25
|
batchDepth = 0;
|
|
17
26
|
currentBatch = null;
|
|
18
27
|
listeners = /* @__PURE__ */ new Set();
|
|
28
|
+
commitListeners = /* @__PURE__ */ new Set();
|
|
29
|
+
/** Origins set by `withOrigin`, innermost last. */
|
|
30
|
+
origins = [];
|
|
19
31
|
onStateChange;
|
|
20
32
|
cachedState;
|
|
21
33
|
cachedEntries = null;
|
|
@@ -94,7 +106,8 @@ var HistoryManager = class {
|
|
|
94
106
|
tag: command.tag,
|
|
95
107
|
timestamp,
|
|
96
108
|
parts: [part],
|
|
97
|
-
bytes: part.bytes
|
|
109
|
+
bytes: part.bytes,
|
|
110
|
+
origin: command.origin ?? this.getOrigin()
|
|
98
111
|
};
|
|
99
112
|
}
|
|
100
113
|
/** Pushes a step, clears redo and applies the depth and byte limits. */
|
|
@@ -143,14 +156,17 @@ var HistoryManager = class {
|
|
|
143
156
|
command.execute();
|
|
144
157
|
this.currentBatch.push({
|
|
145
158
|
...command,
|
|
146
|
-
timestamp: command.timestamp ?? Date.now()
|
|
159
|
+
timestamp: command.timestamp ?? Date.now(),
|
|
160
|
+
origin: command.origin ?? this.getOrigin()
|
|
147
161
|
});
|
|
148
162
|
return;
|
|
149
163
|
}
|
|
150
164
|
command.execute();
|
|
151
|
-
this.
|
|
165
|
+
const entry = this.makeEntry(command, command.timestamp ?? Date.now());
|
|
166
|
+
this.record(entry);
|
|
152
167
|
this.resetGesture();
|
|
153
168
|
this.notify();
|
|
169
|
+
this.emit("execute", entry.id, entry.origin);
|
|
154
170
|
}
|
|
155
171
|
/**
|
|
156
172
|
* Executes a command as part of a continuous interaction (slider scrub, node drag).
|
|
@@ -165,13 +181,15 @@ var HistoryManager = class {
|
|
|
165
181
|
executeMerged(command, options = {}) {
|
|
166
182
|
const now = Date.now();
|
|
167
183
|
const key = this.heldKey ?? options.key;
|
|
184
|
+
const origin = command.origin ?? this.getOrigin();
|
|
185
|
+
command = { ...command, origin };
|
|
168
186
|
if (key !== void 0) {
|
|
169
187
|
if (this.isApplying || this.batchDepth > 0) {
|
|
170
188
|
this.execute({ ...command, timestamp: now });
|
|
171
189
|
return;
|
|
172
190
|
}
|
|
173
191
|
const top = this.undoStack[this.undoStack.length - 1];
|
|
174
|
-
if (top && this.gestureKey === key && this.gestureEntryId === top.id) {
|
|
192
|
+
if (top && this.gestureKey === key && this.gestureEntryId === top.id && top.origin === origin) {
|
|
175
193
|
command.execute();
|
|
176
194
|
const redo = command.redo ?? command.execute;
|
|
177
195
|
const bytes = this.measure(command);
|
|
@@ -186,6 +204,7 @@ var HistoryManager = class {
|
|
|
186
204
|
this.redoStack = [];
|
|
187
205
|
this.trim();
|
|
188
206
|
this.notify();
|
|
207
|
+
this.emit("merge", top.id, origin);
|
|
189
208
|
return;
|
|
190
209
|
}
|
|
191
210
|
this.execute({ ...command, timestamp: now });
|
|
@@ -200,7 +219,7 @@ var HistoryManager = class {
|
|
|
200
219
|
if (command.tag && this.undoStack.length > 0 && this.batchDepth === 0 && !this.isApplying) {
|
|
201
220
|
const top = this.undoStack[this.undoStack.length - 1];
|
|
202
221
|
const elapsed = top.timestamp ? now - top.timestamp : Infinity;
|
|
203
|
-
if (top.tag === command.tag && elapsed <= windowMs) {
|
|
222
|
+
if (top.tag === command.tag && elapsed <= windowMs && top.origin === origin) {
|
|
204
223
|
command.execute();
|
|
205
224
|
const initialParts = top.parts;
|
|
206
225
|
const bytes = this.measure(command);
|
|
@@ -217,12 +236,14 @@ var HistoryManager = class {
|
|
|
217
236
|
bytes
|
|
218
237
|
}
|
|
219
238
|
],
|
|
220
|
-
bytes
|
|
239
|
+
bytes,
|
|
240
|
+
origin
|
|
221
241
|
};
|
|
222
242
|
this.redoStack = [];
|
|
223
243
|
this.resetGesture();
|
|
224
244
|
this.trim();
|
|
225
245
|
this.notify();
|
|
246
|
+
this.emit("merge", top.id, origin);
|
|
226
247
|
return;
|
|
227
248
|
}
|
|
228
249
|
}
|
|
@@ -281,8 +302,11 @@ var HistoryManager = class {
|
|
|
281
302
|
}
|
|
282
303
|
};
|
|
283
304
|
const bytes = batchCommands.reduce((n, c) => n + this.measure(c), 0);
|
|
305
|
+
const id = this.nextId++;
|
|
306
|
+
const origin = batchCommands[0].origin ?? this.getOrigin();
|
|
284
307
|
this.record({
|
|
285
|
-
id
|
|
308
|
+
id,
|
|
309
|
+
origin,
|
|
286
310
|
name,
|
|
287
311
|
timestamp: Date.now(),
|
|
288
312
|
parts: [
|
|
@@ -300,6 +324,7 @@ var HistoryManager = class {
|
|
|
300
324
|
});
|
|
301
325
|
this.resetGesture();
|
|
302
326
|
this.notify();
|
|
327
|
+
this.emit("execute", id, origin);
|
|
303
328
|
}
|
|
304
329
|
}
|
|
305
330
|
/**
|
|
@@ -330,12 +355,14 @@ var HistoryManager = class {
|
|
|
330
355
|
undoParts(entry.parts);
|
|
331
356
|
this.undoStack.pop();
|
|
332
357
|
this.redoStack.push(entry);
|
|
358
|
+
return entry.id;
|
|
333
359
|
}
|
|
334
360
|
redoOne() {
|
|
335
361
|
const entry = this.redoStack[this.redoStack.length - 1];
|
|
336
362
|
redoParts(entry.parts);
|
|
337
363
|
this.redoStack.pop();
|
|
338
364
|
this.undoStack.push(entry);
|
|
365
|
+
return entry.id;
|
|
339
366
|
}
|
|
340
367
|
/**
|
|
341
368
|
* Reverts the most recent command on the undo stack.
|
|
@@ -347,12 +374,14 @@ var HistoryManager = class {
|
|
|
347
374
|
}
|
|
348
375
|
this.isApplying = true;
|
|
349
376
|
this.resetGesture();
|
|
377
|
+
let id = null;
|
|
350
378
|
try {
|
|
351
|
-
this.undoOne();
|
|
379
|
+
id = this.undoOne();
|
|
352
380
|
return true;
|
|
353
381
|
} finally {
|
|
354
382
|
this.isApplying = false;
|
|
355
383
|
this.notify();
|
|
384
|
+
if (id !== null) this.emit("undo", id);
|
|
356
385
|
}
|
|
357
386
|
}
|
|
358
387
|
/**
|
|
@@ -365,12 +394,14 @@ var HistoryManager = class {
|
|
|
365
394
|
}
|
|
366
395
|
this.isApplying = true;
|
|
367
396
|
this.resetGesture();
|
|
397
|
+
let id = null;
|
|
368
398
|
try {
|
|
369
|
-
this.redoOne();
|
|
399
|
+
id = this.redoOne();
|
|
370
400
|
return true;
|
|
371
401
|
} finally {
|
|
372
402
|
this.isApplying = false;
|
|
373
403
|
this.notify();
|
|
404
|
+
if (id !== null) this.emit("redo", id);
|
|
374
405
|
}
|
|
375
406
|
}
|
|
376
407
|
/**
|
|
@@ -417,7 +448,10 @@ var HistoryManager = class {
|
|
|
417
448
|
} finally {
|
|
418
449
|
this.isApplying = false;
|
|
419
450
|
this.redoStack = n > 0 ? [] : this.redoStack.filter((e) => e.id < mark.nextId);
|
|
420
|
-
if (n > 0 || this.redoStack.length !== redoBefore)
|
|
451
|
+
if (n > 0 || this.redoStack.length !== redoBefore) {
|
|
452
|
+
this.notify();
|
|
453
|
+
this.emit("revert");
|
|
454
|
+
}
|
|
421
455
|
}
|
|
422
456
|
return n;
|
|
423
457
|
}
|
|
@@ -433,7 +467,8 @@ var HistoryManager = class {
|
|
|
433
467
|
label: e.name,
|
|
434
468
|
index,
|
|
435
469
|
current: index === u - 1,
|
|
436
|
-
undone: false
|
|
470
|
+
undone: false,
|
|
471
|
+
origin: e.origin
|
|
437
472
|
}));
|
|
438
473
|
for (let i = this.redoStack.length - 1; i >= 0; i--) {
|
|
439
474
|
const e = this.redoStack[i];
|
|
@@ -442,7 +477,8 @@ var HistoryManager = class {
|
|
|
442
477
|
label: e.name,
|
|
443
478
|
index: entries.length,
|
|
444
479
|
current: false,
|
|
445
|
-
undone: true
|
|
480
|
+
undone: true,
|
|
481
|
+
origin: e.origin
|
|
446
482
|
});
|
|
447
483
|
}
|
|
448
484
|
this.cachedEntries = entries;
|
|
@@ -458,20 +494,22 @@ var HistoryManager = class {
|
|
|
458
494
|
const target = Math.max(0, Math.min(total, Math.floor(index) + 1));
|
|
459
495
|
if (target === this.undoStack.length) return 0;
|
|
460
496
|
let n = 0;
|
|
497
|
+
const steps = [];
|
|
461
498
|
this.isApplying = true;
|
|
462
499
|
this.resetGesture();
|
|
463
500
|
try {
|
|
464
501
|
while (this.undoStack.length > target) {
|
|
465
|
-
this.undoOne();
|
|
502
|
+
steps.push(["undo", this.undoOne()]);
|
|
466
503
|
n++;
|
|
467
504
|
}
|
|
468
505
|
while (this.undoStack.length < target) {
|
|
469
|
-
this.redoOne();
|
|
506
|
+
steps.push(["redo", this.redoOne()]);
|
|
470
507
|
n++;
|
|
471
508
|
}
|
|
472
509
|
} finally {
|
|
473
510
|
this.isApplying = false;
|
|
474
511
|
this.notify();
|
|
512
|
+
for (const [kind, id] of steps) this.emit(kind, id);
|
|
475
513
|
}
|
|
476
514
|
return n;
|
|
477
515
|
}
|
|
@@ -484,6 +522,7 @@ var HistoryManager = class {
|
|
|
484
522
|
this.epoch++;
|
|
485
523
|
this.resetGesture();
|
|
486
524
|
this.notify();
|
|
525
|
+
this.emit("clear");
|
|
487
526
|
}
|
|
488
527
|
/**
|
|
489
528
|
* Subscribes to history state changes.
|
|
@@ -497,6 +536,62 @@ var HistoryManager = class {
|
|
|
497
536
|
this.listeners.delete(listener);
|
|
498
537
|
};
|
|
499
538
|
}
|
|
539
|
+
/**
|
|
540
|
+
* Listens to each change as it lands: what happened (`execute`, `merge`, `undo`, `redo`,
|
|
541
|
+
* `revert`, `clear`), the step and who made it. Unlike `subscribe`, it is not called at once
|
|
542
|
+
* and it hears every step of a `goTo`. Returns an unsubscribe function.
|
|
543
|
+
*/
|
|
544
|
+
onCommit(listener) {
|
|
545
|
+
this.commitListeners.add(listener);
|
|
546
|
+
return () => {
|
|
547
|
+
this.commitListeners.delete(listener);
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
emit(kind, entryId, origin) {
|
|
551
|
+
if (this.commitListeners.size === 0) return;
|
|
552
|
+
const entry = entryId === void 0 ? void 0 : this.getEntries().find((e) => e.id === entryId);
|
|
553
|
+
const event = {
|
|
554
|
+
kind,
|
|
555
|
+
...entry ? { entry } : {},
|
|
556
|
+
origin: origin ?? this.getOrigin(),
|
|
557
|
+
revision: this.revision
|
|
558
|
+
};
|
|
559
|
+
this.commitListeners.forEach((listener) => {
|
|
560
|
+
try {
|
|
561
|
+
listener(event);
|
|
562
|
+
} catch (err) {
|
|
563
|
+
console.error("[HistoryManager] Error in commit listener:", err);
|
|
564
|
+
}
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
/** The origin a change is recorded with when its command names none (see `withOrigin`). */
|
|
568
|
+
getOrigin() {
|
|
569
|
+
return this.origins[this.origins.length - 1] ?? USER_ORIGIN;
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Records the changes `fn` makes as made by `origin` (`agent:<id>` for an agent), unless a
|
|
573
|
+
* command names its own. When `fn` returns a promise, the origin holds until it settles, so
|
|
574
|
+
* anything else recorded on this history meanwhile (the user's own edits) is stamped with it
|
|
575
|
+
* too: give those commands an explicit `origin`, or keep agent work synchronous.
|
|
576
|
+
*/
|
|
577
|
+
withOrigin(origin, fn) {
|
|
578
|
+
this.origins.push(origin);
|
|
579
|
+
let pending = false;
|
|
580
|
+
const pop = () => {
|
|
581
|
+
const i = this.origins.lastIndexOf(origin);
|
|
582
|
+
if (i >= 0) this.origins.splice(i, 1);
|
|
583
|
+
};
|
|
584
|
+
try {
|
|
585
|
+
const result = fn();
|
|
586
|
+
if (result && typeof result.then === "function") {
|
|
587
|
+
pending = true;
|
|
588
|
+
return Promise.resolve(result).finally(pop);
|
|
589
|
+
}
|
|
590
|
+
return result;
|
|
591
|
+
} finally {
|
|
592
|
+
if (!pending) pop();
|
|
593
|
+
}
|
|
594
|
+
}
|
|
500
595
|
/**
|
|
501
596
|
* Utility helper to create a Command from before/after state snapshots.
|
|
502
597
|
*/
|
|
@@ -515,6 +610,9 @@ function createHistoryManager(options = {}) {
|
|
|
515
610
|
}
|
|
516
611
|
|
|
517
612
|
export {
|
|
613
|
+
USER_ORIGIN,
|
|
614
|
+
agentOrigin,
|
|
615
|
+
originAgentId,
|
|
518
616
|
HistoryManager,
|
|
519
617
|
createHistoryManager
|
|
520
618
|
};
|
|
@@ -35,7 +35,7 @@ var _chunkHMGWFXECcjs = require('./chunk-HMGWFXEC.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkW7L4HUT2cjs = require('./chunk-W7L4HUT2.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
var _chunk3R5P3DVYcjs = require('./chunk-3R5P3DVY.cjs');
|
|
@@ -3475,9 +3475,9 @@ function insertImportedDocument(target, content, options = {}) {
|
|
|
3475
3475
|
if (!htmlSlice && from === to && !state.doc.resolve(from).parent.inlineContent) {
|
|
3476
3476
|
from = to = _state.Selection.near(state.doc.resolve(from)).from;
|
|
3477
3477
|
}
|
|
3478
|
-
if (htmlSlice &&
|
|
3478
|
+
if (htmlSlice && _chunkW7L4HUT2cjs.sliceContainsTable.call(void 0, htmlSlice) && _chunkW7L4HUT2cjs.outermostTableDepth.call(void 0, state.doc.resolve(from)) >= 0) {
|
|
3479
3479
|
const tr2 = state.tr;
|
|
3480
|
-
const end2 =
|
|
3480
|
+
const end2 = _chunkW7L4HUT2cjs.insertSliceAfterTable.call(void 0, tr2, from, to, htmlSlice);
|
|
3481
3481
|
if (end2 !== null) {
|
|
3482
3482
|
if (options.at === void 0) tr2.setSelection(_state.Selection.near(tr2.doc.resolve(end2), -1));
|
|
3483
3483
|
view.dispatch(tr2.scrollIntoView().setMeta("uiEvent", "drop"));
|
|
@@ -3654,7 +3654,7 @@ var RichClipboard = _core.Extension.create({
|
|
|
3654
3654
|
const slice = _chunk3AJMR7EGcjs.readRichClipboard.call(void 0, event, view.state.schema, mimeType);
|
|
3655
3655
|
if (!slice) return false;
|
|
3656
3656
|
event.preventDefault();
|
|
3657
|
-
if (
|
|
3657
|
+
if (_chunkW7L4HUT2cjs.handleTablePasteWithoutNesting.call(void 0, view, event, slice)) return true;
|
|
3658
3658
|
view.dispatch(
|
|
3659
3659
|
view.state.tr.replaceSelection(slice).scrollIntoView().setMeta("paste", true).setMeta("uiEvent", "paste")
|
|
3660
3660
|
);
|
|
@@ -4055,7 +4055,7 @@ function createOutlineStore(editor) {
|
|
|
4055
4055
|
if (!editor || editor.isDestroyed) return EMPTY_SNAPSHOT;
|
|
4056
4056
|
const headings = getOutline(editor);
|
|
4057
4057
|
const activeId = _nullishCoalesce(_optionalChain([getActiveHeading, 'call', _153 => _153(editor, headings), 'optionalAccess', _154 => _154.id]), () => ( null));
|
|
4058
|
-
const sameStructure =
|
|
4058
|
+
const sameStructure = _chunkW7L4HUT2cjs.arraysEqual.call(void 0, snapshot.headings, headings, sameHeading);
|
|
4059
4059
|
if (sameStructure && snapshot.activeId === activeId) return snapshot;
|
|
4060
4060
|
return {
|
|
4061
4061
|
headings: sameStructure ? snapshot.headings : headings,
|
|
@@ -4103,7 +4103,7 @@ function navigateToHeading(editor, heading, options = {}) {
|
|
|
4103
4103
|
editor.view.dispatch(tr);
|
|
4104
4104
|
editor.view.focus();
|
|
4105
4105
|
}
|
|
4106
|
-
|
|
4106
|
+
_chunkW7L4HUT2cjs.scrollDomAtPos.call(void 0, editor.view, current.pos, behavior);
|
|
4107
4107
|
return true;
|
|
4108
4108
|
}
|
|
4109
4109
|
function assignHeadingIds(state, types, generateId) {
|
|
@@ -4128,11 +4128,11 @@ function assignHeadingIds(state, types, generateId) {
|
|
|
4128
4128
|
}
|
|
4129
4129
|
var Outline = _core.Extension.create({
|
|
4130
4130
|
name: "outline",
|
|
4131
|
-
priority:
|
|
4131
|
+
priority: _chunkW7L4HUT2cjs.STRUCTURE_PRIORITY,
|
|
4132
4132
|
addOptions() {
|
|
4133
4133
|
return {
|
|
4134
4134
|
types: ["heading"],
|
|
4135
|
-
generateId: () =>
|
|
4135
|
+
generateId: () => _chunkW7L4HUT2cjs.generateStructureId.call(void 0, "h"),
|
|
4136
4136
|
onUpdate: void 0
|
|
4137
4137
|
};
|
|
4138
4138
|
},
|
|
@@ -4165,14 +4165,14 @@ var Outline = _core.Extension.create({
|
|
|
4165
4165
|
tr.scrollIntoView();
|
|
4166
4166
|
_optionalChain([view, 'optionalAccess', _161 => _161.focus, 'optionalCall', _162 => _162()]);
|
|
4167
4167
|
}
|
|
4168
|
-
|
|
4168
|
+
_chunkW7L4HUT2cjs.scrollDomAtPos.call(void 0, view, heading.pos, options.behavior);
|
|
4169
4169
|
}
|
|
4170
4170
|
return true;
|
|
4171
4171
|
},
|
|
4172
4172
|
scrollToHeading: (id, options = {}) => ({ state, dispatch, view }) => {
|
|
4173
4173
|
const heading = findHeading(state, id);
|
|
4174
4174
|
if (!heading) return false;
|
|
4175
|
-
if (dispatch)
|
|
4175
|
+
if (dispatch) _chunkW7L4HUT2cjs.scrollDomAtPos.call(void 0, view, heading.pos, options.behavior);
|
|
4176
4176
|
return true;
|
|
4177
4177
|
}
|
|
4178
4178
|
};
|
|
@@ -4193,7 +4193,7 @@ var Outline = _core.Extension.create({
|
|
|
4193
4193
|
apply: (tr, prev, _oldState, newState) => {
|
|
4194
4194
|
if (!tr.docChanged) return prev;
|
|
4195
4195
|
const next = computeOutline(newState.doc, types);
|
|
4196
|
-
if (
|
|
4196
|
+
if (_chunkW7L4HUT2cjs.arraysEqual.call(void 0, prev, next, sameHeading)) return prev;
|
|
4197
4197
|
storage.headings = next;
|
|
4198
4198
|
_optionalChain([onUpdate, 'call', _163 => _163(), 'optionalCall', _164 => _164(next)]);
|
|
4199
4199
|
return next;
|
|
@@ -4211,7 +4211,7 @@ var Outline = _core.Extension.create({
|
|
|
4211
4211
|
},
|
|
4212
4212
|
onBeforeCreate() {
|
|
4213
4213
|
const { types, generateId } = this.options;
|
|
4214
|
-
|
|
4214
|
+
_chunkW7L4HUT2cjs.syncInitialContent.call(void 0, this.editor, (state) => assignHeadingIds(state, types, generateId));
|
|
4215
4215
|
}
|
|
4216
4216
|
});
|
|
4217
4217
|
|
|
@@ -4381,7 +4381,7 @@ function syncTableOfContents(state, headingTypes) {
|
|
|
4381
4381
|
node.attrs.minLevel,
|
|
4382
4382
|
node.attrs.maxLevel
|
|
4383
4383
|
);
|
|
4384
|
-
if (!
|
|
4384
|
+
if (!_chunkW7L4HUT2cjs.arraysEqual.call(void 0, _nullishCoalesce(node.attrs.entries, () => ( [])), entries, sameEntry)) {
|
|
4385
4385
|
tr = _nullishCoalesce(tr, () => ( state.tr));
|
|
4386
4386
|
tr.setNodeMarkup(pos, void 0, { ...node.attrs, entries });
|
|
4387
4387
|
}
|
|
@@ -4393,7 +4393,7 @@ function syncTableOfContents(state, headingTypes) {
|
|
|
4393
4393
|
}
|
|
4394
4394
|
var TableOfContents = _core.Node.create({
|
|
4395
4395
|
name: "tableOfContents",
|
|
4396
|
-
priority:
|
|
4396
|
+
priority: _chunkW7L4HUT2cjs.STRUCTURE_PRIORITY - 5,
|
|
4397
4397
|
group: "block",
|
|
4398
4398
|
atom: true,
|
|
4399
4399
|
selectable: true,
|
|
@@ -4504,7 +4504,7 @@ var TableOfContents = _core.Node.create({
|
|
|
4504
4504
|
return [
|
|
4505
4505
|
new (0, _state.Plugin)({
|
|
4506
4506
|
key: tableOfContentsPluginKey,
|
|
4507
|
-
state:
|
|
4507
|
+
state: _chunkW7L4HUT2cjs.presenceStateSpec.call(void 0, [this.name]),
|
|
4508
4508
|
appendTransaction: (transactions, _oldState, newState) => {
|
|
4509
4509
|
if (!transactions.some((tr) => tr.docChanged)) return null;
|
|
4510
4510
|
if (!tableOfContentsPluginKey.getState(newState)) return null;
|
|
@@ -4528,7 +4528,7 @@ var TableOfContents = _core.Node.create({
|
|
|
4528
4528
|
);
|
|
4529
4529
|
view.focus();
|
|
4530
4530
|
}
|
|
4531
|
-
|
|
4531
|
+
_chunkW7L4HUT2cjs.scrollDomAtPos.call(void 0, view, heading.pos);
|
|
4532
4532
|
return true;
|
|
4533
4533
|
}
|
|
4534
4534
|
}
|
|
@@ -4538,7 +4538,7 @@ var TableOfContents = _core.Node.create({
|
|
|
4538
4538
|
},
|
|
4539
4539
|
onBeforeCreate() {
|
|
4540
4540
|
const { headingTypes } = this.options;
|
|
4541
|
-
|
|
4541
|
+
_chunkW7L4HUT2cjs.syncInitialContent.call(void 0, this.editor, (state) => syncTableOfContents(state, headingTypes));
|
|
4542
4542
|
}
|
|
4543
4543
|
});
|
|
4544
4544
|
|
|
@@ -4596,7 +4596,7 @@ function syncFootnotes(tr, options = {}) {
|
|
|
4596
4596
|
const listType = schema.nodes[LIST];
|
|
4597
4597
|
const itemType = schema.nodes[ITEM];
|
|
4598
4598
|
if (!listType || !itemType) return false;
|
|
4599
|
-
const generateId = _nullishCoalesce(options.generateId, () => ( (() =>
|
|
4599
|
+
const generateId = _nullishCoalesce(options.generateId, () => ( (() => _chunkW7L4HUT2cjs.generateStructureId.call(void 0, "fn"))));
|
|
4600
4600
|
const refs = [];
|
|
4601
4601
|
const lists = [];
|
|
4602
4602
|
const existing = /* @__PURE__ */ new Map();
|
|
@@ -4680,7 +4680,7 @@ function findReferences(doc, id) {
|
|
|
4680
4680
|
}
|
|
4681
4681
|
var FootnoteReference = _core.Node.create({
|
|
4682
4682
|
name: REFERENCE,
|
|
4683
|
-
priority:
|
|
4683
|
+
priority: _chunkW7L4HUT2cjs.STRUCTURE_PRIORITY - 5,
|
|
4684
4684
|
group: "inline",
|
|
4685
4685
|
inline: true,
|
|
4686
4686
|
atom: true,
|
|
@@ -4688,7 +4688,7 @@ var FootnoteReference = _core.Node.create({
|
|
|
4688
4688
|
addOptions() {
|
|
4689
4689
|
return {
|
|
4690
4690
|
HTMLAttributes: {},
|
|
4691
|
-
generateId: () =>
|
|
4691
|
+
generateId: () => _chunkW7L4HUT2cjs.generateStructureId.call(void 0, "fn")
|
|
4692
4692
|
};
|
|
4693
4693
|
},
|
|
4694
4694
|
addAttributes() {
|
|
@@ -4799,7 +4799,7 @@ var FootnoteReference = _core.Node.create({
|
|
|
4799
4799
|
_state.TextSelection.create(tr.doc, footnote.pos + footnote.node.nodeSize - 2)
|
|
4800
4800
|
);
|
|
4801
4801
|
tr.scrollIntoView();
|
|
4802
|
-
|
|
4802
|
+
_chunkW7L4HUT2cjs.scrollDomAtPos.call(void 0, view, footnote.pos);
|
|
4803
4803
|
}
|
|
4804
4804
|
return true;
|
|
4805
4805
|
},
|
|
@@ -4809,7 +4809,7 @@ var FootnoteReference = _core.Node.create({
|
|
|
4809
4809
|
if (dispatch) {
|
|
4810
4810
|
tr.setSelection(_state.NodeSelection.create(tr.doc, ref.pos));
|
|
4811
4811
|
tr.scrollIntoView();
|
|
4812
|
-
|
|
4812
|
+
_chunkW7L4HUT2cjs.scrollDomAtPos.call(void 0, view, ref.pos);
|
|
4813
4813
|
}
|
|
4814
4814
|
return true;
|
|
4815
4815
|
}
|
|
@@ -4821,7 +4821,7 @@ var FootnoteReference = _core.Node.create({
|
|
|
4821
4821
|
return [
|
|
4822
4822
|
new (0, _state.Plugin)({
|
|
4823
4823
|
key: footnotesPluginKey,
|
|
4824
|
-
state:
|
|
4824
|
+
state: _chunkW7L4HUT2cjs.presenceStateSpec.call(void 0, [REFERENCE, LIST]),
|
|
4825
4825
|
appendTransaction: (transactions, _oldState, newState) => {
|
|
4826
4826
|
if (!transactions.some((tr2) => tr2.docChanged)) return null;
|
|
4827
4827
|
if (!footnotesPluginKey.getState(newState)) return null;
|
|
@@ -4842,7 +4842,7 @@ var FootnoteReference = _core.Node.create({
|
|
|
4842
4842
|
},
|
|
4843
4843
|
onBeforeCreate() {
|
|
4844
4844
|
const { generateId } = this.options;
|
|
4845
|
-
|
|
4845
|
+
_chunkW7L4HUT2cjs.syncInitialContent.call(void 0, this.editor, (state) => {
|
|
4846
4846
|
const tr = state.tr;
|
|
4847
4847
|
return syncFootnotes(tr, { generateId }) ? tr : null;
|
|
4848
4848
|
});
|
|
@@ -4982,7 +4982,7 @@ var Bookmark = _core.Mark.create({
|
|
|
4982
4982
|
addOptions() {
|
|
4983
4983
|
return {
|
|
4984
4984
|
HTMLAttributes: {},
|
|
4985
|
-
generateId: () =>
|
|
4985
|
+
generateId: () => _chunkW7L4HUT2cjs.generateStructureId.call(void 0, "bm")
|
|
4986
4986
|
};
|
|
4987
4987
|
},
|
|
4988
4988
|
addAttributes() {
|
|
@@ -5067,7 +5067,7 @@ var Bookmark = _core.Mark.create({
|
|
|
5067
5067
|
tr.setSelection(_state.TextSelection.create(tr.doc, bookmark.from, bookmark.to));
|
|
5068
5068
|
tr.scrollIntoView();
|
|
5069
5069
|
const domPos = state.doc.resolve(bookmark.from);
|
|
5070
|
-
|
|
5070
|
+
_chunkW7L4HUT2cjs.scrollDomAtPos.call(void 0, view, domPos.before(domPos.depth));
|
|
5071
5071
|
}
|
|
5072
5072
|
return true;
|
|
5073
5073
|
}
|
|
@@ -5132,7 +5132,7 @@ function syncCrossReferences(state, headingTypes) {
|
|
|
5132
5132
|
}
|
|
5133
5133
|
var CrossReference = _core.Node.create({
|
|
5134
5134
|
name: NAME,
|
|
5135
|
-
priority:
|
|
5135
|
+
priority: _chunkW7L4HUT2cjs.STRUCTURE_PRIORITY - 5,
|
|
5136
5136
|
group: "inline",
|
|
5137
5137
|
inline: true,
|
|
5138
5138
|
atom: true,
|
|
@@ -5234,7 +5234,7 @@ var CrossReference = _core.Node.create({
|
|
|
5234
5234
|
if (dispatch) {
|
|
5235
5235
|
tr.setSelection(_state.TextSelection.create(tr.doc, range.from, range.to));
|
|
5236
5236
|
tr.scrollIntoView();
|
|
5237
|
-
|
|
5237
|
+
_chunkW7L4HUT2cjs.scrollDomAtPos.call(void 0, view, range.blockPos);
|
|
5238
5238
|
}
|
|
5239
5239
|
return true;
|
|
5240
5240
|
}
|
|
@@ -5246,7 +5246,7 @@ var CrossReference = _core.Node.create({
|
|
|
5246
5246
|
return [
|
|
5247
5247
|
new (0, _state.Plugin)({
|
|
5248
5248
|
key: crossReferencePluginKey,
|
|
5249
|
-
state:
|
|
5249
|
+
state: _chunkW7L4HUT2cjs.presenceStateSpec.call(void 0, [NAME]),
|
|
5250
5250
|
appendTransaction: (transactions, _oldState, newState) => {
|
|
5251
5251
|
if (!transactions.some((tr) => tr.docChanged)) return null;
|
|
5252
5252
|
if (!crossReferencePluginKey.getState(newState)) return null;
|
|
@@ -5265,7 +5265,7 @@ var CrossReference = _core.Node.create({
|
|
|
5265
5265
|
},
|
|
5266
5266
|
onBeforeCreate() {
|
|
5267
5267
|
const { headingTypes } = this.options;
|
|
5268
|
-
|
|
5268
|
+
_chunkW7L4HUT2cjs.syncInitialContent.call(void 0, this.editor, (state) => syncCrossReferences(state, headingTypes));
|
|
5269
5269
|
}
|
|
5270
5270
|
});
|
|
5271
5271
|
|
|
@@ -5520,7 +5520,7 @@ var FindReplace = _core.Extension.create({
|
|
|
5520
5520
|
if (!s || !s.active || s.currentIndex < 0 || !s.matches[s.currentIndex]) return false;
|
|
5521
5521
|
if (dispatch) {
|
|
5522
5522
|
_history.closeHistory.call(void 0, tr);
|
|
5523
|
-
const [end] =
|
|
5523
|
+
const [end] = _chunkW7L4HUT2cjs.applyReplacements.call(void 0, tr, [s.matches[s.currentIndex]]);
|
|
5524
5524
|
tr.setSelection(_state.TextSelection.create(tr.doc, end)).scrollIntoView();
|
|
5525
5525
|
meta(tr, { type: "replaced", anchor: end, count: 1 });
|
|
5526
5526
|
}
|
|
@@ -5531,7 +5531,7 @@ var FindReplace = _core.Extension.create({
|
|
|
5531
5531
|
if (!s || !s.active || !s.matches.length) return false;
|
|
5532
5532
|
if (dispatch) {
|
|
5533
5533
|
_history.closeHistory.call(void 0, tr);
|
|
5534
|
-
const ends =
|
|
5534
|
+
const ends = _chunkW7L4HUT2cjs.applyReplacements.call(void 0, tr, s.matches);
|
|
5535
5535
|
meta(tr, { type: "replaced", anchor: ends[ends.length - 1], count: s.matches.length });
|
|
5536
5536
|
}
|
|
5537
5537
|
return true;
|
|
@@ -5563,7 +5563,7 @@ var FindReplace = _core.Extension.create({
|
|
|
5563
5563
|
if (!s.active || !s.query) {
|
|
5564
5564
|
return { ...s, matches: [], currentIndex: -1, error: null, truncated: false };
|
|
5565
5565
|
}
|
|
5566
|
-
const result =
|
|
5566
|
+
const result = _chunkW7L4HUT2cjs.searchDocument.call(void 0, doc, s.query, s.options, {
|
|
5567
5567
|
replacement: s.replacement,
|
|
5568
5568
|
clipboardText: safeClipboard(options.getClipboardText),
|
|
5569
5569
|
timeLimitMs: options.timeLimitMs,
|
|
@@ -6150,7 +6150,7 @@ function createRichTextPreset(options = {}) {
|
|
|
6150
6150
|
})
|
|
6151
6151
|
];
|
|
6152
6152
|
if (options.table !== false) {
|
|
6153
|
-
extensions2.push(...
|
|
6153
|
+
extensions2.push(..._chunkW7L4HUT2cjs.createTableExtensions.call(void 0, optionObject(options.table)));
|
|
6154
6154
|
}
|
|
6155
6155
|
if (characterLimit) {
|
|
6156
6156
|
extensions2.push(
|
|
@@ -6207,7 +6207,7 @@ function createRichTextPreset(options = {}) {
|
|
|
6207
6207
|
}
|
|
6208
6208
|
if (options.comments) {
|
|
6209
6209
|
extensions2.push(
|
|
6210
|
-
typeof options.comments === "object" ?
|
|
6210
|
+
typeof options.comments === "object" ? _chunkW7L4HUT2cjs.Comments.configure(options.comments) : _chunkW7L4HUT2cjs.Comments
|
|
6211
6211
|
);
|
|
6212
6212
|
}
|
|
6213
6213
|
if (options.trackChanges) {
|
|
@@ -6257,8 +6257,8 @@ function createRichTextPreset(options = {}) {
|
|
|
6257
6257
|
}
|
|
6258
6258
|
if (options.chart) {
|
|
6259
6259
|
const { sparkline = true, ...chartOptions } = optionObject(options.chart);
|
|
6260
|
-
extensions2.push(
|
|
6261
|
-
if (sparkline) extensions2.push(
|
|
6260
|
+
extensions2.push(_chunkW7L4HUT2cjs.Chart.configure(chartOptions));
|
|
6261
|
+
if (sparkline) extensions2.push(_chunkW7L4HUT2cjs.Sparkline.configure(optionObject(sparkline)));
|
|
6262
6262
|
}
|
|
6263
6263
|
if (options.paragraphStyles) {
|
|
6264
6264
|
extensions2.push(ParagraphStyles.configure(optionObject(options.paragraphStyles)));
|
|
@@ -6399,7 +6399,7 @@ function createFindReplaceCommands(editor, options = {}) {
|
|
|
6399
6399
|
];
|
|
6400
6400
|
}
|
|
6401
6401
|
function validateFindPattern(query, options = {}) {
|
|
6402
|
-
const result =
|
|
6402
|
+
const result = _chunkW7L4HUT2cjs.compileFindPattern.call(void 0, query, options);
|
|
6403
6403
|
return result.ok ? null : result.error;
|
|
6404
6404
|
}
|
|
6405
6405
|
|
|
@@ -6408,8 +6408,8 @@ var PARAMS = {
|
|
|
6408
6408
|
insertTable: {
|
|
6409
6409
|
type: "object",
|
|
6410
6410
|
properties: {
|
|
6411
|
-
rows: { type: "integer", minimum: 1, maximum:
|
|
6412
|
-
cols: { type: "integer", minimum: 1, maximum:
|
|
6411
|
+
rows: { type: "integer", minimum: 1, maximum: _chunkW7L4HUT2cjs.MAX_TABLE_ROWS, description: "Rows (default 3)." },
|
|
6412
|
+
cols: { type: "integer", minimum: 1, maximum: _chunkW7L4HUT2cjs.MAX_TABLE_COLUMNS, description: "Columns (default 3)." },
|
|
6413
6413
|
withHeaderRow: { type: "boolean", description: "Make the first row a header row (default true)." }
|
|
6414
6414
|
},
|
|
6415
6415
|
additionalProperties: false
|
|
@@ -6440,7 +6440,7 @@ function createTableCommands(editor, options = {}) {
|
|
|
6440
6440
|
const group = _nullishCoalesce(options.group, () => ( "Table"));
|
|
6441
6441
|
const scope = options.scope ? { scope: options.scope } : {};
|
|
6442
6442
|
const focus = _nullishCoalesce(options.focus, () => ( true));
|
|
6443
|
-
return
|
|
6443
|
+
return _chunkW7L4HUT2cjs.TABLE_ACTIONS.map(({ action, label, description, keywords }) => {
|
|
6444
6444
|
const params = PARAMS[action];
|
|
6445
6445
|
return {
|
|
6446
6446
|
id: `${prefix}${action}`,
|
|
@@ -6450,13 +6450,13 @@ function createTableCommands(editor, options = {}) {
|
|
|
6450
6450
|
description,
|
|
6451
6451
|
...params ? { params } : {},
|
|
6452
6452
|
...scope,
|
|
6453
|
-
enabled: (_ctx, p) =>
|
|
6453
|
+
enabled: (_ctx, p) => _chunkW7L4HUT2cjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {}))),
|
|
6454
6454
|
run: (_ctx, p) => {
|
|
6455
|
-
if (!
|
|
6456
|
-
const reason =
|
|
6455
|
+
if (!_chunkW7L4HUT2cjs.runTableAction.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})), { focus })) {
|
|
6456
|
+
const reason = _chunkW7L4HUT2cjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})));
|
|
6457
6457
|
throw new Error(reason === true ? `${label} did not change the document.` : reason);
|
|
6458
6458
|
}
|
|
6459
|
-
const state =
|
|
6459
|
+
const state = _chunkW7L4HUT2cjs.getTableState.call(void 0, editor);
|
|
6460
6460
|
return {
|
|
6461
6461
|
done: true,
|
|
6462
6462
|
table: state.inTable ? { rows: state.rows, columns: state.columns, row: state.row, column: state.column } : null
|