ooxml.js 2.11.32 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{codec-nIFHuTm-.d.cts → codec-BK9uVOS_.d.cts} +1 -1
- package/dist/{codec-B52c8v4h.d.ts → codec-BrcAFCYO.d.ts} +1 -1
- package/dist/codec.d.cts +1 -1
- package/dist/codec.d.ts +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/{read-BLMpCzzG.d.ts → read-CeCtSzjQ.d.ts} +7 -0
- package/dist/{read-DymSS-X4.d.cts → read-OBV7MMlF.d.cts} +7 -0
- package/dist/typed/docx/read.cjs +1 -0
- package/dist/typed/docx/read.js +2 -1
- package/dist/typed/docx/styles.cjs +6 -2
- package/dist/typed/docx/styles.d.cts +1 -0
- package/dist/typed/docx/styles.d.ts +1 -0
- package/dist/typed/docx/styles.js +6 -2
- package/dist/typed/pptx/read.d.cts +1 -1
- package/dist/typed/pptx/read.d.ts +1 -1
- package/package.json +2 -2
|
@@ -11,7 +11,7 @@ import "./color-fFIKAs-Y.cjs";
|
|
|
11
11
|
import "./metadata-D6o-kLpg.cjs";
|
|
12
12
|
import "./read-D_CpruL_.cjs";
|
|
13
13
|
import "./numbering-C53LT-Jx.cjs";
|
|
14
|
-
import "./read-
|
|
14
|
+
import "./read-OBV7MMlF.cjs";
|
|
15
15
|
import "./xlsx-B97t4YE-.cjs";
|
|
16
16
|
import "./content-UlQ-Nhgi.cjs";
|
|
17
17
|
import "./build-CBL9scQK.cjs";
|
|
@@ -11,7 +11,7 @@ import "./color-fFIKAs-Y.js";
|
|
|
11
11
|
import "./metadata-o_WH9V_I.js";
|
|
12
12
|
import "./read-B2-FFhqI.js";
|
|
13
13
|
import "./numbering-D0YfuiOO.js";
|
|
14
|
-
import "./read-
|
|
14
|
+
import "./read-CeCtSzjQ.js";
|
|
15
15
|
import "./xlsx-BxKODiLX.js";
|
|
16
16
|
import "./content-t6ZfmfQM.js";
|
|
17
17
|
import "./build-C0gS5QeG.js";
|
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-BK9uVOS_.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-BrcAFCYO.js";
|
|
2
2
|
export { decodePackage, encodePackage, packageCodec, xmlCodec };
|
package/dist/index.d.cts
CHANGED
|
@@ -15,9 +15,9 @@ import { n as DocumentMetadataSchema, t as DocumentMetadata } from "./metadata-D
|
|
|
15
15
|
import { n as sniffImageFormat, t as ImageFormat } from "./sniff-DjpnUZRp.cjs";
|
|
16
16
|
import { a as Footnote, i as DocxDocumentSchema, n as CommentSchema, o as FootnoteSchema, r as DocxDocument, s as readDocx, t as Comment } from "./read-D_CpruL_.cjs";
|
|
17
17
|
import { a as NumberingLevelSchema, i as NumberingLevel, n as NumberingDefinitionSchema, o as readNumberingDefinitions, r as NumberingDefinitions, t as NumberingDefinition } from "./numbering-C53LT-Jx.cjs";
|
|
18
|
-
import { n as PptxDocumentSchema, r as readPptx, t as PptxDocument } from "./read-
|
|
18
|
+
import { n as PptxDocumentSchema, r as readPptx, t as PptxDocument } from "./read-OBV7MMlF.cjs";
|
|
19
19
|
import { a as XlsxSheet, c as XlsxWorkbookSchema, i as XlsxCellSchema, l as readXlsx, n as DefinedNameSchema, o as XlsxSheetSchema, r as XlsxCell, s as XlsxWorkbook, t as DefinedName } from "./xlsx-B97t4YE-.cjs";
|
|
20
20
|
import { t as readXlsxContent } from "./content-UlQ-Nhgi.cjs";
|
|
21
21
|
import { t as buildXlsxPackage } from "./build-CBL9scQK.cjs";
|
|
22
|
-
import { $ as ContentSlide, A as ContentParagraphSchema, B as ContentSheetColumn, C as ContentImageBlock, D as ContentPageBreak, E as ContentListMembershipSchema, F as ContentShape, G as ContentSheetPrintRangeSchema, H as ContentSheetImage, I as ContentShapeSchema, J as ContentSheetRepeatRange, K as ContentSheetPrintSettings, L as ContentSheet, M as ContentRunSchema, N as ContentSection, O as ContentPageBreakSchema, P as ContentSectionSchema, Q as ContentSheetSchema, R as ContentSheetCell, S as ContentDocumentSchema, T as ContentListMembership, U as ContentSheetImageSchema, V as ContentSheetColumnSchema, W as ContentSheetPrintRange, X as ContentSheetRow, Y as ContentSheetRepeatRangeSchema, Z as ContentSheetRowSchema, _ as ContentCellBorders, _t as colorToRgbHex, a as Alignment, at as ContentTableCellSchema, b as ContentCellValueSchema, c as BoxSchema, ct as ContentTableSchema, d as Color, dt as PAGE_SIZE_A4, et as ContentSlideSchema, f as ColorSchema, ft as PAGE_SIZE_LETTER, g as ContentBorderSchema, gt as SLIDE_SIZE_WIDESCREEN, h as ContentBorder, ht as SLIDE_SIZE_STANDARD, i as xmlCodec, it as ContentTableCell, j as ContentRun, k as ContentParagraph, l as COLOR_BLACK, lt as Margins, m as ContentBlockSchema, mt as PageSizeSchema, n as encodePackage, nt as ContentStrokeStyleSchema, o as AlignmentSchema, ot as ContentTableRow, p as ContentBlock, pt as PageSize, q as ContentSheetPrintSettingsSchema, r as packageCodec, rt as ContentTable, s as Box, st as ContentTableRowSchema, t as decodePackage, tt as ContentStrokeStyle, u as CONTENT_FORMAT_VERSION, ut as MarginsSchema, v as ContentCellBordersSchema, vt as isContentBlock, w as ContentImageBlockSchema, x as ContentDocument, y as ContentCellValue, yt as rgbHexToColor, z as ContentSheetCellSchema } from "./codec-
|
|
22
|
+
import { $ as ContentSlide, A as ContentParagraphSchema, B as ContentSheetColumn, C as ContentImageBlock, D as ContentPageBreak, E as ContentListMembershipSchema, F as ContentShape, G as ContentSheetPrintRangeSchema, H as ContentSheetImage, I as ContentShapeSchema, J as ContentSheetRepeatRange, K as ContentSheetPrintSettings, L as ContentSheet, M as ContentRunSchema, N as ContentSection, O as ContentPageBreakSchema, P as ContentSectionSchema, Q as ContentSheetSchema, R as ContentSheetCell, S as ContentDocumentSchema, T as ContentListMembership, U as ContentSheetImageSchema, V as ContentSheetColumnSchema, W as ContentSheetPrintRange, X as ContentSheetRow, Y as ContentSheetRepeatRangeSchema, Z as ContentSheetRowSchema, _ as ContentCellBorders, _t as colorToRgbHex, a as Alignment, at as ContentTableCellSchema, b as ContentCellValueSchema, c as BoxSchema, ct as ContentTableSchema, d as Color, dt as PAGE_SIZE_A4, et as ContentSlideSchema, f as ColorSchema, ft as PAGE_SIZE_LETTER, g as ContentBorderSchema, gt as SLIDE_SIZE_WIDESCREEN, h as ContentBorder, ht as SLIDE_SIZE_STANDARD, i as xmlCodec, it as ContentTableCell, j as ContentRun, k as ContentParagraph, l as COLOR_BLACK, lt as Margins, m as ContentBlockSchema, mt as PageSizeSchema, n as encodePackage, nt as ContentStrokeStyleSchema, o as AlignmentSchema, ot as ContentTableRow, p as ContentBlock, pt as PageSize, q as ContentSheetPrintSettingsSchema, r as packageCodec, rt as ContentTable, s as Box, st as ContentTableRowSchema, t as decodePackage, tt as ContentStrokeStyle, u as CONTENT_FORMAT_VERSION, ut as MarginsSchema, v as ContentCellBordersSchema, vt as isContentBlock, w as ContentImageBlockSchema, x as ContentDocument, y as ContentCellValue, yt as rgbHexToColor, z as ContentSheetCellSchema } from "./codec-BK9uVOS_.cjs";
|
|
23
23
|
export { type Alignment, AlignmentSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, BoxSchema, COLOR_BLACK, CONTENT_FORMAT_VERSION, type Color, ColorSchema, type ColorTransform, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ContentBlock, ContentBlockSchema, type ContentBorder, ContentBorderSchema, type ContentCellBorders, ContentCellBordersSchema, type ContentCellValue, ContentCellValueSchema, 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 DocumentMetadata, DocumentMetadataSchema, type DocxDocument, DocxDocumentSchema, type Footnote, FootnoteSchema, type ImageFormat, 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 Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, 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, attr, base64ToBytes, buildXlsxPackage, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, el, elementsWithTag, encodeCompactPackage, encodePackage, encodeXmlText, fromCompact, isCompactXmlNode, isContentBlock, isXmlNode, packageCodec, parsePackage, parseXml, readDocx, readNumberingDefinitions, readPptx, readXlsx, readXlsxContent, resolveRelationships, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, txt, unzipPackage, walk, xmlCodec, zipPackage };
|
package/dist/index.d.ts
CHANGED
|
@@ -15,9 +15,9 @@ import { n as DocumentMetadataSchema, t as DocumentMetadata } from "./metadata-o
|
|
|
15
15
|
import { n as sniffImageFormat, t as ImageFormat } from "./sniff-DjpnUZRp.js";
|
|
16
16
|
import { a as Footnote, i as DocxDocumentSchema, n as CommentSchema, o as FootnoteSchema, r as DocxDocument, s as readDocx, t as Comment } from "./read-B2-FFhqI.js";
|
|
17
17
|
import { a as NumberingLevelSchema, i as NumberingLevel, n as NumberingDefinitionSchema, o as readNumberingDefinitions, r as NumberingDefinitions, t as NumberingDefinition } from "./numbering-D0YfuiOO.js";
|
|
18
|
-
import { n as PptxDocumentSchema, r as readPptx, t as PptxDocument } from "./read-
|
|
18
|
+
import { n as PptxDocumentSchema, r as readPptx, t as PptxDocument } from "./read-CeCtSzjQ.js";
|
|
19
19
|
import { a as XlsxSheet, c as XlsxWorkbookSchema, i as XlsxCellSchema, l as readXlsx, n as DefinedNameSchema, o as XlsxSheetSchema, r as XlsxCell, s as XlsxWorkbook, t as DefinedName } from "./xlsx-BxKODiLX.js";
|
|
20
20
|
import { t as readXlsxContent } from "./content-t6ZfmfQM.js";
|
|
21
21
|
import { t as buildXlsxPackage } from "./build-C0gS5QeG.js";
|
|
22
|
-
import { $ as ContentSlide, A as ContentParagraphSchema, B as ContentSheetColumn, C as ContentImageBlock, D as ContentPageBreak, E as ContentListMembershipSchema, F as ContentShape, G as ContentSheetPrintRangeSchema, H as ContentSheetImage, I as ContentShapeSchema, J as ContentSheetRepeatRange, K as ContentSheetPrintSettings, L as ContentSheet, M as ContentRunSchema, N as ContentSection, O as ContentPageBreakSchema, P as ContentSectionSchema, Q as ContentSheetSchema, R as ContentSheetCell, S as ContentDocumentSchema, T as ContentListMembership, U as ContentSheetImageSchema, V as ContentSheetColumnSchema, W as ContentSheetPrintRange, X as ContentSheetRow, Y as ContentSheetRepeatRangeSchema, Z as ContentSheetRowSchema, _ as ContentCellBorders, _t as colorToRgbHex, a as Alignment, at as ContentTableCellSchema, b as ContentCellValueSchema, c as BoxSchema, ct as ContentTableSchema, d as Color, dt as PAGE_SIZE_A4, et as ContentSlideSchema, f as ColorSchema, ft as PAGE_SIZE_LETTER, g as ContentBorderSchema, gt as SLIDE_SIZE_WIDESCREEN, h as ContentBorder, ht as SLIDE_SIZE_STANDARD, i as xmlCodec, it as ContentTableCell, j as ContentRun, k as ContentParagraph, l as COLOR_BLACK, lt as Margins, m as ContentBlockSchema, mt as PageSizeSchema, n as encodePackage, nt as ContentStrokeStyleSchema, o as AlignmentSchema, ot as ContentTableRow, p as ContentBlock, pt as PageSize, q as ContentSheetPrintSettingsSchema, r as packageCodec, rt as ContentTable, s as Box, st as ContentTableRowSchema, t as decodePackage, tt as ContentStrokeStyle, u as CONTENT_FORMAT_VERSION, ut as MarginsSchema, v as ContentCellBordersSchema, vt as isContentBlock, w as ContentImageBlockSchema, x as ContentDocument, y as ContentCellValue, yt as rgbHexToColor, z as ContentSheetCellSchema } from "./codec-
|
|
22
|
+
import { $ as ContentSlide, A as ContentParagraphSchema, B as ContentSheetColumn, C as ContentImageBlock, D as ContentPageBreak, E as ContentListMembershipSchema, F as ContentShape, G as ContentSheetPrintRangeSchema, H as ContentSheetImage, I as ContentShapeSchema, J as ContentSheetRepeatRange, K as ContentSheetPrintSettings, L as ContentSheet, M as ContentRunSchema, N as ContentSection, O as ContentPageBreakSchema, P as ContentSectionSchema, Q as ContentSheetSchema, R as ContentSheetCell, S as ContentDocumentSchema, T as ContentListMembership, U as ContentSheetImageSchema, V as ContentSheetColumnSchema, W as ContentSheetPrintRange, X as ContentSheetRow, Y as ContentSheetRepeatRangeSchema, Z as ContentSheetRowSchema, _ as ContentCellBorders, _t as colorToRgbHex, a as Alignment, at as ContentTableCellSchema, b as ContentCellValueSchema, c as BoxSchema, ct as ContentTableSchema, d as Color, dt as PAGE_SIZE_A4, et as ContentSlideSchema, f as ColorSchema, ft as PAGE_SIZE_LETTER, g as ContentBorderSchema, gt as SLIDE_SIZE_WIDESCREEN, h as ContentBorder, ht as SLIDE_SIZE_STANDARD, i as xmlCodec, it as ContentTableCell, j as ContentRun, k as ContentParagraph, l as COLOR_BLACK, lt as Margins, m as ContentBlockSchema, mt as PageSizeSchema, n as encodePackage, nt as ContentStrokeStyleSchema, o as AlignmentSchema, ot as ContentTableRow, p as ContentBlock, pt as PageSize, q as ContentSheetPrintSettingsSchema, r as packageCodec, rt as ContentTable, s as Box, st as ContentTableRowSchema, t as decodePackage, tt as ContentStrokeStyle, u as CONTENT_FORMAT_VERSION, ut as MarginsSchema, v as ContentCellBordersSchema, vt as isContentBlock, w as ContentImageBlockSchema, x as ContentDocument, y as ContentCellValue, yt as rgbHexToColor, z as ContentSheetCellSchema } from "./codec-BrcAFCYO.js";
|
|
23
23
|
export { type Alignment, AlignmentSchema, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, BoxSchema, COLOR_BLACK, CONTENT_FORMAT_VERSION, type Color, ColorSchema, type ColorTransform, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ContentBlock, ContentBlockSchema, type ContentBorder, ContentBorderSchema, type ContentCellBorders, ContentCellBordersSchema, type ContentCellValue, ContentCellValueSchema, 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 DocumentMetadata, DocumentMetadataSchema, type DocxDocument, DocxDocumentSchema, type Footnote, FootnoteSchema, type ImageFormat, 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 Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, 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, attr, base64ToBytes, buildXlsxPackage, buildXml, bytesToBase64, childrenWithTag, colorToRgbHex, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, el, elementsWithTag, encodeCompactPackage, encodePackage, encodeXmlText, fromCompact, isCompactXmlNode, isContentBlock, isXmlNode, packageCodec, parsePackage, parseXml, readDocx, readNumberingDefinitions, readPptx, readXlsx, readXlsxContent, resolveRelationships, rgbHexToColor, rootElement, serializePackage, sniffImageFormat, textContent, toCompact, txt, unzipPackage, walk, xmlCodec, zipPackage };
|
|
@@ -34,6 +34,13 @@ declare const PptxDocumentSchema: z.ZodObject<{
|
|
|
34
34
|
lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
|
|
35
35
|
paintOrder: z.ZodOptional<z.ZodNumber>;
|
|
36
36
|
sourcePath: z.ZodOptional<z.ZodString>;
|
|
37
|
+
frames: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
38
|
+
pageIndex: z.ZodNumber;
|
|
39
|
+
xPt: z.ZodNumber;
|
|
40
|
+
yPt: z.ZodNumber;
|
|
41
|
+
widthPt: z.ZodNumber;
|
|
42
|
+
heightPt: z.ZodNumber;
|
|
43
|
+
}, z.core.$strip>>>;
|
|
37
44
|
blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
|
|
38
45
|
}, z.core.$strip>>;
|
|
39
46
|
notes: z.ZodString;
|
|
@@ -34,6 +34,13 @@ declare const PptxDocumentSchema: z.ZodObject<{
|
|
|
34
34
|
lineSpacingReduction: z.ZodOptional<z.ZodNumber>;
|
|
35
35
|
paintOrder: z.ZodOptional<z.ZodNumber>;
|
|
36
36
|
sourcePath: z.ZodOptional<z.ZodString>;
|
|
37
|
+
frames: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
38
|
+
pageIndex: z.ZodNumber;
|
|
39
|
+
xPt: z.ZodNumber;
|
|
40
|
+
yPt: z.ZodNumber;
|
|
41
|
+
widthPt: z.ZodNumber;
|
|
42
|
+
heightPt: z.ZodNumber;
|
|
43
|
+
}, z.core.$strip>>>;
|
|
37
44
|
blocks: z.ZodArray<z.ZodCustom<ContentBlock, ContentBlock>>;
|
|
38
45
|
}, z.core.$strip>>;
|
|
39
46
|
notes: z.ZodString;
|
package/dist/typed/docx/read.cjs
CHANGED
|
@@ -194,6 +194,7 @@ function readParagraph(paragraph, context, rels) {
|
|
|
194
194
|
kind: "paragraph",
|
|
195
195
|
runs: readParagraphRuns(paragraph, context, rels),
|
|
196
196
|
styleId: pStyleEl === void 0 ? void 0 : require_typed_util.attr(pStyleEl, "w:val"),
|
|
197
|
+
headingLevel: props.outlineLvl === void 0 ? void 0 : (0, document_schema_js.clampHeadingLevel)(props.outlineLvl + 1),
|
|
197
198
|
alignment: props.alignment,
|
|
198
199
|
list: readListMembership(pPr),
|
|
199
200
|
spacingBeforePt: props.spacingBeforePt,
|
package/dist/typed/docx/read.js
CHANGED
|
@@ -8,7 +8,7 @@ import { assignSourcePaths } from "../shared/source-path.js";
|
|
|
8
8
|
import { resolveParagraphProperties, resolveRunProperties } from "./styles.js";
|
|
9
9
|
import { NumberingDefinitionSchema, readNumberingDefinitions } from "./numbering.js";
|
|
10
10
|
import { z } from "zod";
|
|
11
|
-
import { COLOR_BLACK, ContentSectionSchema, PAGE_SIZE_LETTER, rgbHexToColor } from "document-schema.js";
|
|
11
|
+
import { COLOR_BLACK, ContentSectionSchema, PAGE_SIZE_LETTER, clampHeadingLevel, rgbHexToColor } from "document-schema.js";
|
|
12
12
|
//#region src/typed/docx/read.ts
|
|
13
13
|
const CommentSchema = z.object({
|
|
14
14
|
author: z.string().optional(),
|
|
@@ -193,6 +193,7 @@ function readParagraph(paragraph, context, rels) {
|
|
|
193
193
|
kind: "paragraph",
|
|
194
194
|
runs: readParagraphRuns(paragraph, context, rels),
|
|
195
195
|
styleId: pStyleEl === void 0 ? void 0 : attr(pStyleEl, "w:val"),
|
|
196
|
+
headingLevel: props.outlineLvl === void 0 ? void 0 : clampHeadingLevel(props.outlineLvl + 1),
|
|
196
197
|
alignment: props.alignment,
|
|
197
198
|
list: readListMembership(pPr),
|
|
198
199
|
spacingBeforePt: props.spacingBeforePt,
|
|
@@ -10,7 +10,8 @@ function mergeParagraphLayer(base, layer) {
|
|
|
10
10
|
spacingAfterPt: layer.spacingAfterPt ?? base.spacingAfterPt,
|
|
11
11
|
lineSpacing: layer.lineSpacing ?? base.lineSpacing,
|
|
12
12
|
indentLeftPt: layer.indentLeftPt ?? base.indentLeftPt,
|
|
13
|
-
indentFirstLinePt: layer.indentFirstLinePt ?? base.indentFirstLinePt
|
|
13
|
+
indentFirstLinePt: layer.indentFirstLinePt ?? base.indentFirstLinePt,
|
|
14
|
+
outlineLvl: layer.outlineLvl ?? base.outlineLvl
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
17
|
function mergeRunLayer(base, layer) {
|
|
@@ -103,13 +104,16 @@ function readParagraphPropertiesLayer(pPr) {
|
|
|
103
104
|
const left = ind === void 0 ? void 0 : require_typed_util.attr(ind, "w:left") ?? require_typed_util.attr(ind, "w:start");
|
|
104
105
|
const firstLine = ind === void 0 ? void 0 : require_typed_util.attr(ind, "w:firstLine");
|
|
105
106
|
const hanging = ind === void 0 ? void 0 : require_typed_util.attr(ind, "w:hanging");
|
|
107
|
+
const outlineLvl = require_typed_util.childrenWithTag(pPr, "w:outlineLvl")[0];
|
|
108
|
+
const outlineLvlVal = outlineLvl === void 0 ? void 0 : require_typed_util.attr(outlineLvl, "w:val");
|
|
106
109
|
return {
|
|
107
110
|
alignment: readAlignment(require_typed_util.childrenWithTag(pPr, "w:jc")[0]),
|
|
108
111
|
spacingBeforePt: before === void 0 ? void 0 : require_typed_shared_units.twipsToPt(Number(before)),
|
|
109
112
|
spacingAfterPt: after === void 0 ? void 0 : require_typed_shared_units.twipsToPt(Number(after)),
|
|
110
113
|
lineSpacing: line === void 0 || lineRule === "exact" || lineRule === "atLeast" ? void 0 : require_typed_shared_units.lineUnitsToMultiplier(Number(line)),
|
|
111
114
|
indentLeftPt: left === void 0 ? void 0 : require_typed_shared_units.twipsToPt(Number(left)),
|
|
112
|
-
indentFirstLinePt: firstLine !== void 0 ? require_typed_shared_units.twipsToPt(Number(firstLine)) : hanging !== void 0 ? -require_typed_shared_units.twipsToPt(Number(hanging)) : void 0
|
|
115
|
+
indentFirstLinePt: firstLine !== void 0 ? require_typed_shared_units.twipsToPt(Number(firstLine)) : hanging !== void 0 ? -require_typed_shared_units.twipsToPt(Number(hanging)) : void 0,
|
|
116
|
+
outlineLvl: outlineLvlVal === void 0 ? void 0 : Number(outlineLvlVal)
|
|
113
117
|
};
|
|
114
118
|
}
|
|
115
119
|
function findStyle(stylesRoot, styleId, type) {
|
|
@@ -9,7 +9,8 @@ function mergeParagraphLayer(base, layer) {
|
|
|
9
9
|
spacingAfterPt: layer.spacingAfterPt ?? base.spacingAfterPt,
|
|
10
10
|
lineSpacing: layer.lineSpacing ?? base.lineSpacing,
|
|
11
11
|
indentLeftPt: layer.indentLeftPt ?? base.indentLeftPt,
|
|
12
|
-
indentFirstLinePt: layer.indentFirstLinePt ?? base.indentFirstLinePt
|
|
12
|
+
indentFirstLinePt: layer.indentFirstLinePt ?? base.indentFirstLinePt,
|
|
13
|
+
outlineLvl: layer.outlineLvl ?? base.outlineLvl
|
|
13
14
|
};
|
|
14
15
|
}
|
|
15
16
|
function mergeRunLayer(base, layer) {
|
|
@@ -102,13 +103,16 @@ function readParagraphPropertiesLayer(pPr) {
|
|
|
102
103
|
const left = ind === void 0 ? void 0 : attr(ind, "w:left") ?? attr(ind, "w:start");
|
|
103
104
|
const firstLine = ind === void 0 ? void 0 : attr(ind, "w:firstLine");
|
|
104
105
|
const hanging = ind === void 0 ? void 0 : attr(ind, "w:hanging");
|
|
106
|
+
const outlineLvl = childrenWithTag(pPr, "w:outlineLvl")[0];
|
|
107
|
+
const outlineLvlVal = outlineLvl === void 0 ? void 0 : attr(outlineLvl, "w:val");
|
|
105
108
|
return {
|
|
106
109
|
alignment: readAlignment(childrenWithTag(pPr, "w:jc")[0]),
|
|
107
110
|
spacingBeforePt: before === void 0 ? void 0 : twipsToPt(Number(before)),
|
|
108
111
|
spacingAfterPt: after === void 0 ? void 0 : twipsToPt(Number(after)),
|
|
109
112
|
lineSpacing: line === void 0 || lineRule === "exact" || lineRule === "atLeast" ? void 0 : lineUnitsToMultiplier(Number(line)),
|
|
110
113
|
indentLeftPt: left === void 0 ? void 0 : twipsToPt(Number(left)),
|
|
111
|
-
indentFirstLinePt: firstLine !== void 0 ? twipsToPt(Number(firstLine)) : hanging !== void 0 ? -twipsToPt(Number(hanging)) : void 0
|
|
114
|
+
indentFirstLinePt: firstLine !== void 0 ? twipsToPt(Number(firstLine)) : hanging !== void 0 ? -twipsToPt(Number(hanging)) : void 0,
|
|
115
|
+
outlineLvl: outlineLvlVal === void 0 ? void 0 : Number(outlineLvlVal)
|
|
112
116
|
};
|
|
113
117
|
}
|
|
114
118
|
function findStyle(stylesRoot, styleId, type) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as PptxDocumentSchema, r as readPptx, t as PptxDocument } from "../../read-
|
|
1
|
+
import { n as PptxDocumentSchema, r as readPptx, t as PptxDocument } from "../../read-OBV7MMlF.cjs";
|
|
2
2
|
export { PptxDocument, PptxDocumentSchema, readPptx };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as PptxDocumentSchema, r as readPptx, t as PptxDocument } from "../../read-
|
|
1
|
+
import { n as PptxDocumentSchema, r as readPptx, t as PptxDocument } from "../../read-CeCtSzjQ.js";
|
|
2
2
|
export { PptxDocument, PptxDocumentSchema, readPptx };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ooxml.js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"description": "Type-safe, lossless round-trip conversion between OOXML packages (docx, pptx, xlsx) and JSON, built on Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"license": "MIT",
|
|
79
79
|
"packageManager": "pnpm@11.6.0",
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"document-schema.js": "^
|
|
81
|
+
"document-schema.js": "^3.0.0",
|
|
82
82
|
"fast-xml-parser": "^5.10.1",
|
|
83
83
|
"fflate": "^0.8.3",
|
|
84
84
|
"zod": "^4.4.3"
|