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,142 @@
|
|
|
1
|
+
import { FlowBlock, Layout, LayoutBlockRef, LayoutFragmentId, LayoutSourceIdentity, LayoutStoryLocator, Measure, SourceAnchor, LAYOUT_BOUNDARY_SCHEMA } from '../../contracts/src/index.js';
|
|
2
|
+
import { ClickToPositionGeometryOptions, PositionHit, Point } from './position-hit.js';
|
|
3
|
+
/** Container-space rectangle (mirrors `Rect` from this package's `index.ts`). */
|
|
4
|
+
export type LayoutRect = {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
pageIndex: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Layout-side representation of a hit-tested point.
|
|
13
|
+
*
|
|
14
|
+
* Carries everything an editor-neutral consumer needs to address the
|
|
15
|
+
* rendered fragment under a click. Legacy PM fields (`pmPosition`,
|
|
16
|
+
* `layoutEpoch`, `lineIndex`, `column`) are surfaced under `legacyPm` for
|
|
17
|
+
* v1 callers that still need them.
|
|
18
|
+
*/
|
|
19
|
+
export type LayoutHit = {
|
|
20
|
+
/** Schema version for this hit-test result. */
|
|
21
|
+
schema: typeof LAYOUT_BOUNDARY_SCHEMA;
|
|
22
|
+
/** Layout revision (today: `layout.layoutEpoch`). */
|
|
23
|
+
layoutRevision: number;
|
|
24
|
+
/** Composite editor-neutral identity for the hit fragment. */
|
|
25
|
+
identity: LayoutSourceIdentity;
|
|
26
|
+
/** Story locator for the hit fragment. */
|
|
27
|
+
story: LayoutStoryLocator;
|
|
28
|
+
/** Source block reference (today: producer's `blockId`). */
|
|
29
|
+
blockRef: LayoutBlockRef;
|
|
30
|
+
/** Stable opaque fragment id. */
|
|
31
|
+
fragmentId: LayoutFragmentId;
|
|
32
|
+
/** 0-based page index containing the hit. */
|
|
33
|
+
pageIndex: number;
|
|
34
|
+
/** Optional cross-reference to the DOCX source anchor. */
|
|
35
|
+
sourceAnchor?: SourceAnchor;
|
|
36
|
+
/** Diagnostics for partially supported or rejected hits. */
|
|
37
|
+
diagnostics?: LayoutHitDiagnostic[];
|
|
38
|
+
/**
|
|
39
|
+
* Legacy PM-shaped position hit.
|
|
40
|
+
*
|
|
41
|
+
* AIDEV-NOTE: compat-fallback - callers may still consume `pmPosition`.
|
|
42
|
+
* Retire once providers stop relying on PM positions to map this hit back to
|
|
43
|
+
* a document ref. Do not gate new editor-neutral behavior on this field.
|
|
44
|
+
*/
|
|
45
|
+
legacyPm?: PositionHit;
|
|
46
|
+
};
|
|
47
|
+
export type LayoutHitDiagnostic = {
|
|
48
|
+
code: 'no-page-hit';
|
|
49
|
+
} | {
|
|
50
|
+
code: 'no-fragment-hit';
|
|
51
|
+
} | {
|
|
52
|
+
code: 'pm-position-unavailable';
|
|
53
|
+
} | {
|
|
54
|
+
code: 'unsupported-fragment-kind';
|
|
55
|
+
fragmentKind: string;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Subrange of a single fragment, in editor-neutral terms.
|
|
59
|
+
*
|
|
60
|
+
* `inlineFromOpaque` / `inlineToOpaque` are placeholders for the offsets a
|
|
61
|
+
* future neutral text-offset model will carry. They are intentionally
|
|
62
|
+
* optional because the current producer can only describe character offsets
|
|
63
|
+
* via PM positions, and PM-required fields are not allowed on this contract.
|
|
64
|
+
* v1 consumers that need pixel rects should use `selectionToRects` directly;
|
|
65
|
+
* they should not gate behavior on this neutral surface yet.
|
|
66
|
+
*/
|
|
67
|
+
export type LayoutFragmentSubrange = {
|
|
68
|
+
identity: LayoutSourceIdentity;
|
|
69
|
+
story: LayoutStoryLocator;
|
|
70
|
+
blockRef: LayoutBlockRef;
|
|
71
|
+
fragmentId: LayoutFragmentId;
|
|
72
|
+
pageIndex: number;
|
|
73
|
+
/** Container-space rectangle covered by the fragment slice. */
|
|
74
|
+
rect: LayoutRect;
|
|
75
|
+
/** Optional opaque inline-offset start (may be omitted). */
|
|
76
|
+
inlineFromOpaque?: string;
|
|
77
|
+
/** Optional opaque inline-offset end (may be omitted). */
|
|
78
|
+
inlineToOpaque?: string;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* PM-free rendered range for the current neutral subset.
|
|
82
|
+
*
|
|
83
|
+
* This maps one or more already-known rendered fragment ids to their full
|
|
84
|
+
* fragment rectangles. It intentionally does not model text offsets; v1 PM
|
|
85
|
+
* range slicing remains available through `PmOpaqueRange`.
|
|
86
|
+
*/
|
|
87
|
+
export type LayoutFragmentOpaqueRange = {
|
|
88
|
+
fragmentIds: readonly LayoutFragmentId[];
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Result of mapping an opaque source range to rendered fragments.
|
|
92
|
+
*
|
|
93
|
+
* The opaque range type is intentionally `unknown` here; today the only
|
|
94
|
+
* concrete instantiation is `{ pmFrom: number; pmTo: number }`, but the
|
|
95
|
+
* contract names neither, so a future v2 source range can substitute
|
|
96
|
+
* without reopening the layout boundary.
|
|
97
|
+
*/
|
|
98
|
+
export type LayoutRangeMapping = {
|
|
99
|
+
schema: typeof LAYOUT_BOUNDARY_SCHEMA;
|
|
100
|
+
layoutRevision: number;
|
|
101
|
+
fragments: LayoutFragmentSubrange[];
|
|
102
|
+
diagnostics?: LayoutHitDiagnostic[];
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Concrete opaque-range instantiation for v1 consumers using PM positions.
|
|
106
|
+
*
|
|
107
|
+
* Kept here (and not in `@superdoc/contracts`) because nothing about it is
|
|
108
|
+
* editor-neutral. v2 consumers should not import this type; they should
|
|
109
|
+
* define their own opaque-range shape and the same `mapRangeToFragmentsNeutral`
|
|
110
|
+
* entry point will accept it (via the function overload defined below).
|
|
111
|
+
*/
|
|
112
|
+
export type PmOpaqueRange = {
|
|
113
|
+
pmFrom: number;
|
|
114
|
+
pmTo: number;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Hit-test a container-space coordinate and return an editor-neutral
|
|
118
|
+
* `LayoutHit`.
|
|
119
|
+
*
|
|
120
|
+
* Today the implementation derives the underlying mapping by calling
|
|
121
|
+
* `clickToPositionGeometry` and projecting the result onto the neutral
|
|
122
|
+
* shape. The `legacyPm` field is populated so v1 callers continue to work.
|
|
123
|
+
*
|
|
124
|
+
* Returns `null` only when no page can be hit at all; partial hits emit
|
|
125
|
+
* diagnostics rather than failing closed so consumers can distinguish
|
|
126
|
+
* "outside content" from "fragment unrecognized".
|
|
127
|
+
*/
|
|
128
|
+
export declare function hitTestNeutral(layout: Layout, blocks: FlowBlock[], measures: Measure[], containerPoint: Point, options?: ClickToPositionGeometryOptions): LayoutHit | null;
|
|
129
|
+
/**
|
|
130
|
+
* Project rendered selection rectangles into editor-neutral fragment
|
|
131
|
+
* subranges.
|
|
132
|
+
*
|
|
133
|
+
* Accepts a `PmOpaqueRange` today; future neutral range shapes can be
|
|
134
|
+
* accepted via overloads without reopening this contract.
|
|
135
|
+
*
|
|
136
|
+
* The `selectionToRects` produces one `Rect` per visual line; this helper
|
|
137
|
+
* groups them by page and surfaces the underlying fragment identity for
|
|
138
|
+
* each rect. v1 callers that need raw pixel rects should continue to call
|
|
139
|
+
* `selectionToRects` directly — this is the editor-neutral adapter.
|
|
140
|
+
*/
|
|
141
|
+
export declare function mapRangeToFragmentsNeutral(layout: Layout, blocks: FlowBlock[], measures: Measure[], range: PmOpaqueRange, selectionToRectsFn: (layout: Layout, blocks: FlowBlock[], measures: Measure[], from: number, to: number) => LayoutRect[]): LayoutRangeMapping;
|
|
142
|
+
export declare function mapRangeToFragmentsNeutral(layout: Layout, blocks: FlowBlock[], measures: Measure[], range: LayoutFragmentOpaqueRange): LayoutRangeMapping;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FlowBlock, Layout, LayoutStoryLocator, Measure, NeutralSegmentGeometryReadback } from '../../contracts/src/index.js';
|
|
2
|
+
import { PageGeometryHelper } from './page-geometry-helper.js';
|
|
3
|
+
export type CollectSegmentGeometryOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* Story locator for the layout being read. Defaults to body. Pass the
|
|
6
|
+
* header/footer/footnote/endnote locator when collecting geometry for a
|
|
7
|
+
* non-body story layout so identity stays story-correct.
|
|
8
|
+
*/
|
|
9
|
+
story?: LayoutStoryLocator;
|
|
10
|
+
/**
|
|
11
|
+
* Optional `PageGeometryHelper` for page-top lookups. Strongly recommended so
|
|
12
|
+
* vertical geometry matches selection rendering exactly. Falls back to
|
|
13
|
+
* `calculatePageTopFallback` when omitted.
|
|
14
|
+
*/
|
|
15
|
+
geometryHelper?: PageGeometryHelper;
|
|
16
|
+
/** Exact page interval/window to read; omitted means every page. */
|
|
17
|
+
pageIndices?: readonly number[];
|
|
18
|
+
/** Bounded page-top lookup used with `pageIndices` without building a whole-document helper cache. */
|
|
19
|
+
pageTopAt?: (pageIndex: number) => number;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Read editor-neutral measured segment geometry for every paintable fragment in
|
|
23
|
+
* a layout.
|
|
24
|
+
*
|
|
25
|
+
* Body paragraph fragments (including word-layout list paragraphs) resolve to
|
|
26
|
+
* full per-line / per-segment geometry. Fragment kinds whose text geometry this
|
|
27
|
+
* version does not model (tables, inline/anchored images and drawings, and
|
|
28
|
+
* standalone list-item fragments), and lines the substrate cannot place safely
|
|
29
|
+
* (RTL/bidi), are emitted with identity + bounds and a diagnostic, never with a
|
|
30
|
+
* guessed rect.
|
|
31
|
+
*/
|
|
32
|
+
export declare function collectSegmentGeometry(layout: Layout, blocks: FlowBlock[], measures: Measure[], options?: CollectSegmentGeometryOptions): NeutralSegmentGeometryReadback;
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { Layout } from '../../contracts/src/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for page geometry calculations.
|
|
4
|
+
*/
|
|
5
|
+
export interface PageGeometryConfig {
|
|
6
|
+
/** The layout containing page data */
|
|
7
|
+
layout: Layout;
|
|
8
|
+
/** Gap between pages in pixels (defaults to layout.pageGap ?? 0) */
|
|
9
|
+
pageGap?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* PageGeometryHelper provides efficient, cached access to page positions and heights.
|
|
13
|
+
*
|
|
14
|
+
* This class:
|
|
15
|
+
* - Computes cumulative Y positions for each page (accounting for per-page heights and gaps)
|
|
16
|
+
* - Caches calculations for O(1) lookup performance
|
|
17
|
+
* - Invalidates cache when layout changes
|
|
18
|
+
* - Handles mixed page sizes correctly
|
|
19
|
+
*
|
|
20
|
+
* **Why This Exists:**
|
|
21
|
+
* Selection overlays were drifting because geometry calculations used different
|
|
22
|
+
* assumptions about page spacing than the DOM painter. This helper ensures all
|
|
23
|
+
* code uses the same page positions by providing a single source of truth.
|
|
24
|
+
*
|
|
25
|
+
* **Performance:**
|
|
26
|
+
* - Initial calculation: O(n) where n = number of pages
|
|
27
|
+
* - Subsequent lookups: O(1) via cached arrays
|
|
28
|
+
* - Cache invalidation: O(1) version check
|
|
29
|
+
*
|
|
30
|
+
* **Usage:**
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const helper = new PageGeometryHelper({ layout, pageGap: 24 });
|
|
33
|
+
*
|
|
34
|
+
* // Get cumulative Y position for page 5
|
|
35
|
+
* const y = helper.getPageTop(5);
|
|
36
|
+
*
|
|
37
|
+
* // Get height of page 5
|
|
38
|
+
* const height = helper.getPageHeight(5);
|
|
39
|
+
*
|
|
40
|
+
* // Get gap between pages
|
|
41
|
+
* const gap = helper.getPageGap();
|
|
42
|
+
*
|
|
43
|
+
* // Update when layout changes
|
|
44
|
+
* helper.updateLayout(newLayout);
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare class PageGeometryHelper {
|
|
48
|
+
private config;
|
|
49
|
+
private cache;
|
|
50
|
+
/**
|
|
51
|
+
* Creates a new PageGeometryHelper instance.
|
|
52
|
+
*
|
|
53
|
+
* @param config - Page geometry configuration
|
|
54
|
+
*/
|
|
55
|
+
constructor(config: PageGeometryConfig);
|
|
56
|
+
/**
|
|
57
|
+
* Updates the layout and invalidates the cache.
|
|
58
|
+
*
|
|
59
|
+
* Call this whenever the layout changes (new pages, different heights, etc.)
|
|
60
|
+
*
|
|
61
|
+
* @param layout - New layout data
|
|
62
|
+
* @param pageGap - Optional new page gap (if not provided, uses current gap)
|
|
63
|
+
*/
|
|
64
|
+
updateLayout(layout: Layout, pageGap?: number): void;
|
|
65
|
+
/**
|
|
66
|
+
* Updates the page gap and invalidates the cache.
|
|
67
|
+
*
|
|
68
|
+
* @param pageGap - New gap between pages in pixels
|
|
69
|
+
*/
|
|
70
|
+
updatePageGap(pageGap: number): void;
|
|
71
|
+
/**
|
|
72
|
+
* Gets the cumulative Y position (top edge) of a page in container space.
|
|
73
|
+
*
|
|
74
|
+
* The returned value is the distance from the top of the container to the
|
|
75
|
+
* top of the specified page, accounting for all previous pages and gaps.
|
|
76
|
+
*
|
|
77
|
+
* @param pageIndex - Zero-based page index
|
|
78
|
+
* @returns Y position in pixels, or 0 if page index is invalid
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```typescript
|
|
82
|
+
* // Get Y position of page 0 (first page)
|
|
83
|
+
* const y0 = helper.getPageTop(0); // Returns 0
|
|
84
|
+
*
|
|
85
|
+
* // Get Y position of page 2 (third page)
|
|
86
|
+
* // Assumes page 0 height = 1000, page 1 height = 1200, gap = 24
|
|
87
|
+
* const y2 = helper.getPageTop(2); // Returns 1000 + 24 + 1200 + 24 = 2248
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
getPageTop(pageIndex: number): number;
|
|
91
|
+
/**
|
|
92
|
+
* Gets the height of a specific page.
|
|
93
|
+
*
|
|
94
|
+
* Uses per-page height if available (from layout.pages[i].size?.h),
|
|
95
|
+
* otherwise falls back to layout.pageSize.h.
|
|
96
|
+
*
|
|
97
|
+
* @param pageIndex - Zero-based page index
|
|
98
|
+
* @returns Page height in pixels, or 0 if page index is invalid
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* const height = helper.getPageHeight(0); // Returns page-specific height
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
getPageHeight(pageIndex: number): number;
|
|
106
|
+
/**
|
|
107
|
+
* Gets the gap between pages.
|
|
108
|
+
*
|
|
109
|
+
* @returns Gap in pixels
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```typescript
|
|
113
|
+
* const gap = helper.getPageGap(); // Returns 24
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
getPageGap(): number;
|
|
117
|
+
/**
|
|
118
|
+
* Gets the total height of all pages including gaps.
|
|
119
|
+
*
|
|
120
|
+
* Total height = sum of all page heights + (pageCount - 1) * gap
|
|
121
|
+
*
|
|
122
|
+
* @returns Total height in pixels
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ```typescript
|
|
126
|
+
* // 3 pages: heights [1000, 1200, 1000], gap = 24
|
|
127
|
+
* const total = helper.getTotalHeight();
|
|
128
|
+
* // Returns 1000 + 24 + 1200 + 24 + 1000 = 3248
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
getTotalHeight(): number;
|
|
132
|
+
/**
|
|
133
|
+
* Gets the number of pages in the layout.
|
|
134
|
+
*
|
|
135
|
+
* @returns Page count
|
|
136
|
+
*/
|
|
137
|
+
getPageCount(): number;
|
|
138
|
+
/**
|
|
139
|
+
* Finds the page index containing a given Y coordinate.
|
|
140
|
+
*
|
|
141
|
+
* This performs a linear search through cached cumulative positions.
|
|
142
|
+
* For large documents, consider adding binary search optimization.
|
|
143
|
+
*
|
|
144
|
+
* @param containerY - Y coordinate in container space
|
|
145
|
+
* @returns Page index, or null if Y is outside all pages
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```typescript
|
|
149
|
+
* // Find which page contains Y = 1500
|
|
150
|
+
* const pageIndex = helper.getPageIndexAtY(1500);
|
|
151
|
+
* // Returns 1 (second page) if first page ends at Y=1024
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
getPageIndexAtY(containerY: number): number | null;
|
|
155
|
+
/**
|
|
156
|
+
* Finds the nearest page index to a given Y coordinate (snap-to-nearest).
|
|
157
|
+
*
|
|
158
|
+
* Returns the page containing Y when inside a page; otherwise returns the
|
|
159
|
+
* closest page based on distance to page center. Useful for dragging through
|
|
160
|
+
* page gaps where getPageIndexAtY would return null.
|
|
161
|
+
*
|
|
162
|
+
* @param containerY - Y coordinate in container space
|
|
163
|
+
* @returns Nearest page index, or null if there are no pages
|
|
164
|
+
*/
|
|
165
|
+
getNearestPageIndex(containerY: number): number | null;
|
|
166
|
+
/**
|
|
167
|
+
* Ensures the cache is built and up-to-date.
|
|
168
|
+
* Validates cache state and rebuilds if needed.
|
|
169
|
+
* @private
|
|
170
|
+
* @throws Never throws - handles errors gracefully with fallback values
|
|
171
|
+
*/
|
|
172
|
+
private ensureCache;
|
|
173
|
+
/**
|
|
174
|
+
* Builds the geometry cache from current layout data.
|
|
175
|
+
* Handles errors gracefully by providing fallback values.
|
|
176
|
+
* @private
|
|
177
|
+
* @throws Never throws - catches all errors and provides safe defaults
|
|
178
|
+
*/
|
|
179
|
+
private buildCache;
|
|
180
|
+
/**
|
|
181
|
+
* Clears the cache, forcing recalculation on next access.
|
|
182
|
+
* Useful for testing or manual cache invalidation.
|
|
183
|
+
*/
|
|
184
|
+
clearCache(): void;
|
|
185
|
+
/**
|
|
186
|
+
* Gets debug information about the current cache state.
|
|
187
|
+
* @internal
|
|
188
|
+
*/
|
|
189
|
+
getDebugInfo(): {
|
|
190
|
+
isCached: boolean;
|
|
191
|
+
pageCount: number;
|
|
192
|
+
pageGap: number;
|
|
193
|
+
totalHeight: number;
|
|
194
|
+
cumulativeY: number[];
|
|
195
|
+
pageHeights: number[];
|
|
196
|
+
};
|
|
197
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { ParagraphAttrs, ParagraphBorders, ParagraphBorder, Run, TableBorders, TableBorderValue, CellBorders, BorderSpec } from '../../contracts/src/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a deterministic hash string for a paragraph border.
|
|
4
|
+
* Ensures consistent ordering regardless of JS engine property enumeration.
|
|
5
|
+
*
|
|
6
|
+
* @param border - The paragraph border to hash
|
|
7
|
+
* @returns A deterministic hash string
|
|
8
|
+
*/
|
|
9
|
+
export declare const hashParagraphBorder: (border: ParagraphBorder) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Creates a deterministic hash string for paragraph borders.
|
|
12
|
+
* Hashes all four sides (top, right, bottom, left) in a consistent order.
|
|
13
|
+
*
|
|
14
|
+
* @param borders - The paragraph borders to hash
|
|
15
|
+
* @returns A deterministic hash string
|
|
16
|
+
*/
|
|
17
|
+
export declare const hashParagraphBorders: (borders: ParagraphBorders) => string;
|
|
18
|
+
/**
|
|
19
|
+
* Creates a deterministic hash string for a border spec (used in table/cell borders).
|
|
20
|
+
* Ensures consistent ordering regardless of JS engine property enumeration.
|
|
21
|
+
*
|
|
22
|
+
* @param border - The border spec to hash
|
|
23
|
+
* @returns A deterministic hash string in format "s:style,w:width,c:color,sp:space"
|
|
24
|
+
*/
|
|
25
|
+
export declare const hashBorderSpec: (border: BorderSpec) => string;
|
|
26
|
+
/**
|
|
27
|
+
* Creates a deterministic hash string for a table border value.
|
|
28
|
+
* Handles the three-state value: null (inherit), { none: true } (explicit no border), or BorderSpec.
|
|
29
|
+
*
|
|
30
|
+
* @param borderValue - The table border value to hash
|
|
31
|
+
* @returns A deterministic hash string:
|
|
32
|
+
* - Empty string for undefined
|
|
33
|
+
* - "null" for null (inherit from parent)
|
|
34
|
+
* - "none" for { none: true } (explicit no border)
|
|
35
|
+
* - Hash string for BorderSpec (e.g., "s:single,w:4,c:000000")
|
|
36
|
+
* @example
|
|
37
|
+
* hashTableBorderValue(undefined) // ""
|
|
38
|
+
* hashTableBorderValue(null) // "null"
|
|
39
|
+
* hashTableBorderValue({ none: true }) // "none"
|
|
40
|
+
* hashTableBorderValue({ style: 'single', width: 4, color: '000000' }) // "s:single,w:4,c:000000"
|
|
41
|
+
*/
|
|
42
|
+
export declare const hashTableBorderValue: (borderValue: TableBorderValue | undefined) => string;
|
|
43
|
+
/**
|
|
44
|
+
* Creates a deterministic hash string for table-level borders.
|
|
45
|
+
* Hashes all six border positions (top, right, bottom, left, insideH, insideV) in a consistent order.
|
|
46
|
+
*
|
|
47
|
+
* @param borders - The table borders to hash
|
|
48
|
+
* @returns A deterministic hash string with format "t:[top];r:[right];b:[bottom];l:[left];ih:[insideH];iv:[insideV]"
|
|
49
|
+
* where each border value is hashed using hashTableBorderValue. Empty string if borders is undefined.
|
|
50
|
+
* @example
|
|
51
|
+
* hashTableBorders(undefined) // ""
|
|
52
|
+
* hashTableBorders({ top: { style: 'single', width: 4 } }) // "t:[s:single,w:4]"
|
|
53
|
+
*/
|
|
54
|
+
export declare const hashTableBorders: (borders: TableBorders | undefined) => string;
|
|
55
|
+
/**
|
|
56
|
+
* Creates a deterministic hash string for cell-level borders.
|
|
57
|
+
* Hashes all four sides (top, right, bottom, left) in a consistent order.
|
|
58
|
+
*
|
|
59
|
+
* @param borders - The cell borders to hash
|
|
60
|
+
* @returns A deterministic hash string with format "t:[top];r:[right];b:[bottom];l:[left]"
|
|
61
|
+
* where each border is hashed using hashBorderSpec. Empty string if borders is undefined.
|
|
62
|
+
* @example
|
|
63
|
+
* hashCellBorders(undefined) // ""
|
|
64
|
+
* hashCellBorders({ top: { style: 'single', width: 4, color: '000000' } }) // "t:[s:single,w:4,c:000000]"
|
|
65
|
+
*/
|
|
66
|
+
export declare const hashCellBorders: (borders: CellBorders | undefined) => string;
|
|
67
|
+
/**
|
|
68
|
+
* Creates a deterministic hash string for paragraph-level attributes.
|
|
69
|
+
* This is used for cache invalidation when paragraph formatting changes
|
|
70
|
+
* (alignment, spacing, line height, indent, borders, shading, direction).
|
|
71
|
+
*
|
|
72
|
+
* The hash is deterministic to ensure consistent cache keys across different
|
|
73
|
+
* JS engine property enumeration orders.
|
|
74
|
+
*
|
|
75
|
+
* @param attrs - The paragraph attributes to hash
|
|
76
|
+
* @returns A deterministic hash string representing all paragraph attributes
|
|
77
|
+
*/
|
|
78
|
+
export declare const hashParagraphAttrs: (attrs: ParagraphAttrs | undefined) => string;
|
|
79
|
+
/**
|
|
80
|
+
* Type guard to check if a run has a string property.
|
|
81
|
+
*
|
|
82
|
+
* @param run - The run to check
|
|
83
|
+
* @param prop - The property name to check
|
|
84
|
+
* @returns True if the run has the property and it's a string
|
|
85
|
+
*/
|
|
86
|
+
export declare const hasStringProp: (run: Run, prop: string) => run is Run & Record<string, string>;
|
|
87
|
+
/**
|
|
88
|
+
* Type guard to check if a run has a number property.
|
|
89
|
+
*
|
|
90
|
+
* @param run - The run to check
|
|
91
|
+
* @param prop - The property name to check
|
|
92
|
+
* @returns True if the run has the property and it's a number
|
|
93
|
+
*/
|
|
94
|
+
export declare const hasNumberProp: (run: Run, prop: string) => run is Run & Record<string, number>;
|
|
95
|
+
/**
|
|
96
|
+
* Type guard to check if a run has a boolean property.
|
|
97
|
+
*
|
|
98
|
+
* @param run - The run to check
|
|
99
|
+
* @param prop - The property name to check
|
|
100
|
+
* @returns True if the run has the property and it's a boolean
|
|
101
|
+
*/
|
|
102
|
+
export declare const hasBooleanProp: (run: Run, prop: string) => run is Run & Record<string, boolean>;
|
|
103
|
+
/**
|
|
104
|
+
* Safely gets a string property from a run, with type narrowing.
|
|
105
|
+
*
|
|
106
|
+
* @param run - The run to get the property from
|
|
107
|
+
* @param prop - The property name
|
|
108
|
+
* @returns The string value or empty string if not present
|
|
109
|
+
*/
|
|
110
|
+
export declare const getRunStringProp: (run: Run, prop: string) => string;
|
|
111
|
+
/**
|
|
112
|
+
* Safely gets a number property from a run, with type narrowing.
|
|
113
|
+
*
|
|
114
|
+
* @param run - The run to get the property from
|
|
115
|
+
* @param prop - The property name
|
|
116
|
+
* @returns The number value or 0 if not present
|
|
117
|
+
*/
|
|
118
|
+
export declare const getRunNumberProp: (run: Run, prop: string) => number;
|
|
119
|
+
/**
|
|
120
|
+
* Safely gets a boolean property from a run, with type narrowing.
|
|
121
|
+
*
|
|
122
|
+
* @param run - The run to get the property from
|
|
123
|
+
* @param prop - The property name
|
|
124
|
+
* @returns The boolean value or false if not present
|
|
125
|
+
*/
|
|
126
|
+
export declare const getRunBooleanProp: (run: Run, prop: string) => boolean;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Paragraph Line Cache
|
|
3
|
+
*
|
|
4
|
+
* Caches line break information for paragraphs to avoid expensive recalculation.
|
|
5
|
+
* Tracks dirty state to know when recalculation is needed after edits.
|
|
6
|
+
*
|
|
7
|
+
* @module paragraph-line-cache
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Information about a single line within a paragraph.
|
|
11
|
+
*/
|
|
12
|
+
export interface LineInfo {
|
|
13
|
+
/** Character offset within paragraph where line starts */
|
|
14
|
+
localStart: number;
|
|
15
|
+
/** Character offset within paragraph where line ends (exclusive) */
|
|
16
|
+
localEnd: number;
|
|
17
|
+
/** Width of the line in pixels */
|
|
18
|
+
width: number;
|
|
19
|
+
/** Height of the line in pixels */
|
|
20
|
+
height: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Cached line break information for a paragraph.
|
|
24
|
+
*/
|
|
25
|
+
export interface ParagraphLines {
|
|
26
|
+
/** PM document version when these lines were calculated */
|
|
27
|
+
version: number;
|
|
28
|
+
/** Array of lines in this paragraph */
|
|
29
|
+
lines: LineInfo[];
|
|
30
|
+
/** Total height of all lines */
|
|
31
|
+
totalHeight: number;
|
|
32
|
+
/** Whether this cache entry needs recalculation */
|
|
33
|
+
dirty: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* ParagraphLineCache stores line break information for paragraphs.
|
|
37
|
+
*
|
|
38
|
+
* This cache is essential for performance when calculating cursor positions
|
|
39
|
+
* within multi-line paragraphs, as it avoids re-measuring line breaks.
|
|
40
|
+
*/
|
|
41
|
+
export declare class ParagraphLineCache {
|
|
42
|
+
private cache;
|
|
43
|
+
/**
|
|
44
|
+
* Gets cached lines for a paragraph.
|
|
45
|
+
*
|
|
46
|
+
* @param paragraphIndex - Index of the paragraph
|
|
47
|
+
* @returns Cached lines if available, undefined otherwise
|
|
48
|
+
*/
|
|
49
|
+
getLines(paragraphIndex: number): ParagraphLines | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Sets lines for a paragraph.
|
|
52
|
+
*
|
|
53
|
+
* @param paragraphIndex - Index of the paragraph
|
|
54
|
+
* @param lines - Line information to cache
|
|
55
|
+
*/
|
|
56
|
+
setLines(paragraphIndex: number, lines: ParagraphLines): void;
|
|
57
|
+
/**
|
|
58
|
+
* Marks a paragraph as dirty (needs recalculation).
|
|
59
|
+
*
|
|
60
|
+
* @param paragraphIndex - Index of the paragraph to mark dirty
|
|
61
|
+
*/
|
|
62
|
+
markDirty(paragraphIndex: number): void;
|
|
63
|
+
/**
|
|
64
|
+
* Marks all paragraphs starting from a specific index as dirty.
|
|
65
|
+
*
|
|
66
|
+
* This is useful when a change affects multiple paragraphs.
|
|
67
|
+
*
|
|
68
|
+
* @param startIndex - First paragraph index to mark dirty
|
|
69
|
+
*/
|
|
70
|
+
markDirtyFrom(startIndex: number): void;
|
|
71
|
+
/**
|
|
72
|
+
* Marks all paragraphs in a range as dirty.
|
|
73
|
+
*
|
|
74
|
+
* @param startIndex - First paragraph index to mark dirty (inclusive)
|
|
75
|
+
* @param endIndex - Last paragraph index to mark dirty (exclusive)
|
|
76
|
+
*/
|
|
77
|
+
markDirtyRange(startIndex: number, endIndex: number): void;
|
|
78
|
+
/**
|
|
79
|
+
* Checks if a paragraph needs recalculation.
|
|
80
|
+
*
|
|
81
|
+
* @param paragraphIndex - Index of the paragraph to check
|
|
82
|
+
* @returns True if the paragraph is dirty or not cached
|
|
83
|
+
*/
|
|
84
|
+
isDirty(paragraphIndex: number): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Finds the line containing a local character offset within a paragraph.
|
|
87
|
+
*
|
|
88
|
+
* @param paragraphIndex - Index of the paragraph
|
|
89
|
+
* @param localOffset - Character offset within the paragraph
|
|
90
|
+
* @returns Line info if found, null otherwise
|
|
91
|
+
*/
|
|
92
|
+
findLineContaining(paragraphIndex: number, localOffset: number): LineInfo | null;
|
|
93
|
+
/**
|
|
94
|
+
* Gets the line index containing a local character offset.
|
|
95
|
+
*
|
|
96
|
+
* @param paragraphIndex - Index of the paragraph
|
|
97
|
+
* @param localOffset - Character offset within the paragraph
|
|
98
|
+
* @returns Line index if found, -1 otherwise
|
|
99
|
+
*/
|
|
100
|
+
findLineIndex(paragraphIndex: number, localOffset: number): number;
|
|
101
|
+
/**
|
|
102
|
+
* Removes a paragraph from the cache.
|
|
103
|
+
*
|
|
104
|
+
* @param paragraphIndex - Index of the paragraph to remove
|
|
105
|
+
*/
|
|
106
|
+
remove(paragraphIndex: number): void;
|
|
107
|
+
/**
|
|
108
|
+
* Clears the entire cache.
|
|
109
|
+
*/
|
|
110
|
+
clear(): void;
|
|
111
|
+
/**
|
|
112
|
+
* Gets the number of cached paragraphs.
|
|
113
|
+
*/
|
|
114
|
+
get size(): number;
|
|
115
|
+
/**
|
|
116
|
+
* Checks if a paragraph is cached.
|
|
117
|
+
*
|
|
118
|
+
* @param paragraphIndex - Index of the paragraph to check
|
|
119
|
+
* @returns True if the paragraph has cached lines
|
|
120
|
+
*/
|
|
121
|
+
has(paragraphIndex: number): boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Gets all cached paragraph indices.
|
|
124
|
+
*
|
|
125
|
+
* @returns Array of paragraph indices that are cached
|
|
126
|
+
*/
|
|
127
|
+
getCachedIndices(): number[];
|
|
128
|
+
/**
|
|
129
|
+
* Gets cache statistics for debugging.
|
|
130
|
+
*
|
|
131
|
+
* @returns Statistics about the cache
|
|
132
|
+
*/
|
|
133
|
+
getStats(): {
|
|
134
|
+
total: number;
|
|
135
|
+
dirty: number;
|
|
136
|
+
clean: number;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Validates cache entries for a specific version.
|
|
140
|
+
* Marks entries with mismatched versions as dirty.
|
|
141
|
+
*
|
|
142
|
+
* @param currentVersion - Current PM document version
|
|
143
|
+
* @returns Number of entries marked dirty
|
|
144
|
+
*/
|
|
145
|
+
validateVersion(currentVersion: number): number;
|
|
146
|
+
/**
|
|
147
|
+
* Prunes dirty entries from the cache to free memory.
|
|
148
|
+
*
|
|
149
|
+
* @returns Number of entries removed
|
|
150
|
+
*/
|
|
151
|
+
pruneDirty(): number;
|
|
152
|
+
}
|