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,681 @@
|
|
|
1
|
+
import { FlowMode, Fragment, PageMargins, PageNumberChapterSeparator, PageNumberFormat, SourceAnchor, DocumentBackground, ResolvedLayout, ResolvedPage, ResolvedPaintItem, LayoutSourceIdentity, LayoutStoryLocator } from '../../../contracts/src/index.js';
|
|
2
|
+
import { PaintWorkSummary } from './page-content.js';
|
|
3
|
+
import { PageStyles } from './styles.js';
|
|
4
|
+
import { PaintSnapshotStructuredContentBlockEntity, PaintSnapshotStructuredContentInlineEntity } from './sdt/snapshot.js';
|
|
5
|
+
import { PositionValidationOptions, PositionValidationSummary } from './pm-position-validation.js';
|
|
6
|
+
export type { PaintSnapshotStructuredContentBlockEntity, PaintSnapshotStructuredContentInlineEntity, } from './sdt/snapshot.js';
|
|
7
|
+
export { applyLayoutIdentityDataset } from './utils/layout-identity.js';
|
|
8
|
+
/**
|
|
9
|
+
* Layout mode for document rendering.
|
|
10
|
+
*
|
|
11
|
+
* `'vertical'` (page-by-page vertical layout) is the only paginated
|
|
12
|
+
* arrangement — horizontal and book modes were deleted at painter plan P7
|
|
13
|
+
* (product decision 2026-07-05). The real presentation axis is `FlowMode`
|
|
14
|
+
* (`'paginated' | 'semantic'`); this type remains for API-shape compatibility.
|
|
15
|
+
*/
|
|
16
|
+
export type LayoutMode = 'vertical';
|
|
17
|
+
export type { FlowMode } from '../../../contracts/src/index.js';
|
|
18
|
+
/**
|
|
19
|
+
* Interface for position mapping from ProseMirror transactions.
|
|
20
|
+
* Used to efficiently update DOM position attributes without full re-render.
|
|
21
|
+
*/
|
|
22
|
+
export interface PositionMapping {
|
|
23
|
+
/** Transform a position from old to new document coordinates */
|
|
24
|
+
map(pos: number, bias?: number): number;
|
|
25
|
+
/** Array of step maps - length indicates transaction complexity */
|
|
26
|
+
readonly maps: readonly unknown[];
|
|
27
|
+
}
|
|
28
|
+
export type RenderedLineInfo = {
|
|
29
|
+
el: HTMLElement;
|
|
30
|
+
top: number;
|
|
31
|
+
height: number;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Input to `DomPainter.paint()`.
|
|
35
|
+
*
|
|
36
|
+
* The painter consumes only `resolvedLayout`. All fragment, geometry, and
|
|
37
|
+
* page-level metadata it needs is reachable from `ResolvedPaintItem.fragment`
|
|
38
|
+
* back-pointers and `ResolvedPage` fields.
|
|
39
|
+
*/
|
|
40
|
+
export type DomPainterInput = {
|
|
41
|
+
resolvedLayout: ResolvedLayout;
|
|
42
|
+
};
|
|
43
|
+
export type DomPainterPageWindowExactness = 'exact' | 'estimated' | 'loading' | 'pending-source' | 'pending-layout' | 'degraded-unsupported' | 'failed' | 'stale';
|
|
44
|
+
export type DomPainterPageWindowExtent = {
|
|
45
|
+
pageIndex: number;
|
|
46
|
+
topPx: number;
|
|
47
|
+
heightPx: number;
|
|
48
|
+
widthPx: number;
|
|
49
|
+
};
|
|
50
|
+
export type DomPainterPageWindowPacket = {
|
|
51
|
+
pageIndex: number;
|
|
52
|
+
exactness: DomPainterPageWindowExactness;
|
|
53
|
+
resolvedPage?: ResolvedPage | null;
|
|
54
|
+
diagnostic?: string | null;
|
|
55
|
+
};
|
|
56
|
+
export type DomPainterPageWindowInput = {
|
|
57
|
+
pageExtents: readonly DomPainterPageWindowExtent[];
|
|
58
|
+
documentExtent?: {
|
|
59
|
+
pageCount: number;
|
|
60
|
+
scrollHeightPx: number;
|
|
61
|
+
};
|
|
62
|
+
visibleRange: {
|
|
63
|
+
startPageIndex: number;
|
|
64
|
+
endPageIndexExclusive: number;
|
|
65
|
+
};
|
|
66
|
+
packets: readonly DomPainterPageWindowPacket[];
|
|
67
|
+
/** Exact document-level section totals; never derive these from the mounted window. */
|
|
68
|
+
sectionPageCounts?: Readonly<Record<string, number>>;
|
|
69
|
+
overscan?: number;
|
|
70
|
+
pinnedPageIndices?: readonly number[];
|
|
71
|
+
captureSnapshot?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Document-level page background (OOXML `w:background`), normally read off
|
|
74
|
+
* `ResolvedLayout.documentBackground` by the caller. Page-window paints own
|
|
75
|
+
* no `ResolvedLayout`, so without this scalar every windowed page silently
|
|
76
|
+
* loses the document background dense paint applies (page-window rendering
|
|
77
|
+
* preflight plan, failure mode 5). Omitted/null = no document background.
|
|
78
|
+
*/
|
|
79
|
+
documentBackground?: DocumentBackground | null;
|
|
80
|
+
/**
|
|
81
|
+
* Layout generation the extents were derived from (painter plan P5x). When
|
|
82
|
+
* provided, the torn-window guard is ARMED: every exact packet whose page
|
|
83
|
+
* carries a `layoutEpoch` must match it — a mismatch means the caller mixed
|
|
84
|
+
* packets from one layout pass with extents from another (torn window),
|
|
85
|
+
* which paints stale geometry that no per-page version key can catch. Fail
|
|
86
|
+
* loud instead. When omitted the guard stays dark and mixed stamps are
|
|
87
|
+
* tolerated — the pre-integration render surface serves
|
|
88
|
+
* stale-while-revalidate packets beside fresh ones by design; P6a arms the
|
|
89
|
+
* guard when it wires the windowed path (plan P6a item 6).
|
|
90
|
+
*/
|
|
91
|
+
layoutEpoch?: number;
|
|
92
|
+
};
|
|
93
|
+
export type PageDecorationPayload = {
|
|
94
|
+
fragments: Fragment[];
|
|
95
|
+
/** Resolved items aligned 1:1 with `fragments`. Same length, same order. */
|
|
96
|
+
items: ResolvedPaintItem[];
|
|
97
|
+
/** Minimum Y coordinate from layout; negative when content extends above y=0. */
|
|
98
|
+
minY?: number;
|
|
99
|
+
height: number;
|
|
100
|
+
/** Optional measured content height to aid bottom alignment in footers. */
|
|
101
|
+
contentHeight?: number;
|
|
102
|
+
/** Decoration band origin in page-local Y. Producer is the sole source of truth (SD-2957). */
|
|
103
|
+
offset: number;
|
|
104
|
+
marginLeft?: number;
|
|
105
|
+
contentWidth?: number;
|
|
106
|
+
headerFooterRefId?: string;
|
|
107
|
+
sectionType?: string;
|
|
108
|
+
/** True while this rendered header/footer story is the active editing surface. */
|
|
109
|
+
isActiveHeaderFooter?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* When `false`, total-page-count fields (`NUMPAGES` / `SECTIONPAGES`) in this
|
|
112
|
+
* decoration render their pre-resolved provisional text (source-cached DOCX
|
|
113
|
+
* result, em dash when absent) instead of the current page totals — used
|
|
114
|
+
* while pagination is still partial. Absent/`true` = exact totals (existing
|
|
115
|
+
* caller behavior).
|
|
116
|
+
*/
|
|
117
|
+
pageCountFieldsExact?: boolean;
|
|
118
|
+
box?: {
|
|
119
|
+
x: number;
|
|
120
|
+
y: number;
|
|
121
|
+
width: number;
|
|
122
|
+
height: number;
|
|
123
|
+
};
|
|
124
|
+
hitRegion?: {
|
|
125
|
+
x: number;
|
|
126
|
+
y: number;
|
|
127
|
+
width: number;
|
|
128
|
+
height: number;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Provider function for page decorations (headers and footers).
|
|
133
|
+
* Called for each page to generate header or footer content.
|
|
134
|
+
*
|
|
135
|
+
* @param {number} pageNumber - The page number (1-indexed)
|
|
136
|
+
* @param {PageMargins} [pageMargins] - Page margin configuration
|
|
137
|
+
* @param {ResolvedPage} [page] - Resolved page from the layout
|
|
138
|
+
* @returns {PageDecorationPayload | null} Decoration payload containing fragments and layout info, or null if no decoration
|
|
139
|
+
*/
|
|
140
|
+
export type PageDecorationProvider = (pageNumber: number, pageMargins?: PageMargins, page?: ResolvedPage) => PageDecorationPayload | null;
|
|
141
|
+
type PainterOptions = {
|
|
142
|
+
pageStyles?: PageStyles;
|
|
143
|
+
layoutMode?: LayoutMode;
|
|
144
|
+
flowMode?: FlowMode;
|
|
145
|
+
/** Gap between pages in pixels (default: 24px) */
|
|
146
|
+
pageGap?: number;
|
|
147
|
+
headerProvider?: PageDecorationProvider;
|
|
148
|
+
footerProvider?: PageDecorationProvider;
|
|
149
|
+
/** Called with the paint snapshot after each paint cycle completes. */
|
|
150
|
+
onPaintSnapshot?: (snapshot: PaintSnapshot) => void;
|
|
151
|
+
/** Render nonprinting formatting marks such as spaces, tabs, and paragraph marks. */
|
|
152
|
+
showFormattingMarks?: boolean;
|
|
153
|
+
/** Built-in SDT chrome rendering mode. */
|
|
154
|
+
contentControlsChrome?: 'default' | 'none';
|
|
155
|
+
/** Per-document logical->physical font resolver (face-aware); see DomPainterOptions.resolvePhysical. */
|
|
156
|
+
resolvePhysical?: (cssFontFamily: string, face: {
|
|
157
|
+
weight: '400' | '700';
|
|
158
|
+
style: 'normal' | 'italic';
|
|
159
|
+
}) => string;
|
|
160
|
+
/** Populate PaintWorkSummary's per-page index arrays (P5 §4.6). Dark by default; see DomPainterOptions.paintWorkAttribution. */
|
|
161
|
+
paintWorkAttribution?: boolean;
|
|
162
|
+
/** Story-aware position-coverage validation. Dark by default; see DomPainterOptions.positionValidation. */
|
|
163
|
+
positionValidation?: PositionValidationOptions;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Rendering context passed to fragment renderers containing page metadata.
|
|
167
|
+
* Provides information about the current page position and section for dynamic content like page numbers.
|
|
168
|
+
*
|
|
169
|
+
* @typedef {Object} FragmentRenderContext
|
|
170
|
+
* @property {number} pageNumber - Current page number (1-indexed)
|
|
171
|
+
* @property {number} totalPages - Total number of pages in the document
|
|
172
|
+
* @property {'body'|'header'|'footer'} section - Document section being rendered
|
|
173
|
+
* @property {string} [pageNumberText] - Optional formatted page number text (e.g., "Page 1 of 10")
|
|
174
|
+
* @property {number} [displayPageNumber] - Section-aware numeric page value before formatting
|
|
175
|
+
* @property {number} [sectionPageCount] - Physical page count in the current section
|
|
176
|
+
*/
|
|
177
|
+
export type FragmentRenderContext = {
|
|
178
|
+
pageNumber: number;
|
|
179
|
+
totalPages: number;
|
|
180
|
+
section: 'body' | 'header' | 'footer';
|
|
181
|
+
story?: LayoutStoryLocator;
|
|
182
|
+
pageNumberText?: string;
|
|
183
|
+
displayPageNumber?: number;
|
|
184
|
+
pageNumberFormat?: PageNumberFormat;
|
|
185
|
+
pageNumberChapterText?: string;
|
|
186
|
+
pageNumberChapterSeparator?: PageNumberChapterSeparator;
|
|
187
|
+
sectionPageCount?: number;
|
|
188
|
+
pageIndex?: number;
|
|
189
|
+
/**
|
|
190
|
+
* When `false`, total-page-count tokens render their pre-resolved
|
|
191
|
+
* provisional run text (source-cached DOCX result / em dash) instead of
|
|
192
|
+
* `totalPages` / `sectionPageCount`. Absent/`true` = exact (default).
|
|
193
|
+
*/
|
|
194
|
+
pageCountFieldsExact?: boolean;
|
|
195
|
+
};
|
|
196
|
+
export type PaintSnapshotLineStyle = {
|
|
197
|
+
paddingLeftPx?: number;
|
|
198
|
+
paddingRightPx?: number;
|
|
199
|
+
textIndentPx?: number;
|
|
200
|
+
marginLeftPx?: number;
|
|
201
|
+
marginRightPx?: number;
|
|
202
|
+
leftPx?: number;
|
|
203
|
+
topPx?: number;
|
|
204
|
+
widthPx?: number;
|
|
205
|
+
heightPx?: number;
|
|
206
|
+
display?: string;
|
|
207
|
+
position?: string;
|
|
208
|
+
textAlign?: string;
|
|
209
|
+
justifyContent?: string;
|
|
210
|
+
};
|
|
211
|
+
export type PaintSnapshotMarkerStyle = {
|
|
212
|
+
text?: string;
|
|
213
|
+
leftPx?: number;
|
|
214
|
+
widthPx?: number;
|
|
215
|
+
paddingRightPx?: number;
|
|
216
|
+
display?: string;
|
|
217
|
+
position?: string;
|
|
218
|
+
textAlign?: string;
|
|
219
|
+
fontWeight?: string;
|
|
220
|
+
fontStyle?: string;
|
|
221
|
+
color?: string;
|
|
222
|
+
sourceAnchor?: SourceAnchor;
|
|
223
|
+
};
|
|
224
|
+
export type PaintSnapshotTabStyle = {
|
|
225
|
+
widthPx?: number;
|
|
226
|
+
leftPx?: number;
|
|
227
|
+
position?: string;
|
|
228
|
+
borderBottom?: string;
|
|
229
|
+
};
|
|
230
|
+
export type PaintSnapshotAnnotationEntity = {
|
|
231
|
+
element: HTMLElement;
|
|
232
|
+
pageIndex: number;
|
|
233
|
+
pmStart?: number;
|
|
234
|
+
pmEnd?: number;
|
|
235
|
+
fieldId?: string;
|
|
236
|
+
fieldType?: string;
|
|
237
|
+
type?: string;
|
|
238
|
+
layoutSourceIdentity?: LayoutSourceIdentity;
|
|
239
|
+
};
|
|
240
|
+
export type PaintSnapshotImageEntity = {
|
|
241
|
+
element: HTMLElement;
|
|
242
|
+
pageIndex: number;
|
|
243
|
+
kind: 'inline' | 'fragment';
|
|
244
|
+
pmStart?: number;
|
|
245
|
+
pmEnd?: number;
|
|
246
|
+
blockId?: string;
|
|
247
|
+
sourceAnchor?: SourceAnchor;
|
|
248
|
+
layoutSourceIdentity?: LayoutSourceIdentity;
|
|
249
|
+
};
|
|
250
|
+
export type PaintSnapshotEntities = {
|
|
251
|
+
annotations: PaintSnapshotAnnotationEntity[];
|
|
252
|
+
structuredContentBlocks: PaintSnapshotStructuredContentBlockEntity[];
|
|
253
|
+
structuredContentInlines: PaintSnapshotStructuredContentInlineEntity[];
|
|
254
|
+
images: PaintSnapshotImageEntity[];
|
|
255
|
+
};
|
|
256
|
+
export type PaintSnapshotLine = {
|
|
257
|
+
index: number;
|
|
258
|
+
inTableFragment: boolean;
|
|
259
|
+
inTableParagraph: boolean;
|
|
260
|
+
style: PaintSnapshotLineStyle;
|
|
261
|
+
markers?: PaintSnapshotMarkerStyle[];
|
|
262
|
+
tabs?: PaintSnapshotTabStyle[];
|
|
263
|
+
sourceAnchor?: SourceAnchor;
|
|
264
|
+
layoutSourceIdentity?: LayoutSourceIdentity;
|
|
265
|
+
};
|
|
266
|
+
export type PaintSnapshotPage = {
|
|
267
|
+
index: number;
|
|
268
|
+
pageNumber?: number;
|
|
269
|
+
lineCount: number;
|
|
270
|
+
lines: PaintSnapshotLine[];
|
|
271
|
+
};
|
|
272
|
+
export type PaintSnapshot = {
|
|
273
|
+
formatVersion: 1;
|
|
274
|
+
pageCount: number;
|
|
275
|
+
lineCount: number;
|
|
276
|
+
markerCount: number;
|
|
277
|
+
tabCount: number;
|
|
278
|
+
pages: PaintSnapshotPage[];
|
|
279
|
+
entities: PaintSnapshotEntities;
|
|
280
|
+
};
|
|
281
|
+
type PageWindowPainterTransaction = {
|
|
282
|
+
commit(): void;
|
|
283
|
+
rollback(): void;
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* DOM-based document painter that renders layout fragments to HTML elements.
|
|
287
|
+
* One paint entry per mode (painter plan P7): `paintPageWindow` owns
|
|
288
|
+
* paginated flow (windowed, page-keyed reuse; a dense paint is a full-range
|
|
289
|
+
* window), `paint()` owns semantic flow (continuous surface).
|
|
290
|
+
*
|
|
291
|
+
* @class DomPainter
|
|
292
|
+
*
|
|
293
|
+
* @remarks
|
|
294
|
+
* The DomPainter is responsible for:
|
|
295
|
+
* - Rendering layout fragments (paragraphs, lists, images, tables, drawings) to DOM elements
|
|
296
|
+
* - Managing page-level DOM structure and styling
|
|
297
|
+
* - Handling headers and footers via PageDecorationProvider
|
|
298
|
+
* - Incremental re-rendering when only specific blocks change
|
|
299
|
+
* - Hyperlink rendering with security sanitization and accessibility
|
|
300
|
+
*/
|
|
301
|
+
export declare class DomPainter {
|
|
302
|
+
private readonly options;
|
|
303
|
+
private mount;
|
|
304
|
+
private doc;
|
|
305
|
+
private pageStates;
|
|
306
|
+
private currentLayout;
|
|
307
|
+
private denseProofNextPageIndex;
|
|
308
|
+
private changedBlocks;
|
|
309
|
+
private readonly isSemanticFlow;
|
|
310
|
+
private headerProvider?;
|
|
311
|
+
private footerProvider?;
|
|
312
|
+
private totalPages;
|
|
313
|
+
private sectionPageCounts;
|
|
314
|
+
private linkIdCounter;
|
|
315
|
+
private sdtLabelsRendered;
|
|
316
|
+
/**
|
|
317
|
+
* WeakMap storing tooltip data for hyperlink elements before DOM insertion.
|
|
318
|
+
* Uses WeakMap to prevent memory leaks - entries are automatically garbage collected
|
|
319
|
+
* when the corresponding element is removed from memory.
|
|
320
|
+
* @private
|
|
321
|
+
*/
|
|
322
|
+
private pendingTooltips;
|
|
323
|
+
private pageGap;
|
|
324
|
+
private layoutVersion;
|
|
325
|
+
private layoutEpoch;
|
|
326
|
+
private processedLayoutVersion;
|
|
327
|
+
/** Current transaction mapping for position updates (null if no mapping or complex transaction) */
|
|
328
|
+
private currentMapping;
|
|
329
|
+
private windowPageStates;
|
|
330
|
+
private windowMount;
|
|
331
|
+
/**
|
|
332
|
+
* Provider identity may advance every render generation even when the body
|
|
333
|
+
* page remains reusable. Refresh header/footer DOM on the next window paint
|
|
334
|
+
* without discarding the retained page element or its body fragments.
|
|
335
|
+
*/
|
|
336
|
+
private windowDecorationsDirty;
|
|
337
|
+
/**
|
|
338
|
+
* Page-window analog of `currentLayout.documentBackground`: the window path
|
|
339
|
+
* deliberately runs with `currentLayout = null`, so the document background
|
|
340
|
+
* scalar from `DomPainterPageWindowInput` is retained here for
|
|
341
|
+
* `getEffectivePageStyles()`. Reset by dense `paint()`/`resetState()`/
|
|
342
|
+
* `dispose()` so a stale window value can never leak across modes/mounts.
|
|
343
|
+
*/
|
|
344
|
+
private windowDocumentBackground;
|
|
345
|
+
private paintWork;
|
|
346
|
+
/**
|
|
347
|
+
* P5 §4.6 (review fix): per-page attribution arrays are opt-in. Counters
|
|
348
|
+
* are O(1) when never consumed; the arrays grow per paint, and product
|
|
349
|
+
* code never drains the summary — only the perf harness (which needs WHICH
|
|
350
|
+
* pages for its repaint oracle) turns this on.
|
|
351
|
+
*/
|
|
352
|
+
private readonly paintWorkAttribution;
|
|
353
|
+
/**
|
|
354
|
+
* Story-aware position-coverage collector, owned per painter instance so the
|
|
355
|
+
* product surface window and the dense-reference oracle never mix counts.
|
|
356
|
+
* Dark unless enabled via options; when dark, `record()` is a single branch.
|
|
357
|
+
*/
|
|
358
|
+
private readonly positionValidation;
|
|
359
|
+
private paintSnapshotBuilder;
|
|
360
|
+
private lastPaintSnapshot;
|
|
361
|
+
private onPaintSnapshotCallback;
|
|
362
|
+
/**
|
|
363
|
+
* Private page-window transaction state. The package handle exposes this
|
|
364
|
+
* only through a non-enumerable Symbol.for seam; it is deliberately absent
|
|
365
|
+
* from the public DomPainterHandle contract.
|
|
366
|
+
*/
|
|
367
|
+
private activePageWindowTransaction;
|
|
368
|
+
private mountedPageIndices;
|
|
369
|
+
/** Resolved layout for the next-gen paint pipeline. */
|
|
370
|
+
private resolvedLayout;
|
|
371
|
+
private showFormattingMarks;
|
|
372
|
+
private contentControlsChrome;
|
|
373
|
+
constructor(options?: PainterOptions);
|
|
374
|
+
setShowFormattingMarks(showFormattingMarks: boolean): void;
|
|
375
|
+
setProviders(header?: PageDecorationProvider, footer?: PageDecorationProvider): void;
|
|
376
|
+
private applyFormattingMarksClass;
|
|
377
|
+
private invalidateRenderedContent;
|
|
378
|
+
/**
|
|
379
|
+
* Forget the page-window surface so the next `paintPageWindow` rebuilds
|
|
380
|
+
* every page from scratch (fresh-mount branch: clear + `innerHTML = ''`).
|
|
381
|
+
* Used by invalidations whose inputs are not covered by
|
|
382
|
+
* `pageWindowVersionKey` and require rebuilding body content (for example,
|
|
383
|
+
* render-setting changes). Provider swaps use a decoration-only refresh.
|
|
384
|
+
*/
|
|
385
|
+
private invalidateWindowSurface;
|
|
386
|
+
/** Returns the resolved page for a given index, or null if resolved data is unavailable. */
|
|
387
|
+
private getResolvedPage;
|
|
388
|
+
/**
|
|
389
|
+
* Returns the latest painter snapshot captured during the last paint cycle.
|
|
390
|
+
*/
|
|
391
|
+
getPaintSnapshot(): PaintSnapshot | null;
|
|
392
|
+
/**
|
|
393
|
+
* Returns the page indices that are currently mounted in the DOM.
|
|
394
|
+
*
|
|
395
|
+
* Reflects the painter's current mounted set (page-window mounts/unmounts
|
|
396
|
+
* included) without waiting for a full paint cycle.
|
|
397
|
+
*/
|
|
398
|
+
getMountedPageIndices(): number[];
|
|
399
|
+
/**
|
|
400
|
+
* Begin a rollbackable transaction around a content paint. Named for the
|
|
401
|
+
* paginated page-window path it was minted for; the captured snapshot is
|
|
402
|
+
* the painter's COMPLETE retained/index state, so the same journal serves
|
|
403
|
+
* the semantic flow's dense `paint()` entry (the v2 host's canonical
|
|
404
|
+
* atomic visible commit wraps both paint kinds in one transaction).
|
|
405
|
+
*
|
|
406
|
+
* This method is not part of DomPainterHandle. The package factory installs
|
|
407
|
+
* a non-enumerable Symbol.for hook that the v2 routed wrapper alone reads.
|
|
408
|
+
* The caller owns the matching DOM mutation journal; rollback here restores
|
|
409
|
+
* every painter-owned retained/index plane to references for those restored
|
|
410
|
+
* last-good nodes.
|
|
411
|
+
*/
|
|
412
|
+
beginPageWindowTransaction(): PageWindowPainterTransaction;
|
|
413
|
+
private capturePageWindowPainterState;
|
|
414
|
+
private restorePageWindowPainterState;
|
|
415
|
+
private createAllPageIndices;
|
|
416
|
+
private setMountedPageIndices;
|
|
417
|
+
private emitPaintSnapshot;
|
|
418
|
+
private beginPaintSnapshot;
|
|
419
|
+
private finalizePaintSnapshotFromBuilder;
|
|
420
|
+
private capturePaintSnapshotLine;
|
|
421
|
+
private collectPaintSnapshotFromDomRoot;
|
|
422
|
+
/**
|
|
423
|
+
* Dense continuous paint. Mode ownership (painter plan P7): semantic flow's
|
|
424
|
+
* ONLY paint entry, and — for paginated flow — the package-internal dense
|
|
425
|
+
* REFERENCE implementation kept as the executable spec the equivalence
|
|
426
|
+
* oracles and kernel tests compare `paintPageWindow` against. Consumers
|
|
427
|
+
* reach the paginated form exclusively through `createDenseReferencePainter`;
|
|
428
|
+
* the ordinary `createDomPainter` handle rejects paginated `paint()` calls.
|
|
429
|
+
*/
|
|
430
|
+
paint(input: DomPainterInput, mount: HTMLElement, mapping?: PositionMapping): void;
|
|
431
|
+
/**
|
|
432
|
+
* Proof-only dense traversal. It preserves the dense painter's document
|
|
433
|
+
* context and cross-page state while retaining DOM for only one bounded
|
|
434
|
+
* page interval at a time.
|
|
435
|
+
*/
|
|
436
|
+
paintDensePageBatch(input: DomPainterInput, mount: HTMLElement, startPageIndex: number, endPageIndexExclusive: number): void;
|
|
437
|
+
/**
|
|
438
|
+
* Page-window runtime API. It accepts document-owned page extents and page
|
|
439
|
+
* packets for the currently visible range, so callers can mount a lower-page
|
|
440
|
+
* viewport without handing the painter a complete `ResolvedLayout.pages`
|
|
441
|
+
* array. Non-exact pages are explicit pending/degraded sheets, never blank
|
|
442
|
+
* workspace.
|
|
443
|
+
*/
|
|
444
|
+
paintPageWindow(input: DomPainterPageWindowInput, mount: HTMLElement): void;
|
|
445
|
+
/**
|
|
446
|
+
* Painter plan §4.6 (dark observability): page-window paint work since the
|
|
447
|
+
* last consume. Never invents values — fields the path cannot attribute yet
|
|
448
|
+
* stay 0/null.
|
|
449
|
+
*/
|
|
450
|
+
consumePaintWorkSummary(): PaintWorkSummary;
|
|
451
|
+
/**
|
|
452
|
+
* Story-aware position-coverage since the last consume, drained and reset at
|
|
453
|
+
* this documented pass boundary. Content-free and bounded; safe to serialize
|
|
454
|
+
* into a performance report. When the collector is dark (the product
|
|
455
|
+
* default), the summary is empty (`checked: 0`).
|
|
456
|
+
*/
|
|
457
|
+
consumePositionValidationSummary(): PositionValidationSummary;
|
|
458
|
+
/**
|
|
459
|
+
* Per-page work attribution (P5 §4.6), opt-in via `paintWorkAttribution`:
|
|
460
|
+
* the arrays are only drained by `consumePaintWorkSummary()`, so an
|
|
461
|
+
* always-on push would grow unboundedly on the product path where nothing
|
|
462
|
+
* ever consumes the summary. Counters stay always-on and O(1).
|
|
463
|
+
*/
|
|
464
|
+
private recordPageWork;
|
|
465
|
+
private configureSpacerElement;
|
|
466
|
+
private createPageWindowSpacer;
|
|
467
|
+
private createPendingPageWindowElement;
|
|
468
|
+
private ensurePageWindowPendingSkeletonStyles;
|
|
469
|
+
private renderColumnSeparators;
|
|
470
|
+
private getColumnSeparatorPositions;
|
|
471
|
+
private renderDecorationsForPage;
|
|
472
|
+
/**
|
|
473
|
+
* Check if a fragment is vertically anchored to the page.
|
|
474
|
+
* Used to determine special Y positioning for page-relative anchored content
|
|
475
|
+
* in header/footer decoration sections.
|
|
476
|
+
*/
|
|
477
|
+
private isPageRelativeAnchoredFragment;
|
|
478
|
+
private isPageRelativeParagraphFrame;
|
|
479
|
+
private isPageRelativeHorizontalAnchoredFragment;
|
|
480
|
+
/**
|
|
481
|
+
* Header/footer layout emits normalized anchor Y coordinates:
|
|
482
|
+
* - headers: local to the header container origin
|
|
483
|
+
* - footers: local to the top of the footer band (pageHeight - bottomMargin)
|
|
484
|
+
*
|
|
485
|
+
* Footer containers can grow upward when content overflows the reserved footer
|
|
486
|
+
* band, so their top edge is not always the same as the footer band origin.
|
|
487
|
+
* This helper returns the page-space origin that normalized anchor Y values
|
|
488
|
+
* are measured from.
|
|
489
|
+
*/
|
|
490
|
+
private getDecorationAnchorPageOriginY;
|
|
491
|
+
private getFooterFragmentAnchorPageOriginY;
|
|
492
|
+
private renderDecorationSection;
|
|
493
|
+
private resetState;
|
|
494
|
+
dispose(): void;
|
|
495
|
+
private getSectionPageCount;
|
|
496
|
+
private fullRender;
|
|
497
|
+
private patchLayout;
|
|
498
|
+
private patchPage;
|
|
499
|
+
/**
|
|
500
|
+
* Updates data-pm-start/data-pm-end attributes on all elements within a fragment
|
|
501
|
+
* using the transaction's mapping. Skips header/footer content (separate PM coordinate space).
|
|
502
|
+
* Also skips fragments that end before the edit point (their positions don't change).
|
|
503
|
+
*/
|
|
504
|
+
/**
|
|
505
|
+
* Refreshes data-pm-start/data-pm-end on a REUSED story fragment from the
|
|
506
|
+
* fresh resolved item. Story positions are local to their story document,
|
|
507
|
+
* so the body transaction mapping cannot update them; instead the uniform
|
|
508
|
+
* shift between the fresh first position and the painted one is applied.
|
|
509
|
+
* Exact for unchanged blocks (positions inside one block shift uniformly).
|
|
510
|
+
*/
|
|
511
|
+
private updateStoryPositionAttributes;
|
|
512
|
+
private updatePositionAttributes;
|
|
513
|
+
private createPageState;
|
|
514
|
+
/**
|
|
515
|
+
* Explicit page-content context (painter plan P3a, §4.2): the class state
|
|
516
|
+
* `renderPage`/`patchPage` consume, rebuilt per call because totalPages,
|
|
517
|
+
* layoutEpoch, and the transaction mapping change between paints. The deep
|
|
518
|
+
* fragment-rendering call graph stays on the class, reached through these
|
|
519
|
+
* bound members.
|
|
520
|
+
*/
|
|
521
|
+
private pageContentContext;
|
|
522
|
+
private applySemanticPageOverrides;
|
|
523
|
+
private getEffectivePageStyles;
|
|
524
|
+
private renderFragment;
|
|
525
|
+
/**
|
|
526
|
+
* Renders a paragraph fragment with defensive error handling.
|
|
527
|
+
* Falls back to error placeholder on rendering errors to prevent full paint failure.
|
|
528
|
+
*
|
|
529
|
+
* @param fragment - The paragraph fragment to render
|
|
530
|
+
* @param context - Rendering context with page and column information
|
|
531
|
+
* @param sdtBoundary - Optional SDT boundary overrides for multi-fragment containers
|
|
532
|
+
* @returns HTMLElement containing the rendered fragment or error placeholder
|
|
533
|
+
*/
|
|
534
|
+
private renderParagraphFragment;
|
|
535
|
+
/**
|
|
536
|
+
* Creates an error placeholder element for failed fragment renders.
|
|
537
|
+
* Prevents entire paint operation from failing due to single fragment error.
|
|
538
|
+
*
|
|
539
|
+
* @param blockId - The block ID that failed to render
|
|
540
|
+
* @param error - The error that occurred
|
|
541
|
+
* @returns HTMLElement showing the error
|
|
542
|
+
*/
|
|
543
|
+
private createErrorPlaceholder;
|
|
544
|
+
private renderImageFragment;
|
|
545
|
+
/**
|
|
546
|
+
* Optionally wrap an image element in an anchor for DrawingML hyperlinks (a:hlinkClick).
|
|
547
|
+
*
|
|
548
|
+
* When `hyperlink` is present and its URL passes sanitization, returns an
|
|
549
|
+
* `<a class="superdoc-link">` wrapping `imageEl`. The existing EditorInputManager
|
|
550
|
+
* click-delegation on `a.superdoc-link` handles both viewing-mode navigation and
|
|
551
|
+
* editing-mode event dispatch automatically, with no extra wiring needed here.
|
|
552
|
+
*
|
|
553
|
+
* When `hyperlink` is absent or the URL fails sanitization the original element
|
|
554
|
+
* is returned unchanged.
|
|
555
|
+
*
|
|
556
|
+
* @param imageEl - The image element (img or span wrapper) to potentially wrap.
|
|
557
|
+
* @param hyperlink - Hyperlink metadata from the ImageBlock/ImageRun, or undefined.
|
|
558
|
+
* @param display - CSS display value for the anchor: 'block' for fragment images,
|
|
559
|
+
* 'inline-block' for inline runs.
|
|
560
|
+
*/
|
|
561
|
+
private buildImageHyperlinkAnchor;
|
|
562
|
+
/**
|
|
563
|
+
* SD-3521 — stamp canonical textbox interaction metadata (`data-sd-textbox-*`)
|
|
564
|
+
* onto a painted drawing fragment. The host reads these to drive object
|
|
565
|
+
* selection + move/resize gestures from canonical geometry (intrinsic
|
|
566
|
+
* unrotated extent, rotation, flips, per-axis layout scale) plus kernel
|
|
567
|
+
* capability + OCC revision, never from the rotated outer AABB. Repeated
|
|
568
|
+
* header/footer instances share the textbox id but get a distinct
|
|
569
|
+
* instance key (page-scoped). No-ops for non-textbox drawings.
|
|
570
|
+
*/
|
|
571
|
+
private applyTextboxInteractionDataset;
|
|
572
|
+
private renderDrawingFragment;
|
|
573
|
+
private renderDrawingContent;
|
|
574
|
+
private createVectorShapeElement;
|
|
575
|
+
/**
|
|
576
|
+
* Apply fill and stroke styles to a fallback shape container
|
|
577
|
+
*/
|
|
578
|
+
private applyFallbackShapeStyle;
|
|
579
|
+
private hasShapeTextContent;
|
|
580
|
+
private createShapeTextElement;
|
|
581
|
+
private createTextboxContentElement;
|
|
582
|
+
private shouldUseWordArtTextRenderer;
|
|
583
|
+
private createWordArtTextElement;
|
|
584
|
+
private buildWordArtLines;
|
|
585
|
+
private resolveShapeTextPartText;
|
|
586
|
+
private getWordArtTextAnchor;
|
|
587
|
+
private getWordArtTextX;
|
|
588
|
+
private applyWordArtTextFormatting;
|
|
589
|
+
/**
|
|
590
|
+
* Create a fallback text element for shapes without SVG
|
|
591
|
+
* @param textContent - Text content with formatting
|
|
592
|
+
* @param textAlign - Horizontal text alignment
|
|
593
|
+
* @param textVerticalAlign - Vertical text alignment (top, center, bottom)
|
|
594
|
+
* @param textInsets - Text insets in pixels (top, right, bottom, left)
|
|
595
|
+
* @param groupScaleX - Scale factor applied by parent group (for counter-scaling)
|
|
596
|
+
* @param groupScaleY - Scale factor applied by parent group (for counter-scaling)
|
|
597
|
+
*/
|
|
598
|
+
private createFallbackTextElement;
|
|
599
|
+
private tryCreatePresetSvg;
|
|
600
|
+
/**
|
|
601
|
+
* Creates an SVG string from custom geometry path data (a:custGeom).
|
|
602
|
+
* Each path in the custom geometry has its own coordinate space (w × h) which is
|
|
603
|
+
* mapped to the shape's actual dimensions via the SVG viewBox.
|
|
604
|
+
*/
|
|
605
|
+
private tryCreateCustomGeometrySvg;
|
|
606
|
+
private parseSafeSvg;
|
|
607
|
+
private stripUnsafeSvgContent;
|
|
608
|
+
private getEffectExtentMetrics;
|
|
609
|
+
private applyLineEnds;
|
|
610
|
+
private findLineEndTarget;
|
|
611
|
+
private ensureSvgDefs;
|
|
612
|
+
private appendLineEndMarker;
|
|
613
|
+
private createLineEndShape;
|
|
614
|
+
private sanitizeSvgId;
|
|
615
|
+
private applyVectorShapeTransforms;
|
|
616
|
+
private createShapeGroupElement;
|
|
617
|
+
private createGroupChildContent;
|
|
618
|
+
private createDrawingPlaceholder;
|
|
619
|
+
/**
|
|
620
|
+
* Create an SVG chart element from a ChartDrawing block.
|
|
621
|
+
* Delegates to the chart-renderer module for clean separation.
|
|
622
|
+
*/
|
|
623
|
+
private createChartElement;
|
|
624
|
+
private resolveTableRenderData;
|
|
625
|
+
private renderTableFragment;
|
|
626
|
+
private renderLine;
|
|
627
|
+
private createRunRenderContext;
|
|
628
|
+
private defaultFragmentRenderContext;
|
|
629
|
+
/**
|
|
630
|
+
* Updates an existing fragment element's position and dimensions in place.
|
|
631
|
+
* Used during incremental updates to efficiently reposition fragments without full re-render.
|
|
632
|
+
*
|
|
633
|
+
* @param el - The HTMLElement representing the fragment to update
|
|
634
|
+
* @param fragment - The fragment data containing updated position and dimensions
|
|
635
|
+
* @param section - The document section ('body', 'header', 'footer') containing this fragment.
|
|
636
|
+
* Selects the wrapper's section-scoped identity and legacy PM attributes.
|
|
637
|
+
*/
|
|
638
|
+
private updateFragmentElement;
|
|
639
|
+
/**
|
|
640
|
+
* Applies fragment positioning, dimensions, and metadata to an HTML element.
|
|
641
|
+
*
|
|
642
|
+
* @param el - The HTMLElement to apply fragment properties to
|
|
643
|
+
* @param fragment - The fragment data containing position, dimensions, and PM position information
|
|
644
|
+
* @param section - The document section ('body', 'header', 'footer') containing this fragment.
|
|
645
|
+
* Selects the wrapper's section-scoped identity and legacy PM attributes.
|
|
646
|
+
*/
|
|
647
|
+
private applyFragmentFrame;
|
|
648
|
+
/**
|
|
649
|
+
* Applies PM position data attributes from a legacy Fragment.
|
|
650
|
+
* Extracted from applyFragmentFrame for use in the resolved wrapper path.
|
|
651
|
+
* When a resolvedItem is provided, its fields take precedence over fragment fields.
|
|
652
|
+
*/
|
|
653
|
+
private applyFragmentPmAttributes;
|
|
654
|
+
/**
|
|
655
|
+
* Applies fragment wrapper positioning from a ResolvedFragmentItem.
|
|
656
|
+
* Uses resolved data for spatial properties and delegates PM attributes to the legacy path.
|
|
657
|
+
*/
|
|
658
|
+
private isAnchoredMediaFragment;
|
|
659
|
+
private shouldRenderBehindPageContent;
|
|
660
|
+
private isHeaderWordArtWatermark;
|
|
661
|
+
private isVmlTextWatermarkImage;
|
|
662
|
+
private applyHeaderFooterTextWatermarkPreviewOpacity;
|
|
663
|
+
/**
|
|
664
|
+
* Only anchored images and drawings participate in explicit wrapper stacking.
|
|
665
|
+
* Inline media intentionally rely on DOM order to preserve legacy paint order.
|
|
666
|
+
*/
|
|
667
|
+
private resolveFragmentWrapperZIndex;
|
|
668
|
+
private applyFragmentWrapperZIndex;
|
|
669
|
+
private applyResolvedFragmentFrame;
|
|
670
|
+
/**
|
|
671
|
+
* Estimates the height of a fragment when explicit height is not available.
|
|
672
|
+
*
|
|
673
|
+
* This method provides fallback height calculations for footer bottom-alignment
|
|
674
|
+
* from resolved layout data, or using the fragment's height property for
|
|
675
|
+
* tables, images, and drawings.
|
|
676
|
+
*
|
|
677
|
+
* @param fragment - The fragment to estimate height for
|
|
678
|
+
* @returns Estimated height in pixels, or 0 if height cannot be determined
|
|
679
|
+
*/
|
|
680
|
+
private estimateFragmentHeight;
|
|
681
|
+
}
|