@w100n/documents 0.19.1 → 0.20.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/{SheetView-P3GH4U73.js → SheetView-Q6K3UGVP.js} +30 -5
- package/dist/SheetView-Q6K3UGVP.js.map +1 -0
- package/dist/{TextEditor-U3WODH75.js → TextEditor-NDWZUYDA.js} +8 -4
- package/dist/TextEditor-NDWZUYDA.js.map +1 -0
- package/dist/{chunk-VG7UW2CQ.js → chunk-2JGDV5HG.js} +21 -2
- package/dist/chunk-2JGDV5HG.js.map +1 -0
- package/dist/{chunk-SJVSGMNK.js → chunk-KIKKIOW6.js} +2 -2
- package/dist/collab.cjs +24 -3
- package/dist/collab.cjs.map +1 -1
- package/dist/collab.d.cts +6 -1
- package/dist/collab.d.ts +6 -1
- package/dist/collab.js +7 -3
- package/dist/{grid-7OGS3FPU.js → grid-FUHH7UHO.js} +2 -2
- package/dist/grid-FUHH7UHO.js.map +1 -0
- package/dist/index.cjs +67 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +90 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.js +42 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/SheetView-P3GH4U73.js.map +0 -1
- package/dist/TextEditor-U3WODH75.js.map +0 -1
- package/dist/chunk-VG7UW2CQ.js.map +0 -1
- package/dist/grid-7OGS3FPU.js.map +0 -1
- /package/dist/{chunk-SJVSGMNK.js.map → chunk-KIKKIOW6.js.map} +0 -0
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
pending,
|
|
6
6
|
save,
|
|
7
7
|
seed
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2JGDV5HG.js";
|
|
9
9
|
|
|
10
10
|
// src/editor/live.ts
|
|
11
11
|
import { HocuspocusProvider } from "@hocuspocus/provider";
|
|
@@ -238,4 +238,4 @@ export {
|
|
|
238
238
|
useLive,
|
|
239
239
|
Swatches
|
|
240
240
|
};
|
|
241
|
-
//# sourceMappingURL=chunk-
|
|
241
|
+
//# sourceMappingURL=chunk-KIKKIOW6.js.map
|
package/dist/collab.cjs
CHANGED
|
@@ -32,6 +32,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
32
32
|
var collab_exports = {};
|
|
33
33
|
__export(collab_exports, {
|
|
34
34
|
Refusal: () => Refusal,
|
|
35
|
+
addSheet: () => addSheet,
|
|
35
36
|
appendRows: () => appendRows,
|
|
36
37
|
applyCells: () => applyCells,
|
|
37
38
|
applySteps: () => applySteps,
|
|
@@ -45,7 +46,8 @@ __export(collab_exports, {
|
|
|
45
46
|
parse: () => parse3,
|
|
46
47
|
pending: () => pending,
|
|
47
48
|
save: () => save,
|
|
48
|
-
seed: () => seed
|
|
49
|
+
seed: () => seed,
|
|
50
|
+
where: () => where
|
|
49
51
|
});
|
|
50
52
|
module.exports = __toCommonJS(collab_exports);
|
|
51
53
|
var import_core3 = require("@tiptap/core");
|
|
@@ -54,7 +56,7 @@ var import_y_tiptap2 = require("@tiptap/y-tiptap");
|
|
|
54
56
|
var Y3 = __toESM(require("yjs"), 1);
|
|
55
57
|
|
|
56
58
|
// package.json
|
|
57
|
-
var version = "0.
|
|
59
|
+
var version = "0.20.0";
|
|
58
60
|
|
|
59
61
|
// src/docx/xml.ts
|
|
60
62
|
function parse(s) {
|
|
@@ -7487,6 +7489,23 @@ function clashes(doc, kind, seen, list) {
|
|
|
7487
7489
|
old.destroy();
|
|
7488
7490
|
return out;
|
|
7489
7491
|
}
|
|
7492
|
+
function addSheet(doc, name, origin) {
|
|
7493
|
+
if (sheetId(doc, name)) return false;
|
|
7494
|
+
const { order: order2, sheets } = parts(doc);
|
|
7495
|
+
const sid = fresh("sheet");
|
|
7496
|
+
doc.transact(() => {
|
|
7497
|
+
sheets.set(sid, made({ id: sid, name }, { rows: Array.from({ length: 1e3 }, () => fresh("n")), cols: Array.from({ length: 26 }, () => fresh("n")) }));
|
|
7498
|
+
order2.push([sid]);
|
|
7499
|
+
}, origin);
|
|
7500
|
+
return true;
|
|
7501
|
+
}
|
|
7502
|
+
function where(doc, sheet, refs3) {
|
|
7503
|
+
const sid = sheetId(doc, sheet);
|
|
7504
|
+
const at3 = refs3.flatMap((r) => r.split(":")).map(cell).filter(([r]) => r >= 0);
|
|
7505
|
+
if (!sid || !at3.length) return null;
|
|
7506
|
+
const rows = at3.map((x) => x[0]), cols = at3.map((x) => x[1]);
|
|
7507
|
+
return { sheet: sid, range: span({ startRow: Math.min(...rows), endRow: Math.max(...rows), startColumn: Math.min(...cols), endColumn: Math.max(...cols) }) };
|
|
7508
|
+
}
|
|
7490
7509
|
function appendRows(doc, sheet, lines2, origin) {
|
|
7491
7510
|
const sid = sheetId(doc, sheet);
|
|
7492
7511
|
if (!sid || !lines2.length) return null;
|
|
@@ -7728,6 +7747,7 @@ async function workbook(doc, kind, base, put, who, note) {
|
|
|
7728
7747
|
// Annotate the CommonJS export names for ESM import in node:
|
|
7729
7748
|
0 && (module.exports = {
|
|
7730
7749
|
Refusal,
|
|
7750
|
+
addSheet,
|
|
7731
7751
|
appendRows,
|
|
7732
7752
|
applyCells,
|
|
7733
7753
|
applySteps,
|
|
@@ -7741,6 +7761,7 @@ async function workbook(doc, kind, base, put, who, note) {
|
|
|
7741
7761
|
parse,
|
|
7742
7762
|
pending,
|
|
7743
7763
|
save,
|
|
7744
|
-
seed
|
|
7764
|
+
seed,
|
|
7765
|
+
where
|
|
7745
7766
|
});
|
|
7746
7767
|
//# sourceMappingURL=collab.cjs.map
|