@w100n/documents 0.4.0 → 0.11.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-3XTEV2VT.css +319 -0
- package/dist/SheetView-3XTEV2VT.css.map +1 -0
- package/dist/SheetView-TXHS5WJC.js +928 -0
- package/dist/SheetView-TXHS5WJC.js.map +1 -0
- package/dist/TextEditor-4YETNX4T.js +983 -0
- package/dist/TextEditor-4YETNX4T.js.map +1 -0
- package/dist/caveat-cyrillic-XVO43JCM.woff2 +0 -0
- package/dist/caveat-latin-IUBKKMHQ.woff2 +0 -0
- package/dist/caveat-latin-ext-5S7R5SZN.woff2 +0 -0
- package/dist/chunk-EM4U6OC5.js +3447 -0
- package/dist/chunk-EM4U6OC5.js.map +1 -0
- package/dist/chunk-FPGPEIW5.js +196 -0
- package/dist/chunk-FPGPEIW5.js.map +1 -0
- package/dist/chunk-ISOOUYLI.js +150 -0
- package/dist/chunk-ISOOUYLI.js.map +1 -0
- package/dist/{chunk-KEV4R7W5.js → chunk-L765DZPO.js} +9 -1
- package/dist/chunk-L765DZPO.js.map +1 -0
- package/dist/chunk-QDH7EZAF.js +27 -0
- package/dist/chunk-QDH7EZAF.js.map +1 -0
- package/dist/chunk-TDP6OJET.js +31 -0
- package/dist/chunk-TDP6OJET.js.map +1 -0
- package/dist/chunk-TNSN4ZQ5.js +2909 -0
- package/dist/chunk-TNSN4ZQ5.js.map +1 -0
- package/dist/collab.cjs +6312 -0
- package/dist/collab.cjs.map +1 -0
- package/dist/collab.d.cts +39 -0
- package/dist/collab.d.ts +39 -0
- package/dist/collab.js +30 -0
- package/dist/collab.js.map +1 -0
- package/dist/grid-EI5JNZAA.js +88 -0
- package/dist/grid-EI5JNZAA.js.map +1 -0
- package/dist/index.cjs +12191 -486
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +3632 -728
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +144 -11
- package/dist/index.d.ts +144 -11
- package/dist/index.js +3389 -439
- package/dist/index.js.map +1 -1
- package/dist/kinds.cjs +71 -0
- package/dist/kinds.cjs.map +1 -0
- package/dist/kinds.d.cts +11 -0
- package/dist/kinds.d.ts +11 -0
- package/dist/kinds.js +14 -0
- package/dist/kinds.js.map +1 -0
- package/dist/memory.cjs +59 -7
- package/dist/memory.cjs.map +1 -1
- package/dist/memory.d.cts +7 -2
- package/dist/memory.d.ts +7 -2
- package/dist/memory.js +57 -8
- package/dist/memory.js.map +1 -1
- package/dist/pdfWrite-EM6GJDBF.js +76 -0
- package/dist/pdfWrite-EM6GJDBF.js.map +1 -0
- package/dist/types-B5oF25dn.d.cts +165 -0
- package/dist/types-B5oF25dn.d.ts +165 -0
- package/dist/write-DaVtTJCS.d.cts +6 -0
- package/dist/write-DaVtTJCS.d.ts +6 -0
- package/package.json +50 -3
- package/dist/chunk-KEV4R7W5.js.map +0 -1
- package/dist/types-DshXPnWA.d.cts +0 -62
- package/dist/types-DshXPnWA.d.ts +0 -62
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,158 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export { c as DocumentSummary, d as DocumentVersion, F as Fetch, e as
|
|
2
|
+
import { ReactNode, RefObject } from 'react';
|
|
3
|
+
import { L as Language, D as DocumentsHost, P as Place, a as DocumentFile, G as GuestHost, R as Rights } from './types-B5oF25dn.js';
|
|
4
|
+
export { C as Comment, b as DocumentKind, c as DocumentSummary, d as DocumentVersion, F as Fetch, e as GuestFile, f as GuestLink, g as LinkEntry, h as Person, S as Signature, i as SignatureMethod, j as Space } from './types-B5oF25dn.js';
|
|
5
|
+
import { JSONContent } from '@tiptap/core';
|
|
6
|
+
import { I as Img } from './write-DaVtTJCS.js';
|
|
7
|
+
export { kindOf, kinds, matches, readable } from './kinds.js';
|
|
5
8
|
|
|
9
|
+
type DocxModel = {
|
|
10
|
+
doc: JSONContent;
|
|
11
|
+
styles: {
|
|
12
|
+
name: string;
|
|
13
|
+
id: string;
|
|
14
|
+
heading: number | null;
|
|
15
|
+
}[];
|
|
16
|
+
page: {
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
margins: [number, number, number, number];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
declare function readDocx(bytes: ArrayBuffer): Promise<DocxModel>;
|
|
23
|
+
declare function writeDocx(original: ArrayBuffer, doc: JSONContent, load?: (src: string) => Promise<Img>): Promise<ArrayBuffer>;
|
|
24
|
+
|
|
25
|
+
declare function DocumentOverlay({ source, name, mimeType, info, download, actions, onClose, onOpen, language, theme, worker, host, documentId }: {
|
|
26
|
+
source: ArrayBuffer | Blob | string;
|
|
27
|
+
name: string;
|
|
28
|
+
mimeType?: string;
|
|
29
|
+
info?: string;
|
|
30
|
+
download?: string;
|
|
31
|
+
actions?: ReactNode;
|
|
32
|
+
onClose: () => void;
|
|
33
|
+
onOpen?: () => void;
|
|
34
|
+
language?: Language;
|
|
35
|
+
theme?: 'light' | 'dark';
|
|
36
|
+
worker?: () => Worker;
|
|
37
|
+
host?: DocumentsHost;
|
|
38
|
+
documentId?: string;
|
|
39
|
+
}): react.ReactPortal;
|
|
40
|
+
|
|
41
|
+
type Slot = ReactNode | ((leave: (then: () => void) => void) => ReactNode);
|
|
6
42
|
declare function DocumentsWorkspace({ host, language, theme, place, onPlace, start, end, aside, actions }: {
|
|
7
43
|
host: DocumentsHost;
|
|
8
44
|
language?: Language;
|
|
9
45
|
theme?: 'light' | 'dark';
|
|
10
46
|
place?: Place;
|
|
11
47
|
onPlace?: (place: Place) => void;
|
|
12
|
-
start?:
|
|
13
|
-
end?:
|
|
48
|
+
start?: Slot;
|
|
49
|
+
end?: Slot;
|
|
14
50
|
aside?: (doc: DocumentFile) => ReactNode;
|
|
15
51
|
actions?: (doc: DocumentFile) => ReactNode;
|
|
16
52
|
}): react.JSX.Element;
|
|
17
53
|
|
|
18
|
-
|
|
19
|
-
declare
|
|
20
|
-
|
|
54
|
+
type GuestRefusal = 'missing' | 'ended' | 'password' | 'wrong' | 'name' | 'busy';
|
|
55
|
+
declare class GuestRefused extends Error {
|
|
56
|
+
readonly reason: GuestRefusal;
|
|
57
|
+
readonly file: string;
|
|
58
|
+
readonly sharedBy: string;
|
|
59
|
+
constructor(reason: GuestRefusal, file?: string, sharedBy?: string);
|
|
60
|
+
}
|
|
61
|
+
declare function GuestDocument({ host, language, theme, brand }: {
|
|
62
|
+
host: GuestHost;
|
|
63
|
+
language?: Language;
|
|
64
|
+
theme?: 'light' | 'dark';
|
|
65
|
+
brand?: ReactNode;
|
|
66
|
+
}): react.JSX.Element;
|
|
67
|
+
|
|
68
|
+
type Attr = {
|
|
69
|
+
value: string;
|
|
70
|
+
at: [number, number] | null;
|
|
71
|
+
};
|
|
72
|
+
type Text = {
|
|
73
|
+
text: true;
|
|
74
|
+
start: number;
|
|
75
|
+
end: number;
|
|
76
|
+
};
|
|
77
|
+
type El = {
|
|
78
|
+
text?: undefined;
|
|
79
|
+
tag: string;
|
|
80
|
+
attrs: Map<string, Attr>;
|
|
81
|
+
start: number;
|
|
82
|
+
open: number;
|
|
83
|
+
close: number;
|
|
84
|
+
end: number;
|
|
85
|
+
children: (El | Text)[];
|
|
86
|
+
parent: El | null;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
type DeckKind = 'reveal' | 'marked' | 'sections' | 'page';
|
|
90
|
+
type Block = {
|
|
91
|
+
id: number;
|
|
92
|
+
html: string;
|
|
93
|
+
};
|
|
94
|
+
type Slide = {
|
|
95
|
+
key: string;
|
|
96
|
+
from: number;
|
|
97
|
+
stack: number | null;
|
|
98
|
+
title: string;
|
|
99
|
+
head: number | null;
|
|
100
|
+
notes: string;
|
|
101
|
+
blocks: Block[];
|
|
102
|
+
};
|
|
103
|
+
type Deck = {
|
|
104
|
+
kind: DeckKind;
|
|
105
|
+
width: number;
|
|
106
|
+
height: number;
|
|
107
|
+
center: boolean;
|
|
108
|
+
slides: Slide[];
|
|
109
|
+
};
|
|
110
|
+
type Spot = {
|
|
111
|
+
el: El;
|
|
112
|
+
stack: number | null;
|
|
113
|
+
notes: El | null;
|
|
114
|
+
attr: Attr | null;
|
|
115
|
+
blocks: El[];
|
|
116
|
+
};
|
|
117
|
+
type Shape = {
|
|
118
|
+
kind: DeckKind;
|
|
119
|
+
width: number;
|
|
120
|
+
height: number;
|
|
121
|
+
center: boolean;
|
|
122
|
+
root: El;
|
|
123
|
+
box: El;
|
|
124
|
+
units: El[];
|
|
125
|
+
stacks: El[];
|
|
126
|
+
spots: Spot[];
|
|
127
|
+
scripts: El[];
|
|
128
|
+
refresh: El[];
|
|
129
|
+
head: number;
|
|
130
|
+
body: El | null;
|
|
131
|
+
};
|
|
132
|
+
declare function readDeck(html: string, known?: Shape): Deck;
|
|
133
|
+
declare function writeDeck(original: string, deck: Deck, known?: Shape): string;
|
|
134
|
+
|
|
135
|
+
type Guard = RefObject<(() => Promise<boolean>) | null>;
|
|
136
|
+
|
|
137
|
+
type Heading = {
|
|
138
|
+
id: string;
|
|
139
|
+
level: number;
|
|
140
|
+
text: string;
|
|
141
|
+
go?: () => void;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
declare function SlidesView({ html, name, rights, language, theme, baseUrl, scripts, onChange, onSaveRequest, onOutline, guard }: {
|
|
145
|
+
html: string;
|
|
21
146
|
name: string;
|
|
22
|
-
|
|
23
|
-
|
|
147
|
+
rights: Rights;
|
|
148
|
+
language?: Language;
|
|
149
|
+
theme?: 'light' | 'dark';
|
|
150
|
+
baseUrl?: string;
|
|
151
|
+
scripts?: boolean;
|
|
152
|
+
onChange?: (dirty: boolean) => void;
|
|
153
|
+
onSaveRequest?: (bytes: ArrayBuffer, note: string) => Promise<unknown>;
|
|
154
|
+
onOutline?: (list: Heading[]) => void;
|
|
155
|
+
guard?: Guard;
|
|
156
|
+
}): react.JSX.Element;
|
|
24
157
|
|
|
25
|
-
export { DocumentFile,
|
|
158
|
+
export { type Deck, type DeckKind, DocumentFile, DocumentOverlay, DocumentsHost, DocumentsWorkspace, type DocxModel, GuestDocument, GuestHost, type GuestRefusal, GuestRefused, Language, Place, Rights, type Slide, SlidesView, readDeck, readDocx, writeDeck, writeDocx };
|