ooxml-core 1.22.0 → 1.23.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/README.md +7 -2
- package/dist/automation/index.cjs +6 -4
- package/dist/automation/index.mjs +6 -4
- package/dist/collab/embedding.d.ts +7 -0
- package/dist/collab/embedding.d.ts.map +1 -1
- package/dist/collab/index.cjs +189 -0
- package/dist/collab/index.d.ts +2 -0
- package/dist/collab/index.d.ts.map +1 -1
- package/dist/collab/index.mjs +186 -1
- package/dist/collab/write-back-lifecycle.d.ts +33 -0
- package/dist/collab/write-back-lifecycle.d.ts.map +1 -0
- package/dist/collab/write-back.d.ts +75 -0
- package/dist/collab/write-back.d.ts.map +1 -0
- package/dist/visio/collab/baseline.d.ts +36 -0
- package/dist/visio/collab/baseline.d.ts.map +1 -0
- package/dist/visio/collab/bind.d.ts +20 -2
- package/dist/visio/collab/bind.d.ts.map +1 -1
- package/dist/visio/collab/compose-lists.d.ts +27 -0
- package/dist/visio/collab/compose-lists.d.ts.map +1 -0
- package/dist/visio/collab/compose.d.ts +6 -2
- package/dist/visio/collab/compose.d.ts.map +1 -1
- package/dist/visio/collab/fixups.d.ts +5 -0
- package/dist/visio/collab/fixups.d.ts.map +1 -0
- package/dist/visio/collab/index.cjs +1499 -362
- package/dist/visio/collab/index.d.ts +3 -2
- package/dist/visio/collab/index.d.ts.map +1 -1
- package/dist/visio/collab/index.mjs +1492 -363
- package/dist/visio/collab/keys.d.ts +30 -1
- package/dist/visio/collab/keys.d.ts.map +1 -1
- package/dist/visio/collab/package.d.ts +22 -1
- package/dist/visio/collab/package.d.ts.map +1 -1
- package/dist/visio/collab/pieces.d.ts +34 -0
- package/dist/visio/collab/pieces.d.ts.map +1 -0
- package/dist/visio/collab/read-ids.d.ts +29 -0
- package/dist/visio/collab/read-ids.d.ts.map +1 -0
- package/dist/visio/collab/read-parts.d.ts +34 -0
- package/dist/visio/collab/read-parts.d.ts.map +1 -0
- package/dist/visio/collab/read-shapes.d.ts +35 -0
- package/dist/visio/collab/read-shapes.d.ts.map +1 -0
- package/dist/visio/collab/read-util.d.ts +20 -0
- package/dist/visio/collab/read-util.d.ts.map +1 -0
- package/dist/visio/collab/read.d.ts +40 -19
- package/dist/visio/collab/read.d.ts.map +1 -1
- package/dist/visio/collab/schema.d.ts +55 -1
- package/dist/visio/collab/schema.d.ts.map +1 -1
- package/dist/visio/collab/snapshot-contents.d.ts +9 -0
- package/dist/visio/collab/snapshot-contents.d.ts.map +1 -0
- package/dist/visio/collab/snapshot-io.d.ts +26 -0
- package/dist/visio/collab/snapshot-io.d.ts.map +1 -0
- package/dist/visio/collab/snapshot-parts.d.ts +14 -0
- package/dist/visio/collab/snapshot-parts.d.ts.map +1 -0
- package/dist/visio/collab/snapshot.d.ts +31 -24
- package/dist/visio/collab/snapshot.d.ts.map +1 -1
- package/dist/visio/collab/write-parts.d.ts +8 -0
- package/dist/visio/collab/write-parts.d.ts.map +1 -0
- package/dist/visio/collab/write-shapes.d.ts +30 -0
- package/dist/visio/collab/write-shapes.d.ts.map +1 -0
- package/dist/visio/collab/write.d.ts +4 -16
- package/dist/visio/collab/write.d.ts.map +1 -1
- package/dist/visio/index.cjs +57 -4
- package/dist/visio/index.d.ts +1 -0
- package/dist/visio/index.d.ts.map +1 -1
- package/dist/visio/index.mjs +56 -5
- package/dist/visio/parse-incremental.d.ts +16 -0
- package/dist/visio/parse-incremental.d.ts.map +1 -0
- package/dist/visio/parser.d.ts +7 -0
- package/dist/visio/parser.d.ts.map +1 -1
- package/dist/visio/ui/collab-options.d.ts +10 -5
- package/dist/visio/ui/collab-options.d.ts.map +1 -1
- package/dist/visio/ui/index.cjs +6 -4
- package/dist/visio/ui/index.mjs +6 -4
- package/package.json +1 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/** Where a write-back stands: `idle` until the first change, then `pending`, `saving`, `saved` or `failed`. */
|
|
2
|
+
export type WriteBackStatus = 'idle' | 'pending' | 'saving' | 'saved' | 'failed';
|
|
3
|
+
/** What {@link WriteBackScheduler.state} and `onStatus` report. */
|
|
4
|
+
export interface WriteBackState {
|
|
5
|
+
status: WriteBackStatus;
|
|
6
|
+
/** `now()` when the host last acknowledged a write. */
|
|
7
|
+
lastSavedAt?: number;
|
|
8
|
+
/** The error of the last failed write, once its retries are spent. */
|
|
9
|
+
lastError?: unknown;
|
|
10
|
+
}
|
|
11
|
+
/** The write-back status as an editor reports it in its collaboration state (JSON friendly). */
|
|
12
|
+
export interface CollaborationWriteBackState {
|
|
13
|
+
status: WriteBackStatus;
|
|
14
|
+
lastSavedAt?: number;
|
|
15
|
+
/** The message of the last failure, while `status` is `failed`. */
|
|
16
|
+
error?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface WriteBackRetry {
|
|
19
|
+
/** Total tries per write, the first included. 1 (the default) never retries. */
|
|
20
|
+
attempts: number;
|
|
21
|
+
/** Wait before the first retry; doubles on each further retry. Default 1000. */
|
|
22
|
+
baseDelayMs?: number;
|
|
23
|
+
/** Upper bound of the wait. Default 30000. */
|
|
24
|
+
maxDelayMs?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface WriteBackTimers {
|
|
27
|
+
setTimeout(callback: () => void, ms: number): unknown;
|
|
28
|
+
clearTimeout(handle: unknown): void;
|
|
29
|
+
}
|
|
30
|
+
export interface WriteBackOptions {
|
|
31
|
+
/**
|
|
32
|
+
* The bytes to store now. Resolve `null` when there is nothing to save yet (the change is not
|
|
33
|
+
* lost: call `schedule()` again when it is). `isCurrent` turns false once the scheduler was
|
|
34
|
+
* cancelled or disposed, so a long serialisation can stop early.
|
|
35
|
+
*/
|
|
36
|
+
serialize: (context: {
|
|
37
|
+
isCurrent: () => boolean;
|
|
38
|
+
}) => Uint8Array | null | Promise<Uint8Array | null>;
|
|
39
|
+
/**
|
|
40
|
+
* Stores the bytes. A returned promise is the acknowledgement: resolving means stored, rejecting
|
|
41
|
+
* counts as a failed try. A plain return (void) is treated as acknowledged at once.
|
|
42
|
+
*/
|
|
43
|
+
write: (bytes: Uint8Array) => void | Promise<void>;
|
|
44
|
+
/** Quiet time after the last change. Default 5000; invalid values fall back to it. */
|
|
45
|
+
debounceMs?: number;
|
|
46
|
+
retry?: WriteBackRetry;
|
|
47
|
+
onStatus?: (state: WriteBackState) => void;
|
|
48
|
+
/** Clock for `lastSavedAt`. Default `Date.now`. */
|
|
49
|
+
now?: () => number;
|
|
50
|
+
/** Timers, injectable for tests. Default the global ones, looked up at call time. */
|
|
51
|
+
timers?: WriteBackTimers;
|
|
52
|
+
}
|
|
53
|
+
export interface WriteBackScheduler {
|
|
54
|
+
/** Notes a change: (re)starts the quiet time, or queues one follow-up write during a write. */
|
|
55
|
+
schedule(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Writes now and resolves once the host acknowledged it (and anything changed meanwhile).
|
|
58
|
+
* Resolves at once when nothing is unsaved; rejects with the last error when the write failed
|
|
59
|
+
* after its retries. When `serialize` and `write` return synchronously, the write has been
|
|
60
|
+
* handed over before `flush` returns.
|
|
61
|
+
*/
|
|
62
|
+
flush(): Promise<void>;
|
|
63
|
+
/** Drops pending work and ignores the result of a write in flight; the scheduler stays usable. */
|
|
64
|
+
cancel(): void;
|
|
65
|
+
/** Cancels and stops for good: later calls do nothing. */
|
|
66
|
+
dispose(): void;
|
|
67
|
+
readonly state: WriteBackState;
|
|
68
|
+
/** True while a change waits for its quiet time or a write (or its retry) is under way. */
|
|
69
|
+
readonly dirty: boolean;
|
|
70
|
+
}
|
|
71
|
+
export declare const DEFAULT_WRITE_BACK_DEBOUNCE_MS = 5000;
|
|
72
|
+
/** The status of `state` for a collaboration state; the error becomes its message. */
|
|
73
|
+
export declare function writeBackStateOf(state: WriteBackState): CollaborationWriteBackState;
|
|
74
|
+
export declare function createWriteBackScheduler(options: WriteBackOptions): WriteBackScheduler;
|
|
75
|
+
//# sourceMappingURL=write-back.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-back.d.ts","s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,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC3C,mDAAmD;IACnD,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,qFAAqF;IACrF,MAAM,CAAC,EAAE,eAAe,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IAClC,+FAA+F;IAC/F,QAAQ,IAAI,IAAI,CAAC;IACjB;;;;;OAKG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,kGAAkG;IAClG,MAAM,IAAI,IAAI,CAAC;IACf,0DAA0D;IAC1D,OAAO,IAAI,IAAI,CAAC;IAChB,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,2FAA2F;IAC3F,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,8BAA8B,OAAQ,CAAC;AAcpD,sFAAsF;AACtF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,GAAG,2BAA2B,CAQnF;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,gBAAgB,GAAG,kBAAkB,CAkKtF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** The scope (the role a page key plays) of the shapes inside master `key`'s content. */
|
|
2
|
+
export declare const masterScope: (key: string) => string;
|
|
3
|
+
export declare const pageId: (key: string) => string;
|
|
4
|
+
export declare const bodyId: (key: string) => string;
|
|
5
|
+
export declare const shapeId: (page: string, key: string) => string;
|
|
6
|
+
export declare const cellId: (page: string, shape: string, path: string) => string;
|
|
7
|
+
export declare const connectId: (key: string) => string;
|
|
8
|
+
export declare const masterId: (key: string) => string;
|
|
9
|
+
export declare const mediaId: (key: string) => string;
|
|
10
|
+
/** Baseline text of a page entry (its position excluded) and of a body. */
|
|
11
|
+
export declare const pageContent: (e: {
|
|
12
|
+
id: string;
|
|
13
|
+
back?: string | undefined;
|
|
14
|
+
xml: string;
|
|
15
|
+
}) => string;
|
|
16
|
+
export declare const bodyContent: (e: {
|
|
17
|
+
shell: string;
|
|
18
|
+
rels?: string | undefined;
|
|
19
|
+
}) => string;
|
|
20
|
+
/** A shape entry: its parent and attributes. */
|
|
21
|
+
export declare const shellContent: (e: {
|
|
22
|
+
parent?: string | undefined;
|
|
23
|
+
open: string;
|
|
24
|
+
}) => string;
|
|
25
|
+
export declare const entryContent: (e: {
|
|
26
|
+
xml?: string | undefined;
|
|
27
|
+
open?: string | undefined;
|
|
28
|
+
}) => string;
|
|
29
|
+
/** A master: id, list element, relationships and a print of its part. */
|
|
30
|
+
export declare const masterContent: (e: {
|
|
31
|
+
id: string;
|
|
32
|
+
xml: string;
|
|
33
|
+
rels?: string | undefined;
|
|
34
|
+
print: string;
|
|
35
|
+
}) => string;
|
|
36
|
+
//# sourceMappingURL=baseline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseline.d.ts","sourceRoot":"","sources":["../../../visio/collab/baseline.ts"],"names":[],"mappings":"AAMA,yFAAyF;AACzF,eAAO,MAAM,WAAW,QAAS,MAAM,KAAG,MAAoB,CAAC;AAC/D,eAAO,MAAM,MAAM,QAAS,MAAM,KAAG,MAAoB,CAAC;AAC1D,eAAO,MAAM,MAAM,QAAS,MAAM,KAAG,MAAoB,CAAC;AAC1D,eAAO,MAAM,OAAO,SAAU,MAAM,OAAO,MAAM,KAAG,MAA4B,CAAC;AACjF,eAAO,MAAM,MAAM,SAAU,MAAM,SAAS,MAAM,QAAQ,MAAM,KAAG,MACtC,CAAC;AAC9B,eAAO,MAAM,SAAS,QAAS,MAAM,KAAG,MAAoB,CAAC;AAC7D,eAAO,MAAM,QAAQ,QAAS,MAAM,KAAG,MAAoB,CAAC;AAC5D,eAAO,MAAM,OAAO,QAAS,MAAM,KAAG,MAAoB,CAAC;AAE3D,2EAA2E;AAC3E,eAAO,MAAM,WAAW,MAAO;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,KAAG,MACnC,CAAC;AACtD,eAAO,MAAM,WAAW,MAAO;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,KAAG,MAC7B,CAAC;AAClD,gDAAgD;AAChD,eAAO,MAAM,YAAY,MAAO;IAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,KAAG,MACf,CAAC;AAClE,eAAO,MAAM,YAAY,MAAO;IAAE,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,KAAG,MACH,CAAC;AACxF,yEAAyE;AACzE,eAAO,MAAM,aAAa,MAAO;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;CACd,KAAG,MAAuE,CAAC"}
|
|
@@ -3,12 +3,24 @@ import type { CollabSession } from '../../collab/session.js';
|
|
|
3
3
|
export declare const VISIO_EDIT_ORIGIN: unique symbol;
|
|
4
4
|
/** Origin of seeding writes, which are not undoable. */
|
|
5
5
|
export declare const VISIO_SYNC_ORIGIN: unique symbol;
|
|
6
|
+
/** Origin of the fix-ups that persist renumbered ids: not a local edit, so never in an undo history. */
|
|
7
|
+
export declare const VISIO_FIXUP_ORIGIN: unique symbol;
|
|
8
|
+
/** What differs between the drawing last applied and the next one, when only page content does. */
|
|
9
|
+
export interface DrawingChange {
|
|
10
|
+
/** Ids (`Page/@ID` in the package handed over) of the pages whose content changed. */
|
|
11
|
+
pages: string[];
|
|
12
|
+
}
|
|
6
13
|
/** What the binding needs from the editor that shows the drawing. DOM-free. */
|
|
7
14
|
export interface DrawingEditor {
|
|
8
15
|
/** The package of the open drawing, or undefined when none can be read now. */
|
|
9
16
|
exportBytes(): Uint8Array | undefined;
|
|
10
|
-
/**
|
|
11
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Replaces the open drawing with `bytes` as a step outside the local undo history. `change`
|
|
19
|
+
* is given only when the open drawing is exactly the one last applied and just the content of
|
|
20
|
+
* these pages differs (same page list, masters, styles, theme, media and other parts): the
|
|
21
|
+
* editor may then read only those pages. Without it, read the whole package.
|
|
22
|
+
*/
|
|
23
|
+
applyRemote(bytes: Uint8Array, change?: DrawingChange): Promise<void>;
|
|
12
24
|
/** Called after the person edited or loaded a drawing (never for `applyRemote`). */
|
|
13
25
|
onLocalChange(listener: () => void): () => void;
|
|
14
26
|
/** Called whenever the editor may have stopped being busy. */
|
|
@@ -27,6 +39,12 @@ export interface DrawingBindingOptions {
|
|
|
27
39
|
onError?: (error: unknown) => void;
|
|
28
40
|
/** Part of every key this peer mints; defaults to the Yjs client id. */
|
|
29
41
|
keyTag?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Runs `run` once after the current burst of remote transactions (default: a zero-delay timer).
|
|
44
|
+
* Remote changes that arrive before it runs share one rebuild. `idle()` waits for it, so a test
|
|
45
|
+
* that injects a manual scheduler must call `run` before awaiting `idle()`.
|
|
46
|
+
*/
|
|
47
|
+
schedule?: (run: () => void) => void;
|
|
30
48
|
}
|
|
31
49
|
export interface DrawingBinding {
|
|
32
50
|
/** Undoes the last local edit (never a collaborator's); resolves false when there is none. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bind.d.ts","sourceRoot":"","sources":["../../../visio/collab/bind.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"bind.d.ts","sourceRoot":"","sources":["../../../visio/collab/bind.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAS1D,wFAAwF;AACxF,eAAO,MA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9F,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7B,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7B,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB,sDAAsD;IACtD,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IACtD,iGAAiG;IACjG,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,iBAAiB,EACvB,MAAM,EAAE,aAAa,EACrB,OAAO,GAAE,qBAA0B,GACjC,cAAc,CAsNhB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type JSZip from 'jszip';
|
|
2
|
+
export interface ListItem {
|
|
3
|
+
key: string;
|
|
4
|
+
/** The list element with {@link REL_MARK} where its `Rel` goes. */
|
|
5
|
+
xml: string;
|
|
6
|
+
part: Uint8Array;
|
|
7
|
+
/** Relationships of the item part, verbatim. */
|
|
8
|
+
rels?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ListOptions {
|
|
11
|
+
listPath: string;
|
|
12
|
+
open: string;
|
|
13
|
+
close: string;
|
|
14
|
+
relType: string;
|
|
15
|
+
/** File name stem of new parts: `page` gives `page1.xml`. */
|
|
16
|
+
stem: string;
|
|
17
|
+
items: readonly ListItem[];
|
|
18
|
+
/** Part names these keys had in the local package. */
|
|
19
|
+
known: Map<string, string>;
|
|
20
|
+
files: Map<string, Uint8Array | string>;
|
|
21
|
+
/** Names in use; extended with the ones placed. */
|
|
22
|
+
taken: Set<string>;
|
|
23
|
+
localZip: JSZip | undefined;
|
|
24
|
+
}
|
|
25
|
+
/** Writes the list, its relationships and the item parts; returns each item's part name. */
|
|
26
|
+
export declare function placeList(options: ListOptions): Promise<Map<string, string>>;
|
|
27
|
+
//# sourceMappingURL=compose-lists.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compose-lists.d.ts","sourceRoot":"","sources":["../../../visio/collab/compose-lists.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,QAAQ;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,mEAAmE;IACnE,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;IACjB,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC3B,sDAAsD;IACtD,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC;IACxC,mDAAmD;IACnD,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACnB,QAAQ,EAAE,KAAK,GAAG,SAAS,CAAC;CAC5B;AAKD,4FAA4F;AAC5F,wBAAsB,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CA2DlF"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import type { DrawingKeys } from './keys.js';
|
|
2
|
-
import type { ResolvedDrawing, ResolvedPage } from './read.js';
|
|
2
|
+
import type { ResolvedDrawing, ResolvedMaster, ResolvedPage } from './read.js';
|
|
3
3
|
export interface ComposeOptions {
|
|
4
4
|
/** Refuse shared parts that decode to more than this many bytes in total. */
|
|
5
5
|
maxPartBytes?: number;
|
|
6
6
|
}
|
|
7
7
|
/** The page part with its shapes and connects filled in. */
|
|
8
|
-
export declare
|
|
8
|
+
export declare const pagePartXml: (page: ResolvedPage) => string;
|
|
9
|
+
/** The master part with its shapes and connects filled in. */
|
|
10
|
+
export declare const masterPartXml: (master: ResolvedMaster) => string;
|
|
9
11
|
export interface ComposedDrawing {
|
|
10
12
|
bytes: Uint8Array;
|
|
13
|
+
/** The resolved drawing's signature: equal signatures build equal packages. */
|
|
14
|
+
signature: string;
|
|
11
15
|
/** Records what the room held as this peer's baseline; call it once the editor adopted `bytes`. */
|
|
12
16
|
commit: () => void;
|
|
13
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../../visio/collab/compose.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../../visio/collab/compose.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAiB1C,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAiB,MAAM,QAAQ,CAAC;AAK3F,MAAM,WAAW,cAAc;IAC9B,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AA6CD,4DAA4D;AAC5D,eAAO,MAAM,WAAW,SAAU,YAAY,KAAG,MAO/C,CAAC;AAEH,8DAA8D;AAC9D,eAAO,MAAM,aAAa,WAAY,cAAc,KAAG,MAOrD,CAAC;AAEH,MAAM,WAAW,eAAe;IAC/B,KAAK,EAAE,UAAU,CAAC;IAClB,+EAA+E;IAC/E,SAAS,EAAE,MAAM,CAAC;IAClB,mGAAmG;IACnG,MAAM,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,wBAAsB,cAAc,CACnC,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,UAAU,GAAG,SAAS,EAC7B,IAAI,EAAE,WAAW,EACjB,OAAO,GAAE,cAAmB,GAC1B,OAAO,CAAC,eAAe,CAAC,CAoK1B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Fixup } from './read-ids.js';
|
|
2
|
+
import { type SharedDrawing } from './schema.js';
|
|
3
|
+
/** Writes `fixups` into the room; returns how many entries changed. Run it inside one transaction. */
|
|
4
|
+
export declare function applyFixups(shared: SharedDrawing, fixups: readonly Fixup[]): number;
|
|
5
|
+
//# sourceMappingURL=fixups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixups.d.ts","sourceRoot":"","sources":["../../../visio/collab/fixups.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,UAAU,CAAC;AAE5D,sGAAsG;AACtG,wBAAgB,WAAW,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,KAAK,EAAE,GAAG,MAAM,CAOnF"}
|