superdoc 2.2.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +337 -0
- package/LICENSE +661 -0
- package/NOTICE +8 -0
- package/README.md +107 -0
- package/dist/chunks/FindReplaceSurface-BEW-1NhM.es.js +344 -0
- package/dist/chunks/FindReplaceSurface-DLxnCQOB.cjs +346 -0
- package/dist/chunks/PasswordPromptSurface-BA6HHqEa.es.js +111 -0
- package/dist/chunks/PasswordPromptSurface-DMbfDvpQ.cjs +113 -0
- package/dist/chunks/PdfViewer-CNOtyS-I.es.js +531 -0
- package/dist/chunks/PdfViewer-CoFiGAhm.cjs +535 -0
- package/dist/chunks/_plugin-vue_export-helper-BTwbGDKw.cjs +11 -0
- package/dist/chunks/_plugin-vue_export-helper-CInC0bKI.es.js +6 -0
- package/dist/chunks/blank-docx-CJAXnJKp.es.js +2 -0
- package/dist/chunks/blank-docx-DA-G-3VB.cjs +7 -0
- package/dist/chunks/constants-CY3R3_kF.es.js +3 -0
- package/dist/chunks/constants-sbCZ2O_A.cjs +14 -0
- package/dist/chunks/create-super-doc-ui-CXCqHc2m.cjs +9451 -0
- package/dist/chunks/create-super-doc-ui-fxF2Q8Ib.es.js +9188 -0
- package/dist/chunks/eventemitter3-B60Fsz-a.es.js +131 -0
- package/dist/chunks/eventemitter3-DCfwFVNn.cjs +137 -0
- package/dist/chunks/jszip-BdUBlUeG.cjs +4679 -0
- package/dist/chunks/jszip-DzmwAHr3.es.js +4650 -0
- package/dist/chunks/rolldown-runtime-BJVcqBbz.es.js +43 -0
- package/dist/chunks/rolldown-runtime-_dR15c8t.cjs +68 -0
- package/dist/chunks/uuid-B2Sqk-3p.es.js +32 -0
- package/dist/chunks/uuid-CFp0WGVU.cjs +38 -0
- package/dist/collaboration-upgrade-engine.cjs +37 -0
- package/dist/collaboration-upgrade-engine.es.js +30 -0
- package/dist/document-api/src/authorities/authorities.d.ts +29 -0
- package/dist/document-api/src/authorities/authorities.types.d.ts +113 -0
- package/dist/document-api/src/blocks/blocks.d.ts +29 -0
- package/dist/document-api/src/bookmarks/bookmarks.d.ts +15 -0
- package/dist/document-api/src/bookmarks/bookmarks.types.d.ts +82 -0
- package/dist/document-api/src/capabilities/capabilities.d.ts +82 -0
- package/dist/document-api/src/captions/captions.d.ts +17 -0
- package/dist/document-api/src/captions/captions.types.d.ts +61 -0
- package/dist/document-api/src/citations/citations.d.ts +39 -0
- package/dist/document-api/src/citations/citations.types.d.ts +151 -0
- package/dist/document-api/src/clear-content/clear-content.d.ts +25 -0
- package/dist/document-api/src/clipboard/clipboard.d.ts +11 -0
- package/dist/document-api/src/comments/comments.d.ts +222 -0
- package/dist/document-api/src/comments/comments.types.d.ts +227 -0
- package/dist/document-api/src/content-controls/content-controls.d.ts +136 -0
- package/dist/document-api/src/content-controls/content-controls.types.d.ts +453 -0
- package/dist/document-api/src/contract/command-catalog.d.ts +17 -0
- package/dist/document-api/src/contract/index.d.ts +9 -0
- package/dist/document-api/src/contract/metadata-types.d.ts +30 -0
- package/dist/document-api/src/contract/operation-definitions.d.ts +3645 -0
- package/dist/document-api/src/contract/operation-map.d.ts +5 -0
- package/dist/document-api/src/contract/operation-registry.d.ts +2002 -0
- package/dist/document-api/src/contract/reference-aliases.d.ts +19 -0
- package/dist/document-api/src/contract/reference-doc-map.d.ts +12 -0
- package/dist/document-api/src/contract/schemas.d.ts +35 -0
- package/dist/document-api/src/contract/step-op-catalog.d.ts +26 -0
- package/dist/document-api/src/contract/types.d.ts +31 -0
- package/dist/document-api/src/create/create.d.ts +27 -0
- package/dist/document-api/src/cross-refs/cross-refs.d.ts +15 -0
- package/dist/document-api/src/cross-refs/cross-refs.types.d.ts +68 -0
- package/dist/document-api/src/customXml/customXml.d.ts +19 -0
- package/dist/document-api/src/customXml/customXml.types.d.ts +148 -0
- package/dist/document-api/src/delete/delete.d.ts +20 -0
- package/dist/document-api/src/diff/diff.d.ts +14 -0
- package/dist/document-api/src/diff/diff.types.d.ts +83 -0
- package/dist/document-api/src/diff/index.d.ts +3 -0
- package/dist/document-api/src/errors.d.ts +11 -0
- package/dist/document-api/src/export/export.d.ts +10 -0
- package/dist/document-api/src/export/export.types.d.ts +40 -0
- package/dist/document-api/src/extract/extract.d.ts +15 -0
- package/dist/document-api/src/fields/fields.d.ts +15 -0
- package/dist/document-api/src/fields/fields.types.d.ts +90 -0
- package/dist/document-api/src/find/find.d.ts +52 -0
- package/dist/document-api/src/footnotes/footnotes.d.ts +17 -0
- package/dist/document-api/src/footnotes/footnotes.types.d.ts +104 -0
- package/dist/document-api/src/format/format.d.ts +92 -0
- package/dist/document-api/src/format/inline-run-patch.d.ts +138 -0
- package/dist/document-api/src/get/get.d.ts +19 -0
- package/dist/document-api/src/get-html/get-html.d.ts +27 -0
- package/dist/document-api/src/get-markdown/get-markdown.d.ts +22 -0
- package/dist/document-api/src/get-node/get-node.d.ts +46 -0
- package/dist/document-api/src/get-text/get-text.d.ts +22 -0
- package/dist/document-api/src/header-footers/header-footers.d.ts +37 -0
- package/dist/document-api/src/header-footers/header-footers.types.d.ts +116 -0
- package/dist/document-api/src/history/history.d.ts +38 -0
- package/dist/document-api/src/history/history.types.d.ts +100 -0
- package/dist/document-api/src/hyperlinks/hyperlinks.d.ts +17 -0
- package/dist/document-api/src/hyperlinks/hyperlinks.types.d.ts +112 -0
- package/dist/document-api/src/images/images.d.ts +63 -0
- package/dist/document-api/src/images/images.types.d.ts +209 -0
- package/dist/document-api/src/images/z-order.d.ts +10 -0
- package/dist/document-api/src/index/index.d.ts +29 -0
- package/dist/document-api/src/index/index.types.d.ts +125 -0
- package/dist/document-api/src/index.d.ts +560 -0
- package/dist/document-api/src/info/info.d.ts +19 -0
- package/dist/document-api/src/inline-semantics/directives.d.ts +95 -0
- package/dist/document-api/src/inline-semantics/error-types.d.ts +68 -0
- package/dist/document-api/src/inline-semantics/index.d.ts +20 -0
- package/dist/document-api/src/inline-semantics/property-ids.d.ts +24 -0
- package/dist/document-api/src/inline-semantics/token-parsers.d.ts +59 -0
- package/dist/document-api/src/inline-semantics/token-sets.d.ts +34 -0
- package/dist/document-api/src/insert/insert.d.ts +65 -0
- package/dist/document-api/src/invoke/invoke.d.ts +17 -0
- package/dist/document-api/src/lists/lists.d.ts +100 -0
- package/dist/document-api/src/lists/lists.types.d.ts +499 -0
- package/dist/document-api/src/markdown-to-fragment/markdown-to-fragment.d.ts +15 -0
- package/dist/document-api/src/metadata/anchored-metadata.d.ts +33 -0
- package/dist/document-api/src/metadata/anchored-metadata.types.d.ts +175 -0
- package/dist/document-api/src/paragraphs/paragraphs.d.ts +84 -0
- package/dist/document-api/src/paragraphs/paragraphs.types.d.ts +214 -0
- package/dist/document-api/src/permission-ranges/permission-ranges.d.ts +15 -0
- package/dist/document-api/src/permission-ranges/permission-ranges.types.d.ts +49 -0
- package/dist/document-api/src/plan/plan.d.ts +73 -0
- package/dist/document-api/src/protection/protection.d.ts +11 -0
- package/dist/document-api/src/protection/protection.types.d.ts +47 -0
- package/dist/document-api/src/ranges/index.d.ts +2 -0
- package/dist/document-api/src/ranges/ranges.types.d.ts +121 -0
- package/dist/document-api/src/ranges/resolve.d.ts +2 -0
- package/dist/document-api/src/receipt-bridge.d.ts +30 -0
- package/dist/document-api/src/replace/replace.d.ts +24 -0
- package/dist/document-api/src/sections/sections.d.ts +42 -0
- package/dist/document-api/src/sections/sections.types.d.ts +236 -0
- package/dist/document-api/src/selection/selection.d.ts +23 -0
- package/dist/document-api/src/selection/selection.types.d.ts +85 -0
- package/dist/document-api/src/selection-mutation.d.ts +46 -0
- package/dist/document-api/src/styles/apply.d.ts +142 -0
- package/dist/document-api/src/styles/catalog.d.ts +154 -0
- package/dist/document-api/src/styles/index.d.ts +14 -0
- package/dist/document-api/src/styles/registry.d.ts +43 -0
- package/dist/document-api/src/styles/schema.d.ts +9 -0
- package/dist/document-api/src/styles/validation.d.ts +38 -0
- package/dist/document-api/src/tables/color-formats.d.ts +12 -0
- package/dist/document-api/src/tables/tables.d.ts +83 -0
- package/dist/document-api/src/templates/apply.d.ts +160 -0
- package/dist/document-api/src/templates/index.d.ts +7 -0
- package/dist/document-api/src/toc/toc.d.ts +25 -0
- package/dist/document-api/src/toc/toc.types.d.ts +247 -0
- package/dist/document-api/src/track-changes/track-changes.d.ts +177 -0
- package/dist/document-api/src/types/adapter-result.d.ts +10 -0
- package/dist/document-api/src/types/address.d.ts +169 -0
- package/dist/document-api/src/types/base.d.ts +89 -0
- package/dist/document-api/src/types/blocks.types.d.ts +190 -0
- package/dist/document-api/src/types/clipboard.d.ts +216 -0
- package/dist/document-api/src/types/comments.types.d.ts +17 -0
- package/dist/document-api/src/types/create.types.d.ts +56 -0
- package/dist/document-api/src/types/discovery.d.ts +99 -0
- package/dist/document-api/src/types/extract.types.d.ts +163 -0
- package/dist/document-api/src/types/fragment.d.ts +29 -0
- package/dist/document-api/src/types/index.d.ts +30 -0
- package/dist/document-api/src/types/info.types.d.ts +109 -0
- package/dist/document-api/src/types/inline.types.d.ts +28 -0
- package/dist/document-api/src/types/media.types.d.ts +72 -0
- package/dist/document-api/src/types/mutation-plan.types.d.ts +264 -0
- package/dist/document-api/src/types/node.d.ts +9 -0
- package/dist/document-api/src/types/paragraph.types.d.ts +61 -0
- package/dist/document-api/src/types/placement.d.ts +24 -0
- package/dist/document-api/src/types/query-match.types.d.ts +212 -0
- package/dist/document-api/src/types/query.d.ts +133 -0
- package/dist/document-api/src/types/receipt.d.ts +191 -0
- package/dist/document-api/src/types/references.types.d.ts +9 -0
- package/dist/document-api/src/types/sd-contract.d.ts +54 -0
- package/dist/document-api/src/types/sd-envelope.d.ts +59 -0
- package/dist/document-api/src/types/sd-nodes.d.ts +375 -0
- package/dist/document-api/src/types/sd-objects.d.ts +144 -0
- package/dist/document-api/src/types/sd-props.d.ts +240 -0
- package/dist/document-api/src/types/sd-sections.d.ts +126 -0
- package/dist/document-api/src/types/sd-styles.d.ts +36 -0
- package/dist/document-api/src/types/step-manifest.types.d.ts +30 -0
- package/dist/document-api/src/types/story.types.d.ts +123 -0
- package/dist/document-api/src/types/structural-input.d.ts +40 -0
- package/dist/document-api/src/types/structured.types.d.ts +21 -0
- package/dist/document-api/src/types/style-policy.types.d.ts +49 -0
- package/dist/document-api/src/types/table-operations.types.d.ts +618 -0
- package/dist/document-api/src/types/tables.types.d.ts +43 -0
- package/dist/document-api/src/types/toc.types.d.ts +1 -0
- package/dist/document-api/src/types/track-changes.types.d.ts +703 -0
- package/dist/document-api/src/validation/create-location-validator.d.ts +2 -0
- package/dist/document-api/src/validation/fragment-validator.d.ts +13 -0
- package/dist/document-api/src/validation/selection-target-validator.d.ts +7 -0
- package/dist/document-api/src/validation/story-validator.d.ts +12 -0
- package/dist/document-api/src/validation-primitives.d.ts +29 -0
- package/dist/document-api/src/write/locator.d.ts +24 -0
- package/dist/document-api/src/write/write.d.ts +73 -0
- package/dist/images/altText_add.svg +3 -0
- package/dist/images/altText_disclaimer.svg +3 -0
- package/dist/images/altText_done.svg +3 -0
- package/dist/images/altText_spinner.svg +30 -0
- package/dist/images/altText_warning.svg +3 -0
- package/dist/images/annotation-check.svg +11 -0
- package/dist/images/annotation-comment.svg +16 -0
- package/dist/images/annotation-help.svg +26 -0
- package/dist/images/annotation-insert.svg +10 -0
- package/dist/images/annotation-key.svg +11 -0
- package/dist/images/annotation-newparagraph.svg +11 -0
- package/dist/images/annotation-noicon.svg +7 -0
- package/dist/images/annotation-note.svg +42 -0
- package/dist/images/annotation-paperclip.svg +6 -0
- package/dist/images/annotation-paragraph.svg +16 -0
- package/dist/images/annotation-pushpin.svg +7 -0
- package/dist/images/checkmark.svg +5 -0
- package/dist/images/comment-actionsButton.svg +3 -0
- package/dist/images/comment-closeButton.svg +3 -0
- package/dist/images/comment-editButton.svg +8 -0
- package/dist/images/comment-popup-editButton.svg +5 -0
- package/dist/images/cursor-editorFreeHighlight.svg +6 -0
- package/dist/images/cursor-editorFreeText.svg +3 -0
- package/dist/images/cursor-editorInk.svg +4 -0
- package/dist/images/cursor-editorTextHighlight.svg +8 -0
- package/dist/images/editor-toolbar-delete.svg +5 -0
- package/dist/images/editor-toolbar-edit.svg +3 -0
- package/dist/images/findbarButton-next.svg +3 -0
- package/dist/images/findbarButton-previous.svg +3 -0
- package/dist/images/gv-toolbarButton-download.svg +3 -0
- package/dist/images/loading-icon.gif +0 -0
- package/dist/images/loading.svg +1 -0
- package/dist/images/messageBar_closingButton.svg +3 -0
- package/dist/images/messageBar_info.svg +3 -0
- package/dist/images/messageBar_warning.svg +3 -0
- package/dist/images/pages_closeButton.svg +3 -0
- package/dist/images/pages_selected.svg +7 -0
- package/dist/images/pages_viewArrow.svg +3 -0
- package/dist/images/pages_viewButton.svg +3 -0
- package/dist/images/secondaryToolbarButton-documentProperties.svg +3 -0
- package/dist/images/secondaryToolbarButton-firstPage.svg +3 -0
- package/dist/images/secondaryToolbarButton-handTool.svg +3 -0
- package/dist/images/secondaryToolbarButton-lastPage.svg +3 -0
- package/dist/images/secondaryToolbarButton-rotateCcw.svg +3 -0
- package/dist/images/secondaryToolbarButton-rotateCw.svg +3 -0
- package/dist/images/secondaryToolbarButton-scrollHorizontal.svg +3 -0
- package/dist/images/secondaryToolbarButton-scrollPage.svg +3 -0
- package/dist/images/secondaryToolbarButton-scrollVertical.svg +3 -0
- package/dist/images/secondaryToolbarButton-scrollWrapped.svg +3 -0
- package/dist/images/secondaryToolbarButton-selectTool.svg +3 -0
- package/dist/images/secondaryToolbarButton-spreadEven.svg +3 -0
- package/dist/images/secondaryToolbarButton-spreadNone.svg +3 -0
- package/dist/images/secondaryToolbarButton-spreadOdd.svg +3 -0
- package/dist/images/toolbarButton-bookmark.svg +3 -0
- package/dist/images/toolbarButton-currentOutlineItem.svg +3 -0
- package/dist/images/toolbarButton-download.svg +4 -0
- package/dist/images/toolbarButton-editorFreeText.svg +5 -0
- package/dist/images/toolbarButton-editorHighlight.svg +6 -0
- package/dist/images/toolbarButton-editorInk.svg +4 -0
- package/dist/images/toolbarButton-editorSignature.svg +6 -0
- package/dist/images/toolbarButton-editorStamp.svg +8 -0
- package/dist/images/toolbarButton-menuArrow.svg +3 -0
- package/dist/images/toolbarButton-openFile.svg +3 -0
- package/dist/images/toolbarButton-pageDown.svg +3 -0
- package/dist/images/toolbarButton-pageUp.svg +3 -0
- package/dist/images/toolbarButton-presentationMode.svg +3 -0
- package/dist/images/toolbarButton-print.svg +3 -0
- package/dist/images/toolbarButton-search.svg +3 -0
- package/dist/images/toolbarButton-secondaryToolbarToggle.svg +3 -0
- package/dist/images/toolbarButton-viewAttachments.svg +3 -0
- package/dist/images/toolbarButton-viewLayers.svg +3 -0
- package/dist/images/toolbarButton-viewOutline.svg +3 -0
- package/dist/images/toolbarButton-viewThumbnail.svg +3 -0
- package/dist/images/toolbarButton-viewsManagerToggle.svg +3 -0
- package/dist/images/toolbarButton-zoomIn.svg +3 -0
- package/dist/images/toolbarButton-zoomOut.svg +3 -0
- package/dist/images/treeitem-collapsed.svg +1 -0
- package/dist/images/treeitem-expanded.svg +1 -0
- package/dist/layout-engine/contracts/src/author-colors.d.ts +56 -0
- package/dist/layout-engine/contracts/src/cell-spacing.d.ts +12 -0
- package/dist/layout-engine/contracts/src/clip-path-inset.d.ts +27 -0
- package/dist/layout-engine/contracts/src/column-layout.d.ts +79 -0
- package/dist/layout-engine/contracts/src/direction-context.d.ts +219 -0
- package/dist/layout-engine/contracts/src/drawing-taxonomy.d.ts +126 -0
- package/dist/layout-engine/contracts/src/engines/image-wrap.d.ts +54 -0
- package/dist/layout-engine/contracts/src/engines/index.d.ts +17 -0
- package/dist/layout-engine/contracts/src/engines/lists.d.ts +57 -0
- package/dist/layout-engine/contracts/src/engines/paragraph.d.ts +59 -0
- package/dist/layout-engine/contracts/src/engines/tables.d.ts +89 -0
- package/dist/layout-engine/contracts/src/engines/tabs.d.ts +117 -0
- package/dist/layout-engine/contracts/src/graphic-placement.d.ts +76 -0
- package/dist/layout-engine/contracts/src/header-footer-inheritance.d.ts +22 -0
- package/dist/layout-engine/contracts/src/header-footer-resolution.d.ts +28 -0
- package/dist/layout-engine/contracts/src/incremental-dependency.d.ts +10 -0
- package/dist/layout-engine/contracts/src/index.d.ts +2459 -0
- package/dist/layout-engine/contracts/src/justify-utils.d.ts +98 -0
- package/dist/layout-engine/contracts/src/layout-identity.d.ts +136 -0
- package/dist/layout-engine/contracts/src/ooxml-z-index.d.ts +46 -0
- package/dist/layout-engine/contracts/src/page-number-formatting.d.ts +26 -0
- package/dist/layout-engine/contracts/src/page-ref-anchor.d.ts +2 -0
- package/dist/layout-engine/contracts/src/pm-range.d.ts +45 -0
- package/dist/layout-engine/contracts/src/resolved-layout.d.ts +541 -0
- package/dist/layout-engine/contracts/src/run-helpers.d.ts +23 -0
- package/dist/layout-engine/contracts/src/sdt-container.d.ts +13 -0
- package/dist/layout-engine/contracts/src/segment-geometry.d.ts +192 -0
- package/dist/layout-engine/contracts/src/semantic-colors.d.ts +150 -0
- package/dist/layout-engine/contracts/src/table-cell-spacing.d.ts +12 -0
- package/dist/layout-engine/contracts/src/table-column-rescale.d.ts +13 -0
- package/dist/layout-engine/contracts/src/vertical-text.d.ts +43 -0
- package/dist/layout-engine/dom-contract/src/class-names.d.ts +62 -0
- package/dist/layout-engine/dom-contract/src/data-attrs.d.ts +103 -0
- package/dist/layout-engine/dom-contract/src/index.d.ts +18 -0
- package/dist/layout-engine/dom-contract/src/selectors.d.ts +47 -0
- package/dist/layout-engine/layout-bridge/src/cache-warmer.d.ts +73 -0
- package/dist/layout-engine/layout-bridge/src/cache.d.ts +143 -0
- package/dist/layout-engine/layout-bridge/src/cacheInvalidation.d.ts +117 -0
- package/dist/layout-engine/layout-bridge/src/cursor-renderer.d.ts +201 -0
- package/dist/layout-engine/layout-bridge/src/debounced-passes.d.ts +130 -0
- package/dist/layout-engine/layout-bridge/src/diff.d.ts +36 -0
- package/dist/layout-engine/layout-bridge/src/dirty-tracker.d.ts +128 -0
- package/dist/layout-engine/layout-bridge/src/dom-mapping.d.ts +80 -0
- package/dist/layout-engine/layout-bridge/src/featureFlags.d.ts +95 -0
- package/dist/layout-engine/layout-bridge/src/field-annotation-key.d.ts +2 -0
- package/dist/layout-engine/layout-bridge/src/focus-watchdog.d.ts +170 -0
- package/dist/layout-engine/layout-bridge/src/font-metrics-cache.d.ts +164 -0
- package/dist/layout-engine/layout-bridge/src/footnote-scorer.d.ts +63 -0
- package/dist/layout-engine/layout-bridge/src/headerFooterUtils.d.ts +218 -0
- package/dist/layout-engine/layout-bridge/src/ime-handler.d.ts +81 -0
- package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +390 -0
- package/dist/layout-engine/layout-bridge/src/index.d.ts +211 -0
- package/dist/layout-engine/layout-bridge/src/instrumentation.d.ts +245 -0
- package/dist/layout-engine/layout-bridge/src/layoutHeaderFooter.d.ts +123 -0
- package/dist/layout-engine/layout-bridge/src/list-indent-utils.d.ts +205 -0
- package/dist/layout-engine/layout-bridge/src/local-paragraph-layout.d.ts +93 -0
- package/dist/layout-engine/layout-bridge/src/neutral-hit.d.ts +142 -0
- package/dist/layout-engine/layout-bridge/src/neutral-segment-geometry.d.ts +32 -0
- package/dist/layout-engine/layout-bridge/src/page-geometry-helper.d.ts +197 -0
- package/dist/layout-engine/layout-bridge/src/paragraph-hash-utils.d.ts +126 -0
- package/dist/layout-engine/layout-bridge/src/paragraph-line-cache.d.ts +152 -0
- package/dist/layout-engine/layout-bridge/src/performance-metrics.d.ts +249 -0
- package/dist/layout-engine/layout-bridge/src/pm-dom-fallback.d.ts +188 -0
- package/dist/layout-engine/layout-bridge/src/pm-position-validator.d.ts +100 -0
- package/dist/layout-engine/layout-bridge/src/position-hit.d.ts +167 -0
- package/dist/layout-engine/layout-bridge/src/remeasure.d.ts +75 -0
- package/dist/layout-engine/layout-bridge/src/resolveHeaderFooterTokens.d.ts +76 -0
- package/dist/layout-engine/layout-bridge/src/rtl-text-geometry.d.ts +34 -0
- package/dist/layout-engine/layout-bridge/src/run-visual-marks.d.ts +12 -0
- package/dist/layout-engine/layout-bridge/src/safety-net.d.ts +234 -0
- package/dist/layout-engine/layout-bridge/src/sectionAwareHeaderFooter.d.ts +15 -0
- package/dist/layout-engine/layout-bridge/src/table-handler.d.ts +86 -0
- package/dist/layout-engine/layout-bridge/src/text-boundaries.d.ts +17 -0
- package/dist/layout-engine/layout-bridge/src/text-measurement.d.ts +69 -0
- package/dist/layout-engine/layout-bridge/src/track-changes-handler.d.ts +90 -0
- package/dist/layout-engine/layout-bridge/src/tracked-changes-utils.d.ts +41 -0
- package/dist/layout-engine/layout-engine/src/anchors.d.ts +52 -0
- package/dist/layout-engine/layout-engine/src/column-balancing.d.ts +255 -0
- package/dist/layout-engine/layout-engine/src/column-utils.d.ts +1 -0
- package/dist/layout-engine/layout-engine/src/floating-objects.d.ts +60 -0
- package/dist/layout-engine/layout-engine/src/floating-table-anchor.d.ts +21 -0
- package/dist/layout-engine/layout-engine/src/index.d.ts +349 -0
- package/dist/layout-engine/layout-engine/src/layout-drawing.d.ts +60 -0
- package/dist/layout-engine/layout-engine/src/layout-image.d.ts +16 -0
- package/dist/layout-engine/layout-engine/src/layout-paragraph.d.ts +101 -0
- package/dist/layout-engine/layout-engine/src/layout-table.d.ts +71 -0
- package/dist/layout-engine/layout-engine/src/layout-textbox.d.ts +4 -0
- package/dist/layout-engine/layout-engine/src/layout-utils.d.ts +104 -0
- package/dist/layout-engine/layout-engine/src/normalize-header-footer-fragments.d.ts +45 -0
- package/dist/layout-engine/layout-engine/src/pageNumbering.d.ts +73 -0
- package/dist/layout-engine/layout-engine/src/paginator.d.ts +131 -0
- package/dist/layout-engine/layout-engine/src/paragraph-layout-eligibility.d.ts +1 -0
- package/dist/layout-engine/layout-engine/src/resolvePageRefs.d.ts +31 -0
- package/dist/layout-engine/layout-engine/src/resolvePageTokens.d.ts +82 -0
- package/dist/layout-engine/layout-engine/src/section-breaks.d.ts +98 -0
- package/dist/layout-engine/layout-engine/src/section-props.d.ts +65 -0
- package/dist/layout-engine/layout-engine/src/table-cell-slice.d.ts +98 -0
- package/dist/layout-engine/painters/dom/src/_test-utils.d.ts +21 -0
- package/dist/layout-engine/painters/dom/src/chart-renderer.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/constants.d.ts +10 -0
- package/dist/layout-engine/painters/dom/src/css-token.d.ts +10 -0
- package/dist/layout-engine/painters/dom/src/features/feature-registry.d.ts +41 -0
- package/dist/layout-engine/painters/dom/src/features/inline-direction/index.d.ts +22 -0
- package/dist/layout-engine/painters/dom/src/features/inline-direction/rtl-styles.d.ts +27 -0
- package/dist/layout-engine/painters/dom/src/features/inline-direction/run-direction.d.ts +75 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/accent.d.ts +25 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/bar.d.ts +16 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/box.d.ts +38 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/delimiter.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/equation-array.d.ts +19 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/fraction.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/function.d.ts +16 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/group-character.d.ts +26 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/index.d.ts +27 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/lower-limit.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/math-run.d.ts +47 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/matrix.d.ts +23 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/nary.d.ts +23 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/phantom.d.ts +17 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/pre-sub-superscript.d.ts +25 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/radical.d.ts +14 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/sub-superscript.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/subscript.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/superscript.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/upper-limit.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/index.d.ts +14 -0
- package/dist/layout-engine/painters/dom/src/features/math/omml-to-mathml.d.ts +18 -0
- package/dist/layout-engine/painters/dom/src/features/math/types.d.ts +41 -0
- package/dist/layout-engine/painters/dom/src/images/drawing-image.d.ts +5 -0
- package/dist/layout-engine/painters/dom/src/images/hyperlink.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/images/image-block.d.ts +15 -0
- package/dist/layout-engine/painters/dom/src/images/image-clip-path.d.ts +17 -0
- package/dist/layout-engine/painters/dom/src/images/image-fragment.d.ts +34 -0
- package/dist/layout-engine/painters/dom/src/images/image-selectors.d.ts +9 -0
- package/dist/layout-engine/painters/dom/src/images/types.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/index.d.ts +125 -0
- package/dist/layout-engine/painters/dom/src/page-content.d.ts +209 -0
- package/dist/layout-engine/painters/dom/src/paragraph/block-version.d.ts +8 -0
- package/dist/layout-engine/painters/dom/src/paragraph/borders/border-layer.d.ts +59 -0
- package/dist/layout-engine/painters/dom/src/paragraph/borders/group-analysis.d.ts +38 -0
- package/dist/layout-engine/painters/dom/src/paragraph/borders/index.d.ts +18 -0
- package/dist/layout-engine/painters/dom/src/paragraph/frame.d.ts +3 -0
- package/dist/layout-engine/painters/dom/src/paragraph/indentation.d.ts +25 -0
- package/dist/layout-engine/painters/dom/src/paragraph/list-marker.d.ts +51 -0
- package/dist/layout-engine/painters/dom/src/paragraph/marker-tracked-change.d.ts +34 -0
- package/dist/layout-engine/painters/dom/src/paragraph/renderParagraphContent.d.ts +87 -0
- package/dist/layout-engine/painters/dom/src/paragraph/renderParagraphFragment.d.ts +33 -0
- package/dist/layout-engine/painters/dom/src/paragraph/styles.d.ts +3 -0
- package/dist/layout-engine/painters/dom/src/paragraph-hash-utils.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/pm-position-validation.d.ts +149 -0
- package/dist/layout-engine/painters/dom/src/renderer.d.ts +681 -0
- package/dist/layout-engine/painters/dom/src/ruler/index.d.ts +41 -0
- package/dist/layout-engine/painters/dom/src/ruler/ruler-core.d.ts +195 -0
- package/dist/layout-engine/painters/dom/src/ruler/ruler-renderer.d.ts +97 -0
- package/dist/layout-engine/painters/dom/src/ruler/ruler-styles.d.ts +31 -0
- package/dist/layout-engine/painters/dom/src/runs/field-annotation-run.d.ts +14 -0
- package/dist/layout-engine/painters/dom/src/runs/font-synthesis.d.ts +1 -0
- package/dist/layout-engine/painters/dom/src/runs/formatting-marks.d.ts +3 -0
- package/dist/layout-engine/painters/dom/src/runs/hash.d.ts +82 -0
- package/dist/layout-engine/painters/dom/src/runs/image-run.d.ts +37 -0
- package/dist/layout-engine/painters/dom/src/runs/index.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/runs/links.d.ts +58 -0
- package/dist/layout-engine/painters/dom/src/runs/math-run.d.ts +7 -0
- package/dist/layout-engine/painters/dom/src/runs/render-line.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/runs/render-run.d.ts +12 -0
- package/dist/layout-engine/painters/dom/src/runs/tab-run.d.ts +66 -0
- package/dist/layout-engine/painters/dom/src/runs/text-run.d.ts +35 -0
- package/dist/layout-engine/painters/dom/src/runs/tracked-changes.d.ts +90 -0
- package/dist/layout-engine/painters/dom/src/runs/types.d.ts +67 -0
- package/dist/layout-engine/painters/dom/src/sdt/boundaries.d.ts +16 -0
- package/dist/layout-engine/painters/dom/src/sdt/container.d.ts +32 -0
- package/dist/layout-engine/painters/dom/src/sdt/dataset.d.ts +7 -0
- package/dist/layout-engine/painters/dom/src/sdt/inline.d.ts +9 -0
- package/dist/layout-engine/painters/dom/src/sdt/snapshot.d.ts +29 -0
- package/dist/layout-engine/painters/dom/src/styles.d.ts +71 -0
- package/dist/layout-engine/painters/dom/src/svg-utils.d.ts +101 -0
- package/dist/layout-engine/painters/dom/src/table/border-utils.d.ts +185 -0
- package/dist/layout-engine/painters/dom/src/table/grid-geometry.d.ts +69 -0
- package/dist/layout-engine/painters/dom/src/table/renderTableCell.d.ts +170 -0
- package/dist/layout-engine/painters/dom/src/table/renderTableFragment.d.ts +132 -0
- package/dist/layout-engine/painters/dom/src/table/renderTableRow.d.ts +146 -0
- package/dist/layout-engine/painters/dom/src/test-utils/normalize-line.d.ts +39 -0
- package/dist/layout-engine/painters/dom/src/utils/anchor-helpers.d.ts +3 -0
- package/dist/layout-engine/painters/dom/src/utils/apply-styles.d.ts +1 -0
- package/dist/layout-engine/painters/dom/src/utils/layout-identity.d.ts +9 -0
- package/dist/layout-engine/painters/dom/src/utils/source-anchor.d.ts +2 -0
- package/dist/layout-engine/style-engine/src/bench/resolveSdtMetadata.bench.d.ts +1 -0
- package/dist/layout-engine/style-engine/src/cascade.d.ts +43 -0
- package/dist/layout-engine/style-engine/src/index.d.ts +121 -0
- package/dist/layout-engine/style-engine/src/normalize/colors.d.ts +13 -0
- package/dist/layout-engine/style-engine/src/normalize/index.d.ts +13 -0
- package/dist/layout-engine/style-engine/src/normalize/paragraph-attrs.d.ts +3 -0
- package/dist/layout-engine/style-engine/src/normalize/run-attrs.d.ts +17 -0
- package/dist/layout-engine/style-engine/src/normalize/types.d.ts +36 -0
- package/dist/layout-engine/style-engine/src/normalize/units.d.ts +13 -0
- package/dist/layout-engine/style-engine/src/ooxml/index.d.ts +64 -0
- package/dist/layout-engine/style-engine/src/ooxml/numbering-types.d.ts +126 -0
- package/dist/layout-engine/style-engine/src/ooxml/styles-types.d.ts +363 -0
- package/dist/layout-engine/style-engine/src/ooxml/table-style-selection.d.ts +86 -0
- package/dist/layout-engine/style-engine/src/ooxml/types.d.ts +459 -0
- package/dist/layout-engine/style-engine/src/ooxml/word-style-model/parse-theme.d.ts +33 -0
- package/dist/layout-engine/style-engine/src/ooxml/word-style-model/parse-xml.d.ts +29 -0
- package/dist/public/ui-react.cjs +175 -0
- package/dist/public/ui-react.es.js +159 -0
- package/dist/public/ui.cjs +5 -0
- package/dist/public/ui.es.js +2 -0
- package/dist/shared/common/comments-types.d.ts +102 -0
- package/dist/shared/common/layout-constants.d.ts +7 -0
- package/dist/shared/common/list-marker-utils.d.ts +186 -0
- package/dist/shared/common/list-numbering/index.d.ts +16 -0
- package/dist/shared/font-system/src/activation.d.ts +64 -0
- package/dist/shared/font-system/src/bundled-manifest.d.ts +32 -0
- package/dist/shared/font-system/src/bundled.d.ts +41 -0
- package/dist/shared/font-system/src/document-font-options.d.ts +53 -0
- package/dist/shared/font-system/src/epoch.d.ts +6 -0
- package/dist/shared/font-system/src/font-offerings.d.ts +120 -0
- package/dist/shared/font-system/src/index.d.ts +35 -0
- package/dist/shared/font-system/src/os2.d.ts +30 -0
- package/dist/shared/font-system/src/registry.d.ts +188 -0
- package/dist/shared/font-system/src/report.d.ts +98 -0
- package/dist/shared/font-system/src/resolver.d.ts +215 -0
- package/dist/shared/font-system/src/substitution-evidence.d.ts +103 -0
- package/dist/shared/font-system/src/types.d.ts +128 -0
- package/dist/style.css +3316 -0
- package/dist/style.layered.css +3316 -0
- package/dist/superdoc/src/SuperDoc.vue.d.ts +88 -0
- package/dist/superdoc/src/cdn-entry.d.ts +2 -0
- package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +62 -0
- package/dist/superdoc/src/components/CommentsLayer/CommentHeader.vue.d.ts +26 -0
- package/dist/superdoc/src/components/CommentsLayer/CommentInput.vue.d.ts +19 -0
- package/dist/superdoc/src/components/CommentsLayer/CommentsDropdown.vue.d.ts +30 -0
- package/dist/superdoc/src/components/CommentsLayer/InternalDropdown.vue.d.ts +10 -0
- package/dist/superdoc/src/components/CommentsLayer/collect-removed-comment-ids.d.ts +1 -0
- package/dist/superdoc/src/components/CommentsLayer/collect-tracked-change-thread.d.ts +6 -0
- package/dist/superdoc/src/components/CommentsLayer/comment-schemas.d.ts +18 -0
- package/dist/superdoc/src/components/CommentsLayer/commentsList/commentsList.vue.d.ts +9 -0
- package/dist/superdoc/src/components/CommentsLayer/commentsList/super-comments-list.d.ts +21 -0
- package/dist/superdoc/src/components/CommentsLayer/floating-comment-positioning.d.ts +28 -0
- package/dist/superdoc/src/components/CommentsLayer/helpers.d.ts +7 -0
- package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +2 -0
- package/dist/superdoc/src/components/CommentsLayer/types.d.ts +3 -0
- package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +8 -0
- package/dist/superdoc/src/components/CommentsLayer/use-conversation.d.ts +22 -0
- package/dist/superdoc/src/components/CommentsLayer/use-floating-comment.d.ts +11 -0
- package/dist/superdoc/src/components/HtmlViewer/HtmlViewer.vue.d.ts +10 -0
- package/dist/superdoc/src/components/PdfViewer/PdfViewer.vue.d.ts +61 -0
- package/dist/superdoc/src/components/PdfViewer/PdfViewerDocument.vue.d.ts +21 -0
- package/dist/superdoc/src/components/PdfViewer/PdfViewerPage.vue.d.ts +24 -0
- package/dist/superdoc/src/components/Whiteboard/WhiteboardLayer.vue.d.ts +19 -0
- package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +17 -0
- package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +18 -0
- package/dist/superdoc/src/components/surfaces/FindReplaceSurface.vue.d.ts +19 -0
- package/dist/superdoc/src/components/surfaces/PasswordPromptSurface.vue.d.ts +17 -0
- package/dist/superdoc/src/components/surfaces/SurfaceDialog.vue.d.ts +12 -0
- package/dist/superdoc/src/components/surfaces/SurfaceExternalMount.vue.d.ts +19 -0
- package/dist/superdoc/src/components/surfaces/SurfaceFloating.vue.d.ts +10 -0
- package/dist/superdoc/src/components/surfaces/SurfaceHost.vue.d.ts +31 -0
- package/dist/superdoc/src/components/surfaces/focusable-selector.d.ts +5 -0
- package/dist/superdoc/src/composables/find-shortcut-owner.d.ts +32 -0
- package/dist/superdoc/src/composables/replace-continuation.d.ts +37 -0
- package/dist/superdoc/src/composables/use-ai.d.ts +10 -0
- package/dist/superdoc/src/composables/use-comment-small-screen.d.ts +10 -0
- package/dist/superdoc/src/composables/use-compact-comment-popover.d.ts +21 -0
- package/dist/superdoc/src/composables/use-document.d.ts +34 -0
- package/dist/superdoc/src/composables/use-field.d.ts +33 -0
- package/dist/superdoc/src/composables/use-find-replace.d.ts +83 -0
- package/dist/superdoc/src/composables/use-high-contrast-mode.d.ts +4 -0
- package/dist/superdoc/src/composables/use-link-popover.d.ts +221 -0
- package/dist/superdoc/src/composables/use-password-prompt.d.ts +33 -0
- package/dist/superdoc/src/composables/use-selected-text.d.ts +16 -0
- package/dist/superdoc/src/composables/use-viewport-fit.d.ts +50 -0
- package/dist/superdoc/src/composables/useUiFontFamily.d.ts +24 -0
- package/dist/superdoc/src/core/EventEmitter.d.ts +55 -0
- package/dist/superdoc/src/core/SuperDoc.d.ts +775 -0
- package/dist/superdoc/src/core/collaboration/collaboration-comments.d.ts +4 -0
- package/dist/superdoc/src/core/collaboration/collaboration.d.ts +28 -0
- package/dist/superdoc/src/core/collaboration/helpers.d.ts +8 -0
- package/dist/superdoc/src/core/collaboration/permissions.d.ts +19 -0
- package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +99 -0
- package/dist/superdoc/src/core/collaboration/room-overwrite.d.ts +22 -0
- package/dist/superdoc/src/core/collaboration/v2-awareness-bridge.d.ts +57 -0
- package/dist/superdoc/src/core/config/merge-defined.d.ts +35 -0
- package/dist/superdoc/src/core/config/normalize-interaction-config.d.ts +15 -0
- package/dist/superdoc/src/core/config/normalize-surfaces-config.d.ts +23 -0
- package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +62 -0
- package/dist/superdoc/src/core/create-app.d.ts +32 -0
- package/dist/superdoc/src/core/editor-runtime/conformance/fake-v2-runtime.d.ts +9 -0
- package/dist/superdoc/src/core/editor-runtime/editor-runtime-registry.d.ts +117 -0
- package/dist/superdoc/src/core/editor-runtime/index.d.ts +1 -0
- package/dist/superdoc/src/core/editor-runtime/root-marker.d.ts +33 -0
- package/dist/superdoc/src/core/editor-runtime/types.d.ts +405 -0
- package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +185 -0
- package/dist/superdoc/src/core/editor-runtime/v2/v2-session-shortcut-routes.d.ts +47 -0
- package/dist/superdoc/src/core/extensions/define.d.ts +56 -0
- package/dist/superdoc/src/core/extensions/index.d.ts +2 -0
- package/dist/superdoc/src/core/extensions/types.d.ts +519 -0
- package/dist/superdoc/src/core/helpers/export.d.ts +2 -0
- package/dist/superdoc/src/core/helpers/file.d.ts +43 -0
- package/dist/superdoc/src/core/helpers/normalize-track-changes-config.d.ts +60 -0
- package/dist/superdoc/src/core/helpers/normalize-user.d.ts +13 -0
- package/dist/superdoc/src/core/index.d.ts +1 -0
- package/dist/superdoc/src/core/pdf/helpers/constants.d.ts +2 -0
- package/dist/superdoc/src/core/pdf/helpers/floor.d.ts +1 -0
- package/dist/superdoc/src/core/pdf/helpers/range.d.ts +1 -0
- package/dist/superdoc/src/core/pdf/helpers/read-file.d.ts +1 -0
- package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +66 -0
- package/dist/superdoc/src/core/surface-manager.d.ts +90 -0
- package/dist/superdoc/src/core/theme/create-theme.d.ts +82 -0
- package/dist/superdoc/src/core/types/index.d.ts +3006 -0
- package/dist/superdoc/src/core/v2-integration/browser-peer-runtime.d.ts +3 -0
- package/dist/superdoc/src/core/v2-integration/cdn-engine-loader.d.ts +16 -0
- package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +97 -0
- package/dist/superdoc/src/core/whiteboard/Whiteboard.d.ts +247 -0
- package/dist/superdoc/src/core/whiteboard/WhiteboardPage.d.ts +251 -0
- package/dist/superdoc/src/core/whiteboard/WhiteboardRenderer.d.ts +2 -0
- package/dist/superdoc/src/core/whiteboard/helpers/createTextarea.d.ts +1 -0
- package/dist/superdoc/src/core/whiteboard/helpers/flattenPoints.d.ts +1 -0
- package/dist/superdoc/src/core/whiteboard/helpers/getRandomId.d.ts +1 -0
- package/dist/superdoc/src/helpers/collect-touched-tracked-change-ids.d.ts +11 -0
- package/dist/superdoc/src/helpers/comment-focus.d.ts +4 -0
- package/dist/superdoc/src/helpers/comment-small-screen.d.ts +14 -0
- package/dist/superdoc/src/helpers/deprecation.d.ts +26 -0
- package/dist/superdoc/src/helpers/floor.d.ts +1 -0
- package/dist/superdoc/src/helpers/group-changes.d.ts +1 -0
- package/dist/superdoc/src/helpers/interaction-trace.d.ts +26 -0
- package/dist/superdoc/src/helpers/selection-source.d.ts +1 -0
- package/dist/superdoc/src/helpers/transaction-touches-structural-change.d.ts +19 -0
- package/dist/superdoc/src/helpers/use-selection.d.ts +17 -0
- package/dist/superdoc/src/helpers/v2-author-required-rejection.d.ts +22 -0
- package/dist/superdoc/src/helpers/v2-remote-review-hydration.d.ts +12 -0
- package/dist/superdoc/src/helpers/v2-review-mutation-impact.d.ts +15 -0
- package/dist/superdoc/src/helpers/v2-review-mutation-reconciler.d.ts +19 -0
- package/dist/superdoc/src/helpers/v2-review-target.d.ts +7 -0
- package/dist/superdoc/src/helpers/v2-selection-sync.d.ts +12 -0
- package/dist/superdoc/src/helpers/v2-typing-mutation-event.d.ts +5 -0
- package/dist/superdoc/src/icons.d.ts +11 -0
- package/dist/superdoc/src/index.d.cts +13 -0
- package/dist/superdoc/src/index.d.ts +11 -0
- package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +21 -0
- package/dist/superdoc/src/internal/toolbar/built-in/AlignmentButtons.vue.d.ts +6 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ButtonGroup.vue.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/DocumentMode.vue.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/FontFamilyCombobox.vue.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/FontSizeCombobox.vue.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/IconGrid.vue.d.ts +14 -0
- package/dist/superdoc/src/internal/toolbar/built-in/IconGridRow.vue.d.ts +13 -0
- package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +37 -0
- package/dist/superdoc/src/internal/toolbar/built-in/LinkedStyle.vue.d.ts +12 -0
- package/dist/superdoc/src/internal/toolbar/built-in/OverflowMenu.vue.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/SdTooltip.vue.d.ts +34 -0
- package/dist/superdoc/src/internal/toolbar/built-in/StyleButtonsList.vue.d.ts +14 -0
- package/dist/superdoc/src/internal/toolbar/built-in/TableActions.vue.d.ts +8 -0
- package/dist/superdoc/src/internal/toolbar/built-in/TableGrid.vue.d.ts +6 -0
- package/dist/superdoc/src/internal/toolbar/built-in/Toolbar.vue.d.ts +4 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButton.vue.d.ts +24 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButtonIcon.vue.d.ts +11 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarComboBox.vue.d.ts +18 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarDropdown.vue.d.ts +38 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarSeparator.vue.d.ts +8 -0
- package/dist/superdoc/src/internal/toolbar/built-in/color-dropdown-helpers.d.ts +24 -0
- package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +102 -0
- package/dist/superdoc/src/internal/toolbar/built-in/default-items.d.ts +17 -0
- package/dist/superdoc/src/internal/toolbar/built-in/font-options.d.ts +1 -0
- package/dist/superdoc/src/internal/toolbar/built-in/font-typeahead.d.ts +11 -0
- package/dist/superdoc/src/internal/toolbar/built-in/format-negation.d.ts +5 -0
- package/dist/superdoc/src/internal/toolbar/built-in/general.d.ts +1 -0
- package/dist/superdoc/src/internal/toolbar/built-in/helpers.d.ts +5 -0
- package/dist/superdoc/src/internal/toolbar/built-in/list-style-buttons.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/scroll-helpers.d.ts +4 -0
- package/dist/superdoc/src/internal/toolbar/built-in/toolbar-focus-helpers.d.ts +1 -0
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarIcons.d.ts +76 -0
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarTexts.d.ts +58 -0
- package/dist/superdoc/src/internal/toolbar/built-in/url-safety.d.ts +8 -0
- package/dist/superdoc/src/internal/toolbar/built-in/use-toolbar-item.d.ts +48 -0
- package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +237 -0
- package/dist/superdoc/src/internal/toolbar/compatibility-catalog.d.ts +59 -0
- package/dist/superdoc/src/internal/toolbar/image-upload.d.ts +63 -0
- package/dist/superdoc/src/internal/toolbar/index.d.ts +10 -0
- package/dist/superdoc/src/main.d.ts +1 -0
- package/dist/superdoc/src/public/browser-document-api.d.ts +53 -0
- package/dist/superdoc/src/public/collaboration-upgrade-engine.d.cts +26 -0
- package/dist/superdoc/src/public/collaboration-upgrade-engine.d.ts +130 -0
- package/dist/superdoc/src/public/index.d.cts +359 -0
- package/dist/superdoc/src/public/index.d.ts +179 -0
- package/dist/superdoc/src/public/ui/commands.d.ts +249 -0
- package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +18 -0
- package/dist/superdoc/src/public/ui/entity-at.d.ts +29 -0
- package/dist/superdoc/src/public/ui/equality.d.ts +10 -0
- package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +36 -0
- package/dist/superdoc/src/public/ui/react.d.ts +81 -0
- package/dist/superdoc/src/public/ui/reasons.d.ts +99 -0
- package/dist/superdoc/src/public/ui/types.d.ts +1425 -0
- package/dist/superdoc/src/public/ui-react.d.cts +20 -0
- package/dist/superdoc/src/public/ui-react.d.ts +20 -0
- package/dist/superdoc/src/public/ui.d.cts +194 -0
- package/dist/superdoc/src/public/ui.d.ts +29 -0
- package/dist/superdoc/src/stores/comments-store.d.ts +676 -0
- package/dist/superdoc/src/stores/helpers/floating-comment-instances.d.ts +14 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +14 -0
- package/dist/superdoc/src/stores/hrbr-fields-store.d.ts +43 -0
- package/dist/superdoc/src/stores/superdoc-store.d.ts +2182 -0
- package/dist/superdoc.cjs +36521 -0
- package/dist/superdoc.es.js +36449 -0
- package/dist/word-layout/src/index.d.ts +64 -0
- package/dist/word-layout/src/list-marker.d.ts +68 -0
- package/dist/word-layout/src/marker-utils.d.ts +20 -0
- package/dist/word-layout/src/numbering-manager.d.ts +85 -0
- package/dist/word-layout/src/tab-layout.d.ts +193 -0
- package/dist/word-layout/src/types.d.ts +106 -0
- package/dist/word-layout/src/unit-conversions.d.ts +120 -0
- package/dist-cdn/style.layered.css +2 -0
- package/dist-cdn/superdoc.min.css +2 -0
- package/dist-cdn/superdoc.min.js +108 -0
- package/package.json +137 -24
- package/.npmignore +0 -4
- package/data.json +0 -17
- package/index.js +0 -2
- package/lib/Augmenter.js +0 -27
- package/lib/Runner.js +0 -80
- package/lib/Stopper.js +0 -71
- package/test/superdoc.js +0 -126
- package/utils/app.js +0 -18
- package/utils/server.js +0 -2
- package/web/index.js +0 -54
- package/web/public/style.css +0 -76
- package/web/views/index.ejs +0 -53
- package/web/views/layout.ejs +0 -13
- package/web/views/method.ejs +0 -59
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performance Metrics Collector
|
|
3
|
+
*
|
|
4
|
+
* Comprehensive metrics collection system for typing performance monitoring.
|
|
5
|
+
* Tracks latency, duration, and rate metrics with statistical analysis.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Per-metric sample collection with context
|
|
9
|
+
* - Statistical summaries (min, max, avg, percentiles)
|
|
10
|
+
* - Budget checking with configurable thresholds
|
|
11
|
+
* - Sample limit management to prevent memory bloat
|
|
12
|
+
* - Timer helpers for duration tracking
|
|
13
|
+
*
|
|
14
|
+
* Metrics tracked:
|
|
15
|
+
* - cursorUpdateLatency: Time to update cursor position (target <2ms)
|
|
16
|
+
* - p0LayoutDuration: P0 layout pass duration (target <5ms)
|
|
17
|
+
* - p1LayoutDuration: P1 layout pass duration (target <50ms)
|
|
18
|
+
* - workerRoundTrip: Worker message round-trip time (target <10ms)
|
|
19
|
+
* - layoutStaleness: Time layout is stale during typing (target <100ms)
|
|
20
|
+
* - geometryFallbackRate: Frequency of DOM measurement fallbacks
|
|
21
|
+
* - cacheMissRate: Cache miss frequency
|
|
22
|
+
* - droppedEvents: Number of dropped input events
|
|
23
|
+
*
|
|
24
|
+
* @module performance-metrics
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* Individual metric sample with timestamp and optional context.
|
|
28
|
+
*/
|
|
29
|
+
export interface MetricSample {
|
|
30
|
+
/** Timestamp when sample was recorded (ms since epoch) */
|
|
31
|
+
timestamp: number;
|
|
32
|
+
/** Measured value */
|
|
33
|
+
value: number;
|
|
34
|
+
/** Optional contextual information about this sample */
|
|
35
|
+
context?: Record<string, unknown>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Statistical summary of a metric's samples.
|
|
39
|
+
*/
|
|
40
|
+
export interface MetricSummary {
|
|
41
|
+
/** Number of samples */
|
|
42
|
+
count: number;
|
|
43
|
+
/** Minimum value */
|
|
44
|
+
min: number;
|
|
45
|
+
/** Maximum value */
|
|
46
|
+
max: number;
|
|
47
|
+
/** Average (mean) value */
|
|
48
|
+
avg: number;
|
|
49
|
+
/** 50th percentile (median) */
|
|
50
|
+
p50: number;
|
|
51
|
+
/** 95th percentile */
|
|
52
|
+
p95: number;
|
|
53
|
+
/** 99th percentile */
|
|
54
|
+
p99: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* All typing performance metrics tracked by the system.
|
|
58
|
+
*/
|
|
59
|
+
export interface TypingPerfMetrics {
|
|
60
|
+
/** Cursor position update latency samples */
|
|
61
|
+
cursorUpdateLatency: MetricSample[];
|
|
62
|
+
/** P0 (critical) layout pass duration samples */
|
|
63
|
+
p0LayoutDuration: MetricSample[];
|
|
64
|
+
/** P1 (high priority) layout pass duration samples */
|
|
65
|
+
p1LayoutDuration: MetricSample[];
|
|
66
|
+
/** Web Worker round-trip time samples */
|
|
67
|
+
workerRoundTrip: MetricSample[];
|
|
68
|
+
/** Layout staleness duration samples */
|
|
69
|
+
layoutStaleness: MetricSample[];
|
|
70
|
+
/** Geometry fallback rate samples */
|
|
71
|
+
geometryFallbackRate: MetricSample[];
|
|
72
|
+
/** Cache miss rate samples */
|
|
73
|
+
cacheMissRate: MetricSample[];
|
|
74
|
+
/** Dropped input events samples */
|
|
75
|
+
droppedEvents: MetricSample[];
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Budget violation report.
|
|
79
|
+
*/
|
|
80
|
+
export interface BudgetViolation {
|
|
81
|
+
/** Metric that exceeded budget */
|
|
82
|
+
metric: string;
|
|
83
|
+
/** Measured value that violated budget */
|
|
84
|
+
value: number;
|
|
85
|
+
/** Budget threshold that was exceeded */
|
|
86
|
+
budget: number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Performance metrics collector for typing optimization monitoring.
|
|
90
|
+
*
|
|
91
|
+
* Collects samples for various metrics and provides statistical analysis
|
|
92
|
+
* with budget checking.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```typescript
|
|
96
|
+
* const metrics = new PerformanceMetricsCollector({
|
|
97
|
+
* cursorUpdateLatency: 2,
|
|
98
|
+
* p0LayoutDuration: 5,
|
|
99
|
+
* });
|
|
100
|
+
*
|
|
101
|
+
* // Record a sample
|
|
102
|
+
* metrics.record('cursorUpdateLatency', 1.5);
|
|
103
|
+
*
|
|
104
|
+
* // Use a timer
|
|
105
|
+
* const endTimer = metrics.startTimer('p0LayoutDuration');
|
|
106
|
+
* // ... perform layout ...
|
|
107
|
+
* endTimer();
|
|
108
|
+
*
|
|
109
|
+
* // Get summary
|
|
110
|
+
* const summary = metrics.getSummary('cursorUpdateLatency');
|
|
111
|
+
* console.log(`P95: ${summary.p95}ms`);
|
|
112
|
+
*
|
|
113
|
+
* // Check budgets
|
|
114
|
+
* const violations = metrics.checkBudgets();
|
|
115
|
+
* if (violations.length > 0) {
|
|
116
|
+
* console.warn('Budget violations:', violations);
|
|
117
|
+
* }
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
export declare class PerformanceMetricsCollector {
|
|
121
|
+
private metrics;
|
|
122
|
+
private maxSamples;
|
|
123
|
+
private budgets;
|
|
124
|
+
/**
|
|
125
|
+
* Creates a new performance metrics collector.
|
|
126
|
+
*
|
|
127
|
+
* @param budgets - Performance budgets for each metric (in ms or rate)
|
|
128
|
+
* @param maxSamples - Maximum samples to retain per metric (default: 1000)
|
|
129
|
+
*/
|
|
130
|
+
constructor(budgets?: Partial<Record<keyof TypingPerfMetrics, number>>, maxSamples?: number);
|
|
131
|
+
/**
|
|
132
|
+
* Records a metric sample.
|
|
133
|
+
*
|
|
134
|
+
* Automatically manages sample buffer size by removing oldest samples
|
|
135
|
+
* when the limit is reached.
|
|
136
|
+
*
|
|
137
|
+
* @param metric - Metric key to record
|
|
138
|
+
* @param value - Measured value
|
|
139
|
+
* @param context - Optional contextual information
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* ```typescript
|
|
143
|
+
* collector.record('cursorUpdateLatency', 1.8, {
|
|
144
|
+
* position: 42,
|
|
145
|
+
* direction: 'forward',
|
|
146
|
+
* });
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
record(metric: keyof TypingPerfMetrics, value: number, context?: Record<string, unknown>): void;
|
|
150
|
+
/**
|
|
151
|
+
* Starts a timer for duration metrics.
|
|
152
|
+
*
|
|
153
|
+
* Returns a function that, when called, records the elapsed time.
|
|
154
|
+
*
|
|
155
|
+
* @param metric - Duration metric to time
|
|
156
|
+
* @returns Function to call when operation completes
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```typescript
|
|
160
|
+
* const endTimer = collector.startTimer('p0LayoutDuration');
|
|
161
|
+
* await performLayout();
|
|
162
|
+
* endTimer(); // Records elapsed time
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
startTimer(metric: keyof TypingPerfMetrics): () => void;
|
|
166
|
+
/**
|
|
167
|
+
* Gets statistical summary for a specific metric.
|
|
168
|
+
*
|
|
169
|
+
* @param metric - Metric key to summarize
|
|
170
|
+
* @returns Statistical summary including percentiles
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* ```typescript
|
|
174
|
+
* const summary = collector.getSummary('cursorUpdateLatency');
|
|
175
|
+
* console.log(`P95 latency: ${summary.p95.toFixed(2)}ms`);
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
getSummary(metric: keyof TypingPerfMetrics): MetricSummary;
|
|
179
|
+
/**
|
|
180
|
+
* Gets summaries for all metrics.
|
|
181
|
+
*
|
|
182
|
+
* @returns Record of all metric summaries
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```typescript
|
|
186
|
+
* const allSummaries = collector.getAllSummaries();
|
|
187
|
+
* for (const [metric, summary] of Object.entries(allSummaries)) {
|
|
188
|
+
* console.log(`${metric}: ${summary.avg.toFixed(2)}ms avg`);
|
|
189
|
+
* }
|
|
190
|
+
* ```
|
|
191
|
+
*/
|
|
192
|
+
getAllSummaries(): Record<keyof TypingPerfMetrics, MetricSummary>;
|
|
193
|
+
/**
|
|
194
|
+
* Checks if any metrics exceed their configured budgets.
|
|
195
|
+
*
|
|
196
|
+
* Uses P95 values for comparison against budgets.
|
|
197
|
+
*
|
|
198
|
+
* @returns Array of budget violations (empty if all within budget)
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```typescript
|
|
202
|
+
* const violations = collector.checkBudgets();
|
|
203
|
+
* if (violations.length > 0) {
|
|
204
|
+
* console.warn('Performance budgets exceeded:', violations);
|
|
205
|
+
* // Consider triggering fallback
|
|
206
|
+
* }
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
checkBudgets(): BudgetViolation[];
|
|
210
|
+
/**
|
|
211
|
+
* Exports all raw metric data.
|
|
212
|
+
*
|
|
213
|
+
* Useful for debugging and offline analysis.
|
|
214
|
+
*
|
|
215
|
+
* @returns Complete metrics data structure
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* ```typescript
|
|
219
|
+
* const data = collector.export();
|
|
220
|
+
* console.log(JSON.stringify(data, null, 2));
|
|
221
|
+
* ```
|
|
222
|
+
*/
|
|
223
|
+
export(): TypingPerfMetrics;
|
|
224
|
+
/**
|
|
225
|
+
* Clears all recorded metrics.
|
|
226
|
+
*
|
|
227
|
+
* Resets all sample arrays to empty state.
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* ```typescript
|
|
231
|
+
* collector.clear(); // Start fresh measurement period
|
|
232
|
+
* ```
|
|
233
|
+
*/
|
|
234
|
+
clear(): void;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Global singleton performance metrics collector instance.
|
|
238
|
+
*
|
|
239
|
+
* Configured with default performance budgets for typing optimization.
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* ```typescript
|
|
243
|
+
* import { perfMetrics } from './performance-metrics.js';
|
|
244
|
+
*
|
|
245
|
+
* perfMetrics.record('cursorUpdateLatency', 1.5);
|
|
246
|
+
* const summary = perfMetrics.getSummary('cursorUpdateLatency');
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
export declare const perfMetrics: PerformanceMetricsCollector;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProseMirror DOM Fallback
|
|
3
|
+
*
|
|
4
|
+
* Provides cursor positioning using ProseMirror's native DOM coordinate system
|
|
5
|
+
* when layout data is stale. Transforms PM's coordinates into paginated space.
|
|
6
|
+
*
|
|
7
|
+
* This is a fallback mechanism used when:
|
|
8
|
+
* - Layout is currently being recalculated
|
|
9
|
+
* - Layout version is behind PM document version
|
|
10
|
+
* - Need immediate cursor positioning before layout completes
|
|
11
|
+
*
|
|
12
|
+
* @module pm-dom-fallback
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Cursor position rectangle for rendering.
|
|
16
|
+
*/
|
|
17
|
+
export interface CursorRect {
|
|
18
|
+
/** Page index where cursor is located */
|
|
19
|
+
pageIndex: number;
|
|
20
|
+
/** X position within the page */
|
|
21
|
+
x: number;
|
|
22
|
+
/** Y position within the page */
|
|
23
|
+
y: number;
|
|
24
|
+
/** Height of the cursor line */
|
|
25
|
+
height: number;
|
|
26
|
+
/** Width of the selection rectangle (optional for cursor, required for selections) */
|
|
27
|
+
width?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Page transformation information for converting coordinates.
|
|
31
|
+
*/
|
|
32
|
+
export interface PageTransform {
|
|
33
|
+
/** Index of the page */
|
|
34
|
+
pageIndex: number;
|
|
35
|
+
/** X offset of the page in container */
|
|
36
|
+
x: number;
|
|
37
|
+
/** Y offset of the page in container */
|
|
38
|
+
y: number;
|
|
39
|
+
/** Scale factor applied to the page */
|
|
40
|
+
scale: number;
|
|
41
|
+
/**
|
|
42
|
+
* Height of the page in pixels (before scaling).
|
|
43
|
+
*
|
|
44
|
+
* **When Present:**
|
|
45
|
+
* - The page has a known, measured height (e.g., from layout calculation or DOM measurement)
|
|
46
|
+
* - Used to calculate page bottom boundary: pageBottom = y + height / scale
|
|
47
|
+
* - Enables accurate hit testing when determining which page contains a cursor
|
|
48
|
+
*
|
|
49
|
+
* **When Absent (undefined):**
|
|
50
|
+
* - Page height is unknown or not yet calculated
|
|
51
|
+
* - Falls back to a conservative default (e.g., 1000px) for coordinate transformation
|
|
52
|
+
* - May occur during initial layout before page heights are measured
|
|
53
|
+
* - May occur for pages that haven't been rendered yet
|
|
54
|
+
*
|
|
55
|
+
* **Impact on Cursor Visibility:**
|
|
56
|
+
* When height is absent, coordinate mapping uses a fallback value which may be incorrect
|
|
57
|
+
* for unusually tall or short pages. This can affect:
|
|
58
|
+
* - Cursor positioning accuracy when layout is stale
|
|
59
|
+
* - Page boundary detection for multi-page cursors
|
|
60
|
+
* - Scroll-to-cursor behavior near page boundaries
|
|
61
|
+
*
|
|
62
|
+
* **Recommendation:**
|
|
63
|
+
* Always provide height when available to ensure accurate cursor positioning. The fallback
|
|
64
|
+
* is safe but may result in minor positioning errors for non-standard page sizes.
|
|
65
|
+
*/
|
|
66
|
+
height?: number;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Minimal interface for ProseMirror EditorView.
|
|
70
|
+
* Only includes the methods we need for fallback positioning.
|
|
71
|
+
*/
|
|
72
|
+
export interface PmEditorView {
|
|
73
|
+
/**
|
|
74
|
+
* Get DOM coordinates for a PM position.
|
|
75
|
+
* Returns null if position is not currently rendered.
|
|
76
|
+
*/
|
|
77
|
+
coordsAtPos(pos: number): {
|
|
78
|
+
left: number;
|
|
79
|
+
top: number;
|
|
80
|
+
bottom: number;
|
|
81
|
+
} | null;
|
|
82
|
+
/**
|
|
83
|
+
* Get the DOM node for the editor.
|
|
84
|
+
*/
|
|
85
|
+
dom: HTMLElement;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* PmDomFallback provides cursor positioning using ProseMirror's DOM
|
|
89
|
+
* coordinate system when layout is stale.
|
|
90
|
+
*
|
|
91
|
+
* This class bridges between PM's viewport-relative coordinates and
|
|
92
|
+
* the paginated layout coordinate system.
|
|
93
|
+
*
|
|
94
|
+
* Usage:
|
|
95
|
+
* ```typescript
|
|
96
|
+
* const fallback = new PmDomFallback(pmView, getPageTransforms);
|
|
97
|
+
*
|
|
98
|
+
* // When layout is stale, use DOM-based positioning
|
|
99
|
+
* const cursorRect = fallback.getCursorRect(pmPos);
|
|
100
|
+
* if (cursorRect) {
|
|
101
|
+
* renderer.render(cursorRect);
|
|
102
|
+
* }
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
export declare class PmDomFallback {
|
|
106
|
+
private pmView;
|
|
107
|
+
private getPageTransforms;
|
|
108
|
+
/**
|
|
109
|
+
* Creates a new PmDomFallback instance.
|
|
110
|
+
*
|
|
111
|
+
* @param pmView - ProseMirror editor view
|
|
112
|
+
* @param getPageTransforms - Function to get current page transformations
|
|
113
|
+
*/
|
|
114
|
+
constructor(pmView: PmEditorView, getPageTransforms: () => PageTransform[]);
|
|
115
|
+
/**
|
|
116
|
+
* Get cursor rect using PM's coordsAtPos, transformed to page space.
|
|
117
|
+
* Use when layout is stale.
|
|
118
|
+
*
|
|
119
|
+
* @param pmPos - ProseMirror position
|
|
120
|
+
* @returns Cursor rectangle in page space, or null if position not rendered
|
|
121
|
+
*/
|
|
122
|
+
getCursorRect(pmPos: number): CursorRect | null;
|
|
123
|
+
/**
|
|
124
|
+
* Map PM coords to page-local coordinates.
|
|
125
|
+
*
|
|
126
|
+
* Takes viewport-relative coordinates from PM and transforms them
|
|
127
|
+
* into page-local coordinates accounting for:
|
|
128
|
+
* - Page positioning in the layout
|
|
129
|
+
* - Zoom/scale transformations
|
|
130
|
+
* - Multi-page layout
|
|
131
|
+
*
|
|
132
|
+
* **Behavioral Change (Selection Polish):**
|
|
133
|
+
* This function now returns null when the cursor is outside all pages, rather than
|
|
134
|
+
* falling back to the first page. This change improves cursor positioning accuracy
|
|
135
|
+
* when layout is stale.
|
|
136
|
+
*
|
|
137
|
+
* **Why null is preferred over fallback-to-first-page:**
|
|
138
|
+
* 1. **Accuracy:** When layout is stale, showing no cursor is better than showing it
|
|
139
|
+
* at the wrong position. A missing cursor prompts layout refresh; a misplaced cursor
|
|
140
|
+
* causes user confusion and incorrect editing.
|
|
141
|
+
* 2. **Temporary State:** Layout staleness is temporary - typically resolves within
|
|
142
|
+
* 100-200ms. Hiding the cursor briefly is less disruptive than showing it incorrectly.
|
|
143
|
+
* 3. **User Expectations:** Users expect the cursor to appear where they clicked. If we
|
|
144
|
+
* can't determine that position accurately, hiding it is more honest than guessing.
|
|
145
|
+
* 4. **Prevents Drift:** Fallback positioning can cause selection drift where the visual
|
|
146
|
+
* cursor and actual PM selection position diverge, leading to incorrect edits.
|
|
147
|
+
*
|
|
148
|
+
* **Impact on Cursor Visibility:**
|
|
149
|
+
* - Cursor may briefly disappear during layout recalculation (typically < 200ms)
|
|
150
|
+
* - Cursor will not appear when clicking in gaps between pages (expected behavior)
|
|
151
|
+
* - Cursor will not appear for positions outside the document bounds (expected behavior)
|
|
152
|
+
* - When layout catches up, cursor will reappear at the correct position
|
|
153
|
+
*
|
|
154
|
+
* **Migration Notes:**
|
|
155
|
+
* Code relying on the old fallback behavior should handle null returns gracefully:
|
|
156
|
+
* ```typescript
|
|
157
|
+
* const cursorRect = fallback.getCursorRect(pmPos);
|
|
158
|
+
* if (cursorRect) {
|
|
159
|
+
* renderer.render(cursorRect);
|
|
160
|
+
* } else {
|
|
161
|
+
* renderer.hide(); // Cursor is outside all pages - hide it
|
|
162
|
+
* }
|
|
163
|
+
* ```
|
|
164
|
+
*
|
|
165
|
+
* @param coords - PM viewport coordinates
|
|
166
|
+
* @returns Cursor rectangle in page space, or null if outside all pages (including gaps)
|
|
167
|
+
*/
|
|
168
|
+
mapToPageSpace(coords: {
|
|
169
|
+
left: number;
|
|
170
|
+
top: number;
|
|
171
|
+
bottom: number;
|
|
172
|
+
}): CursorRect | null;
|
|
173
|
+
/**
|
|
174
|
+
* Check if a PM position is currently visible in the viewport.
|
|
175
|
+
*
|
|
176
|
+
* @param pmPos - ProseMirror position
|
|
177
|
+
* @returns True if position is rendered and visible
|
|
178
|
+
*/
|
|
179
|
+
isPositionVisible(pmPos: number): boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Get selection rectangles using PM's DOM for a range.
|
|
182
|
+
*
|
|
183
|
+
* @param from - Start PM position
|
|
184
|
+
* @param to - End PM position
|
|
185
|
+
* @returns Array of cursor rectangles for the selection
|
|
186
|
+
*/
|
|
187
|
+
getSelectionRects(from: number, to: number): CursorRect[];
|
|
188
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { FlowBlock } from '../../contracts/src/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Result of PM position validation.
|
|
4
|
+
*/
|
|
5
|
+
export interface ValidationResult {
|
|
6
|
+
/** Whether validation passed */
|
|
7
|
+
valid: boolean;
|
|
8
|
+
/** Errors found during validation */
|
|
9
|
+
errors: ValidationError[];
|
|
10
|
+
/** Fraction of document covered by valid PM positions (0-1) */
|
|
11
|
+
coverage: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* An error in PM position continuity.
|
|
15
|
+
*/
|
|
16
|
+
export interface ValidationError {
|
|
17
|
+
/** Type of error */
|
|
18
|
+
type: 'gap' | 'overlap' | 'out_of_order' | 'missing';
|
|
19
|
+
/** Index of block where error occurred */
|
|
20
|
+
blockIndex: number;
|
|
21
|
+
/** Expected position range */
|
|
22
|
+
expected: {
|
|
23
|
+
start: number;
|
|
24
|
+
end: number;
|
|
25
|
+
};
|
|
26
|
+
/** Actual position range */
|
|
27
|
+
actual: {
|
|
28
|
+
start: number;
|
|
29
|
+
end: number;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* PmPositionValidator ensures PM position continuity across document blocks.
|
|
34
|
+
*/
|
|
35
|
+
export declare class PmPositionValidator {
|
|
36
|
+
/**
|
|
37
|
+
* Validate pmStart/pmEnd continuity across all blocks.
|
|
38
|
+
*
|
|
39
|
+
* @param blocks - Array of flow blocks to validate
|
|
40
|
+
* @returns Validation result with errors and coverage info
|
|
41
|
+
*/
|
|
42
|
+
validate(blocks: FlowBlock[]): ValidationResult;
|
|
43
|
+
/**
|
|
44
|
+
* Validate a subset of blocks for incremental validation.
|
|
45
|
+
*
|
|
46
|
+
* @param blocks - Array of flow blocks
|
|
47
|
+
* @param startIndex - Starting block index (inclusive)
|
|
48
|
+
* @param endIndex - Ending block index (exclusive)
|
|
49
|
+
* @returns Validation result
|
|
50
|
+
*/
|
|
51
|
+
validateRange(blocks: FlowBlock[], startIndex: number, endIndex: number): ValidationResult;
|
|
52
|
+
/**
|
|
53
|
+
* Attempt to repair gaps in pmStart/pmEnd by interpolating missing positions.
|
|
54
|
+
*
|
|
55
|
+
* @param blocks - Array of flow blocks
|
|
56
|
+
* @param errors - Validation errors to repair
|
|
57
|
+
* @returns Repaired blocks (new array, original unmodified)
|
|
58
|
+
*/
|
|
59
|
+
repair(blocks: FlowBlock[], errors: ValidationError[]): FlowBlock[];
|
|
60
|
+
/**
|
|
61
|
+
* Get coverage report for complex features.
|
|
62
|
+
*
|
|
63
|
+
* @param blocks - Array of flow blocks
|
|
64
|
+
* @returns Coverage statistics for complex features
|
|
65
|
+
*/
|
|
66
|
+
getFeatureCoverage(blocks: FlowBlock[]): {
|
|
67
|
+
trackedChanges: {
|
|
68
|
+
total: number;
|
|
69
|
+
covered: number;
|
|
70
|
+
};
|
|
71
|
+
tables: {
|
|
72
|
+
total: number;
|
|
73
|
+
covered: number;
|
|
74
|
+
};
|
|
75
|
+
embeds: {
|
|
76
|
+
total: number;
|
|
77
|
+
covered: number;
|
|
78
|
+
};
|
|
79
|
+
tokens: {
|
|
80
|
+
total: number;
|
|
81
|
+
covered: number;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Extract pmStart from a block.
|
|
86
|
+
*
|
|
87
|
+
* @param block - Flow block
|
|
88
|
+
* @returns PM start position or undefined
|
|
89
|
+
* @private
|
|
90
|
+
*/
|
|
91
|
+
private getBlockPmStart;
|
|
92
|
+
/**
|
|
93
|
+
* Extract pmEnd from a block.
|
|
94
|
+
*
|
|
95
|
+
* @param block - Flow block
|
|
96
|
+
* @returns PM end position or undefined
|
|
97
|
+
* @private
|
|
98
|
+
*/
|
|
99
|
+
private getBlockPmEnd;
|
|
100
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { FlowBlock, Layout, Page, Measure, Fragment, DrawingFragment, ImageFragment, Line, TableFragment, TableBlock, TableMeasure, ParagraphBlock, ParagraphMeasure, TextboxDrawing } from '../../contracts/src/index.js';
|
|
2
|
+
import { PageGeometryHelper } from './page-geometry-helper.js';
|
|
3
|
+
export type Point = {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
};
|
|
7
|
+
export type PageHit = {
|
|
8
|
+
pageIndex: number;
|
|
9
|
+
page: Layout['pages'][number];
|
|
10
|
+
};
|
|
11
|
+
export type FragmentHit = {
|
|
12
|
+
fragment: Fragment;
|
|
13
|
+
block: FlowBlock;
|
|
14
|
+
measure: Measure;
|
|
15
|
+
pageIndex: number;
|
|
16
|
+
pageY: number;
|
|
17
|
+
};
|
|
18
|
+
export type PositionHit = {
|
|
19
|
+
pos: number;
|
|
20
|
+
layoutEpoch: number;
|
|
21
|
+
blockId: string;
|
|
22
|
+
pageIndex: number;
|
|
23
|
+
column: number;
|
|
24
|
+
lineIndex: number;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Result of hit-testing a table fragment.
|
|
28
|
+
* Contains all information needed to identify the cell and paragraph at a click point.
|
|
29
|
+
*/
|
|
30
|
+
export type TableHitResult = {
|
|
31
|
+
/** The table fragment that was hit */
|
|
32
|
+
fragment: TableFragment;
|
|
33
|
+
/** The table block from the document structure */
|
|
34
|
+
block: TableBlock;
|
|
35
|
+
/** The table measurement data */
|
|
36
|
+
measure: TableMeasure;
|
|
37
|
+
/** Index of the page containing the hit */
|
|
38
|
+
pageIndex: number;
|
|
39
|
+
/** Row index of the hit cell (0-based) */
|
|
40
|
+
cellRowIndex: number;
|
|
41
|
+
/** Column index of the hit cell (0-based) */
|
|
42
|
+
cellColIndex: number;
|
|
43
|
+
/** The paragraph block inside the cell */
|
|
44
|
+
cellBlock: ParagraphBlock;
|
|
45
|
+
/** Measurement data for the paragraph inside the cell */
|
|
46
|
+
cellMeasure: ParagraphMeasure;
|
|
47
|
+
/** X coordinate relative to the cell content area */
|
|
48
|
+
localX: number;
|
|
49
|
+
/** Y coordinate relative to the cell content area */
|
|
50
|
+
localY: number;
|
|
51
|
+
/**
|
|
52
|
+
* Cumulative line count of preceding paragraph blocks in this cell.
|
|
53
|
+
* Used by callers to compute the hit paragraph's local first-line flag
|
|
54
|
+
* when the row continues from a prior page: `isFirstLineOfParagraph` is
|
|
55
|
+
* `lineIndex === 0 && max(0, cellLineStart - blockStartGlobal) === 0`,
|
|
56
|
+
* matching `renderTableCell.ts`'s `localStartLine` computation.
|
|
57
|
+
*/
|
|
58
|
+
blockStartGlobal: number;
|
|
59
|
+
};
|
|
60
|
+
export type TextboxHitResult = {
|
|
61
|
+
/** The textbox drawing fragment that was hit */
|
|
62
|
+
fragment: DrawingFragment;
|
|
63
|
+
/** The textbox drawing block from the document structure */
|
|
64
|
+
block: Extract<FlowBlock, {
|
|
65
|
+
kind: 'drawing';
|
|
66
|
+
drawingKind: 'textboxShape';
|
|
67
|
+
}>;
|
|
68
|
+
/** The drawing measurement data */
|
|
69
|
+
measure: Measure;
|
|
70
|
+
/** Index of the page containing the hit */
|
|
71
|
+
pageIndex: number;
|
|
72
|
+
/** The paragraph block inside the textbox */
|
|
73
|
+
contentBlock: ParagraphBlock;
|
|
74
|
+
/** Measurement data for the paragraph inside the textbox */
|
|
75
|
+
contentMeasure: ParagraphMeasure;
|
|
76
|
+
/** Paragraph index inside block.contentBlocks */
|
|
77
|
+
paragraphIndex: number;
|
|
78
|
+
/** X coordinate relative to the textbox content area */
|
|
79
|
+
localX: number;
|
|
80
|
+
/** Y coordinate relative to the paragraph content area */
|
|
81
|
+
localY: number;
|
|
82
|
+
/** Cumulative line count of preceding textbox paragraphs */
|
|
83
|
+
blockStartGlobal: number;
|
|
84
|
+
};
|
|
85
|
+
type AtomicFragment = DrawingFragment | ImageFragment;
|
|
86
|
+
export type GeometryPageHint = {
|
|
87
|
+
pageIndex: number;
|
|
88
|
+
pageRelativeY?: number;
|
|
89
|
+
};
|
|
90
|
+
export type ClickToPositionGeometryOptions = {
|
|
91
|
+
geometryHelper?: PageGeometryHelper;
|
|
92
|
+
pageHint?: GeometryPageHint;
|
|
93
|
+
};
|
|
94
|
+
export declare const isAtomicFragment: (fragment: Fragment) => fragment is AtomicFragment;
|
|
95
|
+
export declare const getAtomicPmRange: (fragment: AtomicFragment, block: FlowBlock) => {
|
|
96
|
+
pmStart?: number;
|
|
97
|
+
pmEnd?: number;
|
|
98
|
+
};
|
|
99
|
+
export declare const isRtlBlock: (block: FlowBlock) => boolean;
|
|
100
|
+
export declare const determineColumn: (layout: Layout, fragmentX: number, page?: Page, fragmentY?: number) => number;
|
|
101
|
+
export declare const determineTableColumn: (layout: Layout, fragment: TableFragment, page?: Page) => number;
|
|
102
|
+
/**
|
|
103
|
+
* Finds the line index at a given Y offset within a set of lines.
|
|
104
|
+
*/
|
|
105
|
+
export declare const findLineIndexAtY: (lines: Line[], offsetY: number, fromLine: number, toLine: number) => number | null;
|
|
106
|
+
/**
|
|
107
|
+
* Maps an X coordinate within a line to a ProseMirror position.
|
|
108
|
+
*/
|
|
109
|
+
export declare const mapPointToPm: (block: FlowBlock, line: Line, x: number, isRTL: boolean, availableWidthOverride?: number, alignmentOverride?: string) => number | null;
|
|
110
|
+
/**
|
|
111
|
+
* Finds the nearest paragraph or atomic fragment to a point on a page.
|
|
112
|
+
*/
|
|
113
|
+
export declare function snapToNearestFragment(pageHit: PageHit, blocks: FlowBlock[], measures: Measure[], pageRelativePoint: Point): FragmentHit | null;
|
|
114
|
+
export declare function findBlockIndexByFragmentId(blocks: FlowBlock[], fragmentBlockId: string, targetPmRange?: {
|
|
115
|
+
from: number;
|
|
116
|
+
to: number;
|
|
117
|
+
}): number;
|
|
118
|
+
/**
|
|
119
|
+
* Calculates cumulative Y position for a page (fallback when no geometry helper provided).
|
|
120
|
+
*/
|
|
121
|
+
export declare const calculatePageTopFallback: (layout: Layout, pageIndex: number) => number;
|
|
122
|
+
/**
|
|
123
|
+
* Find the page hit given layout and a coordinate relative to the layout container.
|
|
124
|
+
* Accounts for gaps between pages when calculating page boundaries.
|
|
125
|
+
*/
|
|
126
|
+
export declare function hitTestPage(layout: Layout, point: Point, geometryHelper?: PageGeometryHelper): PageHit | null;
|
|
127
|
+
/**
|
|
128
|
+
* Hit-test fragments within a page for a given point (page-relative coordinates).
|
|
129
|
+
*/
|
|
130
|
+
export declare function hitTestFragment(layout: Layout, pageHit: PageHit, blocks: FlowBlock[], measures: Measure[], point: Point): FragmentHit | null;
|
|
131
|
+
export declare const hitTestAtomicFragment: (pageHit: PageHit, blocks: FlowBlock[], measures: Measure[], point: Point) => FragmentHit | null;
|
|
132
|
+
/**
|
|
133
|
+
* Hit-test table fragments to find the cell and paragraph at a click point.
|
|
134
|
+
*/
|
|
135
|
+
export declare const hitTestTableFragment: (pageHit: PageHit, blocks: FlowBlock[], measures: Measure[], point: Point) => TableHitResult | null;
|
|
136
|
+
/**
|
|
137
|
+
* Walk the paragraph content of an already-resolved textbox fragment and return the
|
|
138
|
+
* paragraph hit at `point`. Callers that already hold a resolved fragment/block should
|
|
139
|
+
* call this directly instead of {@link hitTestTextboxFragment}, which would otherwise
|
|
140
|
+
* re-scan every page fragment and could resolve a different textbox for overlapping shapes.
|
|
141
|
+
*/
|
|
142
|
+
export declare const resolveTextboxContentHit: (fragment: DrawingFragment, block: TextboxDrawing, measure: Measure, pageIndex: number, point: Point) => TextboxHitResult | null;
|
|
143
|
+
/**
|
|
144
|
+
* Hit-test textbox drawing fragments to find the paragraph at a click point.
|
|
145
|
+
* Scans all page fragments by point — when the fragment and block are already resolved,
|
|
146
|
+
* call {@link resolveTextboxContentHit} directly to avoid resolving a different textbox
|
|
147
|
+
* for overlapping shapes.
|
|
148
|
+
*/
|
|
149
|
+
export declare const hitTestTextboxFragment: (pageHit: PageHit, blocks: FlowBlock[], measures: Measure[], point: Point) => TextboxHitResult | null;
|
|
150
|
+
/**
|
|
151
|
+
* Enriches a DOM-resolved PM position into a full PositionHit by searching layout
|
|
152
|
+
* metadata. Pure data lookup — no DOM reads.
|
|
153
|
+
*
|
|
154
|
+
* Extracted from the DOM-success path of the original `clickToPosition()`.
|
|
155
|
+
*/
|
|
156
|
+
export declare function resolvePositionHitFromDomPosition(layout: Layout, blocks: FlowBlock[], measures: Measure[], domPos: number, layoutEpoch: number): PositionHit;
|
|
157
|
+
/**
|
|
158
|
+
* Geometry-only hit testing. DOM-free — no `elementsFromPoint`, no `getBoundingClientRect`.
|
|
159
|
+
*
|
|
160
|
+
* When `options.pageHint` is provided, uses the hint's page index and optional
|
|
161
|
+
* page-relative Y instead of recomputing from geometry. This allows callers that
|
|
162
|
+
* have already done DOM page detection to pass their result through.
|
|
163
|
+
*
|
|
164
|
+
* Extracted from the geometry fallback path of the original `clickToPosition()`.
|
|
165
|
+
*/
|
|
166
|
+
export declare function clickToPositionGeometry(layout: Layout, blocks: FlowBlock[], measures: Measure[], containerPoint: Point, options?: ClickToPositionGeometryOptions): PositionHit | null;
|
|
167
|
+
export {};
|