ooxml-core 0.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/LICENSE +202 -0
- package/NOTICE +3 -0
- package/README.md +125 -0
- package/THIRD-PARTY-LICENSES +26 -0
- package/dist/collab/assets.d.ts +42 -0
- package/dist/collab/assets.d.ts.map +1 -0
- package/dist/collab/awareness.d.ts +65 -0
- package/dist/collab/awareness.d.ts.map +1 -0
- package/dist/collab/binding.d.ts +36 -0
- package/dist/collab/binding.d.ts.map +1 -0
- package/dist/collab/codec.d.ts +37 -0
- package/dist/collab/codec.d.ts.map +1 -0
- package/dist/collab/emitter.d.ts +11 -0
- package/dist/collab/emitter.d.ts.map +1 -0
- package/dist/collab/external-provider.d.ts +50 -0
- package/dist/collab/external-provider.d.ts.map +1 -0
- package/dist/collab/identity.d.ts +48 -0
- package/dist/collab/identity.d.ts.map +1 -0
- package/dist/collab/index.cjs +1328 -0
- package/dist/collab/index.d.ts +18 -0
- package/dist/collab/index.d.ts.map +1 -0
- package/dist/collab/index.mjs +1225 -0
- package/dist/collab/lifecycle.d.ts +62 -0
- package/dist/collab/lifecycle.d.ts.map +1 -0
- package/dist/collab/memory-transport.d.ts +19 -0
- package/dist/collab/memory-transport.d.ts.map +1 -0
- package/dist/collab/ordering.d.ts +53 -0
- package/dist/collab/ordering.d.ts.map +1 -0
- package/dist/collab/policy.d.ts +39 -0
- package/dist/collab/policy.d.ts.map +1 -0
- package/dist/collab/presence.d.ts +61 -0
- package/dist/collab/presence.d.ts.map +1 -0
- package/dist/collab/provider.d.ts +55 -0
- package/dist/collab/provider.d.ts.map +1 -0
- package/dist/collab/session.d.ts +70 -0
- package/dist/collab/session.d.ts.map +1 -0
- package/dist/collab/transport-provider.d.ts +13 -0
- package/dist/collab/transport-provider.d.ts.map +1 -0
- package/dist/collab/validation.d.ts +38 -0
- package/dist/collab/validation.d.ts.map +1 -0
- package/dist/collab/websocket-transport.d.ts +33 -0
- package/dist/collab/websocket-transport.d.ts.map +1 -0
- package/dist/color/color-linear.d.ts +5 -0
- package/dist/color/color-linear.d.ts.map +1 -0
- package/dist/color/color-primitives.d.ts +183 -0
- package/dist/color/color-primitives.d.ts.map +1 -0
- package/dist/color/index.cjs +177 -0
- package/dist/color/index.d.ts +3 -0
- package/dist/color/index.d.ts.map +1 -0
- package/dist/color/index.mjs +161 -0
- package/dist/diagram/attributes.d.ts +12 -0
- package/dist/diagram/attributes.d.ts.map +1 -0
- package/dist/diagram/data-model.d.ts +18 -0
- package/dist/diagram/data-model.d.ts.map +1 -0
- package/dist/diagram/definitions.d.ts +14 -0
- package/dist/diagram/definitions.d.ts.map +1 -0
- package/dist/diagram/dom.d.ts +15 -0
- package/dist/diagram/dom.d.ts.map +1 -0
- package/dist/diagram/drawing-color.d.ts +28 -0
- package/dist/diagram/drawing-color.d.ts.map +1 -0
- package/dist/diagram/drawing-fill.d.ts +9 -0
- package/dist/diagram/drawing-fill.d.ts.map +1 -0
- package/dist/diagram/drawing-geometry.d.ts +23 -0
- package/dist/diagram/drawing-geometry.d.ts.map +1 -0
- package/dist/diagram/drawing-text.d.ts +5 -0
- package/dist/diagram/drawing-text.d.ts.map +1 -0
- package/dist/diagram/drawing.d.ts +7 -0
- package/dist/diagram/drawing.d.ts.map +1 -0
- package/dist/diagram/index.cjs +1193 -0
- package/dist/diagram/index.d.ts +14 -0
- package/dist/diagram/index.d.ts.map +1 -0
- package/dist/diagram/index.mjs +1161 -0
- package/dist/diagram/layout-category.d.ts +8 -0
- package/dist/diagram/layout-category.d.ts.map +1 -0
- package/dist/diagram/load.d.ts +36 -0
- package/dist/diagram/load.d.ts.map +1 -0
- package/dist/diagram/relationships.d.ts +35 -0
- package/dist/diagram/relationships.d.ts.map +1 -0
- package/dist/diagram/types.d.ts +306 -0
- package/dist/diagram/types.d.ts.map +1 -0
- package/dist/docx/block-parser.d.ts +13 -0
- package/dist/docx/block-parser.d.ts.map +1 -0
- package/dist/docx/bookmarks.d.ts +18 -0
- package/dist/docx/bookmarks.d.ts.map +1 -0
- package/dist/docx/breaks.d.ts +11 -0
- package/dist/docx/breaks.d.ts.map +1 -0
- package/dist/docx/character-styles.d.ts +4 -0
- package/dist/docx/character-styles.d.ts.map +1 -0
- package/dist/docx/comment-spans.d.ts +19 -0
- package/dist/docx/comment-spans.d.ts.map +1 -0
- package/dist/docx/comments.d.ts +4 -0
- package/dist/docx/comments.d.ts.map +1 -0
- package/dist/docx/core-properties.d.ts +18 -0
- package/dist/docx/core-properties.d.ts.map +1 -0
- package/dist/docx/default-styles.d.ts +8 -0
- package/dist/docx/default-styles.d.ts.map +1 -0
- package/dist/docx/defined-props.d.ts +9 -0
- package/dist/docx/defined-props.d.ts.map +1 -0
- package/dist/docx/diagram-document.d.ts +9 -0
- package/dist/docx/diagram-document.d.ts.map +1 -0
- package/dist/docx/diagram-theme.d.ts +8 -0
- package/dist/docx/diagram-theme.d.ts.map +1 -0
- package/dist/docx/diagram.d.ts +89 -0
- package/dist/docx/diagram.d.ts.map +1 -0
- package/dist/docx/docpr-ids.d.ts +14 -0
- package/dist/docx/docpr-ids.d.ts.map +1 -0
- package/dist/docx/document-parts.d.ts +18 -0
- package/dist/docx/document-parts.d.ts.map +1 -0
- package/dist/docx/drawing.d.ts +13 -0
- package/dist/docx/drawing.d.ts.map +1 -0
- package/dist/docx/element-order.d.ts +13 -0
- package/dist/docx/element-order.d.ts.map +1 -0
- package/dist/docx/embedded.cjs +7646 -0
- package/dist/docx/embedded.d.ts +5 -0
- package/dist/docx/embedded.d.ts.map +1 -0
- package/dist/docx/embedded.mjs +7639 -0
- package/dist/docx/expect-defined.d.ts +3 -0
- package/dist/docx/expect-defined.d.ts.map +1 -0
- package/dist/docx/field-date.d.ts +10 -0
- package/dist/docx/field-date.d.ts.map +1 -0
- package/dist/docx/field-runs.d.ts +10 -0
- package/dist/docx/field-runs.d.ts.map +1 -0
- package/dist/docx/generated/wml-simple-types.d.ts +298 -0
- package/dist/docx/generated/wml-simple-types.d.ts.map +1 -0
- package/dist/docx/heading-list-kinds.d.ts +10 -0
- package/dist/docx/heading-list-kinds.d.ts.map +1 -0
- package/dist/docx/highlight.d.ts +5 -0
- package/dist/docx/highlight.d.ts.map +1 -0
- package/dist/docx/hyperlink.d.ts +8 -0
- package/dist/docx/hyperlink.d.ts.map +1 -0
- package/dist/docx/index.cjs +9784 -0
- package/dist/docx/index.d.ts +40 -0
- package/dist/docx/index.d.ts.map +1 -0
- package/dist/docx/index.mjs +9456 -0
- package/dist/docx/inline-model.d.ts +68 -0
- package/dist/docx/inline-model.d.ts.map +1 -0
- package/dist/docx/language.d.ts +3 -0
- package/dist/docx/language.d.ts.map +1 -0
- package/dist/docx/layout/adapt-drop-cap.d.ts +10 -0
- package/dist/docx/layout/adapt-drop-cap.d.ts.map +1 -0
- package/dist/docx/layout/adapt-floats.d.ts +8 -0
- package/dist/docx/layout/adapt-floats.d.ts.map +1 -0
- package/dist/docx/layout/adapt-notes.d.ts +13 -0
- package/dist/docx/layout/adapt-notes.d.ts.map +1 -0
- package/dist/docx/layout/adapt-paragraph-box.d.ts +12 -0
- package/dist/docx/layout/adapt-paragraph-box.d.ts.map +1 -0
- package/dist/docx/layout/adapt-table.d.ts +12 -0
- package/dist/docx/layout/adapt-table.d.ts.map +1 -0
- package/dist/docx/layout/adapter.d.ts +5 -0
- package/dist/docx/layout/adapter.d.ts.map +1 -0
- package/dist/docx/layout/floats.d.ts +20 -0
- package/dist/docx/layout/floats.d.ts.map +1 -0
- package/dist/docx/layout/flow-paragraph.d.ts +26 -0
- package/dist/docx/layout/flow-paragraph.d.ts.map +1 -0
- package/dist/docx/layout/flow-table.d.ts +12 -0
- package/dist/docx/layout/flow-table.d.ts.map +1 -0
- package/dist/docx/layout/fonts.d.ts +3 -0
- package/dist/docx/layout/fonts.d.ts.map +1 -0
- package/dist/docx/layout/index.cjs +2537 -0
- package/dist/docx/layout/index.d.ts +20 -0
- package/dist/docx/layout/index.d.ts.map +1 -0
- package/dist/docx/layout/index.mjs +2503 -0
- package/dist/docx/layout/input.d.ts +206 -0
- package/dist/docx/layout/input.d.ts.map +1 -0
- package/dist/docx/layout/keep-rules.d.ts +24 -0
- package/dist/docx/layout/keep-rules.d.ts.map +1 -0
- package/dist/docx/layout/layout.d.ts +9 -0
- package/dist/docx/layout/layout.d.ts.map +1 -0
- package/dist/docx/layout/ligatures.d.ts +4 -0
- package/dist/docx/layout/ligatures.d.ts.map +1 -0
- package/dist/docx/layout/line-metrics.d.ts +21 -0
- package/dist/docx/layout/line-metrics.d.ts.map +1 -0
- package/dist/docx/layout/measure.d.ts +34 -0
- package/dist/docx/layout/measure.d.ts.map +1 -0
- package/dist/docx/layout/page-cursor.d.ts +45 -0
- package/dist/docx/layout/page-cursor.d.ts.map +1 -0
- package/dist/docx/layout/page-flow.d.ts +7 -0
- package/dist/docx/layout/page-flow.d.ts.map +1 -0
- package/dist/docx/layout/paragraph-fragments.d.ts +6 -0
- package/dist/docx/layout/paragraph-fragments.d.ts.map +1 -0
- package/dist/docx/layout/paragraph-layout.d.ts +37 -0
- package/dist/docx/layout/paragraph-layout.d.ts.map +1 -0
- package/dist/docx/layout/paragraph-tokens.d.ts +27 -0
- package/dist/docx/layout/paragraph-tokens.d.ts.map +1 -0
- package/dist/docx/layout/result.d.ts +139 -0
- package/dist/docx/layout/result.d.ts.map +1 -0
- package/dist/docx/layout/tab-stops.d.ts +14 -0
- package/dist/docx/layout/tab-stops.d.ts.map +1 -0
- package/dist/docx/layout/table-layout.d.ts +30 -0
- package/dist/docx/layout/table-layout.d.ts.map +1 -0
- package/dist/docx/layout/test-helpers.d.ts +3 -0
- package/dist/docx/layout/test-helpers.d.ts.map +1 -0
- package/dist/docx/layout/text-breaks.d.ts +56 -0
- package/dist/docx/layout/text-breaks.d.ts.map +1 -0
- package/dist/docx/layout/units.d.ts +17 -0
- package/dist/docx/layout/units.d.ts.map +1 -0
- package/dist/docx/layout/wrap.d.ts +22 -0
- package/dist/docx/layout/wrap.d.ts.map +1 -0
- package/dist/docx/ligatures.d.ts +9 -0
- package/dist/docx/ligatures.d.ts.map +1 -0
- package/dist/docx/load/detect.d.ts +6 -0
- package/dist/docx/load/detect.d.ts.map +1 -0
- package/dist/docx/load/index.cjs +8869 -0
- package/dist/docx/load/index.d.ts +3 -0
- package/dist/docx/load/index.d.ts.map +1 -0
- package/dist/docx/load/index.mjs +8860 -0
- package/dist/docx/load/legacy-doc.d.ts +7 -0
- package/dist/docx/load/legacy-doc.d.ts.map +1 -0
- package/dist/docx/model-paragraph.d.ts +100 -0
- package/dist/docx/model-paragraph.d.ts.map +1 -0
- package/dist/docx/model-run.d.ts +110 -0
- package/dist/docx/model-run.d.ts.map +1 -0
- package/dist/docx/model.d.ts +114 -0
- package/dist/docx/model.d.ts.map +1 -0
- package/dist/docx/notes.d.ts +9 -0
- package/dist/docx/notes.d.ts.map +1 -0
- package/dist/docx/numbering-editing.d.ts +30 -0
- package/dist/docx/numbering-editing.d.ts.map +1 -0
- package/dist/docx/numbering-format.d.ts +17 -0
- package/dist/docx/numbering-format.d.ts.map +1 -0
- package/dist/docx/numbering-model.d.ts +73 -0
- package/dist/docx/numbering-model.d.ts.map +1 -0
- package/dist/docx/numbering-package.d.ts +12 -0
- package/dist/docx/numbering-package.d.ts.map +1 -0
- package/dist/docx/numbering-parse.d.ts +8 -0
- package/dist/docx/numbering-parse.d.ts.map +1 -0
- package/dist/docx/numbering-parts.d.ts +4 -0
- package/dist/docx/numbering-parts.d.ts.map +1 -0
- package/dist/docx/numbering-text.d.ts +20 -0
- package/dist/docx/numbering-text.d.ts.map +1 -0
- package/dist/docx/numbering-write.d.ts +5 -0
- package/dist/docx/numbering-write.d.ts.map +1 -0
- package/dist/docx/package-parts.d.ts +4 -0
- package/dist/docx/package-parts.d.ts.map +1 -0
- package/dist/docx/page-background.d.ts +9 -0
- package/dist/docx/page-background.d.ts.map +1 -0
- package/dist/docx/page-borders.d.ts +9 -0
- package/dist/docx/page-borders.d.ts.map +1 -0
- package/dist/docx/paragraph-alignment.d.ts +21 -0
- package/dist/docx/paragraph-alignment.d.ts.map +1 -0
- package/dist/docx/paragraph-styles.d.ts +15 -0
- package/dist/docx/paragraph-styles.d.ts.map +1 -0
- package/dist/docx/parse-diagnostics.d.ts +10 -0
- package/dist/docx/parse-diagnostics.d.ts.map +1 -0
- package/dist/docx/parse-revisions.d.ts +36 -0
- package/dist/docx/parse-revisions.d.ts.map +1 -0
- package/dist/docx/parse-table.d.ts +5 -0
- package/dist/docx/parse-table.d.ts.map +1 -0
- package/dist/docx/parse-warnings.d.ts +9 -0
- package/dist/docx/parse-warnings.d.ts.map +1 -0
- package/dist/docx/parse.d.ts +13 -0
- package/dist/docx/parse.d.ts.map +1 -0
- package/dist/docx/part-relationships.d.ts +12 -0
- package/dist/docx/part-relationships.d.ts.map +1 -0
- package/dist/docx/relationship-allocator.d.ts +32 -0
- package/dist/docx/relationship-allocator.d.ts.map +1 -0
- package/dist/docx/relationships.d.ts +3 -0
- package/dist/docx/relationships.d.ts.map +1 -0
- package/dist/docx/resolve-table.d.ts +8 -0
- package/dist/docx/resolve-table.d.ts.map +1 -0
- package/dist/docx/revision-commands.d.ts +27 -0
- package/dist/docx/revision-commands.d.ts.map +1 -0
- package/dist/docx/revision-ids.d.ts +10 -0
- package/dist/docx/revision-ids.d.ts.map +1 -0
- package/dist/docx/run-formatting.d.ts +16 -0
- package/dist/docx/run-formatting.d.ts.map +1 -0
- package/dist/docx/run-properties.d.ts +5 -0
- package/dist/docx/run-properties.d.ts.map +1 -0
- package/dist/docx/run-style-model.d.ts +21 -0
- package/dist/docx/run-style-model.d.ts.map +1 -0
- package/dist/docx/save.d.ts +5 -0
- package/dist/docx/save.d.ts.map +1 -0
- package/dist/docx/section-model.d.ts +97 -0
- package/dist/docx/section-model.d.ts.map +1 -0
- package/dist/docx/sections.d.ts +18 -0
- package/dist/docx/sections.d.ts.map +1 -0
- package/dist/docx/settings.d.ts +11 -0
- package/dist/docx/settings.d.ts.map +1 -0
- package/dist/docx/simple-types.d.ts +37 -0
- package/dist/docx/simple-types.d.ts.map +1 -0
- package/dist/docx/style-numbering-package.d.ts +11 -0
- package/dist/docx/style-numbering-package.d.ts.map +1 -0
- package/dist/docx/tab-stops.d.ts +8 -0
- package/dist/docx/tab-stops.d.ts.map +1 -0
- package/dist/docx/table-borders.d.ts +15 -0
- package/dist/docx/table-borders.d.ts.map +1 -0
- package/dist/docx/table-cell-write.d.ts +12 -0
- package/dist/docx/table-cell-write.d.ts.map +1 -0
- package/dist/docx/table-defaults.d.ts +20 -0
- package/dist/docx/table-defaults.d.ts.map +1 -0
- package/dist/docx/table-model.d.ts +101 -0
- package/dist/docx/table-model.d.ts.map +1 -0
- package/dist/docx/table-of-contents.d.ts +67 -0
- package/dist/docx/table-of-contents.d.ts.map +1 -0
- package/dist/docx/table-of-figures.d.ts +10 -0
- package/dist/docx/table-of-figures.d.ts.map +1 -0
- package/dist/docx/table-styles.d.ts +4 -0
- package/dist/docx/table-styles.d.ts.map +1 -0
- package/dist/docx/table-visuals.d.ts +22 -0
- package/dist/docx/table-visuals.d.ts.map +1 -0
- package/dist/docx/test-support/access.d.ts +14 -0
- package/dist/docx/test-support/access.d.ts.map +1 -0
- package/dist/docx/test-support/heading-numbering-fixture.d.ts +5 -0
- package/dist/docx/test-support/heading-numbering-fixture.d.ts.map +1 -0
- package/dist/docx/test-support/restart-fixture.d.ts +17 -0
- package/dist/docx/test-support/restart-fixture.d.ts.map +1 -0
- package/dist/docx/test-support/schema-validation.d.ts +24 -0
- package/dist/docx/test-support/schema-validation.d.ts.map +1 -0
- package/dist/docx/theme-color.d.ts +16 -0
- package/dist/docx/theme-color.d.ts.map +1 -0
- package/dist/docx/theme-model.d.ts +31 -0
- package/dist/docx/theme-model.d.ts.map +1 -0
- package/dist/docx/theme.d.ts +6 -0
- package/dist/docx/theme.d.ts.map +1 -0
- package/dist/docx/underline.d.ts +5 -0
- package/dist/docx/underline.d.ts.map +1 -0
- package/dist/docx/units.d.ts +2 -0
- package/dist/docx/units.d.ts.map +1 -0
- package/dist/docx/validate-issues.d.ts +40 -0
- package/dist/docx/validate-issues.d.ts.map +1 -0
- package/dist/docx/validate-model.d.ts +8 -0
- package/dist/docx/validate-model.d.ts.map +1 -0
- package/dist/docx/validate-paragraph.d.ts +10 -0
- package/dist/docx/validate-paragraph.d.ts.map +1 -0
- package/dist/docx/validate-structure.d.ts +10 -0
- package/dist/docx/validate-structure.d.ts.map +1 -0
- package/dist/docx/watermark.d.ts +14 -0
- package/dist/docx/watermark.d.ts.map +1 -0
- package/dist/docx/write-comments.d.ts +12 -0
- package/dist/docx/write-comments.d.ts.map +1 -0
- package/dist/docx/write-drawing.d.ts +12 -0
- package/dist/docx/write-drawing.d.ts.map +1 -0
- package/dist/docx/write-header-footer.d.ts +21 -0
- package/dist/docx/write-header-footer.d.ts.map +1 -0
- package/dist/docx/write-inline.d.ts +23 -0
- package/dist/docx/write-inline.d.ts.map +1 -0
- package/dist/docx/write-notes.d.ts +5 -0
- package/dist/docx/write-notes.d.ts.map +1 -0
- package/dist/docx/write-paragraph-decoration.d.ts +5 -0
- package/dist/docx/write-paragraph-decoration.d.ts.map +1 -0
- package/dist/docx/write-paragraph-properties.d.ts +4 -0
- package/dist/docx/write-paragraph-properties.d.ts.map +1 -0
- package/dist/docx/write-paragraph.d.ts +8 -0
- package/dist/docx/write-paragraph.d.ts.map +1 -0
- package/dist/docx/write-ranges.d.ts +42 -0
- package/dist/docx/write-ranges.d.ts.map +1 -0
- package/dist/docx/write-revisions.d.ts +10 -0
- package/dist/docx/write-revisions.d.ts.map +1 -0
- package/dist/docx/write-run-extra.d.ts +5 -0
- package/dist/docx/write-run-extra.d.ts.map +1 -0
- package/dist/docx/write-run-validation.d.ts +4 -0
- package/dist/docx/write-run-validation.d.ts.map +1 -0
- package/dist/docx/write-run.d.ts +7 -0
- package/dist/docx/write-run.d.ts.map +1 -0
- package/dist/docx/write-sections.d.ts +10 -0
- package/dist/docx/write-sections.d.ts.map +1 -0
- package/dist/docx/write-table-properties.d.ts +13 -0
- package/dist/docx/write-table-properties.d.ts.map +1 -0
- package/dist/docx/write-table.d.ts +9 -0
- package/dist/docx/write-table.d.ts.map +1 -0
- package/dist/docx/write-text-box.d.ts +15 -0
- package/dist/docx/write-text-box.d.ts.map +1 -0
- package/dist/docx/write.d.ts +25 -0
- package/dist/docx/write.d.ts.map +1 -0
- package/dist/docx/xml.d.ts +14 -0
- package/dist/docx/xml.d.ts.map +1 -0
- package/dist/docx/zip-parts.d.ts +5 -0
- package/dist/docx/zip-parts.d.ts.map +1 -0
- package/dist/geometry/adjustment-aware-shapes.d.ts +63 -0
- package/dist/geometry/adjustment-aware-shapes.d.ts.map +1 -0
- package/dist/geometry/callout-geometry.d.ts +65 -0
- package/dist/geometry/callout-geometry.d.ts.map +1 -0
- package/dist/geometry/cloud-bezier-paths.d.ts +55 -0
- package/dist/geometry/cloud-bezier-paths.d.ts.map +1 -0
- package/dist/geometry/com-avlst-ground-truth.d.ts +48 -0
- package/dist/geometry/com-avlst-ground-truth.d.ts.map +1 -0
- package/dist/geometry/connector-elbow-geometry.d.ts +41 -0
- package/dist/geometry/connector-elbow-geometry.d.ts.map +1 -0
- package/dist/geometry/guide-formula-api.d.ts +55 -0
- package/dist/geometry/guide-formula-api.d.ts.map +1 -0
- package/dist/geometry/guide-formula-eval.d.ts +85 -0
- package/dist/geometry/guide-formula-eval.d.ts.map +1 -0
- package/dist/geometry/index.cjs +15031 -0
- package/dist/geometry/index.d.ts +80 -0
- package/dist/geometry/index.d.ts.map +1 -0
- package/dist/geometry/index.mjs +14897 -0
- package/dist/geometry/indexed.d.ts +6 -0
- package/dist/geometry/indexed.d.ts.map +1 -0
- package/dist/geometry/preset-clip-paths-core.d.ts +20 -0
- package/dist/geometry/preset-clip-paths-core.d.ts.map +1 -0
- package/dist/geometry/preset-clip-paths-extended.d.ts +19 -0
- package/dist/geometry/preset-clip-paths-extended.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-action-buttons.d.ts +14 -0
- package/dist/geometry/preset-connection-sites-action-buttons.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-arrows-curved.d.ts +12 -0
- package/dist/geometry/preset-connection-sites-arrows-curved.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-arrows-misc.d.ts +13 -0
- package/dist/geometry/preset-connection-sites-arrows-misc.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-arrows.d.ts +13 -0
- package/dist/geometry/preset-connection-sites-arrows.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-basic-a.d.ts +12 -0
- package/dist/geometry/preset-connection-sites-basic-a.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-basic-b.d.ts +12 -0
- package/dist/geometry/preset-connection-sites-basic-b.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-braces.d.ts +12 -0
- package/dist/geometry/preset-connection-sites-braces.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-callouts-arrow.d.ts +14 -0
- package/dist/geometry/preset-connection-sites-callouts-arrow.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-callouts-basic.d.ts +12 -0
- package/dist/geometry/preset-connection-sites-callouts-basic.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-circular-arrow.d.ts +14 -0
- package/dist/geometry/preset-connection-sites-circular-arrow.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-flowchart.d.ts +19 -0
- package/dist/geometry/preset-connection-sites-flowchart.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-gear9.d.ts +12 -0
- package/dist/geometry/preset-connection-sites-gear9.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-left-circular-arrow.d.ts +12 -0
- package/dist/geometry/preset-connection-sites-left-circular-arrow.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-left-right-circular-arrow.d.ts +13 -0
- package/dist/geometry/preset-connection-sites-left-right-circular-arrow.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-math.d.ts +12 -0
- package/dist/geometry/preset-connection-sites-math.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-misc.d.ts +14 -0
- package/dist/geometry/preset-connection-sites-misc.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-polygons.d.ts +12 -0
- package/dist/geometry/preset-connection-sites-polygons.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-quads.d.ts +14 -0
- package/dist/geometry/preset-connection-sites-quads.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-rects.d.ts +14 -0
- package/dist/geometry/preset-connection-sites-rects.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-ribbons.d.ts +12 -0
- package/dist/geometry/preset-connection-sites-ribbons.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-stars.d.ts +13 -0
- package/dist/geometry/preset-connection-sites-stars.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-table.d.ts +23 -0
- package/dist/geometry/preset-connection-sites-table.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-tabs.d.ts +11 -0
- package/dist/geometry/preset-connection-sites-tabs.d.ts.map +1 -0
- package/dist/geometry/preset-connection-sites-types.d.ts +52 -0
- package/dist/geometry/preset-connection-sites-types.d.ts.map +1 -0
- package/dist/geometry/preset-geometry-names.d.ts +53 -0
- package/dist/geometry/preset-geometry-names.d.ts.map +1 -0
- package/dist/geometry/preset-shape-clip-paths.d.ts +13 -0
- package/dist/geometry/preset-shape-clip-paths.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-action-buttons.d.ts +45 -0
- package/dist/geometry/preset-shape-definitions-action-buttons.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-arrow-callouts.d.ts +55 -0
- package/dist/geometry/preset-shape-definitions-arrow-callouts.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-arrows-refined.d.ts +45 -0
- package/dist/geometry/preset-shape-definitions-arrows-refined.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-arrows.d.ts +52 -0
- package/dist/geometry/preset-shape-definitions-arrows.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-chart-marks.d.ts +23 -0
- package/dist/geometry/preset-shape-definitions-chart-marks.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-cloud-callout.d.ts +28 -0
- package/dist/geometry/preset-shape-definitions-cloud-callout.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-connectors-brackets.d.ts +37 -0
- package/dist/geometry/preset-shape-definitions-connectors-brackets.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-curved-arrows-connectors.d.ts +43 -0
- package/dist/geometry/preset-shape-definitions-curved-arrows-connectors.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-curved-arrows-exact.d.ts +30 -0
- package/dist/geometry/preset-shape-definitions-curved-arrows-exact.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-flowchart.d.ts +29 -0
- package/dist/geometry/preset-shape-definitions-flowchart.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-gear6.d.ts +38 -0
- package/dist/geometry/preset-shape-definitions-gear6.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-gear9.d.ts +24 -0
- package/dist/geometry/preset-shape-definitions-gear9.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-misc.d.ts +38 -0
- package/dist/geometry/preset-shape-definitions-misc.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-rects-snips.d.ts +28 -0
- package/dist/geometry/preset-shape-definitions-rects-snips.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-scrolls-accent-callouts.d.ts +45 -0
- package/dist/geometry/preset-shape-definitions-scrolls-accent-callouts.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-table.d.ts +121 -0
- package/dist/geometry/preset-shape-definitions-table.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions-tabs-decorations.d.ts +48 -0
- package/dist/geometry/preset-shape-definitions-tabs-decorations.d.ts.map +1 -0
- package/dist/geometry/preset-shape-definitions.d.ts +28 -0
- package/dist/geometry/preset-shape-definitions.d.ts.map +1 -0
- package/dist/geometry/preset-shape-paths.d.ts +13 -0
- package/dist/geometry/preset-shape-paths.d.ts.map +1 -0
- package/dist/geometry/preset-shape-types.d.ts +33 -0
- package/dist/geometry/preset-shape-types.d.ts.map +1 -0
- package/dist/geometry/preset-text-rect-action-buttons.d.ts +13 -0
- package/dist/geometry/preset-text-rect-action-buttons.d.ts.map +1 -0
- package/dist/geometry/preset-text-rect-arrows.d.ts +3 -0
- package/dist/geometry/preset-text-rect-arrows.d.ts.map +1 -0
- package/dist/geometry/preset-text-rect-braces.d.ts +3 -0
- package/dist/geometry/preset-text-rect-braces.d.ts.map +1 -0
- package/dist/geometry/preset-text-rect-callouts.d.ts +3 -0
- package/dist/geometry/preset-text-rect-callouts.d.ts.map +1 -0
- package/dist/geometry/preset-text-rect-circular-arrows.d.ts +3 -0
- package/dist/geometry/preset-text-rect-circular-arrows.d.ts.map +1 -0
- package/dist/geometry/preset-text-rect-flowchart.d.ts +3 -0
- package/dist/geometry/preset-text-rect-flowchart.d.ts.map +1 -0
- package/dist/geometry/preset-text-rect-misc-a.d.ts +3 -0
- package/dist/geometry/preset-text-rect-misc-a.d.ts.map +1 -0
- package/dist/geometry/preset-text-rect-misc-b.d.ts +3 -0
- package/dist/geometry/preset-text-rect-misc-b.d.ts.map +1 -0
- package/dist/geometry/preset-text-rect-polygons.d.ts +3 -0
- package/dist/geometry/preset-text-rect-polygons.d.ts.map +1 -0
- package/dist/geometry/preset-text-rect-quads.d.ts +3 -0
- package/dist/geometry/preset-text-rect-quads.d.ts.map +1 -0
- package/dist/geometry/preset-text-rect-ribbons.d.ts +3 -0
- package/dist/geometry/preset-text-rect-ribbons.d.ts.map +1 -0
- package/dist/geometry/preset-text-rect-stars.d.ts +3 -0
- package/dist/geometry/preset-text-rect-stars.d.ts.map +1 -0
- package/dist/geometry/preset-text-rect-table.d.ts +20 -0
- package/dist/geometry/preset-text-rect-table.d.ts.map +1 -0
- package/dist/geometry/preset-text-rect-tabs.d.ts +3 -0
- package/dist/geometry/preset-text-rect-tabs.d.ts.map +1 -0
- package/dist/geometry/preset-text-rect-types.d.ts +46 -0
- package/dist/geometry/preset-text-rect-types.d.ts.map +1 -0
- package/dist/geometry/shape-boolean-clipping.d.ts +70 -0
- package/dist/geometry/shape-boolean-clipping.d.ts.map +1 -0
- package/dist/geometry/shape-boolean-ops.d.ts +142 -0
- package/dist/geometry/shape-boolean-ops.d.ts.map +1 -0
- package/dist/geometry/shape-boolean-svg.d.ts +31 -0
- package/dist/geometry/shape-boolean-svg.d.ts.map +1 -0
- package/dist/geometry/shape-boolean-types.d.ts +91 -0
- package/dist/geometry/shape-boolean-types.d.ts.map +1 -0
- package/dist/geometry/shape-boolean-union.d.ts +79 -0
- package/dist/geometry/shape-boolean-union.d.ts.map +1 -0
- package/dist/geometry/shape-boolean.d.ts +22 -0
- package/dist/geometry/shape-boolean.d.ts.map +1 -0
- package/dist/geometry/shape-definitions-extended.d.ts +18 -0
- package/dist/geometry/shape-definitions-extended.d.ts.map +1 -0
- package/dist/geometry/shape-definitions-primary.d.ts +19 -0
- package/dist/geometry/shape-definitions-primary.d.ts.map +1 -0
- package/dist/index.cjs +16618 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +16611 -0
- package/dist/opc/content-types.d.ts +14 -0
- package/dist/opc/content-types.d.ts.map +1 -0
- package/dist/opc/index.cjs +228 -0
- package/dist/opc/index.d.ts +6 -0
- package/dist/opc/index.d.ts.map +1 -0
- package/dist/opc/index.mjs +212 -0
- package/dist/opc/package.d.ts +14 -0
- package/dist/opc/package.d.ts.map +1 -0
- package/dist/opc/relationship-types.d.ts +34 -0
- package/dist/opc/relationship-types.d.ts.map +1 -0
- package/dist/opc/relationships.d.ts +29 -0
- package/dist/opc/relationships.d.ts.map +1 -0
- package/dist/opc/safe-href.d.ts +3 -0
- package/dist/opc/safe-href.d.ts.map +1 -0
- package/dist/pptx/chunks/index-CojJtI77.d.ts +9627 -0
- package/dist/pptx/chunks/index-CojJtI77.d.ts.map +1 -0
- package/dist/pptx/chunks/signature-inspection-status-Bh2oap7B.d.ts +220 -0
- package/dist/pptx/chunks/signature-inspection-status-Bh2oap7B.d.ts.map +1 -0
- package/dist/pptx/chunks/text-operations-IlJiffp7.d.ts +11122 -0
- package/dist/pptx/chunks/text-operations-IlJiffp7.d.ts.map +1 -0
- package/dist/pptx/cli/index.cjs +138457 -0
- package/dist/pptx/cli/index.d.ts +139 -0
- package/dist/pptx/cli/index.d.ts.map +1 -0
- package/dist/pptx/cli/index.mjs +138424 -0
- package/dist/pptx/converter/index.cjs +32084 -0
- package/dist/pptx/converter/index.d.ts +2 -0
- package/dist/pptx/converter/index.mjs +32060 -0
- package/dist/pptx/index.cjs +172307 -0
- package/dist/pptx/index.d.ts +9692 -0
- package/dist/pptx/index.d.ts.map +1 -0
- package/dist/pptx/index.mjs +171623 -0
- package/dist/pptx/signature-node/index.cjs +1299 -0
- package/dist/pptx/signature-node/index.d.ts +172 -0
- package/dist/pptx/signature-node/index.d.ts.map +1 -0
- package/dist/pptx/signature-node/index.mjs +1236 -0
- package/dist/units/constants.d.ts +13 -0
- package/dist/units/constants.d.ts.map +1 -0
- package/dist/units/index.cjs +76 -0
- package/dist/units/index.d.ts +3 -0
- package/dist/units/index.d.ts.map +1 -0
- package/dist/units/index.mjs +45 -0
- package/dist/units/units.d.ts +52 -0
- package/dist/units/units.d.ts.map +1 -0
- package/dist/xml/index.cjs +98 -0
- package/dist/xml/index.d.ts +3 -0
- package/dist/xml/index.d.ts.map +1 -0
- package/dist/xml/index.mjs +85 -0
- package/dist/xml/namespaces.d.ts +47 -0
- package/dist/xml/namespaces.d.ts.map +1 -0
- package/dist/xml/xml.d.ts +31 -0
- package/dist/xml/xml.d.ts.map +1 -0
- package/package.json +192 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LoadedDocument } from '../model.js';
|
|
2
|
+
export declare class LegacyDocError extends Error {
|
|
3
|
+
constructor(message: string);
|
|
4
|
+
}
|
|
5
|
+
/** Load Word 97-2003 binary .doc. This API preserves source bytes for no-op saves. */
|
|
6
|
+
export declare function loadLegacyDoc(input: Uint8Array | ArrayBuffer): Promise<LoadedDocument>;
|
|
7
|
+
//# sourceMappingURL=legacy-doc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy-doc.d.ts","sourceRoot":"","sources":["../../../src/docx/load/legacy-doc.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,cAAc,EAAa,MAAM,aAAa,CAAC;AAS5E,qBAAa,cAAe,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAI3B;AAoDD,sFAAsF;AACtF,wBAAsB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,CA+D5F"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { StJc, StTabJc, StTabTlc } from './generated/wml-simple-types.js';
|
|
2
|
+
import type { Revision, TextRun } from './model-run.js';
|
|
3
|
+
import type { SignedTwips, Twips } from './units.js';
|
|
4
|
+
/** A paragraph tab stop (`w:tab`): position from the text margin, alignment and leader fill. */
|
|
5
|
+
export interface TabStop {
|
|
6
|
+
posTwips: SignedTwips;
|
|
7
|
+
align: StTabJc;
|
|
8
|
+
leader?: StTabTlc;
|
|
9
|
+
}
|
|
10
|
+
export interface Paragraph {
|
|
11
|
+
type: 'paragraph';
|
|
12
|
+
/** Stable identity across edits, unique throughout the document. */
|
|
13
|
+
id: string;
|
|
14
|
+
runs: TextRun[];
|
|
15
|
+
align?: 'left' | 'center' | 'right' | 'justify';
|
|
16
|
+
/**
|
|
17
|
+
* The exact `w:jc` value read from the file (`start`, `end`, `distribute`, kashida variants...).
|
|
18
|
+
* `align` is derived from it for rendering; it is only authoritative while `align` still equals
|
|
19
|
+
* `alignFromJustification(justification, rtl)`, since editors change `align` alone.
|
|
20
|
+
*/
|
|
21
|
+
justification?: StJc;
|
|
22
|
+
/** Paragraph base direction from direct `w:bidi`; undefined inherits. */
|
|
23
|
+
direction?: 'ltr' | 'rtl';
|
|
24
|
+
style?: string;
|
|
25
|
+
/** Word paragraph spacing and indentation values, kept in their native twip units (1/20 pt). */
|
|
26
|
+
spacingBeforeTwips?: Twips;
|
|
27
|
+
spacingAfterTwips?: Twips;
|
|
28
|
+
lineSpacingTwips?: SignedTwips;
|
|
29
|
+
/** `auto` uses 240ths of a line; `exact` and `atLeast` use twips. */
|
|
30
|
+
lineSpacingRule?: 'auto' | 'exact' | 'atLeast';
|
|
31
|
+
indentLeftTwips?: SignedTwips;
|
|
32
|
+
indentRightTwips?: SignedTwips;
|
|
33
|
+
indentStartTwips?: SignedTwips;
|
|
34
|
+
indentEndTwips?: SignedTwips;
|
|
35
|
+
firstLineTwips?: Twips;
|
|
36
|
+
hangingTwips?: Twips;
|
|
37
|
+
/** Direct `w:numPr` on this paragraph; undefined may still inherit numbering through `style`. */
|
|
38
|
+
numbering?: {
|
|
39
|
+
numId: number;
|
|
40
|
+
level: number;
|
|
41
|
+
};
|
|
42
|
+
/** `w:pPr/w:pageBreakBefore`: forces this paragraph to start a new page. */
|
|
43
|
+
pageBreakBefore?: boolean;
|
|
44
|
+
/** Tracked insertion/deletion of the paragraph mark itself (the paragraph break). */
|
|
45
|
+
markRevision?: Revision;
|
|
46
|
+
/** Marks that `w:pPrChange` recorded a prior paragraph formatting snapshot; the snapshot itself is not modeled. */
|
|
47
|
+
formatRevision?: Revision;
|
|
48
|
+
/** Custom tab stops (`w:tabs`), in document order. */
|
|
49
|
+
tabStops?: TabStop[];
|
|
50
|
+
/** `w:keepNext`: keep this paragraph on the same page as the next. `false` cancels a style. */
|
|
51
|
+
keepNext?: boolean;
|
|
52
|
+
/** `w:keepLines`: never split this paragraph across pages. */
|
|
53
|
+
keepLines?: boolean;
|
|
54
|
+
/** `w:widowControl`: avoid single lines at a page's top or bottom (on unless turned off). */
|
|
55
|
+
widowControl?: boolean;
|
|
56
|
+
/** `w:contextualSpacing`: no spacing between paragraphs of the same style. */
|
|
57
|
+
contextualSpacing?: boolean;
|
|
58
|
+
/** `w:suppressLineNumbers`: omit this paragraph from line numbering; false overrides a style. */
|
|
59
|
+
suppressLineNumbers?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* `w:framePr/@w:dropCap`: this paragraph is a drop cap frame (the initial letter) for the
|
|
62
|
+
* paragraph that follows. `lines` is the number of text lines it spans.
|
|
63
|
+
*/
|
|
64
|
+
dropCap?: {
|
|
65
|
+
style: 'drop' | 'margin';
|
|
66
|
+
lines: number;
|
|
67
|
+
distanceTwips?: Twips;
|
|
68
|
+
};
|
|
69
|
+
/** `w:pBdr`; read-only (preserved in the source XML, not written for new paragraphs). */
|
|
70
|
+
borders?: import('./table-model.js').ParagraphBorders;
|
|
71
|
+
/** `w:shd/@w:fill` as `#rrggbb`; read-only like `borders`. */
|
|
72
|
+
shadingFill?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Bookmark names starting in this paragraph (`w:bookmarkStart/@w:name`). Added names are
|
|
75
|
+
* written around the whole paragraph; removed names lose their markers here. Exact character
|
|
76
|
+
* ranges are not modeled.
|
|
77
|
+
*/
|
|
78
|
+
bookmarks?: string[];
|
|
79
|
+
}
|
|
80
|
+
/** Direct paragraph properties supported by the editor, in native Word units. */
|
|
81
|
+
export type ParagraphFormatting = Pick<Paragraph, 'align' | 'justification' | 'direction' | 'spacingBeforeTwips' | 'spacingAfterTwips' | 'lineSpacingTwips' | 'lineSpacingRule' | 'indentLeftTwips' | 'indentRightTwips' | 'indentStartTwips' | 'indentEndTwips' | 'firstLineTwips' | 'hangingTwips' | 'keepNext' | 'keepLines' | 'widowControl' | 'contextualSpacing' | 'suppressLineNumbers' | 'borders' | 'shadingFill'>;
|
|
82
|
+
export interface ParagraphStyleDefinition {
|
|
83
|
+
id: string;
|
|
84
|
+
name?: string;
|
|
85
|
+
basedOn?: string;
|
|
86
|
+
isDefault?: boolean;
|
|
87
|
+
formatting: ParagraphFormatting;
|
|
88
|
+
/** Numbering inherited by paragraphs using this style through `w:pPr/w:numPr` in `styles.xml`. */
|
|
89
|
+
numbering?: {
|
|
90
|
+
numId: number;
|
|
91
|
+
level: number;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/** Parsed source style data. It is retained for inheritance and never flattened on save. */
|
|
95
|
+
export interface ParagraphStyleCatalog {
|
|
96
|
+
docDefaults: ParagraphFormatting;
|
|
97
|
+
styles: Record<string, ParagraphStyleDefinition>;
|
|
98
|
+
warnings: string[];
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=model-paragraph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-paragraph.d.ts","sourceRoot":"","sources":["../../src/docx/model-paragraph.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAErD,gGAAgG;AAChG,MAAM,WAAW,OAAO;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,QAAQ,CAAC;CAClB;AACD,MAAM,WAAW,SAAS;IACzB,IAAI,EAAE,WAAW,CAAC;IAClB,oEAAoE;IACpE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IAChD;;;;OAIG;IACH,aAAa,CAAC,EAAE,IAAI,CAAC;IACrB,yEAAyE;IACzE,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,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C7E,yFAAyF;IACzF,OAAO,CAAC,EAAE,OAAO,kBAAkB,EAAE,gBAAgB,CAAC;IACtD,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AACD,iFAAiF;AACjF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACrC,SAAS,EACP,OAAO,GACP,eAAe,GACf,WAAW,GACX,oBAAoB,GACpB,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,iBAAiB,GACjB,kBAAkB,GAClB,kBAAkB,GAClB,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,UAAU,GACV,WAAW,GACX,cAAc,GACd,mBAAmB,GACnB,qBAAqB,GACrB,SAAS,GACT,aAAa,CACf,CAAC;AACF,MAAM,WAAW,wBAAwB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,mBAAmB,CAAC;IAChC,kGAAkG;IAClG,SAAS,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7C;AACD,4FAA4F;AAC5F,MAAM,WAAW,qBAAqB;IACrC,WAAW,EAAE,mBAAmB,CAAC;IACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;IACjD,QAAQ,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { StHighlightColor } from './generated/wml-simple-types.js';
|
|
2
|
+
import type { HyperlinkInfo, InlineImage } from './inline-model.js';
|
|
3
|
+
import type { ThemeColorReference, ThemeFontRole, ThemeFontScript, WordUnderlineStyle } from './theme-model.js';
|
|
4
|
+
import type { HalfPoints, SignedTwips } from './units.js';
|
|
5
|
+
/** A tracked-change revision recorded on a run or paragraph mark. */
|
|
6
|
+
export interface Revision {
|
|
7
|
+
kind: 'insert' | 'delete' | 'moveFrom' | 'moveTo' | 'formatChange' | 'paragraphChange';
|
|
8
|
+
/**
|
|
9
|
+
* For `moveFrom`/`moveTo`: the move this text belongs to. Both sides share `name` (from
|
|
10
|
+
* `w:moveFromRangeStart`/`w:moveToRangeStart`); `rangeId` is that range marker's `w:id`.
|
|
11
|
+
*/
|
|
12
|
+
move?: {
|
|
13
|
+
name: string;
|
|
14
|
+
rangeId?: string;
|
|
15
|
+
};
|
|
16
|
+
author: string;
|
|
17
|
+
date?: string;
|
|
18
|
+
/** Source `w:id`; not guaranteed unique outside the paragraph it was parsed from. */
|
|
19
|
+
id: string;
|
|
20
|
+
}
|
|
21
|
+
export interface TextRun {
|
|
22
|
+
text: string;
|
|
23
|
+
bold?: boolean;
|
|
24
|
+
italic?: boolean;
|
|
25
|
+
underline?: boolean;
|
|
26
|
+
strike?: boolean;
|
|
27
|
+
/** Word named highlight color, such as `yellow` or `lightGray`. */
|
|
28
|
+
highlight?: StHighlightColor;
|
|
29
|
+
verticalAlign?: 'baseline' | 'superscript' | 'subscript';
|
|
30
|
+
/** Direct Word run language tag (`w:lang/@w:val`), without automatic detection. */
|
|
31
|
+
language?: string;
|
|
32
|
+
/** Direct East Asian script language tag (`w:lang/@w:eastAsia`). */
|
|
33
|
+
eastAsiaLanguage?: string;
|
|
34
|
+
/** Direct complex-script language tag (`w:lang/@w:bidi`). */
|
|
35
|
+
bidiLanguage?: string;
|
|
36
|
+
/** Explicit run-level bidirectional override; `false` means direct off, undefined inherits. */
|
|
37
|
+
rtl?: boolean;
|
|
38
|
+
/** Font size in points (whole or half points, e.g. 10.5); `HalfPoints` is the on-disk `w:sz`. */
|
|
39
|
+
fontSize?: number;
|
|
40
|
+
fontFamily?: string;
|
|
41
|
+
/** Direct RGB color, e.g. #28665E. May coexist with `colorTheme` as Word's stored fallback. */
|
|
42
|
+
color?: string;
|
|
43
|
+
/**
|
|
44
|
+
* A run that is itself a page or column break marker (`w:br` type page/column) instead of
|
|
45
|
+
* visible text. `text` is empty on these runs; editors render a distinct visible marker.
|
|
46
|
+
*/
|
|
47
|
+
break?: 'page' | 'column';
|
|
48
|
+
/**
|
|
49
|
+
* A run that is itself a footnote/endnote reference mark (`w:footnoteReference` /
|
|
50
|
+
* `w:endnoteReference`) instead of visible text. `text` is empty on these runs; the numeric
|
|
51
|
+
* mark is derived from document order, not stored here.
|
|
52
|
+
*/
|
|
53
|
+
noteReference?: {
|
|
54
|
+
kind: 'footnote' | 'endnote';
|
|
55
|
+
id: string;
|
|
56
|
+
};
|
|
57
|
+
/** The automatic number mark (`w:footnoteRef`/`w:endnoteRef`) that starts a note's own text. */
|
|
58
|
+
noteMark?: 'footnote' | 'endnote';
|
|
59
|
+
/**
|
|
60
|
+
* Present on runs holding a field's displayed result (`w:fldSimple`, or text between a complex
|
|
61
|
+
* field's `separate` and `end`). Display metadata only: fields are not recalculated on save and
|
|
62
|
+
* paragraphs containing them stay protected from edits.
|
|
63
|
+
*/
|
|
64
|
+
field?: {
|
|
65
|
+
instr: string;
|
|
66
|
+
simple?: boolean;
|
|
67
|
+
};
|
|
68
|
+
/** A complex field's `w:fldChar` marker run (begin, separate or end); `text` is empty. */
|
|
69
|
+
fieldChar?: 'begin' | 'separate' | 'end';
|
|
70
|
+
/** A complex field's instruction text run (`w:instrText`), e.g. ` TOC \o "1-3" `; `text` is empty. */
|
|
71
|
+
fieldCode?: string;
|
|
72
|
+
/** Tracked-change metadata for this run; absent means the run has no pending revision. */
|
|
73
|
+
revision?: Revision;
|
|
74
|
+
/** IDs of comments whose range covers this run. */
|
|
75
|
+
commentIds?: string[];
|
|
76
|
+
/** Direct `w:color/@w:themeColor` (+ themeTint/themeShade); resolution happens in a separate layer. */
|
|
77
|
+
colorTheme?: ThemeColorReference;
|
|
78
|
+
/** Character style reference (`w:rStyle/@w:val`); preserved and editable, not flattened. */
|
|
79
|
+
style?: string;
|
|
80
|
+
caps?: boolean;
|
|
81
|
+
smallCaps?: boolean;
|
|
82
|
+
/** `w:dstrike`; kept distinct from the single-line `strike` toggle. */
|
|
83
|
+
doubleStrike?: boolean;
|
|
84
|
+
/** Hidden text (`w:vanish`); the editor renders it dimmed rather than removing it. */
|
|
85
|
+
vanish?: boolean;
|
|
86
|
+
/** Non-single underline style, e.g. `double`/`wave`; `underline` stays the simple on/off toggle. */
|
|
87
|
+
underlineStyle?: WordUnderlineStyle;
|
|
88
|
+
underlineColor?: string;
|
|
89
|
+
/** `w:spacing/@w:val` character spacing, in twips (positive expands, negative condenses). */
|
|
90
|
+
characterSpacingTwips?: SignedTwips;
|
|
91
|
+
/** `w:w` horizontal text scaling, in whole percent; 100 explicitly cancels inherited scaling. */
|
|
92
|
+
textScalePercent?: number;
|
|
93
|
+
/** Office 2010 OpenType ligature selection; undefined inherits. */
|
|
94
|
+
ligatures?: import('./ligatures.js').Ligatures;
|
|
95
|
+
/** `w:kern` minimum font size for kerning, in half-points; zero explicitly disables it. */
|
|
96
|
+
kerningHalfPoints?: HalfPoints;
|
|
97
|
+
/** `w:position` baseline displacement, in signed half-points; positive raises, negative lowers. */
|
|
98
|
+
positionHalfPoints?: HalfPoints;
|
|
99
|
+
/** Direct `w:shd/@w:fill` run shading. */
|
|
100
|
+
shadingFill?: string;
|
|
101
|
+
/** Direct `w:shd` theme fill; kept alongside `shadingFill` without flattening. */
|
|
102
|
+
shadingThemeFill?: ThemeColorReference;
|
|
103
|
+
/** Direct `w:rFonts` theme font references, per script; resolved via the document theme. */
|
|
104
|
+
fontTheme?: Partial<Record<ThemeFontScript, ThemeFontRole>>;
|
|
105
|
+
/** Present when this run is an inline picture instead of text; `text` is empty. */
|
|
106
|
+
image?: InlineImage;
|
|
107
|
+
/** Hyperlink target for this run, from `w:hyperlink` (or a simple `HYPERLINK` field). */
|
|
108
|
+
link?: HyperlinkInfo;
|
|
109
|
+
}
|
|
110
|
+
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AC;IACpC,iGAAiG;IACjG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mEAAmE;IACnE,SAAS,CAAC,EAAE,OAAO,gBAAgB,EAAE,SAAS,CAAC;IAC/C,2FAA2F;IAC3F,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,mGAAmG;IACnG,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAChC,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kFAAkF;IAClF,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;IACvC,4FAA4F;IAC5F,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC,CAAC;IAC5D,mFAAmF;IACnF,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,yFAAyF;IACzF,IAAI,CAAC,EAAE,aAAa,CAAC;CACrB"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { DocumentProperties } from './core-properties.js';
|
|
2
|
+
import type { StJcTable, StNumberFormat } from './generated/wml-simple-types.js';
|
|
3
|
+
import type { ParagraphStyleCatalog } from './model-paragraph.js';
|
|
4
|
+
import type { NumberingCatalog } from './numbering-model.js';
|
|
5
|
+
import type { SignedTwips, Twips } from './units.js';
|
|
6
|
+
export type { Revision, TextRun } from './model-run.js';
|
|
7
|
+
export type { Paragraph, ParagraphFormatting, ParagraphStyleCatalog, ParagraphStyleDefinition, TabStop, } from './model-paragraph.js';
|
|
8
|
+
import type { Paragraph } from './model-paragraph.js';
|
|
9
|
+
export type { HyperlinkInfo, InlineImage, PicturePlacement, WatermarkSpec, } from './inline-model.js';
|
|
10
|
+
import type { Note, SectionProperties } from './section-model.js';
|
|
11
|
+
export type { HeaderFooterContent, HeaderFooterSlots, LineNumberSettings, Note, PageBorders, PageBorderSide, SectionColumn, SectionColumns, SectionPageNumbering, SectionProperties, } from './section-model.js';
|
|
12
|
+
/** A comment thread entry parsed from comments.xml / commentsExtended.xml. */
|
|
13
|
+
export interface Comment {
|
|
14
|
+
id: string;
|
|
15
|
+
author: string;
|
|
16
|
+
initials?: string;
|
|
17
|
+
date?: string;
|
|
18
|
+
text: string;
|
|
19
|
+
/** commentsExtended.xml `w15:done`. */
|
|
20
|
+
resolved?: boolean;
|
|
21
|
+
/** commentsExtended.xml parent linkage for threaded replies. */
|
|
22
|
+
parentId?: string;
|
|
23
|
+
}
|
|
24
|
+
export type { ThemeColorSlot, ThemeColorToken, ThemeFontSet, ThemeCatalog, ThemeColorReference, ThemeFontScript, ThemeFontRole, WordUnderlineStyle, } from './theme-model.js';
|
|
25
|
+
export type { RunFormatting, CharacterStyleDefinition, RunStyleCatalog, } from './run-style-model.js';
|
|
26
|
+
import type { RunStyleCatalog } from './run-style-model.js';
|
|
27
|
+
export type { TableBorderSide, TableBorders, TableCellMargins, NestedTablePreview, TableLook, TableConditionalRegion, TableStyleConditionalFormatting, TableStyleDefinition, TableStyleCatalog, } from './table-model.js';
|
|
28
|
+
import type { TableCell as TableCellShape, TableStyleCatalog } from './table-model.js';
|
|
29
|
+
export type TableCell = TableCellShape;
|
|
30
|
+
export interface Table {
|
|
31
|
+
type: 'table';
|
|
32
|
+
id: string;
|
|
33
|
+
/** Whether row, cell and paragraph structure can be edited without losing unsupported table XML. */
|
|
34
|
+
structureEditable?: boolean;
|
|
35
|
+
rows: TableCell[][];
|
|
36
|
+
/** `w:tblGrid/w:gridCol` widths in twips, one per grid column. */
|
|
37
|
+
grid?: Twips[];
|
|
38
|
+
widthTwips?: Twips;
|
|
39
|
+
alignment?: 'left' | 'center' | 'right';
|
|
40
|
+
/** The exact `w:tblPr/w:jc` value (`ST_JcTable`, including `start`/`end`); `alignment` is derived from it. */
|
|
41
|
+
justification?: StJcTable;
|
|
42
|
+
indentTwips?: SignedTwips;
|
|
43
|
+
borders?: import('./table-model.js').TableBorders;
|
|
44
|
+
/** `w:tblStyle/@w:val`; conditional formatting resolves through `tableStyles` without flattening. */
|
|
45
|
+
style?: string;
|
|
46
|
+
look?: import('./table-model.js').TableLook;
|
|
47
|
+
/** Default cell margins (`w:tblCellMar`); cells' own `w:tcMar` override them. */
|
|
48
|
+
cellMargins?: import('./table-model.js').TableCellMargins;
|
|
49
|
+
/** Per-row properties, parallel to `rows` (read from `w:trPr`; preserved on save). */
|
|
50
|
+
rowProperties?: import('./table-model.js').TableRowProperties[];
|
|
51
|
+
}
|
|
52
|
+
export type Block = Paragraph | Table;
|
|
53
|
+
export interface DocumentModel {
|
|
54
|
+
blocks: Block[];
|
|
55
|
+
/** CSS pixels at 96 DPI. Page height is currently a surface minimum, not pagination. */
|
|
56
|
+
page: {
|
|
57
|
+
width: number;
|
|
58
|
+
height: number;
|
|
59
|
+
marginTop: number;
|
|
60
|
+
marginRight: number;
|
|
61
|
+
marginBottom: number;
|
|
62
|
+
marginLeft: number;
|
|
63
|
+
};
|
|
64
|
+
warnings: string[];
|
|
65
|
+
/** Source paragraph defaults/styles; editing the catalog itself is not supported. */
|
|
66
|
+
paragraphStyles?: ParagraphStyleCatalog;
|
|
67
|
+
/** Parsed `word/numbering.xml`. Existing entries are read-only; new list definitions may be added. */
|
|
68
|
+
numberingCatalog?: NumberingCatalog;
|
|
69
|
+
/**
|
|
70
|
+
* Every parsed section in document order (paragraph-level section breaks, then the final
|
|
71
|
+
* body section). `page` above mirrors the last section's page geometry for backward compat.
|
|
72
|
+
*/
|
|
73
|
+
sections?: SectionProperties[];
|
|
74
|
+
/** Package properties from `docProps/core.xml` (title, author, tags...). */
|
|
75
|
+
properties?: DocumentProperties;
|
|
76
|
+
/** Whether `settings.xml` requests separate even-page headers/footers (`w:evenAndOddHeaders`). */
|
|
77
|
+
evenAndOddHeaders?: boolean;
|
|
78
|
+
/** `w:autoHyphenation` in settings.xml: Word hyphenates words at line ends. */
|
|
79
|
+
autoHyphenation?: boolean;
|
|
80
|
+
/** Page colour (`w:document/w:background`), six uppercase hex digits without `#`; unset for none. */
|
|
81
|
+
pageColor?: string;
|
|
82
|
+
footnotes?: Note[];
|
|
83
|
+
endnotes?: Note[];
|
|
84
|
+
/** Raw `w:footnotePr/w:numFmt` token from settings.xml; defaults to `decimal`. */
|
|
85
|
+
footnoteNumFmt?: StNumberFormat;
|
|
86
|
+
/** Raw `w:endnotePr/w:numFmt` token from settings.xml; defaults to `lowerRoman`. */
|
|
87
|
+
endnoteNumFmt?: StNumberFormat;
|
|
88
|
+
/** Comment threads parsed from comments.xml / commentsExtended.xml. */
|
|
89
|
+
comments?: Comment[];
|
|
90
|
+
/** settings.xml `w:trackRevisions`; toggling this changes how the editor records new edits. */
|
|
91
|
+
trackChanges?: boolean;
|
|
92
|
+
/** Source run-level defaults/character styles; editing the catalog itself is not supported. */
|
|
93
|
+
characterStyles?: RunStyleCatalog;
|
|
94
|
+
/** Source table style catalog; editing the catalog itself is not supported. */
|
|
95
|
+
tableStyles?: TableStyleCatalog;
|
|
96
|
+
/** Parsed word/theme/theme1.xml and settings.xml color scheme mapping. */
|
|
97
|
+
theme?: import('./theme-model.js').ThemeCatalog;
|
|
98
|
+
}
|
|
99
|
+
/** Bytes for a media part staged for save but not yet part of the loaded package (e.g. a newly inserted picture). */
|
|
100
|
+
export interface PendingMediaPart {
|
|
101
|
+
bytes: Uint8Array;
|
|
102
|
+
contentType: string;
|
|
103
|
+
}
|
|
104
|
+
export interface LoadedDocument {
|
|
105
|
+
model: DocumentModel;
|
|
106
|
+
/** Original image/media bytes keyed by package part name, kept off the JSON model so diffs stay small.
|
|
107
|
+
* Absent (equivalent to empty) for loaders that never model inline media, such as legacy DOC. */
|
|
108
|
+
media?: ReadonlyMap<string, Uint8Array>;
|
|
109
|
+
/** Returns bytes in the original format; unsupported edits reject instead of silently degrading it.
|
|
110
|
+
* `pendingMedia` supplies bytes for any `InlineImage.partName` newly referenced by `model` (e.g. inserted pictures). */
|
|
111
|
+
save(model?: DocumentModel, pendingMedia?: ReadonlyMap<string, PendingMediaPart>): Promise<Uint8Array>;
|
|
112
|
+
}
|
|
113
|
+
export declare function createDocument(): DocumentModel;
|
|
114
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/docx/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG/D,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACrD,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACxD,YAAY,EACX,SAAS,EACT,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,OAAO,GACP,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EACX,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,aAAa,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAClE,YAAY,EACX,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,IAAI,EACJ,WAAW,EACX,cAAc,EACd,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,iBAAiB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,8EAA8E;AAC9E,MAAM,WAAW,OAAO;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC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CAAC,EAAE,eAAe,CAAC;IAClC,+EAA+E;IAC/E,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,0EAA0E;IAC1E,KAAK,CAAC,EAAE,OAAO,kBAAkB,EAAE,YAAY,CAAC;CAChD;AACD,qHAAqH;AACrH,MAAM,WAAW,gBAAgB;IAChC,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,aAAa,CAAC;IACrB;sGACkG;IAClG,KAAK,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACxC;6HACyH;IACzH,IAAI,CACH,KAAK,CAAC,EAAE,aAAa,EACrB,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAClD,OAAO,CAAC,UAAU,CAAC,CAAC;CACvB;AACD,wBAAgB,cAAc,IAAI,aAAa,CAc9C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Block, Note } from './model.js';
|
|
2
|
+
import { type XmlElement } from './xml.js';
|
|
3
|
+
/** Parses `word/footnotes.xml` or `word/endnotes.xml`, skipping Word's separator marks. */
|
|
4
|
+
export declare function parseNotesPart(xml: string, kind: 'footnote' | 'endnote', parseBlocks: (container: XmlElement, idPrefix: string) => Block[]): Note[];
|
|
5
|
+
/** Renders a 1-based note number in a Word `w:numFmt` display format. */
|
|
6
|
+
export declare function formatNoteNumber(value: number, format: string | undefined): string;
|
|
7
|
+
/** Assigns 1-based note numbers by first-reference order, the same order Word displays. */
|
|
8
|
+
export declare function numberNotesInOrder(blocks: Block[], kind: 'footnote' | 'endnote'): Map<string, number>;
|
|
9
|
+
//# sourceMappingURL=notes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../src/docx/notes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAa,MAAM,YAAY,CAAC;AACzD,OAAO,EAA4B,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAIrE,2FAA2F;AAC3F,wBAAgB,cAAc,CAC7B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,UAAU,GAAG,SAAS,EAC5B,WAAW,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,KAAK,KAAK,EAAE,GAC/D,IAAI,EAAE,CAaR;AAuCD,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAelF;AAqBD,2FAA2F;AAC3F,wBAAgB,kBAAkB,CACjC,MAAM,EAAE,KAAK,EAAE,EACf,IAAI,EAAE,UAAU,GAAG,SAAS,GAC1B,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAIrB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { NumberingCatalog, NumberingLevelDefinition } from './numbering-model.js';
|
|
2
|
+
import type { ParagraphStyleCatalog } from './model-paragraph.js';
|
|
3
|
+
/**
|
|
4
|
+
* `multilevel` numbers 1., 1.1., 1.1.1. (every level shows its ancestors); `outline` cycles
|
|
5
|
+
* 1., a), i. by level, like Word's plain outline lists.
|
|
6
|
+
*/
|
|
7
|
+
export type ListKind = 'bullet' | 'decimal' | 'multilevel' | 'outline';
|
|
8
|
+
/**
|
|
9
|
+
* Returns a catalog with one additional, independent list definition of the requested kind and
|
|
10
|
+
* its `numId`. Pure: never mutates `catalog`. Existing entries are always reused unchanged, so
|
|
11
|
+
* every call mints a fresh `abstractNum`/`num` pair with its own restart-from-1 counter, matching
|
|
12
|
+
* how Word starts a new list rather than continuing an unrelated one.
|
|
13
|
+
*/
|
|
14
|
+
export declare function ensureListDefinition(catalog: NumberingCatalog | undefined, kind: ListKind): {
|
|
15
|
+
catalog: NumberingCatalog;
|
|
16
|
+
numId: number;
|
|
17
|
+
};
|
|
18
|
+
/** Adds a validated independent definition without modifying any imported list. */
|
|
19
|
+
export declare function createListDefinition(catalog: NumberingCatalog | undefined, levels: readonly NumberingLevelDefinition[]): {
|
|
20
|
+
catalog: NumberingCatalog;
|
|
21
|
+
numId: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Points each existing paragraph style named by a level's `paragraphStyleId` at that level of
|
|
25
|
+
* list `numId` (the style's `w:numPr`), as Word does for heading-linked outlines. Pure; styles that
|
|
26
|
+
* are not in the catalog are skipped. A style linked from two levels keeps the deepest-first
|
|
27
|
+
* assignment that appears last, so callers should keep style ids unique per list.
|
|
28
|
+
*/
|
|
29
|
+
export declare function linkStylesToList(styles: ParagraphStyleCatalog | undefined, levels: readonly NumberingLevelDefinition[], numId: number): ParagraphStyleCatalog | undefined;
|
|
30
|
+
//# sourceMappingURL=numbering-editing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numbering-editing.d.ts","sourceRoot":"","sources":["../../src/docx/numbering-editing.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEX,gBAAgB,EAChB,wBAAwB,EAExB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAMlE;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;AAoDvE;;;;;GAKG;AACH,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,gBAAgB,GAAG,SAAS,EACrC,IAAI,EAAE,QAAQ,GACZ;IAAE,OAAO,EAAE,gBAAgB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAE9C;AAED,mFAAmF;AACnF,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,gBAAgB,GAAG,SAAS,EACrC,MAAM,EAAE,SAAS,wBAAwB,EAAE,GACzC;IAAE,OAAO,EAAE,gBAAgB,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CA0B9C;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,qBAAqB,GAAG,SAAS,EACzC,MAAM,EAAE,SAAS,wBAAwB,EAAE,EAC3C,KAAK,EAAE,MAAM,GACX,qBAAqB,GAAG,SAAS,CAQnC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DocumentModel, Paragraph, ParagraphStyleCatalog } from './model.js';
|
|
2
|
+
import type { NumberingCatalog, ParagraphListLabel } from './numbering-model.js';
|
|
3
|
+
/** Formats one placeholder value using a level's numbering format. */
|
|
4
|
+
export declare function formatListNumber(numFmt: string, value: number): string;
|
|
5
|
+
/** Resolves the paragraph's effective `{ numId, level }`, direct or inherited through its style. */
|
|
6
|
+
export declare function resolveParagraphNumbering(paragraph: Paragraph, styleCatalog: ParagraphStyleCatalog | undefined, numberingCatalog?: NumberingCatalog): {
|
|
7
|
+
numId: number;
|
|
8
|
+
level: number;
|
|
9
|
+
} | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Computes list markers for every numbered/bulleted paragraph in document order, tracking
|
|
12
|
+
* counter state across the document per `numId`/level. Purely derived from the model; never
|
|
13
|
+
* mutates it and is never itself part of the saved document.
|
|
14
|
+
*/
|
|
15
|
+
export declare function computeListLabels(model: DocumentModel): Map<string, ParagraphListLabel>;
|
|
16
|
+
export declare function displayListLabel(text: string): string;
|
|
17
|
+
//# sourceMappingURL=numbering-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numbering-format.d.ts","sourceRoot":"","sources":["../../src/docx/numbering-format.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAS,aAAa,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACzF,OAAO,KAAK,EACX,gBAAgB,EAEhB,kBAAkB,EAClB,MAAM,sBAAsB,CAAC;AAY9B,sEAAsE;AACtE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CA4BtE;AAED,oGAAoG;AACpG,wBAAgB,yBAAyB,CACxC,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,qBAAqB,GAAG,SAAS,EAC/C,gBAAgB,CAAC,EAAE,gBAAgB,GACjC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAgB9C;AAgGD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,GAAG,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAkCvF;AAiBD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAErD"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { StNumberFormat } from './generated/wml-simple-types.js';
|
|
2
|
+
import type { SignedTwips, Twips } from './units.js';
|
|
3
|
+
/** Character formatting of a level's marker (`w:lvl/w:rPr`); absent fields follow the paragraph's text. */
|
|
4
|
+
export interface NumberingMarkerFormat {
|
|
5
|
+
fontFamily?: string;
|
|
6
|
+
/** `w:sz` in half-points. */
|
|
7
|
+
fontSizeHalfPoints?: number;
|
|
8
|
+
bold?: boolean;
|
|
9
|
+
italic?: boolean;
|
|
10
|
+
/** `#rrggbb`; automatic colour is represented by omission. */
|
|
11
|
+
color?: string;
|
|
12
|
+
}
|
|
13
|
+
/** A single `w:lvl` definition, fully resolved from an abstractNum (and any lvlOverride). */
|
|
14
|
+
export interface NumberingLevelDefinition {
|
|
15
|
+
/** 0-based `w:ilvl`. */
|
|
16
|
+
level: number;
|
|
17
|
+
start: number;
|
|
18
|
+
/** `w:numFmt/@w:val` (`ST_NumberFormat`), such as `decimal`, `bullet`, `lowerRoman`. Invalid values fall back to `decimal` with a parse warning. */
|
|
19
|
+
numFmt: StNumberFormat;
|
|
20
|
+
/** Raw `w:lvlText/@w:val`, with `%1`..`%9` placeholders (1-based ancestor levels) or a bullet glyph. */
|
|
21
|
+
lvlText: string;
|
|
22
|
+
/** Paragraph style associated with this level (`w:pStyle`). */
|
|
23
|
+
paragraphStyleId?: string;
|
|
24
|
+
lvlJc?: 'left' | 'center' | 'right';
|
|
25
|
+
indentLeftTwips?: SignedTwips;
|
|
26
|
+
hangingTwips?: Twips;
|
|
27
|
+
firstLineTwips?: Twips;
|
|
28
|
+
/** `w:isLgl`: render every placeholder in this level's marker as Decimal Number regardless of format. */
|
|
29
|
+
isLgl?: boolean;
|
|
30
|
+
/** `w:lvlRestart/@w:val`: one-based higher-level restart trigger; 0 means never. Omitted defaults to the previous level. */
|
|
31
|
+
lvlRestart?: number;
|
|
32
|
+
/** Marker-to-text separator from `w:suff` (defaults to `tab`). */
|
|
33
|
+
suffix?: 'tab' | 'space' | 'none';
|
|
34
|
+
/** Explicit tab stop for the marker's tab suffix (`w:pPr/w:tabs/w:tab`, `w:val="num"`). */
|
|
35
|
+
tabStopTwips?: Twips;
|
|
36
|
+
/** Marker formatting from `w:rPr`. */
|
|
37
|
+
markerFormat?: NumberingMarkerFormat;
|
|
38
|
+
}
|
|
39
|
+
export interface AbstractNumDefinition {
|
|
40
|
+
id: string;
|
|
41
|
+
levels: Record<number, NumberingLevelDefinition>;
|
|
42
|
+
}
|
|
43
|
+
export interface NumLevelOverride {
|
|
44
|
+
startOverride?: number;
|
|
45
|
+
lvl?: NumberingLevelDefinition;
|
|
46
|
+
}
|
|
47
|
+
export interface NumDefinition {
|
|
48
|
+
id: string;
|
|
49
|
+
abstractNumId: string;
|
|
50
|
+
levelOverrides?: Record<number, NumLevelOverride>;
|
|
51
|
+
}
|
|
52
|
+
/** Parsed source `word/numbering.xml`. Existing entries are read-only; only additive entries can be saved. */
|
|
53
|
+
export interface NumberingCatalog {
|
|
54
|
+
abstractNums: Record<string, AbstractNumDefinition>;
|
|
55
|
+
nums: Record<string, NumDefinition>;
|
|
56
|
+
warnings: string[];
|
|
57
|
+
}
|
|
58
|
+
/** A computed, render-only list marker for one paragraph. Never written back to the model. */
|
|
59
|
+
export interface ParagraphListLabel {
|
|
60
|
+
numId: string;
|
|
61
|
+
level: number;
|
|
62
|
+
/** Marker text with `%n` placeholders already substituted (no trailing suffix). */
|
|
63
|
+
text: string;
|
|
64
|
+
suffix: 'tab' | 'space' | 'none';
|
|
65
|
+
/** Alignment of the marker around the paragraph's first-line position. */
|
|
66
|
+
alignment?: 'left' | 'center' | 'right';
|
|
67
|
+
indentLeftTwips?: SignedTwips;
|
|
68
|
+
hangingTwips?: Twips;
|
|
69
|
+
firstLineTwips?: Twips;
|
|
70
|
+
tabStopTwips?: Twips;
|
|
71
|
+
markerFormat?: NumberingMarkerFormat;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=numbering-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numbering-model.d.ts","sourceRoot":"","sources":["../../src/docx/numbering-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACrD,2GAA2G;AAC3G,MAAM,WAAW,qBAAqB;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6BAA6B;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AACD,6FAA6F;AAC7F,MAAM,WAAW,wBAAwB;IACxC,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,oJAAoJ;IACpJ,MAAM,EAAE,cAAc,CAAC;IACvB,wGAAwG;IACxG,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,M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AAG,OAAO,GAAG,MAAM,CAAC;IACjC,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACxC,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,cAAc,CAAC,EAAE,KAAK,CAAC;IACvB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,YAAY,CAAC,EAAE,qBAAqB,CAAC;CACrC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type JSZip from 'jszip';
|
|
2
|
+
import type { DocumentModel } from './model.js';
|
|
3
|
+
/**
|
|
4
|
+
* Applies additive changes to the numbering catalog onto the package's `word/numbering.xml`.
|
|
5
|
+
* Existing `abstractNum`/`num` entries are read-only: any difference from the loaded baseline is
|
|
6
|
+
* rejected. New entries are appended in schema order and the part/relationship/content-type are
|
|
7
|
+
* created the first time a document gains numbering.
|
|
8
|
+
*/
|
|
9
|
+
export declare function applyNumberingCatalog(zip: JSZip, model: DocumentModel, binding: {
|
|
10
|
+
base: DocumentModel;
|
|
11
|
+
} | undefined): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=numbering-package.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numbering-package.d.ts","sourceRoot":"","sources":["../../src/docx/numbering-package.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAiHhD;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAC1C,GAAG,EAAE,KAAK,EACV,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GAAG,SAAS,GAC1C,OAAO,CAAC,IAAI,CAAC,CA2Cf"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { NumberingCatalog, NumberingLevelDefinition } from './numbering-model.js';
|
|
2
|
+
import { type XmlElement } from './xml.js';
|
|
3
|
+
export declare function parseNumberingLevel(lvl: XmlElement): NumberingLevelDefinition;
|
|
4
|
+
/** Parses `word/numbering.xml` into a read-only catalog; editing existing entries is not supported. */
|
|
5
|
+
export declare function parseNumberingCatalog(xml: string): NumberingCatalog;
|
|
6
|
+
/** Resolves the effective level definition for a `numId`, applying any `lvlOverride`. */
|
|
7
|
+
export declare function resolveNumberingLevel(catalog: NumberingCatalog, numId: string, level: number): NumberingLevelDefinition | undefined;
|
|
8
|
+
//# sourceMappingURL=numbering-parse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numbering-parse.d.ts","sourceRoot":"","sources":["../../src/docx/numbering-parse.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEX,gBAAgB,EAChB,wBAAwB,EAIxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA0C,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AA6BnF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,UAAU,GAAG,wBAAwB,CAgC7E;AAkCD,uGAAuG;AACvG,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAyBnE;AAED,yFAAyF;AACzF,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,gBAAgB,EACzB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACX,wBAAwB,GAAG,SAAS,CAOtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numbering-parts.d.ts","sourceRoot":"","sources":["../../src/docx/numbering-parts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,0GAA0G;AAC1G,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAoCrE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Roman numeral conversion. Adapted from
|
|
3
|
+
* pptx-viewer-new packages/core/src/core/utils/auto-number-format.ts (romanNumeral),
|
|
4
|
+
* which documents the same clamp-to-[1,3999] behavior verified against real output.
|
|
5
|
+
*/
|
|
6
|
+
export declare function romanNumeral(n: number): string;
|
|
7
|
+
/**
|
|
8
|
+
* Word's alphabetic label (lower-case): past `z` the letter repeats rather than
|
|
9
|
+
* counting spreadsheet-style. Adapted from the `repeatedLabel` rule in
|
|
10
|
+
* pptx-viewer-new packages/core/src/core/utils/auto-number-alphabets.ts
|
|
11
|
+
* (1 -> "a", 26 -> "z", 27 -> "aa", 52 -> "zz", 53 -> "aaa").
|
|
12
|
+
*/
|
|
13
|
+
export declare function letterLabel(n: number): string;
|
|
14
|
+
/** `decimal` numeral immediately followed by its English ordinal suffix, e.g. `2nd`. */
|
|
15
|
+
export declare function ordinalNumeral(n: number): string;
|
|
16
|
+
/** English cardinal words for 0..999,999 (falls back to the decimal numeral outside that range). */
|
|
17
|
+
export declare function cardinalWords(n: number): string;
|
|
18
|
+
/** English ordinal words for 0..999,999, e.g. `twenty-first` (falls back to the ordinal numeral). */
|
|
19
|
+
export declare function ordinalWords(n: number): string;
|
|
20
|
+
//# sourceMappingURL=numbering-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numbering-text.d.ts","sourceRoot":"","sources":["../../src/docx/numbering-text.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CA0B9C;AAGD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAI7C;AAgBD,wFAAwF;AACxF,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEhD;AAyBD,oGAAoG;AACpG,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAuB/C;AAWD,qGAAqG;AACrG,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAU9C"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Paragraph } from './model.js';
|
|
2
|
+
import { type XmlDocument, type XmlElement } from './xml.js';
|
|
3
|
+
/** Writes or removes `w:numPr` on a paragraph's `pPr`, diffed against the base paragraph. */
|
|
4
|
+
export declare function writeNumberingProperties(doc: XmlDocument, props: XmlElement, paragraph: Paragraph, base?: Paragraph): void;
|
|
5
|
+
//# sourceMappingURL=numbering-write.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numbering-write.d.ts","sourceRoot":"","sources":["../../src/docx/numbering-write.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAmB,KAAK,WAAW,EAAE,KAAK,UAAU,EAAW,MAAM,UAAU,CAAC;AAUvF,6FAA6F;AAC7F,wBAAgB,wBAAwB,CACvC,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,SAAS,EACpB,IAAI,CAAC,EAAE,SAAS,GACd,IAAI,CAYN"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { buildRelationshipsXml, contentTypeForPart, ensureContentTypeDefault, parseContentTypes, parseRelationships, type ContentTypes, type Relationship, } from '../opc/index.js';
|
|
2
|
+
/** Resolves a relationship target that is relative to `word/` (the only base part this codec writes into). */
|
|
3
|
+
export declare function resolveInternalTarget(target: string): string;
|
|
4
|
+
//# sourceMappingURL=package-parts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-parts.d.ts","sourceRoot":"","sources":["../../src/docx/package-parts.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,GACjB,MAAM,iBAAiB,CAAC;AAEzB,8GAA8G;AAC9G,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAG5D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type XmlDocument, type XmlElement } from './xml.js';
|
|
2
|
+
/** The page colour of `w:document/w:background`, as uppercase hex without `#`. */
|
|
3
|
+
export declare function parsePageBackground(root: XmlElement | null | undefined): string | undefined;
|
|
4
|
+
/**
|
|
5
|
+
* Sets or clears the page colour. An unchanged colour leaves the element (and any theme
|
|
6
|
+
* attributes on it) as it was; a new one replaces it, ahead of `w:body` as the schema requires.
|
|
7
|
+
*/
|
|
8
|
+
export declare function applyPageBackground(doc: XmlDocument, color: string | undefined): void;
|
|
9
|
+
//# sourceMappingURL=page-background.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-background.d.ts","sourceRoot":"","sources":["../../src/docx/page-background.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAKpG,kFAAkF;AAClF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAG3F;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAarF"}
|