superdoc 2.2.1 → 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 -76
- package/web/views/index.ejs +0 -53
- package/web/views/layout.ejs +0 -13
- package/web/views/method.ejs +0 -59
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import { ColumnLayout, FlowBlock, HeaderFooterLayout, Layout, Measure, Page, ParagraphBlock, ParagraphMeasure, SectionMetadata, FlowMode, DocumentBackground } from '../../contracts/src/index.js';
|
|
2
|
+
import { PageState, ConstraintBoundary } from './paginator.js';
|
|
3
|
+
type PageSize = {
|
|
4
|
+
w: number;
|
|
5
|
+
h: number;
|
|
6
|
+
};
|
|
7
|
+
type Margins = {
|
|
8
|
+
top: number;
|
|
9
|
+
right: number;
|
|
10
|
+
bottom: number;
|
|
11
|
+
left: number;
|
|
12
|
+
header?: number;
|
|
13
|
+
footer?: number;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Synthetic page height used in semantic flow mode to avoid pagination-driven clipping
|
|
17
|
+
* during measurement. A large finite value preserves stable measurement constraints.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SEMANTIC_PAGE_HEIGHT_PX = 1000000;
|
|
20
|
+
export type LayoutOptions = {
|
|
21
|
+
pageSize?: PageSize;
|
|
22
|
+
margins?: Margins;
|
|
23
|
+
documentBackground?: DocumentBackground;
|
|
24
|
+
columns?: ColumnLayout;
|
|
25
|
+
flowMode?: FlowMode;
|
|
26
|
+
semantic?: {
|
|
27
|
+
contentWidth?: number;
|
|
28
|
+
marginLeft?: number;
|
|
29
|
+
marginRight?: number;
|
|
30
|
+
marginTop?: number;
|
|
31
|
+
marginBottom?: number;
|
|
32
|
+
};
|
|
33
|
+
remeasureParagraph?: (block: ParagraphBlock, maxWidth: number, firstLineIndent?: number) => ParagraphMeasure;
|
|
34
|
+
/** @internal Positioned paragraph frames that render without advancing the story cursor. */
|
|
35
|
+
nonFlowPositionedParagraphFrameIds?: ReadonlySet<string>;
|
|
36
|
+
sectionMetadata?: SectionMetadata[];
|
|
37
|
+
/**
|
|
38
|
+
* Extra bottom margin per page index (0-based) reserved for non-body content
|
|
39
|
+
* rendered at the bottom of the page (e.g., footnotes).
|
|
40
|
+
*
|
|
41
|
+
* When provided, the paginator will shrink the body content area on that page by
|
|
42
|
+
* increasing the effective bottom margin for that page only.
|
|
43
|
+
*/
|
|
44
|
+
footnoteReservedByPageIndex?: number[];
|
|
45
|
+
/**
|
|
46
|
+
* Footnote metadata. The core layout engine consumes only the fields below
|
|
47
|
+
* (SD-3049: ref positions + per-footnote body heights for block-aware breaks).
|
|
48
|
+
* Higher-level orchestration (layout-bridge) attaches additional fields
|
|
49
|
+
* (`blocksById`, separator dimensions, etc.) which the engine ignores.
|
|
50
|
+
*/
|
|
51
|
+
footnotes?: {
|
|
52
|
+
refs?: Array<{
|
|
53
|
+
id: string;
|
|
54
|
+
pos: number;
|
|
55
|
+
}>;
|
|
56
|
+
/**
|
|
57
|
+
* SD-3049: total measured body height per footnote id (sum of measured
|
|
58
|
+
* paragraph heights + per-paragraph spacingAfter + inter-footnote gap +
|
|
59
|
+
* separator overhead). Used by the body paginator to consult footnote
|
|
60
|
+
* demand at fragment-commit time so body packs tight to the demand.
|
|
61
|
+
*/
|
|
62
|
+
bodyHeightById?: Map<string, number>;
|
|
63
|
+
/**
|
|
64
|
+
* SD-2656: per-footnote first valid line/run height. The ordered-cluster
|
|
65
|
+
* rule (Word-style) requires only the LAST anchor on a page to fit its
|
|
66
|
+
* first line; all earlier anchors must fit fully (bodyHeightById). When
|
|
67
|
+
* present, the body slicer uses this value for the last anchor in the
|
|
68
|
+
* candidate cluster, otherwise falls back to bodyHeightById.
|
|
69
|
+
*/
|
|
70
|
+
firstLineHeightById?: Map<string, number>;
|
|
71
|
+
[key: string]: unknown;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Actual measured header content heights per variant type.
|
|
75
|
+
* When provided, the layout engine will ensure body content starts below
|
|
76
|
+
* the header content, preventing overlap when headers exceed their allocated margin space.
|
|
77
|
+
*
|
|
78
|
+
* Keys correspond to header variant types: 'default', 'first', 'even', 'odd'
|
|
79
|
+
* Values are the actual content heights in pixels.
|
|
80
|
+
*/
|
|
81
|
+
headerContentHeights?: Partial<Record<'default' | 'first' | 'even' | 'odd', number>>;
|
|
82
|
+
/**
|
|
83
|
+
* Actual measured footer content heights per variant type.
|
|
84
|
+
* When provided, the layout engine will ensure body content ends above
|
|
85
|
+
* the footer content, preventing overlap when footers exceed their allocated margin space.
|
|
86
|
+
*
|
|
87
|
+
* Keys correspond to footer variant types: 'default', 'first', 'even', 'odd'
|
|
88
|
+
* Values are the actual content heights in pixels.
|
|
89
|
+
*/
|
|
90
|
+
footerContentHeights?: Partial<Record<'default' | 'first' | 'even' | 'odd', number>>;
|
|
91
|
+
/**
|
|
92
|
+
* Actual measured header content heights per relationship ID.
|
|
93
|
+
* Used for multi-section documents where each section may have unique
|
|
94
|
+
* headers/footers referenced by their relationship IDs.
|
|
95
|
+
*
|
|
96
|
+
* Keys are relationship IDs (e.g., 'rId6', 'rId7')
|
|
97
|
+
* Values are the actual content heights in pixels.
|
|
98
|
+
*/
|
|
99
|
+
headerContentHeightsByRId?: Map<string, number>;
|
|
100
|
+
/**
|
|
101
|
+
* Actual measured header content heights per section-specific reference.
|
|
102
|
+
*
|
|
103
|
+
* Keys combine the relationship ID and section index using the form
|
|
104
|
+
* `${rId}::s${sectionIndex}` so the reserve path can distinguish documents
|
|
105
|
+
* that reuse the same header part across sections with different geometry.
|
|
106
|
+
*/
|
|
107
|
+
headerContentHeightsBySectionRef?: Map<string, number>;
|
|
108
|
+
/**
|
|
109
|
+
* Actual measured footer content heights per relationship ID.
|
|
110
|
+
* Used for multi-section documents where each section may have unique
|
|
111
|
+
* footers referenced by their relationship IDs.
|
|
112
|
+
*
|
|
113
|
+
* Keys are relationship IDs (e.g., 'rId8', 'rId9')
|
|
114
|
+
* Values are the actual content heights in pixels.
|
|
115
|
+
*/
|
|
116
|
+
footerContentHeightsByRId?: Map<string, number>;
|
|
117
|
+
/**
|
|
118
|
+
* Actual measured footer content heights per section-specific reference.
|
|
119
|
+
*
|
|
120
|
+
* Keys combine the relationship ID and section index using the form
|
|
121
|
+
* `${rId}::s${sectionIndex}` so the reserve path can distinguish documents
|
|
122
|
+
* that reuse the same footer part across sections with different geometry.
|
|
123
|
+
*/
|
|
124
|
+
footerContentHeightsBySectionRef?: Map<string, number>;
|
|
125
|
+
/**
|
|
126
|
+
* Allow body layout to synthesize page 1 for anchored tables when a document has
|
|
127
|
+
* no anchor paragraphs and would otherwise render zero pages.
|
|
128
|
+
*
|
|
129
|
+
* Header/footer layout keeps this disabled to avoid changing long-standing
|
|
130
|
+
* overlay behavior in paragraph-free header/footer regions.
|
|
131
|
+
*/
|
|
132
|
+
allowParagraphlessAnchoredTableFallback?: boolean;
|
|
133
|
+
allowParagraphlessAnchoredDrawingFallback?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Allow body layout to synthesize page 1 when section metadata exists but no
|
|
136
|
+
* renderable body blocks survive conversion.
|
|
137
|
+
*
|
|
138
|
+
* Header/footer layout keeps this disabled to preserve existing empty-region
|
|
139
|
+
* behavior for paragraph-free overlays.
|
|
140
|
+
*/
|
|
141
|
+
allowSectionBreakOnlyPageFallback?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Whether the document has odd/even header/footer differentiation enabled.
|
|
144
|
+
* Corresponds to the w:evenAndOddHeaders element in OOXML settings.xml.
|
|
145
|
+
* When true, odd pages use the 'odd' variant and even pages use the 'even' variant.
|
|
146
|
+
* When false or omitted, all pages use the 'default' variant.
|
|
147
|
+
*
|
|
148
|
+
* Must stay in sync with `getHeaderFooterTypeForSection` in
|
|
149
|
+
* `layout-bridge/src/headerFooterUtils.ts` — both sides read this value
|
|
150
|
+
* and must agree on variant selection.
|
|
151
|
+
*/
|
|
152
|
+
alternateHeaders?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Additive start context for page-boundary resume callers. Omitted input
|
|
155
|
+
* preserves the historical page-1 start behavior.
|
|
156
|
+
*/
|
|
157
|
+
startContext?: {
|
|
158
|
+
/** Physical page-number offset for emitted `Page.number` values. */
|
|
159
|
+
pageNumberOffset?: number;
|
|
160
|
+
/** Display/effective page counter to stamp on the first emitted page. */
|
|
161
|
+
activePageCounter?: number;
|
|
162
|
+
/** Active section index at the page boundary. */
|
|
163
|
+
activeSectionIndex?: number;
|
|
164
|
+
/** Physical page number on which the active section began. */
|
|
165
|
+
activeSectionFirstPageNumber?: number;
|
|
166
|
+
/** Effective inherited header/footer refs at the resumed page boundary. */
|
|
167
|
+
activeSectionRefs?: {
|
|
168
|
+
headerRefs?: Partial<Record<'default' | 'first' | 'even' | 'odd', string>>;
|
|
169
|
+
footerRefs?: Partial<Record<'default' | 'first' | 'even' | 'odd', string>>;
|
|
170
|
+
};
|
|
171
|
+
/** Effective page orientation at the resumed page boundary. */
|
|
172
|
+
activeOrientation?: 'portrait' | 'landscape' | null;
|
|
173
|
+
/**
|
|
174
|
+
* Base (uninflated) top/bottom margins of the active section at the
|
|
175
|
+
* resumed boundary (SD-3772 D2). These seed the section base state so a
|
|
176
|
+
* resumed run can never re-inflate an already header/footer-inflated
|
|
177
|
+
* effective margin; `options.margins` stays the document default so
|
|
178
|
+
* later section breaks with missing fields fall back exactly like cold.
|
|
179
|
+
*/
|
|
180
|
+
activeSectionBaseMargins?: {
|
|
181
|
+
top: number;
|
|
182
|
+
bottom: number;
|
|
183
|
+
};
|
|
184
|
+
/** Active left/right margins of the resumed section. */
|
|
185
|
+
activeSectionSideMargins?: {
|
|
186
|
+
left: number;
|
|
187
|
+
right: number;
|
|
188
|
+
};
|
|
189
|
+
/** Active header/footer distances of the resumed section. */
|
|
190
|
+
activeHeaderFooterDistances?: {
|
|
191
|
+
header: number;
|
|
192
|
+
footer: number;
|
|
193
|
+
};
|
|
194
|
+
/** Active page size at the resumed boundary (document default when omitted). */
|
|
195
|
+
activePageSize?: {
|
|
196
|
+
w: number;
|
|
197
|
+
h: number;
|
|
198
|
+
};
|
|
199
|
+
/** Resolved active column layout at the resumed boundary. */
|
|
200
|
+
activeColumns?: ColumnLayout;
|
|
201
|
+
/** Engine-authored exact state for a paragraph boundary inside the first emitted page. */
|
|
202
|
+
initialPageState?: {
|
|
203
|
+
prefixFragments: readonly Page['fragments'][number][];
|
|
204
|
+
cursorY: number;
|
|
205
|
+
maxCursorY: number;
|
|
206
|
+
columnIndex: number;
|
|
207
|
+
trailingSpacing: number;
|
|
208
|
+
lastParagraphStyleId?: string;
|
|
209
|
+
lastParagraphContextualSpacing: boolean;
|
|
210
|
+
lastParagraphBorderHash?: string;
|
|
211
|
+
constraintBoundaries: readonly ConstraintBoundary[];
|
|
212
|
+
activeConstraintIndex: number;
|
|
213
|
+
footnoteDemandThisPage: number;
|
|
214
|
+
footnoteRefsThisPage: number;
|
|
215
|
+
footnoteAnchorsThisPage: readonly PageState['footnoteAnchorsThisPage'][number][];
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* Optional page-boundary stop callback. Called after a page has completed
|
|
220
|
+
* and before the next page is created; returning true makes layoutDocument
|
|
221
|
+
* return the completed prefix.
|
|
222
|
+
*/
|
|
223
|
+
pageBoundary?: {
|
|
224
|
+
shouldStopBeforeNewPage?: (input: {
|
|
225
|
+
completedPageIndex: number;
|
|
226
|
+
pages: readonly Page[];
|
|
227
|
+
}) => boolean;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
export type HeaderFooterConstraints = {
|
|
231
|
+
width: number;
|
|
232
|
+
/** Body content height used as the measurement canvas (pagination boundary). */
|
|
233
|
+
height: number;
|
|
234
|
+
/** Actual page width for page-relative anchor positioning. */
|
|
235
|
+
pageWidth?: number;
|
|
236
|
+
/** Physical page height for vertical page-relative anchor conversion. */
|
|
237
|
+
pageHeight?: number;
|
|
238
|
+
/**
|
|
239
|
+
* Page margins for anchor positioning.
|
|
240
|
+
* `left`/`right`: horizontal page-relative conversion.
|
|
241
|
+
* `top`/`bottom`: vertical margin-relative conversion and fallback footer band origin.
|
|
242
|
+
* `header`: header distance from page top edge (header band origin).
|
|
243
|
+
* `footer`: footer distance from page bottom edge (footer band origin).
|
|
244
|
+
*/
|
|
245
|
+
margins?: {
|
|
246
|
+
left: number;
|
|
247
|
+
right: number;
|
|
248
|
+
top?: number;
|
|
249
|
+
bottom?: number;
|
|
250
|
+
header?: number;
|
|
251
|
+
footer?: number;
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* Optional base height used to bound behindDoc overflow handling.
|
|
255
|
+
* When provided, decorative assets far outside the header/footer band
|
|
256
|
+
* won't inflate layout height.
|
|
257
|
+
*/
|
|
258
|
+
overflowBaseHeight?: number;
|
|
259
|
+
};
|
|
260
|
+
/**
|
|
261
|
+
* Layout FlowBlocks into paginated fragments using measured line data.
|
|
262
|
+
*
|
|
263
|
+
* The function is intentionally deterministic: it walks the provided
|
|
264
|
+
* FlowBlocks in order, consumes their Measure objects (same index),
|
|
265
|
+
* and greedily stacks fragments inside the content box of each page/column.
|
|
266
|
+
*/
|
|
267
|
+
export declare function layoutDocument(blocks: FlowBlock[], measures: Measure[], options?: LayoutOptions): Layout;
|
|
268
|
+
export type LayoutRangeBoundaryPolicy = 'conservative-context' | 'overscan' | 'degraded-on-incomplete-state';
|
|
269
|
+
export type LayoutRangeExactness = 'exact' | 'pending-layout' | 'degraded-unsupported' | 'stale';
|
|
270
|
+
export type LayoutRangeSourceRange = {
|
|
271
|
+
startOrdinal: number;
|
|
272
|
+
endOrdinalExclusive: number;
|
|
273
|
+
};
|
|
274
|
+
export type LayoutRangePage = {
|
|
275
|
+
pageIndex: number;
|
|
276
|
+
page: Page;
|
|
277
|
+
sourceRange: LayoutRangeSourceRange | null;
|
|
278
|
+
};
|
|
279
|
+
export type LayoutRangeCheckpoint = {
|
|
280
|
+
pageIndex: number;
|
|
281
|
+
sourceOrdinal: number;
|
|
282
|
+
pageNumber?: number;
|
|
283
|
+
pageTopPx?: number;
|
|
284
|
+
pageSize?: PageSize;
|
|
285
|
+
margins?: Margins;
|
|
286
|
+
activeColumns?: ColumnLayout;
|
|
287
|
+
};
|
|
288
|
+
export type LayoutRangeInput = {
|
|
289
|
+
sourceSegment: {
|
|
290
|
+
blocks: readonly FlowBlock[];
|
|
291
|
+
measures: readonly Measure[];
|
|
292
|
+
sourceRange: LayoutRangeSourceRange;
|
|
293
|
+
};
|
|
294
|
+
startingCheckpoint: LayoutRangeCheckpoint | null;
|
|
295
|
+
pageRange: {
|
|
296
|
+
startPageIndex: number;
|
|
297
|
+
endPageIndexExclusive: number;
|
|
298
|
+
};
|
|
299
|
+
pageCountBudget?: number;
|
|
300
|
+
ordinalBudget?: number;
|
|
301
|
+
boundaryPolicy?: LayoutRangeBoundaryPolicy;
|
|
302
|
+
overscanBeforePages?: number;
|
|
303
|
+
overscanAfterPages?: number;
|
|
304
|
+
options?: LayoutOptions;
|
|
305
|
+
};
|
|
306
|
+
export type LayoutRangeResult = {
|
|
307
|
+
layout: Layout;
|
|
308
|
+
pages: readonly LayoutRangePage[];
|
|
309
|
+
endingCheckpoint: LayoutRangeCheckpoint | null;
|
|
310
|
+
exactness: LayoutRangeExactness;
|
|
311
|
+
diagnostics: readonly string[];
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* Legacy page-range exploration.
|
|
315
|
+
*
|
|
316
|
+
* This is not used by performance:pipeline or performance:pipeline:typing.
|
|
317
|
+
* The new mutation work starts with the dedicated snapshotComplete stage in
|
|
318
|
+
* the performance pipeline harness and should not be built on this API.
|
|
319
|
+
*
|
|
320
|
+
* Layout a page range from a validated page-boundary checkpoint without
|
|
321
|
+
* replaying the document prefix. This first production slice is deliberately
|
|
322
|
+
* conservative: simple self-contained ranges can be exact; unsupported shapes
|
|
323
|
+
* fail closed so callers can paint pending/degraded slots instead of compacting
|
|
324
|
+
* sparse content into fake page numbers.
|
|
325
|
+
*/
|
|
326
|
+
export declare function layoutDocumentRange(input: LayoutRangeInput): LayoutRangeResult;
|
|
327
|
+
/**
|
|
328
|
+
* Lays out header or footer content within specified dimensional constraints.
|
|
329
|
+
*
|
|
330
|
+
* Positions blocks within a header/footer region, handling page-relative anchor
|
|
331
|
+
* transformations and computing the actual height required by visible content.
|
|
332
|
+
*
|
|
333
|
+
* When `kind` and `constraints.pageHeight` are provided, page-relative and
|
|
334
|
+
* margin-relative anchored drawings are post-normalized from the synthetic
|
|
335
|
+
* measurement canvas to header/footer-local coordinates.
|
|
336
|
+
*
|
|
337
|
+
* Returns separate measurement bounds (for pagination) and render bounds
|
|
338
|
+
* (for overlay shift). See the Coordinate Contract in the fix plan for details.
|
|
339
|
+
*/
|
|
340
|
+
export declare function layoutHeaderFooter(blocks: FlowBlock[], measures: Measure[], constraints: HeaderFooterConstraints, kind?: 'header' | 'footer', remeasureParagraph?: (block: ParagraphBlock, maxWidth: number, firstLineIndent?: number) => ParagraphMeasure): HeaderFooterLayout;
|
|
341
|
+
export { buildAnchorMap, resolvePageRefTokens, getTocBlocksForRemeasurement } from './resolvePageRefs.js';
|
|
342
|
+
export { buildChapterContextByPage, computeDisplayPageNumber, formatPageNumber, formatPageNumberFieldValue, formatSectionPageNumberText, normalizeChapterMarkerText, } from './pageNumbering.js';
|
|
343
|
+
export type { ChapterPageInfo, DisplayPageInfo, PageNumberFormat } from './pageNumbering.js';
|
|
344
|
+
export { resolvePageNumberTokens } from './resolvePageTokens.js';
|
|
345
|
+
export type { NumberingContext, ResolvePageTokensResult, ResolvePageTokensOptions } from './resolvePageTokens.js';
|
|
346
|
+
export { getCellLines, getEmbeddedRowLines, resolveTableFrame, resolveRenderedTableWidth } from './layout-table.js';
|
|
347
|
+
export { describeCellRenderBlocks, computeCellSliceContentHeight } from './table-cell-slice.js';
|
|
348
|
+
export { layoutTextboxContent, resolveTextboxContentMeasures } from './layout-textbox.js';
|
|
349
|
+
export { SINGLE_COLUMN_DEFAULT } from './section-breaks.js';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { DrawingBlock, DrawingMeasure, ParagraphMeasure } from '../../contracts/src/index.js';
|
|
2
|
+
import { NormalizedColumns } from './layout-image.js';
|
|
3
|
+
import { PageState } from './paginator.js';
|
|
4
|
+
/**
|
|
5
|
+
* Context for laying out a drawing block (vector shape) within the page layout.
|
|
6
|
+
*
|
|
7
|
+
* Drawings are vector-based graphical objects (shapes, diagrams, etc.) that can be
|
|
8
|
+
* positioned inline or anchored. This context provides all necessary information and
|
|
9
|
+
* callbacks for positioning the drawing fragment on the current page/column.
|
|
10
|
+
*/
|
|
11
|
+
export type DrawingLayoutContext = {
|
|
12
|
+
/** The drawing block to layout */
|
|
13
|
+
block: DrawingBlock;
|
|
14
|
+
/** Measured dimensions and geometry data for the drawing */
|
|
15
|
+
measure: DrawingMeasure;
|
|
16
|
+
/** Normalized column configuration (width, gap, count) for the current layout */
|
|
17
|
+
columns: NormalizedColumns;
|
|
18
|
+
/** Ensures a page exists and returns the current page state */
|
|
19
|
+
ensurePage: () => PageState;
|
|
20
|
+
/** Advances to the next column or page, returning the new page state */
|
|
21
|
+
advanceColumn: (state: PageState) => PageState;
|
|
22
|
+
/** Computes the X coordinate for a column in the given page state (SD-2629). */
|
|
23
|
+
columnX: (state: PageState, columnIndex?: number) => number;
|
|
24
|
+
/** Optional textbox paragraph measurements carried alongside textbox drawings. */
|
|
25
|
+
textboxContentMeasures?: ParagraphMeasure[];
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Layout a drawing block (vector shape) within the document flow.
|
|
29
|
+
*
|
|
30
|
+
* This function handles inline/block-level vector shapes (rectangles, circles, etc.),
|
|
31
|
+
* positioning them on the page with proper scaling and margin handling. Anchored
|
|
32
|
+
* drawings (positioned objects) are skipped and handled separately via the anchoring
|
|
33
|
+
* system.
|
|
34
|
+
*
|
|
35
|
+
* Algorithm:
|
|
36
|
+
* 1. Skip anchored drawings (handled by anchor system)
|
|
37
|
+
* 2. Apply margins and scale drawing to fit within column width
|
|
38
|
+
* 3. Scale down if drawing exceeds page content height
|
|
39
|
+
* 4. Advance column/page if drawing doesn't fit at current cursor position
|
|
40
|
+
* 5. Create DrawingFragment with final position and dimensions
|
|
41
|
+
* 6. Push fragment to page and advance cursor
|
|
42
|
+
*
|
|
43
|
+
* @param context - Layout context containing block, measure, and layout callbacks
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* **Side Effects:**
|
|
47
|
+
* - Mutates page state via `ensurePage()` and `advanceColumn()`
|
|
48
|
+
* - Pushes DrawingFragment to `state.page.fragments`
|
|
49
|
+
* - Advances `state.cursorY` by the drawing's total height (including margins)
|
|
50
|
+
*
|
|
51
|
+
* **Scaling Behavior:**
|
|
52
|
+
* - Width is constrained to fit within column width (minus margins)
|
|
53
|
+
* - Height is constrained to fit within page content height
|
|
54
|
+
* - Aspect ratio is preserved during scaling
|
|
55
|
+
*
|
|
56
|
+
* **Anchored Drawings:**
|
|
57
|
+
* - Anchored drawings (`block.anchor?.isAnchored === true`) are skipped
|
|
58
|
+
* - They are positioned via the paragraph anchoring pre-pass
|
|
59
|
+
*/
|
|
60
|
+
export declare function layoutDrawingBlock({ block, measure, columns, ensurePage, advanceColumn, columnX, textboxContentMeasures, }: DrawingLayoutContext): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ImageBlock, ImageMeasure } from '../../contracts/src/index.js';
|
|
2
|
+
import { PageState } from './paginator.js';
|
|
3
|
+
export type NormalizedColumns = {
|
|
4
|
+
width: number;
|
|
5
|
+
gap: number;
|
|
6
|
+
count: number;
|
|
7
|
+
};
|
|
8
|
+
export type ImageLayoutContext = {
|
|
9
|
+
block: ImageBlock;
|
|
10
|
+
measure: ImageMeasure;
|
|
11
|
+
columns: NormalizedColumns;
|
|
12
|
+
ensurePage: () => PageState;
|
|
13
|
+
advanceColumn: (state: PageState) => PageState;
|
|
14
|
+
columnX: (state: PageState, columnIndex?: number) => number;
|
|
15
|
+
};
|
|
16
|
+
export declare function layoutImageBlock({ block, measure, columns, ensurePage, advanceColumn, columnX, }: ImageLayoutContext): void;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { FloatingObjectManager } from './floating-objects.js';
|
|
2
|
+
import { PageState } from './paginator.js';
|
|
3
|
+
import { PageMargins, ParagraphBlock, ParagraphMeasure, ImageBlock, ImageMeasure, DrawingBlock, DrawingMeasure } from '../../contracts/src/index.js';
|
|
4
|
+
import { AnchoredTable } from './anchors.js';
|
|
5
|
+
/**
|
|
6
|
+
* SD-2656: ordered footnote anchor entry. The body slicer reads the candidate
|
|
7
|
+
* anchors for a given PM range and pushes them onto `PageState.footnoteAnchorsThisPage`
|
|
8
|
+
* after committing the slice; the demand formula consumes the resulting list.
|
|
9
|
+
*/
|
|
10
|
+
export type FootnoteAnchorRef = {
|
|
11
|
+
pmPos: number;
|
|
12
|
+
refId: string;
|
|
13
|
+
fullHeight: number;
|
|
14
|
+
firstLineHeight: number;
|
|
15
|
+
};
|
|
16
|
+
export type ParagraphLayoutContext = {
|
|
17
|
+
block: ParagraphBlock;
|
|
18
|
+
measure: ParagraphMeasure;
|
|
19
|
+
columnWidth: number;
|
|
20
|
+
ensurePage: () => PageState;
|
|
21
|
+
advanceColumn: (state: PageState) => PageState;
|
|
22
|
+
columnX: (state: PageState, columnIndex?: number) => number;
|
|
23
|
+
floatManager: FloatingObjectManager;
|
|
24
|
+
remeasureParagraph?: (block: ParagraphBlock, maxWidth: number, firstLineIndent?: number) => ParagraphMeasure;
|
|
25
|
+
/**
|
|
26
|
+
* Override the paragraph's spacing-after value. Used when contextual spacing
|
|
27
|
+
* should suppress spacing between this paragraph and the next (same-style) paragraph.
|
|
28
|
+
* When undefined, uses the value from block.attrs.spacing.after.
|
|
29
|
+
*/
|
|
30
|
+
overrideSpacingAfter?: number;
|
|
31
|
+
/**
|
|
32
|
+
* SD-3049 / SD-2656: footnote demand under the ordered-cluster rule.
|
|
33
|
+
*
|
|
34
|
+
* demand = sum(fullHeight of cluster[0..N-1]) + firstLineHeight(cluster[N-1])
|
|
35
|
+
*
|
|
36
|
+
* where `cluster` is the ordered list of footnote anchors on the page. The
|
|
37
|
+
* caller passes the already-committed anchors (from PageState) plus the
|
|
38
|
+
* candidate range; this returns the demand assuming the candidate range is
|
|
39
|
+
* appended to the page's cluster.
|
|
40
|
+
*
|
|
41
|
+
* With no committed list, the in-range anchors are treated as the full
|
|
42
|
+
* cluster. With no range, returns the whole-block demand.
|
|
43
|
+
*/
|
|
44
|
+
getFootnoteDemandForBlockId?: (blockId: string, pmStart?: number, pmEnd?: number, committed?: ReadonlyArray<FootnoteAnchorRef>) => number;
|
|
45
|
+
/**
|
|
46
|
+
* SD-2656: returns the ordered anchor entries in `[pmStart, pmEnd]` so the
|
|
47
|
+
* slicer can push them onto PageState after accepting a candidate line.
|
|
48
|
+
*/
|
|
49
|
+
getFootnoteAnchorsForBlockId?: (blockId: string, pmStart?: number, pmEnd?: number) => ReadonlyArray<FootnoteAnchorRef>;
|
|
50
|
+
/**
|
|
51
|
+
* SD-2656: companion to getFootnoteDemandForBlockId — returns the number
|
|
52
|
+
* of footnote refs anchored in a given PM range of this block. Used to
|
|
53
|
+
* compute band overhead (separator + per-extra-ref gap + safety margin)
|
|
54
|
+
* for the candidate slice.
|
|
55
|
+
*/
|
|
56
|
+
getFootnoteRefCountForBlockId?: (blockId: string, pmStart?: number, pmEnd?: number) => number;
|
|
57
|
+
/**
|
|
58
|
+
* SD-2656: per-page footnote-band overhead in pixels for a given number of
|
|
59
|
+
* anchored refs. The slicer's `effectiveBottom` budget must match the
|
|
60
|
+
* planner's, otherwise body packs onto a page whose band cannot fit the
|
|
61
|
+
* refs. Source of truth lives in the planner (incrementalLayout.ts) and
|
|
62
|
+
* derives from `topPadding + dividerHeight + separatorSpacingBefore +
|
|
63
|
+
* (refs-1)*gap`. When not provided, the slicer falls back to a default
|
|
64
|
+
* formula that matches the planner's default values.
|
|
65
|
+
*/
|
|
66
|
+
getFootnoteBandOverhead?: (refsTotal: number) => number;
|
|
67
|
+
/**
|
|
68
|
+
* True when this paragraph exists only as a split line-break carrier for an
|
|
69
|
+
* anchored sibling from the same source paragraph. The paragraph must remain
|
|
70
|
+
* anchorable, but it must not emit its own visible fragment or consume
|
|
71
|
+
* vertical layout height.
|
|
72
|
+
*/
|
|
73
|
+
layoutOnlyAnchorCarrier?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* True when a split line-break carrier carries paragraph spacing that should
|
|
76
|
+
* remain in the flow. The carrier reserves one line plus spacing instead of
|
|
77
|
+
* using the standalone line-break measure, which would double-count the soft
|
|
78
|
+
* break after the paragraph was split around the anchored sibling.
|
|
79
|
+
*/
|
|
80
|
+
collapseSplitLineBreakCarrier?: boolean;
|
|
81
|
+
/** Whether a wrap=around positioned frame advances the surrounding story flow. */
|
|
82
|
+
positionedFrameAffectsFlow?: boolean;
|
|
83
|
+
};
|
|
84
|
+
export type AnchoredDrawingEntry = {
|
|
85
|
+
block: ImageBlock | DrawingBlock;
|
|
86
|
+
measure: ImageMeasure | DrawingMeasure;
|
|
87
|
+
};
|
|
88
|
+
export type ParagraphAnchorsContext = {
|
|
89
|
+
anchoredDrawings?: AnchoredDrawingEntry[];
|
|
90
|
+
anchoredTables?: AnchoredTable[];
|
|
91
|
+
columnWidth: number;
|
|
92
|
+
pageWidth: number;
|
|
93
|
+
pageMargins: PageMargins;
|
|
94
|
+
columns: {
|
|
95
|
+
width: number;
|
|
96
|
+
gap: number;
|
|
97
|
+
count: number;
|
|
98
|
+
};
|
|
99
|
+
placedAnchoredIds: Set<string>;
|
|
100
|
+
};
|
|
101
|
+
export declare function layoutParagraphBlock(ctx: ParagraphLayoutContext, anchors?: ParagraphAnchorsContext): void;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { TableBlock, TableMeasure, TableFragment, TableRowMeasure } from '../../contracts/src/index.js';
|
|
2
|
+
import { PageState } from './paginator.js';
|
|
3
|
+
export { ANCHORED_TABLE_FULL_WIDTH_RATIO, isAnchoredTableFullWidth } from './floating-table-anchor.js';
|
|
4
|
+
export type TableLayoutContext = {
|
|
5
|
+
block: TableBlock;
|
|
6
|
+
measure: TableMeasure;
|
|
7
|
+
columnWidth: number;
|
|
8
|
+
ensurePage: () => PageState;
|
|
9
|
+
advanceColumn: (state: PageState) => PageState;
|
|
10
|
+
columnX: (state: PageState, columnIndex?: number) => number;
|
|
11
|
+
};
|
|
12
|
+
export declare function resolveRenderedTableWidth(columnWidth: number, measuredWidth: number, attrs: TableBlock['attrs']): number;
|
|
13
|
+
/**
|
|
14
|
+
* Resolve the table fragment frame within a column based on justification.
|
|
15
|
+
*
|
|
16
|
+
* When justification is center or right/end, the table is aligned within the
|
|
17
|
+
* column width and tableIndent is ignored. Otherwise, tableIndent offsets the
|
|
18
|
+
* table from the left margin and clamps width only when needed to avoid overflow.
|
|
19
|
+
*
|
|
20
|
+
* @param baseX - Left edge of the column in pixels
|
|
21
|
+
* @param columnWidth - Available column width in pixels
|
|
22
|
+
* @param tableWidth - Measured table width in pixels
|
|
23
|
+
* @param attrs - Table attributes
|
|
24
|
+
* @returns Resolved x and width for the table fragment
|
|
25
|
+
*/
|
|
26
|
+
export declare function resolveTableFrame(baseX: number, columnWidth: number, tableWidth: number, attrs: TableBlock['attrs']): {
|
|
27
|
+
x: number;
|
|
28
|
+
width: number;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Get the line segments for a single embedded table row.
|
|
32
|
+
*
|
|
33
|
+
* If any cell in the row contains nested tables, recursively expand using
|
|
34
|
+
* the tallest cell's segments. This enables the layout engine to split at
|
|
35
|
+
* sub-row boundaries even for deeply nested tables (table-in-table-in-table).
|
|
36
|
+
* Otherwise, return the row as a single segment with its measured height.
|
|
37
|
+
*/
|
|
38
|
+
export declare function getEmbeddedRowLines(row: TableRowMeasure): Array<{
|
|
39
|
+
lineHeight: number;
|
|
40
|
+
}>;
|
|
41
|
+
export declare function getCellLines(cell: TableRowMeasure['cells'][number]): Array<{
|
|
42
|
+
lineHeight: number;
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* Layout a table block with row-boundary and mid-row splitting.
|
|
46
|
+
*
|
|
47
|
+
* Implements MS Word-compatible table splitting:
|
|
48
|
+
* - Breaks tables at row boundaries when exceeding page height
|
|
49
|
+
* - Splits rows mid-content when cantSplit is false (default)
|
|
50
|
+
* - Respects cantSplit attribute (prevents row from splitting)
|
|
51
|
+
* - Repeats header rows on continuation fragments
|
|
52
|
+
* - Handles floating tables (tblpPr) with monolithic layout
|
|
53
|
+
* - Tracks partial row continuations across pages
|
|
54
|
+
*
|
|
55
|
+
* Algorithm:
|
|
56
|
+
* 1. Detect floating tables → delegate to monolithic layout
|
|
57
|
+
* 2. Count header rows
|
|
58
|
+
* 3. Loop through rows, finding split points
|
|
59
|
+
* 4. When a partial row split occurs, track it for continuation
|
|
60
|
+
* 5. Create fragments with proper fromRow/toRow/repeatHeaderCount/partialRow
|
|
61
|
+
* 6. Advance cursor by actual fragment height (not total table height)
|
|
62
|
+
*
|
|
63
|
+
* @param context - Table layout context
|
|
64
|
+
|
|
65
|
+
*/
|
|
66
|
+
export declare function layoutTableBlock({ block, measure, columnWidth, ensurePage, advanceColumn, columnX, }: TableLayoutContext): void;
|
|
67
|
+
/**
|
|
68
|
+
* Create a table fragment for an anchored/floating table at its computed position.
|
|
69
|
+
* Called by the layout engine after the float manager computes the table's position.
|
|
70
|
+
*/
|
|
71
|
+
export declare function createAnchoredTableFragment(block: TableBlock, measure: TableMeasure, x: number, y: number): TableFragment;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DrawingMeasure, ParagraphMeasure, TextboxDrawing } from '../../contracts/src/index.js';
|
|
2
|
+
export declare function layoutTextboxContent(block: TextboxDrawing, remeasureParagraph: (block: TextboxDrawing['contentBlocks'][number], maxWidth: number) => ParagraphMeasure): ParagraphMeasure[];
|
|
3
|
+
/** Prefer canonical measurement output, retaining the synchronous bridge as a legacy fallback. */
|
|
4
|
+
export declare function resolveTextboxContentMeasures(block: TextboxDrawing, measure: DrawingMeasure, remeasureParagraph?: (block: TextboxDrawing['contentBlocks'][number], maxWidth: number) => ParagraphMeasure): ParagraphMeasure[] | undefined;
|