superdoc 2.2.0 → 2.3.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/AGENTS.md +337 -0
- package/LICENSE +661 -0
- package/NOTICE +8 -0
- package/README.md +107 -0
- package/dist/chunks/FindReplaceSurface-BEW-1NhM.es.js +344 -0
- package/dist/chunks/FindReplaceSurface-DLxnCQOB.cjs +346 -0
- package/dist/chunks/PasswordPromptSurface-BA6HHqEa.es.js +111 -0
- package/dist/chunks/PasswordPromptSurface-DMbfDvpQ.cjs +113 -0
- package/dist/chunks/PdfViewer-CNOtyS-I.es.js +531 -0
- package/dist/chunks/PdfViewer-CoFiGAhm.cjs +535 -0
- package/dist/chunks/_plugin-vue_export-helper-BTwbGDKw.cjs +11 -0
- package/dist/chunks/_plugin-vue_export-helper-CInC0bKI.es.js +6 -0
- package/dist/chunks/blank-docx-CJAXnJKp.es.js +2 -0
- package/dist/chunks/blank-docx-DA-G-3VB.cjs +7 -0
- package/dist/chunks/constants-CY3R3_kF.es.js +3 -0
- package/dist/chunks/constants-sbCZ2O_A.cjs +14 -0
- package/dist/chunks/create-super-doc-ui-CXCqHc2m.cjs +9451 -0
- package/dist/chunks/create-super-doc-ui-fxF2Q8Ib.es.js +9188 -0
- package/dist/chunks/eventemitter3-B60Fsz-a.es.js +131 -0
- package/dist/chunks/eventemitter3-DCfwFVNn.cjs +137 -0
- package/dist/chunks/jszip-BdUBlUeG.cjs +4679 -0
- package/dist/chunks/jszip-DzmwAHr3.es.js +4650 -0
- package/dist/chunks/rolldown-runtime-BJVcqBbz.es.js +43 -0
- package/dist/chunks/rolldown-runtime-_dR15c8t.cjs +68 -0
- package/dist/chunks/uuid-B2Sqk-3p.es.js +32 -0
- package/dist/chunks/uuid-CFp0WGVU.cjs +38 -0
- package/dist/collaboration-upgrade-engine.cjs +37 -0
- package/dist/collaboration-upgrade-engine.es.js +30 -0
- package/dist/document-api/src/authorities/authorities.d.ts +29 -0
- package/dist/document-api/src/authorities/authorities.types.d.ts +113 -0
- package/dist/document-api/src/blocks/blocks.d.ts +29 -0
- package/dist/document-api/src/bookmarks/bookmarks.d.ts +15 -0
- package/dist/document-api/src/bookmarks/bookmarks.types.d.ts +82 -0
- package/dist/document-api/src/capabilities/capabilities.d.ts +82 -0
- package/dist/document-api/src/captions/captions.d.ts +17 -0
- package/dist/document-api/src/captions/captions.types.d.ts +61 -0
- package/dist/document-api/src/citations/citations.d.ts +39 -0
- package/dist/document-api/src/citations/citations.types.d.ts +151 -0
- package/dist/document-api/src/clear-content/clear-content.d.ts +25 -0
- package/dist/document-api/src/clipboard/clipboard.d.ts +11 -0
- package/dist/document-api/src/comments/comments.d.ts +222 -0
- package/dist/document-api/src/comments/comments.types.d.ts +227 -0
- package/dist/document-api/src/content-controls/content-controls.d.ts +136 -0
- package/dist/document-api/src/content-controls/content-controls.types.d.ts +453 -0
- package/dist/document-api/src/contract/command-catalog.d.ts +17 -0
- package/dist/document-api/src/contract/index.d.ts +9 -0
- package/dist/document-api/src/contract/metadata-types.d.ts +30 -0
- package/dist/document-api/src/contract/operation-definitions.d.ts +3645 -0
- package/dist/document-api/src/contract/operation-map.d.ts +5 -0
- package/dist/document-api/src/contract/operation-registry.d.ts +2002 -0
- package/dist/document-api/src/contract/reference-aliases.d.ts +19 -0
- package/dist/document-api/src/contract/reference-doc-map.d.ts +12 -0
- package/dist/document-api/src/contract/schemas.d.ts +35 -0
- package/dist/document-api/src/contract/step-op-catalog.d.ts +26 -0
- package/dist/document-api/src/contract/types.d.ts +31 -0
- package/dist/document-api/src/create/create.d.ts +27 -0
- package/dist/document-api/src/cross-refs/cross-refs.d.ts +15 -0
- package/dist/document-api/src/cross-refs/cross-refs.types.d.ts +68 -0
- package/dist/document-api/src/customXml/customXml.d.ts +19 -0
- package/dist/document-api/src/customXml/customXml.types.d.ts +148 -0
- package/dist/document-api/src/delete/delete.d.ts +20 -0
- package/dist/document-api/src/diff/diff.d.ts +14 -0
- package/dist/document-api/src/diff/diff.types.d.ts +83 -0
- package/dist/document-api/src/diff/index.d.ts +3 -0
- package/dist/document-api/src/errors.d.ts +11 -0
- package/dist/document-api/src/export/export.d.ts +10 -0
- package/dist/document-api/src/export/export.types.d.ts +40 -0
- package/dist/document-api/src/extract/extract.d.ts +15 -0
- package/dist/document-api/src/fields/fields.d.ts +15 -0
- package/dist/document-api/src/fields/fields.types.d.ts +90 -0
- package/dist/document-api/src/find/find.d.ts +52 -0
- package/dist/document-api/src/footnotes/footnotes.d.ts +17 -0
- package/dist/document-api/src/footnotes/footnotes.types.d.ts +104 -0
- package/dist/document-api/src/format/format.d.ts +92 -0
- package/dist/document-api/src/format/inline-run-patch.d.ts +138 -0
- package/dist/document-api/src/get/get.d.ts +19 -0
- package/dist/document-api/src/get-html/get-html.d.ts +27 -0
- package/dist/document-api/src/get-markdown/get-markdown.d.ts +22 -0
- package/dist/document-api/src/get-node/get-node.d.ts +46 -0
- package/dist/document-api/src/get-text/get-text.d.ts +22 -0
- package/dist/document-api/src/header-footers/header-footers.d.ts +37 -0
- package/dist/document-api/src/header-footers/header-footers.types.d.ts +116 -0
- package/dist/document-api/src/history/history.d.ts +38 -0
- package/dist/document-api/src/history/history.types.d.ts +100 -0
- package/dist/document-api/src/hyperlinks/hyperlinks.d.ts +17 -0
- package/dist/document-api/src/hyperlinks/hyperlinks.types.d.ts +112 -0
- package/dist/document-api/src/images/images.d.ts +63 -0
- package/dist/document-api/src/images/images.types.d.ts +209 -0
- package/dist/document-api/src/images/z-order.d.ts +10 -0
- package/dist/document-api/src/index/index.d.ts +29 -0
- package/dist/document-api/src/index/index.types.d.ts +125 -0
- package/dist/document-api/src/index.d.ts +560 -0
- package/dist/document-api/src/info/info.d.ts +19 -0
- package/dist/document-api/src/inline-semantics/directives.d.ts +95 -0
- package/dist/document-api/src/inline-semantics/error-types.d.ts +68 -0
- package/dist/document-api/src/inline-semantics/index.d.ts +20 -0
- package/dist/document-api/src/inline-semantics/property-ids.d.ts +24 -0
- package/dist/document-api/src/inline-semantics/token-parsers.d.ts +59 -0
- package/dist/document-api/src/inline-semantics/token-sets.d.ts +34 -0
- package/dist/document-api/src/insert/insert.d.ts +65 -0
- package/dist/document-api/src/invoke/invoke.d.ts +17 -0
- package/dist/document-api/src/lists/lists.d.ts +100 -0
- package/dist/document-api/src/lists/lists.types.d.ts +499 -0
- package/dist/document-api/src/markdown-to-fragment/markdown-to-fragment.d.ts +15 -0
- package/dist/document-api/src/metadata/anchored-metadata.d.ts +33 -0
- package/dist/document-api/src/metadata/anchored-metadata.types.d.ts +175 -0
- package/dist/document-api/src/paragraphs/paragraphs.d.ts +84 -0
- package/dist/document-api/src/paragraphs/paragraphs.types.d.ts +214 -0
- package/dist/document-api/src/permission-ranges/permission-ranges.d.ts +15 -0
- package/dist/document-api/src/permission-ranges/permission-ranges.types.d.ts +49 -0
- package/dist/document-api/src/plan/plan.d.ts +73 -0
- package/dist/document-api/src/protection/protection.d.ts +11 -0
- package/dist/document-api/src/protection/protection.types.d.ts +47 -0
- package/dist/document-api/src/ranges/index.d.ts +2 -0
- package/dist/document-api/src/ranges/ranges.types.d.ts +121 -0
- package/dist/document-api/src/ranges/resolve.d.ts +2 -0
- package/dist/document-api/src/receipt-bridge.d.ts +30 -0
- package/dist/document-api/src/replace/replace.d.ts +24 -0
- package/dist/document-api/src/sections/sections.d.ts +42 -0
- package/dist/document-api/src/sections/sections.types.d.ts +236 -0
- package/dist/document-api/src/selection/selection.d.ts +23 -0
- package/dist/document-api/src/selection/selection.types.d.ts +85 -0
- package/dist/document-api/src/selection-mutation.d.ts +46 -0
- package/dist/document-api/src/styles/apply.d.ts +142 -0
- package/dist/document-api/src/styles/catalog.d.ts +154 -0
- package/dist/document-api/src/styles/index.d.ts +14 -0
- package/dist/document-api/src/styles/registry.d.ts +43 -0
- package/dist/document-api/src/styles/schema.d.ts +9 -0
- package/dist/document-api/src/styles/validation.d.ts +38 -0
- package/dist/document-api/src/tables/color-formats.d.ts +12 -0
- package/dist/document-api/src/tables/tables.d.ts +83 -0
- package/dist/document-api/src/templates/apply.d.ts +160 -0
- package/dist/document-api/src/templates/index.d.ts +7 -0
- package/dist/document-api/src/toc/toc.d.ts +25 -0
- package/dist/document-api/src/toc/toc.types.d.ts +247 -0
- package/dist/document-api/src/track-changes/track-changes.d.ts +177 -0
- package/dist/document-api/src/types/adapter-result.d.ts +10 -0
- package/dist/document-api/src/types/address.d.ts +169 -0
- package/dist/document-api/src/types/base.d.ts +89 -0
- package/dist/document-api/src/types/blocks.types.d.ts +190 -0
- package/dist/document-api/src/types/clipboard.d.ts +216 -0
- package/dist/document-api/src/types/comments.types.d.ts +17 -0
- package/dist/document-api/src/types/create.types.d.ts +56 -0
- package/dist/document-api/src/types/discovery.d.ts +99 -0
- package/dist/document-api/src/types/extract.types.d.ts +163 -0
- package/dist/document-api/src/types/fragment.d.ts +29 -0
- package/dist/document-api/src/types/index.d.ts +30 -0
- package/dist/document-api/src/types/info.types.d.ts +109 -0
- package/dist/document-api/src/types/inline.types.d.ts +28 -0
- package/dist/document-api/src/types/media.types.d.ts +72 -0
- package/dist/document-api/src/types/mutation-plan.types.d.ts +264 -0
- package/dist/document-api/src/types/node.d.ts +9 -0
- package/dist/document-api/src/types/paragraph.types.d.ts +61 -0
- package/dist/document-api/src/types/placement.d.ts +24 -0
- package/dist/document-api/src/types/query-match.types.d.ts +212 -0
- package/dist/document-api/src/types/query.d.ts +133 -0
- package/dist/document-api/src/types/receipt.d.ts +191 -0
- package/dist/document-api/src/types/references.types.d.ts +9 -0
- package/dist/document-api/src/types/sd-contract.d.ts +54 -0
- package/dist/document-api/src/types/sd-envelope.d.ts +59 -0
- package/dist/document-api/src/types/sd-nodes.d.ts +375 -0
- package/dist/document-api/src/types/sd-objects.d.ts +144 -0
- package/dist/document-api/src/types/sd-props.d.ts +240 -0
- package/dist/document-api/src/types/sd-sections.d.ts +126 -0
- package/dist/document-api/src/types/sd-styles.d.ts +36 -0
- package/dist/document-api/src/types/step-manifest.types.d.ts +30 -0
- package/dist/document-api/src/types/story.types.d.ts +123 -0
- package/dist/document-api/src/types/structural-input.d.ts +40 -0
- package/dist/document-api/src/types/structured.types.d.ts +21 -0
- package/dist/document-api/src/types/style-policy.types.d.ts +49 -0
- package/dist/document-api/src/types/table-operations.types.d.ts +618 -0
- package/dist/document-api/src/types/tables.types.d.ts +43 -0
- package/dist/document-api/src/types/toc.types.d.ts +1 -0
- package/dist/document-api/src/types/track-changes.types.d.ts +703 -0
- package/dist/document-api/src/validation/create-location-validator.d.ts +2 -0
- package/dist/document-api/src/validation/fragment-validator.d.ts +13 -0
- package/dist/document-api/src/validation/selection-target-validator.d.ts +7 -0
- package/dist/document-api/src/validation/story-validator.d.ts +12 -0
- package/dist/document-api/src/validation-primitives.d.ts +29 -0
- package/dist/document-api/src/write/locator.d.ts +24 -0
- package/dist/document-api/src/write/write.d.ts +73 -0
- package/dist/images/altText_add.svg +3 -0
- package/dist/images/altText_disclaimer.svg +3 -0
- package/dist/images/altText_done.svg +3 -0
- package/dist/images/altText_spinner.svg +30 -0
- package/dist/images/altText_warning.svg +3 -0
- package/dist/images/annotation-check.svg +11 -0
- package/dist/images/annotation-comment.svg +16 -0
- package/dist/images/annotation-help.svg +26 -0
- package/dist/images/annotation-insert.svg +10 -0
- package/dist/images/annotation-key.svg +11 -0
- package/dist/images/annotation-newparagraph.svg +11 -0
- package/dist/images/annotation-noicon.svg +7 -0
- package/dist/images/annotation-note.svg +42 -0
- package/dist/images/annotation-paperclip.svg +6 -0
- package/dist/images/annotation-paragraph.svg +16 -0
- package/dist/images/annotation-pushpin.svg +7 -0
- package/dist/images/checkmark.svg +5 -0
- package/dist/images/comment-actionsButton.svg +3 -0
- package/dist/images/comment-closeButton.svg +3 -0
- package/dist/images/comment-editButton.svg +8 -0
- package/dist/images/comment-popup-editButton.svg +5 -0
- package/dist/images/cursor-editorFreeHighlight.svg +6 -0
- package/dist/images/cursor-editorFreeText.svg +3 -0
- package/dist/images/cursor-editorInk.svg +4 -0
- package/dist/images/cursor-editorTextHighlight.svg +8 -0
- package/dist/images/editor-toolbar-delete.svg +5 -0
- package/dist/images/editor-toolbar-edit.svg +3 -0
- package/dist/images/findbarButton-next.svg +3 -0
- package/dist/images/findbarButton-previous.svg +3 -0
- package/dist/images/gv-toolbarButton-download.svg +3 -0
- package/dist/images/loading-icon.gif +0 -0
- package/dist/images/loading.svg +1 -0
- package/dist/images/messageBar_closingButton.svg +3 -0
- package/dist/images/messageBar_info.svg +3 -0
- package/dist/images/messageBar_warning.svg +3 -0
- package/dist/images/pages_closeButton.svg +3 -0
- package/dist/images/pages_selected.svg +7 -0
- package/dist/images/pages_viewArrow.svg +3 -0
- package/dist/images/pages_viewButton.svg +3 -0
- package/dist/images/secondaryToolbarButton-documentProperties.svg +3 -0
- package/dist/images/secondaryToolbarButton-firstPage.svg +3 -0
- package/dist/images/secondaryToolbarButton-handTool.svg +3 -0
- package/dist/images/secondaryToolbarButton-lastPage.svg +3 -0
- package/dist/images/secondaryToolbarButton-rotateCcw.svg +3 -0
- package/dist/images/secondaryToolbarButton-rotateCw.svg +3 -0
- package/dist/images/secondaryToolbarButton-scrollHorizontal.svg +3 -0
- package/dist/images/secondaryToolbarButton-scrollPage.svg +3 -0
- package/dist/images/secondaryToolbarButton-scrollVertical.svg +3 -0
- package/dist/images/secondaryToolbarButton-scrollWrapped.svg +3 -0
- package/dist/images/secondaryToolbarButton-selectTool.svg +3 -0
- package/dist/images/secondaryToolbarButton-spreadEven.svg +3 -0
- package/dist/images/secondaryToolbarButton-spreadNone.svg +3 -0
- package/dist/images/secondaryToolbarButton-spreadOdd.svg +3 -0
- package/dist/images/toolbarButton-bookmark.svg +3 -0
- package/dist/images/toolbarButton-currentOutlineItem.svg +3 -0
- package/dist/images/toolbarButton-download.svg +4 -0
- package/dist/images/toolbarButton-editorFreeText.svg +5 -0
- package/dist/images/toolbarButton-editorHighlight.svg +6 -0
- package/dist/images/toolbarButton-editorInk.svg +4 -0
- package/dist/images/toolbarButton-editorSignature.svg +6 -0
- package/dist/images/toolbarButton-editorStamp.svg +8 -0
- package/dist/images/toolbarButton-menuArrow.svg +3 -0
- package/dist/images/toolbarButton-openFile.svg +3 -0
- package/dist/images/toolbarButton-pageDown.svg +3 -0
- package/dist/images/toolbarButton-pageUp.svg +3 -0
- package/dist/images/toolbarButton-presentationMode.svg +3 -0
- package/dist/images/toolbarButton-print.svg +3 -0
- package/dist/images/toolbarButton-search.svg +3 -0
- package/dist/images/toolbarButton-secondaryToolbarToggle.svg +3 -0
- package/dist/images/toolbarButton-viewAttachments.svg +3 -0
- package/dist/images/toolbarButton-viewLayers.svg +3 -0
- package/dist/images/toolbarButton-viewOutline.svg +3 -0
- package/dist/images/toolbarButton-viewThumbnail.svg +3 -0
- package/dist/images/toolbarButton-viewsManagerToggle.svg +3 -0
- package/dist/images/toolbarButton-zoomIn.svg +3 -0
- package/dist/images/toolbarButton-zoomOut.svg +3 -0
- package/dist/images/treeitem-collapsed.svg +1 -0
- package/dist/images/treeitem-expanded.svg +1 -0
- package/dist/layout-engine/contracts/src/author-colors.d.ts +56 -0
- package/dist/layout-engine/contracts/src/cell-spacing.d.ts +12 -0
- package/dist/layout-engine/contracts/src/clip-path-inset.d.ts +27 -0
- package/dist/layout-engine/contracts/src/column-layout.d.ts +79 -0
- package/dist/layout-engine/contracts/src/direction-context.d.ts +219 -0
- package/dist/layout-engine/contracts/src/drawing-taxonomy.d.ts +126 -0
- package/dist/layout-engine/contracts/src/engines/image-wrap.d.ts +54 -0
- package/dist/layout-engine/contracts/src/engines/index.d.ts +17 -0
- package/dist/layout-engine/contracts/src/engines/lists.d.ts +57 -0
- package/dist/layout-engine/contracts/src/engines/paragraph.d.ts +59 -0
- package/dist/layout-engine/contracts/src/engines/tables.d.ts +89 -0
- package/dist/layout-engine/contracts/src/engines/tabs.d.ts +117 -0
- package/dist/layout-engine/contracts/src/graphic-placement.d.ts +76 -0
- package/dist/layout-engine/contracts/src/header-footer-inheritance.d.ts +22 -0
- package/dist/layout-engine/contracts/src/header-footer-resolution.d.ts +28 -0
- package/dist/layout-engine/contracts/src/incremental-dependency.d.ts +10 -0
- package/dist/layout-engine/contracts/src/index.d.ts +2459 -0
- package/dist/layout-engine/contracts/src/justify-utils.d.ts +98 -0
- package/dist/layout-engine/contracts/src/layout-identity.d.ts +136 -0
- package/dist/layout-engine/contracts/src/ooxml-z-index.d.ts +46 -0
- package/dist/layout-engine/contracts/src/page-number-formatting.d.ts +26 -0
- package/dist/layout-engine/contracts/src/page-ref-anchor.d.ts +2 -0
- package/dist/layout-engine/contracts/src/pm-range.d.ts +45 -0
- package/dist/layout-engine/contracts/src/resolved-layout.d.ts +541 -0
- package/dist/layout-engine/contracts/src/run-helpers.d.ts +23 -0
- package/dist/layout-engine/contracts/src/sdt-container.d.ts +13 -0
- package/dist/layout-engine/contracts/src/segment-geometry.d.ts +192 -0
- package/dist/layout-engine/contracts/src/semantic-colors.d.ts +150 -0
- package/dist/layout-engine/contracts/src/table-cell-spacing.d.ts +12 -0
- package/dist/layout-engine/contracts/src/table-column-rescale.d.ts +13 -0
- package/dist/layout-engine/contracts/src/vertical-text.d.ts +43 -0
- package/dist/layout-engine/dom-contract/src/class-names.d.ts +62 -0
- package/dist/layout-engine/dom-contract/src/data-attrs.d.ts +103 -0
- package/dist/layout-engine/dom-contract/src/index.d.ts +18 -0
- package/dist/layout-engine/dom-contract/src/selectors.d.ts +47 -0
- package/dist/layout-engine/layout-bridge/src/cache-warmer.d.ts +73 -0
- package/dist/layout-engine/layout-bridge/src/cache.d.ts +143 -0
- package/dist/layout-engine/layout-bridge/src/cacheInvalidation.d.ts +117 -0
- package/dist/layout-engine/layout-bridge/src/cursor-renderer.d.ts +201 -0
- package/dist/layout-engine/layout-bridge/src/debounced-passes.d.ts +130 -0
- package/dist/layout-engine/layout-bridge/src/diff.d.ts +36 -0
- package/dist/layout-engine/layout-bridge/src/dirty-tracker.d.ts +128 -0
- package/dist/layout-engine/layout-bridge/src/dom-mapping.d.ts +80 -0
- package/dist/layout-engine/layout-bridge/src/featureFlags.d.ts +95 -0
- package/dist/layout-engine/layout-bridge/src/field-annotation-key.d.ts +2 -0
- package/dist/layout-engine/layout-bridge/src/focus-watchdog.d.ts +170 -0
- package/dist/layout-engine/layout-bridge/src/font-metrics-cache.d.ts +164 -0
- package/dist/layout-engine/layout-bridge/src/footnote-scorer.d.ts +63 -0
- package/dist/layout-engine/layout-bridge/src/headerFooterUtils.d.ts +218 -0
- package/dist/layout-engine/layout-bridge/src/ime-handler.d.ts +81 -0
- package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +390 -0
- package/dist/layout-engine/layout-bridge/src/index.d.ts +211 -0
- package/dist/layout-engine/layout-bridge/src/instrumentation.d.ts +245 -0
- package/dist/layout-engine/layout-bridge/src/layoutHeaderFooter.d.ts +123 -0
- package/dist/layout-engine/layout-bridge/src/list-indent-utils.d.ts +205 -0
- package/dist/layout-engine/layout-bridge/src/local-paragraph-layout.d.ts +93 -0
- package/dist/layout-engine/layout-bridge/src/neutral-hit.d.ts +142 -0
- package/dist/layout-engine/layout-bridge/src/neutral-segment-geometry.d.ts +32 -0
- package/dist/layout-engine/layout-bridge/src/page-geometry-helper.d.ts +197 -0
- package/dist/layout-engine/layout-bridge/src/paragraph-hash-utils.d.ts +126 -0
- package/dist/layout-engine/layout-bridge/src/paragraph-line-cache.d.ts +152 -0
- package/dist/layout-engine/layout-bridge/src/performance-metrics.d.ts +249 -0
- package/dist/layout-engine/layout-bridge/src/pm-dom-fallback.d.ts +188 -0
- package/dist/layout-engine/layout-bridge/src/pm-position-validator.d.ts +100 -0
- package/dist/layout-engine/layout-bridge/src/position-hit.d.ts +167 -0
- package/dist/layout-engine/layout-bridge/src/remeasure.d.ts +75 -0
- package/dist/layout-engine/layout-bridge/src/resolveHeaderFooterTokens.d.ts +76 -0
- package/dist/layout-engine/layout-bridge/src/rtl-text-geometry.d.ts +34 -0
- package/dist/layout-engine/layout-bridge/src/run-visual-marks.d.ts +12 -0
- package/dist/layout-engine/layout-bridge/src/safety-net.d.ts +234 -0
- package/dist/layout-engine/layout-bridge/src/sectionAwareHeaderFooter.d.ts +15 -0
- package/dist/layout-engine/layout-bridge/src/table-handler.d.ts +86 -0
- package/dist/layout-engine/layout-bridge/src/text-boundaries.d.ts +17 -0
- package/dist/layout-engine/layout-bridge/src/text-measurement.d.ts +69 -0
- package/dist/layout-engine/layout-bridge/src/track-changes-handler.d.ts +90 -0
- package/dist/layout-engine/layout-bridge/src/tracked-changes-utils.d.ts +41 -0
- package/dist/layout-engine/layout-engine/src/anchors.d.ts +52 -0
- package/dist/layout-engine/layout-engine/src/column-balancing.d.ts +255 -0
- package/dist/layout-engine/layout-engine/src/column-utils.d.ts +1 -0
- package/dist/layout-engine/layout-engine/src/floating-objects.d.ts +60 -0
- package/dist/layout-engine/layout-engine/src/floating-table-anchor.d.ts +21 -0
- package/dist/layout-engine/layout-engine/src/index.d.ts +349 -0
- package/dist/layout-engine/layout-engine/src/layout-drawing.d.ts +60 -0
- package/dist/layout-engine/layout-engine/src/layout-image.d.ts +16 -0
- package/dist/layout-engine/layout-engine/src/layout-paragraph.d.ts +101 -0
- package/dist/layout-engine/layout-engine/src/layout-table.d.ts +71 -0
- package/dist/layout-engine/layout-engine/src/layout-textbox.d.ts +4 -0
- package/dist/layout-engine/layout-engine/src/layout-utils.d.ts +104 -0
- package/dist/layout-engine/layout-engine/src/normalize-header-footer-fragments.d.ts +45 -0
- package/dist/layout-engine/layout-engine/src/pageNumbering.d.ts +73 -0
- package/dist/layout-engine/layout-engine/src/paginator.d.ts +131 -0
- package/dist/layout-engine/layout-engine/src/paragraph-layout-eligibility.d.ts +1 -0
- package/dist/layout-engine/layout-engine/src/resolvePageRefs.d.ts +31 -0
- package/dist/layout-engine/layout-engine/src/resolvePageTokens.d.ts +82 -0
- package/dist/layout-engine/layout-engine/src/section-breaks.d.ts +98 -0
- package/dist/layout-engine/layout-engine/src/section-props.d.ts +65 -0
- package/dist/layout-engine/layout-engine/src/table-cell-slice.d.ts +98 -0
- package/dist/layout-engine/painters/dom/src/_test-utils.d.ts +21 -0
- package/dist/layout-engine/painters/dom/src/chart-renderer.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/constants.d.ts +10 -0
- package/dist/layout-engine/painters/dom/src/css-token.d.ts +10 -0
- package/dist/layout-engine/painters/dom/src/features/feature-registry.d.ts +41 -0
- package/dist/layout-engine/painters/dom/src/features/inline-direction/index.d.ts +22 -0
- package/dist/layout-engine/painters/dom/src/features/inline-direction/rtl-styles.d.ts +27 -0
- package/dist/layout-engine/painters/dom/src/features/inline-direction/run-direction.d.ts +75 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/accent.d.ts +25 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/bar.d.ts +16 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/box.d.ts +38 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/delimiter.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/equation-array.d.ts +19 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/fraction.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/function.d.ts +16 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/group-character.d.ts +26 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/index.d.ts +27 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/lower-limit.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/math-run.d.ts +47 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/matrix.d.ts +23 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/nary.d.ts +23 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/phantom.d.ts +17 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/pre-sub-superscript.d.ts +25 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/radical.d.ts +14 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/sub-superscript.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/subscript.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/superscript.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/upper-limit.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/index.d.ts +14 -0
- package/dist/layout-engine/painters/dom/src/features/math/omml-to-mathml.d.ts +18 -0
- package/dist/layout-engine/painters/dom/src/features/math/types.d.ts +41 -0
- package/dist/layout-engine/painters/dom/src/images/drawing-image.d.ts +5 -0
- package/dist/layout-engine/painters/dom/src/images/hyperlink.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/images/image-block.d.ts +15 -0
- package/dist/layout-engine/painters/dom/src/images/image-clip-path.d.ts +17 -0
- package/dist/layout-engine/painters/dom/src/images/image-fragment.d.ts +34 -0
- package/dist/layout-engine/painters/dom/src/images/image-selectors.d.ts +9 -0
- package/dist/layout-engine/painters/dom/src/images/types.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/index.d.ts +125 -0
- package/dist/layout-engine/painters/dom/src/page-content.d.ts +209 -0
- package/dist/layout-engine/painters/dom/src/paragraph/block-version.d.ts +8 -0
- package/dist/layout-engine/painters/dom/src/paragraph/borders/border-layer.d.ts +59 -0
- package/dist/layout-engine/painters/dom/src/paragraph/borders/group-analysis.d.ts +38 -0
- package/dist/layout-engine/painters/dom/src/paragraph/borders/index.d.ts +18 -0
- package/dist/layout-engine/painters/dom/src/paragraph/frame.d.ts +3 -0
- package/dist/layout-engine/painters/dom/src/paragraph/indentation.d.ts +25 -0
- package/dist/layout-engine/painters/dom/src/paragraph/list-marker.d.ts +51 -0
- package/dist/layout-engine/painters/dom/src/paragraph/marker-tracked-change.d.ts +34 -0
- package/dist/layout-engine/painters/dom/src/paragraph/renderParagraphContent.d.ts +87 -0
- package/dist/layout-engine/painters/dom/src/paragraph/renderParagraphFragment.d.ts +33 -0
- package/dist/layout-engine/painters/dom/src/paragraph/styles.d.ts +3 -0
- package/dist/layout-engine/painters/dom/src/paragraph-hash-utils.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/pm-position-validation.d.ts +149 -0
- package/dist/layout-engine/painters/dom/src/renderer.d.ts +681 -0
- package/dist/layout-engine/painters/dom/src/ruler/index.d.ts +41 -0
- package/dist/layout-engine/painters/dom/src/ruler/ruler-core.d.ts +195 -0
- package/dist/layout-engine/painters/dom/src/ruler/ruler-renderer.d.ts +97 -0
- package/dist/layout-engine/painters/dom/src/ruler/ruler-styles.d.ts +31 -0
- package/dist/layout-engine/painters/dom/src/runs/field-annotation-run.d.ts +14 -0
- package/dist/layout-engine/painters/dom/src/runs/font-synthesis.d.ts +1 -0
- package/dist/layout-engine/painters/dom/src/runs/formatting-marks.d.ts +3 -0
- package/dist/layout-engine/painters/dom/src/runs/hash.d.ts +82 -0
- package/dist/layout-engine/painters/dom/src/runs/image-run.d.ts +37 -0
- package/dist/layout-engine/painters/dom/src/runs/index.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/runs/links.d.ts +58 -0
- package/dist/layout-engine/painters/dom/src/runs/math-run.d.ts +7 -0
- package/dist/layout-engine/painters/dom/src/runs/render-line.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/runs/render-run.d.ts +12 -0
- package/dist/layout-engine/painters/dom/src/runs/tab-run.d.ts +66 -0
- package/dist/layout-engine/painters/dom/src/runs/text-run.d.ts +35 -0
- package/dist/layout-engine/painters/dom/src/runs/tracked-changes.d.ts +90 -0
- package/dist/layout-engine/painters/dom/src/runs/types.d.ts +67 -0
- package/dist/layout-engine/painters/dom/src/sdt/boundaries.d.ts +16 -0
- package/dist/layout-engine/painters/dom/src/sdt/container.d.ts +32 -0
- package/dist/layout-engine/painters/dom/src/sdt/dataset.d.ts +7 -0
- package/dist/layout-engine/painters/dom/src/sdt/inline.d.ts +9 -0
- package/dist/layout-engine/painters/dom/src/sdt/snapshot.d.ts +29 -0
- package/dist/layout-engine/painters/dom/src/styles.d.ts +71 -0
- package/dist/layout-engine/painters/dom/src/svg-utils.d.ts +101 -0
- package/dist/layout-engine/painters/dom/src/table/border-utils.d.ts +185 -0
- package/dist/layout-engine/painters/dom/src/table/grid-geometry.d.ts +69 -0
- package/dist/layout-engine/painters/dom/src/table/renderTableCell.d.ts +170 -0
- package/dist/layout-engine/painters/dom/src/table/renderTableFragment.d.ts +132 -0
- package/dist/layout-engine/painters/dom/src/table/renderTableRow.d.ts +146 -0
- package/dist/layout-engine/painters/dom/src/test-utils/normalize-line.d.ts +39 -0
- package/dist/layout-engine/painters/dom/src/utils/anchor-helpers.d.ts +3 -0
- package/dist/layout-engine/painters/dom/src/utils/apply-styles.d.ts +1 -0
- package/dist/layout-engine/painters/dom/src/utils/layout-identity.d.ts +9 -0
- package/dist/layout-engine/painters/dom/src/utils/source-anchor.d.ts +2 -0
- package/dist/layout-engine/style-engine/src/bench/resolveSdtMetadata.bench.d.ts +1 -0
- package/dist/layout-engine/style-engine/src/cascade.d.ts +43 -0
- package/dist/layout-engine/style-engine/src/index.d.ts +121 -0
- package/dist/layout-engine/style-engine/src/normalize/colors.d.ts +13 -0
- package/dist/layout-engine/style-engine/src/normalize/index.d.ts +13 -0
- package/dist/layout-engine/style-engine/src/normalize/paragraph-attrs.d.ts +3 -0
- package/dist/layout-engine/style-engine/src/normalize/run-attrs.d.ts +17 -0
- package/dist/layout-engine/style-engine/src/normalize/types.d.ts +36 -0
- package/dist/layout-engine/style-engine/src/normalize/units.d.ts +13 -0
- package/dist/layout-engine/style-engine/src/ooxml/index.d.ts +64 -0
- package/dist/layout-engine/style-engine/src/ooxml/numbering-types.d.ts +126 -0
- package/dist/layout-engine/style-engine/src/ooxml/styles-types.d.ts +363 -0
- package/dist/layout-engine/style-engine/src/ooxml/table-style-selection.d.ts +86 -0
- package/dist/layout-engine/style-engine/src/ooxml/types.d.ts +459 -0
- package/dist/layout-engine/style-engine/src/ooxml/word-style-model/parse-theme.d.ts +33 -0
- package/dist/layout-engine/style-engine/src/ooxml/word-style-model/parse-xml.d.ts +29 -0
- package/dist/public/ui-react.cjs +175 -0
- package/dist/public/ui-react.es.js +159 -0
- package/dist/public/ui.cjs +5 -0
- package/dist/public/ui.es.js +2 -0
- package/dist/shared/common/comments-types.d.ts +102 -0
- package/dist/shared/common/layout-constants.d.ts +7 -0
- package/dist/shared/common/list-marker-utils.d.ts +186 -0
- package/dist/shared/common/list-numbering/index.d.ts +16 -0
- package/dist/shared/font-system/src/activation.d.ts +64 -0
- package/dist/shared/font-system/src/bundled-manifest.d.ts +32 -0
- package/dist/shared/font-system/src/bundled.d.ts +41 -0
- package/dist/shared/font-system/src/document-font-options.d.ts +53 -0
- package/dist/shared/font-system/src/epoch.d.ts +6 -0
- package/dist/shared/font-system/src/font-offerings.d.ts +120 -0
- package/dist/shared/font-system/src/index.d.ts +35 -0
- package/dist/shared/font-system/src/os2.d.ts +30 -0
- package/dist/shared/font-system/src/registry.d.ts +188 -0
- package/dist/shared/font-system/src/report.d.ts +98 -0
- package/dist/shared/font-system/src/resolver.d.ts +215 -0
- package/dist/shared/font-system/src/substitution-evidence.d.ts +103 -0
- package/dist/shared/font-system/src/types.d.ts +128 -0
- package/dist/style.css +3316 -0
- package/dist/style.layered.css +3316 -0
- package/dist/superdoc/src/SuperDoc.vue.d.ts +88 -0
- package/dist/superdoc/src/cdn-entry.d.ts +2 -0
- package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +62 -0
- package/dist/superdoc/src/components/CommentsLayer/CommentHeader.vue.d.ts +26 -0
- package/dist/superdoc/src/components/CommentsLayer/CommentInput.vue.d.ts +19 -0
- package/dist/superdoc/src/components/CommentsLayer/CommentsDropdown.vue.d.ts +30 -0
- package/dist/superdoc/src/components/CommentsLayer/InternalDropdown.vue.d.ts +10 -0
- package/dist/superdoc/src/components/CommentsLayer/collect-removed-comment-ids.d.ts +1 -0
- package/dist/superdoc/src/components/CommentsLayer/collect-tracked-change-thread.d.ts +6 -0
- package/dist/superdoc/src/components/CommentsLayer/comment-schemas.d.ts +18 -0
- package/dist/superdoc/src/components/CommentsLayer/commentsList/commentsList.vue.d.ts +9 -0
- package/dist/superdoc/src/components/CommentsLayer/commentsList/super-comments-list.d.ts +21 -0
- package/dist/superdoc/src/components/CommentsLayer/floating-comment-positioning.d.ts +28 -0
- package/dist/superdoc/src/components/CommentsLayer/helpers.d.ts +7 -0
- package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +2 -0
- package/dist/superdoc/src/components/CommentsLayer/types.d.ts +3 -0
- package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +8 -0
- package/dist/superdoc/src/components/CommentsLayer/use-conversation.d.ts +22 -0
- package/dist/superdoc/src/components/CommentsLayer/use-floating-comment.d.ts +11 -0
- package/dist/superdoc/src/components/HtmlViewer/HtmlViewer.vue.d.ts +10 -0
- package/dist/superdoc/src/components/PdfViewer/PdfViewer.vue.d.ts +61 -0
- package/dist/superdoc/src/components/PdfViewer/PdfViewerDocument.vue.d.ts +21 -0
- package/dist/superdoc/src/components/PdfViewer/PdfViewerPage.vue.d.ts +24 -0
- package/dist/superdoc/src/components/Whiteboard/WhiteboardLayer.vue.d.ts +19 -0
- package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +17 -0
- package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +18 -0
- package/dist/superdoc/src/components/surfaces/FindReplaceSurface.vue.d.ts +19 -0
- package/dist/superdoc/src/components/surfaces/PasswordPromptSurface.vue.d.ts +17 -0
- package/dist/superdoc/src/components/surfaces/SurfaceDialog.vue.d.ts +12 -0
- package/dist/superdoc/src/components/surfaces/SurfaceExternalMount.vue.d.ts +19 -0
- package/dist/superdoc/src/components/surfaces/SurfaceFloating.vue.d.ts +10 -0
- package/dist/superdoc/src/components/surfaces/SurfaceHost.vue.d.ts +31 -0
- package/dist/superdoc/src/components/surfaces/focusable-selector.d.ts +5 -0
- package/dist/superdoc/src/composables/find-shortcut-owner.d.ts +32 -0
- package/dist/superdoc/src/composables/replace-continuation.d.ts +37 -0
- package/dist/superdoc/src/composables/use-ai.d.ts +10 -0
- package/dist/superdoc/src/composables/use-comment-small-screen.d.ts +10 -0
- package/dist/superdoc/src/composables/use-compact-comment-popover.d.ts +21 -0
- package/dist/superdoc/src/composables/use-document.d.ts +34 -0
- package/dist/superdoc/src/composables/use-field.d.ts +33 -0
- package/dist/superdoc/src/composables/use-find-replace.d.ts +83 -0
- package/dist/superdoc/src/composables/use-high-contrast-mode.d.ts +4 -0
- package/dist/superdoc/src/composables/use-link-popover.d.ts +221 -0
- package/dist/superdoc/src/composables/use-password-prompt.d.ts +33 -0
- package/dist/superdoc/src/composables/use-selected-text.d.ts +16 -0
- package/dist/superdoc/src/composables/use-viewport-fit.d.ts +50 -0
- package/dist/superdoc/src/composables/useUiFontFamily.d.ts +24 -0
- package/dist/superdoc/src/core/EventEmitter.d.ts +55 -0
- package/dist/superdoc/src/core/SuperDoc.d.ts +775 -0
- package/dist/superdoc/src/core/collaboration/collaboration-comments.d.ts +4 -0
- package/dist/superdoc/src/core/collaboration/collaboration.d.ts +28 -0
- package/dist/superdoc/src/core/collaboration/helpers.d.ts +8 -0
- package/dist/superdoc/src/core/collaboration/permissions.d.ts +19 -0
- package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +99 -0
- package/dist/superdoc/src/core/collaboration/room-overwrite.d.ts +22 -0
- package/dist/superdoc/src/core/collaboration/v2-awareness-bridge.d.ts +57 -0
- package/dist/superdoc/src/core/config/merge-defined.d.ts +35 -0
- package/dist/superdoc/src/core/config/normalize-interaction-config.d.ts +15 -0
- package/dist/superdoc/src/core/config/normalize-surfaces-config.d.ts +23 -0
- package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +62 -0
- package/dist/superdoc/src/core/create-app.d.ts +32 -0
- package/dist/superdoc/src/core/editor-runtime/conformance/fake-v2-runtime.d.ts +9 -0
- package/dist/superdoc/src/core/editor-runtime/editor-runtime-registry.d.ts +117 -0
- package/dist/superdoc/src/core/editor-runtime/index.d.ts +1 -0
- package/dist/superdoc/src/core/editor-runtime/root-marker.d.ts +33 -0
- package/dist/superdoc/src/core/editor-runtime/types.d.ts +405 -0
- package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +185 -0
- package/dist/superdoc/src/core/editor-runtime/v2/v2-session-shortcut-routes.d.ts +47 -0
- package/dist/superdoc/src/core/extensions/define.d.ts +56 -0
- package/dist/superdoc/src/core/extensions/index.d.ts +2 -0
- package/dist/superdoc/src/core/extensions/types.d.ts +519 -0
- package/dist/superdoc/src/core/helpers/export.d.ts +2 -0
- package/dist/superdoc/src/core/helpers/file.d.ts +43 -0
- package/dist/superdoc/src/core/helpers/normalize-track-changes-config.d.ts +60 -0
- package/dist/superdoc/src/core/helpers/normalize-user.d.ts +13 -0
- package/dist/superdoc/src/core/index.d.ts +1 -0
- package/dist/superdoc/src/core/pdf/helpers/constants.d.ts +2 -0
- package/dist/superdoc/src/core/pdf/helpers/floor.d.ts +1 -0
- package/dist/superdoc/src/core/pdf/helpers/range.d.ts +1 -0
- package/dist/superdoc/src/core/pdf/helpers/read-file.d.ts +1 -0
- package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +66 -0
- package/dist/superdoc/src/core/surface-manager.d.ts +90 -0
- package/dist/superdoc/src/core/theme/create-theme.d.ts +82 -0
- package/dist/superdoc/src/core/types/index.d.ts +3006 -0
- package/dist/superdoc/src/core/v2-integration/browser-peer-runtime.d.ts +3 -0
- package/dist/superdoc/src/core/v2-integration/cdn-engine-loader.d.ts +16 -0
- package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +97 -0
- package/dist/superdoc/src/core/whiteboard/Whiteboard.d.ts +247 -0
- package/dist/superdoc/src/core/whiteboard/WhiteboardPage.d.ts +251 -0
- package/dist/superdoc/src/core/whiteboard/WhiteboardRenderer.d.ts +2 -0
- package/dist/superdoc/src/core/whiteboard/helpers/createTextarea.d.ts +1 -0
- package/dist/superdoc/src/core/whiteboard/helpers/flattenPoints.d.ts +1 -0
- package/dist/superdoc/src/core/whiteboard/helpers/getRandomId.d.ts +1 -0
- package/dist/superdoc/src/helpers/collect-touched-tracked-change-ids.d.ts +11 -0
- package/dist/superdoc/src/helpers/comment-focus.d.ts +4 -0
- package/dist/superdoc/src/helpers/comment-small-screen.d.ts +14 -0
- package/dist/superdoc/src/helpers/deprecation.d.ts +26 -0
- package/dist/superdoc/src/helpers/floor.d.ts +1 -0
- package/dist/superdoc/src/helpers/group-changes.d.ts +1 -0
- package/dist/superdoc/src/helpers/interaction-trace.d.ts +26 -0
- package/dist/superdoc/src/helpers/selection-source.d.ts +1 -0
- package/dist/superdoc/src/helpers/transaction-touches-structural-change.d.ts +19 -0
- package/dist/superdoc/src/helpers/use-selection.d.ts +17 -0
- package/dist/superdoc/src/helpers/v2-author-required-rejection.d.ts +22 -0
- package/dist/superdoc/src/helpers/v2-remote-review-hydration.d.ts +12 -0
- package/dist/superdoc/src/helpers/v2-review-mutation-impact.d.ts +15 -0
- package/dist/superdoc/src/helpers/v2-review-mutation-reconciler.d.ts +19 -0
- package/dist/superdoc/src/helpers/v2-review-target.d.ts +7 -0
- package/dist/superdoc/src/helpers/v2-selection-sync.d.ts +12 -0
- package/dist/superdoc/src/helpers/v2-typing-mutation-event.d.ts +5 -0
- package/dist/superdoc/src/icons.d.ts +11 -0
- package/dist/superdoc/src/index.d.cts +13 -0
- package/dist/superdoc/src/index.d.ts +11 -0
- package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +21 -0
- package/dist/superdoc/src/internal/toolbar/built-in/AlignmentButtons.vue.d.ts +6 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ButtonGroup.vue.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/DocumentMode.vue.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/FontFamilyCombobox.vue.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/FontSizeCombobox.vue.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/IconGrid.vue.d.ts +14 -0
- package/dist/superdoc/src/internal/toolbar/built-in/IconGridRow.vue.d.ts +13 -0
- package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +37 -0
- package/dist/superdoc/src/internal/toolbar/built-in/LinkedStyle.vue.d.ts +12 -0
- package/dist/superdoc/src/internal/toolbar/built-in/OverflowMenu.vue.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/SdTooltip.vue.d.ts +34 -0
- package/dist/superdoc/src/internal/toolbar/built-in/StyleButtonsList.vue.d.ts +14 -0
- package/dist/superdoc/src/internal/toolbar/built-in/TableActions.vue.d.ts +8 -0
- package/dist/superdoc/src/internal/toolbar/built-in/TableGrid.vue.d.ts +6 -0
- package/dist/superdoc/src/internal/toolbar/built-in/Toolbar.vue.d.ts +4 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButton.vue.d.ts +24 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButtonIcon.vue.d.ts +11 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarComboBox.vue.d.ts +18 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarDropdown.vue.d.ts +38 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarSeparator.vue.d.ts +8 -0
- package/dist/superdoc/src/internal/toolbar/built-in/color-dropdown-helpers.d.ts +24 -0
- package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +102 -0
- package/dist/superdoc/src/internal/toolbar/built-in/default-items.d.ts +17 -0
- package/dist/superdoc/src/internal/toolbar/built-in/font-options.d.ts +1 -0
- package/dist/superdoc/src/internal/toolbar/built-in/font-typeahead.d.ts +11 -0
- package/dist/superdoc/src/internal/toolbar/built-in/format-negation.d.ts +5 -0
- package/dist/superdoc/src/internal/toolbar/built-in/general.d.ts +1 -0
- package/dist/superdoc/src/internal/toolbar/built-in/helpers.d.ts +5 -0
- package/dist/superdoc/src/internal/toolbar/built-in/list-style-buttons.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/scroll-helpers.d.ts +4 -0
- package/dist/superdoc/src/internal/toolbar/built-in/toolbar-focus-helpers.d.ts +1 -0
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarIcons.d.ts +76 -0
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarTexts.d.ts +58 -0
- package/dist/superdoc/src/internal/toolbar/built-in/url-safety.d.ts +8 -0
- package/dist/superdoc/src/internal/toolbar/built-in/use-toolbar-item.d.ts +48 -0
- package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +237 -0
- package/dist/superdoc/src/internal/toolbar/compatibility-catalog.d.ts +59 -0
- package/dist/superdoc/src/internal/toolbar/image-upload.d.ts +63 -0
- package/dist/superdoc/src/internal/toolbar/index.d.ts +10 -0
- package/dist/superdoc/src/main.d.ts +1 -0
- package/dist/superdoc/src/public/browser-document-api.d.ts +53 -0
- package/dist/superdoc/src/public/collaboration-upgrade-engine.d.cts +26 -0
- package/dist/superdoc/src/public/collaboration-upgrade-engine.d.ts +130 -0
- package/dist/superdoc/src/public/index.d.cts +359 -0
- package/dist/superdoc/src/public/index.d.ts +179 -0
- package/dist/superdoc/src/public/ui/commands.d.ts +249 -0
- package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +18 -0
- package/dist/superdoc/src/public/ui/entity-at.d.ts +29 -0
- package/dist/superdoc/src/public/ui/equality.d.ts +10 -0
- package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +36 -0
- package/dist/superdoc/src/public/ui/react.d.ts +81 -0
- package/dist/superdoc/src/public/ui/reasons.d.ts +99 -0
- package/dist/superdoc/src/public/ui/types.d.ts +1425 -0
- package/dist/superdoc/src/public/ui-react.d.cts +20 -0
- package/dist/superdoc/src/public/ui-react.d.ts +20 -0
- package/dist/superdoc/src/public/ui.d.cts +194 -0
- package/dist/superdoc/src/public/ui.d.ts +29 -0
- package/dist/superdoc/src/stores/comments-store.d.ts +676 -0
- package/dist/superdoc/src/stores/helpers/floating-comment-instances.d.ts +14 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +14 -0
- package/dist/superdoc/src/stores/hrbr-fields-store.d.ts +43 -0
- package/dist/superdoc/src/stores/superdoc-store.d.ts +2182 -0
- package/dist/superdoc.cjs +36521 -0
- package/dist/superdoc.es.js +36449 -0
- package/dist/word-layout/src/index.d.ts +64 -0
- package/dist/word-layout/src/list-marker.d.ts +68 -0
- package/dist/word-layout/src/marker-utils.d.ts +20 -0
- package/dist/word-layout/src/numbering-manager.d.ts +85 -0
- package/dist/word-layout/src/tab-layout.d.ts +193 -0
- package/dist/word-layout/src/types.d.ts +106 -0
- package/dist/word-layout/src/unit-conversions.d.ts +120 -0
- package/dist-cdn/style.layered.css +2 -0
- package/dist-cdn/superdoc.min.css +2 -0
- package/dist-cdn/superdoc.min.js +108 -0
- package/package.json +137 -24
- package/.npmignore +0 -4
- package/data.json +0 -17
- package/index.js +0 -2
- package/lib/Augmenter.js +0 -27
- package/lib/Runner.js +0 -80
- package/lib/Stopper.js +0 -71
- package/test/superdoc.js +0 -126
- package/utils/app.js +0 -18
- package/utils/server.js +0 -2
- package/web/index.js +0 -54
- package/web/public/style.css +0 -74
- package/web/views/index.ejs +0 -53
- package/web/views/layout.ejs +0 -13
- package/web/views/method.ejs +0 -59
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Line, ParagraphBlock, ParagraphMeasure, LinePmRange } from '../../contracts/src/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Tracks which paragraph spacing properties were explicitly set.
|
|
4
|
+
*
|
|
5
|
+
* Used to distinguish between explicit spacing values and those inherited
|
|
6
|
+
* from docDefaults/styles. This affects empty paragraph rendering because
|
|
7
|
+
* Word suppresses inherited spacing on empty paragraphs but honors explicit spacing.
|
|
8
|
+
*/
|
|
9
|
+
export type SpacingExplicit = {
|
|
10
|
+
/** Whether 'before' spacing was explicitly set */
|
|
11
|
+
before?: boolean;
|
|
12
|
+
/** Whether 'after' spacing was explicitly set */
|
|
13
|
+
after?: boolean;
|
|
14
|
+
/** Whether 'line' spacing was explicitly set */
|
|
15
|
+
line?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Checks if a paragraph block is an empty text paragraph.
|
|
19
|
+
*
|
|
20
|
+
* An empty text paragraph is defined as:
|
|
21
|
+
* - No runs at all, OR
|
|
22
|
+
* - Exactly one text run with an empty string
|
|
23
|
+
*
|
|
24
|
+
* This is used to determine if special empty paragraph handling
|
|
25
|
+
* should apply (e.g., suppressing inherited spacing).
|
|
26
|
+
*
|
|
27
|
+
* @param block - The paragraph block to check
|
|
28
|
+
* @returns True if the paragraph is empty text
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* isEmptyTextParagraph({ kind: 'paragraph', runs: [] }); // true
|
|
33
|
+
* isEmptyTextParagraph({ kind: 'paragraph', runs: [{ text: '' }] }); // true
|
|
34
|
+
* isEmptyTextParagraph({ kind: 'paragraph', runs: [{ text: 'Hi' }] }); // false
|
|
35
|
+
* isEmptyTextParagraph({ kind: 'paragraph', runs: [{ kind: 'image', src: '...' }] }); // false
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare const isEmptyTextParagraph: (block: ParagraphBlock) => boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Determines if spacing should be suppressed for an empty paragraph.
|
|
41
|
+
*
|
|
42
|
+
* In Microsoft Word, empty paragraphs only show spacing if it was explicitly
|
|
43
|
+
* set on the paragraph. Spacing inherited from docDefaults or styles is
|
|
44
|
+
* suppressed for empty paragraphs.
|
|
45
|
+
*
|
|
46
|
+
* @param block - The paragraph block to check
|
|
47
|
+
* @param side - Which spacing side to check ('before' or 'after')
|
|
48
|
+
* @returns True if spacing should be suppressed (paragraph is empty and spacing is not explicit)
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* // Empty paragraph with inherited spacing - suppress
|
|
53
|
+
* shouldSuppressSpacingForEmpty(emptyBlock, 'before'); // true
|
|
54
|
+
*
|
|
55
|
+
* // Empty paragraph with explicit spacing - don't suppress
|
|
56
|
+
* shouldSuppressSpacingForEmpty(emptyBlockWithExplicit, 'before'); // false
|
|
57
|
+
*
|
|
58
|
+
* // Non-empty paragraph - don't suppress
|
|
59
|
+
* shouldSuppressSpacingForEmpty(nonEmptyBlock, 'before'); // false
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export declare const shouldSuppressSpacingForEmpty: (block: ParagraphBlock, side: "before" | "after") => boolean;
|
|
63
|
+
export declare function normalizeLines(measure: ParagraphMeasure): ParagraphMeasure['lines'];
|
|
64
|
+
export declare function sliceLines(lines: ParagraphMeasure['lines'], startIndex: number, availableHeight: number): {
|
|
65
|
+
toLine: number;
|
|
66
|
+
height: number;
|
|
67
|
+
};
|
|
68
|
+
export type { LinePmRange };
|
|
69
|
+
export declare const computeFragmentPmRange: (block: ParagraphBlock, lines: ParagraphMeasure["lines"], fromLine: number, toLine: number) => LinePmRange;
|
|
70
|
+
export declare const computeLinePmRange: (block: ParagraphBlock, line: Line) => LinePmRange;
|
|
71
|
+
/**
|
|
72
|
+
* Per-paragraph contextual spacing (OOXML w:contextualSpacing).
|
|
73
|
+
*
|
|
74
|
+
* A paragraph suppresses its own before/after spacing when it has
|
|
75
|
+
* contextualSpacing enabled and the adjacent paragraph shares the same styleId.
|
|
76
|
+
* The adjacent paragraph's contextualSpacing flag is NOT consulted — each
|
|
77
|
+
* paragraph independently decides whether to suppress its own spacing.
|
|
78
|
+
*
|
|
79
|
+
* @see https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.wordprocessing.contextualspacing
|
|
80
|
+
*/
|
|
81
|
+
export declare function shouldSuppressOwnSpacing(ownStyleId: string | undefined, ownContextualSpacing: boolean, adjacentStyleId: string | undefined): boolean;
|
|
82
|
+
/** Pixels of spacing.before to add after collapsing against previous trailingSpacing. */
|
|
83
|
+
export declare function collapseSpacingBefore(spacingBefore: number, trailingSpacing: number | undefined): number;
|
|
84
|
+
/** OOXML contextual spacing: previous paragraph rewinds its after-gap from cursorY. */
|
|
85
|
+
export declare function rewindPreviousParagraphTrailing(cursorY: number, trailingSpacing: number | undefined): number;
|
|
86
|
+
/**
|
|
87
|
+
* Y coordinate where paragraph text begins (after spacing-before collapse).
|
|
88
|
+
* Does not advance pages — pagination stays in layout-paragraph PHASE 2.
|
|
89
|
+
*/
|
|
90
|
+
export declare function computeParagraphContentStartY(cursorY: number, spacingBefore: number, appliedSpacingBefore: boolean, trailingSpacing: number | undefined): number;
|
|
91
|
+
/**
|
|
92
|
+
* Paragraph text start Y including contextual-spacing rewind from the previous paragraph.
|
|
93
|
+
* Used for float-scan preview at paragraph entry; PHASE 2 uses the same primitives inline.
|
|
94
|
+
*/
|
|
95
|
+
export declare function computeParagraphLayoutStartY(input: {
|
|
96
|
+
cursorY: number;
|
|
97
|
+
spacingBefore: number;
|
|
98
|
+
trailingSpacing?: number;
|
|
99
|
+
suppressSpacingBefore?: boolean;
|
|
100
|
+
rewindTrailingFromPrevious?: boolean;
|
|
101
|
+
}): number;
|
|
102
|
+
export declare const extractBlockPmRange: (block: {
|
|
103
|
+
attrs?: Record<string, unknown>;
|
|
104
|
+
} | null | undefined) => LinePmRange;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { FlowBlock, Fragment, Measure } from '../../contracts/src/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Subset of HeaderFooterConstraints needed for fragment normalization.
|
|
4
|
+
* Defined locally to avoid circular imports with index.ts.
|
|
5
|
+
*/
|
|
6
|
+
export type RegionConstraints = {
|
|
7
|
+
width?: number;
|
|
8
|
+
pageWidth?: number;
|
|
9
|
+
pageHeight?: number;
|
|
10
|
+
margins?: {
|
|
11
|
+
left: number;
|
|
12
|
+
right: number;
|
|
13
|
+
top?: number;
|
|
14
|
+
bottom?: number;
|
|
15
|
+
header?: number;
|
|
16
|
+
footer?: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Post-normalize anchored fragment Y positions in header/footer layout.
|
|
21
|
+
*
|
|
22
|
+
* Problem: The inner `layoutDocument()` uses body content height as its page
|
|
23
|
+
* height. For page-relative footer anchors and margin-relative header anchors,
|
|
24
|
+
* this can produce incorrect Y positions because the real physical page/header
|
|
25
|
+
* band geometry is different.
|
|
26
|
+
*
|
|
27
|
+
* Solution: After layout, rewrite affected anchored fragments into the region's
|
|
28
|
+
* local coordinate system. Footer page-relative anchors use the real physical
|
|
29
|
+
* page height and footer-band origin. Header page-relative anchors use their
|
|
30
|
+
* physical page offset directly because header story coordinates are page-top
|
|
31
|
+
* local. Header margin-relative content anchors reset to the header-local
|
|
32
|
+
* offset so they do not inflate the reserved header height by carrying
|
|
33
|
+
* body-canvas coordinates.
|
|
34
|
+
*
|
|
35
|
+
* Page-anchored paragraph frames are likewise converted from physical-page
|
|
36
|
+
* coordinates; other paragraphs, inline images, and absolute overlays pass
|
|
37
|
+
* through unchanged.
|
|
38
|
+
*/
|
|
39
|
+
export declare function normalizeFragmentsForRegion(pages: Array<{
|
|
40
|
+
number: number;
|
|
41
|
+
fragments: Fragment[];
|
|
42
|
+
}>, blocks: FlowBlock[], _measures: Measure[], kind: 'header' | 'footer', constraints: RegionConstraints): Array<{
|
|
43
|
+
number: number;
|
|
44
|
+
fragments: Fragment[];
|
|
45
|
+
}>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { formatPageNumber, formatPageNumberFieldValue, formatSectionPageNumberText, FlowBlock, Layout, Page, PageNumberChapterSeparator, PageNumberFormat, SectionMetadata } from '../../contracts/src/index.js';
|
|
2
|
+
export { formatPageNumber, formatPageNumberFieldValue, formatSectionPageNumberText };
|
|
3
|
+
export type { PageNumberFormat };
|
|
4
|
+
export interface ChapterPageInfo {
|
|
5
|
+
chapterNumberText?: string;
|
|
6
|
+
chapterStyle?: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Display page information for a single page in the document.
|
|
10
|
+
* Contains both the physical page number and the section-aware display number.
|
|
11
|
+
*/
|
|
12
|
+
export interface DisplayPageInfo {
|
|
13
|
+
/** Physical page number (1-indexed, continuous across the document) */
|
|
14
|
+
physicalPage: number;
|
|
15
|
+
/** Section-aware display page number (respects restart and offset) */
|
|
16
|
+
displayNumber: number;
|
|
17
|
+
/** Formatted display text (e.g., "III", "C", "23") */
|
|
18
|
+
displayText: string;
|
|
19
|
+
/** Index of the section this page belongs to */
|
|
20
|
+
sectionIndex: number;
|
|
21
|
+
/** Physical page count in the current section */
|
|
22
|
+
sectionPageCount: number;
|
|
23
|
+
/** Section PAGE number format before any run-local PAGE switch is applied. */
|
|
24
|
+
pageFormat?: PageNumberFormat;
|
|
25
|
+
/** MVP chapter prefix text derived from the nearest numbered Heading N marker. */
|
|
26
|
+
chapterNumberText?: string;
|
|
27
|
+
/** Separator between chapter prefix and page number component. */
|
|
28
|
+
chapterSeparator?: PageNumberChapterSeparator;
|
|
29
|
+
}
|
|
30
|
+
export declare function normalizeChapterMarkerText(markerText: unknown): string | undefined;
|
|
31
|
+
export declare function buildChapterContextByPage(layout: Layout, blocks: FlowBlock[] | ReadonlyMap<string, FlowBlock>, sections: SectionMetadata[]): Map<number, ChapterPageInfo>;
|
|
32
|
+
/**
|
|
33
|
+
* Computes section-aware display page numbers for all pages in a document.
|
|
34
|
+
*
|
|
35
|
+
* This function implements MS Word's section numbering behavior:
|
|
36
|
+
* - Each section can have its own page number format
|
|
37
|
+
* - Sections can restart numbering at a specific value
|
|
38
|
+
* - Continuous sections inherit the previous section's running count unless restart is set
|
|
39
|
+
* - Display numbers are calculated as: pageIndexWithinSection + offset (or restart value)
|
|
40
|
+
* - Display numbers are never less than 1
|
|
41
|
+
*
|
|
42
|
+
* Algorithm:
|
|
43
|
+
* 1. Map each page to its owning section
|
|
44
|
+
* 2. For each section:
|
|
45
|
+
* - If restart/start is set, begin counting from that value
|
|
46
|
+
* - Otherwise, continue from previous section's count
|
|
47
|
+
* 3. For each page within a section:
|
|
48
|
+
* - Calculate displayIndex = pageIndexWithinSection + offset
|
|
49
|
+
* - Clamp displayNumber = max(1, displayIndex)
|
|
50
|
+
* - Format displayText using the section's number format
|
|
51
|
+
*
|
|
52
|
+
* @param pages - Array of pages from the layout (with page.number 1-indexed)
|
|
53
|
+
* @param sections - Array of section metadata (aligned by sectionIndex)
|
|
54
|
+
* @returns Array of display page information for each page
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* const pages = [
|
|
59
|
+
* { number: 1, ... },
|
|
60
|
+
* { number: 2, ... },
|
|
61
|
+
* { number: 3, ... },
|
|
62
|
+
* ];
|
|
63
|
+
* const sections = [
|
|
64
|
+
* { sectionIndex: 0, numbering: { format: 'lowerRoman', start: 1 } },
|
|
65
|
+
* { sectionIndex: 1, numbering: { format: 'decimal', start: 1 } },
|
|
66
|
+
* ];
|
|
67
|
+
* const displayInfo = computeDisplayPageNumber(pages, sections);
|
|
68
|
+
* // displayInfo[0]: { physicalPage: 1, displayNumber: 1, displayText: "i", sectionIndex: 0 }
|
|
69
|
+
* // displayInfo[1]: { physicalPage: 2, displayNumber: 2, displayText: "ii", sectionIndex: 0 }
|
|
70
|
+
* // displayInfo[2]: { physicalPage: 3, displayNumber: 1, displayText: "1", sectionIndex: 1 }
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export declare function computeDisplayPageNumber(pages: Page[], sections: SectionMetadata[], chapterInfoByPage?: ReadonlyMap<number, ChapterPageInfo>): DisplayPageInfo[];
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { ColumnLayout, Page, PageMargins } from '../../contracts/src/index.js';
|
|
2
|
+
export type ConstraintBoundary = {
|
|
3
|
+
y: number;
|
|
4
|
+
columns: ColumnLayout;
|
|
5
|
+
};
|
|
6
|
+
export type PageState = {
|
|
7
|
+
page: Page;
|
|
8
|
+
cursorY: number;
|
|
9
|
+
columnIndex: number;
|
|
10
|
+
topMargin: number;
|
|
11
|
+
contentBottom: number;
|
|
12
|
+
constraintBoundaries: ConstraintBoundary[];
|
|
13
|
+
activeConstraintIndex: number;
|
|
14
|
+
trailingSpacing: number;
|
|
15
|
+
lastParagraphStyleId?: string;
|
|
16
|
+
lastParagraphContextualSpacing: boolean;
|
|
17
|
+
/** Border hash of the last paragraph for between-border group detection. */
|
|
18
|
+
lastParagraphBorderHash?: string;
|
|
19
|
+
/** Tracks the maximum cursorY reached across all columns on this page.
|
|
20
|
+
* Used when starting a mid-page region so the new section begins below
|
|
21
|
+
* all column content, not just the current column's cursor. */
|
|
22
|
+
maxCursorY: number;
|
|
23
|
+
/**
|
|
24
|
+
* SD-3049: Page-level footnote reserve already baked into `contentBottom`
|
|
25
|
+
* via `getActiveBottomMargin`. The block-aware break decision compares
|
|
26
|
+
* `footnoteDemandThisPage` against this; only the excess shrinks the body.
|
|
27
|
+
*/
|
|
28
|
+
pageFootnoteReserve: number;
|
|
29
|
+
/**
|
|
30
|
+
* SD-3049: Accumulated measured body height of footnote refs anchored on
|
|
31
|
+
* fragments already committed to this page (and column-wide). Used by the
|
|
32
|
+
* paragraph break decision so the body packs tight to footnote demand
|
|
33
|
+
* instead of relying solely on the post-hoc page-level reserve.
|
|
34
|
+
*/
|
|
35
|
+
footnoteDemandThisPage: number;
|
|
36
|
+
/**
|
|
37
|
+
* SD-2656: Number of distinct footnote refs anchored on this page so far.
|
|
38
|
+
* Drives the slicer's band-overhead computation (separator + per-extra-ref
|
|
39
|
+
* gap + safety margin), which must match the planner's reserve formula.
|
|
40
|
+
*/
|
|
41
|
+
footnoteRefsThisPage: number;
|
|
42
|
+
/**
|
|
43
|
+
* SD-2656: ordered list of footnote anchors committed to this page (by
|
|
44
|
+
* document/PM order). The body slicer pushes a new entry when it accepts a
|
|
45
|
+
* candidate line that introduces a new anchor. The list drives the ordered-
|
|
46
|
+
* cluster demand formula:
|
|
47
|
+
* demand = sum(fullHeight of cluster[0..N-1]) + firstLineHeight(cluster[N-1])
|
|
48
|
+
* i.e. all anchors except the last must fit fully; only the last may split.
|
|
49
|
+
* Identified by refId so callers can dedupe and walk in document order.
|
|
50
|
+
*/
|
|
51
|
+
footnoteAnchorsThisPage: Array<{
|
|
52
|
+
pmPos: number;
|
|
53
|
+
refId: string;
|
|
54
|
+
fullHeight: number;
|
|
55
|
+
firstLineHeight: number;
|
|
56
|
+
}>;
|
|
57
|
+
};
|
|
58
|
+
export type PaginatorOptions = {
|
|
59
|
+
margins: {
|
|
60
|
+
left: number;
|
|
61
|
+
right: number;
|
|
62
|
+
};
|
|
63
|
+
getActiveTopMargin(): number;
|
|
64
|
+
getActiveBottomMargin(): number;
|
|
65
|
+
getActiveHeaderDistance(): number;
|
|
66
|
+
getActiveFooterDistance(): number;
|
|
67
|
+
getActivePageSize(): {
|
|
68
|
+
w: number;
|
|
69
|
+
h: number;
|
|
70
|
+
};
|
|
71
|
+
getDefaultPageSize(): {
|
|
72
|
+
w: number;
|
|
73
|
+
h: number;
|
|
74
|
+
};
|
|
75
|
+
getActiveColumns(): ColumnLayout;
|
|
76
|
+
/** Exact first-page state from an engine-authored paragraph checkpoint. */
|
|
77
|
+
initialPageState?: {
|
|
78
|
+
prefixFragments: readonly Page['fragments'][number][];
|
|
79
|
+
cursorY: number;
|
|
80
|
+
maxCursorY: number;
|
|
81
|
+
columnIndex: number;
|
|
82
|
+
trailingSpacing: number;
|
|
83
|
+
lastParagraphStyleId?: string;
|
|
84
|
+
lastParagraphContextualSpacing: boolean;
|
|
85
|
+
lastParagraphBorderHash?: string;
|
|
86
|
+
constraintBoundaries: readonly ConstraintBoundary[];
|
|
87
|
+
activeConstraintIndex: number;
|
|
88
|
+
footnoteDemandThisPage: number;
|
|
89
|
+
footnoteRefsThisPage: number;
|
|
90
|
+
footnoteAnchorsThisPage: readonly PageState['footnoteAnchorsThisPage'][number][];
|
|
91
|
+
};
|
|
92
|
+
pageNumberOffset?: number;
|
|
93
|
+
createPage(number: number, pageMargins: PageMargins, pageSizeOverride?: {
|
|
94
|
+
w: number;
|
|
95
|
+
h: number;
|
|
96
|
+
}): Page;
|
|
97
|
+
onNewPage?: (state: PageState) => void;
|
|
98
|
+
shouldStopBeforeNewPage?: (input: {
|
|
99
|
+
completedPageIndex: number;
|
|
100
|
+
pages: readonly Page[];
|
|
101
|
+
states: readonly PageState[];
|
|
102
|
+
}) => boolean;
|
|
103
|
+
/**
|
|
104
|
+
* SD-3049: per-page footnote reserve (the value already added to
|
|
105
|
+
* `getActiveBottomMargin`). Returned by index for the page about to be
|
|
106
|
+
* created. Defaults to 0 when not provided.
|
|
107
|
+
*/
|
|
108
|
+
getFootnoteReserveForPage?: (pageIndex: number) => number;
|
|
109
|
+
};
|
|
110
|
+
export declare class PaginationEarlyStop extends Error {
|
|
111
|
+
constructor();
|
|
112
|
+
}
|
|
113
|
+
export declare function isPaginationEarlyStop(error: unknown): error is PaginationEarlyStop;
|
|
114
|
+
/**
|
|
115
|
+
* Break paragraph-only spacing and border adjacency at an in-flow block boundary.
|
|
116
|
+
*
|
|
117
|
+
* Paragraph layout has already included `trailingSpacing` in `cursorY`, so this
|
|
118
|
+
* intentionally does not move the cursor. It only prevents a later paragraph
|
|
119
|
+
* from collapsing spacing or borders through an intervening block.
|
|
120
|
+
*/
|
|
121
|
+
export declare function breakParagraphAdjacency(state: PageState): void;
|
|
122
|
+
export declare function createPaginator(opts: PaginatorOptions): {
|
|
123
|
+
readonly pages: Page[];
|
|
124
|
+
readonly states: PageState[];
|
|
125
|
+
readonly startNewPage: () => PageState;
|
|
126
|
+
readonly ensurePage: () => PageState;
|
|
127
|
+
readonly advanceColumn: (state: PageState) => PageState;
|
|
128
|
+
readonly getActiveColumnsForState: (state: PageState) => ColumnLayout;
|
|
129
|
+
readonly getPageByNumber: (pageNumber: number) => PageState;
|
|
130
|
+
readonly pruneTrailingEmptyPages: () => void;
|
|
131
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { isReviewableSectionBoundaryMarkerBlock, shouldSkipParagraphDuringLayout } from '../../contracts/src/index.js';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Layout, FlowBlock, ParagraphBlock } from '../../contracts/src/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Build an anchor map from bookmarks and layout fragments.
|
|
4
|
+
*
|
|
5
|
+
* For each bookmark, determines which page it appears on by checking
|
|
6
|
+
* if the bookmark's PM position falls within any fragment's PM range.
|
|
7
|
+
*
|
|
8
|
+
* @param bookmarks - Map of bookmark names to PM positions
|
|
9
|
+
* @param layout - Completed layout with positioned fragments
|
|
10
|
+
* @returns Map of bookmark names to page numbers (1-indexed)
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildAnchorMap(bookmarks: Map<string, number>, layout: Layout): Map<string, number>;
|
|
13
|
+
/**
|
|
14
|
+
* Resolve pageReference tokens in blocks using the anchor map.
|
|
15
|
+
*
|
|
16
|
+
* Finds all runs with token='pageReference', looks up the target bookmark
|
|
17
|
+
* in the anchor map, and replaces the run's text with the resolved page number.
|
|
18
|
+
*
|
|
19
|
+
* @param blocks - FlowBlocks containing runs with pageReference tokens
|
|
20
|
+
* @param anchorMap - Map of bookmark names to page numbers
|
|
21
|
+
* @returns Array of block IDs that had tokens resolved (for re-measurement)
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolvePageRefTokens(blocks: FlowBlock[], anchorMap: Map<string, number>): Set<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Filter blocks to only include TOC entries that need re-measurement.
|
|
26
|
+
*
|
|
27
|
+
* @param blocks - All FlowBlocks
|
|
28
|
+
* @param affectedBlockIds - Set of block IDs that had tokens resolved
|
|
29
|
+
* @returns Array of ParagraphBlocks that are TOC entries and were affected
|
|
30
|
+
*/
|
|
31
|
+
export declare function getTocBlocksForRemeasurement(blocks: FlowBlock[], affectedBlockIds: Set<string>): ParagraphBlock[];
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Layout, FlowBlock, ParagraphBlock, Measure } from '../../contracts/src/index.js';
|
|
2
|
+
import { DisplayPageInfo } from './pageNumbering.js';
|
|
3
|
+
/**
|
|
4
|
+
* Numbering context for page token resolution.
|
|
5
|
+
* Contains display page information for each physical page in the document.
|
|
6
|
+
*/
|
|
7
|
+
export interface NumberingContext {
|
|
8
|
+
/** Total number of pages in the document */
|
|
9
|
+
totalPages: number;
|
|
10
|
+
/** Display page information for each page (indexed by physical page number - 1) */
|
|
11
|
+
displayPages: DisplayPageInfo[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Result of page number token resolution.
|
|
15
|
+
* Contains affected block IDs and their updated clones.
|
|
16
|
+
*/
|
|
17
|
+
export interface ResolvePageTokensResult {
|
|
18
|
+
/** Set of block IDs that had tokens resolved */
|
|
19
|
+
affectedBlockIds: Set<string>;
|
|
20
|
+
/** Map of block ID to updated block clone (only for affected blocks) */
|
|
21
|
+
updatedBlocks: Map<string, FlowBlock>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Resolves page number and total page count tokens in document blocks using layout and numbering context.
|
|
25
|
+
*
|
|
26
|
+
* This function walks through all pages and fragments in the layout, finding blocks with
|
|
27
|
+
* page number tokens. For each affected block, it creates a clone with resolved token text,
|
|
28
|
+
* using section-aware display page numbers from the numbering context.
|
|
29
|
+
*
|
|
30
|
+
* The function does NOT mutate original blocks - it returns clones of affected blocks.
|
|
31
|
+
* This ensures thread-safety and allows for clean rollback if re-measurement fails.
|
|
32
|
+
*
|
|
33
|
+
* @param layout - Completed layout with page-numbered fragments
|
|
34
|
+
* @param blocks - Original FlowBlocks array (will not be mutated)
|
|
35
|
+
* @param measures - Measure array (parallel to blocks, used to detect hasPageTokens flag)
|
|
36
|
+
* @param numberingCtx - Numbering context with display page info and total pages
|
|
37
|
+
* @returns Result containing affected block IDs and updated block clones
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```typescript
|
|
41
|
+
* const layout = layoutDocument(blocks, measures, options);
|
|
42
|
+
* const numberingCtx = buildNumberingContext(layout, sections);
|
|
43
|
+
* const result = resolvePageNumberTokens(layout, blocks, measures, numberingCtx);
|
|
44
|
+
*
|
|
45
|
+
* if (result.affectedBlockIds.size > 0) {
|
|
46
|
+
* // Re-measure affected blocks and re-run pagination
|
|
47
|
+
* const updatedBlocks = blocks.map(b => result.updatedBlocks.get(b.id) ?? b);
|
|
48
|
+
* // ... remeasure and re-layout ...
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export interface ResolvePageTokensOptions {
|
|
53
|
+
/**
|
|
54
|
+
* When `false`, `totalPageCount` / `sectionPageCount` tokens keep their
|
|
55
|
+
* source-cached DOCX result text (em dash when absent) instead of resolving
|
|
56
|
+
* to the current — possibly partial — page totals. `pageNumber` always
|
|
57
|
+
* resolves. Defaults to `true` (exact totals).
|
|
58
|
+
*/
|
|
59
|
+
pageCountFieldsExact?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export declare function resolvePageNumberTokens(layout: Layout, blocks: FlowBlock[], measures: Measure[], numberingCtx: NumberingContext, options?: ResolvePageTokensOptions): ResolvePageTokensResult;
|
|
62
|
+
/**
|
|
63
|
+
* Resolves page number tokens in paragraph blocks.
|
|
64
|
+
*
|
|
65
|
+
* This is a helper function that processes a single paragraph block's runs,
|
|
66
|
+
* resolving any pageNumber or totalPageCount tokens. It's designed to be called
|
|
67
|
+
* from the layout pipeline where both the layout and blocks are available.
|
|
68
|
+
*
|
|
69
|
+
* @param block - Paragraph block to process
|
|
70
|
+
* @param pageNumber - Current page number (1-indexed)
|
|
71
|
+
* @param totalPages - Total number of pages in the document
|
|
72
|
+
* @returns True if any tokens were resolved in this block
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const wasModified = resolveTokensInBlock(paragraphBlock, 3, 10);
|
|
77
|
+
* if (wasModified) {
|
|
78
|
+
* // Block was modified, may need re-measurement
|
|
79
|
+
* }
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
export declare function resolveTokensInBlock(block: ParagraphBlock, pageNumber: number, totalPages: number): boolean;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { ColumnLayout, SectionBreakBlock } from '../../contracts/src/index.js';
|
|
2
|
+
export type SectionState = {
|
|
3
|
+
activeTopMargin: number;
|
|
4
|
+
activeBottomMargin: number;
|
|
5
|
+
activeLeftMargin: number;
|
|
6
|
+
activeRightMargin: number;
|
|
7
|
+
pendingTopMargin: number | null;
|
|
8
|
+
pendingBottomMargin: number | null;
|
|
9
|
+
pendingLeftMargin: number | null;
|
|
10
|
+
pendingRightMargin: number | null;
|
|
11
|
+
activeHeaderDistance: number;
|
|
12
|
+
activeFooterDistance: number;
|
|
13
|
+
pendingHeaderDistance: number | null;
|
|
14
|
+
pendingFooterDistance: number | null;
|
|
15
|
+
activePageSize: {
|
|
16
|
+
w: number;
|
|
17
|
+
h: number;
|
|
18
|
+
};
|
|
19
|
+
pendingPageSize: {
|
|
20
|
+
w: number;
|
|
21
|
+
h: number;
|
|
22
|
+
} | null;
|
|
23
|
+
activeColumns: ColumnLayout;
|
|
24
|
+
pendingColumns: ColumnLayout | null;
|
|
25
|
+
activeOrientation: 'portrait' | 'landscape' | null;
|
|
26
|
+
pendingOrientation: 'portrait' | 'landscape' | null;
|
|
27
|
+
hasAnyPages: boolean;
|
|
28
|
+
};
|
|
29
|
+
export type BreakDecision = {
|
|
30
|
+
forcePageBreak: boolean;
|
|
31
|
+
forceMidPageRegion: boolean;
|
|
32
|
+
requiredParity?: 'even' | 'odd';
|
|
33
|
+
};
|
|
34
|
+
/** Default single-column configuration per OOXML spec (absence of w:cols element) */
|
|
35
|
+
export declare const SINGLE_COLUMN_DEFAULT: Readonly<ColumnLayout>;
|
|
36
|
+
export declare function isInitialSectionBreak(block: SectionBreakBlock, hasAnyPages: boolean): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Schedule section break effects by updating pending/active state and returning a break decision.
|
|
39
|
+
*
|
|
40
|
+
* This function analyzes a section break block to determine what layout changes should occur
|
|
41
|
+
* (e.g., page break, column changes) and schedules the new section properties (margins, page size,
|
|
42
|
+
* columns) to be applied at the appropriate boundary. It is pure with respect to inputs/outputs
|
|
43
|
+
* and does not mutate external variables.
|
|
44
|
+
*
|
|
45
|
+
* The function handles special cases like the first section (applied immediately to active state)
|
|
46
|
+
* and accounts for header content height to prevent header/body overlap.
|
|
47
|
+
*
|
|
48
|
+
* Column handling follows OOXML spec: absence of <w:cols> element means single column layout.
|
|
49
|
+
* When a section break has no columns defined, it resets to single column (not inherited from previous).
|
|
50
|
+
*
|
|
51
|
+
* @param block - The section break block with margin/page/column settings
|
|
52
|
+
* @param state - Current section state containing active and pending layout properties
|
|
53
|
+
* @param baseMargins - Base document margins in pixels (top, bottom, left, right)
|
|
54
|
+
* @param maxHeaderContentHeight - Maximum header content height in pixels across all header variants.
|
|
55
|
+
* When provided (> 0), ensures body content starts below header content by adjusting top margin
|
|
56
|
+
* to be at least headerDistance + maxHeaderContentHeight. Defaults to 0 (no header overlap prevention).
|
|
57
|
+
* @param maxFooterContentHeight - Maximum footer content height in pixels across all footer variants.
|
|
58
|
+
* When provided (> 0), ensures body content ends above footer content by adjusting bottom margin
|
|
59
|
+
* to be at least footerDistance + maxFooterContentHeight. Defaults to 0 (no footer overlap prevention).
|
|
60
|
+
* @returns Object containing:
|
|
61
|
+
* - decision: Break decision with flags for page breaks, mid-page regions, and parity requirements
|
|
62
|
+
* - state: Updated section state with scheduled pending properties
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* // Schedule a next-page section break with new margins
|
|
66
|
+
* const { decision, state: newState } = scheduleSectionBreak(
|
|
67
|
+
* {
|
|
68
|
+
* kind: 'sectionBreak',
|
|
69
|
+
* type: 'nextPage',
|
|
70
|
+
* margins: { top: 72, bottom: 72, header: 36, footer: 36 },
|
|
71
|
+
* columns: { count: 2, gap: 24 }
|
|
72
|
+
* },
|
|
73
|
+
* currentState,
|
|
74
|
+
* { top: 72, bottom: 72, left: 72, right: 72 },
|
|
75
|
+
* 48 // header content height
|
|
76
|
+
* );
|
|
77
|
+
* // decision.forcePageBreak === true
|
|
78
|
+
* // newState.pendingTopMargin === Math.max(72, 36 + 48) = 84
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export declare function scheduleSectionBreak(block: SectionBreakBlock, state: SectionState, baseMargins: {
|
|
82
|
+
top: number;
|
|
83
|
+
bottom: number;
|
|
84
|
+
left: number;
|
|
85
|
+
right: number;
|
|
86
|
+
}, maxHeaderContentHeight?: number, maxFooterContentHeight?: number): {
|
|
87
|
+
decision: BreakDecision;
|
|
88
|
+
state: SectionState;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Apply pending section state to active state at a page boundary.
|
|
92
|
+
* Transfers all pending values (margins, page size, columns, orientation) to their
|
|
93
|
+
* active counterparts and clears the pending values.
|
|
94
|
+
*
|
|
95
|
+
* @param state - Current section state with pending values to apply
|
|
96
|
+
* @returns New section state with pending values applied to active and pending cleared
|
|
97
|
+
*/
|
|
98
|
+
export declare function applyPendingToActive(state: SectionState): SectionState;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ColumnLayout, FlowBlock, SectionVerticalAlign } from '../../contracts/src/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Section-level formatting properties that control page layout.
|
|
4
|
+
*
|
|
5
|
+
* Used to apply Word-style section breaks with custom page dimensions,
|
|
6
|
+
* margins, columns, and orientation. Each section can have independent
|
|
7
|
+
* formatting, enabling mixed layouts within a single document.
|
|
8
|
+
*
|
|
9
|
+
* @property margins - Page margin distances from page edges (in pixels)
|
|
10
|
+
* @property pageSize - Page dimensions in pixels (width and height)
|
|
11
|
+
* @property columns - Multi-column layout configuration
|
|
12
|
+
* @property orientation - Page orientation (portrait or landscape)
|
|
13
|
+
* @property vAlign - Vertical alignment of content within the section's pages
|
|
14
|
+
*/
|
|
15
|
+
export type SectionProps = {
|
|
16
|
+
margins?: {
|
|
17
|
+
header?: number;
|
|
18
|
+
footer?: number;
|
|
19
|
+
top?: number;
|
|
20
|
+
right?: number;
|
|
21
|
+
bottom?: number;
|
|
22
|
+
left?: number;
|
|
23
|
+
};
|
|
24
|
+
pageSize?: {
|
|
25
|
+
w: number;
|
|
26
|
+
h: number;
|
|
27
|
+
};
|
|
28
|
+
columns?: ColumnLayout;
|
|
29
|
+
orientation?: 'portrait' | 'landscape';
|
|
30
|
+
vAlign?: SectionVerticalAlign;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Pre-scans sectionBreak blocks to map each DOCX-derived boundary to the next section's properties.
|
|
34
|
+
*
|
|
35
|
+
* Word uses "end-tagged" sectPr semantics: the properties that apply to a section are stored
|
|
36
|
+
* at the END of that section (on the following sectPr node). This function walks backwards
|
|
37
|
+
* through the block list to build a lookahead map that tells the layout engine which properties
|
|
38
|
+
* to use when starting a new page after each section break.
|
|
39
|
+
*
|
|
40
|
+
* Special cases:
|
|
41
|
+
* - The first section (`isFirstSection=true`) keeps its own properties (no lookahead)
|
|
42
|
+
* - Non-DOCX section breaks (`attrs.source !== 'sectPr'`) are ignored
|
|
43
|
+
* - The final section break falls back to its own properties when there's no following sectPr
|
|
44
|
+
*
|
|
45
|
+
* Guard for PM-adapter blocks with sectionIndex:
|
|
46
|
+
* The layout engine only applies this lookahead when a sectionBreak lacks `attrs.sectionIndex`.
|
|
47
|
+
* PM-adapter blocks that have a sectionIndex already embed the upcoming section's metadata
|
|
48
|
+
* directly on the block, so they don't need the map-based lookahead. This prevents double-
|
|
49
|
+
* application and ensures the map is only used for synthetic test fixtures or legacy structures.
|
|
50
|
+
*
|
|
51
|
+
* @param blocks - Array of FlowBlocks to scan for section breaks
|
|
52
|
+
* @returns Map from block index to the section properties that should apply AFTER that break
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```typescript
|
|
56
|
+
* import { computeNextSectionPropsAtBreak } from './section-props.js';
|
|
57
|
+
*
|
|
58
|
+
* const map = computeNextSectionPropsAtBreak(blocks);
|
|
59
|
+
* const propsForNextPage = map.get(sectionBreakIndex);
|
|
60
|
+
* if (propsForNextPage) {
|
|
61
|
+
* // Apply these properties when starting the page after this break
|
|
62
|
+
* }
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export declare function computeNextSectionPropsAtBreak(blocks: FlowBlock[]): Map<number, SectionProps>;
|