@w100n/documents 0.18.0 → 0.19.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-43JDIP7D.js → SheetView-PUSRW7W2.js} +3 -3
- package/dist/{TextEditor-CYS4U5XA.js → TextEditor-Z4KSBLBV.js} +3 -3
- package/dist/{chunk-ZCSHH24C.js → chunk-JSJEB2CO.js} +192 -60
- package/dist/chunk-JSJEB2CO.js.map +1 -0
- package/dist/{chunk-DATYTA4H.js → chunk-ZQYSBWLK.js} +2 -2
- package/dist/collab.cjs +326 -187
- package/dist/collab.cjs.map +1 -1
- package/dist/collab.d.cts +27 -1
- package/dist/collab.d.ts +27 -1
- package/dist/collab.js +9 -1
- package/dist/index.cjs +373 -396
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +134 -2
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +375 -402
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-ZCSHH24C.js.map +0 -1
- /package/dist/{SheetView-43JDIP7D.js.map → SheetView-PUSRW7W2.js.map} +0 -0
- /package/dist/{TextEditor-CYS4U5XA.js.map → TextEditor-Z4KSBLBV.js.map} +0 -0
- /package/dist/{chunk-DATYTA4H.js.map → chunk-ZQYSBWLK.js.map} +0 -0
package/dist/collab.d.cts
CHANGED
|
@@ -10,6 +10,18 @@ declare function applyCells(doc: Y.Doc, list: {
|
|
|
10
10
|
formula?: string;
|
|
11
11
|
}[], origin: unknown): number;
|
|
12
12
|
|
|
13
|
+
type Spot = {
|
|
14
|
+
sheet: string;
|
|
15
|
+
ref: string;
|
|
16
|
+
};
|
|
17
|
+
type Clash = Spot & {
|
|
18
|
+
now: string;
|
|
19
|
+
};
|
|
20
|
+
type Value = string | number | boolean | null;
|
|
21
|
+
declare function clashes(doc: Y.Doc, kind: 'xlsx' | 'csv', seen: ArrayBuffer, list: Spot[]): Clash[];
|
|
22
|
+
declare function appendRows(doc: Y.Doc, sheet: string, lines: Value[][], origin: unknown): string | null;
|
|
23
|
+
declare function compute(doc: Y.Doc, origin: unknown): Promise<number>;
|
|
24
|
+
|
|
13
25
|
type Kind = 'markdown' | 'docx' | 'xlsx' | 'csv';
|
|
14
26
|
type Prose = 'markdown' | 'docx';
|
|
15
27
|
type Author = {
|
|
@@ -34,6 +46,20 @@ declare function applyText(doc: Y.Doc, kind: Prose, changes: {
|
|
|
34
46
|
find: string;
|
|
35
47
|
replace: string;
|
|
36
48
|
}[], origin: unknown): number;
|
|
49
|
+
type Step = {
|
|
50
|
+
op: 'append' | 'after' | 'section' | 'all';
|
|
51
|
+
heading?: string;
|
|
52
|
+
text: string;
|
|
53
|
+
};
|
|
54
|
+
type SectionClash = {
|
|
55
|
+
section: string;
|
|
56
|
+
now: string;
|
|
57
|
+
};
|
|
58
|
+
declare function applySteps(doc: Y.Doc, kind: Prose, steps: Step[], seen: JSONContent | null, origin: unknown): {
|
|
59
|
+
done: number;
|
|
60
|
+
clashes: SectionClash[];
|
|
61
|
+
span: [number, number] | null;
|
|
62
|
+
};
|
|
37
63
|
declare function save(doc: Y.Doc, kind: Kind, base: ArrayBuffer, put: (bytes: ArrayBuffer, note: string) => Promise<string>, load?: (src: string) => Promise<Img>, note?: string): Promise<Saved | null>;
|
|
38
64
|
|
|
39
|
-
export { type Author, type Kind, type Prose, Refusal, type Saved, applyCells, applyText, edits, filled, follow, ours, parse, pending, save, seed };
|
|
65
|
+
export { type Author, type Clash, type Kind, type Prose, Refusal, type Saved, type SectionClash, type Step, appendRows, applyCells, applySteps, applyText, clashes, compute, edits, filled, follow, ours, parse, pending, save, seed };
|
package/dist/collab.d.ts
CHANGED
|
@@ -10,6 +10,18 @@ declare function applyCells(doc: Y.Doc, list: {
|
|
|
10
10
|
formula?: string;
|
|
11
11
|
}[], origin: unknown): number;
|
|
12
12
|
|
|
13
|
+
type Spot = {
|
|
14
|
+
sheet: string;
|
|
15
|
+
ref: string;
|
|
16
|
+
};
|
|
17
|
+
type Clash = Spot & {
|
|
18
|
+
now: string;
|
|
19
|
+
};
|
|
20
|
+
type Value = string | number | boolean | null;
|
|
21
|
+
declare function clashes(doc: Y.Doc, kind: 'xlsx' | 'csv', seen: ArrayBuffer, list: Spot[]): Clash[];
|
|
22
|
+
declare function appendRows(doc: Y.Doc, sheet: string, lines: Value[][], origin: unknown): string | null;
|
|
23
|
+
declare function compute(doc: Y.Doc, origin: unknown): Promise<number>;
|
|
24
|
+
|
|
13
25
|
type Kind = 'markdown' | 'docx' | 'xlsx' | 'csv';
|
|
14
26
|
type Prose = 'markdown' | 'docx';
|
|
15
27
|
type Author = {
|
|
@@ -34,6 +46,20 @@ declare function applyText(doc: Y.Doc, kind: Prose, changes: {
|
|
|
34
46
|
find: string;
|
|
35
47
|
replace: string;
|
|
36
48
|
}[], origin: unknown): number;
|
|
49
|
+
type Step = {
|
|
50
|
+
op: 'append' | 'after' | 'section' | 'all';
|
|
51
|
+
heading?: string;
|
|
52
|
+
text: string;
|
|
53
|
+
};
|
|
54
|
+
type SectionClash = {
|
|
55
|
+
section: string;
|
|
56
|
+
now: string;
|
|
57
|
+
};
|
|
58
|
+
declare function applySteps(doc: Y.Doc, kind: Prose, steps: Step[], seen: JSONContent | null, origin: unknown): {
|
|
59
|
+
done: number;
|
|
60
|
+
clashes: SectionClash[];
|
|
61
|
+
span: [number, number] | null;
|
|
62
|
+
};
|
|
37
63
|
declare function save(doc: Y.Doc, kind: Kind, base: ArrayBuffer, put: (bytes: ArrayBuffer, note: string) => Promise<string>, load?: (src: string) => Promise<Img>, note?: string): Promise<Saved | null>;
|
|
38
64
|
|
|
39
|
-
export { type Author, type Kind, type Prose, Refusal, type Saved, applyCells, applyText, edits, filled, follow, ours, parse, pending, save, seed };
|
|
65
|
+
export { type Author, type Clash, type Kind, type Prose, Refusal, type Saved, type SectionClash, type Step, appendRows, applyCells, applySteps, applyText, clashes, compute, edits, filled, follow, ours, parse, pending, save, seed };
|
package/dist/collab.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Refusal,
|
|
4
|
+
appendRows,
|
|
4
5
|
applyCells,
|
|
6
|
+
applySteps,
|
|
5
7
|
applyText,
|
|
8
|
+
clashes,
|
|
9
|
+
compute,
|
|
6
10
|
edits,
|
|
7
11
|
filled,
|
|
8
12
|
follow,
|
|
@@ -11,15 +15,19 @@ import {
|
|
|
11
15
|
pending,
|
|
12
16
|
save,
|
|
13
17
|
seed
|
|
14
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JSJEB2CO.js";
|
|
15
19
|
import "./chunk-GSIPTCQH.js";
|
|
16
20
|
import "./chunk-BWU6FPPZ.js";
|
|
17
21
|
import "./chunk-ZAVXCH7V.js";
|
|
18
22
|
import "./chunk-ISOOUYLI.js";
|
|
19
23
|
export {
|
|
20
24
|
Refusal,
|
|
25
|
+
appendRows,
|
|
21
26
|
applyCells,
|
|
27
|
+
applySteps,
|
|
22
28
|
applyText,
|
|
29
|
+
clashes,
|
|
30
|
+
compute,
|
|
23
31
|
edits,
|
|
24
32
|
filled,
|
|
25
33
|
follow,
|