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,17 @@
|
|
|
1
|
+
import { MathObjectConverter } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Convert m:phant (phantom) to MathML <mphantom> or styled <mpadded>.
|
|
4
|
+
*
|
|
5
|
+
* OMML structure:
|
|
6
|
+
* m:phant → m:phantPr (optional: m:show, m:zeroWid, m:zeroAsc, m:zeroDesc), m:e (content)
|
|
7
|
+
*
|
|
8
|
+
* MathML output:
|
|
9
|
+
* Full phantom (default): <mphantom> content </mphantom>
|
|
10
|
+
* Visible with zeroed dimensions: <mpadded> with width/height/depth="0"
|
|
11
|
+
*
|
|
12
|
+
* A phantom reserves the space its content would occupy but renders invisibly.
|
|
13
|
+
* Property flags can zero-out individual dimensions or force visibility.
|
|
14
|
+
*
|
|
15
|
+
* @spec ECMA-376 §22.1.2.81
|
|
16
|
+
*/
|
|
17
|
+
export declare const convertPhantom: MathObjectConverter;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MathObjectConverter } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Convert m:sPre (pre-sub-superscript) to MathML <mmultiscripts>.
|
|
4
|
+
*
|
|
5
|
+
* OMML structure:
|
|
6
|
+
* m:sPre → m:sPrePr (optional), m:sub (subscript), m:sup (superscript), m:e (base)
|
|
7
|
+
*
|
|
8
|
+
* Note: element order differs from m:sSubSup — in m:sPre the base (m:e) is the
|
|
9
|
+
* LAST child, not the first. The converter uses tag-based lookup (not position)
|
|
10
|
+
* so any order is accepted.
|
|
11
|
+
*
|
|
12
|
+
* MathML output:
|
|
13
|
+
* <mmultiscripts>
|
|
14
|
+
* <mrow>base</mrow>
|
|
15
|
+
* <mprescripts/>
|
|
16
|
+
* <mrow>sub</mrow>
|
|
17
|
+
* <mrow>sup</mrow>
|
|
18
|
+
* </mmultiscripts>
|
|
19
|
+
*
|
|
20
|
+
* The <mprescripts/> separator tells MathML that the scripts that follow
|
|
21
|
+
* are placed to the left of the base rather than to the right.
|
|
22
|
+
*
|
|
23
|
+
* @spec ECMA-376 §22.1.2.99
|
|
24
|
+
*/
|
|
25
|
+
export declare const convertPreSubSuperscript: MathObjectConverter;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MathObjectConverter } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Convert m:rad (radical) to MathML <msqrt> or <mroot>.
|
|
4
|
+
*
|
|
5
|
+
* OMML structure:
|
|
6
|
+
* m:rad → m:radPr (optional: m:degHide), m:deg (degree), m:e (radicand)
|
|
7
|
+
*
|
|
8
|
+
* MathML output:
|
|
9
|
+
* - degree hidden → <msqrt><mrow>radicand</mrow></msqrt>
|
|
10
|
+
* - degree shown → <mroot><mrow>radicand</mrow><mrow>degree</mrow></mroot>
|
|
11
|
+
*
|
|
12
|
+
* @spec ECMA-376 §22.1.2.88
|
|
13
|
+
*/
|
|
14
|
+
export declare const convertRadical: MathObjectConverter;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MathObjectConverter } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Convert m:sSubSup (sub-superscript) to MathML <msubsup>.
|
|
4
|
+
*
|
|
5
|
+
* OMML structure:
|
|
6
|
+
* m:sSubSup → m:sSubSupPr (optional), m:e (base), m:sub (subscript), m:sup (superscript)
|
|
7
|
+
*
|
|
8
|
+
* MathML output:
|
|
9
|
+
* <msubsup> <mrow>base</mrow> <mrow>sub</mrow> <mrow>sup</mrow> </msubsup>
|
|
10
|
+
*
|
|
11
|
+
* @spec ECMA-376 §22.1.2.103
|
|
12
|
+
*/
|
|
13
|
+
export declare const convertSubSuperscript: MathObjectConverter;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MathObjectConverter } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Convert m:sSub (subscript) to MathML <msub>.
|
|
4
|
+
*
|
|
5
|
+
* OMML structure:
|
|
6
|
+
* m:sSub → m:sSubPr (optional), m:e (base), m:sub (subscript)
|
|
7
|
+
*
|
|
8
|
+
* MathML output:
|
|
9
|
+
* <msub> <mrow>base</mrow> <mrow>sub</mrow> </msub>
|
|
10
|
+
*
|
|
11
|
+
* @spec ECMA-376 §22.1.2.101
|
|
12
|
+
*/
|
|
13
|
+
export declare const convertSubscript: MathObjectConverter;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MathObjectConverter } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Convert m:sSup (superscript) to MathML <msup>.
|
|
4
|
+
*
|
|
5
|
+
* OMML structure:
|
|
6
|
+
* m:sSup → m:sSupPr (optional), m:e (base), m:sup (superscript)
|
|
7
|
+
*
|
|
8
|
+
* MathML output:
|
|
9
|
+
* <msup> <mrow>base</mrow> <mrow>sup</mrow> </msup>
|
|
10
|
+
*
|
|
11
|
+
* @spec ECMA-376 §22.1.2.105
|
|
12
|
+
*/
|
|
13
|
+
export declare const convertSuperscript: MathObjectConverter;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MathObjectConverter } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Convert m:limUpp (upper limit) to MathML <mover>.
|
|
4
|
+
*
|
|
5
|
+
* OMML structure:
|
|
6
|
+
* m:limUpp → m:limUppPr (optional), m:e (base), m:lim (limit expression placed above)
|
|
7
|
+
*
|
|
8
|
+
* MathML output:
|
|
9
|
+
* <mover> <mrow>base</mrow> <mrow>lim</mrow> </mover>
|
|
10
|
+
*
|
|
11
|
+
* @spec ECMA-376 §22.1.2.56
|
|
12
|
+
*/
|
|
13
|
+
export declare const convertUpperLimit: MathObjectConverter;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Math Formula — rendering feature module
|
|
3
|
+
*
|
|
4
|
+
* Converts OMML (Office Math Markup Language) to MathML for browser-native rendering.
|
|
5
|
+
* Uses a registry pattern so each OMML math object type can be implemented independently.
|
|
6
|
+
*
|
|
7
|
+
* @ooxml m:oMath — inline math zone
|
|
8
|
+
* @ooxml m:oMathPara — display math paragraph
|
|
9
|
+
* @ooxml m:r, m:t — math runs and text
|
|
10
|
+
* @ooxml m:f, m:rad, m:sSup, m:sSub, m:d, m:nary, m:m, ... — math objects (18 types)
|
|
11
|
+
* @spec ECMA-376 §22.1 (Math)
|
|
12
|
+
*/
|
|
13
|
+
export { convertOmmlToMathml, registerMathObjectConverter, MATHML_NS } from './omml-to-mathml.js';
|
|
14
|
+
export type { OmmlJsonNode, MathObjectConverter } from './types.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MathObjectConverter } from './types.js';
|
|
2
|
+
export declare const MATHML_NS = "http://www.w3.org/1998/Math/MathML";
|
|
3
|
+
/**
|
|
4
|
+
* Convert an OMML JSON tree to a MathML <math> DOM element.
|
|
5
|
+
*
|
|
6
|
+
* @param ommlJson - The OMML JSON tree (from a mathInline or mathBlock node's originalXml)
|
|
7
|
+
* @param doc - The document object for creating DOM elements
|
|
8
|
+
* @returns A <math> element ready to be inserted into the DOM, or null if conversion fails
|
|
9
|
+
*/
|
|
10
|
+
export declare function convertOmmlToMathml(ommlJson: unknown, doc: Document): Element | null;
|
|
11
|
+
/**
|
|
12
|
+
* Register a converter for an OMML math object type.
|
|
13
|
+
* Used by community contributors to add support for individual math objects.
|
|
14
|
+
*
|
|
15
|
+
* @param elementName - The OMML element name (e.g., 'm:f', 'm:rad')
|
|
16
|
+
* @param converter - The converter function
|
|
17
|
+
*/
|
|
18
|
+
export declare function registerMathObjectConverter(elementName: string, converter: MathObjectConverter): void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents an OMML XML node in the xml2json format used by SuperDoc's converter.
|
|
3
|
+
*/
|
|
4
|
+
export type OmmlJsonNode = {
|
|
5
|
+
/** Element name (e.g., 'm:oMath', 'm:f', 'm:r') */
|
|
6
|
+
name?: string;
|
|
7
|
+
/** Node type ('element', 'text', etc.) */
|
|
8
|
+
type?: string;
|
|
9
|
+
/** XML attributes (e.g., { 'm:val': 'center' }) */
|
|
10
|
+
attributes?: Record<string, string>;
|
|
11
|
+
/** Child elements */
|
|
12
|
+
elements?: OmmlJsonNode[];
|
|
13
|
+
/** Text content (for text nodes) */
|
|
14
|
+
text?: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Converter function for a single OMML math object.
|
|
18
|
+
*
|
|
19
|
+
* Community contributors implement this interface to add support for
|
|
20
|
+
* individual math objects (fractions, radicals, matrices, etc.).
|
|
21
|
+
*
|
|
22
|
+
* @param node - The OMML JSON node to convert (e.g., an m:f element)
|
|
23
|
+
* @param doc - The document object for creating MathML elements
|
|
24
|
+
* @param convertChildren - Recursive converter for child OMML elements.
|
|
25
|
+
* Call this to convert nested math content (arguments like m:e, m:num, m:den).
|
|
26
|
+
* @returns A MathML DOM element, or null to fall back to text extraction
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* // Implementing m:f (fraction) → <mfrac>
|
|
31
|
+
* const convertFraction: MathObjectConverter = (node, doc, convertChildren) => {
|
|
32
|
+
* const num = node.elements?.find(e => e.name === 'm:num');
|
|
33
|
+
* const den = node.elements?.find(e => e.name === 'm:den');
|
|
34
|
+
* const frac = doc.createElementNS(MATHML_NS, 'mfrac');
|
|
35
|
+
* frac.appendChild(convertChildren(num?.elements ?? []));
|
|
36
|
+
* frac.appendChild(convertChildren(den?.elements ?? []));
|
|
37
|
+
* return frac;
|
|
38
|
+
* };
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export type MathObjectConverter = (node: OmmlJsonNode, doc: Document, convertChildren: (children: OmmlJsonNode[]) => DocumentFragment) => Node | null;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DrawingBlock, ShapeGroupChild, TextPart } from '../../../../contracts/src/index.js';
|
|
2
|
+
import { BuildImageHyperlinkAnchor } from './types.js';
|
|
3
|
+
export declare const createDrawingImageElement: (doc: Document, block: DrawingBlock, buildImageHyperlinkAnchor: BuildImageHyperlinkAnchor) => HTMLElement;
|
|
4
|
+
export declare const createShapeGroupImageElement: (doc: Document, child: ShapeGroupChild) => HTMLElement;
|
|
5
|
+
export declare const createShapeTextImageElement: (doc: Document, part: TextPart) => HTMLElement;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ImageBlock, ImageDrawing } from '../../../../contracts/src/index.js';
|
|
2
|
+
import { BuildImageHyperlinkAnchor } from './types.js';
|
|
3
|
+
type BlockImageSource = ImageBlock | ImageDrawing;
|
|
4
|
+
export type CreateBlockImageContentOptions = {
|
|
5
|
+
doc: Document;
|
|
6
|
+
block: BlockImageSource;
|
|
7
|
+
className?: string;
|
|
8
|
+
clipContainer?: HTMLElement;
|
|
9
|
+
imageDisplay?: 'block' | 'inline-block';
|
|
10
|
+
hyperlinkDisplay?: 'block' | 'inline-block';
|
|
11
|
+
buildImageHyperlinkAnchor?: BuildImageHyperlinkAnchor;
|
|
12
|
+
};
|
|
13
|
+
export declare const resolveBlockImageClipPath: (block: unknown) => string;
|
|
14
|
+
export declare const createBlockImageContent: ({ doc, block, className, clipContainer, imageDisplay, hyperlinkDisplay, buildImageHyperlinkAnchor, }: CreateBlockImageContentOptions) => HTMLElement;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const readImageClipPathValue: (value: unknown) => string;
|
|
2
|
+
/**
|
|
3
|
+
* Resolves a clip-path value to a trimmed non-empty string, or undefined if invalid.
|
|
4
|
+
*/
|
|
5
|
+
export declare function resolveClipPath(value: unknown): string | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Applies clip-path and optional scale/translate (for inset() srcRect) to an element.
|
|
8
|
+
* When the clipPath is inset(top% right% bottom% left%), also sets transform so the
|
|
9
|
+
* visible portion fills the element and is aligned to top-left.
|
|
10
|
+
*
|
|
11
|
+
* When `options.clipContainer` is provided, `overflow: hidden` is set on it so the
|
|
12
|
+
* scaled image doesn't paint outside its layout box. This pairs the two operations
|
|
13
|
+
* that are always needed together for cropped images.
|
|
14
|
+
*/
|
|
15
|
+
export declare function applyImageClipPath(el: HTMLElement, clipPath: unknown, options?: {
|
|
16
|
+
clipContainer?: HTMLElement;
|
|
17
|
+
}): void;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ImageFragment, ResolvedImageItem, SdtMetadata } from '../../../../contracts/src/index.js';
|
|
2
|
+
import { FragmentRenderContext } from '../renderer.js';
|
|
3
|
+
import { BuildImageHyperlinkAnchor } from './types.js';
|
|
4
|
+
import { TrackedChangesRenderConfig } from '../runs/types.js';
|
|
5
|
+
type RenderImageFragmentOptions = {
|
|
6
|
+
doc: Document | null;
|
|
7
|
+
fragment: ImageFragment;
|
|
8
|
+
context: FragmentRenderContext;
|
|
9
|
+
resolvedItem?: ResolvedImageItem;
|
|
10
|
+
applyResolvedFragmentFrame: (el: HTMLElement, item: ResolvedImageItem, fragment: ImageFragment, section?: 'body' | 'header' | 'footer') => void;
|
|
11
|
+
applyFragmentFrame: (el: HTMLElement, fragment: ImageFragment, section?: 'body' | 'header' | 'footer') => void;
|
|
12
|
+
applyFragmentWrapperZIndex: (el: HTMLElement, fragment: ImageFragment) => void;
|
|
13
|
+
applySdtDataset: (el: HTMLElement | null, metadata?: SdtMetadata | null) => void;
|
|
14
|
+
applyContainerSdtDataset: (el: HTMLElement | null, metadata?: SdtMetadata | null) => void;
|
|
15
|
+
buildImageHyperlinkAnchor: BuildImageHyperlinkAnchor;
|
|
16
|
+
createErrorPlaceholder: (blockId: string, error: unknown) => HTMLElement;
|
|
17
|
+
trackedConfig: TrackedChangesRenderConfig;
|
|
18
|
+
};
|
|
19
|
+
export declare const buildImageGeometryTransform: (attrs: {
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
rotation?: number;
|
|
23
|
+
flipH?: boolean;
|
|
24
|
+
flipV?: boolean;
|
|
25
|
+
}) => string;
|
|
26
|
+
export declare const applyImageGeometryTransform: (target: HTMLElement, attrs: {
|
|
27
|
+
width: number;
|
|
28
|
+
height: number;
|
|
29
|
+
rotation?: number;
|
|
30
|
+
flipH?: boolean;
|
|
31
|
+
flipV?: boolean;
|
|
32
|
+
}) => void;
|
|
33
|
+
export declare const renderImageFragment: ({ doc, fragment, context, resolvedItem, applyResolvedFragmentFrame, applyFragmentFrame, applyFragmentWrapperZIndex, applySdtDataset, applyContainerSdtDataset, buildImageHyperlinkAnchor, createErrorPlaceholder, trackedConfig, }: RenderImageFragmentOptions) => HTMLElement;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image Selector Helpers — Compatibility Re-exports
|
|
3
|
+
*
|
|
4
|
+
* The source of truth for these helpers is now `@superdoc/dom-contract`.
|
|
5
|
+
* These re-exports exist so that existing `painter-dom` consumers continue
|
|
6
|
+
* to work without import changes. New code should import from
|
|
7
|
+
* `@superdoc/dom-contract` directly.
|
|
8
|
+
*/
|
|
9
|
+
export { buildImagePmSelector, buildInlineImagePmSelector } from '../../../../dom-contract/src/index.js';
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { PaintWorkSummary } from './page-content.js';
|
|
2
|
+
import { PageStyles } from './styles.js';
|
|
3
|
+
import { PositionValidationOptions, PositionValidationSummary } from './pm-position-validation.js';
|
|
4
|
+
import { DomPainterInput, DomPainterPageWindowInput, PageDecorationProvider, PaintSnapshot, PositionMapping, FlowMode } from './renderer.js';
|
|
5
|
+
export { DOM_CLASS_NAMES } from './constants.js';
|
|
6
|
+
export type { DomClassName } from './constants.js';
|
|
7
|
+
export { ensureDocumentSurfaceStyles } from './styles.js';
|
|
8
|
+
export { SURFACE_STYLE_PREFLIGHT, ensureSurfaceStylePreflight } from './styles.js';
|
|
9
|
+
export type { SurfaceStylePreflightEntry } from './styles.js';
|
|
10
|
+
export { generateRulerDefinition, generateRulerDefinitionFromPx, createRulerElement, ensureRulerStyles, clampHandlePosition, calculateMarginFromHandle, RULER_CLASS_NAMES, } from './ruler/index.js';
|
|
11
|
+
export type { RulerDefinition, RulerConfig, RulerConfigPx, RulerTick, CreateRulerElementOptions, } from './ruler/index.js';
|
|
12
|
+
export type { PaintSnapshot, PaintSnapshotAnnotationEntity, PaintSnapshotStructuredContentBlockEntity, PaintSnapshotStructuredContentInlineEntity, PaintSnapshotImageEntity, PaintSnapshotEntities, } from './renderer.js';
|
|
13
|
+
export type { DomPainterInput, PositionMapping } from './renderer.js';
|
|
14
|
+
export type { DomPainterPageWindowExactness, DomPainterPageWindowExtent, DomPainterPageWindowInput, DomPainterPageWindowPacket, } from './renderer.js';
|
|
15
|
+
export type { PaintWorkSummary } from './page-content.js';
|
|
16
|
+
export type { RenderedLineInfo } from './runs/index.js';
|
|
17
|
+
export { sanitizeUrl, linkMetrics, applyRunDataAttributes } from './runs/index.js';
|
|
18
|
+
export { applySquareWrapExclusionsToLines } from './utils/anchor-helpers.js';
|
|
19
|
+
export { buildImagePmSelector, buildInlineImagePmSelector } from './images/image-selectors.js';
|
|
20
|
+
export { createPositionValidationCollector, PositionValidationCollector } from './pm-position-validation.js';
|
|
21
|
+
export type { PaintCoordinateModel, RunCoordinateRequirement, PositionValidationConsolePolicy, PaintKind, PaintRealm, PositionValidationSection, PositionRunKind, PositionValidationCode, PositionValidationStructuralKey, PositionValidationGroupRow, PositionValidationRequirementTally, PositionValidationSummary, PositionValidationOptions, RunPositionObservation, } from './pm-position-validation.js';
|
|
22
|
+
/**
|
|
23
|
+
* Painter plan P7: `'vertical'` is the only paginated arrangement (horizontal
|
|
24
|
+
* and book modes deleted, product decision 2026-07-05). The presentation axis
|
|
25
|
+
* is `FlowMode` (`'paginated' | 'semantic'`); this type remains for API-shape
|
|
26
|
+
* compatibility.
|
|
27
|
+
*/
|
|
28
|
+
export type LayoutMode = 'vertical';
|
|
29
|
+
export type { FlowMode } from './renderer.js';
|
|
30
|
+
export type { PageDecorationPayload, PageDecorationProvider } from './renderer.js';
|
|
31
|
+
export type DomPainterOptions = {
|
|
32
|
+
pageStyles?: PageStyles;
|
|
33
|
+
layoutMode?: LayoutMode;
|
|
34
|
+
flowMode?: FlowMode;
|
|
35
|
+
/** Gap between pages in pixels (default: 24px) */
|
|
36
|
+
pageGap?: number;
|
|
37
|
+
headerProvider?: PageDecorationProvider;
|
|
38
|
+
footerProvider?: PageDecorationProvider;
|
|
39
|
+
/** Called with the paint snapshot after each paint cycle completes. */
|
|
40
|
+
onPaintSnapshot?: (snapshot: PaintSnapshot) => void;
|
|
41
|
+
/** Render nonprinting formatting marks such as spaces, tabs, and paragraph marks. */
|
|
42
|
+
showFormattingMarks?: boolean;
|
|
43
|
+
/** Built-in SDT chrome rendering mode. */
|
|
44
|
+
contentControlsChrome?: 'default' | 'none';
|
|
45
|
+
/**
|
|
46
|
+
* Per-document logical->physical font resolver (a CSS-stack resolver). The painter paints each
|
|
47
|
+
* run in the family this returns - e.g. Carlito for Calibri - the SAME family measurement used,
|
|
48
|
+
* so glyph advances match the laid-out positions. Set per painter instance (per document) so two
|
|
49
|
+
* editors can map one logical family differently. Defaults to the global bundled resolver.
|
|
50
|
+
*/
|
|
51
|
+
resolvePhysical?: (cssFontFamily: string, face: {
|
|
52
|
+
weight: '400' | '700';
|
|
53
|
+
style: 'normal' | 'italic';
|
|
54
|
+
}) => string;
|
|
55
|
+
/**
|
|
56
|
+
* Painter plan P5 §4.6: populate `PaintWorkSummary`'s per-page index arrays
|
|
57
|
+
* (which pages mounted/unmounted/rebuilt/untouched/remapped). Dark by
|
|
58
|
+
* default — counters stay O(1) always, but the arrays grow per paint and
|
|
59
|
+
* are only drained by `consumePaintWorkSummary()`, which product code never
|
|
60
|
+
* calls; the perf harness enables this for its repaint oracle.
|
|
61
|
+
*/
|
|
62
|
+
paintWorkAttribution?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Story-aware position-coverage validation. Dark by default: when omitted or
|
|
65
|
+
* `{ enabled: false }`, the painter records nothing and `record()` is a single
|
|
66
|
+
* branch with no allocation. The performance harness enables it (with an
|
|
67
|
+
* explicit `off | summary | verbose` console policy — never `NODE_ENV`) and
|
|
68
|
+
* drains it via `consumePositionValidationSummary()`. Each painter instance
|
|
69
|
+
* owns its collector, so the product surface window and the dense-reference
|
|
70
|
+
* oracle never mix counts.
|
|
71
|
+
*/
|
|
72
|
+
positionValidation?: PositionValidationOptions;
|
|
73
|
+
};
|
|
74
|
+
export type DomPainterHandle = {
|
|
75
|
+
/** Semantic flow only (painter plan P7); paginated documents use `paintPageWindow`. */
|
|
76
|
+
paint(input: DomPainterInput, mount: HTMLElement, mapping?: PositionMapping): void;
|
|
77
|
+
/** Paginated flow only (painter plan P7); a dense paint is a full-range window. */
|
|
78
|
+
paintPageWindow(input: DomPainterPageWindowInput, mount: HTMLElement): void;
|
|
79
|
+
/**
|
|
80
|
+
* Painter plan §4.6 (dark observability): page-window paint work since the
|
|
81
|
+
* last consume. Fields the path cannot attribute yet are 0/null, never
|
|
82
|
+
* invented (`domNodesCreated` stays null until node counting lands). Since
|
|
83
|
+
* P5, `pagesPositionRemapped` counts uniform in-place pm shifts on reused
|
|
84
|
+
* window DOM; the per-page index arrays are populated only when the painter
|
|
85
|
+
* was created with `paintWorkAttribution: true`.
|
|
86
|
+
*/
|
|
87
|
+
consumePaintWorkSummary(): PaintWorkSummary;
|
|
88
|
+
/**
|
|
89
|
+
* Story-aware position coverage since the last consume, drained and reset.
|
|
90
|
+
* Content-free and bounded; empty (`checked: 0`) unless the painter was
|
|
91
|
+
* created with `positionValidation.enabled`.
|
|
92
|
+
*/
|
|
93
|
+
consumePositionValidationSummary(): PositionValidationSummary;
|
|
94
|
+
setProviders(header?: PageDecorationProvider, footer?: PageDecorationProvider): void;
|
|
95
|
+
getMountedPageIndices(): number[];
|
|
96
|
+
setShowFormattingMarks(showFormattingMarks: boolean): void;
|
|
97
|
+
dispose(): void;
|
|
98
|
+
};
|
|
99
|
+
export type DenseReferencePainterHandle = DomPainterHandle & {
|
|
100
|
+
/** Proof-only sequential batch traversal; product surfaces never receive this handle. */
|
|
101
|
+
paintDensePageBatch(input: DomPainterInput, mount: HTMLElement, startPageIndex: number, endPageIndexExclusive: number): void;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Thin pass-through factory: instantiates DomPainter with the supplied options
|
|
105
|
+
* and returns a stable handle that exposes only the rendering-stage API.
|
|
106
|
+
*
|
|
107
|
+
* The handle accepts only `DomPainterInput` (resolvedLayout-only).
|
|
108
|
+
* Header/footer decoration providers must supply both `fragments` and `items`
|
|
109
|
+
* on their `PageDecorationPayload`.
|
|
110
|
+
*
|
|
111
|
+
* Mode ownership (painter plan P7): this handle's `paint()` REJECTS paginated
|
|
112
|
+
* flow — paginated documents have exactly one paint entry, `paintPageWindow`
|
|
113
|
+
* (a dense paint is a full-range window). Equivalence oracles and kernel spec
|
|
114
|
+
* tests that need the paginated dense REFERENCE go through
|
|
115
|
+
* {@link createDenseReferencePainter} instead.
|
|
116
|
+
*
|
|
117
|
+
* v1 EOL (product decision 2026-07-06, P7 review): the v1 PresentationEditor
|
|
118
|
+
* consumed the deleted surface (paginated `paint()`, `virtualization`/`ruler`
|
|
119
|
+
* options, `setZoom`/`setVirtualizationPins`) and gets NO compatibility shim —
|
|
120
|
+
* SuperDoc is v2-only. The staged super-editor dist is the last working v1
|
|
121
|
+
* print build; rebuilding it against this painter fails BY DESIGN, and the
|
|
122
|
+
* `mode-ownership.test.ts` battery pins the surface deleted.
|
|
123
|
+
*/
|
|
124
|
+
export declare const createDomPainter: (options: DomPainterOptions) => DomPainterHandle;
|
|
125
|
+
export declare const createDenseReferencePainter: (options: DomPainterOptions) => DenseReferencePainterHandle;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { Fragment, FlowBlock, ResolvedPage, ResolvedPaintItem } from '../../../contracts/src/index.js';
|
|
2
|
+
import { FragmentRenderContext, PositionMapping } from './renderer.js';
|
|
3
|
+
import { SdtBoundaryOptions } from './sdt/container.js';
|
|
4
|
+
import { BetweenBorderInfo } from './paragraph/borders/index.js';
|
|
5
|
+
import { PageStyles } from './styles.js';
|
|
6
|
+
export type FragmentDomState = {
|
|
7
|
+
key: string;
|
|
8
|
+
signature: string;
|
|
9
|
+
fragment: Fragment;
|
|
10
|
+
element: HTMLElement;
|
|
11
|
+
context: FragmentRenderContext;
|
|
12
|
+
/**
|
|
13
|
+
* Interior-pm signature captured from the resolved item at render/rebuild
|
|
14
|
+
* (painter plan P5). Reuse-with-pm-drift is only provably uniform when the
|
|
15
|
+
* retained and fresh keys are EQUAL; null (older retained state, missing
|
|
16
|
+
* stamp) fails closed to a rebuild.
|
|
17
|
+
*/
|
|
18
|
+
pmInteriorVersion: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the rendered DOM carries any `data-pm-*` attribute (root or
|
|
21
|
+
* descendant), recorded once at render/rebuild. A fragment with pm-bearing
|
|
22
|
+
* DOM but NO fragment-level pm span cannot prove position freshness and
|
|
23
|
+
* must never be reused across pm drift (anchored drawings/textboxes whose
|
|
24
|
+
* blocks lack attrs.pmStart).
|
|
25
|
+
*/
|
|
26
|
+
hasPmDescendants: boolean;
|
|
27
|
+
};
|
|
28
|
+
export type PageDomState = {
|
|
29
|
+
element: HTMLElement;
|
|
30
|
+
fragments: FragmentDomState[];
|
|
31
|
+
};
|
|
32
|
+
/** Fragment-level render work performed by one `patchPage` call. */
|
|
33
|
+
export type PatchPageWork = {
|
|
34
|
+
fragmentsRendered: number;
|
|
35
|
+
fragmentsReused: number;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Painter plan §4.6 (dark observability): work performed by the page-window
|
|
39
|
+
* paint path, accumulated across paints until consumed. Fields the path
|
|
40
|
+
* cannot attribute yet are reported as 0/null, never invented:
|
|
41
|
+
* `domNodesCreated` stays null until node counting is instrumented. Since P5,
|
|
42
|
+
* `pagesPositionRemapped` counts pages whose reused DOM had its pm attributes
|
|
43
|
+
* uniformly shifted in place (uniform fresh-shift, proven by the interior-pm
|
|
44
|
+
* signature — no transaction mapping on the window path).
|
|
45
|
+
*
|
|
46
|
+
* The per-page index arrays are populated ONLY when the painter is created
|
|
47
|
+
* with `paintWorkAttribution: true` (the perf harness's repaint oracle needs
|
|
48
|
+
* WHICH pages). Dark by default: counters are O(1) forever, but unconsumed
|
|
49
|
+
* arrays would grow per paint on the product path.
|
|
50
|
+
*/
|
|
51
|
+
export type PaintWorkSummary = {
|
|
52
|
+
/** Pages newly created (no prior element for the slot). */
|
|
53
|
+
pagesMounted: number;
|
|
54
|
+
/** Pages removed because they left the window. */
|
|
55
|
+
pagesUnmounted: number;
|
|
56
|
+
/** Pages whose slot survived but whose content was patched or re-rendered. */
|
|
57
|
+
pagesRebuilt: number;
|
|
58
|
+
/** Pages left completely untouched (version key match, positions unchanged). */
|
|
59
|
+
pagesUntouched: number;
|
|
60
|
+
/**
|
|
61
|
+
* Retained pages whose header/footer DOM was refreshed after provider
|
|
62
|
+
* identity changed, without mounting or rebuilding the body page. May
|
|
63
|
+
* overlap position-remapped pages; never overlaps untouched pages.
|
|
64
|
+
*/
|
|
65
|
+
pagesDecorationsRefreshed: number;
|
|
66
|
+
/**
|
|
67
|
+
* Pages whose content was untouched but whose pm positions were uniformly
|
|
68
|
+
* shifted in place (painter plan P5): the resolve stamps matched while the
|
|
69
|
+
* packet-fresh fragment positions drifted — attribute remap, not rebuild.
|
|
70
|
+
*/
|
|
71
|
+
pagesPositionRemapped: number;
|
|
72
|
+
/**
|
|
73
|
+
* Rebuilt pages whose resolve stamps MATCHED but whose position drift could
|
|
74
|
+
* not be proven a uniform shift (`planPmReuse` demote — e.g. a page mixing
|
|
75
|
+
* body and notes pm planes under a body edit). A demote is sound painter
|
|
76
|
+
* behavior, not a reuse regression; the repaint oracle allows exactly these
|
|
77
|
+
* rebuilds on relevance-UNCHANGED pages (P5x review fix). Always a subset
|
|
78
|
+
* of the rebuilt counters/arrays.
|
|
79
|
+
*/
|
|
80
|
+
pagesPmDemoted: number;
|
|
81
|
+
fragmentsRendered: number;
|
|
82
|
+
fragmentsReused: number;
|
|
83
|
+
domNodesCreated: number | null;
|
|
84
|
+
/**
|
|
85
|
+
* Per-page attribution for the counters above (painter plan P5 §4.6): the
|
|
86
|
+
* repaint oracle's subset gates (`rebuilt ⊆ relevance-changed ∩ window`,
|
|
87
|
+
* `remapped ⊆ full-changed ∩ window`) need to know WHICH pages, not how
|
|
88
|
+
* many. Accumulated like the counters, drained on consume.
|
|
89
|
+
*/
|
|
90
|
+
mountedPageIndices: number[];
|
|
91
|
+
unmountedPageIndices: number[];
|
|
92
|
+
rebuiltPageIndices: number[];
|
|
93
|
+
untouchedPageIndices: number[];
|
|
94
|
+
decorationRefreshedPageIndices: number[];
|
|
95
|
+
remappedPageIndices: number[];
|
|
96
|
+
pmDemotedPageIndices: number[];
|
|
97
|
+
};
|
|
98
|
+
export declare function createEmptyPaintWorkSummary(): PaintWorkSummary;
|
|
99
|
+
/**
|
|
100
|
+
* Painter plan P3a: reuse key for one exact page slot on the page-window
|
|
101
|
+
* path. Joins everything the painted page DOM depends on for a fixed page
|
|
102
|
+
* index: the resolve-stage version stamp per item (the product paint-reuse
|
|
103
|
+
* mechanism), fragment identity + geometry (stamps do not cover geometry),
|
|
104
|
+
* and, only when body content contains a dynamic field, its page context.
|
|
105
|
+
* Header/footer providers have a separate decoration-only refresh path, so
|
|
106
|
+
* their context must not invalidate otherwise reusable body fragments.
|
|
107
|
+
*
|
|
108
|
+
* Returns null when any fragment item carries NO resolve stamp — reuse
|
|
109
|
+
* cannot be proven safe, so the caller must fall back to a fragment-keyed
|
|
110
|
+
* patch, never to "untouched". Inside that patch, an unstamped fragment is
|
|
111
|
+
* itself fail-closed: `patchPage` force-rebuilds any fragment whose resolve
|
|
112
|
+
* signature is empty (two missing stamps must never compare equal).
|
|
113
|
+
*
|
|
114
|
+
* Deliberately EXCLUDED: pm/story position attributes — positions are
|
|
115
|
+
* coordinates, not content, and a keystroke shifts every downstream one.
|
|
116
|
+
* Since P5 the window path REMAPS instead: a version-key-matched page whose
|
|
117
|
+
* fragment pm drifted gets an in-place uniform shift when the interior-pm
|
|
118
|
+
* signature proves the drift uniform (`planWindowPositionRemap`), and demotes
|
|
119
|
+
* to a real rebuild otherwise (the shared `planPmReuse` decision inside
|
|
120
|
+
* `patchPage`). The
|
|
121
|
+
* pass-level paint-equivalence oracle stays RAW-sha (positions kept): remap
|
|
122
|
+
* is byte-exact, so reused-then-remapped DOM must equal a fresh dense paint
|
|
123
|
+
* attribute-for-attribute — that exactness is the proof, never normalize it
|
|
124
|
+
* away at the pass level (only the §7.7 unit tests use the normalized form).
|
|
125
|
+
*/
|
|
126
|
+
export declare function pageWindowVersionKey(page: ResolvedPage, totalPages: number, sectionPageCount: number): string | null;
|
|
127
|
+
/**
|
|
128
|
+
* The class state `renderPage`/`patchPage` consume, made explicit. The
|
|
129
|
+
* DomPainter builds one per call (values like `totalPages`, `layoutEpoch`,
|
|
130
|
+
* and `currentMapping` change between paints); the deep fragment-rendering
|
|
131
|
+
* call graph stays on the painter and is reached through the function
|
|
132
|
+
* members.
|
|
133
|
+
*/
|
|
134
|
+
export interface PageContentContext {
|
|
135
|
+
doc: Document;
|
|
136
|
+
layoutEpoch: number;
|
|
137
|
+
totalPages: number;
|
|
138
|
+
currentMapping: PositionMapping | null;
|
|
139
|
+
changedBlocks: ReadonlySet<string>;
|
|
140
|
+
sdtLabelsRendered: Set<string>;
|
|
141
|
+
getEffectivePageStyles(): PageStyles | undefined;
|
|
142
|
+
applySemanticPageOverrides(el: HTMLElement): void;
|
|
143
|
+
getSectionPageCount(page: ResolvedPage): number;
|
|
144
|
+
renderFragment(fragment: Fragment, context: FragmentRenderContext, sdtBoundary?: SdtBoundaryOptions, betweenInfo?: BetweenBorderInfo, resolvedItem?: ResolvedPaintItem): HTMLElement;
|
|
145
|
+
renderDecorationsForPage(pageEl: HTMLElement, page: ResolvedPage, pageIndex: number): void;
|
|
146
|
+
renderColumnSeparators(pageEl: HTMLElement, page: ResolvedPage, pageWidth: number, pageHeight: number): void;
|
|
147
|
+
updateStoryPositionAttributes(fragmentEl: HTMLElement, resolvedItem: ResolvedPaintItem | undefined): void;
|
|
148
|
+
updatePositionAttributes(fragmentEl: HTMLElement, mapping: PositionMapping): void;
|
|
149
|
+
updateFragmentElement(el: HTMLElement, fragment: Fragment, section?: 'body' | 'header' | 'footer', resolvedItem?: ResolvedPaintItem): void;
|
|
150
|
+
}
|
|
151
|
+
export declare function renderPage(ctx: PageContentContext, page: ResolvedPage, pageIndex: number): PageDomState;
|
|
152
|
+
export declare function patchPage(ctx: PageContentContext, state: PageDomState, page: ResolvedPage, pageIndex: number): PatchPageWork;
|
|
153
|
+
export declare function pageContextSignature(context: FragmentRenderContext): string;
|
|
154
|
+
export declare function hasPageContextTokenInBlock(block: FlowBlock | undefined): boolean;
|
|
155
|
+
export declare function needsRebuildForPageContext(currentContext: FragmentRenderContext, nextContext: FragmentRenderContext, resolvedItem: ResolvedPaintItem | undefined): boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Painter plan P5: shift every painted pm attribute in a fragment subtree by
|
|
158
|
+
* a KNOWN uniform delta (fresh-vs-retained fragment pmStart — exact for
|
|
159
|
+
* unchanged content, whose whole span moves together). Fragment-kind
|
|
160
|
+
* agnostic: tables, drawings, and paragraphs all carry data-pm-* on their
|
|
161
|
+
* spans, while the fresh-landmark derivation in
|
|
162
|
+
* `updateStoryPositionAttributes` only understands paragraph-shaped items
|
|
163
|
+
* (block runs / content lines) and silently no-ops for tables — the raw-sha
|
|
164
|
+
* paint-equivalence oracle caught exactly that on real table pages.
|
|
165
|
+
*/
|
|
166
|
+
export declare function shiftFragmentPositionAttributes(fragmentEl: HTMLElement, deltaPm: number): void;
|
|
167
|
+
/** The resolve stage's interior-pm signature for this item (painter plan P5), null when unstamped. */
|
|
168
|
+
export declare function resolvedPmInteriorVersion(resolvedItem: ResolvedPaintItem | undefined): string | null;
|
|
169
|
+
/** Fragment-level pm span, or null when either bound is missing. */
|
|
170
|
+
export declare function fragmentPmSpan(fragment: Fragment): {
|
|
171
|
+
start: number;
|
|
172
|
+
end: number;
|
|
173
|
+
} | null;
|
|
174
|
+
/** Whether the rendered fragment DOM carries any pm attribute (root or descendant). */
|
|
175
|
+
export declare function elementHasPmAttributes(el: HTMLElement): boolean;
|
|
176
|
+
/** The `pm:<count>:<hash>@<base>` interior version, split for uniformity checks. */
|
|
177
|
+
export declare function pmInteriorParts(version: string | null): {
|
|
178
|
+
relative: string;
|
|
179
|
+
base: number | null;
|
|
180
|
+
} | null;
|
|
181
|
+
export type PmReuseDecision = {
|
|
182
|
+
kind: 'clean';
|
|
183
|
+
} | {
|
|
184
|
+
kind: 'shift';
|
|
185
|
+
deltaPm: number;
|
|
186
|
+
} | {
|
|
187
|
+
kind: 'rebuild';
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* Painter plan P5 (review fix): THE single soundness decision for reusing a
|
|
191
|
+
* stamp-equal fragment across pm drift without a transaction mapping —
|
|
192
|
+
* consumed by both the window remap planner and `patchPage` so the two paths
|
|
193
|
+
* can never diverge (a planner "demote" lands on a patch that applies the
|
|
194
|
+
* SAME rule and rebuilds).
|
|
195
|
+
*
|
|
196
|
+
* - `clean`: nothing to do (no pm anywhere, or absolutely identical pm).
|
|
197
|
+
* - `shift`: drift proven UNIFORM — equal span length, equal relative
|
|
198
|
+
* interior offsets, and the interior base moved by exactly the fragment
|
|
199
|
+
* delta. Shifting every pm attribute by `deltaPm` is byte-exact.
|
|
200
|
+
* - `rebuild`: anything unprovable — one-sided pm, span-length change,
|
|
201
|
+
* interior redistribution (a moved PM node emits no run), a missing
|
|
202
|
+
* interior stamp, interior drift under an equal span, or pm-bearing DOM
|
|
203
|
+
* under a fragment with no fragment-level anchor whose interior moved.
|
|
204
|
+
*/
|
|
205
|
+
export declare function planPmReuse(current: Pick<FragmentDomState, 'fragment' | 'pmInteriorVersion' | 'hasPmDescendants'>, freshFragment: Fragment, freshInteriorVersion: string | null): PmReuseDecision;
|
|
206
|
+
export declare function resolvedPaintCacheSignature(resolvedItem: ResolvedPaintItem | undefined): string;
|
|
207
|
+
export declare const fragmentKey: (fragment: Fragment) => string;
|
|
208
|
+
export declare const hasFragmentGeometryChanged: (previous: Fragment, next: Fragment) => boolean;
|
|
209
|
+
export declare const isNonBodyStoryBlockId: (blockId: string | undefined) => boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ParagraphAttrs, ParagraphBlock } from '../../../../contracts/src/index.js';
|
|
2
|
+
type ParagraphHashFns = {
|
|
3
|
+
hashString: (seed: number, value: string) => number;
|
|
4
|
+
hashNumber: (seed: number, value: number | undefined | null) => number;
|
|
5
|
+
};
|
|
6
|
+
export declare const deriveParagraphBlockVersion: (block: ParagraphBlock, getSdtMetadataVersion: (metadata: ParagraphAttrs["sdt"]) => string, readClipPathValue: (value: unknown) => string) => string;
|
|
7
|
+
export declare const hashParagraphBlockForTableVersion: (seed: number, paragraphBlock: ParagraphBlock, hashFns: ParagraphHashFns) => number;
|
|
8
|
+
export {};
|