ooxml.js 2.9.4 → 2.10.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 -6
- package/dist/base64--HuymRl_.d.cts +5 -0
- package/dist/base64--HuymRl_.d.ts +5 -0
- package/dist/build-C0gS5QeG.d.ts +6 -0
- package/dist/build-CBL9scQK.d.cts +6 -0
- package/dist/build-XSm3I8LT.d.cts +5 -0
- package/dist/build-Z1KRkSEB.d.ts +5 -0
- package/dist/codec-B52c8v4h.d.ts +88 -0
- package/dist/codec-nIFHuTm-.d.cts +88 -0
- package/dist/codec.d.cts +2 -72
- package/dist/codec.d.ts +2 -72
- package/dist/color-fFIKAs-Y.d.cts +9 -0
- package/dist/color-fFIKAs-Y.d.ts +9 -0
- package/dist/compact-B1qg9oex.d.cts +70 -0
- package/dist/compact-f0TfhicN.d.ts +70 -0
- package/dist/compact.d.cts +1 -69
- package/dist/compact.d.ts +1 -69
- package/dist/content-UlQ-Nhgi.d.cts +6 -0
- package/dist/content-t6ZfmfQM.d.ts +6 -0
- package/dist/entities-6DuTszqf.d.cts +4 -0
- package/dist/entities-6DuTszqf.d.ts +4 -0
- package/dist/fragment-B1ZV7T5Z.d.ts +6 -0
- package/dist/fragment-B1og_8uA.d.cts +6 -0
- package/dist/image/sniff.d.cts +1 -4
- package/dist/image/sniff.d.ts +1 -4
- package/dist/index.d.cts +20 -21
- package/dist/index.d.ts +20 -21
- package/dist/metadata-D6o-kLpg.d.cts +16 -0
- package/dist/metadata-o_WH9V_I.d.ts +16 -0
- package/dist/numbering-C53LT-Jx.d.cts +23 -0
- package/dist/numbering-D0YfuiOO.d.ts +23 -0
- package/dist/package-io/read.d.cts +1 -4
- package/dist/package-io/read.d.ts +1 -4
- package/dist/package-io/write.d.cts +1 -4
- package/dist/package-io/write.d.ts +1 -4
- package/dist/parse-A8_8sdpX.d.ts +5 -0
- package/dist/parse-CP5FLZqv.d.cts +5 -0
- package/dist/read-B2-FFhqI.d.ts +60 -0
- package/dist/read-BLMpCzzG.d.ts +45 -0
- package/dist/read-CMDEXqGw.d.ts +5 -0
- package/dist/read-D_CpruL_.d.cts +60 -0
- package/dist/read-DymSS-X4.d.cts +45 -0
- package/dist/read-DzmMJPHd.d.cts +5 -0
- package/dist/sniff-DjpnUZRp.d.cts +5 -0
- package/dist/sniff-DjpnUZRp.d.ts +5 -0
- package/dist/typed/docx/numbering.d.cts +1 -22
- package/dist/typed/docx/numbering.d.ts +1 -22
- package/dist/typed/docx/read.d.cts +1 -59
- package/dist/typed/docx/read.d.ts +1 -59
- package/dist/typed/pptx/read.d.cts +1 -44
- package/dist/typed/pptx/read.d.ts +1 -44
- package/dist/typed/shared/color.d.cts +1 -8
- package/dist/typed/shared/color.d.ts +1 -8
- package/dist/typed/shared/metadata.d.cts +1 -15
- package/dist/typed/shared/metadata.d.ts +1 -15
- package/dist/typed/util.d.cts +1 -17
- package/dist/typed/util.d.ts +1 -17
- package/dist/typed/xlsx/build.d.cts +1 -5
- package/dist/typed/xlsx/build.d.ts +1 -5
- package/dist/typed/xlsx/content.d.cts +1 -5
- package/dist/typed/xlsx/content.d.ts +1 -5
- package/dist/typed/xlsx.d.cts +1 -42
- package/dist/typed/xlsx.d.ts +1 -42
- package/dist/util/base64.d.cts +1 -4
- package/dist/util/base64.d.ts +1 -4
- package/dist/util-DFe4UbvU.d.ts +18 -0
- package/dist/util-M3JJlDhF.d.cts +18 -0
- package/dist/write-6JmxvaK5.d.cts +5 -0
- package/dist/write-CT-EgVT7.d.ts +5 -0
- package/dist/xlsx-B97t4YE-.d.cts +43 -0
- package/dist/xlsx-BxKODiLX.d.ts +43 -0
- package/dist/xml/build.d.cts +1 -4
- package/dist/xml/build.d.ts +1 -4
- package/dist/xml/entities.d.cts +1 -3
- package/dist/xml/entities.d.ts +1 -3
- package/dist/xml/fragment.d.cts +1 -5
- package/dist/xml/fragment.d.ts +1 -5
- package/dist/xml/parse.d.cts +1 -4
- package/dist/xml/parse.d.ts +1 -4
- package/dist/zip-Ckbv-mtV.d.cts +5 -0
- package/dist/zip-Ckbv-mtV.d.ts +5 -0
- package/dist/zip.d.cts +1 -4
- package/dist/zip.d.ts +1 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -201,12 +201,13 @@ const out = encodeCompactPackage(compact); // CompactPackage -> OOXML bytes dire
|
|
|
201
201
|
## Build, test, and lint
|
|
202
202
|
|
|
203
203
|
```sh
|
|
204
|
-
pnpm build # tsdown -> dist
|
|
205
|
-
pnpm lint # eslint . --fix --cache --max-warnings 0
|
|
206
|
-
pnpm typecheck # tsc
|
|
207
|
-
pnpm test # vitest run
|
|
208
|
-
pnpm test:watch # vitest
|
|
209
|
-
pnpm test:
|
|
204
|
+
pnpm build # turbo run _build (tsdown -> dist/: one ESM + CJS + .d.ts set per source module, via tsdown.config.ts)
|
|
205
|
+
pnpm lint # turbo run _lint (eslint . --fix --cache --max-warnings 0)
|
|
206
|
+
pnpm typecheck # turbo run _typecheck _typecheck:node (tsc against tsconfig.json + tsconfig.node.json, the dual-tsconfig setup)
|
|
207
|
+
pnpm test # turbo run _test (vitest run --project unit)
|
|
208
|
+
pnpm test:watch # vitest --project unit
|
|
209
|
+
pnpm test:workers # turbo run _test:workers (vitest run --config vitest.workers.config.ts)
|
|
210
|
+
pnpm test:smoke # turbo run _test:smoke (builds dist/, then runs test/smoke.test.mjs to verify the built ESM and CJS artifacts both load and behave identically)
|
|
210
211
|
```
|
|
211
212
|
|
|
212
213
|
`pnpm prepublishOnly` runs `lint`, `typecheck`, `tsdown`, `publint`, and `@arethetypeswrong/cli` (`attw --pack`) — the full publish-readiness check — before a release.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { r as Package } from "./package-BUojjTXf.js";
|
|
2
|
+
import { ContentDocument } from "document-schema.js";
|
|
3
|
+
//#region src/typed/xlsx/build.d.ts
|
|
4
|
+
declare function buildXlsxPackage(document: ContentDocument): Package;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { buildXlsxPackage as t };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { r as Package } from "./package-L24lkba-.cjs";
|
|
2
|
+
import { ContentDocument } from "document-schema.js";
|
|
3
|
+
//#region src/typed/xlsx/build.d.ts
|
|
4
|
+
declare function buildXlsxPackage(document: ContentDocument): Package;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { buildXlsxPackage as t };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { d as XmlNode } from "./node-CkBWRjNR.js";
|
|
2
|
+
import { r as Package } from "./package-BUojjTXf.js";
|
|
3
|
+
import "./read-CMDEXqGw.js";
|
|
4
|
+
import "./write-CT-EgVT7.js";
|
|
5
|
+
import "./parse-A8_8sdpX.js";
|
|
6
|
+
import "./build-Z1KRkSEB.js";
|
|
7
|
+
import "./fragment-B1ZV7T5Z.js";
|
|
8
|
+
import "./util-DFe4UbvU.js";
|
|
9
|
+
import "./compact-f0TfhicN.js";
|
|
10
|
+
import "./color-fFIKAs-Y.js";
|
|
11
|
+
import "./metadata-o_WH9V_I.js";
|
|
12
|
+
import "./read-B2-FFhqI.js";
|
|
13
|
+
import "./numbering-D0YfuiOO.js";
|
|
14
|
+
import "./read-BLMpCzzG.js";
|
|
15
|
+
import "./xlsx-BxKODiLX.js";
|
|
16
|
+
import "./content-t6ZfmfQM.js";
|
|
17
|
+
import "./build-C0gS5QeG.js";
|
|
18
|
+
import { z } from "zod";
|
|
19
|
+
import { Alignment as Alignment$1, AlignmentSchema, Box as Box$1, BoxSchema, COLOR_BLACK as COLOR_BLACK$1, CONTENT_FORMAT_VERSION as CONTENT_FORMAT_VERSION$1, Color as Color$1, ColorSchema, ContentBlock as ContentBlock$1, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders as ContentCellBorders$1, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentDocument as ContentDocument$1, ContentDocumentSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema as ContentSectionSchema$1, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange as ContentSheetPrintRange$1, ContentSheetPrintRangeSchema, ContentSheetPrintSettings as ContentSheetPrintSettings$1, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange as ContentSheetRepeatRange$1, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema as ContentSlideSchema$1, ContentStrokeStyle, ContentStrokeStyleSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, Margins, MarginsSchema, PAGE_SIZE_A4 as PAGE_SIZE_A4$1, PAGE_SIZE_LETTER as PAGE_SIZE_LETTER$1, PageSize as PageSize$1, PageSizeSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN as SLIDE_SIZE_WIDESCREEN$1, colorToRgbHex as colorToRgbHex$1, isContentBlock, rgbHexToColor as rgbHexToColor$1 } from "document-schema.js";
|
|
20
|
+
//#region src/codec.d.ts
|
|
21
|
+
declare const xmlCodec: z.ZodCodec<z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
22
|
+
type: z.ZodLiteral<"text">;
|
|
23
|
+
value: z.ZodString;
|
|
24
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
+
type: z.ZodLiteral<"cdata">;
|
|
26
|
+
value: z.ZodString;
|
|
27
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
28
|
+
type: z.ZodLiteral<"comment">;
|
|
29
|
+
value: z.ZodString;
|
|
30
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
31
|
+
type: z.ZodLiteral<"declaration">;
|
|
32
|
+
attributes: z.ZodArray<z.ZodObject<{
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
value: z.ZodString;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
37
|
+
type: z.ZodLiteral<"pi">;
|
|
38
|
+
target: z.ZodString;
|
|
39
|
+
content: z.ZodString;
|
|
40
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
+
type: z.ZodLiteral<"element">;
|
|
42
|
+
tag: z.ZodString;
|
|
43
|
+
attributes: z.ZodArray<z.ZodObject<{
|
|
44
|
+
name: z.ZodString;
|
|
45
|
+
value: z.ZodString;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
|
|
48
|
+
}, z.core.$strip>], "type">>>;
|
|
49
|
+
declare const packageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
|
|
50
|
+
parts: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
51
|
+
kind: z.ZodLiteral<"xml">;
|
|
52
|
+
nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
53
|
+
type: z.ZodLiteral<"text">;
|
|
54
|
+
value: z.ZodString;
|
|
55
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
+
type: z.ZodLiteral<"cdata">;
|
|
57
|
+
value: z.ZodString;
|
|
58
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
+
type: z.ZodLiteral<"comment">;
|
|
60
|
+
value: z.ZodString;
|
|
61
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
62
|
+
type: z.ZodLiteral<"declaration">;
|
|
63
|
+
attributes: z.ZodArray<z.ZodObject<{
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
value: z.ZodString;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
68
|
+
type: z.ZodLiteral<"pi">;
|
|
69
|
+
target: z.ZodString;
|
|
70
|
+
content: z.ZodString;
|
|
71
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
72
|
+
type: z.ZodLiteral<"element">;
|
|
73
|
+
tag: z.ZodString;
|
|
74
|
+
attributes: z.ZodArray<z.ZodObject<{
|
|
75
|
+
name: z.ZodString;
|
|
76
|
+
value: z.ZodString;
|
|
77
|
+
}, z.core.$strip>>;
|
|
78
|
+
children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
|
|
79
|
+
}, z.core.$strip>], "type">>;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
kind: z.ZodLiteral<"binary">;
|
|
82
|
+
base64: z.ZodString;
|
|
83
|
+
}, z.core.$strip>], "kind">>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
declare function decodePackage(bytes: Uint8Array<ArrayBuffer>): Package;
|
|
86
|
+
declare function encodePackage(pkg: Package): Uint8Array<ArrayBuffer>;
|
|
87
|
+
//#endregion
|
|
88
|
+
export { ContentSlide as $, ContentParagraphSchema as A, ContentSheetColumn as B, ContentImageBlock as C, ContentPageBreak as D, ContentListMembershipSchema as E, ContentShape as F, ContentSheetPrintRangeSchema as G, ContentSheetImage as H, ContentShapeSchema as I, ContentSheetRepeatRange$1 as J, ContentSheetPrintSettings$1 as K, ContentSheet as L, ContentRunSchema as M, ContentSection as N, ContentPageBreakSchema as O, ContentSectionSchema$1 as P, ContentSheetSchema as Q, ContentSheetCell as R, ContentDocumentSchema as S, ContentListMembership as T, ContentSheetImageSchema as U, ContentSheetColumnSchema as V, ContentSheetPrintRange$1 as W, ContentSheetRow as X, ContentSheetRepeatRangeSchema as Y, ContentSheetRowSchema as Z, ContentCellBorders$1 as _, colorToRgbHex$1 as _t, Alignment$1 as a, ContentTableCellSchema as at, ContentCellValueSchema as b, BoxSchema as c, ContentTableSchema as ct, Color$1 as d, PAGE_SIZE_A4$1 as dt, ContentSlideSchema$1 as et, ColorSchema as f, PAGE_SIZE_LETTER$1 as ft, ContentBorderSchema as g, SLIDE_SIZE_WIDESCREEN$1 as gt, ContentBorder as h, SLIDE_SIZE_STANDARD as ht, xmlCodec as i, ContentTableCell as it, ContentRun as j, ContentParagraph as k, COLOR_BLACK$1 as l, Margins as lt, ContentBlockSchema as m, PageSizeSchema as mt, encodePackage as n, ContentStrokeStyleSchema as nt, AlignmentSchema as o, ContentTableRow as ot, ContentBlock$1 as p, PageSize$1 as pt, ContentSheetPrintSettingsSchema as q, packageCodec as r, ContentTable as rt, Box$1 as s, ContentTableRowSchema as st, decodePackage as t, ContentStrokeStyle as tt, CONTENT_FORMAT_VERSION$1 as u, MarginsSchema as ut, ContentCellBordersSchema as v, isContentBlock as vt, ContentImageBlockSchema as w, ContentDocument$1 as x, ContentCellValue as y, rgbHexToColor$1 as yt, ContentSheetCellSchema as z };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { d as XmlNode } from "./node-CkBWRjNR.cjs";
|
|
2
|
+
import { r as Package } from "./package-L24lkba-.cjs";
|
|
3
|
+
import "./read-DzmMJPHd.cjs";
|
|
4
|
+
import "./write-6JmxvaK5.cjs";
|
|
5
|
+
import "./parse-CP5FLZqv.cjs";
|
|
6
|
+
import "./build-XSm3I8LT.cjs";
|
|
7
|
+
import "./fragment-B1og_8uA.cjs";
|
|
8
|
+
import "./util-M3JJlDhF.cjs";
|
|
9
|
+
import "./compact-B1qg9oex.cjs";
|
|
10
|
+
import "./color-fFIKAs-Y.cjs";
|
|
11
|
+
import "./metadata-D6o-kLpg.cjs";
|
|
12
|
+
import "./read-D_CpruL_.cjs";
|
|
13
|
+
import "./numbering-C53LT-Jx.cjs";
|
|
14
|
+
import "./read-DymSS-X4.cjs";
|
|
15
|
+
import "./xlsx-B97t4YE-.cjs";
|
|
16
|
+
import "./content-UlQ-Nhgi.cjs";
|
|
17
|
+
import "./build-CBL9scQK.cjs";
|
|
18
|
+
import { z } from "zod";
|
|
19
|
+
import { Alignment as Alignment$1, AlignmentSchema, Box as Box$1, BoxSchema, COLOR_BLACK, CONTENT_FORMAT_VERSION, Color as Color$1, ColorSchema, ContentBlock as ContentBlock$1, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders as ContentCellBorders$1, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentDocument as ContentDocument$1, ContentDocumentSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetImageSchema, ContentSheetPrintRange as ContentSheetPrintRange$1, ContentSheetPrintRangeSchema, ContentSheetPrintSettings as ContentSheetPrintSettings$1, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange as ContentSheetRepeatRange$1, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, Margins, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize as PageSize$1, PageSizeSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, colorToRgbHex, isContentBlock, rgbHexToColor } from "document-schema.js";
|
|
20
|
+
//#region src/codec.d.ts
|
|
21
|
+
declare const xmlCodec: z.ZodCodec<z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
22
|
+
type: z.ZodLiteral<"text">;
|
|
23
|
+
value: z.ZodString;
|
|
24
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
+
type: z.ZodLiteral<"cdata">;
|
|
26
|
+
value: z.ZodString;
|
|
27
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
28
|
+
type: z.ZodLiteral<"comment">;
|
|
29
|
+
value: z.ZodString;
|
|
30
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
31
|
+
type: z.ZodLiteral<"declaration">;
|
|
32
|
+
attributes: z.ZodArray<z.ZodObject<{
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
value: z.ZodString;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
37
|
+
type: z.ZodLiteral<"pi">;
|
|
38
|
+
target: z.ZodString;
|
|
39
|
+
content: z.ZodString;
|
|
40
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
+
type: z.ZodLiteral<"element">;
|
|
42
|
+
tag: z.ZodString;
|
|
43
|
+
attributes: z.ZodArray<z.ZodObject<{
|
|
44
|
+
name: z.ZodString;
|
|
45
|
+
value: z.ZodString;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
|
|
48
|
+
}, z.core.$strip>], "type">>>;
|
|
49
|
+
declare const packageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
|
|
50
|
+
parts: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
51
|
+
kind: z.ZodLiteral<"xml">;
|
|
52
|
+
nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
53
|
+
type: z.ZodLiteral<"text">;
|
|
54
|
+
value: z.ZodString;
|
|
55
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
+
type: z.ZodLiteral<"cdata">;
|
|
57
|
+
value: z.ZodString;
|
|
58
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
+
type: z.ZodLiteral<"comment">;
|
|
60
|
+
value: z.ZodString;
|
|
61
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
62
|
+
type: z.ZodLiteral<"declaration">;
|
|
63
|
+
attributes: z.ZodArray<z.ZodObject<{
|
|
64
|
+
name: z.ZodString;
|
|
65
|
+
value: z.ZodString;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
68
|
+
type: z.ZodLiteral<"pi">;
|
|
69
|
+
target: z.ZodString;
|
|
70
|
+
content: z.ZodString;
|
|
71
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
72
|
+
type: z.ZodLiteral<"element">;
|
|
73
|
+
tag: z.ZodString;
|
|
74
|
+
attributes: z.ZodArray<z.ZodObject<{
|
|
75
|
+
name: z.ZodString;
|
|
76
|
+
value: z.ZodString;
|
|
77
|
+
}, z.core.$strip>>;
|
|
78
|
+
children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
|
|
79
|
+
}, z.core.$strip>], "type">>;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
kind: z.ZodLiteral<"binary">;
|
|
82
|
+
base64: z.ZodString;
|
|
83
|
+
}, z.core.$strip>], "kind">>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
declare function decodePackage(bytes: Uint8Array<ArrayBuffer>): Package;
|
|
86
|
+
declare function encodePackage(pkg: Package): Uint8Array<ArrayBuffer>;
|
|
87
|
+
//#endregion
|
|
88
|
+
export { ContentSlide as $, ContentParagraphSchema as A, ContentSheetColumn as B, ContentImageBlock as C, ContentPageBreak as D, ContentListMembershipSchema as E, ContentShape as F, ContentSheetPrintRangeSchema as G, ContentSheetImage as H, ContentShapeSchema as I, ContentSheetRepeatRange$1 as J, ContentSheetPrintSettings$1 as K, ContentSheet as L, ContentRunSchema as M, ContentSection as N, ContentPageBreakSchema as O, ContentSectionSchema as P, ContentSheetSchema as Q, ContentSheetCell as R, ContentDocumentSchema as S, ContentListMembership as T, ContentSheetImageSchema as U, ContentSheetColumnSchema as V, ContentSheetPrintRange$1 as W, ContentSheetRow as X, ContentSheetRepeatRangeSchema as Y, ContentSheetRowSchema as Z, ContentCellBorders$1 as _, colorToRgbHex as _t, Alignment$1 as a, ContentTableCellSchema as at, ContentCellValueSchema as b, BoxSchema as c, ContentTableSchema as ct, Color$1 as d, PAGE_SIZE_A4 as dt, ContentSlideSchema as et, ColorSchema as f, PAGE_SIZE_LETTER as ft, ContentBorderSchema as g, SLIDE_SIZE_WIDESCREEN as gt, ContentBorder as h, SLIDE_SIZE_STANDARD as ht, xmlCodec as i, ContentTableCell as it, ContentRun as j, ContentParagraph as k, COLOR_BLACK as l, Margins as lt, ContentBlockSchema as m, PageSizeSchema as mt, encodePackage as n, ContentStrokeStyleSchema as nt, AlignmentSchema as o, ContentTableRow as ot, ContentBlock$1 as p, PageSize$1 as pt, ContentSheetPrintSettingsSchema as q, packageCodec as r, ContentTable as rt, Box$1 as s, ContentTableRowSchema as st, decodePackage as t, ContentStrokeStyle as tt, CONTENT_FORMAT_VERSION as u, MarginsSchema as ut, ContentCellBordersSchema as v, isContentBlock as vt, ContentImageBlockSchema as w, ContentDocument$1 as x, ContentCellValue as y, rgbHexToColor as yt, ContentSheetCellSchema as z };
|
package/dist/codec.d.cts
CHANGED
|
@@ -1,72 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
//#region src/codec.d.ts
|
|
5
|
-
declare const xmlCodec: z.ZodCodec<z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
|
-
type: z.ZodLiteral<"text">;
|
|
7
|
-
value: z.ZodString;
|
|
8
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
9
|
-
type: z.ZodLiteral<"cdata">;
|
|
10
|
-
value: z.ZodString;
|
|
11
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
12
|
-
type: z.ZodLiteral<"comment">;
|
|
13
|
-
value: z.ZodString;
|
|
14
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
-
type: z.ZodLiteral<"declaration">;
|
|
16
|
-
attributes: z.ZodArray<z.ZodObject<{
|
|
17
|
-
name: z.ZodString;
|
|
18
|
-
value: z.ZodString;
|
|
19
|
-
}, z.core.$strip>>;
|
|
20
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
-
type: z.ZodLiteral<"pi">;
|
|
22
|
-
target: z.ZodString;
|
|
23
|
-
content: z.ZodString;
|
|
24
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
-
type: z.ZodLiteral<"element">;
|
|
26
|
-
tag: z.ZodString;
|
|
27
|
-
attributes: z.ZodArray<z.ZodObject<{
|
|
28
|
-
name: z.ZodString;
|
|
29
|
-
value: z.ZodString;
|
|
30
|
-
}, z.core.$strip>>;
|
|
31
|
-
children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
|
|
32
|
-
}, z.core.$strip>], "type">>>;
|
|
33
|
-
declare const packageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
|
|
34
|
-
parts: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
35
|
-
kind: z.ZodLiteral<"xml">;
|
|
36
|
-
nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
37
|
-
type: z.ZodLiteral<"text">;
|
|
38
|
-
value: z.ZodString;
|
|
39
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
-
type: z.ZodLiteral<"cdata">;
|
|
41
|
-
value: z.ZodString;
|
|
42
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
43
|
-
type: z.ZodLiteral<"comment">;
|
|
44
|
-
value: z.ZodString;
|
|
45
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
46
|
-
type: z.ZodLiteral<"declaration">;
|
|
47
|
-
attributes: z.ZodArray<z.ZodObject<{
|
|
48
|
-
name: z.ZodString;
|
|
49
|
-
value: z.ZodString;
|
|
50
|
-
}, z.core.$strip>>;
|
|
51
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
52
|
-
type: z.ZodLiteral<"pi">;
|
|
53
|
-
target: z.ZodString;
|
|
54
|
-
content: z.ZodString;
|
|
55
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
-
type: z.ZodLiteral<"element">;
|
|
57
|
-
tag: z.ZodString;
|
|
58
|
-
attributes: z.ZodArray<z.ZodObject<{
|
|
59
|
-
name: z.ZodString;
|
|
60
|
-
value: z.ZodString;
|
|
61
|
-
}, z.core.$strip>>;
|
|
62
|
-
children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
|
|
63
|
-
}, z.core.$strip>], "type">>;
|
|
64
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
65
|
-
kind: z.ZodLiteral<"binary">;
|
|
66
|
-
base64: z.ZodString;
|
|
67
|
-
}, z.core.$strip>], "kind">>;
|
|
68
|
-
}, z.core.$strip>>;
|
|
69
|
-
declare function decodePackage(bytes: Uint8Array<ArrayBuffer>): Package;
|
|
70
|
-
declare function encodePackage(pkg: Package): Uint8Array<ArrayBuffer>;
|
|
71
|
-
//#endregion
|
|
72
|
-
export { type XmlNode, decodePackage, encodePackage, packageCodec, xmlCodec };
|
|
1
|
+
import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-nIFHuTm-.cjs";
|
|
2
|
+
export { decodePackage, encodePackage, packageCodec, xmlCodec };
|
package/dist/codec.d.ts
CHANGED
|
@@ -1,72 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
//#region src/codec.d.ts
|
|
5
|
-
declare const xmlCodec: z.ZodCodec<z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
6
|
-
type: z.ZodLiteral<"text">;
|
|
7
|
-
value: z.ZodString;
|
|
8
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
9
|
-
type: z.ZodLiteral<"cdata">;
|
|
10
|
-
value: z.ZodString;
|
|
11
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
12
|
-
type: z.ZodLiteral<"comment">;
|
|
13
|
-
value: z.ZodString;
|
|
14
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
-
type: z.ZodLiteral<"declaration">;
|
|
16
|
-
attributes: z.ZodArray<z.ZodObject<{
|
|
17
|
-
name: z.ZodString;
|
|
18
|
-
value: z.ZodString;
|
|
19
|
-
}, z.core.$strip>>;
|
|
20
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
-
type: z.ZodLiteral<"pi">;
|
|
22
|
-
target: z.ZodString;
|
|
23
|
-
content: z.ZodString;
|
|
24
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
-
type: z.ZodLiteral<"element">;
|
|
26
|
-
tag: z.ZodString;
|
|
27
|
-
attributes: z.ZodArray<z.ZodObject<{
|
|
28
|
-
name: z.ZodString;
|
|
29
|
-
value: z.ZodString;
|
|
30
|
-
}, z.core.$strip>>;
|
|
31
|
-
children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
|
|
32
|
-
}, z.core.$strip>], "type">>>;
|
|
33
|
-
declare const packageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
|
|
34
|
-
parts: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
35
|
-
kind: z.ZodLiteral<"xml">;
|
|
36
|
-
nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
37
|
-
type: z.ZodLiteral<"text">;
|
|
38
|
-
value: z.ZodString;
|
|
39
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
-
type: z.ZodLiteral<"cdata">;
|
|
41
|
-
value: z.ZodString;
|
|
42
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
43
|
-
type: z.ZodLiteral<"comment">;
|
|
44
|
-
value: z.ZodString;
|
|
45
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
46
|
-
type: z.ZodLiteral<"declaration">;
|
|
47
|
-
attributes: z.ZodArray<z.ZodObject<{
|
|
48
|
-
name: z.ZodString;
|
|
49
|
-
value: z.ZodString;
|
|
50
|
-
}, z.core.$strip>>;
|
|
51
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
52
|
-
type: z.ZodLiteral<"pi">;
|
|
53
|
-
target: z.ZodString;
|
|
54
|
-
content: z.ZodString;
|
|
55
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
-
type: z.ZodLiteral<"element">;
|
|
57
|
-
tag: z.ZodString;
|
|
58
|
-
attributes: z.ZodArray<z.ZodObject<{
|
|
59
|
-
name: z.ZodString;
|
|
60
|
-
value: z.ZodString;
|
|
61
|
-
}, z.core.$strip>>;
|
|
62
|
-
children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
|
|
63
|
-
}, z.core.$strip>], "type">>;
|
|
64
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
65
|
-
kind: z.ZodLiteral<"binary">;
|
|
66
|
-
base64: z.ZodString;
|
|
67
|
-
}, z.core.$strip>], "kind">>;
|
|
68
|
-
}, z.core.$strip>>;
|
|
69
|
-
declare function decodePackage(bytes: Uint8Array<ArrayBuffer>): Package;
|
|
70
|
-
declare function encodePackage(pkg: Package): Uint8Array<ArrayBuffer>;
|
|
71
|
-
//#endregion
|
|
72
|
-
export { type XmlNode, decodePackage, encodePackage, packageCodec, xmlCodec };
|
|
1
|
+
import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-B52c8v4h.js";
|
|
2
|
+
export { decodePackage, encodePackage, packageCodec, xmlCodec };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Color } from "document-schema.js";
|
|
2
|
+
//#region src/typed/shared/color.d.ts
|
|
3
|
+
interface ColorTransform {
|
|
4
|
+
readonly kind: 'shade' | 'tint' | 'lumMod' | 'lumOff';
|
|
5
|
+
readonly value: number;
|
|
6
|
+
}
|
|
7
|
+
declare function applyColorTransforms(base: Color, transforms: readonly ColorTransform[]): Color;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { applyColorTransforms as n, ColorTransform as t };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Color } from "document-schema.js";
|
|
2
|
+
//#region src/typed/shared/color.d.ts
|
|
3
|
+
interface ColorTransform {
|
|
4
|
+
readonly kind: 'shade' | 'tint' | 'lumMod' | 'lumOff';
|
|
5
|
+
readonly value: number;
|
|
6
|
+
}
|
|
7
|
+
declare function applyColorTransforms(base: Color, transforms: readonly ColorTransform[]): Color;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { applyColorTransforms as n, ColorTransform as t };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { d as XmlNode } from "./node-CkBWRjNR.cjs";
|
|
2
|
+
import { r as Package } from "./package-L24lkba-.cjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/compact.d.ts
|
|
5
|
+
type CompactAttrPairs = number[];
|
|
6
|
+
type CompactElement = [0, number, CompactAttrPairs, CompactXmlNode[]];
|
|
7
|
+
type CompactText = [1, number];
|
|
8
|
+
type CompactCdata = [2, number];
|
|
9
|
+
type CompactComment = [3, number];
|
|
10
|
+
type CompactDeclaration = [4, CompactAttrPairs];
|
|
11
|
+
type CompactPi = [5, number, number];
|
|
12
|
+
type CompactXmlNode = CompactElement | CompactText | CompactCdata | CompactComment | CompactDeclaration | CompactPi;
|
|
13
|
+
declare function isCompactXmlNode(value: unknown): value is CompactXmlNode;
|
|
14
|
+
declare const CompactXmlNodeSchema: z.ZodCustom<CompactXmlNode, CompactXmlNode>;
|
|
15
|
+
declare const CompactPartSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>;
|
|
16
|
+
type CompactPart = z.infer<typeof CompactPartSchema>;
|
|
17
|
+
declare const CompactPackageSchema: z.ZodObject<{
|
|
18
|
+
s: z.ZodArray<z.ZodString>;
|
|
19
|
+
p: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
type CompactPackage = z.infer<typeof CompactPackageSchema>;
|
|
22
|
+
declare const compactCodec: z.ZodCodec<z.ZodObject<{
|
|
23
|
+
parts: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
|
+
kind: z.ZodLiteral<"xml">;
|
|
25
|
+
nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
26
|
+
type: z.ZodLiteral<"text">;
|
|
27
|
+
value: z.ZodString;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"cdata">;
|
|
30
|
+
value: z.ZodString;
|
|
31
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
32
|
+
type: z.ZodLiteral<"comment">;
|
|
33
|
+
value: z.ZodString;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
type: z.ZodLiteral<"declaration">;
|
|
36
|
+
attributes: z.ZodArray<z.ZodObject<{
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
value: z.ZodString;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
+
type: z.ZodLiteral<"pi">;
|
|
42
|
+
target: z.ZodString;
|
|
43
|
+
content: z.ZodString;
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
+
type: z.ZodLiteral<"element">;
|
|
46
|
+
tag: z.ZodString;
|
|
47
|
+
attributes: z.ZodArray<z.ZodObject<{
|
|
48
|
+
name: z.ZodString;
|
|
49
|
+
value: z.ZodString;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
|
|
52
|
+
}, z.core.$strip>], "type">>;
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
kind: z.ZodLiteral<"binary">;
|
|
55
|
+
base64: z.ZodString;
|
|
56
|
+
}, z.core.$strip>], "kind">>;
|
|
57
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
58
|
+
s: z.ZodArray<z.ZodString>;
|
|
59
|
+
p: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>>;
|
|
60
|
+
}, z.core.$strip>>;
|
|
61
|
+
declare function toCompact(pkg: Package): CompactPackage;
|
|
62
|
+
declare function fromCompact(cpkg: CompactPackage): Package;
|
|
63
|
+
declare const compactPackageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
|
|
64
|
+
s: z.ZodArray<z.ZodString>;
|
|
65
|
+
p: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>>;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
declare function decodeCompactPackage(bytes: Uint8Array<ArrayBuffer>): CompactPackage;
|
|
68
|
+
declare function encodeCompactPackage(cpkg: CompactPackage): Uint8Array<ArrayBuffer>;
|
|
69
|
+
//#endregion
|
|
70
|
+
export { encodeCompactPackage as _, CompactElement as a, toCompact as b, CompactPart as c, CompactText as d, CompactXmlNode as f, decodeCompactPackage as g, compactPackageCodec as h, CompactDeclaration as i, CompactPartSchema as l, compactCodec as m, CompactCdata as n, CompactPackage as o, CompactXmlNodeSchema as p, CompactComment as r, CompactPackageSchema as s, CompactAttrPairs as t, CompactPi as u, fromCompact as v, isCompactXmlNode as y };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { d as XmlNode } from "./node-CkBWRjNR.js";
|
|
2
|
+
import { r as Package } from "./package-BUojjTXf.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/compact.d.ts
|
|
5
|
+
type CompactAttrPairs = number[];
|
|
6
|
+
type CompactElement = [0, number, CompactAttrPairs, CompactXmlNode[]];
|
|
7
|
+
type CompactText = [1, number];
|
|
8
|
+
type CompactCdata = [2, number];
|
|
9
|
+
type CompactComment = [3, number];
|
|
10
|
+
type CompactDeclaration = [4, CompactAttrPairs];
|
|
11
|
+
type CompactPi = [5, number, number];
|
|
12
|
+
type CompactXmlNode = CompactElement | CompactText | CompactCdata | CompactComment | CompactDeclaration | CompactPi;
|
|
13
|
+
declare function isCompactXmlNode(value: unknown): value is CompactXmlNode;
|
|
14
|
+
declare const CompactXmlNodeSchema: z.ZodCustom<CompactXmlNode, CompactXmlNode>;
|
|
15
|
+
declare const CompactPartSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>;
|
|
16
|
+
type CompactPart = z.infer<typeof CompactPartSchema>;
|
|
17
|
+
declare const CompactPackageSchema: z.ZodObject<{
|
|
18
|
+
s: z.ZodArray<z.ZodString>;
|
|
19
|
+
p: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
type CompactPackage = z.infer<typeof CompactPackageSchema>;
|
|
22
|
+
declare const compactCodec: z.ZodCodec<z.ZodObject<{
|
|
23
|
+
parts: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
|
+
kind: z.ZodLiteral<"xml">;
|
|
25
|
+
nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
26
|
+
type: z.ZodLiteral<"text">;
|
|
27
|
+
value: z.ZodString;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"cdata">;
|
|
30
|
+
value: z.ZodString;
|
|
31
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
32
|
+
type: z.ZodLiteral<"comment">;
|
|
33
|
+
value: z.ZodString;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
type: z.ZodLiteral<"declaration">;
|
|
36
|
+
attributes: z.ZodArray<z.ZodObject<{
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
value: z.ZodString;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
+
type: z.ZodLiteral<"pi">;
|
|
42
|
+
target: z.ZodString;
|
|
43
|
+
content: z.ZodString;
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
+
type: z.ZodLiteral<"element">;
|
|
46
|
+
tag: z.ZodString;
|
|
47
|
+
attributes: z.ZodArray<z.ZodObject<{
|
|
48
|
+
name: z.ZodString;
|
|
49
|
+
value: z.ZodString;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
|
|
52
|
+
}, z.core.$strip>], "type">>;
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
kind: z.ZodLiteral<"binary">;
|
|
55
|
+
base64: z.ZodString;
|
|
56
|
+
}, z.core.$strip>], "kind">>;
|
|
57
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
58
|
+
s: z.ZodArray<z.ZodString>;
|
|
59
|
+
p: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>>;
|
|
60
|
+
}, z.core.$strip>>;
|
|
61
|
+
declare function toCompact(pkg: Package): CompactPackage;
|
|
62
|
+
declare function fromCompact(cpkg: CompactPackage): Package;
|
|
63
|
+
declare const compactPackageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
|
|
64
|
+
s: z.ZodArray<z.ZodString>;
|
|
65
|
+
p: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>>;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
|
+
declare function decodeCompactPackage(bytes: Uint8Array<ArrayBuffer>): CompactPackage;
|
|
68
|
+
declare function encodeCompactPackage(cpkg: CompactPackage): Uint8Array<ArrayBuffer>;
|
|
69
|
+
//#endregion
|
|
70
|
+
export { encodeCompactPackage as _, CompactElement as a, toCompact as b, CompactPart as c, CompactText as d, CompactXmlNode as f, decodeCompactPackage as g, compactPackageCodec as h, CompactDeclaration as i, CompactPartSchema as l, compactCodec as m, CompactCdata as n, CompactPackage as o, CompactXmlNodeSchema as p, CompactComment as r, CompactPackageSchema as s, CompactAttrPairs as t, CompactPi as u, fromCompact as v, isCompactXmlNode as y };
|
package/dist/compact.d.cts
CHANGED
|
@@ -1,70 +1,2 @@
|
|
|
1
|
-
import { d as
|
|
2
|
-
import { r as Package } from "./package-L24lkba-.cjs";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
//#region src/compact.d.ts
|
|
5
|
-
type CompactAttrPairs = number[];
|
|
6
|
-
type CompactElement = [0, number, CompactAttrPairs, CompactXmlNode[]];
|
|
7
|
-
type CompactText = [1, number];
|
|
8
|
-
type CompactCdata = [2, number];
|
|
9
|
-
type CompactComment = [3, number];
|
|
10
|
-
type CompactDeclaration = [4, CompactAttrPairs];
|
|
11
|
-
type CompactPi = [5, number, number];
|
|
12
|
-
type CompactXmlNode = CompactElement | CompactText | CompactCdata | CompactComment | CompactDeclaration | CompactPi;
|
|
13
|
-
declare function isCompactXmlNode(value: unknown): value is CompactXmlNode;
|
|
14
|
-
declare const CompactXmlNodeSchema: z.ZodCustom<CompactXmlNode, CompactXmlNode>;
|
|
15
|
-
declare const CompactPartSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>;
|
|
16
|
-
type CompactPart = z.infer<typeof CompactPartSchema>;
|
|
17
|
-
declare const CompactPackageSchema: z.ZodObject<{
|
|
18
|
-
s: z.ZodArray<z.ZodString>;
|
|
19
|
-
p: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>>;
|
|
20
|
-
}, z.core.$strip>;
|
|
21
|
-
type CompactPackage = z.infer<typeof CompactPackageSchema>;
|
|
22
|
-
declare const compactCodec: z.ZodCodec<z.ZodObject<{
|
|
23
|
-
parts: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
|
-
kind: z.ZodLiteral<"xml">;
|
|
25
|
-
nodes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
26
|
-
type: z.ZodLiteral<"text">;
|
|
27
|
-
value: z.ZodString;
|
|
28
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
-
type: z.ZodLiteral<"cdata">;
|
|
30
|
-
value: z.ZodString;
|
|
31
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
32
|
-
type: z.ZodLiteral<"comment">;
|
|
33
|
-
value: z.ZodString;
|
|
34
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
-
type: z.ZodLiteral<"declaration">;
|
|
36
|
-
attributes: z.ZodArray<z.ZodObject<{
|
|
37
|
-
name: z.ZodString;
|
|
38
|
-
value: z.ZodString;
|
|
39
|
-
}, z.core.$strip>>;
|
|
40
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
-
type: z.ZodLiteral<"pi">;
|
|
42
|
-
target: z.ZodString;
|
|
43
|
-
content: z.ZodString;
|
|
44
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
-
type: z.ZodLiteral<"element">;
|
|
46
|
-
tag: z.ZodString;
|
|
47
|
-
attributes: z.ZodArray<z.ZodObject<{
|
|
48
|
-
name: z.ZodString;
|
|
49
|
-
value: z.ZodString;
|
|
50
|
-
}, z.core.$strip>>;
|
|
51
|
-
children: z.ZodArray<z.ZodCustom<XmlNode, XmlNode>>;
|
|
52
|
-
}, z.core.$strip>], "type">>;
|
|
53
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
-
kind: z.ZodLiteral<"binary">;
|
|
55
|
-
base64: z.ZodString;
|
|
56
|
-
}, z.core.$strip>], "kind">>;
|
|
57
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
58
|
-
s: z.ZodArray<z.ZodString>;
|
|
59
|
-
p: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>>;
|
|
60
|
-
}, z.core.$strip>>;
|
|
61
|
-
declare function toCompact(pkg: Package): CompactPackage;
|
|
62
|
-
declare function fromCompact(cpkg: CompactPackage): Package;
|
|
63
|
-
declare const compactPackageCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodObject<{
|
|
64
|
-
s: z.ZodArray<z.ZodString>;
|
|
65
|
-
p: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodArray<z.ZodCustom<CompactXmlNode, CompactXmlNode>>, z.ZodNumber]>>;
|
|
66
|
-
}, z.core.$strip>>;
|
|
67
|
-
declare function decodeCompactPackage(bytes: Uint8Array<ArrayBuffer>): CompactPackage;
|
|
68
|
-
declare function encodeCompactPackage(cpkg: CompactPackage): Uint8Array<ArrayBuffer>;
|
|
69
|
-
//#endregion
|
|
1
|
+
import { _ as encodeCompactPackage, a as CompactElement, b as toCompact, c as CompactPart, d as CompactText, f as CompactXmlNode, g as decodeCompactPackage, h as compactPackageCodec, i as CompactDeclaration, l as CompactPartSchema, m as compactCodec, n as CompactCdata, o as CompactPackage, p as CompactXmlNodeSchema, r as CompactComment, s as CompactPackageSchema, t as CompactAttrPairs, u as CompactPi, v as fromCompact, y as isCompactXmlNode } from "./compact-B1qg9oex.cjs";
|
|
70
2
|
export { CompactAttrPairs, CompactCdata, CompactComment, CompactDeclaration, CompactElement, CompactPackage, CompactPackageSchema, CompactPart, CompactPartSchema, CompactPi, CompactText, CompactXmlNode, CompactXmlNodeSchema, compactCodec, compactPackageCodec, decodeCompactPackage, encodeCompactPackage, fromCompact, isCompactXmlNode, toCompact };
|