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,9 @@
|
|
|
1
|
+
import type { PageBorders } from './section-model.js';
|
|
2
|
+
import { type XmlDocument, type XmlElement } from './xml.js';
|
|
3
|
+
export declare function parsePageBorders(element: XmlElement | undefined): PageBorders | undefined;
|
|
4
|
+
/**
|
|
5
|
+
* Makes `sectPr`'s `w:pgBorders` match `next`, rewriting only the sides and attributes that differ
|
|
6
|
+
* from `base`. `create` places a newly needed element in schema order.
|
|
7
|
+
*/
|
|
8
|
+
export declare function patchPageBorders(doc: XmlDocument, sectPr: XmlElement, next: PageBorders | undefined, base: PageBorders | undefined, create: (doc: XmlDocument, parent: XmlElement, name: string) => XmlElement): void;
|
|
9
|
+
//# sourceMappingURL=page-borders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-borders.d.ts","sourceRoot":"","sources":["../../src/docx/page-borders.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,oBAAoB,CAAC;AAItE,OAAO,EAAyC,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAOpG,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAuBzF;AAaD;;;GAGG;AACH,wBAAgB,gBAAgB,CAC/B,GAAG,EAAE,WAAW,EAChB,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,WAAW,GAAG,SAAS,EAC7B,IAAI,EAAE,WAAW,GAAG,SAAS,EAC7B,MAAM,EAAE,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,UAAU,GACxE,IAAI,CAmBN"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { StJc } from './generated/wml-simple-types.js';
|
|
2
|
+
import type { Paragraph } from './model.js';
|
|
3
|
+
import { type XmlElement } from './xml.js';
|
|
4
|
+
export type ParagraphAlign = 'left' | 'center' | 'right' | 'justify';
|
|
5
|
+
/** Maps a full `ST_Jc` value to the renderer's alignment; `start`/`end` follow the paragraph direction. */
|
|
6
|
+
export declare function alignFromJustification(jc: StJc, rtl: boolean): ParagraphAlign | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* The `w:jc` value to write. `justification` (the exact value read from the file) is only
|
|
9
|
+
* authoritative while `align` still equals what it implies; once an editor changes `align` alone,
|
|
10
|
+
* the stale `justification` is ignored and `align` is written.
|
|
11
|
+
*/
|
|
12
|
+
export declare function paragraphJustification(paragraph: Paragraph): StJc | undefined;
|
|
13
|
+
export interface ParsedJustification {
|
|
14
|
+
/** Renderer alignment derived from `justification` and the local `w:bidi`. */
|
|
15
|
+
align?: ParagraphAlign;
|
|
16
|
+
/** The exact `ST_Jc` value read from the file, kept so it round-trips unchanged. */
|
|
17
|
+
justification?: StJc;
|
|
18
|
+
}
|
|
19
|
+
/** Parses `w:jc` in a `w:pPr`; invalid values are dropped with a parse warning. */
|
|
20
|
+
export declare function parseJustification(pPr: XmlElement | undefined): ParsedJustification;
|
|
21
|
+
//# sourceMappingURL=paragraph-alignment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paragraph-alignment.d.ts","sourceRoot":"","sources":["../../src/docx/paragraph-alignment.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAG5C,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;AAErE,2GAA2G;AAC3G,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,GAAG,cAAc,GAAG,SAAS,CAoBzF;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAQ7E;AAED,MAAM,WAAW,mBAAmB;IACnC,8EAA8E;IAC9E,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,oFAAoF;IACpF,aAAa,CAAC,EAAE,IAAI,CAAC;CACrB;AAED,mFAAmF;AACnF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,GAAG,mBAAmB,CAKnF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Paragraph, ParagraphFormatting, ParagraphStyleCatalog } from './model.js';
|
|
2
|
+
import { type XmlElement } from './xml.js';
|
|
3
|
+
/** Pagination toggles whose element names match their model keys. */
|
|
4
|
+
export declare const PAGINATION_KEYS: readonly ["keepNext", "keepLines", "widowControl", "contextualSpacing", "suppressLineNumbers"];
|
|
5
|
+
/** Parses `w:pPr` formatting (shared by styles, docDefaults and direct paragraph properties). */
|
|
6
|
+
export declare function parseFormatting(pPr: XmlElement | undefined): ParagraphFormatting;
|
|
7
|
+
export declare function parseParagraphStyleCatalog(xml: string): ParagraphStyleCatalog;
|
|
8
|
+
/** Resolves defaults and style ancestry without modifying paragraph direct properties. */
|
|
9
|
+
export declare function resolveParagraphFormatting(paragraph: Paragraph, catalog: ParagraphStyleCatalog): ParagraphFormatting;
|
|
10
|
+
/** Resolves numbering inherited through `pStyle` when a paragraph has no direct `w:numPr`. */
|
|
11
|
+
export declare function resolveStyleNumbering(styleId: string | undefined, catalog: ParagraphStyleCatalog): {
|
|
12
|
+
numId: number;
|
|
13
|
+
level: number;
|
|
14
|
+
} | undefined;
|
|
15
|
+
//# sourceMappingURL=paragraph-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paragraph-styles.d.ts","sourceRoot":"","sources":["../../src/docx/paragraph-styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,SAAS,EACT,mBAAmB,EACnB,qBAAqB,EAErB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAkD,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAe3F,qEAAqE;AACrE,eAAO,MAAM,eAAe,gGAMlB,CAAC;AAEX,iGAAiG;AACjG,wBAAgB,eAAe,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,GAAG,mBAAmB,CA2ChF;AAmBD,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,CAqC7E;AAoBD,0FAA0F;AAC1F,wBAAgB,0BAA0B,CACzC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,qBAAqB,GAC5B,mBAAmB,CA4CrB;AAED,8FAA8F;AAC9F,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,EAAE,qBAAqB,GAC5B;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAY9C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Runs `fn` with `warnings` as the active sink; nesting restores the previous sink. */
|
|
2
|
+
export declare function withParseWarnings<T>(warnings: string[] | undefined, fn: () => T): T;
|
|
3
|
+
/** Records a de-duplicated warning when a sink is active. */
|
|
4
|
+
export declare function reportParseWarning(message: string): void;
|
|
5
|
+
/**
|
|
6
|
+
* Validates a raw attribute against an XSD enumeration guard. Missing values return undefined
|
|
7
|
+
* silently; invalid ones are dropped with a warning naming the attribute.
|
|
8
|
+
*/
|
|
9
|
+
export declare function enumValue<T extends string>(guard: (value: unknown) => value is T, raw: string | null | undefined, label: string): T | undefined;
|
|
10
|
+
//# sourceMappingURL=parse-diagnostics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-diagnostics.d.ts","sourceRoot":"","sources":["../../src/docx/parse-diagnostics.ts"],"names":[],"mappings":"AAMA,wFAAwF;AACxF,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAQnF;AAED,6DAA6D;AAC7D,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAExD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EACzC,KAAK,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,KAAK,IAAI,CAAC,EACrC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9B,KAAK,EAAE,MAAM,GACX,CAAC,GAAG,SAAS,CAKf"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Revision, TextRun } from './model.js';
|
|
2
|
+
import { type XmlElement } from './xml.js';
|
|
3
|
+
/** Element local names this module owns inside a paragraph body; used by write.ts's safety checks. */
|
|
4
|
+
export declare const REVISION_WRAPPER_NAMES: string[];
|
|
5
|
+
export declare const COMMENT_ANCHOR_NAMES: string[];
|
|
6
|
+
/** Move ranges open at the current parse position (they may span paragraphs), innermost last. */
|
|
7
|
+
export interface OpenMoves {
|
|
8
|
+
moveFrom: {
|
|
9
|
+
name: string;
|
|
10
|
+
id: string;
|
|
11
|
+
}[];
|
|
12
|
+
moveTo: {
|
|
13
|
+
name: string;
|
|
14
|
+
id: string;
|
|
15
|
+
}[];
|
|
16
|
+
}
|
|
17
|
+
/** A `w:r` whose only content is a `w:commentReference`: a comment anchor, not document text. */
|
|
18
|
+
export declare function isCommentReferenceRun(run: XmlElement): boolean;
|
|
19
|
+
/** Paragraph mark insertion/deletion, recorded as `w:pPr/w:rPr/w:ins|w:del`. */
|
|
20
|
+
export declare function paragraphMarkRevision(pPr: XmlElement | undefined): Revision | undefined;
|
|
21
|
+
/** Marks that `w:pPrChange` recorded a prior paragraph formatting snapshot (not itself modeled). */
|
|
22
|
+
export declare function paragraphFormatRevision(pPr: XmlElement | undefined): Revision | undefined;
|
|
23
|
+
/** Marks that `w:rPrChange` recorded a prior run formatting snapshot (not itself modeled). */
|
|
24
|
+
export declare function runFormatRevision(rPr: XmlElement | undefined): Revision | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Walks a paragraph's direct children in document order, expanding `w:ins`/`w:del`/`w:moveFrom`/
|
|
27
|
+
* `w:moveTo` wrappers into their contained runs (tagged with the wrapper's revision) and tracking
|
|
28
|
+
* `w:commentRangeStart`/`w:commentRangeEnd` so runs inside an open range carry the comment's id.
|
|
29
|
+
* Pass the same `active` array for consecutive paragraphs so a range spanning paragraphs tags
|
|
30
|
+
* every run inside it.
|
|
31
|
+
*/
|
|
32
|
+
export declare function collectParagraphRuns(node: XmlElement, parseRun: (run: XmlElement, revision?: Revision) => TextRun, parseOther?: (item: XmlElement) => TextRun[] | undefined, resolveLink?: (hyperlink: XmlElement) => TextRun['link'], active?: string[], moves?: OpenMoves): {
|
|
33
|
+
runs: TextRun[];
|
|
34
|
+
hasMove: boolean;
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=parse-revisions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-revisions.d.ts","sourceRoot":"","sources":["../../src/docx/parse-revisions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAA2C,KAAK,UAAU,EAAW,MAAM,UAAU,CAAC;AAS7F,sGAAsG;AACtG,eAAO,MAAM,sBAAsB,UAAiC,CAAC;AACrE,eAAO,MAAM,oBAAoB,UAA+D,CAAC;AAEjG,iGAAiG;AACjG,MAAM,WAAW,SAAS;IACzB,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACzC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACvC;AAsBD,iGAAiG;AACjG,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAK9D;AAaD,gFAAgF;AAChF,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAOvF;AAED,oGAAoG;AACpG,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAGzF;AAED,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAGnF;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CACnC,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,CAAC,GAAG,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,QAAQ,KAAK,OAAO,EAC3D,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,OAAO,EAAE,GAAG,SAAS,EACxD,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,UAAU,KAAK,OAAO,CAAC,MAAM,CAAC,EACxD,MAAM,GAAE,MAAM,EAAO,EACrB,KAAK,GAAE,SAAwC,GAC7C;IAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CA4CvC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Paragraph, Table } from './model.js';
|
|
2
|
+
import { type XmlElement } from './xml.js';
|
|
3
|
+
/** Parses a `w:tbl`, including grid widths, merges, borders, shading and table style/look. */
|
|
4
|
+
export declare function parseTable(node: XmlElement, id: string, parseParagraph: (p: XmlElement, id: string) => Paragraph): Table;
|
|
5
|
+
//# sourceMappingURL=parse-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-table.d.ts","sourceRoot":"","sources":["../../src/docx/parse-table.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAyB,KAAK,UAAU,EAAW,MAAM,UAAU,CAAC;AAgH3E,8FAA8F;AAC9F,wBAAgB,UAAU,CACzB,IAAI,EAAE,UAAU,EAChB,EAAE,EAAE,MAAM,EACV,cAAc,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,KAAK,SAAS,GACtD,KAAK,CA4CP"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Block, Paragraph } from './model.js';
|
|
2
|
+
import { type XmlDocument } from './xml.js';
|
|
3
|
+
/** Warnings derived from raw XML feature scans (features not represented in the model at all). */
|
|
4
|
+
export declare function warningsFor(document: XmlDocument): string[];
|
|
5
|
+
/** Visits every paragraph in document order, including those nested in table cells. */
|
|
6
|
+
export declare function forEachParagraph(blocks: Block[], visit: (paragraph: Paragraph) => void): void;
|
|
7
|
+
/** Warnings derived from the parsed model: image kinds and bookmarks the model can't fully represent. */
|
|
8
|
+
export declare function imageAndBookmarkWarnings(blocks: Block[]): string[];
|
|
9
|
+
//# sourceMappingURL=parse-warnings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-warnings.d.ts","sourceRoot":"","sources":["../../src/docx/parse-warnings.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAwB,KAAK,WAAW,EAAmB,MAAM,UAAU,CAAC;AAMnF,kGAAkG;AAClG,wBAAgB,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,EAAE,CA2C3D;AAED,uFAAuF;AACvF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,GAAG,IAAI,CAK7F;AAED,yGAAyG;AACzG,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,CAmClE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DocumentModel, LoadedDocument } from './model.js';
|
|
2
|
+
export interface PackageContext {
|
|
3
|
+
original: Uint8Array;
|
|
4
|
+
sourceXml: string;
|
|
5
|
+
base: DocumentModel;
|
|
6
|
+
}
|
|
7
|
+
export declare function readPackage(input: Uint8Array | ArrayBuffer): Promise<{
|
|
8
|
+
model: DocumentModel;
|
|
9
|
+
context: PackageContext;
|
|
10
|
+
media: ReadonlyMap<string, Uint8Array>;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function loadDocx(input: Uint8Array | ArrayBuffer): Promise<LoadedDocument>;
|
|
13
|
+
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/docx/parse.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAS,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AA+BvE,MAAM,WAAW,cAAc;IAC9B,QAAQ,EAAE,UAAU,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,aAAa,CAAC;CACpB;AAED,wBAAsB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;IAC3E,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CACvC,CAAC,CAgLD;AAED,wBAAsB,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,CAUvF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type JSZip from 'jszip';
|
|
2
|
+
import type { PendingMediaPart } from './model.js';
|
|
3
|
+
import { RelationshipAllocator, type NewRelationship } from './relationship-allocator.js';
|
|
4
|
+
import type { DocPrIdAllocator } from './docpr-ids.js';
|
|
5
|
+
import type { XmlDocument } from './xml.js';
|
|
6
|
+
/** The relationships part for `partName`, e.g. word/_rels/header1.xml.rels. */
|
|
7
|
+
export declare function relationshipsPartFor(partName: string): string;
|
|
8
|
+
/** An allocator that avoids every id already used by the part's XML or declared in its .rels. */
|
|
9
|
+
export declare function allocatorForPart(zip: JSZip, partName: string, doc: XmlDocument, docPrIds?: DocPrIdAllocator): Promise<RelationshipAllocator>;
|
|
10
|
+
/** Adds `created` relationships to the part's .rels and writes any newly inserted media. */
|
|
11
|
+
export declare function writeNewRelationships(zip: JSZip, partName: string, created: readonly NewRelationship[], pendingMedia?: ReadonlyMap<string, PendingMediaPart>): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=part-relationships.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"part-relationships.d.ts","sourceRoot":"","sources":["../../src/docx/part-relationships.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAMnD,OAAO,EACN,qBAAqB,EAErB,KAAK,eAAe,EACpB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAK5C,+EAA+E;AAC/E,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAG7D;AAED,iGAAiG;AACjG,wBAAsB,gBAAgB,CACrC,GAAG,EAAE,KAAK,EACV,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,WAAW,EAChB,QAAQ,CAAC,EAAE,gBAAgB,GACzB,OAAO,CAAC,qBAAqB,CAAC,CAUhC;AAED,4FAA4F;AAC5F,wBAAsB,qBAAqB,CAC1C,GAAG,EAAE,KAAK,EACV,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,SAAS,eAAe,EAAE,EACnC,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAClD,OAAO,CAAC,IAAI,CAAC,CAyBf"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { isSafeHyperlinkHref } from '../opc/index.js';
|
|
2
|
+
import { DocPrIdAllocator } from './docpr-ids.js';
|
|
3
|
+
import { type XmlDocument } from './xml.js';
|
|
4
|
+
export declare const HYPERLINK_RELATIONSHIP_TYPE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink";
|
|
5
|
+
export declare const IMAGE_RELATIONSHIP_TYPE: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image";
|
|
6
|
+
export { isSafeHyperlinkHref };
|
|
7
|
+
export interface NewRelationship {
|
|
8
|
+
id: string;
|
|
9
|
+
type: string;
|
|
10
|
+
target: string;
|
|
11
|
+
mode: 'Internal' | 'External';
|
|
12
|
+
/** Absolute package part name (e.g. `word/media/image1.png`), set only for newly added media parts. */
|
|
13
|
+
partName?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Walks every element/attribute in a parsed document.xml to find relationship ids already in use. */
|
|
16
|
+
export declare function scanUsedRelationshipIds(doc: XmlDocument): Set<string>;
|
|
17
|
+
/** Allocates unused `rIdN` ids for new relationships introduced while applying a model diff. */
|
|
18
|
+
export declare class RelationshipAllocator {
|
|
19
|
+
private readonly used;
|
|
20
|
+
private readonly created;
|
|
21
|
+
private readonly imagePartToRelId;
|
|
22
|
+
/** Shared drawing-id allocator, so `wp:docPr` ids stay unique across every part of a save. */
|
|
23
|
+
readonly docPrIds: DocPrIdAllocator;
|
|
24
|
+
constructor(existingIds: Iterable<string>, docPrIds?: DocPrIdAllocator);
|
|
25
|
+
private nextId;
|
|
26
|
+
/** Registers a brand-new external hyperlink target and returns its relationship id. */
|
|
27
|
+
addExternalHyperlink(href: string): string;
|
|
28
|
+
/** Registers (once per part) a newly inserted image part and returns its relationship id. */
|
|
29
|
+
addImage(partName: string): string;
|
|
30
|
+
get newRelationships(): readonly NewRelationship[];
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=relationship-allocator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relationship-allocator.d.ts","sourceRoot":"","sources":["../../src/docx/relationship-allocator.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsB,mBAAmB,EAAsB,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAqB,KAAK,WAAW,EAAmB,MAAM,UAAU,CAAC;AAEhF,eAAO,MAAM,2BAA2B,iFAA+B,CAAC;AACxE,eAAO,MAAM,uBAAuB,6EAA2B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B,MAAM,WAAW,eAAe;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;IAC9B,uGAAuG;IACvG,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,sGAAsG;AACtG,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,CASrE;AAED,gGAAgG;AAChG,qBAAa,qBAAqB;IACjC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAc;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyB;IACjD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA6B;IAE9D,8FAA8F;IAC9F,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;gBAExB,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAE,gBAAyC;IAK9F,OAAO,CAAC,MAAM;IAMd,uFAAuF;IACvF,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAQ1C,6FAA6F;IAC7F,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAelC,IAAI,gBAAgB,IAAI,SAAS,eAAe,EAAE,CAEjD;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/docx/relationships.ts"],"names":[],"mappings":"AAGA,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,KAAK,YAAY,GACjB,MAAM,iBAAiB,CAAC;AAGzB,eAAO,MAAM,eAAe,uEAAO,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TableLook, TableStyleCatalog, TableStyleConditionalFormatting } from './table-model.js';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the table style's conditional formatting (banding, first/last row/col) for one cell.
|
|
4
|
+
* Direct `tcPr` values on the cell itself always take precedence over this result; callers merge
|
|
5
|
+
* it in as a fallback layer without ever writing it back into the model.
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveTableStyleFormatting(tableStyleId: string | undefined, catalog: TableStyleCatalog | undefined, look: TableLook | undefined, rowIndex: number, rowCount: number, colIndex: number, colCount: number): TableStyleConditionalFormatting;
|
|
8
|
+
//# sourceMappingURL=resolve-table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-table.d.ts","sourceRoot":"","sources":["../../src/docx/resolve-table.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEX,SAAS,EACT,iBAAiB,EACjB,+BAA+B,EAC/B,MAAM,kBAAkB,CAAC;AAmC1B;;;;GAIG;AACH,wBAAgB,2BAA2B,CAC1C,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,OAAO,EAAE,iBAAiB,GAAG,SAAS,EACtC,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACd,+BAA+B,CAiBjC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { DocumentModel } from './model.js';
|
|
2
|
+
export interface RevisionEntry {
|
|
3
|
+
id: string;
|
|
4
|
+
kind: 'insert' | 'delete' | 'moveFrom' | 'moveTo' | 'formatChange' | 'paragraphChange';
|
|
5
|
+
author: string;
|
|
6
|
+
date?: string;
|
|
7
|
+
paragraphId: string;
|
|
8
|
+
/** Present for run-level revisions; absent for paragraph mark/format revisions. */
|
|
9
|
+
runIndex?: number;
|
|
10
|
+
/** The move a `moveFrom`/`moveTo` revision belongs to; both sides resolve together. */
|
|
11
|
+
move?: {
|
|
12
|
+
name: string;
|
|
13
|
+
rangeId?: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/** Lists every run/paragraph revision in document order, for navigation and enumeration. */
|
|
17
|
+
export declare function listRevisions(model: DocumentModel): RevisionEntry[];
|
|
18
|
+
export declare function findRevision(model: DocumentModel, id: string): RevisionEntry | undefined;
|
|
19
|
+
/** Revision ids resolved together with `id`: every side of the same move, or just `id`. */
|
|
20
|
+
export declare function linkedRevisionIds(model: DocumentModel, id: string): string[];
|
|
21
|
+
/** Accepts one revision (both sides of a move): keeps insertions, drops deletions, clears format markers. */
|
|
22
|
+
export declare const acceptRevision: (model: DocumentModel, id: string) => DocumentModel;
|
|
23
|
+
/** Rejects one revision (both sides of a move): drops insertions, restores deletions. */
|
|
24
|
+
export declare const rejectRevision: (model: DocumentModel, id: string) => DocumentModel;
|
|
25
|
+
export declare const acceptAllRevisions: (model: DocumentModel) => DocumentModel;
|
|
26
|
+
export declare const rejectAllRevisions: (model: DocumentModel) => DocumentModel;
|
|
27
|
+
//# sourceMappingURL=revision-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revision-commands.d.ts","sourceRoot":"","sources":["../../src/docx/revision-commands.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAS,aAAa,EAAa,MAAM,YAAY,CAAC;AAElE,MAAM,WAAW,aAAa;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,cAAc,GAAG,iBAAiB,CAAC;IACvF,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uFAAuF;IACvF,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1C;AAUD,4FAA4F;AAC5F,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,aAAa,EAAE,CAYnE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAExF;AAiDD,2FAA2F;AAC3F,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAW5E;AAcD,6GAA6G;AAC7G,eAAO,MAAM,cAAc,GAAI,OAAO,aAAa,EAAE,IAAI,MAAM,KAAG,aAC9B,CAAC;AACrC,yFAAyF;AACzF,eAAO,MAAM,cAAc,GAAI,OAAO,aAAa,EAAE,IAAI,MAAM,KAAG,aAC9B,CAAC;AA0ErC,eAAO,MAAM,kBAAkB,GAAI,OAAO,aAAa,KAAG,aAC1B,CAAC;AACjC,eAAO,MAAM,kBAAkB,GAAI,OAAO,aAAa,KAAG,aAKxD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DocumentModel } from './model.js';
|
|
2
|
+
/**
|
|
3
|
+
* Renumbers editor-minted revision ids (such as `dve-rev-…`) to unused decimals, consistently
|
|
4
|
+
* wherever a revision appears, after the largest id in the source XML (`reservedMax`) and in the
|
|
5
|
+
* model. Returns the model unchanged when every id is already decimal.
|
|
6
|
+
*/
|
|
7
|
+
export declare function numberRevisionIds(model: DocumentModel, reservedMax?: number): DocumentModel;
|
|
8
|
+
/** The largest decimal `w:id` in a part's XML, so new ids never collide with existing markers. */
|
|
9
|
+
export declare function maxWordId(xml: string | undefined): number;
|
|
10
|
+
//# sourceMappingURL=revision-ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revision-ids.d.ts","sourceRoot":"","sources":["../../src/docx/revision-ids.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAS,aAAa,EAAuB,MAAM,YAAY,CAAC;AA8B5E;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,EAAE,WAAW,SAAK,GAAG,aAAa,CA4DvF;AAaD,kGAAkG;AAClG,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAKzD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ParagraphStyleCatalog, TextRun } from './model.js';
|
|
2
|
+
import type { RunFormatting, RunStyleCatalog } from './run-style-model.js';
|
|
3
|
+
export interface RunFormattingContext {
|
|
4
|
+
paragraphStyleId?: string | undefined;
|
|
5
|
+
paragraphCatalog?: ParagraphStyleCatalog | undefined;
|
|
6
|
+
runCatalog?: RunStyleCatalog | undefined;
|
|
7
|
+
/** Simple table style run formatting for the cell/region containing this run, if any. */
|
|
8
|
+
tableStyleRun?: RunFormatting;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Resolves default, style-chain and direct run formatting into one effective
|
|
12
|
+
* layer for display. Direct properties on `run` and the source catalogs are
|
|
13
|
+
* never mutated or flattened; this is purely a rendering-time projection.
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveRunFormatting(run: TextRun, context?: RunFormattingContext): RunFormatting;
|
|
16
|
+
//# sourceMappingURL=run-formatting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-formatting.d.ts","sourceRoot":"","sources":["../../src/docx/run-formatting.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AA6E3E,MAAM,WAAW,oBAAoB;IAEpC,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,gBAAgB,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;IACrD,UAAU,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IACzC,yFAAyF;IACzF,aAAa,CAAC,EAAE,aAAa,CAAC;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CACnC,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE,oBAAyB,GAChC,aAAa,CA0Cf"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RunFormatting } from './run-style-model.js';
|
|
2
|
+
import { type XmlElement } from './xml.js';
|
|
3
|
+
/** Shared `w:rPr` -> `RunFormatting` parsing, used for direct runs, docDefaults and style catalogs. */
|
|
4
|
+
export declare function parseRunProperties(props: XmlElement | undefined): RunFormatting;
|
|
5
|
+
//# sourceMappingURL=run-properties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-properties.d.ts","sourceRoot":"","sources":["../../src/docx/run-properties.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAgB1D,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAIxD,uGAAuG;AACvG,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,aAAa,CA4G/E"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TextRun } from './model.js';
|
|
2
|
+
/** Direct run properties supported by the editor for style/default resolution, in native Word units. */
|
|
3
|
+
export type RunFormatting = Pick<TextRun, 'bold' | 'italic' | 'underline' | 'underlineStyle' | 'underlineColor' | 'strike' | 'doubleStrike' | 'caps' | 'smallCaps' | 'vanish' | 'highlight' | 'verticalAlign' | 'fontSize' | 'fontFamily' | 'fontTheme' | 'color' | 'colorTheme' | 'characterSpacingTwips' | 'textScalePercent' | 'ligatures' | 'kerningHalfPoints' | 'positionHalfPoints' | 'shadingFill' | 'shadingThemeFill'>;
|
|
4
|
+
/** A `styles.xml` style carrying run formatting: a character style, or a paragraph style's `w:rPr`. */
|
|
5
|
+
export interface CharacterStyleDefinition {
|
|
6
|
+
id: string;
|
|
7
|
+
type: 'character' | 'paragraph';
|
|
8
|
+
name?: string;
|
|
9
|
+
basedOn?: string;
|
|
10
|
+
/** `w:link`; the paired style of the opposite kind sharing this style's look. */
|
|
11
|
+
linkedStyle?: string;
|
|
12
|
+
isDefault?: boolean;
|
|
13
|
+
formatting: RunFormatting;
|
|
14
|
+
}
|
|
15
|
+
/** Parsed run-level style data (docDefaults `rPrDefault` plus character/paragraph style `rPr`). Read-only catalog. */
|
|
16
|
+
export interface RunStyleCatalog {
|
|
17
|
+
docDefaults: RunFormatting;
|
|
18
|
+
styles: Record<string, CharacterStyleDefinition>;
|
|
19
|
+
warnings: string[];
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=run-style-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-style-model.d.ts","sourceRoot":"","sources":["../../src/docx/run-style-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C,wGAAwG;AACxG,MAAM,MAAM,aAAa,GAAG,IAAI,CAC/B,OAAO,EACL,MAAM,GACN,QAAQ,GACR,WAAW,GACX,gBAAgB,GAChB,gBAAgB,GAChB,QAAQ,GACR,cAAc,GACd,MAAM,GACN,WAAW,GACX,QAAQ,GACR,WAAW,GACX,eAAe,GACf,UAAU,GACV,YAAY,GACZ,WAAW,GACX,OAAO,GACP,YAAY,GACZ,uBAAuB,GACvB,kBAAkB,GAClB,WAAW,GACX,mBAAmB,GACnB,oBAAoB,GACpB,aAAa,GACb,kBAAkB,CACpB,CAAC;AACF,uGAAuG;AACvG,MAAM,WAAW,wBAAwB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,GAAG,WAAW,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,aAAa,CAAC;CAC1B;AACD,sHAAsH;AACtH,MAAM,WAAW,eAAe;IAC/B,WAAW,EAAE,aAAa,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;IACjD,QAAQ,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { DocumentModel, PendingMediaPart } from './model.js';
|
|
2
|
+
import type { PackageContext } from './parse.js';
|
|
3
|
+
export declare function remember(model: DocumentModel, context: PackageContext, base?: DocumentModel): void;
|
|
4
|
+
export declare function saveDocx(model: DocumentModel, pendingMedia?: ReadonlyMap<string, PendingMediaPart>): Promise<Uint8Array>;
|
|
5
|
+
//# sourceMappingURL=save.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save.d.ts","sourceRoot":"","sources":["../../src/docx/save.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAElE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAyBjD,wBAAgB,QAAQ,CACvB,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,cAAc,EACvB,IAAI,GAAE,aAA4B,GAChC,IAAI,CAEN;AAOD,wBAAsB,QAAQ,CAC7B,KAAK,EAAE,aAAa,EACpB,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAClD,OAAO,CAAC,UAAU,CAAC,CAmHrB"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { Block } from './model.js';
|
|
2
|
+
import type { StNumberFormat, StSectionMark, StVerticalJc } from './generated/wml-simple-types.js';
|
|
3
|
+
import type { TableBorderSide } from './table-model.js';
|
|
4
|
+
import type { SignedTwips, Twips } from './units.js';
|
|
5
|
+
/** A page border line; `spacePoints` is its `w:space` distance from the measured edge. */
|
|
6
|
+
export type PageBorderSide = TableBorderSide;
|
|
7
|
+
/** `w:pgBorders`: sides plus where they are measured from and on which pages they show. */
|
|
8
|
+
export interface PageBorders {
|
|
9
|
+
top?: PageBorderSide;
|
|
10
|
+
left?: PageBorderSide;
|
|
11
|
+
bottom?: PageBorderSide;
|
|
12
|
+
right?: PageBorderSide;
|
|
13
|
+
/** `w:offsetFrom`: `page` (default) measures from the page edge, `text` from the margins. */
|
|
14
|
+
offsetFrom?: 'page' | 'text';
|
|
15
|
+
display?: 'allPages' | 'firstPage' | 'notFirstPage';
|
|
16
|
+
zOrder?: 'front' | 'back';
|
|
17
|
+
}
|
|
18
|
+
/** Header/footer content, parsed with the same paragraph/table parser as the body. */
|
|
19
|
+
export interface HeaderFooterContent {
|
|
20
|
+
blocks: Block[];
|
|
21
|
+
/** The header or footer package part, e.g. `word/header1.xml`; several sections may share one. */
|
|
22
|
+
partName?: string;
|
|
23
|
+
/** Source package part to preserve XML and relationships when making an independent copy. */
|
|
24
|
+
sourcePartName?: string;
|
|
25
|
+
}
|
|
26
|
+
/** One `w:headerReference`/`w:footerReference` slot resolved into content, if present. */
|
|
27
|
+
export interface HeaderFooterSlots {
|
|
28
|
+
default?: HeaderFooterContent;
|
|
29
|
+
even?: HeaderFooterContent;
|
|
30
|
+
first?: HeaderFooterContent;
|
|
31
|
+
}
|
|
32
|
+
export interface SectionColumn {
|
|
33
|
+
widthTwips: Twips;
|
|
34
|
+
spacingTwips?: Twips;
|
|
35
|
+
}
|
|
36
|
+
/** `w:cols`: newspaper-style column layout for the section. */
|
|
37
|
+
export interface SectionColumns {
|
|
38
|
+
count: number;
|
|
39
|
+
spacingTwips?: Twips;
|
|
40
|
+
equalWidth: boolean;
|
|
41
|
+
separator?: boolean;
|
|
42
|
+
/** Present only when `equalWidth` is false and individual `w:col` widths were given. */
|
|
43
|
+
widths?: SectionColumn[];
|
|
44
|
+
}
|
|
45
|
+
export interface SectionPageNumbering {
|
|
46
|
+
start?: number;
|
|
47
|
+
/** Raw `w:pgNumType/@w:fmt` token, e.g. `decimal`, `upperRoman`. */
|
|
48
|
+
format?: StNumberFormat;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* One `w:sectPr` (paragraph-level section break or the final body section), in native Word
|
|
52
|
+
* units. The pagination engine is the primary consumer; this package does not lay out pages.
|
|
53
|
+
*/
|
|
54
|
+
export interface LineNumberSettings {
|
|
55
|
+
/** Show a number on every n-th line (`w:countBy`, at least 1). */
|
|
56
|
+
countBy: number;
|
|
57
|
+
/** First visible number of a restart (one more than the zero-based `w:start`, default 1). */
|
|
58
|
+
start: number;
|
|
59
|
+
/** `w:restart`: start over each page, each section, or never. */
|
|
60
|
+
restart: 'newPage' | 'newSection' | 'continuous';
|
|
61
|
+
/** Gap between the number and the text (`w:distance`); undefined lets the renderer choose. */
|
|
62
|
+
distanceTwips?: number;
|
|
63
|
+
}
|
|
64
|
+
export interface SectionProperties {
|
|
65
|
+
/** Id of the last block (paragraph or table) this section covers. */
|
|
66
|
+
endsAtBlockId: string;
|
|
67
|
+
type: StSectionMark;
|
|
68
|
+
pageWidthTwips: Twips;
|
|
69
|
+
pageHeightTwips: Twips;
|
|
70
|
+
orientation: 'portrait' | 'landscape';
|
|
71
|
+
marginTopTwips: SignedTwips;
|
|
72
|
+
marginRightTwips: Twips;
|
|
73
|
+
marginBottomTwips: SignedTwips;
|
|
74
|
+
marginLeftTwips: Twips;
|
|
75
|
+
headerDistanceTwips?: Twips;
|
|
76
|
+
footerDistanceTwips?: Twips;
|
|
77
|
+
gutterTwips?: Twips;
|
|
78
|
+
columns: SectionColumns;
|
|
79
|
+
/** `w:titlePg`: the section's first page uses distinct first-page headers/footers. */
|
|
80
|
+
titlePage?: boolean;
|
|
81
|
+
verticalAlign?: StVerticalJc;
|
|
82
|
+
pageNumbering?: SectionPageNumbering;
|
|
83
|
+
/** `w:lnNumType` is present (line numbers are on for this section). */
|
|
84
|
+
lineNumbering?: boolean;
|
|
85
|
+
/** The `w:lnNumType` values behind `lineNumbering`. */
|
|
86
|
+
lineNumberSettings?: LineNumberSettings;
|
|
87
|
+
/** `w:pgBorders`: the section's page border lines. */
|
|
88
|
+
pageBorders?: PageBorders;
|
|
89
|
+
headers?: HeaderFooterSlots;
|
|
90
|
+
footers?: HeaderFooterSlots;
|
|
91
|
+
}
|
|
92
|
+
/** One footnote or endnote body, parsed with the same paragraph/table parser as the body. */
|
|
93
|
+
export interface Note {
|
|
94
|
+
id: string;
|
|
95
|
+
blocks: Block[];
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=section-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section-model.d.ts","sourceRoot":"","sources":["../../src/docx/section-model.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACnG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAErD,0FAA0F;AAC1F,MAAM,MAAM,cAAc,GAAG,eAAe,CAAC;AAC7C,2FAA2F;AAC3F,MAAM,WAAW,WAAW;IAC3B,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,6FAA6F;IAC7F,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,cAAc,CAAC;IACpD,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC1B;AACD,sFAAsF;AACtF,MAAM,WAAW,mBAAmB;IACnC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,kGAAkG;IAClG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6FAA6F;IAC7F,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AACD,0FAA0F;AAC1F,MAAM,WAAW,iBAAiB;IACjC,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,KAAK,CAAC,EAAE,mBAAmB,CAAC;CAC5B;AACD,MAAM,WAAW,aAAa;IAC7B,UAAU,EAAE,KAAK,CAAC;IAClB,YAAY,CAAC,EAAE,KAAK,CAAC;CACrB;AACD,+DAA+D;AAC/D,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wFAAwF;IACxF,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;CACzB;AACD,MAAM,WAAW,oBAAoB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,MAAM,CAAC,EAAE,cAAc,CAAC;CACxB;AACD;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAClC,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,6FAA6F;IAC7F,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,OAAO,EAAE,SAAS,GAAG,YAAY,GAAG,YAAY,CAAC;IACjD,8FAA8F;IAC9F,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AACD,MAAM,WAAW,iBAAiB;IACjC,qEAAqE;IACrE,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,aAAa,CAAC;IACpB,cAAc,EAAE,KAAK,CAAC;IACtB,eAAe,EAAE,KAAK,CAAC;IACvB,WAAW,EAAE,UAAU,GAAG,WAAW,CAAC;IACtC,cAAc,EAAE,WAAW,CAAC;IAC5B,gBAAgB,EAAE,KAAK,CAAC;IACxB,iBAAiB,EAAE,WAAW,CAAC;IAC/B,eAAe,EAAE,KAAK,CAAC;IACvB,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAC5B,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAC5B,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,OAAO,EAAE,cAAc,CAAC;IACxB,sFAAsF;IACtF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,uEAAuE;IACvE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,uDAAuD;IACvD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,sDAAsD;IACtD,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AACD,6FAA6F;AAC7F,MAAM,WAAW,IAAI;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,KAAK,EAAE,CAAC;CAChB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Block, SectionProperties } from './model.js';
|
|
2
|
+
import { type XmlElement } from './xml.js';
|
|
3
|
+
export interface RawHeaderFooterRef {
|
|
4
|
+
slot: 'default' | 'even' | 'first';
|
|
5
|
+
rId: string;
|
|
6
|
+
}
|
|
7
|
+
/** A parsed `w:sectPr` before its header/footer relationship ids are resolved into content. */
|
|
8
|
+
export interface RawSection extends Omit<SectionProperties, 'headers' | 'footers'> {
|
|
9
|
+
headerRefs: RawHeaderFooterRef[];
|
|
10
|
+
footerRefs: RawHeaderFooterRef[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Parses every section in document order: one per paragraph whose `pPr` carries a `sectPr`
|
|
14
|
+
* (that paragraph ends the section), followed by the final body-level `sectPr`. Header/footer
|
|
15
|
+
* relationship ids are returned unresolved; see `document-parts.ts` for content resolution.
|
|
16
|
+
*/
|
|
17
|
+
export declare function parseRawSections(body: XmlElement, blocks: Block[]): RawSection[];
|
|
18
|
+
//# sourceMappingURL=sections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sections.d.ts","sourceRoot":"","sources":["../../src/docx/sections.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAkB,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,EAA2C,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAWpF,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IACnC,GAAG,EAAE,MAAM,CAAC;CACZ;AACD,+FAA+F;AAC/F,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,SAAS,CAAC;IACjF,UAAU,EAAE,kBAAkB,EAAE,CAAC;IACjC,UAAU,EAAE,kBAAkB,EAAE,CAAC;CACjC;AA0GD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE,CAqBhF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type JSZip from 'jszip';
|
|
2
|
+
/** Reads Word's Track Changes toggle (`w:trackRevisions`; `w:trackChanges` is accepted too). */
|
|
3
|
+
export declare function parseTrackChangesSetting(xml: string): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Sets or clears an on/off element in settings.xml, inserting it in schema order. Creates the
|
|
6
|
+
* settings part (with its relationship and content type) the first time it's needed.
|
|
7
|
+
*/
|
|
8
|
+
export declare function applySettingsFlag(zip: JSZip, name: string, enabled: boolean): Promise<void>;
|
|
9
|
+
/** Word's Review > Track Changes toggle, written as `w:trackRevisions`. */
|
|
10
|
+
export declare function applyTrackChangesSetting(zip: JSZip, enabled: boolean): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/docx/settings.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgH/B,gGAAgG;AAChG,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAM7D;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBjG;AAED,2EAA2E;AAC3E,wBAAsB,wBAAwB,CAAC,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAa1F"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type EighthPoints, type HalfPoints, type SignedTwips, type Twips } from './units.js';
|
|
2
|
+
import { type XmlElement } from './xml.js';
|
|
3
|
+
/** `ST_OnOff`: exactly true|false|on|off|1|0. */
|
|
4
|
+
export declare function parseOnOff(value: string | null | undefined): boolean | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* `CT_OnOff` element: absent element -> undefined (inherit); present without `w:val` -> true;
|
|
7
|
+
* an invalid `w:val` -> undefined rather than a guess.
|
|
8
|
+
*/
|
|
9
|
+
export declare function onOffElement(element: XmlElement | null | undefined): boolean | undefined;
|
|
10
|
+
/** A `CT_OnOff`-typed attribute (such as `w:firstRow` on `w:tblLook`); absent or invalid -> undefined. */
|
|
11
|
+
export declare const onOffAttribute: (element: XmlElement, name: string) => boolean | undefined;
|
|
12
|
+
/** `xsd:integer` that fits a safe JS integer. */
|
|
13
|
+
export declare function parseInteger(value: string | null | undefined): number | undefined;
|
|
14
|
+
/** `ST_DecimalNumber`-style non-negative integer. */
|
|
15
|
+
export declare function parseUnsignedInteger(value: string | null | undefined): number | undefined;
|
|
16
|
+
/** `ST_UniversalMeasure` (`1in`, `2.5cm`, `-3pt`...) converted to whole twips. */
|
|
17
|
+
export declare function universalMeasureToTwips(value: string): number | undefined;
|
|
18
|
+
/** `ST_SignedTwipsMeasure`: an integer or a universal measure, in twips. */
|
|
19
|
+
export declare function parseSignedTwips(value: string | null | undefined): SignedTwips | undefined;
|
|
20
|
+
/** `ST_TwipsMeasure`: like `parseSignedTwips` but negative values are rejected. */
|
|
21
|
+
export declare function parseTwips(value: string | null | undefined): Twips | undefined;
|
|
22
|
+
/** `ST_HpsMeasure`: non-negative half-points, or a positive universal measure (`12pt`). */
|
|
23
|
+
export declare function parseHalfPoints(value: string | null | undefined): HalfPoints | undefined;
|
|
24
|
+
/** `ST_SignedHpsMeasure`: signed half-points, including universal measures. */
|
|
25
|
+
export declare function parseSignedHalfPoints(value: string | null | undefined): HalfPoints | undefined;
|
|
26
|
+
/** `ST_TextScale`: whole-number horizontal scaling, from 0 through 600 percent. */
|
|
27
|
+
export declare function parseTextScale(value: string | null | undefined): number | undefined;
|
|
28
|
+
/** `ST_EighthPointMeasure`: non-negative integer eighths of a point. */
|
|
29
|
+
export declare function parseEighthPoints(value: string | null | undefined): EighthPoints | undefined;
|
|
30
|
+
/** `ST_HexColor`: `auto` or six hex digits, returned as `#RRGGBB` (case preserved). */
|
|
31
|
+
export type HexColor = 'auto' | `#${string}`;
|
|
32
|
+
export declare function parseHexColor(value: string | null | undefined): HexColor | undefined;
|
|
33
|
+
/** Like `parseHexColor` for the many attributes where `auto` carries no explicit color. */
|
|
34
|
+
export declare function parseRgbColor(value: string | null | undefined): `#${string}` | undefined;
|
|
35
|
+
/** `ST_UcharHexNumber` tint/shade (two hex digits) as a 0..1 fraction. */
|
|
36
|
+
export declare function parseTintShade(value: string | null | undefined): number | undefined;
|
|
37
|
+
//# sourceMappingURL=simple-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple-types.d.ts","sourceRoot":"","sources":["../../src/docx/simple-types.ts"],"names":[],"mappings":"AAGA,OAAO,EAKN,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,KAAK,EACV,MAAM,YAAY,CAAC;AACpB,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAEjD,iDAAiD;AACjD,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAahF;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAIxF;AAED,0GAA0G;AAC1G,eAAO,MAAM,cAAc,GAAI,SAAS,UAAU,EAAE,MAAM,MAAM,KAAG,OAAO,GAAG,SAC7C,CAAC;AAGjC,iDAAiD;AACjD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAIjF;AACD,qDAAqD;AACrD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGzF;AAKD,kFAAkF;AAClF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMzE;AAED,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAK1F;AACD,mFAAmF;AACnF,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,CAG9E;AAED,2FAA2F;AAC3F,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CASxF;AACD,+EAA+E;AAC/E,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAS9F;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAKnF;AAED,wEAAwE;AACxE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAG5F;AAED,uFAAuF;AACvF,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;AAC7C,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAIpF;AACD,2FAA2F;AAC3F,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,MAAM,EAAE,GAAG,SAAS,CAGxF;AACD,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAEnF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type JSZip from 'jszip';
|
|
2
|
+
import type { DocumentModel } from './model.js';
|
|
3
|
+
import type { ParagraphStyleCatalog } from './model-paragraph.js';
|
|
4
|
+
/** Whether the only difference between the two style catalogs is style-level `numbering`. */
|
|
5
|
+
export declare function differsOnlyByStyleNumbering(next: ParagraphStyleCatalog | undefined, prior: ParagraphStyleCatalog | undefined): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Writes style-level `numPr` changes (heading-linked lists) into the existing `word/styles.xml`.
|
|
8
|
+
* Only `numbering` of styles already in the package may change; everything else is preserved.
|
|
9
|
+
*/
|
|
10
|
+
export declare function applyStyleNumbering(zip: JSZip, model: DocumentModel, base: DocumentModel): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=style-numbering-package.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style-numbering-package.d.ts","sourceRoot":"","sources":["../../src/docx/style-numbering-package.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AA8BlE,6FAA6F;AAC7F,wBAAgB,2BAA2B,CAC1C,IAAI,EAAE,qBAAqB,GAAG,SAAS,EACvC,KAAK,EAAE,qBAAqB,GAAG,SAAS,GACtC,OAAO,CAET;AA2BD;;;GAGG;AACH,wBAAsB,mBAAmB,CACxC,GAAG,EAAE,KAAK,EACV,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE,aAAa,GACjB,OAAO,CAAC,IAAI,CAAC,CAmBf"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Paragraph, TabStop } from './model.js';
|
|
2
|
+
import { type XmlDocument, type XmlElement } from './xml.js';
|
|
3
|
+
export declare function parseTabStops(tabs: XmlElement | undefined): TabStop[];
|
|
4
|
+
/** Rewrites `w:tabs` when the paragraph's tab stops changed. */
|
|
5
|
+
export declare function writeTabStops(doc: XmlDocument, props: XmlElement, paragraph: Paragraph, base?: Paragraph): void;
|
|
6
|
+
/** Sorts `w:pPr` children into schema order. */
|
|
7
|
+
export declare function orderParagraphProperties(props: XmlElement): void;
|
|
8
|
+
//# sourceMappingURL=tab-stops.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab-stops.d.ts","sourceRoot":"","sources":["../../src/docx/tab-stops.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAKrD,OAAO,EAMN,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,MAAM,UAAU,CAAC;AAElB,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,EAAE,CAUrE;AAED,gEAAgE;AAChE,wBAAgB,aAAa,CAC5B,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,SAAS,EACpB,IAAI,CAAC,EAAE,SAAS,GACd,IAAI,CAcN;AA0CD,gDAAgD;AAChD,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAEhE"}
|