ooxml-core 1.22.0 → 1.24.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 +559 -339
- package/dist/automation/index.d.ts +1 -0
- package/dist/automation/index.d.ts.map +1 -1
- package/dist/automation/index.mjs +558 -340
- package/dist/automation/live.d.ts +89 -0
- package/dist/automation/live.d.ts.map +1 -0
- 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/docx/ui/customization.d.ts +30 -0
- package/dist/docx/ui/customization.d.ts.map +1 -0
- package/dist/docx/ui/index.cjs +51 -0
- package/dist/docx/ui/index.d.ts +1 -0
- package/dist/docx/ui/index.d.ts.map +1 -1
- package/dist/docx/ui/index.mjs +46 -1
- package/dist/embedding/backstage.d.ts +48 -0
- package/dist/embedding/backstage.d.ts.map +1 -0
- package/dist/embedding/capabilities.d.ts +60 -0
- package/dist/embedding/capabilities.d.ts.map +1 -0
- package/dist/embedding/customization.d.ts +32 -0
- package/dist/embedding/customization.d.ts.map +1 -0
- package/dist/embedding/index.cjs +229 -0
- package/dist/embedding/index.d.ts +7 -0
- package/dist/embedding/index.d.ts.map +1 -0
- package/dist/embedding/index.mjs +204 -0
- package/dist/embedding/menu-commands.d.ts +66 -0
- package/dist/embedding/menu-commands.d.ts.map +1 -0
- package/dist/embedding/regions.d.ts +58 -0
- package/dist/embedding/regions.d.ts.map +1 -0
- package/dist/embedding/storage.d.ts +111 -0
- package/dist/embedding/storage.d.ts.map +1 -0
- package/dist/index.cjs +233 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +233 -1
- 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 +1603 -361
- 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 +1596 -362
- package/dist/visio/collab/keys.d.ts +32 -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 +41 -0
- package/dist/visio/collab/pieces.d.ts.map +1 -0
- package/dist/visio/collab/read-ids.d.ts +35 -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 +34 -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/collab/zip-store.d.ts +4 -0
- package/dist/visio/collab/zip-store.d.ts.map +1 -0
- package/dist/visio/document-level.d.ts +57 -0
- package/dist/visio/document-level.d.ts.map +1 -0
- package/dist/visio/index.cjs +485 -333
- package/dist/visio/index.d.ts +2 -0
- package/dist/visio/index.d.ts.map +1 -1
- package/dist/visio/index.mjs +484 -334
- package/dist/visio/layers.d.ts +3 -0
- package/dist/visio/layers.d.ts.map +1 -1
- package/dist/visio/package.d.ts +9 -0
- package/dist/visio/package.d.ts.map +1 -1
- 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 +14 -0
- package/dist/visio/parser.d.ts.map +1 -1
- package/dist/visio/shape-metadata.d.ts +3 -0
- package/dist/visio/shape-metadata.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/contract.d.ts +27 -2
- package/dist/visio/ui/contract.d.ts.map +1 -1
- package/dist/visio/ui/customization.d.ts +46 -0
- package/dist/visio/ui/customization.d.ts.map +1 -0
- package/dist/visio/ui/index.cjs +460 -320
- package/dist/visio/ui/index.d.ts +1 -0
- package/dist/visio/ui/index.d.ts.map +1 -1
- package/dist/visio/ui/index.mjs +458 -321
- package/dist/xlsx/ui/commands.d.ts +2 -0
- package/dist/xlsx/ui/commands.d.ts.map +1 -1
- package/dist/xlsx/ui/customization.d.ts +49 -0
- package/dist/xlsx/ui/customization.d.ts.map +1 -0
- package/dist/xlsx/ui/index.cjs +39 -1
- package/dist/xlsx/ui/index.d.ts +1 -0
- package/dist/xlsx/ui/index.d.ts.map +1 -1
- package/dist/xlsx/ui/index.mjs +37 -2
- package/package.json +6 -1
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import JSZip from 'jszip';
|
|
2
1
|
import type { DrawingKeys } from './keys.js';
|
|
2
|
+
import type { Piece } from './pieces.js';
|
|
3
3
|
import type { ConnectEntry } from './schema.js';
|
|
4
|
+
export { type Layout, type LocalItem, readLayout, readLocalItems, readZip, zipText, } from './snapshot-io.js';
|
|
4
5
|
export interface ShapeSnapshot {
|
|
5
6
|
key: string;
|
|
6
7
|
id: string;
|
|
7
|
-
|
|
8
|
+
/** Key of the shape this one is nested in. */
|
|
9
|
+
parent?: string;
|
|
10
|
+
open: string;
|
|
11
|
+
pieces: Piece[];
|
|
8
12
|
}
|
|
9
13
|
export interface ConnectSnapshot {
|
|
10
14
|
key: string;
|
|
@@ -18,14 +22,39 @@ export interface PageSnapshot {
|
|
|
18
22
|
shell: string;
|
|
19
23
|
rels?: string;
|
|
20
24
|
path: string;
|
|
25
|
+
/** Every shape of the page, parents before the shapes nested in them. */
|
|
26
|
+
shapes: ShapeSnapshot[];
|
|
27
|
+
connects: ConnectSnapshot[];
|
|
28
|
+
}
|
|
29
|
+
export interface MasterSnapshot {
|
|
30
|
+
key: string;
|
|
31
|
+
id: string;
|
|
32
|
+
xml: string;
|
|
33
|
+
path: string;
|
|
34
|
+
/** The master part with its shapes and connects replaced by markers. */
|
|
35
|
+
part: Uint8Array;
|
|
36
|
+
rels?: string;
|
|
37
|
+
/** Every shape of the master's content, parents before the shapes nested in them. */
|
|
21
38
|
shapes: ShapeSnapshot[];
|
|
22
39
|
connects: ConnectSnapshot[];
|
|
23
40
|
}
|
|
41
|
+
export interface MediaSnapshot {
|
|
42
|
+
path: string;
|
|
43
|
+
hash: string;
|
|
44
|
+
ct: string;
|
|
45
|
+
d: boolean;
|
|
46
|
+
data: Uint8Array;
|
|
47
|
+
}
|
|
24
48
|
export interface DrawingSnapshot {
|
|
25
49
|
pagesPath: string;
|
|
26
50
|
pagesOpen: string;
|
|
27
51
|
pagesClose: string;
|
|
28
52
|
pages: PageSnapshot[];
|
|
53
|
+
mastersPath?: string;
|
|
54
|
+
mastersOpen?: string;
|
|
55
|
+
mastersClose?: string;
|
|
56
|
+
masters: MasterSnapshot[];
|
|
57
|
+
media: MediaSnapshot[];
|
|
29
58
|
parts: Map<string, Uint8Array>;
|
|
30
59
|
}
|
|
31
60
|
export interface SnapshotOptions {
|
|
@@ -35,27 +64,5 @@ export interface SnapshotOptions {
|
|
|
35
64
|
export declare const DEFAULT_MAX_PART_BYTES: number;
|
|
36
65
|
/** The ids of a shape element and of every shape nested in it, outermost first. */
|
|
37
66
|
export declare function shapeIds(xml: string): string[];
|
|
38
|
-
export declare const readZip: (bytes: Uint8Array) => Promise<JSZip>;
|
|
39
|
-
export declare const zipText: (zip: JSZip, path: string) => Promise<string | undefined>;
|
|
40
|
-
export interface Layout {
|
|
41
|
-
documentPath: string;
|
|
42
|
-
pagesPath: string;
|
|
43
|
-
}
|
|
44
|
-
/** The document and pages parts of a package, through its relationships. */
|
|
45
|
-
export declare function readLayout(zip: JSZip): Promise<Layout | undefined>;
|
|
46
|
-
export interface LocalPage {
|
|
47
|
-
id: string;
|
|
48
|
-
text: string;
|
|
49
|
-
path: string;
|
|
50
|
-
rel: {
|
|
51
|
-
start: number;
|
|
52
|
-
end: number;
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
/** The `Page` elements of a pages part with the part each one points to. */
|
|
56
|
-
export declare function readLocalPages(zip: JSZip, layout: Layout, pagesXml: string): Promise<{
|
|
57
|
-
box: import("./scan.js").Container;
|
|
58
|
-
pages: LocalPage[];
|
|
59
|
-
} | undefined>;
|
|
60
67
|
export declare function snapshotDrawing(bytes: Uint8Array, keys: DrawingKeys, options?: SnapshotOptions): Promise<DrawingSnapshot>;
|
|
61
68
|
//# sourceMappingURL=snapshot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../../visio/collab/snapshot.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../../visio/collab/snapshot.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAK7C,OAAO,EACN,KAAK,MAAM,EACX,KAAK,SAAS,EACd,UAAU,EACV,cAAc,EACd,OAAO,EACP,OAAO,GACP,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,aAAa;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,EAAE,CAAC;CAChB;AACD,MAAM,WAAW,eAAe;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,YAAY,CAAC;CACpB;AACD,MAAM,WAAW,YAAY;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC5B;AACD,MAAM,WAAW,cAAc;IAC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|
|
1
|
+
import type { DrawingSnapshot } from './snapshot.js';
|
|
2
|
+
import { type WriteContext } from './write-shapes.js';
|
|
3
|
+
export declare const mediaKey: (hash: string, path: string) => string;
|
|
4
|
+
export declare function syncMasters(ctx: WriteContext, snapshot: DrawingSnapshot): void;
|
|
5
|
+
export declare function syncMedia(ctx: WriteContext, snapshot: DrawingSnapshot): void;
|
|
6
|
+
/** Writes every other part whole, last write wins; returns the number of deletions. */
|
|
7
|
+
export declare function syncParts(ctx: WriteContext, snapshot: DrawingSnapshot): number;
|
|
8
|
+
//# sourceMappingURL=write-parts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-parts.d.ts","sourceRoot":"","sources":["../../../visio/collab/write-parts.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,KAAK,YAAY,EAAuC,MAAM,gBAAgB,CAAC;AAExF,eAAO,MAAM,QAAQ,SAAU,MAAM,QAAQ,MAAM,KAAG,MAA2B,CAAC;AAElF,wBAAgB,WAAW,CAAC,GAAG,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI,CAgC9E;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI,CAiB5E;AAED,uFAAuF;AACvF,wBAAgB,SAAS,CAAC,GAAG,EAAE,YAAY,EAAE,QAAQ,EAAE,eAAe,GAAG,MAAM,CAgB9E"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as Y from 'yjs';
|
|
2
|
+
import type { DrawingKeys } from './keys.js';
|
|
3
|
+
import { type SharedDrawing } from './schema.js';
|
|
4
|
+
import type { ConnectSnapshot, ShapeSnapshot } from './snapshot.js';
|
|
5
|
+
export interface WriteContext {
|
|
6
|
+
shared: SharedDrawing;
|
|
7
|
+
keys: DrawingKeys;
|
|
8
|
+
/** Baseline of what is written or kept by this pass. */
|
|
9
|
+
now: Map<string, string>;
|
|
10
|
+
/** Shared by every entry created or rewritten in this pass. */
|
|
11
|
+
batch: string;
|
|
12
|
+
write(map: Y.Map<unknown>, key: string, value: unknown): void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Writes `local()` when it differs from this peer's baseline (a local edit) or the room has no
|
|
16
|
+
* entry; otherwise keeps the room's value (a collaborator's change not applied here yet), with the
|
|
17
|
+
* local position. `stamp` records the batch on an entry that is written.
|
|
18
|
+
*/
|
|
19
|
+
export declare function syncEntry<T extends {
|
|
20
|
+
pos?: number;
|
|
21
|
+
b?: string;
|
|
22
|
+
}>(ctx: WriteContext, map: Y.Map<unknown>, mapKey: string, id: string, content: string, room: T | undefined, roomContent: () => string, local: () => T, stamp?: boolean): void;
|
|
23
|
+
/** Writes the connects of a page or master that the room does not hold (or that are new here). */
|
|
24
|
+
export declare function syncConnects(ctx: WriteContext, connects: readonly ConnectSnapshot[]): void;
|
|
25
|
+
/** Writes the shapes of a page, or of a master's content (`page.key` is then its scope). */
|
|
26
|
+
export declare function syncShapes(ctx: WriteContext, page: {
|
|
27
|
+
key: string;
|
|
28
|
+
shapes: readonly ShapeSnapshot[];
|
|
29
|
+
}): void;
|
|
30
|
+
//# sourceMappingURL=write-shapes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-shapes.d.ts","sourceRoot":"","sources":["../../../visio/collab/write-shapes.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAG1C,OAAO,EAGN,KAAK,aAAa,EAGlB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,WAAW,YAAY;IAC5B,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,wDAAwD;IACxD,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzB,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;CAC9D;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAC/D,GAAG,EAAE,YAAY,EACjB,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EACnB,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,CAAC,GAAG,SAAS,EACnB,WAAW,EAAE,MAAM,MAAM,EACzB,KAAK,EAAE,MAAM,CAAC,EACd,KAAK,UAAQ,GACX,IAAI,CAWN;AAeD,kGAAkG;AAClG,wBAAgB,YAAY,CAAC,GAAG,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,eAAe,EAAE,GAAG,IAAI,CAM1F;AAED,4FAA4F;AAC5F,wBAAgB,UAAU,CACzB,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,aAAa,EAAE,CAAA;CAAE,GACrD,IAAI,CAiDN"}
|
|
@@ -1,20 +1,8 @@
|
|
|
1
|
+
import { bodyContent, bodyId, connectId, pageContent, pageId } from './baseline.js';
|
|
1
2
|
import type { DrawingKeys } from './keys.js';
|
|
2
|
-
import type { DrawingSnapshot } from './snapshot.js';
|
|
3
3
|
import { type SharedDrawing } from './schema.js';
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
export declare const connectId: (key: string) => string;
|
|
8
|
-
/** Baseline text of a page entry (its position excluded) and of a body. */
|
|
9
|
-
export declare const pageContent: (e: {
|
|
10
|
-
id: string;
|
|
11
|
-
back?: string | undefined;
|
|
12
|
-
xml: string;
|
|
13
|
-
}) => string;
|
|
14
|
-
export declare const bodyContent: (e: {
|
|
15
|
-
shell: string;
|
|
16
|
-
rels?: string | undefined;
|
|
17
|
-
}) => string;
|
|
18
|
-
/** Writes `snapshot` into `shared`; returns the number of entries changed. */
|
|
4
|
+
import type { DrawingSnapshot } from './snapshot.js';
|
|
5
|
+
export { bodyId, connectId, pageContent, bodyContent, pageId };
|
|
6
|
+
/** Writes `snapshot` into `shared`; returns the number of entries changed. Throws on another schema version. */
|
|
19
7
|
export declare function writeSharedDrawing(shared: SharedDrawing, snapshot: DrawingSnapshot, keys: DrawingKeys): number;
|
|
20
8
|
//# sourceMappingURL=write.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../../../visio/collab/write.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../../../visio/collab/write.ts"],"names":[],"mappings":"AAOA,OAAO,EACN,WAAW,EACX,MAAM,EACN,SAAS,EAGT,WAAW,EACX,MAAM,EACN,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,EAIN,KAAK,aAAa,EAKlB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAIlD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;AAe/D,gHAAgH;AAChH,wBAAgB,kBAAkB,CACjC,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAE,WAAW,GACf,MAAM,CA4GR"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type CrcCache = WeakMap<Uint8Array, number>;
|
|
2
|
+
/** A ZIP of `files` in the given order. `crcs` remembers the checksum of each byte array. */
|
|
3
|
+
export declare function writeStoredZip(files: readonly (readonly [string, Uint8Array])[], crcs: CrcCache): Uint8Array;
|
|
4
|
+
//# sourceMappingURL=zip-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zip-store.d.ts","sourceRoot":"","sources":["../../../visio/collab/zip-store.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAEnD,6FAA6F;AAC7F,wBAAgB,cAAc,CAC7B,KAAK,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,EAAE,EACjD,IAAI,EAAE,QAAQ,GACZ,UAAU,CA2DZ"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { VisioMaster } from './model.js';
|
|
2
|
+
import { type MasterRecord } from './master-list.js';
|
|
3
|
+
import { type VisioPackage } from './package.js';
|
|
4
|
+
import { createVisioPrintSettingsReader } from './print-settings.js';
|
|
5
|
+
import { type RawShape, type Report } from './sheet.js';
|
|
6
|
+
import type { Resources } from './style.js';
|
|
7
|
+
import type { StyleRecord } from './style-inheritance.js';
|
|
8
|
+
import type { ParseVsdxOptions } from './parser.js';
|
|
9
|
+
export interface DocumentLevel {
|
|
10
|
+
documentRoot: Element;
|
|
11
|
+
resources: Resources;
|
|
12
|
+
styles: Map<string, StyleRecord>;
|
|
13
|
+
readPrintSettings: ReturnType<typeof createVisioPrintSettingsReader>;
|
|
14
|
+
masters: Map<string, RawShape[]>;
|
|
15
|
+
masterRecords: MasterRecord[];
|
|
16
|
+
/** The diagnostics the read reported, in order, so a reuse reports them again. */
|
|
17
|
+
reports: Parameters<Report>[];
|
|
18
|
+
}
|
|
19
|
+
/** What the read consumed from its limits once the masters were listed. */
|
|
20
|
+
export interface ListedMasters {
|
|
21
|
+
documentMasters: VisioMaster[];
|
|
22
|
+
counters: {
|
|
23
|
+
curveWork: number;
|
|
24
|
+
geometry: number;
|
|
25
|
+
text: number;
|
|
26
|
+
expansion: number;
|
|
27
|
+
textRuns: number;
|
|
28
|
+
paragraphs: number;
|
|
29
|
+
shapes: number;
|
|
30
|
+
metadata: [number, number];
|
|
31
|
+
layers: [number, number];
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
interface CachedLevel {
|
|
35
|
+
/** The options that shaped the read. */
|
|
36
|
+
options: string;
|
|
37
|
+
converter: unknown;
|
|
38
|
+
/** Each part the read looked at with a print of it (declared CRC-32 and size). */
|
|
39
|
+
reads: [string, string][];
|
|
40
|
+
level: DocumentLevel;
|
|
41
|
+
listed: ListedMasters;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Keeps the document-level data of the last read. Hand the same object to every read of one
|
|
45
|
+
* drawing: a read whose package has identical parts where the last one looked (and the same
|
|
46
|
+
* options) reuses the data instead of reading styles, themes and masters again; anything else
|
|
47
|
+
* reads them afresh and replaces the entry. Identity of parts is judged by the CRC-32 and size
|
|
48
|
+
* their ZIP entries declare, which the package validates when a part is inflated.
|
|
49
|
+
*/
|
|
50
|
+
export interface VisioDocumentCache {
|
|
51
|
+
entry?: CachedLevel;
|
|
52
|
+
}
|
|
53
|
+
export declare function optionsKey(options: ParseVsdxOptions): string;
|
|
54
|
+
export declare const cacheMatches: (entry: CachedLevel | undefined, pkg: VisioPackage, options: ParseVsdxOptions) => entry is CachedLevel;
|
|
55
|
+
export type { CachedLevel };
|
|
56
|
+
export declare function readDocumentLevel(pkg: VisioPackage, documentPart: string, options: ParseVsdxOptions, checkTime: () => void, forward: Report): Promise<DocumentLevel>;
|
|
57
|
+
//# sourceMappingURL=document-level.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-level.d.ts","sourceRoot":"","sources":["../../visio/document-level.ts"],"names":[],"mappings":"AAIA,OAAO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