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,73 @@
|
|
|
1
|
+
import { FontMetricsCache } from './font-metrics-cache.js';
|
|
2
|
+
import { ParagraphLineCache } from './paragraph-line-cache.js';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for cache warming.
|
|
5
|
+
*/
|
|
6
|
+
export interface WarmingConfig {
|
|
7
|
+
/** Font keys to pre-warm */
|
|
8
|
+
fonts: string[];
|
|
9
|
+
/** Page indices currently in viewport */
|
|
10
|
+
viewportPages: number[];
|
|
11
|
+
/** Whether to prefetch adjacent pages */
|
|
12
|
+
prefetchAdjacent: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Information about a paragraph for cache warming.
|
|
16
|
+
*/
|
|
17
|
+
export interface ParagraphWarmInfo {
|
|
18
|
+
/** Paragraph block index */
|
|
19
|
+
index: number;
|
|
20
|
+
/** Paragraph text content */
|
|
21
|
+
text: string;
|
|
22
|
+
/** Font key for this paragraph */
|
|
23
|
+
fontKey: string;
|
|
24
|
+
/** Maximum width for line breaking */
|
|
25
|
+
maxWidth: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* CacheWarmer proactively populates caches to improve performance.
|
|
29
|
+
*/
|
|
30
|
+
export declare class CacheWarmer {
|
|
31
|
+
private fontMetricsCache;
|
|
32
|
+
private paragraphLineCache;
|
|
33
|
+
private warmingProgress;
|
|
34
|
+
constructor(fontMetricsCache: FontMetricsCache, paragraphLineCache: ParagraphLineCache);
|
|
35
|
+
/**
|
|
36
|
+
* Warm caches on document load.
|
|
37
|
+
*
|
|
38
|
+
* @param config - Warming configuration
|
|
39
|
+
*/
|
|
40
|
+
warmOnLoad(config: WarmingConfig): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Warm caches for adjacent pages as user scrolls.
|
|
43
|
+
*
|
|
44
|
+
* @param currentPage - Current page index
|
|
45
|
+
*/
|
|
46
|
+
warmForScroll(_currentPage: number): void;
|
|
47
|
+
/**
|
|
48
|
+
* Pre-calculate line breaks for visible paragraphs.
|
|
49
|
+
*
|
|
50
|
+
* @param paragraphs - Array of paragraphs to warm
|
|
51
|
+
*/
|
|
52
|
+
precalculateLines(paragraphs: ParagraphWarmInfo[]): void;
|
|
53
|
+
/**
|
|
54
|
+
* Get warming progress for UI feedback.
|
|
55
|
+
*
|
|
56
|
+
* @returns Progress statistics
|
|
57
|
+
*/
|
|
58
|
+
getProgress(): {
|
|
59
|
+
fontsCached: number;
|
|
60
|
+
paragraphsCached: number;
|
|
61
|
+
total: number;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Reset warming progress counters.
|
|
65
|
+
*/
|
|
66
|
+
resetProgress(): void;
|
|
67
|
+
/**
|
|
68
|
+
* Estimate completion percentage.
|
|
69
|
+
*
|
|
70
|
+
* @returns Completion percentage (0-100)
|
|
71
|
+
*/
|
|
72
|
+
getCompletionPercentage(): number;
|
|
73
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { FlowBlock } from '../../contracts/src/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Generates a cache key hash from a block's content, incorporating text,
|
|
4
|
+
* formatting, and embedded block data.
|
|
5
|
+
*
|
|
6
|
+
* Text content is preserved verbatim without whitespace normalization. Different
|
|
7
|
+
* whitespace (multiple spaces, tabs, leading/trailing spaces) produces different
|
|
8
|
+
* text measurements and must generate distinct cache keys to prevent incorrect
|
|
9
|
+
* cache hits. See PR #1551 for context on the whitespace normalization bug.
|
|
10
|
+
*
|
|
11
|
+
* For image runs, includes the image source (first 50 chars) and dimensions to ensure
|
|
12
|
+
* cache invalidation when image properties change. This is critical for converted
|
|
13
|
+
* metafiles (WMF/EMF) where placeholder images may have different dimensions than
|
|
14
|
+
* the original, preventing stale cached measurements from being served.
|
|
15
|
+
*
|
|
16
|
+
* @param block - The flow block to generate a hash for
|
|
17
|
+
* @returns A string hash representing the block's run content and formatting
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Content identity used by the measure cache's key (P8.4: also the adoption
|
|
21
|
+
* key for previous-pass measures when block ids churn). Measures are a pure
|
|
22
|
+
* function of (content, constraints, font signature); this hash IS the
|
|
23
|
+
* content component of that key, so adopting a previous measure on hash
|
|
24
|
+
* equality is exactly as sound as a cache hit.
|
|
25
|
+
*/
|
|
26
|
+
export declare const hashMeasureContent: (block: FlowBlock) => string;
|
|
27
|
+
/**
|
|
28
|
+
* Cache statistics with LRU eviction tracking
|
|
29
|
+
*/
|
|
30
|
+
export type MeasureCacheStats = {
|
|
31
|
+
hits: number;
|
|
32
|
+
misses: number;
|
|
33
|
+
sets: number;
|
|
34
|
+
invalidations: number;
|
|
35
|
+
clears: number;
|
|
36
|
+
/**
|
|
37
|
+
* Number of entries evicted due to LRU policy
|
|
38
|
+
*/
|
|
39
|
+
evictions: number;
|
|
40
|
+
/**
|
|
41
|
+
* Current cache size (number of entries)
|
|
42
|
+
*/
|
|
43
|
+
size: number;
|
|
44
|
+
/**
|
|
45
|
+
* Estimated memory usage (bytes)
|
|
46
|
+
*/
|
|
47
|
+
memorySizeEstimate: number;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* LRU-enhanced MeasureCache
|
|
51
|
+
*
|
|
52
|
+
* Key improvements:
|
|
53
|
+
* 1. Bounded size: max 10,000 entries
|
|
54
|
+
* 2. LRU eviction: Evicts least recently used when full
|
|
55
|
+
* 3. O(1) access and eviction using Map insertion order
|
|
56
|
+
* 4. Memory usage estimation
|
|
57
|
+
* 5. Eviction statistics
|
|
58
|
+
*
|
|
59
|
+
* Performance characteristics:
|
|
60
|
+
* - get(): O(1) - Map lookup + delete + re-insert for LRU tracking
|
|
61
|
+
* - set(): O(1) - eviction (delete first key) + insert
|
|
62
|
+
* - invalidate(): O(n) - where n = number of keys matching blockId prefix
|
|
63
|
+
* - Memory: Bounded at 10K entries ~= 50-100MB
|
|
64
|
+
*/
|
|
65
|
+
export declare class MeasureCache<T> {
|
|
66
|
+
private cache;
|
|
67
|
+
private stats;
|
|
68
|
+
/**
|
|
69
|
+
* Retrieve a cached measure for the given block and dimensions.
|
|
70
|
+
* Returns undefined if the block is null/undefined, lacks an ID, or if no cached value exists.
|
|
71
|
+
*
|
|
72
|
+
* @param block - The flow block to look up (may be null/undefined)
|
|
73
|
+
* @param width - The width dimension for cache key
|
|
74
|
+
* @param height - The height dimension for cache key
|
|
75
|
+
* @returns The cached value or undefined
|
|
76
|
+
*/
|
|
77
|
+
get(block: FlowBlock | null | undefined, width: number, height: number, fontSignature?: string): T | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Store a measure in the cache for the given block and dimensions.
|
|
80
|
+
* Silently returns if the block is null/undefined or lacks an ID.
|
|
81
|
+
*
|
|
82
|
+
* @param block - The flow block to cache (may be null/undefined)
|
|
83
|
+
* @param width - The width dimension for cache key
|
|
84
|
+
* @param height - The height dimension for cache key
|
|
85
|
+
* @param value - The value to cache
|
|
86
|
+
*/
|
|
87
|
+
set(block: FlowBlock | null | undefined, width: number, height: number, value: T, fontSignature?: string): void;
|
|
88
|
+
/**
|
|
89
|
+
* Invalidates cached measurements for specific block IDs.
|
|
90
|
+
* Removes all cache entries whose keys start with any of the provided block IDs.
|
|
91
|
+
*
|
|
92
|
+
* @param blockIds - Array of block IDs to invalidate from the cache
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```typescript
|
|
96
|
+
* cache.invalidate(['block-123', 'block-456']);
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
invalidate(blockIds: string[]): void;
|
|
100
|
+
/**
|
|
101
|
+
* Clears all cached measurements and resets statistics.
|
|
102
|
+
* Use when performing a full document re-layout.
|
|
103
|
+
*/
|
|
104
|
+
clear(): void;
|
|
105
|
+
/**
|
|
106
|
+
* Resets cache statistics (hits, misses, sets) to zero.
|
|
107
|
+
* Does not clear cached values.
|
|
108
|
+
*/
|
|
109
|
+
resetStats(): void;
|
|
110
|
+
/**
|
|
111
|
+
* Returns current cache performance statistics.
|
|
112
|
+
* Useful for monitoring cache effectiveness.
|
|
113
|
+
*
|
|
114
|
+
* @returns Object containing hits, misses, sets, and hit rate
|
|
115
|
+
*/
|
|
116
|
+
getStats(): MeasureCacheStats;
|
|
117
|
+
/**
|
|
118
|
+
* Get current cache size (number of entries)
|
|
119
|
+
*/
|
|
120
|
+
getSize(): number;
|
|
121
|
+
/**
|
|
122
|
+
* Get maximum cache size
|
|
123
|
+
*/
|
|
124
|
+
getMaxSize(): number;
|
|
125
|
+
/**
|
|
126
|
+
* Check if cache is near capacity
|
|
127
|
+
*/
|
|
128
|
+
isNearCapacity(threshold?: number): boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Update size statistics
|
|
131
|
+
*/
|
|
132
|
+
private updateSizeStats;
|
|
133
|
+
/**
|
|
134
|
+
* Composes a cache key from block properties and dimensions.
|
|
135
|
+
* Validates and clamps dimensions to prevent memory exhaustion.
|
|
136
|
+
*
|
|
137
|
+
* @param block - The flow block to create a key for
|
|
138
|
+
* @param width - Width dimension (will be clamped to [0, MAX_DIMENSION])
|
|
139
|
+
* @param height - Height dimension (will be clamped to [0, MAX_DIMENSION])
|
|
140
|
+
* @returns Cache key string
|
|
141
|
+
*/
|
|
142
|
+
private composeKey;
|
|
143
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { FlowBlock, SectionMetadata } from '../../contracts/src/index.js';
|
|
2
|
+
import { HeaderFooterConstraints } from '../../layout-engine/src/index.js';
|
|
3
|
+
import { MeasureCache } from './cache.js';
|
|
4
|
+
import { HeaderFooterLayoutCache } from './layoutHeaderFooter.js';
|
|
5
|
+
/**
|
|
6
|
+
* Computes a hash for header/footer block content.
|
|
7
|
+
* Used to detect when header/footer content has changed.
|
|
8
|
+
*
|
|
9
|
+
* @param blocks - Header/footer blocks
|
|
10
|
+
* @returns Content hash string
|
|
11
|
+
*/
|
|
12
|
+
export declare function computeHeaderFooterContentHash(blocks: FlowBlock[]): string;
|
|
13
|
+
/**
|
|
14
|
+
* Computes a hash for section metadata.
|
|
15
|
+
* Used to detect when section numbering or properties have changed.
|
|
16
|
+
*
|
|
17
|
+
* @param sections - Section metadata array
|
|
18
|
+
* @returns Metadata hash string
|
|
19
|
+
*/
|
|
20
|
+
export declare function computeSectionMetadataHash(sections: SectionMetadata[]): string;
|
|
21
|
+
/**
|
|
22
|
+
* Computes a hash for header/footer constraints.
|
|
23
|
+
* Used to detect when layout constraints have changed.
|
|
24
|
+
*
|
|
25
|
+
* @param constraints - Header/footer constraints
|
|
26
|
+
* @returns Constraints hash string
|
|
27
|
+
*/
|
|
28
|
+
export declare function computeConstraintsHash(constraints: HeaderFooterConstraints): string;
|
|
29
|
+
/**
|
|
30
|
+
* Cache state tracker for header/footer layouts.
|
|
31
|
+
* Stores hashes of content, constraints, and metadata to detect changes.
|
|
32
|
+
*/
|
|
33
|
+
export declare class HeaderFooterCacheState {
|
|
34
|
+
private contentHashes;
|
|
35
|
+
private constraintsHash;
|
|
36
|
+
private sectionMetadataHash;
|
|
37
|
+
/**
|
|
38
|
+
* Checks if header/footer content has changed for a variant.
|
|
39
|
+
*
|
|
40
|
+
* @param variantKey - Unique key for the variant (e.g., 'header-default')
|
|
41
|
+
* @param blocks - Current blocks for the variant
|
|
42
|
+
* @returns True if content has changed
|
|
43
|
+
*/
|
|
44
|
+
hasContentChanged(variantKey: string, blocks: FlowBlock[]): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Checks if constraints have changed.
|
|
47
|
+
*
|
|
48
|
+
* @param constraints - Current constraints
|
|
49
|
+
* @returns True if constraints have changed
|
|
50
|
+
*/
|
|
51
|
+
hasConstraintsChanged(constraints: HeaderFooterConstraints): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Checks if section metadata has changed.
|
|
54
|
+
*
|
|
55
|
+
* @param sections - Current section metadata
|
|
56
|
+
* @returns True if metadata has changed
|
|
57
|
+
*/
|
|
58
|
+
hasSectionMetadataChanged(sections: SectionMetadata[]): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Resets all cached state.
|
|
61
|
+
* Called when performing a full cache clear.
|
|
62
|
+
*/
|
|
63
|
+
reset(): void;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Invalidates header/footer cache based on change detection.
|
|
67
|
+
*
|
|
68
|
+
* This function checks what has changed (content, constraints, metadata) and
|
|
69
|
+
* invalidates the appropriate cache entries. It uses the cache state tracker
|
|
70
|
+
* to detect changes between layout runs.
|
|
71
|
+
*
|
|
72
|
+
* @param cache - Header/footer layout cache
|
|
73
|
+
* @param cacheState - Cache state tracker
|
|
74
|
+
* @param headerBlocks - Current header blocks (optional)
|
|
75
|
+
* @param footerBlocks - Current footer blocks (optional)
|
|
76
|
+
* @param constraints - Current constraints
|
|
77
|
+
* @param sections - Current section metadata
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```typescript
|
|
81
|
+
* invalidateHeaderFooterCache(
|
|
82
|
+
* cache,
|
|
83
|
+
* cacheState,
|
|
84
|
+
* headerBlocks,
|
|
85
|
+
* footerBlocks,
|
|
86
|
+
* constraints,
|
|
87
|
+
* sections
|
|
88
|
+
* );
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
export declare function invalidateHeaderFooterCache(cache: HeaderFooterLayoutCache, cacheState: HeaderFooterCacheState, headerBlocks?: {
|
|
92
|
+
default?: FlowBlock[];
|
|
93
|
+
first?: FlowBlock[];
|
|
94
|
+
even?: FlowBlock[];
|
|
95
|
+
odd?: FlowBlock[];
|
|
96
|
+
}, footerBlocks?: {
|
|
97
|
+
default?: FlowBlock[];
|
|
98
|
+
first?: FlowBlock[];
|
|
99
|
+
even?: FlowBlock[];
|
|
100
|
+
odd?: FlowBlock[];
|
|
101
|
+
}, constraints?: HeaderFooterConstraints, sections?: SectionMetadata[]): void;
|
|
102
|
+
/**
|
|
103
|
+
* Invalidates body measure cache for blocks affected by token resolution.
|
|
104
|
+
*
|
|
105
|
+
* This should be called after page token resolution to ensure re-measurement
|
|
106
|
+
* of blocks with resolved tokens.
|
|
107
|
+
*
|
|
108
|
+
* @param cache - Body measure cache
|
|
109
|
+
* @param affectedBlockIds - Set of block IDs affected by token resolution
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```typescript
|
|
113
|
+
* const result = resolvePageNumberTokens(layout, blocks, measures, numberingCtx);
|
|
114
|
+
* invalidateBodyMeasureCache(measureCache, result.affectedBlockIds);
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
export declare function invalidateBodyMeasureCache<T>(cache: MeasureCache<T>, affectedBlockIds: Set<string>): void;
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor Renderer
|
|
3
|
+
*
|
|
4
|
+
* Renders cursor and selection overlays as positioned div elements.
|
|
5
|
+
* Provides smooth cursor blinking and instant updates without DOM measurements.
|
|
6
|
+
*
|
|
7
|
+
* @module cursor-renderer
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Cursor position rectangle for rendering.
|
|
11
|
+
*/
|
|
12
|
+
export interface CursorRect {
|
|
13
|
+
/** Page index where cursor is located */
|
|
14
|
+
pageIndex: number;
|
|
15
|
+
/** X position within the page */
|
|
16
|
+
x: number;
|
|
17
|
+
/** Y position within the page */
|
|
18
|
+
y: number;
|
|
19
|
+
/** Height of the cursor line */
|
|
20
|
+
height: number;
|
|
21
|
+
/**
|
|
22
|
+
* Width of the selection rectangle.
|
|
23
|
+
*
|
|
24
|
+
* **Semantics:**
|
|
25
|
+
* - When undefined: Represents a collapsed cursor (zero-width selection). Rendered as a thin
|
|
26
|
+
* vertical line at the cursor position. Typically uses the configured cursorWidth (default 2px).
|
|
27
|
+
* - When defined: Represents a selection span (from !== to). Width indicates the horizontal
|
|
28
|
+
* extent of selected text or content.
|
|
29
|
+
*
|
|
30
|
+
* **Use Cases:**
|
|
31
|
+
* - Cursor rendering: width should be undefined or omitted
|
|
32
|
+
* - Selection highlighting: width should be the measured pixel width of the selected text/content
|
|
33
|
+
* - Collapsed selections: Some renderers treat width=0 as equivalent to undefined
|
|
34
|
+
*
|
|
35
|
+
* **Rendering Behavior:**
|
|
36
|
+
* The CursorRenderer uses this field to distinguish between cursor (thin line) and selection
|
|
37
|
+
* (filled rectangle). When width is undefined, it falls back to cursorWidth for rendering.
|
|
38
|
+
*/
|
|
39
|
+
width?: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Configuration options for cursor rendering.
|
|
43
|
+
*/
|
|
44
|
+
export interface CursorRendererOptions {
|
|
45
|
+
/** Container element to render cursor within */
|
|
46
|
+
container: HTMLElement;
|
|
47
|
+
/** Width of cursor line in pixels (default: 2) */
|
|
48
|
+
cursorWidth?: number;
|
|
49
|
+
/** Color of cursor (default: 'black') */
|
|
50
|
+
cursorColor?: string;
|
|
51
|
+
/** Cursor blink rate in milliseconds (default: 530) */
|
|
52
|
+
blinkRate?: number;
|
|
53
|
+
/** Selection background color (default: 'rgba(0, 123, 255, 0.3)') */
|
|
54
|
+
selectionColor?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* CursorRenderer renders cursor and selection overlays using positioned divs.
|
|
58
|
+
*
|
|
59
|
+
* This approach avoids browser's native cursor rendering and provides:
|
|
60
|
+
* - Instant cursor updates without DOM measurements
|
|
61
|
+
* - Precise positioning using calculated coordinates
|
|
62
|
+
* - Smooth cursor blinking
|
|
63
|
+
* - Multi-rect selection rendering
|
|
64
|
+
*
|
|
65
|
+
* Usage:
|
|
66
|
+
* ```typescript
|
|
67
|
+
* const renderer = new CursorRenderer({
|
|
68
|
+
* container: editorElement,
|
|
69
|
+
* cursorWidth: 2,
|
|
70
|
+
* cursorColor: 'black',
|
|
71
|
+
* blinkRate: 530
|
|
72
|
+
* });
|
|
73
|
+
*
|
|
74
|
+
* // Render cursor at calculated position
|
|
75
|
+
* renderer.render(cursorRect);
|
|
76
|
+
*
|
|
77
|
+
* // Render selection
|
|
78
|
+
* renderer.renderSelection(selectionRects);
|
|
79
|
+
*
|
|
80
|
+
* // Clean up
|
|
81
|
+
* renderer.destroy();
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
export declare class CursorRenderer {
|
|
85
|
+
private container;
|
|
86
|
+
private cursorWidth;
|
|
87
|
+
private cursorColor;
|
|
88
|
+
private blinkRate;
|
|
89
|
+
private selectionColor;
|
|
90
|
+
private cursorElement;
|
|
91
|
+
private selectionElements;
|
|
92
|
+
private blinkInterval;
|
|
93
|
+
private isBlinkVisible;
|
|
94
|
+
private isCursorVisible;
|
|
95
|
+
/**
|
|
96
|
+
* Creates a new CursorRenderer instance.
|
|
97
|
+
*
|
|
98
|
+
* @param options - Cursor rendering options
|
|
99
|
+
*/
|
|
100
|
+
constructor(options: CursorRendererOptions);
|
|
101
|
+
/**
|
|
102
|
+
* Initialize the cursor DOM element.
|
|
103
|
+
* @private
|
|
104
|
+
*/
|
|
105
|
+
private initializeCursorElement;
|
|
106
|
+
/**
|
|
107
|
+
* Render cursor at calculated position.
|
|
108
|
+
*
|
|
109
|
+
* @param rect - Cursor rectangle or null to hide cursor
|
|
110
|
+
*/
|
|
111
|
+
render(rect: CursorRect | null): void;
|
|
112
|
+
/**
|
|
113
|
+
* Render selection rectangles.
|
|
114
|
+
*
|
|
115
|
+
* Creates or updates div elements for each selection rectangle.
|
|
116
|
+
*
|
|
117
|
+
* @param rects - Array of selection rectangles
|
|
118
|
+
*/
|
|
119
|
+
renderSelection(rects: CursorRect[]): void;
|
|
120
|
+
/**
|
|
121
|
+
* Show or hide the cursor.
|
|
122
|
+
*
|
|
123
|
+
* @param visible - Whether cursor should be visible
|
|
124
|
+
*/
|
|
125
|
+
setVisible(visible: boolean): void;
|
|
126
|
+
/**
|
|
127
|
+
* Start cursor blink animation.
|
|
128
|
+
*/
|
|
129
|
+
startBlink(): void;
|
|
130
|
+
/**
|
|
131
|
+
* Stop cursor blink animation.
|
|
132
|
+
*/
|
|
133
|
+
stopBlink(): void;
|
|
134
|
+
/**
|
|
135
|
+
* Reset blink animation (show cursor and restart timer).
|
|
136
|
+
* Call this when cursor moves to provide immediate visual feedback.
|
|
137
|
+
* @private
|
|
138
|
+
*/
|
|
139
|
+
private resetBlink;
|
|
140
|
+
/**
|
|
141
|
+
* Update cursor visibility based on blink state.
|
|
142
|
+
* @private
|
|
143
|
+
*/
|
|
144
|
+
private updateBlinkState;
|
|
145
|
+
/**
|
|
146
|
+
* Update cursor color.
|
|
147
|
+
*
|
|
148
|
+
* @param color - New cursor color
|
|
149
|
+
*/
|
|
150
|
+
setCursorColor(color: string): void;
|
|
151
|
+
/**
|
|
152
|
+
* Update selection color.
|
|
153
|
+
*
|
|
154
|
+
* @param color - New selection color
|
|
155
|
+
*/
|
|
156
|
+
setSelectionColor(color: string): void;
|
|
157
|
+
/**
|
|
158
|
+
* Update cursor width.
|
|
159
|
+
*
|
|
160
|
+
* @param width - New cursor width in pixels
|
|
161
|
+
*/
|
|
162
|
+
setCursorWidth(width: number): void;
|
|
163
|
+
/**
|
|
164
|
+
* Update blink rate.
|
|
165
|
+
*
|
|
166
|
+
* @param rate - New blink rate in milliseconds
|
|
167
|
+
*/
|
|
168
|
+
setBlinkRate(rate: number): void;
|
|
169
|
+
/**
|
|
170
|
+
* Clean up and remove all cursor and selection elements.
|
|
171
|
+
*/
|
|
172
|
+
destroy(): void;
|
|
173
|
+
/**
|
|
174
|
+
* Check if cursor is currently visible (not hidden by user).
|
|
175
|
+
*
|
|
176
|
+
* @returns True if cursor is set to visible
|
|
177
|
+
*/
|
|
178
|
+
isVisible(): boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Check if cursor is currently blinking.
|
|
181
|
+
*
|
|
182
|
+
* @returns True if blink animation is running
|
|
183
|
+
*/
|
|
184
|
+
isBlinking(): boolean;
|
|
185
|
+
/**
|
|
186
|
+
* Get current cursor position.
|
|
187
|
+
*
|
|
188
|
+
* @returns Current cursor rectangle or null if not rendered
|
|
189
|
+
*/
|
|
190
|
+
getCurrentPosition(): {
|
|
191
|
+
x: number;
|
|
192
|
+
y: number;
|
|
193
|
+
height: number;
|
|
194
|
+
} | null;
|
|
195
|
+
/**
|
|
196
|
+
* Get count of currently rendered selection rectangles.
|
|
197
|
+
*
|
|
198
|
+
* @returns Number of selection rects
|
|
199
|
+
*/
|
|
200
|
+
getSelectionCount(): number;
|
|
201
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Debounced Pass Manager
|
|
3
|
+
*
|
|
4
|
+
* Manages debouncing of expensive update passes during document editing to improve
|
|
5
|
+
* typing performance. Allows deferring non-critical operations until typing pauses.
|
|
6
|
+
*
|
|
7
|
+
* Debouncing Strategy:
|
|
8
|
+
* 1. Register expensive passes with delays and priorities
|
|
9
|
+
* 2. Trigger passes during edits (starts/resets debounce timers)
|
|
10
|
+
* 3. Execute passes only after debounce delay expires
|
|
11
|
+
* 4. Cancel pending passes when needed
|
|
12
|
+
*
|
|
13
|
+
* Common Debounced Passes:
|
|
14
|
+
* - Header/footer updates (500ms)
|
|
15
|
+
* - List renumbering (100ms)
|
|
16
|
+
* - Cross-reference updates (2000ms)
|
|
17
|
+
* - Page number updates (500ms)
|
|
18
|
+
* - Footnote layout (200ms)
|
|
19
|
+
*
|
|
20
|
+
* @module debounced-passes
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Configuration for a debounced pass.
|
|
24
|
+
*/
|
|
25
|
+
export interface DebouncedPass {
|
|
26
|
+
/** Unique identifier for this pass */
|
|
27
|
+
id: string;
|
|
28
|
+
/** Debounce delay in milliseconds */
|
|
29
|
+
delay: number;
|
|
30
|
+
/** Priority for execution ordering (higher = earlier) */
|
|
31
|
+
priority: number;
|
|
32
|
+
/** Function to execute when debounce expires */
|
|
33
|
+
execute: () => void | Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* DebouncedPassManager coordinates the execution of expensive layout passes
|
|
37
|
+
* by debouncing them during typing bursts.
|
|
38
|
+
*
|
|
39
|
+
* This ensures a responsive typing experience while still updating document
|
|
40
|
+
* features like headers, footers, and cross-references once editing pauses.
|
|
41
|
+
*/
|
|
42
|
+
export declare class DebouncedPassManager {
|
|
43
|
+
private passes;
|
|
44
|
+
private timers;
|
|
45
|
+
private pendingExecutions;
|
|
46
|
+
/**
|
|
47
|
+
* Register a debounced pass.
|
|
48
|
+
*
|
|
49
|
+
* @param pass - Pass configuration
|
|
50
|
+
*/
|
|
51
|
+
register(pass: DebouncedPass): void;
|
|
52
|
+
/**
|
|
53
|
+
* Trigger a pass, starting or resetting its debounce timer.
|
|
54
|
+
*
|
|
55
|
+
* Example debounce delays:
|
|
56
|
+
* - Header/footer updates: 500ms
|
|
57
|
+
* - List renumbering: 100ms
|
|
58
|
+
* - Cross-reference updates: 2000ms
|
|
59
|
+
* - Page number updates: 500ms
|
|
60
|
+
* - Footnote layout: 200ms
|
|
61
|
+
*
|
|
62
|
+
* @param passId - ID of the pass to trigger
|
|
63
|
+
*/
|
|
64
|
+
trigger(passId: string): void;
|
|
65
|
+
/**
|
|
66
|
+
* Cancel a pending pass execution.
|
|
67
|
+
*
|
|
68
|
+
* @param passId - ID of the pass to cancel
|
|
69
|
+
*/
|
|
70
|
+
cancel(passId: string): void;
|
|
71
|
+
/**
|
|
72
|
+
* Cancel all pending pass executions.
|
|
73
|
+
*/
|
|
74
|
+
cancelAll(): void;
|
|
75
|
+
/**
|
|
76
|
+
* Check if a specific pass is currently pending.
|
|
77
|
+
*
|
|
78
|
+
* @param passId - ID of the pass to check
|
|
79
|
+
* @returns True if the pass is pending execution
|
|
80
|
+
*/
|
|
81
|
+
isPending(passId: string): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Get the number of pending pass executions.
|
|
84
|
+
*
|
|
85
|
+
* @returns Count of passes waiting to execute
|
|
86
|
+
*/
|
|
87
|
+
getPendingCount(): number;
|
|
88
|
+
/**
|
|
89
|
+
* Execute a pass immediately.
|
|
90
|
+
* Clears the timer and pending state.
|
|
91
|
+
*
|
|
92
|
+
* @param passId - ID of the pass to execute
|
|
93
|
+
* @private
|
|
94
|
+
*/
|
|
95
|
+
private executePass;
|
|
96
|
+
/**
|
|
97
|
+
* Unregister a pass.
|
|
98
|
+
*
|
|
99
|
+
* @param passId - ID of the pass to unregister
|
|
100
|
+
*/
|
|
101
|
+
unregister(passId: string): void;
|
|
102
|
+
/**
|
|
103
|
+
* Get all registered pass IDs.
|
|
104
|
+
*
|
|
105
|
+
* @returns Array of registered pass IDs
|
|
106
|
+
*/
|
|
107
|
+
getRegisteredPasses(): string[];
|
|
108
|
+
/**
|
|
109
|
+
* Clear all registrations and timers.
|
|
110
|
+
*/
|
|
111
|
+
clear(): void;
|
|
112
|
+
/**
|
|
113
|
+
* Get pass configuration for a specific pass.
|
|
114
|
+
*
|
|
115
|
+
* @param passId - ID of the pass
|
|
116
|
+
* @returns Pass configuration if registered, undefined otherwise
|
|
117
|
+
*/
|
|
118
|
+
getPass(passId: string): DebouncedPass | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Trigger all pending passes immediately without waiting for debounce.
|
|
121
|
+
* Useful when forcing a full update (e.g., before saving).
|
|
122
|
+
*/
|
|
123
|
+
flushAll(): Promise<void>;
|
|
124
|
+
/**
|
|
125
|
+
* Trigger a specific pass immediately without waiting for debounce.
|
|
126
|
+
*
|
|
127
|
+
* @param passId - ID of the pass to flush
|
|
128
|
+
*/
|
|
129
|
+
flush(passId: string): Promise<void>;
|
|
130
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { FlowBlock } from '../../contracts/src/index.js';
|
|
2
|
+
export type DirtyRegion = {
|
|
3
|
+
firstDirtyIndex: number;
|
|
4
|
+
lastStableIndex: number;
|
|
5
|
+
insertedBlockIds: string[];
|
|
6
|
+
deletedBlockIds: string[];
|
|
7
|
+
/**
|
|
8
|
+
* Existing blocks whose render-relevant content changed. This is distinct
|
|
9
|
+
* from insertion/deletion churn and lets pagination establish the complete
|
|
10
|
+
* affected frontier without guessing from only the first dirty ordinal.
|
|
11
|
+
*/
|
|
12
|
+
changedBlockIds: string[];
|
|
13
|
+
stableBlockIds: Set<string>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Computes dirty regions between two versions of a document's flow blocks.
|
|
17
|
+
*
|
|
18
|
+
* Identifies which blocks have changed, been added, or removed, and determines
|
|
19
|
+
* the minimal region that needs to be re-laid out. Uses block IDs and tracked
|
|
20
|
+
* change metadata to detect modifications.
|
|
21
|
+
*
|
|
22
|
+
* @param previous - Previous version of flow blocks
|
|
23
|
+
* @param next - New version of flow blocks
|
|
24
|
+
* @returns DirtyRegion describing the extent of changes
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* const region = computeDirtyRegions(oldBlocks, newBlocks);
|
|
29
|
+
* if (region.isEntireDocument) {
|
|
30
|
+
* relayoutAll();
|
|
31
|
+
* } else {
|
|
32
|
+
* relayoutRange(region.firstDirtyIndex, region.lastDirtyIndex);
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare const computeDirtyRegions: (previous: FlowBlock[], next: FlowBlock[]) => DirtyRegion;
|