@rowsncolumns/y-spreadsheet 16.1.2 → 17.0.1
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/Readme.md +21 -6
- package/dist/cjs/helpers-v5.d.ts +11 -11
- package/dist/cjs/helpers-v5.d.ts.map +1 -1
- package/dist/cjs/helpers-v5.js +34 -32
- package/dist/cjs/helpers.d.ts +17 -19
- package/dist/cjs/helpers.d.ts.map +1 -1
- package/dist/cjs/helpers.js +89 -86
- package/dist/cjs/observables.d.ts +7 -7
- package/dist/cjs/observables.d.ts.map +1 -1
- package/dist/cjs/observables.js +35 -47
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/cjs/types.d.ts +96 -19
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/cjs/use-yspreadsheet-v2.d.ts +11 -10
- package/dist/cjs/use-yspreadsheet-v2.d.ts.map +1 -1
- package/dist/cjs/use-yspreadsheet-v2.js +91 -110
- package/dist/cjs/use-yspreadsheet.d.ts +6 -6
- package/dist/cjs/use-yspreadsheet.d.ts.map +1 -1
- package/dist/cjs/use-yspreadsheet.js +38 -74
- package/dist/cjs/yjs-runtime.js +5 -5
- package/dist/cjs/ynodes.d.ts +61 -0
- package/dist/cjs/ynodes.d.ts.map +1 -0
- package/dist/cjs/ynodes.js +224 -0
- package/dist/esm/helpers-v5.d.ts +11 -11
- package/dist/esm/helpers-v5.d.ts.map +1 -1
- package/dist/esm/helpers-v5.js +34 -32
- package/dist/esm/helpers.d.ts +17 -19
- package/dist/esm/helpers.d.ts.map +1 -1
- package/dist/esm/helpers.js +90 -87
- package/dist/esm/observables.d.ts +7 -7
- package/dist/esm/observables.d.ts.map +1 -1
- package/dist/esm/observables.js +21 -25
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/types.d.ts +96 -19
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/esm/use-yspreadsheet-v2.d.ts +11 -10
- package/dist/esm/use-yspreadsheet-v2.d.ts.map +1 -1
- package/dist/esm/use-yspreadsheet-v2.js +88 -108
- package/dist/esm/use-yspreadsheet.d.ts +6 -6
- package/dist/esm/use-yspreadsheet.d.ts.map +1 -1
- package/dist/esm/use-yspreadsheet.js +17 -43
- package/dist/esm/yjs-runtime.js +5 -5
- package/dist/esm/ynodes.d.ts +61 -0
- package/dist/esm/ynodes.d.ts.map +1 -0
- package/dist/esm/ynodes.js +146 -0
- package/package.json +9 -8
package/Readme.md
CHANGED
|
@@ -20,9 +20,24 @@ HOST=localhost PORT=1234 npx y-websocket
|
|
|
20
20
|
|
|
21
21
|
````javascript
|
|
22
22
|
import { useSpreadsheetState } from "@rowsncolumns/spreadsheet-state";
|
|
23
|
-
import { useYSpreadsheet } from "@rowsncolumns/spreadsheet
|
|
24
|
-
import * as Y from "
|
|
25
|
-
|
|
23
|
+
import { useYSpreadsheet, type YjsRuntime } from "@rowsncolumns/y-spreadsheet";
|
|
24
|
+
import * as Y from "@y/y";
|
|
25
|
+
// WebsocketProvider: any collaboration provider for the @y/y 14 document
|
|
26
|
+
// (the hooks type it structurally, see `CollabProviderLike`).
|
|
27
|
+
|
|
28
|
+
// The package works on @y/y 14 nodes and imports no Yjs implementation: the
|
|
29
|
+
// host supplies its node operations. createMap / createArray / isMap /
|
|
30
|
+
// isArray must write and read each nested node with its Yjs 13 type reference
|
|
31
|
+
// (Map 1, Array 0) so Yjs 13, Yrs and pycrdt readers see maps and arrays.
|
|
32
|
+
const yjs: YjsRuntime = {
|
|
33
|
+
createMap, createArray, isMap, isArray,
|
|
34
|
+
getPathTo: Y.getPathTo,
|
|
35
|
+
Doc: Y.Doc,
|
|
36
|
+
applyUpdate: Y.applyUpdate,
|
|
37
|
+
diffUpdate: Y.diffUpdate,
|
|
38
|
+
encodeStateAsUpdate: Y.encodeStateAsUpdate,
|
|
39
|
+
encodeStateVector: Y.encodeStateVector,
|
|
40
|
+
};
|
|
26
41
|
|
|
27
42
|
const version = "v5";
|
|
28
43
|
const yDoc = new Y.Doc();
|
|
@@ -53,9 +68,9 @@ const { enqueueCalculation, activeSheetId, ... } = useSpreadsheetState({
|
|
|
53
68
|
const { users, onBroadcastPatch } = useYSpreadsheet({
|
|
54
69
|
provider: yWebsocketProvider,
|
|
55
70
|
doc: yDoc,
|
|
56
|
-
// The
|
|
57
|
-
//
|
|
58
|
-
yjs
|
|
71
|
+
// The host's node operations for yDoc (or register them once with
|
|
72
|
+
// setDefaultYjsRuntime(yjs)).
|
|
73
|
+
yjs,
|
|
59
74
|
onChangeSheetData,
|
|
60
75
|
onChangeSheets,
|
|
61
76
|
onChangeTables,
|
package/dist/cjs/helpers-v5.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CellData, CellFormat } from "@rowsncolumns/spreadsheet";
|
|
2
2
|
import type { SheetData } from "@rowsncolumns/spreadsheet-state";
|
|
3
3
|
import type { Patch } from "immer";
|
|
4
|
-
import type
|
|
4
|
+
import type { YDoc } from "./types";
|
|
5
5
|
/** A parsed v5 cell key; line ids as decimal strings (an id can exceed 2^53). */
|
|
6
6
|
export type ParsedCellKeyV5 = {
|
|
7
7
|
sheetId: number;
|
|
@@ -14,7 +14,7 @@ export type StyleOverlayV5 = Map<string, CellFormat>;
|
|
|
14
14
|
* A sheet's line ids in grid order (position = index + 1), as decimal strings.
|
|
15
15
|
* Later duplicates and non-id values are skipped, as the engine's index does.
|
|
16
16
|
*/
|
|
17
|
-
export declare const readLineIds: (doc:
|
|
17
|
+
export declare const readLineIds: (doc: YDoc, sheetId: number, axis: "row" | "column") => string[];
|
|
18
18
|
/** The `rncCells` / `rncNotes` key of a cell by its line ids. */
|
|
19
19
|
export declare const createCellKeyV5: (sheetId: number, rowId: string, colId: string) => string;
|
|
20
20
|
/** Parse a v5 key `"{sheetId}:{rowId}:{colId}"`; null when malformed. */
|
|
@@ -24,26 +24,26 @@ export declare const parseCellKeyV5: (key: string) => ParsedCellKeyV5 | null;
|
|
|
24
24
|
* `rncCellStyles` seed (`"{sheetId}!{A1}"`, the client-0 ids of that position)
|
|
25
25
|
* with every `rncCellStylesLog` buffer folded on in array order. Walks the log.
|
|
26
26
|
*/
|
|
27
|
-
export declare const readStyleOverlayV5: (doc:
|
|
27
|
+
export declare const readStyleOverlayV5: (doc: YDoc) => StyleOverlayV5;
|
|
28
28
|
/**
|
|
29
29
|
* A v5 doc as V2 `SheetData` (same shape as `sheetDataV3ToV2`), hot plane only:
|
|
30
30
|
* every key of `rncCells`, `rncNotes` and the composed style plane composed as
|
|
31
31
|
* `composeCell` does (tombstones and orphans skipped).
|
|
32
32
|
*/
|
|
33
|
-
export declare const sheetDataV5ToV2: <T extends CellData>(doc:
|
|
33
|
+
export declare const sheetDataV5ToV2: <T extends CellData>(doc: YDoc, styles?: ReadonlyMap<string, CellFormat>) => SheetData<T>;
|
|
34
34
|
/**
|
|
35
35
|
* A reader of the cell at a 1-based position (`composeCell`), line ids read once
|
|
36
36
|
* per sheet. Undefined when nothing is there or the line is unnamed.
|
|
37
37
|
*/
|
|
38
|
-
export declare const createCellReaderV5: <T extends CellData = CellData>(doc:
|
|
38
|
+
export declare const createCellReaderV5: <T extends CellData = CellData>(doc: YDoc, styles?: ReadonlyMap<string, CellFormat>) => (sheetId: number, rowIndex: number, columnIndex: number) => T | undefined;
|
|
39
39
|
/** `createCellReaderV5` for one cell (reads both id arrays: O(lines)). */
|
|
40
|
-
export declare const getCellV5: <T extends CellData = CellData>(doc:
|
|
40
|
+
export declare const getCellV5: <T extends CellData = CellData>(doc: YDoc, sheetId: number, rowIndex: number, columnIndex: number, styles?: ReadonlyMap<string, CellFormat>) => T | undefined;
|
|
41
41
|
/**
|
|
42
42
|
* Apply changed `rncCells` / `rncNotes` keys to `currentSheetData` (copy-on-write,
|
|
43
43
|
* like `processSheetDataEventsV3`), `uf` from `styles`. Only valid while no id
|
|
44
44
|
* array and no style changed (those need `sheetDataV5ToV2`). Null when nothing changed.
|
|
45
45
|
*/
|
|
46
|
-
export declare const processSheetDataChangesV5: <T extends CellData>(changedKeys: Iterable<string>, currentSheetData: SheetData<T>, doc:
|
|
46
|
+
export declare const processSheetDataChangesV5: <T extends CellData>(changedKeys: Iterable<string>, currentSheetData: SheetData<T>, doc: YDoc, styles?: ReadonlyMap<string, CellFormat>) => SheetData<T> | null;
|
|
47
47
|
/**
|
|
48
48
|
* Apply immer `SheetData` patches to a v5 doc in one transaction (`origin`, the
|
|
49
49
|
* caller's; nested in an open transaction it joins that one). Positional, like
|
|
@@ -54,11 +54,11 @@ export declare const processSheetDataChangesV5: <T extends CellData>(changedKeys
|
|
|
54
54
|
* inline on the cell. `styles`, when given, is the caller's composed style plane
|
|
55
55
|
* (`readStyleOverlayV5`), used instead of folding the log and updated in place.
|
|
56
56
|
*/
|
|
57
|
-
export declare const addSheetDataPatchesV5: (doc:
|
|
57
|
+
export declare const addSheetDataPatchesV5: (doc: YDoc, patches: Patch[] | undefined, origin?: unknown, styles?: StyleOverlayV5) => void;
|
|
58
58
|
/** Set one cell of a v5 doc (see `addSheetDataPatchesV5`). */
|
|
59
|
-
export declare const setCellV5: (doc:
|
|
59
|
+
export declare const setCellV5: (doc: YDoc, sheetId: number, rowIndex: number, columnIndex: number, value: CellData) => void;
|
|
60
60
|
/** Remove one cell of a v5 doc (see `addSheetDataPatchesV5`). */
|
|
61
|
-
export declare const deleteCellV5: (doc:
|
|
61
|
+
export declare const deleteCellV5: (doc: YDoc, sheetId: number, rowIndex: number, columnIndex: number) => void;
|
|
62
62
|
/** Remove every cell of a sheet of a v5 doc; its line ids and dimensions stay. */
|
|
63
|
-
export declare const deleteSheetV5: (doc:
|
|
63
|
+
export declare const deleteSheetV5: (doc: YDoc, sheetId: number) => void;
|
|
64
64
|
//# sourceMappingURL=helpers-v5.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers-v5.d.ts","sourceRoot":"","sources":["../../helpers-v5.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,Q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AEL,kFAAkF;AAClF,eAAO,MAAM,aAAa,GAAI,KAAK,IAAI,EAAE,SAAS,MAAM,KAAG,IACM,CAAC"}
|
package/dist/cjs/helpers-v5.js
CHANGED
|
@@ -24,6 +24,7 @@ var cloneDeep_1 = tslib_1.__importDefault(require("lodash/cloneDeep"));
|
|
|
24
24
|
var isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
|
|
25
25
|
var set_1 = tslib_1.__importDefault(require("lodash/set"));
|
|
26
26
|
var unset_1 = tslib_1.__importDefault(require("lodash/unset"));
|
|
27
|
+
var ynodes_1 = require("./ynodes");
|
|
27
28
|
var CELLS_V5 = "rncCells"; // RNC_CELLS
|
|
28
29
|
var NOTES_V5 = "rncNotes"; // NOTES
|
|
29
30
|
var DIMS_V5 = "rncDimensions"; // DIMS
|
|
@@ -78,7 +79,7 @@ var readLineIds = function (doc, sheetId, axis) {
|
|
|
78
79
|
var ids = [];
|
|
79
80
|
var seen = new Set();
|
|
80
81
|
try {
|
|
81
|
-
for (var _b = tslib_1.__values(doc.
|
|
82
|
+
for (var _b = tslib_1.__values(doc.get(name).toArray()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
82
83
|
var value = _c.value;
|
|
83
84
|
var id = lineIdText(value);
|
|
84
85
|
if (id === null || seen.has(id))
|
|
@@ -260,7 +261,7 @@ var readStyleOverlayV5 = function (doc) {
|
|
|
260
261
|
var e_4, _a;
|
|
261
262
|
var overlay = new Map();
|
|
262
263
|
if (doc.share.has(STYLES_SEED_V5)) {
|
|
263
|
-
doc.
|
|
264
|
+
(0, ynodes_1.forEachEntry)(doc.get(STYLES_SEED_V5), function (value, key) {
|
|
264
265
|
var match = SEED_KEY.exec(key);
|
|
265
266
|
if (!match || !isPlainObject(value))
|
|
266
267
|
return;
|
|
@@ -271,7 +272,7 @@ var readStyleOverlayV5 = function (doc) {
|
|
|
271
272
|
}
|
|
272
273
|
if (doc.share.has(STYLES_LOG_V5)) {
|
|
273
274
|
try {
|
|
274
|
-
for (var _b = tslib_1.__values(doc.
|
|
275
|
+
for (var _b = tslib_1.__values(doc.get(STYLES_LOG_V5).toArray()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
275
276
|
var buf = _c.value;
|
|
276
277
|
if (buf instanceof Uint8Array)
|
|
277
278
|
foldStyleBuffer(overlay, buf);
|
|
@@ -345,7 +346,7 @@ var coldCellExists = function (doc, cache, sheetId, rowId, colId) {
|
|
|
345
346
|
var key = "".concat(sheetId, ":").concat(colId, ":").concat(Math.floor((counter - 1) / BLOCK_ROWS));
|
|
346
347
|
var offsets = cache.get(key);
|
|
347
348
|
if (!offsets) {
|
|
348
|
-
var buf = doc.
|
|
349
|
+
var buf = doc.get(BLOCKS_V5).getAttr(key);
|
|
349
350
|
offsets = new Set(buf instanceof Uint8Array ? blockRowOffsets(buf) : []);
|
|
350
351
|
cache.set(key, offsets);
|
|
351
352
|
}
|
|
@@ -359,12 +360,12 @@ var coldCellExists = function (doc, cache, sheetId, rowId, colId) {
|
|
|
359
360
|
*/
|
|
360
361
|
var composeCell = function (doc, key, styles) {
|
|
361
362
|
var cell = doc.share.has(CELLS_V5)
|
|
362
|
-
? cellDataV5(doc.
|
|
363
|
+
? cellDataV5(doc.get(CELLS_V5).getAttr(key))
|
|
363
364
|
: null;
|
|
364
365
|
var uf = styles.get(key);
|
|
365
366
|
if (uf)
|
|
366
367
|
cell = tslib_1.__assign(tslib_1.__assign({}, cell), { uf: uf });
|
|
367
|
-
var note = doc.share.has(NOTES_V5) ? doc.
|
|
368
|
+
var note = doc.share.has(NOTES_V5) ? doc.get(NOTES_V5).getAttr(key) : undefined;
|
|
368
369
|
if (typeof note === "string")
|
|
369
370
|
cell = tslib_1.__assign(tslib_1.__assign({}, cell), { note: note });
|
|
370
371
|
return cell;
|
|
@@ -385,9 +386,9 @@ var sheetDataV5ToV2 = function (doc, styles) {
|
|
|
385
386
|
try {
|
|
386
387
|
for (var _h = tslib_1.__values([CELLS_V5, NOTES_V5]), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
387
388
|
var name_1 = _j.value;
|
|
388
|
-
if (doc.share.has(name_1))
|
|
389
|
+
if (doc.share.has(name_1)) {
|
|
389
390
|
try {
|
|
390
|
-
for (var _k = (e_7 = void 0, tslib_1.__values(doc.
|
|
391
|
+
for (var _k = (e_7 = void 0, tslib_1.__values(doc.get(name_1).attrKeys())), _l = _k.next(); !_l.done; _l = _k.next()) {
|
|
391
392
|
var key = _l.value;
|
|
392
393
|
keys.add(key);
|
|
393
394
|
}
|
|
@@ -399,6 +400,7 @@ var sheetDataV5ToV2 = function (doc, styles) {
|
|
|
399
400
|
}
|
|
400
401
|
finally { if (e_7) throw e_7.error; }
|
|
401
402
|
}
|
|
403
|
+
}
|
|
402
404
|
}
|
|
403
405
|
}
|
|
404
406
|
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
@@ -560,7 +562,7 @@ var c0Floors = function (doc, styles) {
|
|
|
560
562
|
for (var _b = tslib_1.__values([CELLS_V5, NOTES_V5]), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
561
563
|
var name_2 = _c.value;
|
|
562
564
|
if (doc.share.has(name_2))
|
|
563
|
-
doc.
|
|
565
|
+
(0, ynodes_1.forEachEntry)(doc.get(name_2), function (_v, key) { return cellKey(key); });
|
|
564
566
|
}
|
|
565
567
|
}
|
|
566
568
|
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
@@ -572,7 +574,7 @@ var c0Floors = function (doc, styles) {
|
|
|
572
574
|
}
|
|
573
575
|
styles.forEach(function (_v, key) { return cellKey(key); });
|
|
574
576
|
if (doc.share.has(DIMS_V5)) {
|
|
575
|
-
doc.
|
|
577
|
+
(0, ynodes_1.forEachEntry)(doc.get(DIMS_V5), function (value, key) {
|
|
576
578
|
var match = DIM_KEY_V5.exec(key);
|
|
577
579
|
if (match && idCounter(BigInt(match[3])) !== 0) {
|
|
578
580
|
raise(match[1], match[2] === "R", c0Counter(match[3]));
|
|
@@ -591,7 +593,7 @@ var c0Floors = function (doc, styles) {
|
|
|
591
593
|
if (doc.share.has(BLOCKS_V5)) {
|
|
592
594
|
// Rows: the last offset of each column's highest block (`block_c0_max`).
|
|
593
595
|
var top_1 = new Map();
|
|
594
|
-
doc.
|
|
596
|
+
(0, ynodes_1.forEachEntry)(doc.get(BLOCKS_V5), function (value, key) {
|
|
595
597
|
var _a, _b;
|
|
596
598
|
var match = BLOCK_KEY_V5.exec(key);
|
|
597
599
|
if (!match || idCounter(BigInt(match[2])) === 0)
|
|
@@ -627,7 +629,7 @@ var ensureLine = function (w, sheetId, isRow, pos) {
|
|
|
627
629
|
var start_1 = Math.max(axis.maxC0, (_c = w.floors.get(axisKey(sheetId, isRow))) !== null && _c !== void 0 ? _c : 0) + 1;
|
|
628
630
|
var counters = Array.from({ length: pos - axis.ids.length }, function (_, i) { return start_1 + i; });
|
|
629
631
|
w.doc
|
|
630
|
-
.
|
|
632
|
+
.get(lineIdsRootName(sheetId, isRow ? "row" : "column"))
|
|
631
633
|
.push(counters.map(idValue));
|
|
632
634
|
(_a = axis.ids).push.apply(_a, tslib_1.__spreadArray([], tslib_1.__read(counters.map(c0Id)), false));
|
|
633
635
|
axis.maxC0 = start_1 + counters.length - 1;
|
|
@@ -660,7 +662,7 @@ var writeCell = function (w, sheetId, row, col, cell) {
|
|
|
660
662
|
var rowId = ensureLine(w, sheetId, true, row);
|
|
661
663
|
var colId = ensureLine(w, sheetId, false, col);
|
|
662
664
|
var key = (0, exports.createCellKeyV5)(sheetId, rowId, colId);
|
|
663
|
-
var stored = cellDataV5(w.cells.
|
|
665
|
+
var stored = cellDataV5(w.cells.getAttr(key));
|
|
664
666
|
var format = normalizedFormat((0, utils_1.getCellUserEnteredFormat)(cell));
|
|
665
667
|
var storedFormat = normalizedFormat((_a = writerStyles(w).get(key)) !== null && _a !== void 0 ? _a : (0, utils_1.getCellUserEnteredFormat)(stored));
|
|
666
668
|
if (!(0, isEqual_1.default)(format, storedFormat)) {
|
|
@@ -670,20 +672,20 @@ var writeCell = function (w, sheetId, row, col, cell) {
|
|
|
670
672
|
}
|
|
671
673
|
}
|
|
672
674
|
var next = cell;
|
|
673
|
-
var notes = w.doc.share.has(NOTES_V5) ? w.doc.
|
|
674
|
-
if (notes === null || notes === void 0 ? void 0 : notes.
|
|
675
|
+
var notes = w.doc.share.has(NOTES_V5) ? w.doc.get(NOTES_V5) : null;
|
|
676
|
+
if (notes === null || notes === void 0 ? void 0 : notes.hasAttr(key)) {
|
|
675
677
|
var note = cell.note, rest = tslib_1.__rest(cell, ["note"]);
|
|
676
678
|
if (typeof note === "string" && note) {
|
|
677
|
-
if (notes.
|
|
678
|
-
notes.
|
|
679
|
+
if (notes.getAttr(key) !== note)
|
|
680
|
+
notes.setAttr(key, note);
|
|
679
681
|
}
|
|
680
682
|
else {
|
|
681
|
-
notes.
|
|
683
|
+
notes.deleteAttr(key);
|
|
682
684
|
}
|
|
683
685
|
next = rest;
|
|
684
686
|
}
|
|
685
687
|
if (!stored || !(0, isEqual_1.default)(stored, next))
|
|
686
|
-
w.cells.
|
|
688
|
+
w.cells.setAttr(key, next);
|
|
687
689
|
};
|
|
688
690
|
/**
|
|
689
691
|
* Removes the cell at a position (`remove_cell`): a hot `null` when a cold block
|
|
@@ -699,18 +701,18 @@ var removeCell = function (w, sheetId, row, col) {
|
|
|
699
701
|
return;
|
|
700
702
|
var key = (0, exports.createCellKeyV5)(sheetId, rowId, colId);
|
|
701
703
|
if (coldCellExists(w.doc, w.offsets, sheetId, rowId, colId)) {
|
|
702
|
-
if (w.cells.
|
|
703
|
-
w.cells.
|
|
704
|
+
if (w.cells.getAttr(key) !== null)
|
|
705
|
+
w.cells.setAttr(key, null);
|
|
704
706
|
}
|
|
705
|
-
else if (w.cells.
|
|
706
|
-
w.cells.
|
|
707
|
+
else if (w.cells.hasAttr(key)) {
|
|
708
|
+
w.cells.deleteAttr(key);
|
|
707
709
|
}
|
|
708
710
|
if (writerStyles(w).has(key))
|
|
709
711
|
queueStyle(w, sheetId, rowId, colId, null);
|
|
710
712
|
if (w.doc.share.has(NOTES_V5)) {
|
|
711
|
-
var notes = w.doc.
|
|
712
|
-
if (notes.
|
|
713
|
-
notes.
|
|
713
|
+
var notes = w.doc.get(NOTES_V5);
|
|
714
|
+
if (notes.hasAttr(key))
|
|
715
|
+
notes.deleteAttr(key);
|
|
714
716
|
}
|
|
715
717
|
};
|
|
716
718
|
/** The cells of a row value (`{ values }`), by 1-based column. */
|
|
@@ -781,12 +783,12 @@ var clearSheets = function (w, match) {
|
|
|
781
783
|
var e_14, _a;
|
|
782
784
|
if (!w.doc.share.has(name))
|
|
783
785
|
return;
|
|
784
|
-
var map = w.doc.
|
|
786
|
+
var map = w.doc.get(name);
|
|
785
787
|
try {
|
|
786
|
-
for (var _b = tslib_1.__values(Array.from(map.
|
|
788
|
+
for (var _b = tslib_1.__values(Array.from(map.attrKeys())), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
787
789
|
var key = _c.value;
|
|
788
790
|
if (match(sheetOf(key)))
|
|
789
|
-
map.
|
|
791
|
+
map.deleteAttr(key);
|
|
790
792
|
}
|
|
791
793
|
}
|
|
792
794
|
catch (e_14_1) { e_14 = { error: e_14_1 }; }
|
|
@@ -827,7 +829,7 @@ var nestedBase = function (w, sheetId, row, col) {
|
|
|
827
829
|
if (rowId === undefined || colId === undefined)
|
|
828
830
|
return {};
|
|
829
831
|
var key = (0, exports.createCellKeyV5)(sheetId, rowId, colId);
|
|
830
|
-
if (!w.cells.
|
|
832
|
+
if (!w.cells.hasAttr(key) && coldCellExists(w.doc, w.offsets, sheetId, rowId, colId)) {
|
|
831
833
|
return null;
|
|
832
834
|
}
|
|
833
835
|
return (_a = composeCell(w.doc, key, writerStyles(w))) !== null && _a !== void 0 ? _a : {};
|
|
@@ -910,7 +912,7 @@ var addSheetDataPatchesV5 = function (doc, patches, origin, styles) {
|
|
|
910
912
|
var e_16, _a;
|
|
911
913
|
var w = {
|
|
912
914
|
doc: doc,
|
|
913
|
-
cells: doc.
|
|
915
|
+
cells: doc.get(CELLS_V5),
|
|
914
916
|
axes: new Map(),
|
|
915
917
|
floors: null,
|
|
916
918
|
styles: styles !== null && styles !== void 0 ? styles : null,
|
|
@@ -955,7 +957,7 @@ var addSheetDataPatchesV5 = function (doc, patches, origin, styles) {
|
|
|
955
957
|
}
|
|
956
958
|
flush();
|
|
957
959
|
if (w.ops.length) {
|
|
958
|
-
doc.
|
|
960
|
+
doc.get(STYLES_LOG_V5).push([encodeStyleOps(w.ops)]);
|
|
959
961
|
}
|
|
960
962
|
}, origin);
|
|
961
963
|
};
|
package/dist/cjs/helpers.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { type CellData, type CellFormat, type Sheet } from "@rowsncolumns/spreadsheet";
|
|
2
2
|
import { type HistoryType, type SheetData, type SpreadsheetPatch } from "@rowsncolumns/spreadsheet-state";
|
|
3
3
|
import type { Patch } from "immer";
|
|
4
|
-
import type
|
|
5
|
-
import type { YRowData, YSheetData } from "./use-yspreadsheet-v2";
|
|
6
|
-
import type { CellKeyV3, CellDataV3, ParsedCellKeyV3, YjsRuntime } from "./types";
|
|
4
|
+
import type { CellKeyV3, CellDataV3, ParsedCellKeyV3, YDoc, YjsRuntime, YNode } from "./types";
|
|
7
5
|
export * from "./helpers-v5";
|
|
8
6
|
/**
|
|
9
7
|
* Simplified structure to pass event data synchronously
|
|
@@ -25,7 +23,7 @@ export type SheetDataEvent = {
|
|
|
25
23
|
* @param source
|
|
26
24
|
* @param sheetDataVersion - Version of sheet data format ("v2", "v3" or "v5"). Falls back to docMeta if undefined.
|
|
27
25
|
*/
|
|
28
|
-
export declare const applyPatchesToYDoc: (doc:
|
|
26
|
+
export declare const applyPatchesToYDoc: (doc: YDoc, userId: string | number, patches: [patch: SpreadsheetPatch<Patch>, type?: HistoryType | undefined | null][], source?: "agent" | "user" | "backend", sheetDataVersion?: "v2" | "v3" | "v5", yjsRuntime?: YjsRuntime) => void;
|
|
29
27
|
/**
|
|
30
28
|
* Add sheet data to a yjs map using immer patches
|
|
31
29
|
*
|
|
@@ -34,18 +32,18 @@ export declare const applyPatchesToYDoc: (doc: Y.Doc, userId: string | number, p
|
|
|
34
32
|
* 1. Deduplicating patches targeting the same cell (later patches win)
|
|
35
33
|
* 2. Grouping updates by sheet/row for efficient batch application
|
|
36
34
|
*/
|
|
37
|
-
export declare const addSheetDataPatches: (ySheetData:
|
|
38
|
-
export declare const getSheetFromYSheetData: (ySheetData:
|
|
39
|
-
export declare const deleteSheetFromYSheetData: (ySheetData:
|
|
40
|
-
export declare const getRowDataFromSheet: (ysheet:
|
|
41
|
-
export declare const setCellDataInRowData: (rowData:
|
|
42
|
-
export declare const removeRowData: (ysheet:
|
|
35
|
+
export declare const addSheetDataPatches: (ySheetData: YNode, patches: Patch[], yjsRuntime?: YjsRuntime) => void;
|
|
36
|
+
export declare const getSheetFromYSheetData: (ySheetData: YNode, sheetId: string | number, yjsRuntime?: YjsRuntime) => YNode;
|
|
37
|
+
export declare const deleteSheetFromYSheetData: (ySheetData: YNode, sheetId: string | number) => void;
|
|
38
|
+
export declare const getRowDataFromSheet: (ysheet: YNode, rowIndex: number | string, yjsRuntime?: YjsRuntime) => YNode;
|
|
39
|
+
export declare const setCellDataInRowData: (rowData: YNode, columnIndex: number | string, cellData?: CellData | null) => void;
|
|
40
|
+
export declare const removeRowData: (ysheet: YNode, rowIndex: number | string) => void;
|
|
43
41
|
/**
|
|
44
42
|
* Read a cell's data from the V2 Y.js structure without creating any
|
|
45
43
|
* missing sheet/row/values containers (unlike getSheetFromYSheetData /
|
|
46
44
|
* getRowDataFromSheet, which lazily create them).
|
|
47
45
|
*/
|
|
48
|
-
export declare const getCellDataFromYSheetData: (ySheetData:
|
|
46
|
+
export declare const getCellDataFromYSheetData: (ySheetData: YNode, sheetId: string | number, rowIndex: number | string, columnIndex: number | string) => CellData | null | undefined;
|
|
49
47
|
/**
|
|
50
48
|
* Extract the error effective value from cell data, if any.
|
|
51
49
|
* SheetCell.setErrorValue persists formula errors as
|
|
@@ -94,7 +92,7 @@ export declare const mergeErrorEffectiveValueIntoCellData: (currentCellData: Cel
|
|
|
94
92
|
/**
|
|
95
93
|
* Update array type with immer patches
|
|
96
94
|
*/
|
|
97
|
-
export declare const updateArrayType: (yarray:
|
|
95
|
+
export declare const updateArrayType: (yarray: YNode, patches: Patch[]) => void;
|
|
98
96
|
/**
|
|
99
97
|
* Validate and clean sheets data
|
|
100
98
|
*/
|
|
@@ -102,12 +100,12 @@ export declare const validateSheets: <S extends Sheet>(sheets: S[]) => S[];
|
|
|
102
100
|
/**
|
|
103
101
|
* Map operations
|
|
104
102
|
*/
|
|
105
|
-
export declare const applyMapPatches: <T = CellFormat>(yMap:
|
|
103
|
+
export declare const applyMapPatches: <T = CellFormat>(yMap: YNode, patches: Patch[]) => void;
|
|
106
104
|
/**
|
|
107
105
|
* Process events to find changes in sheet data
|
|
108
106
|
* Returns a new sheet data object with only the changes applied if possible, or null if a full reload is needed
|
|
109
107
|
*/
|
|
110
|
-
export declare const processSheetDataEvents: (events: SheetDataEvent[], currentSheetData: SheetData<any>, ySheetDataV2:
|
|
108
|
+
export declare const processSheetDataEvents: (events: SheetDataEvent[], currentSheetData: SheetData<any>, ySheetDataV2: YNode, yjsRuntime?: YjsRuntime) => SheetData<any> | null;
|
|
111
109
|
/**
|
|
112
110
|
* Create a V3 cell key from sheet ID, row and column indices
|
|
113
111
|
* Format: `${sheetId}!${A1Address}` (e.g., "1!A1", "2!B5")
|
|
@@ -123,10 +121,10 @@ export declare const parseCellKeyV3: (cellKey: CellKeyV3) => ParsedCellKeyV3 | n
|
|
|
123
121
|
*/
|
|
124
122
|
export declare const createCellDataV3: <T extends CellData>(value: T, sheetId: number, rowIndex: number, columnIndex: number) => CellDataV3<T>;
|
|
125
123
|
/**
|
|
126
|
-
*
|
|
127
|
-
*
|
|
124
|
+
* The map node storing V3 cell data (flat structure): `CellDataV3` values
|
|
125
|
+
* keyed `${sheetId}!${A1Address}` (e.g., "1!A1", "2!B5")
|
|
128
126
|
*/
|
|
129
|
-
export type YSheetDataV3 =
|
|
127
|
+
export type YSheetDataV3 = YNode;
|
|
130
128
|
/**
|
|
131
129
|
* Convert V2 SheetData to V3 flat Map format
|
|
132
130
|
* V2: { sheetId: [rows with values arrays] }
|
|
@@ -158,7 +156,7 @@ export declare const deleteSheetV3: (ySheetDataV3: YSheetDataV3, sheetId: number
|
|
|
158
156
|
/**
|
|
159
157
|
* Get V3 sheet data map from Y.Doc
|
|
160
158
|
*/
|
|
161
|
-
export declare const getSheetDataV3: (doc:
|
|
159
|
+
export declare const getSheetDataV3: (doc: YDoc) => YSheetDataV3;
|
|
162
160
|
/**
|
|
163
161
|
* Apply immer patches to V3 sheet data (flat map structure)
|
|
164
162
|
*
|
|
@@ -172,7 +170,7 @@ export declare const addSheetDataPatchesV3: (ySheetDataV3: YSheetDataV3, patches
|
|
|
172
170
|
* Process V3 events and return updated sheet data
|
|
173
171
|
* @param changedKeys - Pre-extracted changes from Yjs event
|
|
174
172
|
* @param currentSheetData - Current sheet data state
|
|
175
|
-
* @param ySheetDataV3 - The
|
|
173
|
+
* @param ySheetDataV3 - The map node for V3 data
|
|
176
174
|
*/
|
|
177
175
|
export declare const processSheetDataEventsV3: <T extends CellData>(changedKeys: Map<string, {
|
|
178
176
|
action: "add" | "update" | "delete";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,KAAK,EACX,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACtB,MA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