ooxml.js 6.0.0 → 6.2.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 +32 -23
- package/dist/{build-XSm3I8LT.d.cts → build--uPsivid.d.cts} +1 -1
- package/dist/{build-q0qMH_ML.d.ts → build-BOI7rIog.d.ts} +1 -1
- package/dist/{build-D-ldsmtA.d.cts → build-BY9Mn-4K.d.cts} +1 -1
- package/dist/{build-Z1KRkSEB.d.ts → build-DgBE0bmv.d.ts} +1 -1
- package/dist/{codec-DdrBDJSU.d.cts → codec-BBM1RYx7.d.cts} +19 -19
- package/dist/{codec-CHbouqVZ.d.ts → codec-Cva8QD7-.d.ts} +19 -19
- package/dist/codec.d.cts +1 -1
- package/dist/codec.d.ts +1 -1
- package/dist/{color-fFIKAs-Y.d.cts → color-DLoZOrg3.d.cts} +1 -1
- package/dist/{color-fFIKAs-Y.d.ts → color-DLoZOrg3.d.ts} +1 -1
- package/dist/{compact-f0TfhicN.d.ts → compact-CmOeA2dl.d.ts} +2 -2
- package/dist/{compact-B1qg9oex.d.cts → compact-DMCbYORW.d.cts} +2 -2
- package/dist/compact.d.cts +1 -1
- package/dist/compact.d.ts +1 -1
- package/dist/{content-C79O3esU.d.cts → content-BiYr86lr.d.cts} +1 -1
- package/dist/{content-MEmp_Rlx.d.ts → content-D1pmxaUb.d.ts} +1 -1
- package/dist/{document-tree-BV4sMCXO.d.ts → document-tree-B17XbBOR.d.ts} +2 -2
- package/dist/{document-tree-BSPf6fkr.d.cts → document-tree-CjI-Z4Tp.d.cts} +2 -2
- package/dist/{fragment-B1og_8uA.d.cts → fragment-9dNg-m46.d.cts} +1 -1
- package/dist/{fragment-B1ZV7T5Z.d.ts → fragment-ClgCV_if.d.ts} +1 -1
- package/dist/image/sniff.d.cts +1 -1
- package/dist/image/sniff.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +21 -21
- package/dist/index.d.ts +21 -21
- package/dist/index.js +1 -1
- package/dist/{metadata-o_WH9V_I.d.ts → metadata-Bjfa88HQ.d.ts} +1 -1
- package/dist/{metadata-D6o-kLpg.d.cts → metadata-C74-XCrx.d.cts} +1 -1
- package/dist/model/node.d.cts +1 -1
- package/dist/model/node.d.ts +1 -1
- package/dist/model/package.d.cts +1 -1
- package/dist/model/package.d.ts +1 -1
- package/dist/{node-CkBWRjNR.d.cts → node-B6JX5CRX.d.cts} +1 -1
- package/dist/{node-CkBWRjNR.d.ts → node-B6JX5CRX.d.ts} +1 -1
- package/dist/{numbering-D0YfuiOO.d.ts → numbering-CUMTFxfk.d.ts} +1 -1
- package/dist/{numbering-C53LT-Jx.d.cts → numbering-vpq3iLPm.d.cts} +1 -1
- package/dist/{package-L24lkba-.d.cts → package-DMk9fuTI.d.cts} +1 -1
- package/dist/package-io/read.d.cts +1 -1
- package/dist/package-io/read.d.ts +1 -1
- package/dist/package-io/write.d.cts +1 -1
- package/dist/package-io/write.d.ts +1 -1
- package/dist/{package-BUojjTXf.d.ts → package-otZYrxiO.d.ts} +1 -1
- package/dist/{parse-A8_8sdpX.d.ts → parse-BLukZ2z0.d.ts} +1 -1
- package/dist/{parse-CP5FLZqv.d.cts → parse-DcVtB3jT.d.cts} +1 -1
- package/dist/{read-ZWJPDvG-.d.ts → read-B5kexLpc.d.ts} +1 -1
- package/dist/{read-DPR6ihXO.js → read-BZ_jycSX.js} +3 -1
- package/dist/{read-CevviAf2.d.ts → read-BlcKA9Cg.d.ts} +1 -1
- package/dist/{read-BoV9SZy4.d.cts → read-C1h_Q4kx.d.cts} +1 -1
- package/dist/{read-Cj23Gllx.cjs → read-CXksZHJW.cjs} +3 -1
- package/dist/{read-A9CC5Toq.d.cts → read-D6kQeo-T.d.cts} +1 -1
- package/dist/{read-DA55zDgD.d.ts → read-D_kXw2N2.d.ts} +1 -1
- package/dist/{read-VbRhmjOh.d.cts → read-uKN0paUP.d.cts} +1 -1
- package/dist/{sniff-DjpnUZRp.d.cts → sniff-DGOBHA0O.d.cts} +1 -1
- package/dist/{sniff-DjpnUZRp.d.ts → sniff-DGOBHA0O.d.ts} +1 -1
- package/dist/typed/document-tree.cjs +1 -1
- package/dist/typed/document-tree.d.cts +1 -1
- package/dist/typed/document-tree.d.ts +1 -1
- package/dist/typed/document-tree.js +1 -1
- package/dist/typed/docx/constructs.d.cts +3 -3
- package/dist/typed/docx/constructs.d.ts +3 -3
- package/dist/typed/docx/numbering.d.cts +1 -1
- package/dist/typed/docx/numbering.d.ts +1 -1
- package/dist/typed/docx/read.cjs +1 -1
- package/dist/typed/docx/read.d.cts +1 -1
- package/dist/typed/docx/read.d.ts +1 -1
- package/dist/typed/docx/read.js +1 -1
- package/dist/typed/docx/styles.d.cts +1 -1
- package/dist/typed/docx/styles.d.ts +1 -1
- package/dist/typed/docx/write.d.cts +1 -1
- package/dist/typed/docx/write.d.ts +1 -1
- package/dist/typed/embedded.cjs +1 -1
- package/dist/typed/embedded.d.cts +2 -2
- package/dist/typed/embedded.d.ts +2 -2
- package/dist/typed/embedded.js +1 -1
- package/dist/typed/pptx/chart.d.cts +1 -1
- package/dist/typed/pptx/chart.d.ts +1 -1
- package/dist/typed/pptx/diagram.d.cts +1 -1
- package/dist/typed/pptx/diagram.d.ts +1 -1
- package/dist/typed/pptx/inherit.d.cts +2 -2
- package/dist/typed/pptx/inherit.d.ts +2 -2
- package/dist/typed/pptx/read.cjs +1 -1
- package/dist/typed/pptx/read.d.cts +1 -1
- package/dist/typed/pptx/read.d.ts +1 -1
- package/dist/typed/pptx/read.js +1 -1
- package/dist/typed/shared/color.d.cts +1 -1
- package/dist/typed/shared/color.d.ts +1 -1
- package/dist/typed/shared/drawingml.d.cts +1 -1
- package/dist/typed/shared/drawingml.d.ts +1 -1
- package/dist/typed/shared/metadata.d.cts +1 -1
- package/dist/typed/shared/metadata.d.ts +1 -1
- package/dist/typed/util.d.cts +1 -1
- package/dist/typed/util.d.ts +1 -1
- package/dist/typed/xlsx/build.cjs +12 -4
- package/dist/typed/xlsx/build.d.cts +1 -1
- package/dist/typed/xlsx/build.d.ts +1 -1
- package/dist/typed/xlsx/build.js +12 -4
- package/dist/typed/xlsx/comments.d.cts +1 -1
- package/dist/typed/xlsx/comments.d.ts +1 -1
- package/dist/typed/xlsx/conditional-format.cjs +519 -0
- package/dist/typed/xlsx/conditional-format.d.cts +16 -0
- package/dist/typed/xlsx/conditional-format.d.ts +16 -0
- package/dist/typed/xlsx/conditional-format.js +516 -0
- package/dist/typed/xlsx/content.cjs +11 -7
- package/dist/typed/xlsx/content.d.cts +1 -1
- package/dist/typed/xlsx/content.d.ts +1 -1
- package/dist/typed/xlsx/content.js +12 -8
- package/dist/typed/xlsx/data-validation.cjs +116 -0
- package/dist/typed/xlsx/data-validation.d.cts +11 -0
- package/dist/typed/xlsx/data-validation.d.ts +11 -0
- package/dist/typed/xlsx/data-validation.js +114 -0
- package/dist/typed/xlsx/defined-names.d.cts +1 -1
- package/dist/typed/xlsx/defined-names.d.ts +1 -1
- package/dist/typed/xlsx/definitions.d.cts +1 -1
- package/dist/typed/xlsx/definitions.d.ts +1 -1
- package/dist/typed/xlsx/drawings.d.cts +2 -2
- package/dist/typed/xlsx/drawings.d.ts +2 -2
- package/dist/typed/xlsx/number-format.d.cts +14 -14
- package/dist/typed/xlsx/number-format.d.ts +14 -14
- package/dist/typed/xlsx/print-settings.d.cts +1 -1
- package/dist/typed/xlsx/print-settings.d.ts +1 -1
- package/dist/typed/xlsx/rule-residue.cjs +29 -0
- package/dist/typed/xlsx/rule-residue.d.cts +7 -0
- package/dist/typed/xlsx/rule-residue.d.ts +7 -0
- package/dist/typed/xlsx/rule-residue.js +27 -0
- package/dist/typed/xlsx/serial.d.cts +1 -1
- package/dist/typed/xlsx/serial.d.ts +1 -1
- package/dist/typed/xlsx/shared-strings.d.cts +1 -1
- package/dist/typed/xlsx/shared-strings.d.ts +1 -1
- package/dist/typed/xlsx/sqref.cjs +24 -0
- package/dist/typed/xlsx/sqref.d.cts +7 -0
- package/dist/typed/xlsx/sqref.d.ts +7 -0
- package/dist/typed/xlsx/sqref.js +21 -0
- package/dist/typed/xlsx/styles.cjs +14 -2
- package/dist/typed/xlsx/styles.d.cts +10 -6
- package/dist/typed/xlsx/styles.d.ts +10 -6
- package/dist/typed/xlsx/styles.js +12 -3
- package/dist/typed/xlsx.d.cts +1 -1
- package/dist/typed/xlsx.d.ts +1 -1
- package/dist/util/base64.cjs +4 -4
- package/dist/util/base64.js +4 -4
- package/dist/{util-DFe4UbvU.d.ts → util-DKrYuajM.d.ts} +2 -2
- package/dist/{util-M3JJlDhF.d.cts → util-xRsVgH-g.d.cts} +2 -2
- package/dist/{write-Dn_CL8qb.d.cts → write-BGTpp3RS.d.cts} +3 -3
- package/dist/{write-6JmxvaK5.d.cts → write-Ba1IxfDT.d.cts} +1 -1
- package/dist/{write-CT-EgVT7.d.ts → write-C4902scQ.d.ts} +1 -1
- package/dist/{write-inqdKHR3.d.ts → write-Cnfu3zdB.d.ts} +3 -3
- package/dist/{xlsx-DacFqZeF.d.ts → xlsx-B3JGnx0l.d.ts} +1 -1
- package/dist/{xlsx-CpX5nzGV.d.cts → xlsx-DCgJ8IbV.d.cts} +1 -1
- package/dist/xml/build.d.cts +1 -1
- package/dist/xml/build.d.ts +1 -1
- package/dist/xml/fragment.d.cts +1 -1
- package/dist/xml/fragment.d.ts +1 -1
- package/dist/xml/parse.d.cts +1 -1
- package/dist/xml/parse.d.ts +1 -1
- package/package.json +3 -11
package/README.md
CHANGED
|
@@ -75,7 +75,7 @@ Worker-isomorphic: runtime `src/` uses no Node-only APIs (no `node:*` imports, n
|
|
|
75
75
|
## Usage
|
|
76
76
|
|
|
77
77
|
```ts
|
|
78
|
-
import { decodePackage, encodePackage } from
|
|
78
|
+
import { decodePackage, encodePackage } from "ooxml.js";
|
|
79
79
|
|
|
80
80
|
// .docx / .pptx / .xlsx bytes -> faithful JSON Package
|
|
81
81
|
const pkg = decodePackage(new Uint8Array(await file.arrayBuffer()));
|
|
@@ -89,8 +89,8 @@ const bytes = encodePackage(pkg);
|
|
|
89
89
|
The core is a Zod 4 codec, so both directions are schema-validated:
|
|
90
90
|
|
|
91
91
|
```ts
|
|
92
|
-
import { z } from
|
|
93
|
-
import { packageCodec } from
|
|
92
|
+
import { z } from "zod";
|
|
93
|
+
import { packageCodec } from "ooxml.js";
|
|
94
94
|
|
|
95
95
|
const pkg = z.decode(packageCodec, bytes);
|
|
96
96
|
const out = z.encode(packageCodec, pkg);
|
|
@@ -100,11 +100,11 @@ const out = z.encode(packageCodec, pkg);
|
|
|
100
100
|
|
|
101
101
|
Above the lossless core sit typed readers that resolve a format's own cascades — the docx style cascade, pptx's placeholder → layout → master → theme inheritance, xlsx's style-index → number-format classification — so order, styling, and geometry come through, not just flattened text. Each format has two entry points onto the same read: one producing `document-schema.js`'s tree-form `DocumentTree`, one producing the flat, content-level shape that tree decomposes.
|
|
102
102
|
|
|
103
|
-
| Format | `DocumentTree` (primary)
|
|
104
|
-
|
|
|
105
|
-
| docx
|
|
106
|
-
| pptx
|
|
107
|
-
| xlsx
|
|
103
|
+
| Format | `DocumentTree` (primary) | Flat, content-level |
|
|
104
|
+
| ------ | ------------------------------- | ------------------------------------------------- |
|
|
105
|
+
| docx | `readDocx` / `buildDocxPackage` | `readDocxContent` / `buildDocxPackageFromContent` |
|
|
106
|
+
| pptx | `readPptx` (read-only) | `readPptxContent` (read-only) |
|
|
107
|
+
| xlsx | `readXlsx` / `buildXlsxPackage` | `readXlsxContent` / `buildXlsxPackageFromContent` |
|
|
108
108
|
|
|
109
109
|
`readXlsxWorkbook` sits outside the table: a separate lossy, cell-values-only reading view (sheet names, references, resolved values, formulas, merged ranges, defined names) with no write side.
|
|
110
110
|
|
|
@@ -113,7 +113,12 @@ Above the lossless core sit typed readers that resolve a format's own cascades
|
|
|
113
113
|
`readDocx`/`readPptx`/`readXlsx` decompose what they read into the tree `document-schema.js` defines — one group per top-level container, headings and lists nested inside the section they belong to, block-scoped constructs promoted to the region they span, repeated formatting factored into a package-level styles table. `buildDocxPackage`/`buildXlsxPackage` take one back the other way:
|
|
114
114
|
|
|
115
115
|
```ts
|
|
116
|
-
import {
|
|
116
|
+
import {
|
|
117
|
+
buildDocxPackage,
|
|
118
|
+
decodePackage,
|
|
119
|
+
encodePackage,
|
|
120
|
+
readDocx,
|
|
121
|
+
} from "ooxml.js";
|
|
117
122
|
|
|
118
123
|
const document = readDocx(decodePackage(bytes)); // DocumentTree, kind: 'wordprocessing'
|
|
119
124
|
// document.children is one section group per section, the section's page geometry on the group's own
|
|
@@ -132,7 +137,11 @@ Minting has a real consequence for a caller walking the tree by hand, and it is
|
|
|
132
137
|
The `Content`-suffixed functions are what the tree-form ones wrap, exported in their own right for a caller driving a pipeline stage by stage (`documents.js`'s conversion engine does exactly this) or needing what the tree has no spelling for. Routing through the tree costs no fidelity of its own: `buildDocxPackage(readDocx(pkg))` builds the identical `Package` `buildDocxPackageFromContent(readDocxContent(pkg))` does, and flattening a tree reproduces exactly the content its content-level reader returns — both pinned in `src/typed/document-tree.test.ts`.
|
|
133
138
|
|
|
134
139
|
```ts
|
|
135
|
-
import {
|
|
140
|
+
import {
|
|
141
|
+
buildXlsxPackageFromContent,
|
|
142
|
+
decodePackage,
|
|
143
|
+
readXlsxContent,
|
|
144
|
+
} from "ooxml.js";
|
|
136
145
|
|
|
137
146
|
const content = readXlsxContent(decodePackage(bytes)); // ContentDocument, kind: 'spreadsheet'
|
|
138
147
|
const pkg = buildXlsxPackageFromContent(content); // a fresh Package built from scratch, not a write-back into `pkg`
|
|
@@ -152,11 +161,11 @@ A construct with format-specific specifics the harmonised vocabulary does not na
|
|
|
152
161
|
|
|
153
162
|
The `DocumentTree` readers and writers took the primary names, and the functions that held them were renamed rather than removed. Every one of them still behaves exactly as it did:
|
|
154
163
|
|
|
155
|
-
| Was
|
|
156
|
-
|
|
|
157
|
-
| `readDocx`
|
|
158
|
-
| `readPptx`
|
|
159
|
-
| `readXlsx`
|
|
164
|
+
| Was | Is now |
|
|
165
|
+
| ------------------ | ----------------------------- |
|
|
166
|
+
| `readDocx` | `readDocxContent` |
|
|
167
|
+
| `readPptx` | `readPptxContent` |
|
|
168
|
+
| `readXlsx` | `readXlsxWorkbook` |
|
|
160
169
|
| `buildDocxPackage` | `buildDocxPackageFromContent` |
|
|
161
170
|
| `buildXlsxPackage` | `buildXlsxPackageFromContent` |
|
|
162
171
|
|
|
@@ -169,21 +178,21 @@ Three of the renames are silent under a plain call — `readDocx`, `readPptx`, a
|
|
|
169
178
|
Every module under `src/` is importable directly, by the same path it has relative to `src/`, without going through the barrel:
|
|
170
179
|
|
|
171
180
|
```ts
|
|
172
|
-
import { bytesToBase64, base64ToBytes } from
|
|
173
|
-
import { readXlsxContent } from
|
|
174
|
-
import { readDocx, buildDocxPackage } from
|
|
181
|
+
import { bytesToBase64, base64ToBytes } from "ooxml.js/util/base64";
|
|
182
|
+
import { readXlsxContent } from "ooxml.js/typed/xlsx/content";
|
|
183
|
+
import { readDocx, buildDocxPackage } from "ooxml.js/typed/document-tree";
|
|
175
184
|
```
|
|
176
185
|
|
|
177
186
|
## The ooxml.js format
|
|
178
187
|
|
|
179
188
|
**The ooxml.js format** is a compact, still-plain-JSON alternative to the verbose `Package` (which repeats `type`/`tag`/`attributes`/`children` keys per node, with tag/namespace strings recurring thousands of times) — tuple-encoded nodes plus one interned string table, composing on `packageCodec`:
|
|
180
189
|
|
|
181
|
-
```
|
|
190
|
+
```text
|
|
182
191
|
OOXML bytes --[packageCodec]--> Package --[compactCodec]--> CompactPackage (the ooxml.js format)
|
|
183
192
|
```
|
|
184
193
|
|
|
185
194
|
```ts
|
|
186
|
-
import { decodePackage, toCompact, fromCompact } from
|
|
195
|
+
import { decodePackage, toCompact, fromCompact } from "ooxml.js";
|
|
187
196
|
|
|
188
197
|
const pkg = decodePackage(bytes);
|
|
189
198
|
const compact = toCompact(pkg); // { s: string[], p: Record<path, CompactPart> }
|
|
@@ -246,7 +255,7 @@ Reading the outer tuple: `[0, 0, [], [...]]` is an element whose tag is `s[0]` (
|
|
|
246
255
|
All three format pairs have a direct codec — `packageCodec` (bytes ⇄ `Package`), `compactCodec` (`Package` ⇄ `CompactPackage`), and `compactPackageCodec` (bytes ⇄ `CompactPackage` directly):
|
|
247
256
|
|
|
248
257
|
```ts
|
|
249
|
-
import { decodeCompactPackage, encodeCompactPackage } from
|
|
258
|
+
import { decodeCompactPackage, encodeCompactPackage } from "ooxml.js";
|
|
250
259
|
|
|
251
260
|
const compact = decodeCompactPackage(bytes); // OOXML bytes -> CompactPackage directly
|
|
252
261
|
const out = encodeCompactPackage(compact); // CompactPackage -> OOXML bytes directly
|
|
@@ -283,7 +292,7 @@ The package layers a lossless core outward to lossy convenience views:
|
|
|
283
292
|
- **`src/typed/`** — lossy projections. `readDocxContent` resolves the full style cascade (`docDefaults` → `basedOn` → paragraph-mark → character styles → direct formatting) into ordered `sections` plus comments/footnotes/header-footer parts/numbering; `readPptxContent` resolves placeholder → layout → master → theme inheritance into `slides` (presentation order via `p:sldIdLst`); `readXlsxWorkbook` covers cell values/formulas, merged ranges, defined names. `typed/shared/` holds shared OOXML primitives (`drawingml.ts` geometry/theme/colour, `color.ts` `ColorTransform` cascade, `units.ts`, `metadata.ts`, `source-path.ts`). Types come from `document-schema.js`. Only the docx and xlsx `ContentDocument`-shaped pairs encode back to a `Package`; everything else is one-way, and faithful round-tripping goes through `decodePackage`/`encodePackage`.
|
|
284
293
|
- **`src/typed/document-tree.ts`** — the `DocumentTree`-native surface, and nothing else: `readDocx`/`readPptx`/`readXlsx` are their content-level reader composed with `document-schema.js`'s `assembleTree`, `buildDocxPackage`/`buildXlsxPackage` are `flattenTree` composed with their content-level writer. One module rather than one per format, because the adapters are format-uniform and the reasoning behind them (why a reader mints styles rather than calling bare `decompose`, why a writer's kind guard lives at this boundary, what a docx's non-content parts do instead of riding the tree) is one argument stated once.
|
|
285
294
|
- **`src/typed/docx/`** — `read.ts` and `write.ts` are a read/write pair over `ContentSection[]`. `constructs.ts` owns the fidelity construct vocabulary both halves share: the descriptor shapes (`contentControl` from `w:sdt`, `field` from `w:fldChar`/`w:fldSimple`, `anchor` from `w:bookmarkStart`/`End`, `provenance` from `w:ins`/`w:del`/`w:moveFrom`/`w:moveTo`) and the rule deciding which occurrences are block-scoped enough to bracket. `buildDocxPackageFromContent` builds a complete docx `Package` from scratch; it writes no `styles.xml`, `numbering.xml`, comments, footnotes, or headers/footers, so the `DocxDocument` fields outside `sections` do not survive the pair.
|
|
286
|
-
- **`src/typed/xlsx/`** — a `ContentDocument`-shaped read/write pair alongside the lossy `readXlsxWorkbook` (both exported; different callers). `readXlsxContent` reads column widths, row heights, hidden rows/columns, merged ranges, every cell value kind, print settings, and cell comments (`comments.ts`: legacy `xl/comments{N}.xml` notes plus `[MS-XLSX]` threaded comments, both resolved through the worksheet part's own relationships, never by part name); `buildXlsxPackageFromContent` builds a complete xlsx `Package` from scratch (never editing the decoded package). `number-format.ts`/`styles.ts`/`serial.ts` run both ways: reading classifies style index → format code → kind (`percentage`/`currency`/`date`/`time`/`dateTime`); writing emits interned `numFmt` codes, fed back through the classifier in tests. The classifier is not a formatter (`displayText` is the typed-value spelling). Scope limits: `currency` with no ISO code writes as plain `number`; non-canonical temporal values degrade to text; cell comments read but do not write (`buildXlsxPackageFromContent` emits no comment part, so they do not survive this pair); column widths re-approximate through xlsx's own character-width unit on every write, so a width drifts slightly on each round trip rather than reaching a fixed point.
|
|
295
|
+
- **`src/typed/xlsx/`** — a `ContentDocument`-shaped read/write pair alongside the lossy `readXlsxWorkbook` (both exported; different callers). `readXlsxContent` reads column widths, row heights, hidden rows/columns, merged ranges, every cell value kind, print settings, and cell comments (`comments.ts`: legacy `xl/comments{N}.xml` notes plus `[MS-XLSX]` threaded comments, both resolved through the worksheet part's own relationships, never by part name); `buildXlsxPackageFromContent` builds a complete xlsx `Package` from scratch (never editing the decoded package). `number-format.ts`/`styles.ts`/`serial.ts` run both ways: reading classifies style index → format code → kind (`percentage`/`currency`/`date`/`time`/`dateTime`); writing emits interned `numFmt` codes, fed back through the classifier in tests. The classifier is not a formatter (`displayText` is the typed-value spelling). Scope limits: `currency` with no ISO code writes as plain `number`; non-canonical temporal values degrade to text; cell comments read but do not write (`buildXlsxPackageFromContent` emits no comment part, so they do not survive this pair); column widths re-approximate through xlsx's own character-width unit on every write, so a width drifts slightly on each round trip rather than reaching a fixed point. `data-validation.ts`/`conditional-format.ts` are the same real-vocabulary read/write pair for `ContentSheet.dataValidations`/`conditionalFormats` (see the gotchas section below for the shape), sharing `sqref.ts`'s A1 range-list parsing/formatting and `rule-residue.ts`'s attribute-level residue helper; `styles.ts` additionally resolves a `cellIs`-family rule's own `dxfId` against `xl/styles.xml`'s `<dxfs>` table (`readDxfElements`), the differential-format counterpart to its existing `<cellXfs>` decoration resolution.
|
|
287
296
|
|
|
288
297
|
## Conventions
|
|
289
298
|
|
|
@@ -299,7 +308,7 @@ The package layers a lossless core outward to lossy convenience views:
|
|
|
299
308
|
- **A construct marker brackets whole blocks, never a sub-sequence of runs.** A construct covering a sub-sequence of one paragraph's runs lands on that paragraph's `constructs` field as a run range (see the fidelity-constructs section above) — bookmarks, fields, internal links, comment extents, note references, and `w:ffData` form fields alike. An inline SDT or a few inserted words inside an otherwise untouched paragraph are still read exactly as before — the text survives, the construct does not — as is a bookmark whose two halves sit in different paragraphs. So does a block extent that crosses another, or that straddles a section break or table-cell boundary: neither is expressible as balanced brackets (nor as a tree group, which is what the marker pair promotes to), and both are dropped — a drop `document-schema.js`'s extent-scope note ratifies — rather than emitted at a position that would decode to a different nesting.
|
|
300
309
|
- **The docx pair round-trips `sections`, not a whole `DocxDocument`.** Numbering definitions, cell border styling/shading, section break kinds (`w:sectPr/w:type` onto `ContentSection.breakType`, both directions), and `w:themeColor` (without `themeShade`/`themeTint`) are read; images read into `ContentImageBlock` (floating `wp:anchor` position not recorded); `PAGE`/`NUMPAGES` fields resolve to Word's cached text. Headers and footers are read structurally — every `word/header*.xml` / `word/footer*.xml` part as block flow (`headerFooterParts`, referenced or not) plus per-section default/first/even references (`sectionHeaderFooters`). An inline `w:object`/`o:OLEObject` whose payload part is itself a ZIP archive — a modern producer's embedded xlsx/docx/pptx, detected by magic bytes through `archive-codec` — or a classic OLE compound-file `.bin` whose root storage carries the embedded file as an OLE-packaged `Package` stream, read through `archive-codec`'s bounded CFB reader, is decoded into a nested content document and emitted as a `ContentEmbeddedObjectBlock` beside its containing paragraph's own block, sized from `w:dxaOrig`/`w:dyaOrig`; the object's VML preview picture (`v:imagedata`) and a `w:object` inside a footnote (notes ride as text, with no block flow to lift an object into — a header/footer's own objects DO recover, those parts being walked as block flow) are not read, a compound file holding native legacy streams (BIFF and friends — no `Package` stream, or a packaged file that is not a ZIP) stays opaque, and a payload that does not decode as one of the three OOXML flavours (a plain archive, corrupt zip or compound-file data, a bodyless docx) degrades to no embedded block rather than failing the host read. The writer emits such a block back out as the inverse `w:object`/`o:OLEObject`: the nested document is re-serialised through its own format's builder into a fresh `word/embeddings/oleObject<N>.<docx|xlsx|pptx>` ZIP part carrying its relationship and content-type override, and `w:dxaOrig`/`w:dyaOrig` are derived from the block's frame (twips). An embedded presentation document serialises through an injected port — `BuildDocxContentOptions.serialiseEmbeddedPresentation`, a presentation `ContentDocument` → pptx-bytes function this package accepts because it has no PresentationML writer of its own, and the ecosystem's one pptx writer lives one layer up in documents.js (which exports `embeddedPresentationSerialiser`, wired from its own pptx builder, for exactly this call); with no serialiser injected, a `ContentDocument` carrying one is refused with a thrown error rather than a silent drop, and no VML preview picture is regenerated (the reader never read one into the model, and real previews are WMF/EMF this ecosystem has no writer for; Word shows a blank until activated). The writer emits no `styles.xml`, `numbering.xml`, comments, footnotes, endnotes, or headers/footers, so the `DocxDocument` fields outside `sections` do not come back — a paragraph's `styleId` is still written as a `w:pStyle` reference, resolving to nothing, since every property the style would have contributed is already spelled as direct formatting by then.
|
|
301
310
|
- **pptx is read-only.** Connector shapes (`p:cxnSp`) are skipped; shape rotation composes through groups; a dynamic field (`a:fld`, e.g. slidenum/datetime) reads as an ordinary run plus a `field` run construct carrying `@type` as the instruction and the cached `a:t` as the result; an internal slide-jump link (`a:hlinkClick` resolving to a slide relationship, no `TargetMode`) records a `link` run construct with an internal target naming the destination slide's package part path (e.g. `ppt/slides/slide2.xml` — PresentationML addresses slides by part relationship, never by name; the flat run's `hyperlink` field stays reserved for external URIs, and an action-only `ppaction://hlinkshowjump` names no target part and records nothing); a chart graphic frame reads its chart part's cached series/category model into a table block (header row = series names, one row per category index); a SmartArt graphic frame reads its diagram data model's node text as paragraphs in diagram order (depth-first over `parOf` connections, siblings by `srcOrd`); an OLE graphic frame reads the fallback picture its `mc:Fallback` carries (or, with none reachable, a paragraph naming the `p:oleObj`'s `progId`), and when the payload part is itself a ZIP archive — a modern producer's embedded xlsx/docx/pptx, detected by magic bytes through `archive-codec` — or a classic OLE compound-file `.bin` whose root storage carries the embedded file as an OLE-packaged `Package` stream, read through `archive-codec`'s bounded CFB reader, also decodes it into a nested content document and emits it as an `embeddedObject` block beside the picture, sized to the frame's own geometry; a compound file holding native legacy streams (no `Package` stream, or a packaged file that is not a ZIP) stays opaque external-application data, and a payload that does not decode as one of the three OOXML flavours degrades to no embedded block rather than failing the slide read.
|
|
302
|
-
- **xlsx has no native percentage/currency/date/time cell type.** Both directions are closed via the number-format engine: reading classifies style → format code → kind; writing emits interned `numFmt` codes, fed back through the classifier in tests. `displayText` is the typed-value spelling, not the producer's rendered string. A chart graphic frame reads as an embedded `chart` object (`embeddedObjects`, one row per series over the shared category axis, values verbatim `c:v` text, frame resolved through the sheet's own column widths and row heights), and a drawing picture (`xdr:pic`) as a `ContentSheetImage` (`images`, media bytes sniffed through the drawing part's relationships, frame resolved the same way) — both rows under any of the drawing's three anchor spellings (`twoCellAnchor` marker pairs, `oneCellAnchor` sized by its own `xdr:ext`, and `absoluteAnchor`, whose page-absolute `xdr:pos` is re-based into the cell anchor vocabulary through that same grid geometry) — one-way rows, since the writer emits no drawing part. A workbook's general defined names and table/List objects ride the tree reader's root `definitions` table (`readXlsx`), the landing the schema's own verdict gives a named range; the flat reader and the write pair carry neither. `dataValidation` and `conditionalFormatting` rules
|
|
311
|
+
- **xlsx has no native percentage/currency/date/time cell type.** Both directions are closed via the number-format engine: reading classifies style → format code → kind; writing emits interned `numFmt` codes, fed back through the classifier in tests. `displayText` is the typed-value spelling, not the producer's rendered string. A chart graphic frame reads as an embedded `chart` object (`embeddedObjects`, one row per series over the shared category axis, values verbatim `c:v` text, frame resolved through the sheet's own column widths and row heights), and a drawing picture (`xdr:pic`) as a `ContentSheetImage` (`images`, media bytes sniffed through the drawing part's relationships, frame resolved the same way) — both rows under any of the drawing's three anchor spellings (`twoCellAnchor` marker pairs, `oneCellAnchor` sized by its own `xdr:ext`, and `absoluteAnchor`, whose page-absolute `xdr:pos` is re-based into the cell anchor vocabulary through that same grid geometry) — one-way rows, since the writer emits no drawing part. A workbook's general defined names and table/List objects ride the tree reader's root `definitions` table (`readXlsx`), the landing the schema's own verdict gives a named range; the flat reader and the write pair carry neither. `dataValidation` (`typed/xlsx/data-validation.ts`) and `conditionalFormatting` (`typed/xlsx/conditional-format.ts`) rules are real vocabulary both ways (`ContentSheet.dataValidations`/`conditionalFormats`, ExaDev/documents.js#758), verified against two real LibreOffice-produced fixtures: every `ContentSheetDataValidationTypeSchema` member (the full ECMA-376 vocabulary bar `none`) and every closed-form `ContentSheetConditionalFormatSchema` union member (`cellIs`, the text-predicate and operand-free families, `top10`, `aboveAverage`, `timePeriod`, and the inline-colour `colorScale`/`dataBar`/`iconSet` trio) promote structurally, resolving a `cellIs`-family rule's own `dxfId` against `xl/styles.xml`'s `<dxfs>` table into a `textColor`/`background` style (whatever of a referenced `<dxf>` a real producer's differential format carries beyond those two — alignment, border, a font/fill's own other properties — rides the style's own `source` residue verbatim, reconstructed on write around the two structured colours). A rule's own `sqref` is parsed as the list of one or more ranges it really is (a real fixture carries a space-separated multi-range sqref, e.g. `"A1 C1"`), and a small set of producer attributes neither schema names (a data validation's `showDropDown`/`imeMode`, a cfRule's `pivot`/`id`) rides each rule's own `source` as attribute-level residue, restored on write underneath whatever the structured fields recompute. The one deliberate hold-out is `expression` (an arbitrary boolean formula with no closed-form structure to promote without a general formula engine) and any type/rule this reader does not recognise (`none` foremost) — both continue through the narrowed anchor-cell residue mechanism unchanged, quarantining the rule verbatim on its first range's top-left cell exactly as every promoted rule's own family used to.
|
|
303
312
|
- **`test:smoke` depends on a fresh build.** It runs `tsdown && vitest run --project smoke`, always rebuilding `dist/` first. A bare `vitest` runs both projects; `smoke` fails loudly (`Cannot find module '../dist/index.js'`) if `dist/` is unbuilt.
|
|
304
313
|
- **Binary-vs-XML part classification is a byte sniff, not an extension check.** `looksLikeXml` looks for a leading `<` after skipping a UTF-8 BOM and whitespace; any future binary format starting with `<` would misclassify.
|
|
305
314
|
- **`Array.isArray` narrows `unknown` to `any[]`, not `unknown[]`.** Indexing the result reintroduces `any` and trips `no-unsafe-assignment`. `compact.ts` and `xml/parse.ts` each define a local `isUnknownArray` guard (`value is unknown[]`) — use it wherever the narrowed element is read.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as Package } from "./package-
|
|
1
|
+
import { r as Package } from "./package-otZYrxiO.js";
|
|
2
2
|
import { ContentDocument } from "document-schema.js";
|
|
3
3
|
//#region src/typed/xlsx/build.d.ts
|
|
4
4
|
declare function buildXlsxPackageFromContent(document: ContentDocument): Package;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as Package } from "./package-
|
|
1
|
+
import { r as Package } from "./package-DMk9fuTI.cjs";
|
|
2
2
|
import { ContentDocument } from "document-schema.js";
|
|
3
3
|
//#region src/typed/xlsx/build.d.ts
|
|
4
4
|
declare function buildXlsxPackageFromContent(document: ContentDocument): Package;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { d as XmlNode } from "./node-
|
|
2
|
-
import { r as Package } from "./package-
|
|
3
|
-
import "./read-
|
|
4
|
-
import "./write-
|
|
5
|
-
import "./parse-
|
|
6
|
-
import "./build
|
|
7
|
-
import "./fragment-
|
|
8
|
-
import "./util-
|
|
9
|
-
import "./compact-
|
|
10
|
-
import "./color-
|
|
11
|
-
import "./metadata-
|
|
12
|
-
import "./write-
|
|
13
|
-
import "./document-tree-
|
|
14
|
-
import "./read-
|
|
15
|
-
import "./numbering-
|
|
16
|
-
import "./read-
|
|
17
|
-
import "./xlsx-
|
|
18
|
-
import "./content-
|
|
19
|
-
import "./build-
|
|
1
|
+
import { d as XmlNode } from "./node-B6JX5CRX.cjs";
|
|
2
|
+
import { r as Package } from "./package-DMk9fuTI.cjs";
|
|
3
|
+
import "./read-uKN0paUP.cjs";
|
|
4
|
+
import "./write-Ba1IxfDT.cjs";
|
|
5
|
+
import "./parse-DcVtB3jT.cjs";
|
|
6
|
+
import "./build--uPsivid.cjs";
|
|
7
|
+
import "./fragment-9dNg-m46.cjs";
|
|
8
|
+
import "./util-xRsVgH-g.cjs";
|
|
9
|
+
import "./compact-DMCbYORW.cjs";
|
|
10
|
+
import "./color-DLoZOrg3.cjs";
|
|
11
|
+
import "./metadata-C74-XCrx.cjs";
|
|
12
|
+
import "./write-BGTpp3RS.cjs";
|
|
13
|
+
import "./document-tree-CjI-Z4Tp.cjs";
|
|
14
|
+
import "./read-D6kQeo-T.cjs";
|
|
15
|
+
import "./numbering-vpq3iLPm.cjs";
|
|
16
|
+
import "./read-C1h_Q4kx.cjs";
|
|
17
|
+
import "./xlsx-DCgJ8IbV.cjs";
|
|
18
|
+
import "./content-BiYr86lr.cjs";
|
|
19
|
+
import "./build-BY9Mn-4K.cjs";
|
|
20
20
|
import { z } from "zod";
|
|
21
21
|
import { Alignment as Alignment$1, AlignmentSchema, AnchorDescriptor as AnchorDescriptor$1, AnchorDescriptorSchema, AnchorType, AnchorTypeSchema, Box as Box$1, BoxSchema, COLOR_BLACK, Color as Color$1, ColorSchema, ConstructDescriptor as ConstructDescriptor$1, ConstructDescriptorSchema, ConstructMarkerImbalance, ConstructMarkerImbalanceError, ContentBlock as ContentBlock$1, ContentBlockSchema, ContentBorder, ContentBorderSchema, ContentCellBorders as ContentCellBorders$1, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentControlDescriptor as ContentControlDescriptor$1, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, ContentDocument as ContentDocument$1, ContentDocumentSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph as ContentParagraph$1, ContentParagraphSchema, ContentRun, ContentRunSchema, ContentSection as ContentSection$1, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage as ContentSheetImage$1, ContentSheetImageSchema, ContentSheetPrintRange as ContentSheetPrintRange$1, ContentSheetPrintRangeSchema, ContentSheetPrintSettings as ContentSheetPrintSettings$1, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange as ContentSheetRepeatRange$1, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentStrokeStyle, ContentStrokeStyleSchema, ContentTable as ContentTable$1, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, DivisionDescriptor, DivisionDescriptorSchema, DocumentTree as DocumentTree$1, DocumentTreeSchema, DrawPageChild, DrawPageDescriptor, DrawPageGroupNode, DrawPageGroupSchema, FieldDescriptor, FieldDescriptorSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, Margins, MarginsSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize as PageSize$1, PageSizeSchema, ProvenanceChange as ProvenanceChange$1, ProvenanceChangeSchema, ProvenanceDescriptor as ProvenanceDescriptor$1, ProvenanceDescriptorSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetGroupNode, SheetGroupSchema, SlideDescriptor, SlideGroupNode, SlideGroupSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StylesTable, StylesTableSchema, TreeBlockLeaf, TreeBlockLeafSchema, TreeChildren, TreeGroup, TreeGroupSchema, TreeLeaf, TreeLeafSchema, TreeNode, TreeNodeSchema, applyParagraphStyleProperties, applyRunStyleProperties, assembleTree, colorToRgbHex, decompose, factorStyles, findConstructMarkerImbalance, flattenTree, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode, overlayStyleEntries, resolveStyleChain, rgbHexToColor } from "document-schema.js";
|
|
22
22
|
//#region src/codec.d.ts
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { d as XmlNode } from "./node-
|
|
2
|
-
import { r as Package } from "./package-
|
|
3
|
-
import "./read-
|
|
4
|
-
import "./write-
|
|
5
|
-
import "./parse-
|
|
6
|
-
import "./build-
|
|
7
|
-
import "./fragment-
|
|
8
|
-
import "./util-
|
|
9
|
-
import "./compact-
|
|
10
|
-
import "./color-
|
|
11
|
-
import "./metadata-
|
|
12
|
-
import "./write-
|
|
13
|
-
import "./document-tree-
|
|
14
|
-
import "./read-
|
|
15
|
-
import "./numbering-
|
|
16
|
-
import "./read-
|
|
17
|
-
import "./xlsx-
|
|
18
|
-
import "./content-
|
|
19
|
-
import "./build-
|
|
1
|
+
import { d as XmlNode } from "./node-B6JX5CRX.js";
|
|
2
|
+
import { r as Package } from "./package-otZYrxiO.js";
|
|
3
|
+
import "./read-BlcKA9Cg.js";
|
|
4
|
+
import "./write-C4902scQ.js";
|
|
5
|
+
import "./parse-BLukZ2z0.js";
|
|
6
|
+
import "./build-DgBE0bmv.js";
|
|
7
|
+
import "./fragment-ClgCV_if.js";
|
|
8
|
+
import "./util-DKrYuajM.js";
|
|
9
|
+
import "./compact-CmOeA2dl.js";
|
|
10
|
+
import "./color-DLoZOrg3.js";
|
|
11
|
+
import "./metadata-Bjfa88HQ.js";
|
|
12
|
+
import "./write-Cnfu3zdB.js";
|
|
13
|
+
import "./document-tree-B17XbBOR.js";
|
|
14
|
+
import "./read-D_kXw2N2.js";
|
|
15
|
+
import "./numbering-CUMTFxfk.js";
|
|
16
|
+
import "./read-B5kexLpc.js";
|
|
17
|
+
import "./xlsx-B3JGnx0l.js";
|
|
18
|
+
import "./content-D1pmxaUb.js";
|
|
19
|
+
import "./build-BOI7rIog.js";
|
|
20
20
|
import { z } from "zod";
|
|
21
21
|
import { Alignment as Alignment$1, AlignmentSchema, AnchorDescriptor as AnchorDescriptor$1, AnchorDescriptorSchema, AnchorType, AnchorTypeSchema, Box as Box$1, BoxSchema, COLOR_BLACK as COLOR_BLACK$1, Color as Color$1, ColorSchema, ConstructDescriptor as ConstructDescriptor$1, ConstructDescriptorSchema, ConstructMarkerImbalance, ConstructMarkerImbalanceError, ContentBlock as ContentBlock$1, ContentBlockSchema as ContentBlockSchema$1, ContentBorder, ContentBorderSchema, ContentCellBorders as ContentCellBorders$1, ContentCellBordersSchema, ContentCellValue, ContentCellValueSchema, ContentConstructEnd, ContentConstructEndSchema, ContentConstructStart, ContentConstructStartSchema, ContentControlDescriptor as ContentControlDescriptor$1, ContentControlDescriptorSchema, ContentControlLock, ContentControlLockSchema, ContentControlType, ContentControlTypeSchema, ContentDocument as ContentDocument$1, ContentDocumentSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembershipSchema, ContentPageBreak, ContentPageBreakSchema, ContentParagraph as ContentParagraph$1, ContentParagraphSchema, ContentRun, ContentRunSchema, ContentSection as ContentSection$1, ContentSectionSchema as ContentSectionSchema$1, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage as ContentSheetImage$1, 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 as ContentTable$1, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, DivisionDescriptor, DivisionDescriptorSchema, DocumentTree as DocumentTree$1, DocumentTreeSchema, DrawPageChild, DrawPageDescriptor, DrawPageGroupNode, DrawPageGroupSchema, FieldDescriptor, FieldDescriptorSchema, HeadingGroupNode, HeadingGroupSchema, HeadingParagraph, LinkDescriptor, LinkDescriptorSchema, LinkTarget, LinkTargetSchema, ListChild, ListGroupNode, ListGroupSchema, ListParagraph, Margins, MarginsSchema, PAGE_SIZE_A4 as PAGE_SIZE_A4$1, PAGE_SIZE_LETTER as PAGE_SIZE_LETTER$1, PageSize as PageSize$1, PageSizeSchema, ProvenanceChange as ProvenanceChange$1, ProvenanceChangeSchema, ProvenanceDescriptor as ProvenanceDescriptor$1, ProvenanceDescriptorSchema, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN as SLIDE_SIZE_WIDESCREEN$1, SectionChild, SectionConstructGroupNode, SectionConstructGroupSchema, SectionDescriptor, SectionGroupNode, SectionGroupSchema, ShapeChild, ShapeConstructGroupNode, ShapeConstructGroupSchema, ShapeDescriptor, ShapeGroupNode, ShapeGroupSchema, SheetChild, SheetDescriptor, SheetGroupNode, SheetGroupSchema, SlideDescriptor, SlideGroupNode, SlideGroupSchema, StyleEntry, StyleEntrySchema, StyleParagraphProperties, StyleParagraphPropertiesSchema, StyleRunProperties, StyleRunPropertiesSchema, StylesTable, StylesTableSchema, TreeBlockLeaf, TreeBlockLeafSchema, TreeChildren, TreeGroup, TreeGroupSchema, TreeLeaf, TreeLeafSchema, TreeNode, TreeNodeSchema, applyParagraphStyleProperties, applyRunStyleProperties, assembleTree as assembleTree$1, colorToRgbHex as colorToRgbHex$1, decompose, factorStyles, findConstructMarkerImbalance as findConstructMarkerImbalance$1, flattenTree as flattenTree$1, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode, overlayStyleEntries, resolveStyleChain, rgbHexToColor as rgbHexToColor$1 } from "document-schema.js";
|
|
22
22
|
//#region src/codec.d.ts
|
package/dist/codec.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-
|
|
1
|
+
import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-BBM1RYx7.cjs";
|
|
2
2
|
export { decodePackage, encodePackage, packageCodec, xmlCodec };
|
package/dist/codec.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-
|
|
1
|
+
import { i as xmlCodec, n as encodePackage, r as packageCodec, t as decodePackage } from "./codec-Cva8QD7-.js";
|
|
2
2
|
export { decodePackage, encodePackage, packageCodec, xmlCodec };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Color } from "document-schema.js";
|
|
2
2
|
//#region src/typed/shared/color.d.ts
|
|
3
3
|
interface ColorTransform {
|
|
4
|
-
readonly kind:
|
|
4
|
+
readonly kind: "shade" | "tint" | "lumMod" | "lumOff";
|
|
5
5
|
readonly value: number;
|
|
6
6
|
}
|
|
7
7
|
declare function applyColorTransforms(base: Color, transforms: readonly ColorTransform[]): Color;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Color } from "document-schema.js";
|
|
2
2
|
//#region src/typed/shared/color.d.ts
|
|
3
3
|
interface ColorTransform {
|
|
4
|
-
readonly kind:
|
|
4
|
+
readonly kind: "shade" | "tint" | "lumMod" | "lumOff";
|
|
5
5
|
readonly value: number;
|
|
6
6
|
}
|
|
7
7
|
declare function applyColorTransforms(base: Color, transforms: readonly ColorTransform[]): Color;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as XmlNode } from "./node-
|
|
2
|
-
import { r as Package } from "./package-
|
|
1
|
+
import { d as XmlNode } from "./node-B6JX5CRX.js";
|
|
2
|
+
import { r as Package } from "./package-otZYrxiO.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/compact.d.ts
|
|
5
5
|
type CompactAttrPairs = number[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as XmlNode } from "./node-
|
|
2
|
-
import { r as Package } from "./package-
|
|
1
|
+
import { d as XmlNode } from "./node-B6JX5CRX.cjs";
|
|
2
|
+
import { r as Package } from "./package-DMk9fuTI.cjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/compact.d.ts
|
|
5
5
|
type CompactAttrPairs = number[];
|
package/dist/compact.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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-
|
|
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-DMCbYORW.cjs";
|
|
2
2
|
export { CompactAttrPairs, CompactCdata, CompactComment, CompactDeclaration, CompactElement, CompactPackage, CompactPackageSchema, CompactPart, CompactPartSchema, CompactPi, CompactText, CompactXmlNode, CompactXmlNodeSchema, compactCodec, compactPackageCodec, decodeCompactPackage, encodeCompactPackage, fromCompact, isCompactXmlNode, toCompact };
|
package/dist/compact.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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-
|
|
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-CmOeA2dl.js";
|
|
2
2
|
export { CompactAttrPairs, CompactCdata, CompactComment, CompactDeclaration, CompactElement, CompactPackage, CompactPackageSchema, CompactPart, CompactPartSchema, CompactPi, CompactText, CompactXmlNode, CompactXmlNodeSchema, compactCodec, compactPackageCodec, decodeCompactPackage, encodeCompactPackage, fromCompact, isCompactXmlNode, toCompact };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as Package } from "./package-
|
|
2
|
-
import { t as BuildDocxContentOptions } from "./write-
|
|
1
|
+
import { r as Package } from "./package-otZYrxiO.js";
|
|
2
|
+
import { t as BuildDocxContentOptions } from "./write-Cnfu3zdB.js";
|
|
3
3
|
import { DocumentTree } from "document-schema.js";
|
|
4
4
|
//#region src/typed/document-tree.d.ts
|
|
5
5
|
declare function readDocx(pkg: Package): DocumentTree;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as Package } from "./package-
|
|
2
|
-
import { t as BuildDocxContentOptions } from "./write-
|
|
1
|
+
import { r as Package } from "./package-DMk9fuTI.cjs";
|
|
2
|
+
import { t as BuildDocxContentOptions } from "./write-BGTpp3RS.cjs";
|
|
3
3
|
import { DocumentTree } from "document-schema.js";
|
|
4
4
|
//#region src/typed/document-tree.d.ts
|
|
5
5
|
declare function readDocx(pkg: Package): DocumentTree;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as XmlNode, h as XmlText, l as XmlElement } from "./node-
|
|
1
|
+
import { d as XmlNode, h as XmlText, l as XmlElement } from "./node-B6JX5CRX.cjs";
|
|
2
2
|
//#region src/xml/fragment.d.ts
|
|
3
3
|
declare function el(tag: string, attrs?: Record<string, string>, children?: XmlNode[]): XmlElement;
|
|
4
4
|
declare function txt(value: string): XmlText;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as XmlNode, h as XmlText, l as XmlElement } from "./node-
|
|
1
|
+
import { d as XmlNode, h as XmlText, l as XmlElement } from "./node-B6JX5CRX.js";
|
|
2
2
|
//#region src/xml/fragment.d.ts
|
|
3
3
|
declare function el(tag: string, attrs?: Record<string, string>, children?: XmlNode[]): XmlElement;
|
|
4
4
|
declare function txt(value: string): XmlText;
|
package/dist/image/sniff.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as sniffImageFormat, t as ImageFormat } from "../sniff-
|
|
1
|
+
import { n as sniffImageFormat, t as ImageFormat } from "../sniff-DGOBHA0O.cjs";
|
|
2
2
|
export { ImageFormat, sniffImageFormat };
|
package/dist/image/sniff.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as sniffImageFormat, t as ImageFormat } from "../sniff-
|
|
1
|
+
import { n as sniffImageFormat, t as ImageFormat } from "../sniff-DGOBHA0O.js";
|
|
2
2
|
export { ImageFormat, sniffImageFormat };
|
package/dist/index.cjs
CHANGED
|
@@ -15,7 +15,7 @@ const require_typed_util = require("./typed/util.cjs");
|
|
|
15
15
|
const require_typed_shared_color = require("./typed/shared/color.cjs");
|
|
16
16
|
const require_typed_shared_metadata = require("./typed/shared/metadata.cjs");
|
|
17
17
|
const require_image_sniff = require("./image/sniff.cjs");
|
|
18
|
-
const require_read = require("./read-
|
|
18
|
+
const require_read = require("./read-CXksZHJW.cjs");
|
|
19
19
|
const require_typed_xlsx_content = require("./typed/xlsx/content.cjs");
|
|
20
20
|
const require_typed_docx_numbering = require("./typed/docx/numbering.cjs");
|
|
21
21
|
const require_typed_xlsx_build = require("./typed/xlsx/build.cjs");
|
package/dist/index.d.cts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { _ as isXmlNode, a as XmlComment, c as XmlDeclarationSchema, d as XmlNode, f as XmlNodeSchema, g as XmlTextSchema, h as XmlText, i as XmlCdataSchema, l as XmlElement, m as XmlPiSchema, n as AttributeSchema, o as XmlCommentSchema, p as XmlPi, r as XmlCdata, s as XmlDeclaration, t as Attribute, u as XmlElementSchema } from "./node-
|
|
2
|
-
import { a as Part, c as XmlPartSchema, i as PackageSchema, n as BinaryPartSchema, o as PartSchema, r as Package, s as XmlPart, t as BinaryPart } from "./package-
|
|
3
|
-
import { n as parsePackage } from "./read-
|
|
4
|
-
import { t as serializePackage } from "./write-
|
|
5
|
-
import { t as parseXml } from "./parse-
|
|
6
|
-
import { t as buildXml } from "./build
|
|
7
|
-
import { n as txt, t as el } from "./fragment-
|
|
1
|
+
import { _ as isXmlNode, a as XmlComment, c as XmlDeclarationSchema, d as XmlNode, f as XmlNodeSchema, g as XmlTextSchema, h as XmlText, i as XmlCdataSchema, l as XmlElement, m as XmlPiSchema, n as AttributeSchema, o as XmlCommentSchema, p as XmlPi, r as XmlCdata, s as XmlDeclaration, t as Attribute, u as XmlElementSchema } from "./node-B6JX5CRX.cjs";
|
|
2
|
+
import { a as Part, c as XmlPartSchema, i as PackageSchema, n as BinaryPartSchema, o as PartSchema, r as Package, s as XmlPart, t as BinaryPart } from "./package-DMk9fuTI.cjs";
|
|
3
|
+
import { n as parsePackage } from "./read-uKN0paUP.cjs";
|
|
4
|
+
import { t as serializePackage } from "./write-Ba1IxfDT.cjs";
|
|
5
|
+
import { t as parseXml } from "./parse-DcVtB3jT.cjs";
|
|
6
|
+
import { t as buildXml } from "./build--uPsivid.cjs";
|
|
7
|
+
import { n as txt, t as el } from "./fragment-9dNg-m46.cjs";
|
|
8
8
|
import { t as encodeXmlText } from "./entities-6DuTszqf.cjs";
|
|
9
9
|
import { n as zipPackage, t as unzipPackage } from "./zip-Ckbv-mtV.cjs";
|
|
10
10
|
import { n as bytesToBase64, t as base64ToBytes } from "./base64--HuymRl_.cjs";
|
|
11
|
-
import { a as elementsWithTag, c as textContent, i as decodeEntities, l as walk, n as attr, o as resolveRelationships, r as childrenWithTag, s as rootElement, t as Relationship } from "./util-
|
|
12
|
-
import { _ as encodeCompactPackage, b as toCompact, c as CompactPart, f as CompactXmlNode, g as decodeCompactPackage, h as compactPackageCodec, l as CompactPartSchema, m as compactCodec, o as CompactPackage, p as CompactXmlNodeSchema, s as CompactPackageSchema, t as CompactAttrPairs, v as fromCompact, y as isCompactXmlNode } from "./compact-
|
|
13
|
-
import { n as applyColorTransforms, t as ColorTransform } from "./color-
|
|
14
|
-
import { n as DocumentMetadataSchema, t as DocumentMetadata } from "./metadata-
|
|
15
|
-
import { n as sniffImageFormat, t as ImageFormat } from "./sniff-
|
|
16
|
-
import { i as buildDocxPackageFromContent, n as DocxContent, r as EmbeddedPresentationSerialiser, t as BuildDocxContentOptions } from "./write-
|
|
17
|
-
import { a as readXlsx, i as readPptx, n as buildXlsxPackage, r as readDocx, t as buildDocxPackage } from "./document-tree-
|
|
18
|
-
import { a as Footnote, c as HeaderFooterPartSchema, d as readDocxContent, i as DocxDocumentSchema, l as SectionHeaderFooterReferences, n as CommentSchema, o as FootnoteSchema, r as DocxDocument, s as HeaderFooterPart, t as Comment, u as SectionHeaderFooterReferencesSchema } from "./read-
|
|
19
|
-
import { a as NumberingLevelSchema, i as NumberingLevel, n as NumberingDefinitionSchema, o as readNumberingDefinitions, r as NumberingDefinitions, t as NumberingDefinition } from "./numbering-
|
|
20
|
-
import { n as PptxDocumentSchema, r as readPptxContent, t as PptxDocument } from "./read-
|
|
21
|
-
import { a as XlsxSheet, c as XlsxWorkbookSchema, i as XlsxCellSchema, l as readXlsxWorkbook, n as DefinedNameSchema, o as XlsxSheetSchema, r as XlsxCell, s as XlsxWorkbook, t as DefinedName } from "./xlsx-
|
|
22
|
-
import { t as readXlsxContent } from "./content-
|
|
23
|
-
import { t as buildXlsxPackageFromContent } from "./build-
|
|
24
|
-
import { $ as ContentShapeSchema, $n as isHeadingGroupNode, $t as ProvenanceChange, A as ContentConstructStart, An as StylesTable, At as DrawPageChild, B as ContentImageBlock, Bn as TreeNodeSchema, Bt as LinkDescriptorSchema, C as ContentBorderSchema, Cn as SlideGroupSchema, Ct as ContentTableRow, D as ContentCellValueSchema, Dn as StyleParagraphPropertiesSchema, Dt as DivisionDescriptorSchema, E as ContentCellValue, En as StyleParagraphProperties, Et as DivisionDescriptor, F as ContentControlLockSchema, Fn as TreeGroup, Ft as FieldDescriptorSchema, G as ContentPageBreakSchema, Gn as decompose, Gt as ListGroupSchema, H as ContentListMembership, Hn as applyRunStyleProperties, Ht as LinkTargetSchema, I as ContentControlType, In as TreeGroupSchema, It as HeadingGroupNode, J as ContentRun, Jn as flattenTree, Jt as MarginsSchema, K as ContentParagraph, Kn as factorStyles, Kt as ListParagraph, L as ContentControlTypeSchema, Ln as TreeLeaf, Lt as HeadingGroupSchema, M as ContentControlDescriptor, Mn as TreeBlockLeaf, Mt as DrawPageGroupNode, N as ContentControlDescriptorSchema, Nn as TreeBlockLeafSchema, Nt as DrawPageGroupSchema, O as ContentConstructEnd, On as StyleRunProperties, Ot as DocumentTree, P as ContentControlLock, Pn as TreeChildren, Pt as FieldDescriptor, Q as ContentShape, Qn as isDrawPageGroupNode, Qt as PageSizeSchema, R as ContentDocument, Rn as TreeLeafSchema, Rt as HeadingParagraph, S as ContentBorder, Sn as SlideGroupNode, St as ContentTableCellSchema, T as ContentCellBordersSchema, Tn as StyleEntrySchema, Tt as ContentTableSchema, U as ContentListMembershipSchema, Un as assembleTree, Ut as ListChild, V as ContentImageBlockSchema, Vn as applyParagraphStyleProperties, Vt as LinkTarget, W as ContentPageBreak, Wn as colorToRgbHex, Wt as ListGroupNode, X as ContentSection, Xn as isContentConstructEnd, Xt as PAGE_SIZE_LETTER, Y as ContentRunSchema, Yn as isContentBlock, Yt as PAGE_SIZE_A4, Z as ContentSectionSchema, Zn as isContentConstructStart, Zt as PageSize, _ as ConstructDescriptorSchema, _n as SheetChild, _t as ContentSlideSchema, a as Alignment, an as SectionChild, ar as isSheetGroupNode, at as ContentSheetImage, b as ContentBlock, bn as SheetGroupSchema, bt as ContentTable, c as AnchorDescriptorSchema, cn as SectionDescriptor, cr as isTreeGroup, ct as ContentSheetPrintRangeSchema, d as Box, dn as ShapeChild, dr as overlayStyleEntries, dt as ContentSheetRepeatRange, en as ProvenanceChangeSchema, er as isListGroupNode, et as ContentSheet, f as BoxSchema, fn as ShapeConstructGroupNode, fr as resolveStyleChain, ft as ContentSheetRepeatRangeSchema, g as ConstructDescriptor, gn as ShapeGroupSchema, gt as ContentSlide, h as ColorSchema, hn as ShapeGroupNode, ht as ContentSheetSchema, i as xmlCodec, in as SLIDE_SIZE_WIDESCREEN, ir as isShapeGroupNode, it as ContentSheetColumnSchema, j as ContentConstructStartSchema, jn as StylesTableSchema, jt as DrawPageDescriptor, k as ContentConstructEndSchema, kn as StyleRunPropertiesSchema, kt as DocumentTreeSchema, l as AnchorType, ln as SectionGroupNode, lr as isTreeLeaf, lt as ContentSheetPrintSettings, m as Color, mn as ShapeDescriptor, mt as ContentSheetRowSchema, n as encodePackage, nn as ProvenanceDescriptorSchema, nr as isSectionGroupNode, nt as ContentSheetCellSchema, o as AlignmentSchema, on as SectionConstructGroupNode, or as isSlideGroupNode, ot as ContentSheetImageSchema, p as COLOR_BLACK, pn as ShapeConstructGroupSchema, pr as rgbHexToColor, pt as ContentSheetRow, q as ContentParagraphSchema, qn as findConstructMarkerImbalance, qt as Margins, r as packageCodec, rn as SLIDE_SIZE_STANDARD, rr as isShapeConstructGroupNode, rt as ContentSheetColumn, s as AnchorDescriptor, sn as SectionConstructGroupSchema, sr as isTreeBlockLeaf, st as ContentSheetPrintRange, t as decodePackage, tn as ProvenanceDescriptor, tr as isSectionConstructGroupNode, tt as ContentSheetCell, u as AnchorTypeSchema, un as SectionGroupSchema, ur as isTreeNode, ut as ContentSheetPrintSettingsSchema, v as ConstructMarkerImbalance, vn as SheetDescriptor, vt as ContentStrokeStyle, w as ContentCellBorders, wn as StyleEntry, wt as ContentTableRowSchema, x as ContentBlockSchema, xn as SlideDescriptor, xt as ContentTableCell, y as ConstructMarkerImbalanceError, yn as SheetGroupNode, yt as ContentStrokeStyleSchema, z as ContentDocumentSchema, zn as TreeNode, zt as LinkDescriptor } from "./codec-
|
|
11
|
+
import { a as elementsWithTag, c as textContent, i as decodeEntities, l as walk, n as attr, o as resolveRelationships, r as childrenWithTag, s as rootElement, t as Relationship } from "./util-xRsVgH-g.cjs";
|
|
12
|
+
import { _ as encodeCompactPackage, b as toCompact, c as CompactPart, f as CompactXmlNode, g as decodeCompactPackage, h as compactPackageCodec, l as CompactPartSchema, m as compactCodec, o as CompactPackage, p as CompactXmlNodeSchema, s as CompactPackageSchema, t as CompactAttrPairs, v as fromCompact, y as isCompactXmlNode } from "./compact-DMCbYORW.cjs";
|
|
13
|
+
import { n as applyColorTransforms, t as ColorTransform } from "./color-DLoZOrg3.cjs";
|
|
14
|
+
import { n as DocumentMetadataSchema, t as DocumentMetadata } from "./metadata-C74-XCrx.cjs";
|
|
15
|
+
import { n as sniffImageFormat, t as ImageFormat } from "./sniff-DGOBHA0O.cjs";
|
|
16
|
+
import { i as buildDocxPackageFromContent, n as DocxContent, r as EmbeddedPresentationSerialiser, t as BuildDocxContentOptions } from "./write-BGTpp3RS.cjs";
|
|
17
|
+
import { a as readXlsx, i as readPptx, n as buildXlsxPackage, r as readDocx, t as buildDocxPackage } from "./document-tree-CjI-Z4Tp.cjs";
|
|
18
|
+
import { a as Footnote, c as HeaderFooterPartSchema, d as readDocxContent, i as DocxDocumentSchema, l as SectionHeaderFooterReferences, n as CommentSchema, o as FootnoteSchema, r as DocxDocument, s as HeaderFooterPart, t as Comment, u as SectionHeaderFooterReferencesSchema } from "./read-D6kQeo-T.cjs";
|
|
19
|
+
import { a as NumberingLevelSchema, i as NumberingLevel, n as NumberingDefinitionSchema, o as readNumberingDefinitions, r as NumberingDefinitions, t as NumberingDefinition } from "./numbering-vpq3iLPm.cjs";
|
|
20
|
+
import { n as PptxDocumentSchema, r as readPptxContent, t as PptxDocument } from "./read-C1h_Q4kx.cjs";
|
|
21
|
+
import { a as XlsxSheet, c as XlsxWorkbookSchema, i as XlsxCellSchema, l as readXlsxWorkbook, n as DefinedNameSchema, o as XlsxSheetSchema, r as XlsxCell, s as XlsxWorkbook, t as DefinedName } from "./xlsx-DCgJ8IbV.cjs";
|
|
22
|
+
import { t as readXlsxContent } from "./content-BiYr86lr.cjs";
|
|
23
|
+
import { t as buildXlsxPackageFromContent } from "./build-BY9Mn-4K.cjs";
|
|
24
|
+
import { $ as ContentShapeSchema, $n as isHeadingGroupNode, $t as ProvenanceChange, A as ContentConstructStart, An as StylesTable, At as DrawPageChild, B as ContentImageBlock, Bn as TreeNodeSchema, Bt as LinkDescriptorSchema, C as ContentBorderSchema, Cn as SlideGroupSchema, Ct as ContentTableRow, D as ContentCellValueSchema, Dn as StyleParagraphPropertiesSchema, Dt as DivisionDescriptorSchema, E as ContentCellValue, En as StyleParagraphProperties, Et as DivisionDescriptor, F as ContentControlLockSchema, Fn as TreeGroup, Ft as FieldDescriptorSchema, G as ContentPageBreakSchema, Gn as decompose, Gt as ListGroupSchema, H as ContentListMembership, Hn as applyRunStyleProperties, Ht as LinkTargetSchema, I as ContentControlType, In as TreeGroupSchema, It as HeadingGroupNode, J as ContentRun, Jn as flattenTree, Jt as MarginsSchema, K as ContentParagraph, Kn as factorStyles, Kt as ListParagraph, L as ContentControlTypeSchema, Ln as TreeLeaf, Lt as HeadingGroupSchema, M as ContentControlDescriptor, Mn as TreeBlockLeaf, Mt as DrawPageGroupNode, N as ContentControlDescriptorSchema, Nn as TreeBlockLeafSchema, Nt as DrawPageGroupSchema, O as ContentConstructEnd, On as StyleRunProperties, Ot as DocumentTree, P as ContentControlLock, Pn as TreeChildren, Pt as FieldDescriptor, Q as ContentShape, Qn as isDrawPageGroupNode, Qt as PageSizeSchema, R as ContentDocument, Rn as TreeLeafSchema, Rt as HeadingParagraph, S as ContentBorder, Sn as SlideGroupNode, St as ContentTableCellSchema, T as ContentCellBordersSchema, Tn as StyleEntrySchema, Tt as ContentTableSchema, U as ContentListMembershipSchema, Un as assembleTree, Ut as ListChild, V as ContentImageBlockSchema, Vn as applyParagraphStyleProperties, Vt as LinkTarget, W as ContentPageBreak, Wn as colorToRgbHex, Wt as ListGroupNode, X as ContentSection, Xn as isContentConstructEnd, Xt as PAGE_SIZE_LETTER, Y as ContentRunSchema, Yn as isContentBlock, Yt as PAGE_SIZE_A4, Z as ContentSectionSchema, Zn as isContentConstructStart, Zt as PageSize, _ as ConstructDescriptorSchema, _n as SheetChild, _t as ContentSlideSchema, a as Alignment, an as SectionChild, ar as isSheetGroupNode, at as ContentSheetImage, b as ContentBlock, bn as SheetGroupSchema, bt as ContentTable, c as AnchorDescriptorSchema, cn as SectionDescriptor, cr as isTreeGroup, ct as ContentSheetPrintRangeSchema, d as Box, dn as ShapeChild, dr as overlayStyleEntries, dt as ContentSheetRepeatRange, en as ProvenanceChangeSchema, er as isListGroupNode, et as ContentSheet, f as BoxSchema, fn as ShapeConstructGroupNode, fr as resolveStyleChain, ft as ContentSheetRepeatRangeSchema, g as ConstructDescriptor, gn as ShapeGroupSchema, gt as ContentSlide, h as ColorSchema, hn as ShapeGroupNode, ht as ContentSheetSchema, i as xmlCodec, in as SLIDE_SIZE_WIDESCREEN, ir as isShapeGroupNode, it as ContentSheetColumnSchema, j as ContentConstructStartSchema, jn as StylesTableSchema, jt as DrawPageDescriptor, k as ContentConstructEndSchema, kn as StyleRunPropertiesSchema, kt as DocumentTreeSchema, l as AnchorType, ln as SectionGroupNode, lr as isTreeLeaf, lt as ContentSheetPrintSettings, m as Color, mn as ShapeDescriptor, mt as ContentSheetRowSchema, n as encodePackage, nn as ProvenanceDescriptorSchema, nr as isSectionGroupNode, nt as ContentSheetCellSchema, o as AlignmentSchema, on as SectionConstructGroupNode, or as isSlideGroupNode, ot as ContentSheetImageSchema, p as COLOR_BLACK, pn as ShapeConstructGroupSchema, pr as rgbHexToColor, pt as ContentSheetRow, q as ContentParagraphSchema, qn as findConstructMarkerImbalance, qt as Margins, r as packageCodec, rn as SLIDE_SIZE_STANDARD, rr as isShapeConstructGroupNode, rt as ContentSheetColumn, s as AnchorDescriptor, sn as SectionConstructGroupSchema, sr as isTreeBlockLeaf, st as ContentSheetPrintRange, t as decodePackage, tn as ProvenanceDescriptor, tr as isSectionConstructGroupNode, tt as ContentSheetCell, u as AnchorTypeSchema, un as SectionGroupSchema, ur as isTreeNode, ut as ContentSheetPrintSettingsSchema, v as ConstructMarkerImbalance, vn as SheetDescriptor, vt as ContentStrokeStyle, w as ContentCellBorders, wn as StyleEntry, wt as ContentTableRowSchema, x as ContentBlockSchema, xn as SlideDescriptor, xt as ContentTableCell, y as ConstructMarkerImbalanceError, yn as SheetGroupNode, yt as ContentStrokeStyleSchema, z as ContentDocumentSchema, zn as TreeNode, zt as LinkDescriptor } from "./codec-BBM1RYx7.cjs";
|
|
25
25
|
export { type Alignment, AlignmentSchema, type AnchorDescriptor, AnchorDescriptorSchema, type AnchorType, AnchorTypeSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, BoxSchema, type BuildDocxContentOptions, COLOR_BLACK, type Color, ColorSchema, type ColorTransform, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ConstructDescriptor, ConstructDescriptorSchema, type ConstructMarkerImbalance, ConstructMarkerImbalanceError, type ContentBlock, ContentBlockSchema, type ContentBorder, ContentBorderSchema, type ContentCellBorders, ContentCellBordersSchema, type ContentCellValue, ContentCellValueSchema, type ContentConstructEnd, ContentConstructEndSchema, type ContentConstructStart, ContentConstructStartSchema, type ContentControlDescriptor, ContentControlDescriptorSchema, type ContentControlLock, ContentControlLockSchema, type ContentControlType, ContentControlTypeSchema, type ContentDocument, ContentDocumentSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, ContentListMembershipSchema, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, ContentSheetImageSchema, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentStrokeStyle, ContentStrokeStyleSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type DefinedName, DefinedNameSchema, type DivisionDescriptor, DivisionDescriptorSchema, type DocumentMetadata, DocumentMetadataSchema, type DocumentTree, DocumentTreeSchema, type DocxContent, type DocxDocument, DocxDocumentSchema, type DrawPageChild, type DrawPageDescriptor, type DrawPageGroupNode, DrawPageGroupSchema, type EmbeddedPresentationSerialiser, type FieldDescriptor, FieldDescriptorSchema, type Footnote, FootnoteSchema, type HeaderFooterPart, HeaderFooterPartSchema, type HeadingGroupNode, HeadingGroupSchema, type HeadingParagraph, type ImageFormat, type LinkDescriptor, LinkDescriptorSchema, type LinkTarget, LinkTargetSchema, type ListChild, type ListGroupNode, ListGroupSchema, type ListParagraph, type Margins, MarginsSchema, type NumberingDefinition, NumberingDefinitionSchema, type NumberingDefinitions, type NumberingLevel, NumberingLevelSchema, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageSize, PageSizeSchema, type Part, PartSchema, type PptxDocument, PptxDocumentSchema, type ProvenanceChange, ProvenanceChangeSchema, type ProvenanceDescriptor, ProvenanceDescriptorSchema, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, type SectionChild, type SectionConstructGroupNode, SectionConstructGroupSchema, type SectionDescriptor, type SectionGroupNode, SectionGroupSchema, type SectionHeaderFooterReferences, SectionHeaderFooterReferencesSchema, type ShapeChild, type ShapeConstructGroupNode, ShapeConstructGroupSchema, type ShapeDescriptor, type ShapeGroupNode, ShapeGroupSchema, type SheetChild, type SheetDescriptor, type SheetGroupNode, SheetGroupSchema, type SlideDescriptor, type SlideGroupNode, SlideGroupSchema, type StyleEntry, StyleEntrySchema, type StyleParagraphProperties, StyleParagraphPropertiesSchema, type StyleRunProperties, StyleRunPropertiesSchema, type StylesTable, StylesTableSchema, type TreeBlockLeaf, TreeBlockLeafSchema, type TreeChildren, type TreeGroup, TreeGroupSchema, type TreeLeaf, TreeLeafSchema, type TreeNode, TreeNodeSchema, type XlsxCell, XlsxCellSchema, type XlsxSheet, XlsxSheetSchema, type XlsxWorkbook, XlsxWorkbookSchema, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, applyColorTransforms, applyParagraphStyleProperties, applyRunStyleProperties, assembleTree, attr, base64ToBytes, buildDocxPackage, buildDocxPackageFromContent, buildXlsxPackage, buildXlsxPackageFromContent, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, decompose, el, elementsWithTag, encodeCompactPackage, encodePackage, encodeXmlText, factorStyles, findConstructMarkerImbalance, flattenTree, fromCompact, isCompactXmlNode, isContentBlock, isContentConstructEnd, isContentConstructStart, isDrawPageGroupNode, isHeadingGroupNode, isListGroupNode, isSectionConstructGroupNode, isSectionGroupNode, isShapeConstructGroupNode, isShapeGroupNode, isSheetGroupNode, isSlideGroupNode, isTreeBlockLeaf, isTreeGroup, isTreeLeaf, isTreeNode, isXmlNode, overlayStyleEntries, packageCodec, parsePackage, parseXml, readDocx, readDocxContent, readNumberingDefinitions, readPptx, readPptxContent, readXlsx, readXlsxContent, readXlsxWorkbook, resolveRelationships, resolveStyleChain, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, txt, unzipPackage, walk, xmlCodec, zipPackage };
|