superdoc 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +337 -0
- package/LICENSE +661 -0
- package/NOTICE +8 -0
- package/README.md +107 -0
- package/dist/chunks/FindReplaceSurface-BEW-1NhM.es.js +344 -0
- package/dist/chunks/FindReplaceSurface-DLxnCQOB.cjs +346 -0
- package/dist/chunks/PasswordPromptSurface-BA6HHqEa.es.js +111 -0
- package/dist/chunks/PasswordPromptSurface-DMbfDvpQ.cjs +113 -0
- package/dist/chunks/PdfViewer-CNOtyS-I.es.js +531 -0
- package/dist/chunks/PdfViewer-CoFiGAhm.cjs +535 -0
- package/dist/chunks/_plugin-vue_export-helper-BTwbGDKw.cjs +11 -0
- package/dist/chunks/_plugin-vue_export-helper-CInC0bKI.es.js +6 -0
- package/dist/chunks/blank-docx-CJAXnJKp.es.js +2 -0
- package/dist/chunks/blank-docx-DA-G-3VB.cjs +7 -0
- package/dist/chunks/constants-CY3R3_kF.es.js +3 -0
- package/dist/chunks/constants-sbCZ2O_A.cjs +14 -0
- package/dist/chunks/create-super-doc-ui-CXCqHc2m.cjs +9451 -0
- package/dist/chunks/create-super-doc-ui-fxF2Q8Ib.es.js +9188 -0
- package/dist/chunks/eventemitter3-B60Fsz-a.es.js +131 -0
- package/dist/chunks/eventemitter3-DCfwFVNn.cjs +137 -0
- package/dist/chunks/jszip-BdUBlUeG.cjs +4679 -0
- package/dist/chunks/jszip-DzmwAHr3.es.js +4650 -0
- package/dist/chunks/rolldown-runtime-BJVcqBbz.es.js +43 -0
- package/dist/chunks/rolldown-runtime-_dR15c8t.cjs +68 -0
- package/dist/chunks/uuid-B2Sqk-3p.es.js +32 -0
- package/dist/chunks/uuid-CFp0WGVU.cjs +38 -0
- package/dist/collaboration-upgrade-engine.cjs +37 -0
- package/dist/collaboration-upgrade-engine.es.js +30 -0
- package/dist/document-api/src/authorities/authorities.d.ts +29 -0
- package/dist/document-api/src/authorities/authorities.types.d.ts +113 -0
- package/dist/document-api/src/blocks/blocks.d.ts +29 -0
- package/dist/document-api/src/bookmarks/bookmarks.d.ts +15 -0
- package/dist/document-api/src/bookmarks/bookmarks.types.d.ts +82 -0
- package/dist/document-api/src/capabilities/capabilities.d.ts +82 -0
- package/dist/document-api/src/captions/captions.d.ts +17 -0
- package/dist/document-api/src/captions/captions.types.d.ts +61 -0
- package/dist/document-api/src/citations/citations.d.ts +39 -0
- package/dist/document-api/src/citations/citations.types.d.ts +151 -0
- package/dist/document-api/src/clear-content/clear-content.d.ts +25 -0
- package/dist/document-api/src/clipboard/clipboard.d.ts +11 -0
- package/dist/document-api/src/comments/comments.d.ts +222 -0
- package/dist/document-api/src/comments/comments.types.d.ts +227 -0
- package/dist/document-api/src/content-controls/content-controls.d.ts +136 -0
- package/dist/document-api/src/content-controls/content-controls.types.d.ts +453 -0
- package/dist/document-api/src/contract/command-catalog.d.ts +17 -0
- package/dist/document-api/src/contract/index.d.ts +9 -0
- package/dist/document-api/src/contract/metadata-types.d.ts +30 -0
- package/dist/document-api/src/contract/operation-definitions.d.ts +3645 -0
- package/dist/document-api/src/contract/operation-map.d.ts +5 -0
- package/dist/document-api/src/contract/operation-registry.d.ts +2002 -0
- package/dist/document-api/src/contract/reference-aliases.d.ts +19 -0
- package/dist/document-api/src/contract/reference-doc-map.d.ts +12 -0
- package/dist/document-api/src/contract/schemas.d.ts +35 -0
- package/dist/document-api/src/contract/step-op-catalog.d.ts +26 -0
- package/dist/document-api/src/contract/types.d.ts +31 -0
- package/dist/document-api/src/create/create.d.ts +27 -0
- package/dist/document-api/src/cross-refs/cross-refs.d.ts +15 -0
- package/dist/document-api/src/cross-refs/cross-refs.types.d.ts +68 -0
- package/dist/document-api/src/customXml/customXml.d.ts +19 -0
- package/dist/document-api/src/customXml/customXml.types.d.ts +148 -0
- package/dist/document-api/src/delete/delete.d.ts +20 -0
- package/dist/document-api/src/diff/diff.d.ts +14 -0
- package/dist/document-api/src/diff/diff.types.d.ts +83 -0
- package/dist/document-api/src/diff/index.d.ts +3 -0
- package/dist/document-api/src/errors.d.ts +11 -0
- package/dist/document-api/src/export/export.d.ts +10 -0
- package/dist/document-api/src/export/export.types.d.ts +40 -0
- package/dist/document-api/src/extract/extract.d.ts +15 -0
- package/dist/document-api/src/fields/fields.d.ts +15 -0
- package/dist/document-api/src/fields/fields.types.d.ts +90 -0
- package/dist/document-api/src/find/find.d.ts +52 -0
- package/dist/document-api/src/footnotes/footnotes.d.ts +17 -0
- package/dist/document-api/src/footnotes/footnotes.types.d.ts +104 -0
- package/dist/document-api/src/format/format.d.ts +92 -0
- package/dist/document-api/src/format/inline-run-patch.d.ts +138 -0
- package/dist/document-api/src/get/get.d.ts +19 -0
- package/dist/document-api/src/get-html/get-html.d.ts +27 -0
- package/dist/document-api/src/get-markdown/get-markdown.d.ts +22 -0
- package/dist/document-api/src/get-node/get-node.d.ts +46 -0
- package/dist/document-api/src/get-text/get-text.d.ts +22 -0
- package/dist/document-api/src/header-footers/header-footers.d.ts +37 -0
- package/dist/document-api/src/header-footers/header-footers.types.d.ts +116 -0
- package/dist/document-api/src/history/history.d.ts +38 -0
- package/dist/document-api/src/history/history.types.d.ts +100 -0
- package/dist/document-api/src/hyperlinks/hyperlinks.d.ts +17 -0
- package/dist/document-api/src/hyperlinks/hyperlinks.types.d.ts +112 -0
- package/dist/document-api/src/images/images.d.ts +63 -0
- package/dist/document-api/src/images/images.types.d.ts +209 -0
- package/dist/document-api/src/images/z-order.d.ts +10 -0
- package/dist/document-api/src/index/index.d.ts +29 -0
- package/dist/document-api/src/index/index.types.d.ts +125 -0
- package/dist/document-api/src/index.d.ts +560 -0
- package/dist/document-api/src/info/info.d.ts +19 -0
- package/dist/document-api/src/inline-semantics/directives.d.ts +95 -0
- package/dist/document-api/src/inline-semantics/error-types.d.ts +68 -0
- package/dist/document-api/src/inline-semantics/index.d.ts +20 -0
- package/dist/document-api/src/inline-semantics/property-ids.d.ts +24 -0
- package/dist/document-api/src/inline-semantics/token-parsers.d.ts +59 -0
- package/dist/document-api/src/inline-semantics/token-sets.d.ts +34 -0
- package/dist/document-api/src/insert/insert.d.ts +65 -0
- package/dist/document-api/src/invoke/invoke.d.ts +17 -0
- package/dist/document-api/src/lists/lists.d.ts +100 -0
- package/dist/document-api/src/lists/lists.types.d.ts +499 -0
- package/dist/document-api/src/markdown-to-fragment/markdown-to-fragment.d.ts +15 -0
- package/dist/document-api/src/metadata/anchored-metadata.d.ts +33 -0
- package/dist/document-api/src/metadata/anchored-metadata.types.d.ts +175 -0
- package/dist/document-api/src/paragraphs/paragraphs.d.ts +84 -0
- package/dist/document-api/src/paragraphs/paragraphs.types.d.ts +214 -0
- package/dist/document-api/src/permission-ranges/permission-ranges.d.ts +15 -0
- package/dist/document-api/src/permission-ranges/permission-ranges.types.d.ts +49 -0
- package/dist/document-api/src/plan/plan.d.ts +73 -0
- package/dist/document-api/src/protection/protection.d.ts +11 -0
- package/dist/document-api/src/protection/protection.types.d.ts +47 -0
- package/dist/document-api/src/ranges/index.d.ts +2 -0
- package/dist/document-api/src/ranges/ranges.types.d.ts +121 -0
- package/dist/document-api/src/ranges/resolve.d.ts +2 -0
- package/dist/document-api/src/receipt-bridge.d.ts +30 -0
- package/dist/document-api/src/replace/replace.d.ts +24 -0
- package/dist/document-api/src/sections/sections.d.ts +42 -0
- package/dist/document-api/src/sections/sections.types.d.ts +236 -0
- package/dist/document-api/src/selection/selection.d.ts +23 -0
- package/dist/document-api/src/selection/selection.types.d.ts +85 -0
- package/dist/document-api/src/selection-mutation.d.ts +46 -0
- package/dist/document-api/src/styles/apply.d.ts +142 -0
- package/dist/document-api/src/styles/catalog.d.ts +154 -0
- package/dist/document-api/src/styles/index.d.ts +14 -0
- package/dist/document-api/src/styles/registry.d.ts +43 -0
- package/dist/document-api/src/styles/schema.d.ts +9 -0
- package/dist/document-api/src/styles/validation.d.ts +38 -0
- package/dist/document-api/src/tables/color-formats.d.ts +12 -0
- package/dist/document-api/src/tables/tables.d.ts +83 -0
- package/dist/document-api/src/templates/apply.d.ts +160 -0
- package/dist/document-api/src/templates/index.d.ts +7 -0
- package/dist/document-api/src/toc/toc.d.ts +25 -0
- package/dist/document-api/src/toc/toc.types.d.ts +247 -0
- package/dist/document-api/src/track-changes/track-changes.d.ts +177 -0
- package/dist/document-api/src/types/adapter-result.d.ts +10 -0
- package/dist/document-api/src/types/address.d.ts +169 -0
- package/dist/document-api/src/types/base.d.ts +89 -0
- package/dist/document-api/src/types/blocks.types.d.ts +190 -0
- package/dist/document-api/src/types/clipboard.d.ts +216 -0
- package/dist/document-api/src/types/comments.types.d.ts +17 -0
- package/dist/document-api/src/types/create.types.d.ts +56 -0
- package/dist/document-api/src/types/discovery.d.ts +99 -0
- package/dist/document-api/src/types/extract.types.d.ts +163 -0
- package/dist/document-api/src/types/fragment.d.ts +29 -0
- package/dist/document-api/src/types/index.d.ts +30 -0
- package/dist/document-api/src/types/info.types.d.ts +109 -0
- package/dist/document-api/src/types/inline.types.d.ts +28 -0
- package/dist/document-api/src/types/media.types.d.ts +72 -0
- package/dist/document-api/src/types/mutation-plan.types.d.ts +264 -0
- package/dist/document-api/src/types/node.d.ts +9 -0
- package/dist/document-api/src/types/paragraph.types.d.ts +61 -0
- package/dist/document-api/src/types/placement.d.ts +24 -0
- package/dist/document-api/src/types/query-match.types.d.ts +212 -0
- package/dist/document-api/src/types/query.d.ts +133 -0
- package/dist/document-api/src/types/receipt.d.ts +191 -0
- package/dist/document-api/src/types/references.types.d.ts +9 -0
- package/dist/document-api/src/types/sd-contract.d.ts +54 -0
- package/dist/document-api/src/types/sd-envelope.d.ts +59 -0
- package/dist/document-api/src/types/sd-nodes.d.ts +375 -0
- package/dist/document-api/src/types/sd-objects.d.ts +144 -0
- package/dist/document-api/src/types/sd-props.d.ts +240 -0
- package/dist/document-api/src/types/sd-sections.d.ts +126 -0
- package/dist/document-api/src/types/sd-styles.d.ts +36 -0
- package/dist/document-api/src/types/step-manifest.types.d.ts +30 -0
- package/dist/document-api/src/types/story.types.d.ts +123 -0
- package/dist/document-api/src/types/structural-input.d.ts +40 -0
- package/dist/document-api/src/types/structured.types.d.ts +21 -0
- package/dist/document-api/src/types/style-policy.types.d.ts +49 -0
- package/dist/document-api/src/types/table-operations.types.d.ts +618 -0
- package/dist/document-api/src/types/tables.types.d.ts +43 -0
- package/dist/document-api/src/types/toc.types.d.ts +1 -0
- package/dist/document-api/src/types/track-changes.types.d.ts +703 -0
- package/dist/document-api/src/validation/create-location-validator.d.ts +2 -0
- package/dist/document-api/src/validation/fragment-validator.d.ts +13 -0
- package/dist/document-api/src/validation/selection-target-validator.d.ts +7 -0
- package/dist/document-api/src/validation/story-validator.d.ts +12 -0
- package/dist/document-api/src/validation-primitives.d.ts +29 -0
- package/dist/document-api/src/write/locator.d.ts +24 -0
- package/dist/document-api/src/write/write.d.ts +73 -0
- package/dist/images/altText_add.svg +3 -0
- package/dist/images/altText_disclaimer.svg +3 -0
- package/dist/images/altText_done.svg +3 -0
- package/dist/images/altText_spinner.svg +30 -0
- package/dist/images/altText_warning.svg +3 -0
- package/dist/images/annotation-check.svg +11 -0
- package/dist/images/annotation-comment.svg +16 -0
- package/dist/images/annotation-help.svg +26 -0
- package/dist/images/annotation-insert.svg +10 -0
- package/dist/images/annotation-key.svg +11 -0
- package/dist/images/annotation-newparagraph.svg +11 -0
- package/dist/images/annotation-noicon.svg +7 -0
- package/dist/images/annotation-note.svg +42 -0
- package/dist/images/annotation-paperclip.svg +6 -0
- package/dist/images/annotation-paragraph.svg +16 -0
- package/dist/images/annotation-pushpin.svg +7 -0
- package/dist/images/checkmark.svg +5 -0
- package/dist/images/comment-actionsButton.svg +3 -0
- package/dist/images/comment-closeButton.svg +3 -0
- package/dist/images/comment-editButton.svg +8 -0
- package/dist/images/comment-popup-editButton.svg +5 -0
- package/dist/images/cursor-editorFreeHighlight.svg +6 -0
- package/dist/images/cursor-editorFreeText.svg +3 -0
- package/dist/images/cursor-editorInk.svg +4 -0
- package/dist/images/cursor-editorTextHighlight.svg +8 -0
- package/dist/images/editor-toolbar-delete.svg +5 -0
- package/dist/images/editor-toolbar-edit.svg +3 -0
- package/dist/images/findbarButton-next.svg +3 -0
- package/dist/images/findbarButton-previous.svg +3 -0
- package/dist/images/gv-toolbarButton-download.svg +3 -0
- package/dist/images/loading-icon.gif +0 -0
- package/dist/images/loading.svg +1 -0
- package/dist/images/messageBar_closingButton.svg +3 -0
- package/dist/images/messageBar_info.svg +3 -0
- package/dist/images/messageBar_warning.svg +3 -0
- package/dist/images/pages_closeButton.svg +3 -0
- package/dist/images/pages_selected.svg +7 -0
- package/dist/images/pages_viewArrow.svg +3 -0
- package/dist/images/pages_viewButton.svg +3 -0
- package/dist/images/secondaryToolbarButton-documentProperties.svg +3 -0
- package/dist/images/secondaryToolbarButton-firstPage.svg +3 -0
- package/dist/images/secondaryToolbarButton-handTool.svg +3 -0
- package/dist/images/secondaryToolbarButton-lastPage.svg +3 -0
- package/dist/images/secondaryToolbarButton-rotateCcw.svg +3 -0
- package/dist/images/secondaryToolbarButton-rotateCw.svg +3 -0
- package/dist/images/secondaryToolbarButton-scrollHorizontal.svg +3 -0
- package/dist/images/secondaryToolbarButton-scrollPage.svg +3 -0
- package/dist/images/secondaryToolbarButton-scrollVertical.svg +3 -0
- package/dist/images/secondaryToolbarButton-scrollWrapped.svg +3 -0
- package/dist/images/secondaryToolbarButton-selectTool.svg +3 -0
- package/dist/images/secondaryToolbarButton-spreadEven.svg +3 -0
- package/dist/images/secondaryToolbarButton-spreadNone.svg +3 -0
- package/dist/images/secondaryToolbarButton-spreadOdd.svg +3 -0
- package/dist/images/toolbarButton-bookmark.svg +3 -0
- package/dist/images/toolbarButton-currentOutlineItem.svg +3 -0
- package/dist/images/toolbarButton-download.svg +4 -0
- package/dist/images/toolbarButton-editorFreeText.svg +5 -0
- package/dist/images/toolbarButton-editorHighlight.svg +6 -0
- package/dist/images/toolbarButton-editorInk.svg +4 -0
- package/dist/images/toolbarButton-editorSignature.svg +6 -0
- package/dist/images/toolbarButton-editorStamp.svg +8 -0
- package/dist/images/toolbarButton-menuArrow.svg +3 -0
- package/dist/images/toolbarButton-openFile.svg +3 -0
- package/dist/images/toolbarButton-pageDown.svg +3 -0
- package/dist/images/toolbarButton-pageUp.svg +3 -0
- package/dist/images/toolbarButton-presentationMode.svg +3 -0
- package/dist/images/toolbarButton-print.svg +3 -0
- package/dist/images/toolbarButton-search.svg +3 -0
- package/dist/images/toolbarButton-secondaryToolbarToggle.svg +3 -0
- package/dist/images/toolbarButton-viewAttachments.svg +3 -0
- package/dist/images/toolbarButton-viewLayers.svg +3 -0
- package/dist/images/toolbarButton-viewOutline.svg +3 -0
- package/dist/images/toolbarButton-viewThumbnail.svg +3 -0
- package/dist/images/toolbarButton-viewsManagerToggle.svg +3 -0
- package/dist/images/toolbarButton-zoomIn.svg +3 -0
- package/dist/images/toolbarButton-zoomOut.svg +3 -0
- package/dist/images/treeitem-collapsed.svg +1 -0
- package/dist/images/treeitem-expanded.svg +1 -0
- package/dist/layout-engine/contracts/src/author-colors.d.ts +56 -0
- package/dist/layout-engine/contracts/src/cell-spacing.d.ts +12 -0
- package/dist/layout-engine/contracts/src/clip-path-inset.d.ts +27 -0
- package/dist/layout-engine/contracts/src/column-layout.d.ts +79 -0
- package/dist/layout-engine/contracts/src/direction-context.d.ts +219 -0
- package/dist/layout-engine/contracts/src/drawing-taxonomy.d.ts +126 -0
- package/dist/layout-engine/contracts/src/engines/image-wrap.d.ts +54 -0
- package/dist/layout-engine/contracts/src/engines/index.d.ts +17 -0
- package/dist/layout-engine/contracts/src/engines/lists.d.ts +57 -0
- package/dist/layout-engine/contracts/src/engines/paragraph.d.ts +59 -0
- package/dist/layout-engine/contracts/src/engines/tables.d.ts +89 -0
- package/dist/layout-engine/contracts/src/engines/tabs.d.ts +117 -0
- package/dist/layout-engine/contracts/src/graphic-placement.d.ts +76 -0
- package/dist/layout-engine/contracts/src/header-footer-inheritance.d.ts +22 -0
- package/dist/layout-engine/contracts/src/header-footer-resolution.d.ts +28 -0
- package/dist/layout-engine/contracts/src/incremental-dependency.d.ts +10 -0
- package/dist/layout-engine/contracts/src/index.d.ts +2459 -0
- package/dist/layout-engine/contracts/src/justify-utils.d.ts +98 -0
- package/dist/layout-engine/contracts/src/layout-identity.d.ts +136 -0
- package/dist/layout-engine/contracts/src/ooxml-z-index.d.ts +46 -0
- package/dist/layout-engine/contracts/src/page-number-formatting.d.ts +26 -0
- package/dist/layout-engine/contracts/src/page-ref-anchor.d.ts +2 -0
- package/dist/layout-engine/contracts/src/pm-range.d.ts +45 -0
- package/dist/layout-engine/contracts/src/resolved-layout.d.ts +541 -0
- package/dist/layout-engine/contracts/src/run-helpers.d.ts +23 -0
- package/dist/layout-engine/contracts/src/sdt-container.d.ts +13 -0
- package/dist/layout-engine/contracts/src/segment-geometry.d.ts +192 -0
- package/dist/layout-engine/contracts/src/semantic-colors.d.ts +150 -0
- package/dist/layout-engine/contracts/src/table-cell-spacing.d.ts +12 -0
- package/dist/layout-engine/contracts/src/table-column-rescale.d.ts +13 -0
- package/dist/layout-engine/contracts/src/vertical-text.d.ts +43 -0
- package/dist/layout-engine/dom-contract/src/class-names.d.ts +62 -0
- package/dist/layout-engine/dom-contract/src/data-attrs.d.ts +103 -0
- package/dist/layout-engine/dom-contract/src/index.d.ts +18 -0
- package/dist/layout-engine/dom-contract/src/selectors.d.ts +47 -0
- package/dist/layout-engine/layout-bridge/src/cache-warmer.d.ts +73 -0
- package/dist/layout-engine/layout-bridge/src/cache.d.ts +143 -0
- package/dist/layout-engine/layout-bridge/src/cacheInvalidation.d.ts +117 -0
- package/dist/layout-engine/layout-bridge/src/cursor-renderer.d.ts +201 -0
- package/dist/layout-engine/layout-bridge/src/debounced-passes.d.ts +130 -0
- package/dist/layout-engine/layout-bridge/src/diff.d.ts +36 -0
- package/dist/layout-engine/layout-bridge/src/dirty-tracker.d.ts +128 -0
- package/dist/layout-engine/layout-bridge/src/dom-mapping.d.ts +80 -0
- package/dist/layout-engine/layout-bridge/src/featureFlags.d.ts +95 -0
- package/dist/layout-engine/layout-bridge/src/field-annotation-key.d.ts +2 -0
- package/dist/layout-engine/layout-bridge/src/focus-watchdog.d.ts +170 -0
- package/dist/layout-engine/layout-bridge/src/font-metrics-cache.d.ts +164 -0
- package/dist/layout-engine/layout-bridge/src/footnote-scorer.d.ts +63 -0
- package/dist/layout-engine/layout-bridge/src/headerFooterUtils.d.ts +218 -0
- package/dist/layout-engine/layout-bridge/src/ime-handler.d.ts +81 -0
- package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +390 -0
- package/dist/layout-engine/layout-bridge/src/index.d.ts +211 -0
- package/dist/layout-engine/layout-bridge/src/instrumentation.d.ts +245 -0
- package/dist/layout-engine/layout-bridge/src/layoutHeaderFooter.d.ts +123 -0
- package/dist/layout-engine/layout-bridge/src/list-indent-utils.d.ts +205 -0
- package/dist/layout-engine/layout-bridge/src/local-paragraph-layout.d.ts +93 -0
- package/dist/layout-engine/layout-bridge/src/neutral-hit.d.ts +142 -0
- package/dist/layout-engine/layout-bridge/src/neutral-segment-geometry.d.ts +32 -0
- package/dist/layout-engine/layout-bridge/src/page-geometry-helper.d.ts +197 -0
- package/dist/layout-engine/layout-bridge/src/paragraph-hash-utils.d.ts +126 -0
- package/dist/layout-engine/layout-bridge/src/paragraph-line-cache.d.ts +152 -0
- package/dist/layout-engine/layout-bridge/src/performance-metrics.d.ts +249 -0
- package/dist/layout-engine/layout-bridge/src/pm-dom-fallback.d.ts +188 -0
- package/dist/layout-engine/layout-bridge/src/pm-position-validator.d.ts +100 -0
- package/dist/layout-engine/layout-bridge/src/position-hit.d.ts +167 -0
- package/dist/layout-engine/layout-bridge/src/remeasure.d.ts +75 -0
- package/dist/layout-engine/layout-bridge/src/resolveHeaderFooterTokens.d.ts +76 -0
- package/dist/layout-engine/layout-bridge/src/rtl-text-geometry.d.ts +34 -0
- package/dist/layout-engine/layout-bridge/src/run-visual-marks.d.ts +12 -0
- package/dist/layout-engine/layout-bridge/src/safety-net.d.ts +234 -0
- package/dist/layout-engine/layout-bridge/src/sectionAwareHeaderFooter.d.ts +15 -0
- package/dist/layout-engine/layout-bridge/src/table-handler.d.ts +86 -0
- package/dist/layout-engine/layout-bridge/src/text-boundaries.d.ts +17 -0
- package/dist/layout-engine/layout-bridge/src/text-measurement.d.ts +69 -0
- package/dist/layout-engine/layout-bridge/src/track-changes-handler.d.ts +90 -0
- package/dist/layout-engine/layout-bridge/src/tracked-changes-utils.d.ts +41 -0
- package/dist/layout-engine/layout-engine/src/anchors.d.ts +52 -0
- package/dist/layout-engine/layout-engine/src/column-balancing.d.ts +255 -0
- package/dist/layout-engine/layout-engine/src/column-utils.d.ts +1 -0
- package/dist/layout-engine/layout-engine/src/floating-objects.d.ts +60 -0
- package/dist/layout-engine/layout-engine/src/floating-table-anchor.d.ts +21 -0
- package/dist/layout-engine/layout-engine/src/index.d.ts +349 -0
- package/dist/layout-engine/layout-engine/src/layout-drawing.d.ts +60 -0
- package/dist/layout-engine/layout-engine/src/layout-image.d.ts +16 -0
- package/dist/layout-engine/layout-engine/src/layout-paragraph.d.ts +101 -0
- package/dist/layout-engine/layout-engine/src/layout-table.d.ts +71 -0
- package/dist/layout-engine/layout-engine/src/layout-textbox.d.ts +4 -0
- package/dist/layout-engine/layout-engine/src/layout-utils.d.ts +104 -0
- package/dist/layout-engine/layout-engine/src/normalize-header-footer-fragments.d.ts +45 -0
- package/dist/layout-engine/layout-engine/src/pageNumbering.d.ts +73 -0
- package/dist/layout-engine/layout-engine/src/paginator.d.ts +131 -0
- package/dist/layout-engine/layout-engine/src/paragraph-layout-eligibility.d.ts +1 -0
- package/dist/layout-engine/layout-engine/src/resolvePageRefs.d.ts +31 -0
- package/dist/layout-engine/layout-engine/src/resolvePageTokens.d.ts +82 -0
- package/dist/layout-engine/layout-engine/src/section-breaks.d.ts +98 -0
- package/dist/layout-engine/layout-engine/src/section-props.d.ts +65 -0
- package/dist/layout-engine/layout-engine/src/table-cell-slice.d.ts +98 -0
- package/dist/layout-engine/painters/dom/src/_test-utils.d.ts +21 -0
- package/dist/layout-engine/painters/dom/src/chart-renderer.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/constants.d.ts +10 -0
- package/dist/layout-engine/painters/dom/src/css-token.d.ts +10 -0
- package/dist/layout-engine/painters/dom/src/features/feature-registry.d.ts +41 -0
- package/dist/layout-engine/painters/dom/src/features/inline-direction/index.d.ts +22 -0
- package/dist/layout-engine/painters/dom/src/features/inline-direction/rtl-styles.d.ts +27 -0
- package/dist/layout-engine/painters/dom/src/features/inline-direction/run-direction.d.ts +75 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/accent.d.ts +25 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/bar.d.ts +16 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/box.d.ts +38 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/delimiter.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/equation-array.d.ts +19 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/fraction.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/function.d.ts +16 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/group-character.d.ts +26 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/index.d.ts +27 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/lower-limit.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/math-run.d.ts +47 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/matrix.d.ts +23 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/nary.d.ts +23 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/phantom.d.ts +17 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/pre-sub-superscript.d.ts +25 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/radical.d.ts +14 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/sub-superscript.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/subscript.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/superscript.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/converters/upper-limit.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/features/math/index.d.ts +14 -0
- package/dist/layout-engine/painters/dom/src/features/math/omml-to-mathml.d.ts +18 -0
- package/dist/layout-engine/painters/dom/src/features/math/types.d.ts +41 -0
- package/dist/layout-engine/painters/dom/src/images/drawing-image.d.ts +5 -0
- package/dist/layout-engine/painters/dom/src/images/hyperlink.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/images/image-block.d.ts +15 -0
- package/dist/layout-engine/painters/dom/src/images/image-clip-path.d.ts +17 -0
- package/dist/layout-engine/painters/dom/src/images/image-fragment.d.ts +34 -0
- package/dist/layout-engine/painters/dom/src/images/image-selectors.d.ts +9 -0
- package/dist/layout-engine/painters/dom/src/images/types.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/index.d.ts +125 -0
- package/dist/layout-engine/painters/dom/src/page-content.d.ts +209 -0
- package/dist/layout-engine/painters/dom/src/paragraph/block-version.d.ts +8 -0
- package/dist/layout-engine/painters/dom/src/paragraph/borders/border-layer.d.ts +59 -0
- package/dist/layout-engine/painters/dom/src/paragraph/borders/group-analysis.d.ts +38 -0
- package/dist/layout-engine/painters/dom/src/paragraph/borders/index.d.ts +18 -0
- package/dist/layout-engine/painters/dom/src/paragraph/frame.d.ts +3 -0
- package/dist/layout-engine/painters/dom/src/paragraph/indentation.d.ts +25 -0
- package/dist/layout-engine/painters/dom/src/paragraph/list-marker.d.ts +51 -0
- package/dist/layout-engine/painters/dom/src/paragraph/marker-tracked-change.d.ts +34 -0
- package/dist/layout-engine/painters/dom/src/paragraph/renderParagraphContent.d.ts +87 -0
- package/dist/layout-engine/painters/dom/src/paragraph/renderParagraphFragment.d.ts +33 -0
- package/dist/layout-engine/painters/dom/src/paragraph/styles.d.ts +3 -0
- package/dist/layout-engine/painters/dom/src/paragraph-hash-utils.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/pm-position-validation.d.ts +149 -0
- package/dist/layout-engine/painters/dom/src/renderer.d.ts +681 -0
- package/dist/layout-engine/painters/dom/src/ruler/index.d.ts +41 -0
- package/dist/layout-engine/painters/dom/src/ruler/ruler-core.d.ts +195 -0
- package/dist/layout-engine/painters/dom/src/ruler/ruler-renderer.d.ts +97 -0
- package/dist/layout-engine/painters/dom/src/ruler/ruler-styles.d.ts +31 -0
- package/dist/layout-engine/painters/dom/src/runs/field-annotation-run.d.ts +14 -0
- package/dist/layout-engine/painters/dom/src/runs/font-synthesis.d.ts +1 -0
- package/dist/layout-engine/painters/dom/src/runs/formatting-marks.d.ts +3 -0
- package/dist/layout-engine/painters/dom/src/runs/hash.d.ts +82 -0
- package/dist/layout-engine/painters/dom/src/runs/image-run.d.ts +37 -0
- package/dist/layout-engine/painters/dom/src/runs/index.d.ts +13 -0
- package/dist/layout-engine/painters/dom/src/runs/links.d.ts +58 -0
- package/dist/layout-engine/painters/dom/src/runs/math-run.d.ts +7 -0
- package/dist/layout-engine/painters/dom/src/runs/render-line.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/runs/render-run.d.ts +12 -0
- package/dist/layout-engine/painters/dom/src/runs/tab-run.d.ts +66 -0
- package/dist/layout-engine/painters/dom/src/runs/text-run.d.ts +35 -0
- package/dist/layout-engine/painters/dom/src/runs/tracked-changes.d.ts +90 -0
- package/dist/layout-engine/painters/dom/src/runs/types.d.ts +67 -0
- package/dist/layout-engine/painters/dom/src/sdt/boundaries.d.ts +16 -0
- package/dist/layout-engine/painters/dom/src/sdt/container.d.ts +32 -0
- package/dist/layout-engine/painters/dom/src/sdt/dataset.d.ts +7 -0
- package/dist/layout-engine/painters/dom/src/sdt/inline.d.ts +9 -0
- package/dist/layout-engine/painters/dom/src/sdt/snapshot.d.ts +29 -0
- package/dist/layout-engine/painters/dom/src/styles.d.ts +71 -0
- package/dist/layout-engine/painters/dom/src/svg-utils.d.ts +101 -0
- package/dist/layout-engine/painters/dom/src/table/border-utils.d.ts +185 -0
- package/dist/layout-engine/painters/dom/src/table/grid-geometry.d.ts +69 -0
- package/dist/layout-engine/painters/dom/src/table/renderTableCell.d.ts +170 -0
- package/dist/layout-engine/painters/dom/src/table/renderTableFragment.d.ts +132 -0
- package/dist/layout-engine/painters/dom/src/table/renderTableRow.d.ts +146 -0
- package/dist/layout-engine/painters/dom/src/test-utils/normalize-line.d.ts +39 -0
- package/dist/layout-engine/painters/dom/src/utils/anchor-helpers.d.ts +3 -0
- package/dist/layout-engine/painters/dom/src/utils/apply-styles.d.ts +1 -0
- package/dist/layout-engine/painters/dom/src/utils/layout-identity.d.ts +9 -0
- package/dist/layout-engine/painters/dom/src/utils/source-anchor.d.ts +2 -0
- package/dist/layout-engine/style-engine/src/bench/resolveSdtMetadata.bench.d.ts +1 -0
- package/dist/layout-engine/style-engine/src/cascade.d.ts +43 -0
- package/dist/layout-engine/style-engine/src/index.d.ts +121 -0
- package/dist/layout-engine/style-engine/src/normalize/colors.d.ts +13 -0
- package/dist/layout-engine/style-engine/src/normalize/index.d.ts +13 -0
- package/dist/layout-engine/style-engine/src/normalize/paragraph-attrs.d.ts +3 -0
- package/dist/layout-engine/style-engine/src/normalize/run-attrs.d.ts +17 -0
- package/dist/layout-engine/style-engine/src/normalize/types.d.ts +36 -0
- package/dist/layout-engine/style-engine/src/normalize/units.d.ts +13 -0
- package/dist/layout-engine/style-engine/src/ooxml/index.d.ts +64 -0
- package/dist/layout-engine/style-engine/src/ooxml/numbering-types.d.ts +126 -0
- package/dist/layout-engine/style-engine/src/ooxml/styles-types.d.ts +363 -0
- package/dist/layout-engine/style-engine/src/ooxml/table-style-selection.d.ts +86 -0
- package/dist/layout-engine/style-engine/src/ooxml/types.d.ts +459 -0
- package/dist/layout-engine/style-engine/src/ooxml/word-style-model/parse-theme.d.ts +33 -0
- package/dist/layout-engine/style-engine/src/ooxml/word-style-model/parse-xml.d.ts +29 -0
- package/dist/public/ui-react.cjs +175 -0
- package/dist/public/ui-react.es.js +159 -0
- package/dist/public/ui.cjs +5 -0
- package/dist/public/ui.es.js +2 -0
- package/dist/shared/common/comments-types.d.ts +102 -0
- package/dist/shared/common/layout-constants.d.ts +7 -0
- package/dist/shared/common/list-marker-utils.d.ts +186 -0
- package/dist/shared/common/list-numbering/index.d.ts +16 -0
- package/dist/shared/font-system/src/activation.d.ts +64 -0
- package/dist/shared/font-system/src/bundled-manifest.d.ts +32 -0
- package/dist/shared/font-system/src/bundled.d.ts +41 -0
- package/dist/shared/font-system/src/document-font-options.d.ts +53 -0
- package/dist/shared/font-system/src/epoch.d.ts +6 -0
- package/dist/shared/font-system/src/font-offerings.d.ts +120 -0
- package/dist/shared/font-system/src/index.d.ts +35 -0
- package/dist/shared/font-system/src/os2.d.ts +30 -0
- package/dist/shared/font-system/src/registry.d.ts +188 -0
- package/dist/shared/font-system/src/report.d.ts +98 -0
- package/dist/shared/font-system/src/resolver.d.ts +215 -0
- package/dist/shared/font-system/src/substitution-evidence.d.ts +103 -0
- package/dist/shared/font-system/src/types.d.ts +128 -0
- package/dist/style.css +3316 -0
- package/dist/style.layered.css +3316 -0
- package/dist/superdoc/src/SuperDoc.vue.d.ts +88 -0
- package/dist/superdoc/src/cdn-entry.d.ts +2 -0
- package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +62 -0
- package/dist/superdoc/src/components/CommentsLayer/CommentHeader.vue.d.ts +26 -0
- package/dist/superdoc/src/components/CommentsLayer/CommentInput.vue.d.ts +19 -0
- package/dist/superdoc/src/components/CommentsLayer/CommentsDropdown.vue.d.ts +30 -0
- package/dist/superdoc/src/components/CommentsLayer/InternalDropdown.vue.d.ts +10 -0
- package/dist/superdoc/src/components/CommentsLayer/collect-removed-comment-ids.d.ts +1 -0
- package/dist/superdoc/src/components/CommentsLayer/collect-tracked-change-thread.d.ts +6 -0
- package/dist/superdoc/src/components/CommentsLayer/comment-schemas.d.ts +18 -0
- package/dist/superdoc/src/components/CommentsLayer/commentsList/commentsList.vue.d.ts +9 -0
- package/dist/superdoc/src/components/CommentsLayer/commentsList/super-comments-list.d.ts +21 -0
- package/dist/superdoc/src/components/CommentsLayer/floating-comment-positioning.d.ts +28 -0
- package/dist/superdoc/src/components/CommentsLayer/helpers.d.ts +7 -0
- package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +2 -0
- package/dist/superdoc/src/components/CommentsLayer/types.d.ts +3 -0
- package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +8 -0
- package/dist/superdoc/src/components/CommentsLayer/use-conversation.d.ts +22 -0
- package/dist/superdoc/src/components/CommentsLayer/use-floating-comment.d.ts +11 -0
- package/dist/superdoc/src/components/HtmlViewer/HtmlViewer.vue.d.ts +10 -0
- package/dist/superdoc/src/components/PdfViewer/PdfViewer.vue.d.ts +61 -0
- package/dist/superdoc/src/components/PdfViewer/PdfViewerDocument.vue.d.ts +21 -0
- package/dist/superdoc/src/components/PdfViewer/PdfViewerPage.vue.d.ts +24 -0
- package/dist/superdoc/src/components/Whiteboard/WhiteboardLayer.vue.d.ts +19 -0
- package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +17 -0
- package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +18 -0
- package/dist/superdoc/src/components/surfaces/FindReplaceSurface.vue.d.ts +19 -0
- package/dist/superdoc/src/components/surfaces/PasswordPromptSurface.vue.d.ts +17 -0
- package/dist/superdoc/src/components/surfaces/SurfaceDialog.vue.d.ts +12 -0
- package/dist/superdoc/src/components/surfaces/SurfaceExternalMount.vue.d.ts +19 -0
- package/dist/superdoc/src/components/surfaces/SurfaceFloating.vue.d.ts +10 -0
- package/dist/superdoc/src/components/surfaces/SurfaceHost.vue.d.ts +31 -0
- package/dist/superdoc/src/components/surfaces/focusable-selector.d.ts +5 -0
- package/dist/superdoc/src/composables/find-shortcut-owner.d.ts +32 -0
- package/dist/superdoc/src/composables/replace-continuation.d.ts +37 -0
- package/dist/superdoc/src/composables/use-ai.d.ts +10 -0
- package/dist/superdoc/src/composables/use-comment-small-screen.d.ts +10 -0
- package/dist/superdoc/src/composables/use-compact-comment-popover.d.ts +21 -0
- package/dist/superdoc/src/composables/use-document.d.ts +34 -0
- package/dist/superdoc/src/composables/use-field.d.ts +33 -0
- package/dist/superdoc/src/composables/use-find-replace.d.ts +83 -0
- package/dist/superdoc/src/composables/use-high-contrast-mode.d.ts +4 -0
- package/dist/superdoc/src/composables/use-link-popover.d.ts +221 -0
- package/dist/superdoc/src/composables/use-password-prompt.d.ts +33 -0
- package/dist/superdoc/src/composables/use-selected-text.d.ts +16 -0
- package/dist/superdoc/src/composables/use-viewport-fit.d.ts +50 -0
- package/dist/superdoc/src/composables/useUiFontFamily.d.ts +24 -0
- package/dist/superdoc/src/core/EventEmitter.d.ts +55 -0
- package/dist/superdoc/src/core/SuperDoc.d.ts +775 -0
- package/dist/superdoc/src/core/collaboration/collaboration-comments.d.ts +4 -0
- package/dist/superdoc/src/core/collaboration/collaboration.d.ts +28 -0
- package/dist/superdoc/src/core/collaboration/helpers.d.ts +8 -0
- package/dist/superdoc/src/core/collaboration/permissions.d.ts +19 -0
- package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +99 -0
- package/dist/superdoc/src/core/collaboration/room-overwrite.d.ts +22 -0
- package/dist/superdoc/src/core/collaboration/v2-awareness-bridge.d.ts +57 -0
- package/dist/superdoc/src/core/config/merge-defined.d.ts +35 -0
- package/dist/superdoc/src/core/config/normalize-interaction-config.d.ts +15 -0
- package/dist/superdoc/src/core/config/normalize-surfaces-config.d.ts +23 -0
- package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +62 -0
- package/dist/superdoc/src/core/create-app.d.ts +32 -0
- package/dist/superdoc/src/core/editor-runtime/conformance/fake-v2-runtime.d.ts +9 -0
- package/dist/superdoc/src/core/editor-runtime/editor-runtime-registry.d.ts +117 -0
- package/dist/superdoc/src/core/editor-runtime/index.d.ts +1 -0
- package/dist/superdoc/src/core/editor-runtime/root-marker.d.ts +33 -0
- package/dist/superdoc/src/core/editor-runtime/types.d.ts +405 -0
- package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +185 -0
- package/dist/superdoc/src/core/editor-runtime/v2/v2-session-shortcut-routes.d.ts +47 -0
- package/dist/superdoc/src/core/extensions/define.d.ts +56 -0
- package/dist/superdoc/src/core/extensions/index.d.ts +2 -0
- package/dist/superdoc/src/core/extensions/types.d.ts +519 -0
- package/dist/superdoc/src/core/helpers/export.d.ts +2 -0
- package/dist/superdoc/src/core/helpers/file.d.ts +43 -0
- package/dist/superdoc/src/core/helpers/normalize-track-changes-config.d.ts +60 -0
- package/dist/superdoc/src/core/helpers/normalize-user.d.ts +13 -0
- package/dist/superdoc/src/core/index.d.ts +1 -0
- package/dist/superdoc/src/core/pdf/helpers/constants.d.ts +2 -0
- package/dist/superdoc/src/core/pdf/helpers/floor.d.ts +1 -0
- package/dist/superdoc/src/core/pdf/helpers/range.d.ts +1 -0
- package/dist/superdoc/src/core/pdf/helpers/read-file.d.ts +1 -0
- package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +66 -0
- package/dist/superdoc/src/core/surface-manager.d.ts +90 -0
- package/dist/superdoc/src/core/theme/create-theme.d.ts +82 -0
- package/dist/superdoc/src/core/types/index.d.ts +3006 -0
- package/dist/superdoc/src/core/v2-integration/browser-peer-runtime.d.ts +3 -0
- package/dist/superdoc/src/core/v2-integration/cdn-engine-loader.d.ts +16 -0
- package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +97 -0
- package/dist/superdoc/src/core/whiteboard/Whiteboard.d.ts +247 -0
- package/dist/superdoc/src/core/whiteboard/WhiteboardPage.d.ts +251 -0
- package/dist/superdoc/src/core/whiteboard/WhiteboardRenderer.d.ts +2 -0
- package/dist/superdoc/src/core/whiteboard/helpers/createTextarea.d.ts +1 -0
- package/dist/superdoc/src/core/whiteboard/helpers/flattenPoints.d.ts +1 -0
- package/dist/superdoc/src/core/whiteboard/helpers/getRandomId.d.ts +1 -0
- package/dist/superdoc/src/helpers/collect-touched-tracked-change-ids.d.ts +11 -0
- package/dist/superdoc/src/helpers/comment-focus.d.ts +4 -0
- package/dist/superdoc/src/helpers/comment-small-screen.d.ts +14 -0
- package/dist/superdoc/src/helpers/deprecation.d.ts +26 -0
- package/dist/superdoc/src/helpers/floor.d.ts +1 -0
- package/dist/superdoc/src/helpers/group-changes.d.ts +1 -0
- package/dist/superdoc/src/helpers/interaction-trace.d.ts +26 -0
- package/dist/superdoc/src/helpers/selection-source.d.ts +1 -0
- package/dist/superdoc/src/helpers/transaction-touches-structural-change.d.ts +19 -0
- package/dist/superdoc/src/helpers/use-selection.d.ts +17 -0
- package/dist/superdoc/src/helpers/v2-author-required-rejection.d.ts +22 -0
- package/dist/superdoc/src/helpers/v2-remote-review-hydration.d.ts +12 -0
- package/dist/superdoc/src/helpers/v2-review-mutation-impact.d.ts +15 -0
- package/dist/superdoc/src/helpers/v2-review-mutation-reconciler.d.ts +19 -0
- package/dist/superdoc/src/helpers/v2-review-target.d.ts +7 -0
- package/dist/superdoc/src/helpers/v2-selection-sync.d.ts +12 -0
- package/dist/superdoc/src/helpers/v2-typing-mutation-event.d.ts +5 -0
- package/dist/superdoc/src/icons.d.ts +11 -0
- package/dist/superdoc/src/index.d.cts +13 -0
- package/dist/superdoc/src/index.d.ts +11 -0
- package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +21 -0
- package/dist/superdoc/src/internal/toolbar/built-in/AlignmentButtons.vue.d.ts +6 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ButtonGroup.vue.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/DocumentMode.vue.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/FontFamilyCombobox.vue.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/FontSizeCombobox.vue.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/IconGrid.vue.d.ts +14 -0
- package/dist/superdoc/src/internal/toolbar/built-in/IconGridRow.vue.d.ts +13 -0
- package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +37 -0
- package/dist/superdoc/src/internal/toolbar/built-in/LinkedStyle.vue.d.ts +12 -0
- package/dist/superdoc/src/internal/toolbar/built-in/OverflowMenu.vue.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/SdTooltip.vue.d.ts +34 -0
- package/dist/superdoc/src/internal/toolbar/built-in/StyleButtonsList.vue.d.ts +14 -0
- package/dist/superdoc/src/internal/toolbar/built-in/TableActions.vue.d.ts +8 -0
- package/dist/superdoc/src/internal/toolbar/built-in/TableGrid.vue.d.ts +6 -0
- package/dist/superdoc/src/internal/toolbar/built-in/Toolbar.vue.d.ts +4 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButton.vue.d.ts +24 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButtonIcon.vue.d.ts +11 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarComboBox.vue.d.ts +18 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarDropdown.vue.d.ts +38 -0
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarSeparator.vue.d.ts +8 -0
- package/dist/superdoc/src/internal/toolbar/built-in/color-dropdown-helpers.d.ts +24 -0
- package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +102 -0
- package/dist/superdoc/src/internal/toolbar/built-in/default-items.d.ts +17 -0
- package/dist/superdoc/src/internal/toolbar/built-in/font-options.d.ts +1 -0
- package/dist/superdoc/src/internal/toolbar/built-in/font-typeahead.d.ts +11 -0
- package/dist/superdoc/src/internal/toolbar/built-in/format-negation.d.ts +5 -0
- package/dist/superdoc/src/internal/toolbar/built-in/general.d.ts +1 -0
- package/dist/superdoc/src/internal/toolbar/built-in/helpers.d.ts +5 -0
- package/dist/superdoc/src/internal/toolbar/built-in/list-style-buttons.d.ts +10 -0
- package/dist/superdoc/src/internal/toolbar/built-in/scroll-helpers.d.ts +4 -0
- package/dist/superdoc/src/internal/toolbar/built-in/toolbar-focus-helpers.d.ts +1 -0
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarIcons.d.ts +76 -0
- package/dist/superdoc/src/internal/toolbar/built-in/toolbarTexts.d.ts +58 -0
- package/dist/superdoc/src/internal/toolbar/built-in/url-safety.d.ts +8 -0
- package/dist/superdoc/src/internal/toolbar/built-in/use-toolbar-item.d.ts +48 -0
- package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +237 -0
- package/dist/superdoc/src/internal/toolbar/compatibility-catalog.d.ts +59 -0
- package/dist/superdoc/src/internal/toolbar/image-upload.d.ts +63 -0
- package/dist/superdoc/src/internal/toolbar/index.d.ts +10 -0
- package/dist/superdoc/src/main.d.ts +1 -0
- package/dist/superdoc/src/public/browser-document-api.d.ts +53 -0
- package/dist/superdoc/src/public/collaboration-upgrade-engine.d.cts +26 -0
- package/dist/superdoc/src/public/collaboration-upgrade-engine.d.ts +130 -0
- package/dist/superdoc/src/public/index.d.cts +359 -0
- package/dist/superdoc/src/public/index.d.ts +179 -0
- package/dist/superdoc/src/public/ui/commands.d.ts +249 -0
- package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +18 -0
- package/dist/superdoc/src/public/ui/entity-at.d.ts +29 -0
- package/dist/superdoc/src/public/ui/equality.d.ts +10 -0
- package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +36 -0
- package/dist/superdoc/src/public/ui/react.d.ts +81 -0
- package/dist/superdoc/src/public/ui/reasons.d.ts +99 -0
- package/dist/superdoc/src/public/ui/types.d.ts +1425 -0
- package/dist/superdoc/src/public/ui-react.d.cts +20 -0
- package/dist/superdoc/src/public/ui-react.d.ts +20 -0
- package/dist/superdoc/src/public/ui.d.cts +194 -0
- package/dist/superdoc/src/public/ui.d.ts +29 -0
- package/dist/superdoc/src/stores/comments-store.d.ts +676 -0
- package/dist/superdoc/src/stores/helpers/floating-comment-instances.d.ts +14 -0
- package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +14 -0
- package/dist/superdoc/src/stores/hrbr-fields-store.d.ts +43 -0
- package/dist/superdoc/src/stores/superdoc-store.d.ts +2182 -0
- package/dist/superdoc.cjs +36521 -0
- package/dist/superdoc.es.js +36449 -0
- package/dist/word-layout/src/index.d.ts +64 -0
- package/dist/word-layout/src/list-marker.d.ts +68 -0
- package/dist/word-layout/src/marker-utils.d.ts +20 -0
- package/dist/word-layout/src/numbering-manager.d.ts +85 -0
- package/dist/word-layout/src/tab-layout.d.ts +193 -0
- package/dist/word-layout/src/types.d.ts +106 -0
- package/dist/word-layout/src/unit-conversions.d.ts +120 -0
- package/dist-cdn/style.layered.css +2 -0
- package/dist-cdn/superdoc.min.css +2 -0
- package/dist-cdn/superdoc.min.js +108 -0
- package/package.json +137 -24
- package/.npmignore +0 -4
- package/data.json +0 -17
- package/index.js +0 -2
- package/lib/Augmenter.js +0 -27
- package/lib/Runner.js +0 -80
- package/lib/Stopper.js +0 -71
- package/test/superdoc.js +0 -126
- package/utils/app.js +0 -18
- package/utils/server.js +0 -2
- package/web/index.js +0 -54
- package/web/public/style.css +0 -74
- package/web/views/index.ejs +0 -53
- package/web/views/layout.ejs +0 -13
- package/web/views/method.ejs +0 -59
|
@@ -0,0 +1,775 @@
|
|
|
1
|
+
import { EventEmitter } from 'eventemitter3';
|
|
2
|
+
import { HocuspocusProviderWebsocket } from '@hocuspocus/provider';
|
|
3
|
+
import { createSuperdocVueApp } from './create-app.js';
|
|
4
|
+
import { Whiteboard } from './whiteboard/Whiteboard.js';
|
|
5
|
+
import { normalizeUiConfig } from './config/normalize-ui-config.js';
|
|
6
|
+
import { normalizeInteractionConfig } from './config/normalize-interaction-config.js';
|
|
7
|
+
import { normalizeSurfacesConfig } from './config/normalize-surfaces-config.js';
|
|
8
|
+
import { EditorRuntimeFocusOptions } from './editor-runtime/types.js';
|
|
9
|
+
import { BorrowedSuperDocUI } from '../public/ui/types.js';
|
|
10
|
+
import { AwarenessUser, CanPerformPermissionParams, CollaborationProvider, Config, ContentControlActiveChangePayload, ContentControlClickPayload, DocumentMode, Editor, EditorUpdateEvent, ExportParams, FontsChangedPayload, FontsResolvedPayload, InternalConfig, ListDefinitionsPayload, NavigableAddress, DocumentRendererRuntime, SearchMatch, SuperDocAwarenessUpdatePayload, SuperDocCommentsUpdatePayload, SuperDocDocumentReplacedPayload, SuperDocEditorPayload, SuperDocExceptionPayload, SuperDocFontsApi, SuperDocLockedPayload, SuperDocMeasurementUnit, SuperDocMeasurementUnitChangePayload, SuperDocReadyPayload, SuperDocState, SuperDocViewportChangePayload, SuperDocViewportMetrics, SuperDocZoomMode, SuperDocZoomPayload, SuperDocZoomState, SurfaceHandle, SurfaceRequest, UpgradeToCollaborationOptions, User } from './types/index.js';
|
|
11
|
+
import { WhiteboardData } from './whiteboard/Whiteboard.js';
|
|
12
|
+
type ToolbarLike = {
|
|
13
|
+
activeEditor?: unknown;
|
|
14
|
+
setActiveEditor?: (editor: unknown) => void;
|
|
15
|
+
getToolbarItemByName?: (name: string) => unknown;
|
|
16
|
+
getToolbarItemByGroup?: (group: string) => unknown;
|
|
17
|
+
updateToolbarState?: () => void;
|
|
18
|
+
on?: (event: string, handler: (payload?: unknown) => void) => void;
|
|
19
|
+
off?: (event: string, handler: (payload?: unknown) => void) => void;
|
|
20
|
+
destroy: () => void;
|
|
21
|
+
};
|
|
22
|
+
import type * as Y from 'yjs';
|
|
23
|
+
interface SuperDocWhiteboardPayload {
|
|
24
|
+
whiteboard: Whiteboard;
|
|
25
|
+
}
|
|
26
|
+
interface SuperDocFormattingMarksPayload {
|
|
27
|
+
showFormattingMarks: boolean;
|
|
28
|
+
superdoc: SuperDoc;
|
|
29
|
+
}
|
|
30
|
+
interface SuperDocDocumentModeChangePayload {
|
|
31
|
+
documentMode: DocumentMode;
|
|
32
|
+
}
|
|
33
|
+
interface SuperDocPaginationPayload {
|
|
34
|
+
totalPages: number;
|
|
35
|
+
superdoc: SuperDoc;
|
|
36
|
+
}
|
|
37
|
+
interface SuperDocContentErrorPayload {
|
|
38
|
+
error: unknown;
|
|
39
|
+
editor: Editor;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* SuperDoc lifecycle event registry. Keys are event names emitted via
|
|
43
|
+
* `this.emit(...)`; each value is the tuple of arguments. Used as the
|
|
44
|
+
* generic parameter of `EventEmitter<SuperDocEventMap>` so `superdoc.on`
|
|
45
|
+
* / `superdoc.emit` reject unknown event names at compile time.
|
|
46
|
+
*/
|
|
47
|
+
interface SuperDocEventMap {
|
|
48
|
+
ready: [SuperDocReadyPayload];
|
|
49
|
+
editorBeforeCreate: [SuperDocEditorPayload];
|
|
50
|
+
editorCreate: [SuperDocEditorPayload];
|
|
51
|
+
editorDestroy: [];
|
|
52
|
+
'pdf:document-ready': [];
|
|
53
|
+
'sidebar-toggle': [boolean];
|
|
54
|
+
/** Requests the shell open its find/replace surface (e.g. the toolbar search button). */
|
|
55
|
+
'search:open': [];
|
|
56
|
+
zoomChange: [SuperDocZoomPayload];
|
|
57
|
+
'measurement-unit-change': [SuperDocMeasurementUnitChangePayload];
|
|
58
|
+
'formatting-marks-change': [SuperDocFormattingMarksPayload];
|
|
59
|
+
'document-mode-change': [SuperDocDocumentModeChangePayload];
|
|
60
|
+
/**
|
|
61
|
+
* The active editor was assigned or cleared. Internal: the UI controller
|
|
62
|
+
* listens so its snapshot follows the live editor. `editorCreate` only
|
|
63
|
+
* covers assignment, and it is emitted after `broadcastReady()`, so
|
|
64
|
+
* neither a pre-ready read nor a clear would refresh without this.
|
|
65
|
+
*/
|
|
66
|
+
'active-editor-change': [];
|
|
67
|
+
/**
|
|
68
|
+
* `replaceFile()` swapped the content under a stable editor identity.
|
|
69
|
+
*
|
|
70
|
+
* Deliberately distinct from `active-editor-change`: the editor object and its
|
|
71
|
+
* host both survive a replace, so anything bound to the HOST — geometry
|
|
72
|
+
* observers, for one — is still attached to the thing now rendering the
|
|
73
|
+
* replacement and must not be torn down. Only state describing the previous
|
|
74
|
+
* document's content is stale.
|
|
75
|
+
*
|
|
76
|
+
* Emitted only after the replacement is confirmed, and carrying the editor
|
|
77
|
+
* whose replacement completed: a replace is asynchronous, so the active editor
|
|
78
|
+
* can move while it is in flight, and a consumer must ignore an event naming an
|
|
79
|
+
* editor it is not bound to.
|
|
80
|
+
*/
|
|
81
|
+
'document-replaced': [SuperDocDocumentReplacedPayload];
|
|
82
|
+
'editor-update': [EditorUpdateEvent];
|
|
83
|
+
'content-error': [SuperDocContentErrorPayload];
|
|
84
|
+
'fonts-resolved': [FontsResolvedPayload];
|
|
85
|
+
'fonts-changed': [FontsChangedPayload];
|
|
86
|
+
'pagination-update': [SuperDocPaginationPayload];
|
|
87
|
+
'list-definitions-change': [ListDefinitionsPayload];
|
|
88
|
+
'comments-update': [SuperDocCommentsUpdatePayload];
|
|
89
|
+
'content-control:active-change': [ContentControlActiveChangePayload];
|
|
90
|
+
'content-control:click': [ContentControlClickPayload];
|
|
91
|
+
'collaboration-ready': [SuperDocEditorPayload];
|
|
92
|
+
'awareness-update': [SuperDocAwarenessUpdatePayload];
|
|
93
|
+
locked: [SuperDocLockedPayload];
|
|
94
|
+
'whiteboard:init': [SuperDocWhiteboardPayload];
|
|
95
|
+
'whiteboard:ready': [SuperDocWhiteboardPayload];
|
|
96
|
+
'whiteboard:change': [WhiteboardData];
|
|
97
|
+
'whiteboard:enabled': [boolean];
|
|
98
|
+
'whiteboard:tool': [string];
|
|
99
|
+
exception: [SuperDocExceptionPayload];
|
|
100
|
+
'viewport-change': [SuperDocViewportChangePayload];
|
|
101
|
+
'source:complete': [];
|
|
102
|
+
'source:signals-complete': [];
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* SuperDoc class
|
|
106
|
+
* Expects a config object
|
|
107
|
+
*
|
|
108
|
+
* @class
|
|
109
|
+
*/
|
|
110
|
+
export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
|
|
111
|
+
#private;
|
|
112
|
+
static allowedTypes: ("application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/pdf" | "text/html")[];
|
|
113
|
+
/**
|
|
114
|
+
* Which built-in surfaces this instance renders.
|
|
115
|
+
*
|
|
116
|
+
* Resolved from {@link Config.ui}, falling back to the historical defaults
|
|
117
|
+
* when it is omitted. Read-only: changing what SuperDoc renders after mount
|
|
118
|
+
* is a per-surface concern, not a config swap.
|
|
119
|
+
*/
|
|
120
|
+
get uiConfig(): ReturnType<typeof normalizeUiConfig>;
|
|
121
|
+
/**
|
|
122
|
+
* What the user is permitted to do, as distinct from what SuperDoc draws.
|
|
123
|
+
*
|
|
124
|
+
* Resolved from {@link Config.interaction}. Stays meaningful when the
|
|
125
|
+
* application renders its own UI: `ui: false` removes the built-in comment
|
|
126
|
+
* dialog but not the policy that rejects a mutation.
|
|
127
|
+
*/
|
|
128
|
+
get interactionConfig(): ReturnType<typeof normalizeInteractionConfig>;
|
|
129
|
+
/**
|
|
130
|
+
* Shared plumbing for dialogs and floating overlays, including ones the
|
|
131
|
+
* application opens itself through `openSurface()`.
|
|
132
|
+
*
|
|
133
|
+
* Resolved from {@link Config.surfaces}. Unaffected by `ui: false`, which
|
|
134
|
+
* turns off SuperDoc's own surfaces without disabling the mechanism.
|
|
135
|
+
*/
|
|
136
|
+
get surfacesConfig(): ReturnType<typeof normalizeSurfacesConfig>;
|
|
137
|
+
/**
|
|
138
|
+
* Build-time SuperDoc version string. Initialized to `'0.0.0'` so the
|
|
139
|
+
* field is structurally assigned before the constructor runs, then
|
|
140
|
+
* overwritten with the injected `__APP_VERSION__` constant inside
|
|
141
|
+
* `#init` (the existing `@ts-expect-error` keeps the injected global
|
|
142
|
+
* out of the JSDoc type graph). Consumers reading `superdoc.version`
|
|
143
|
+
* immediately after `new SuperDoc(...)` see the real version because
|
|
144
|
+
* `#init` runs synchronously through the overwrite before returning.
|
|
145
|
+
*/
|
|
146
|
+
version: string;
|
|
147
|
+
/**
|
|
148
|
+
* Local copy of the shared users list. Initialized to `[]` so direct
|
|
149
|
+
* reads (`superdoc.users`) are stable before the async `#init`
|
|
150
|
+
* re-seeds from `config.users`. Pre-ready `addSharedUser` /
|
|
151
|
+
* `removeSharedUser` mutations would be silently overwritten by the
|
|
152
|
+
* re-seed, so those methods guard with `#requireReady('addSharedUser')`
|
|
153
|
+
* and throw a clear lifecycle error instead.
|
|
154
|
+
*/
|
|
155
|
+
users: User[];
|
|
156
|
+
/** Yjs document for collaboration; set in `#init` when collaboration is enabled, otherwise undefined. */
|
|
157
|
+
ydoc: Y.Doc | undefined;
|
|
158
|
+
/**
|
|
159
|
+
* Provider for the SuperDoc-level collaboration room (separate from
|
|
160
|
+
* per-document providers). Widened to `CollaborationProvider` to match
|
|
161
|
+
* the runtime, which stores whatever provider the consumer passed via
|
|
162
|
+
* `Config.modules.collaboration.provider`. Consumers needing Hocuspocus-
|
|
163
|
+
* specific members must narrow before use.
|
|
164
|
+
*
|
|
165
|
+
*/
|
|
166
|
+
provider: CollaborationProvider | undefined;
|
|
167
|
+
/**
|
|
168
|
+
* Whiteboard instance, created by `#initWhiteboard()` after the
|
|
169
|
+
* collaboration await. Initialized to `null` so consumers reading
|
|
170
|
+
* `superdoc.whiteboard` before the `whiteboard:init` event fires get
|
|
171
|
+
* a stable null, not `undefined`.
|
|
172
|
+
*/
|
|
173
|
+
whiteboard: Whiteboard | null;
|
|
174
|
+
/**
|
|
175
|
+
* Awareness palette assigned to local users when no explicit color is set.
|
|
176
|
+
* Defaults to an empty array so `#assignUserColor` falls back to the
|
|
177
|
+
* built-in `DEFAULT_AWARENESS_PALETTE`.
|
|
178
|
+
*/
|
|
179
|
+
colors: string[];
|
|
180
|
+
/**
|
|
181
|
+
* Pinia stores and Vue runtime references. Populated by `#initVueApp`
|
|
182
|
+
* inside the async `#init`, which runs *after* `await #initCollaboration`,
|
|
183
|
+
* so these fields are `undefined` between `new SuperDoc(config)`
|
|
184
|
+
* returning and the `ready` event firing. Typed as `T | undefined` so
|
|
185
|
+
* @ts-check forces every access path to either narrow or use the
|
|
186
|
+
* `#requireSuperdocStore` / `#requireCommentsStore` helpers below
|
|
187
|
+
* (which throw a clear "wait for ready" error). SD-2916 PR-B closed
|
|
188
|
+
* the delayed-init soundness gap.
|
|
189
|
+
*
|
|
190
|
+
* `@private` is a TypeScript-surface hide, not runtime privacy: the
|
|
191
|
+
* fields still exist on the runtime instance and internal callers
|
|
192
|
+
* across the package keep working. Consumers can no longer reach into
|
|
193
|
+
* them via `.d.ts`, which collapses the Pinia type graph from the
|
|
194
|
+
* public surface (SD-3213f). The headless-toolbar host contract was
|
|
195
|
+
* refactored in the same PR to replace raw store reach with narrow
|
|
196
|
+
* host methods, so SuperDoc instances satisfy
|
|
197
|
+
* `HeadlessToolbarSuperdocHost` directly without exposing
|
|
198
|
+
* `superdocStore` publicly.
|
|
199
|
+
*
|
|
200
|
+
* @private
|
|
201
|
+
*/
|
|
202
|
+
private superdocStore;
|
|
203
|
+
/**
|
|
204
|
+
* @private
|
|
205
|
+
*/
|
|
206
|
+
private commentsStore;
|
|
207
|
+
/**
|
|
208
|
+
* @private
|
|
209
|
+
*/
|
|
210
|
+
private highContrastModeStore;
|
|
211
|
+
/**
|
|
212
|
+
* Internal mount handle for the `SuperComments` Vue component, created
|
|
213
|
+
* lazily by `addCommentsList()` and torn down by `removeCommentsList()`.
|
|
214
|
+
* Not consumer API: `SuperComments` is not publicly exported, no docs
|
|
215
|
+
* or examples reference `superdoc.commentsList`, and the inner fields
|
|
216
|
+
* (`element`, `superdoc` backref, `container` Vue ComponentPublicInstance)
|
|
217
|
+
* are internal mount state.
|
|
218
|
+
*
|
|
219
|
+
* Typed as `SuperComments | null | undefined` so the runtime states
|
|
220
|
+
* stay type-clean: `undefined` before `addCommentsList()` runs (e.g.
|
|
221
|
+
* when the viewer role skips initialization; see SuperDoc.test.js
|
|
222
|
+
* for the assertion), `SuperComments` after `addCommentsList()`, and
|
|
223
|
+
* `null` after `removeCommentsList()` tears down. No initializer, to
|
|
224
|
+
* match the convention used by the adjacent `@private` store fields.
|
|
225
|
+
*
|
|
226
|
+
* @private
|
|
227
|
+
*/
|
|
228
|
+
private commentsList;
|
|
229
|
+
/**
|
|
230
|
+
* Internal Vue app handle created in `#initVueApp()` and used for
|
|
231
|
+
* mount/unmount, `provide()`, and `config.globalProperties` setup.
|
|
232
|
+
* Not consumer API: no docs or examples reference `superdoc.app`,
|
|
233
|
+
* and the only cross-file reader (`SuperComments.createVueApp()`
|
|
234
|
+
* at `super-comments-list.js:35`) is a `.js` file under
|
|
235
|
+
* `checkJs: false`, so the `@private` boundary does not break
|
|
236
|
+
* internal source compilation.
|
|
237
|
+
*
|
|
238
|
+
* Same SD-3213f-style TS surface hide as
|
|
239
|
+
* `superdocStore` / `commentsStore` / `highContrastModeStore` /
|
|
240
|
+
* `commentsList`; not runtime privacy.
|
|
241
|
+
*
|
|
242
|
+
* @private
|
|
243
|
+
*/
|
|
244
|
+
private app;
|
|
245
|
+
/** Pinia store root for the SuperDoc Vue app. Set in `#initVueApp`. */
|
|
246
|
+
pinia: ReturnType<typeof createSuperdocVueApp>['pinia'] | undefined;
|
|
247
|
+
/** Count of editors that have signaled `editorCreate`. */
|
|
248
|
+
readyEditors: number;
|
|
249
|
+
/** Outstanding async saves waiting for collaboration ack. */
|
|
250
|
+
pendingCollaborationSaves: number;
|
|
251
|
+
activeEditor: Editor | null;
|
|
252
|
+
editorVersion: 2;
|
|
253
|
+
toolbar: ToolbarLike | null;
|
|
254
|
+
toolbarElement: string | HTMLElement | undefined;
|
|
255
|
+
userColorMap: Map<string, string>;
|
|
256
|
+
colorIndex: number;
|
|
257
|
+
isCollaborative: boolean;
|
|
258
|
+
isLocked: boolean;
|
|
259
|
+
lockedBy: User | null;
|
|
260
|
+
isDev: boolean;
|
|
261
|
+
superdocId: string;
|
|
262
|
+
comments: unknown[];
|
|
263
|
+
socket: HocuspocusProviderWebsocket | null;
|
|
264
|
+
user: AwarenessUser;
|
|
265
|
+
_cleanupAwareness: (() => void) | null;
|
|
266
|
+
_commentsCollabInitialized: boolean;
|
|
267
|
+
/**
|
|
268
|
+
* The active configuration. Typed as `InternalConfig` because `#init` runs
|
|
269
|
+
* synchronously in the constructor and normalizes the consumer-provided
|
|
270
|
+
* `Config` into the wider shape (`documents` filled, `modules` defaulted,
|
|
271
|
+
* `user` spread with `DEFAULT_USER`, etc.). Any callsite reading
|
|
272
|
+
* `this.config` runs after `#init`, so it sees the normalized shape.
|
|
273
|
+
*
|
|
274
|
+
* Public consumer input shape: `Config` (re-exported from `superdoc`).
|
|
275
|
+
* Internal post-normalize shape: `InternalConfig`.
|
|
276
|
+
*/
|
|
277
|
+
config: InternalConfig;
|
|
278
|
+
constructor(config: Config);
|
|
279
|
+
/**
|
|
280
|
+
* Get the number of editors that are required for this superdoc
|
|
281
|
+
* @returns The number of required editors
|
|
282
|
+
*/
|
|
283
|
+
get requiredNumberOfEditors(): number;
|
|
284
|
+
/**
|
|
285
|
+
* The UI controller for this instance: the single place to read command
|
|
286
|
+
* state and drive comments, track changes, selection, zoom, and the other
|
|
287
|
+
* UI surfaces from application code.
|
|
288
|
+
*
|
|
289
|
+
* SuperDoc owns exactly one controller per instance. Every internal
|
|
290
|
+
* consumer — the built-in toolbar, the link popover, keyboard command
|
|
291
|
+
* routing, and the React bindings — reads this same object, so command
|
|
292
|
+
* state never diverges between built-in and custom UI. The controller is
|
|
293
|
+
* created by the first read and its identity never changes afterwards:
|
|
294
|
+
* replacing the document, remounting an editor, or switching the active
|
|
295
|
+
* editor in a multi-document instance all keep the same controller.
|
|
296
|
+
*
|
|
297
|
+
* Reading it is safe before the document is ready. Slices report a `pending`
|
|
298
|
+
* status and commands report themselves disabled instead of throwing, so a
|
|
299
|
+
* custom UI can subscribe in the same tick as the constructor and will start
|
|
300
|
+
* receiving real values once an editor mounts.
|
|
301
|
+
*
|
|
302
|
+
* `SuperDoc.destroy()` destroys the controller. The returned type is
|
|
303
|
+
* {@link BorrowedSuperDocUI}, which omits `destroy()`, so a consumer tearing
|
|
304
|
+
* down state that other readers of this instance still observe is a compile
|
|
305
|
+
* error rather than a rule in a comment. The instance keeps the owning
|
|
306
|
+
* reference privately.
|
|
307
|
+
*
|
|
308
|
+
* This is an observation and command surface, not a permission boundary.
|
|
309
|
+
* Anything it exposes is reachable by the page that hosts SuperDoc.
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* const superdoc = new SuperDoc({ selector: '#editor', document: file });
|
|
313
|
+
* const stop = superdoc.ui.comments.observe((comments) => render(comments));
|
|
314
|
+
* superdoc.ui.commands.get('bold').getState(); // { enabled, active, ... }
|
|
315
|
+
*/
|
|
316
|
+
get ui(): BorrowedSuperDocUI;
|
|
317
|
+
/**
|
|
318
|
+
* Snapshot of the current SuperDoc state. Always reflects the most
|
|
319
|
+
* recent values from the Pinia store; consumers must re-read on
|
|
320
|
+
* change rather than caching.
|
|
321
|
+
*
|
|
322
|
+
* @see {@link SuperDocState} for the public return shape. The runtime
|
|
323
|
+
* still walks `RuntimeDocument[]` internally, but `state.documents`
|
|
324
|
+
* is exposed as the public `Document[]` view - consumers should not
|
|
325
|
+
* rely on the richer runtime fields (`getEditor`, etc.).
|
|
326
|
+
*/
|
|
327
|
+
get state(): SuperDocState;
|
|
328
|
+
/**
|
|
329
|
+
* Look up the DocumentRendererRuntime associated with a given documentId.
|
|
330
|
+
* Returns null if no document matches or the document has no
|
|
331
|
+
* renderer runtime. Replaces raw store reach for `custom UI` host routing
|
|
332
|
+
* (SD-3213f).
|
|
333
|
+
*
|
|
334
|
+
*/
|
|
335
|
+
getDocumentRuntimeForDocument(documentId: string): DocumentRendererRuntime | null;
|
|
336
|
+
/**
|
|
337
|
+
* Look up a comment by id. Returns null if not found. Replaces the
|
|
338
|
+
* legacy `superdoc.commentsStore.getComment(id)` reach for
|
|
339
|
+
* `custom UI` helpers (SD-3213f). The return type is
|
|
340
|
+
* intentionally wide (`Record<string, unknown> | null`) so the public
|
|
341
|
+
* surface does not pull the Pinia comment model type graph.
|
|
342
|
+
*
|
|
343
|
+
*/
|
|
344
|
+
getComment(commentId: string): Record<string, unknown> | null;
|
|
345
|
+
/**
|
|
346
|
+
* Get the SuperDoc container element
|
|
347
|
+
*/
|
|
348
|
+
get element(): Element | null;
|
|
349
|
+
/**
|
|
350
|
+
* Upgrade a local SuperDoc instance into collaboration by overwriting
|
|
351
|
+
* the supplied room with the current local document and comment state,
|
|
352
|
+
* then attaching collaboration to the live editor instance in place.
|
|
353
|
+
*
|
|
354
|
+
* This is a **destructive promotion**: the target room is authoritatively
|
|
355
|
+
* overwritten with the caller's current local state. It is NOT the API
|
|
356
|
+
* for joining an existing room without changing its content.
|
|
357
|
+
*
|
|
358
|
+
* Currently limited to:
|
|
359
|
+
* - A single DOCX document
|
|
360
|
+
* - A supported v2 single-doc `v2Collaboration` target
|
|
361
|
+
* - Overwrite-and-upgrade only (no merge semantics)
|
|
362
|
+
*
|
|
363
|
+
* @returns Resolves once the collaborative runtime is ready
|
|
364
|
+
*/
|
|
365
|
+
upgradeToCollaboration(options: UpgradeToCollaborationOptions): Promise<void>;
|
|
366
|
+
/**
|
|
367
|
+
* Add a user to the shared users list. Requires the instance to be
|
|
368
|
+
* ready; pre-ready mutations would be silently overwritten by the
|
|
369
|
+
* `this.users = this.config.users || []` re-seed inside `#init`.
|
|
370
|
+
*
|
|
371
|
+
* @param user The user to add
|
|
372
|
+
*/
|
|
373
|
+
addSharedUser(user: User): void;
|
|
374
|
+
/**
|
|
375
|
+
* Remove a user from the shared users list. Requires the instance
|
|
376
|
+
* to be ready for the same reason as `addSharedUser`. Accepts
|
|
377
|
+
* either a user-like object or a legacy email string.
|
|
378
|
+
*
|
|
379
|
+
* @param userOrEmail The user or email of the user to remove
|
|
380
|
+
*/
|
|
381
|
+
removeSharedUser(userOrEmail: User | string): void;
|
|
382
|
+
/**
|
|
383
|
+
* Forward the editor's raw content-error to the consumer callback,
|
|
384
|
+
* enriching with documentId and the source file. `error` is widened
|
|
385
|
+
* to `unknown` because editor emitters do not normalize to
|
|
386
|
+
* `Error` consistently (e.g. `insertContentAt` forwards the original
|
|
387
|
+
* caught value).
|
|
388
|
+
*
|
|
389
|
+
*/
|
|
390
|
+
onContentError({ error, editor }: {
|
|
391
|
+
error: unknown;
|
|
392
|
+
editor: Editor;
|
|
393
|
+
}): void;
|
|
394
|
+
/**
|
|
395
|
+
* Triggered when the PDF document is ready
|
|
396
|
+
*/
|
|
397
|
+
broadcastPdfDocumentReady(): void;
|
|
398
|
+
/**
|
|
399
|
+
* Triggered when the superdoc is ready
|
|
400
|
+
*/
|
|
401
|
+
broadcastReady(): void;
|
|
402
|
+
/**
|
|
403
|
+
* Triggered before an editor is created
|
|
404
|
+
* @param editor The editor that is about to be created
|
|
405
|
+
*/
|
|
406
|
+
broadcastEditorBeforeCreate(editor: Editor): void;
|
|
407
|
+
/**
|
|
408
|
+
* Triggered when an editor is created
|
|
409
|
+
* @param editor The editor that was created
|
|
410
|
+
*/
|
|
411
|
+
broadcastEditorCreate(editor: Editor): void;
|
|
412
|
+
broadcastSourceComplete(): void;
|
|
413
|
+
broadcastSourceSignalsComplete(): void;
|
|
414
|
+
/**
|
|
415
|
+
* Triggered when an editor is destroyed
|
|
416
|
+
*/
|
|
417
|
+
broadcastEditorDestroy(): void;
|
|
418
|
+
/**
|
|
419
|
+
* Triggered when the comments sidebar is toggled
|
|
420
|
+
*/
|
|
421
|
+
broadcastSidebarToggle(isOpened: boolean): void;
|
|
422
|
+
/**
|
|
423
|
+
* Read-only font surface: the substitution- and load-aware report for the active
|
|
424
|
+
* editor's document. Pulls on demand (the same report streams via `fonts-changed`).
|
|
425
|
+
* Stable identity; the closures always read the current `activeEditor`. Returns empty
|
|
426
|
+
* arrays when no editor is active or layout mode is off.
|
|
427
|
+
*/
|
|
428
|
+
get fonts(): SuperDocFontsApi;
|
|
429
|
+
/**
|
|
430
|
+
* Set the active editor compatibility projection. Registered runtimes route
|
|
431
|
+
* through the registry so the active runtime and `activeEditor` cannot drift.
|
|
432
|
+
*
|
|
433
|
+
* @param editor The editor to set as active
|
|
434
|
+
*/
|
|
435
|
+
setActiveEditor(editor: Editor | null): void;
|
|
436
|
+
getV2FeatureMatrix(): {
|
|
437
|
+
feature: string;
|
|
438
|
+
status: string;
|
|
439
|
+
reason: string;
|
|
440
|
+
}[];
|
|
441
|
+
get v2(): {
|
|
442
|
+
version: number;
|
|
443
|
+
featureMatrix: {
|
|
444
|
+
feature: string;
|
|
445
|
+
status: string;
|
|
446
|
+
reason: string;
|
|
447
|
+
}[];
|
|
448
|
+
} | null;
|
|
449
|
+
/**
|
|
450
|
+
* Register a mounted editor runtime with the shell-owned registry.
|
|
451
|
+
*
|
|
452
|
+
* @param runtime
|
|
453
|
+
* @internal
|
|
454
|
+
*/
|
|
455
|
+
private registerEditorRuntime;
|
|
456
|
+
/**
|
|
457
|
+
* Unregister a mounted editor runtime by id. If it was active, active state
|
|
458
|
+
* clears and the registry does not auto-promote a different runtime.
|
|
459
|
+
*
|
|
460
|
+
* @param runtimeId
|
|
461
|
+
* @returns Whether a runtime was removed.
|
|
462
|
+
* @internal
|
|
463
|
+
*/
|
|
464
|
+
private unregisterEditorRuntime;
|
|
465
|
+
/**
|
|
466
|
+
* Return the active editor runtime, or null.
|
|
467
|
+
*
|
|
468
|
+
* @internal
|
|
469
|
+
*/
|
|
470
|
+
private getActiveRuntime;
|
|
471
|
+
/**
|
|
472
|
+
* Select the active editor runtime, or clear it with null.
|
|
473
|
+
*
|
|
474
|
+
* @param runtimeId
|
|
475
|
+
* @param reason
|
|
476
|
+
* @internal
|
|
477
|
+
*/
|
|
478
|
+
private setActiveRuntime;
|
|
479
|
+
/**
|
|
480
|
+
* Resolve which mounted runtime owns a DOM event target.
|
|
481
|
+
*
|
|
482
|
+
* @param target
|
|
483
|
+
* @internal
|
|
484
|
+
*/
|
|
485
|
+
private resolveRuntimeFromEventTarget;
|
|
486
|
+
/**
|
|
487
|
+
* Resolve and activate the runtime that owns a DOM event target.
|
|
488
|
+
*
|
|
489
|
+
* @param target
|
|
490
|
+
* @param reason
|
|
491
|
+
* @returns Whether a runtime was resolved and activated.
|
|
492
|
+
* @internal
|
|
493
|
+
*/
|
|
494
|
+
private activateRuntimeFromEventTarget;
|
|
495
|
+
/**
|
|
496
|
+
* Toggle the ruler visibility for document editors.
|
|
497
|
+
*
|
|
498
|
+
*/
|
|
499
|
+
toggleRuler(): void;
|
|
500
|
+
/**
|
|
501
|
+
* Determine whether the current configuration allows a given permission.
|
|
502
|
+
* Used by downstream consumers (toolbar, context menu, commands) to keep
|
|
503
|
+
* tracked-change affordances consistent with customer overrides.
|
|
504
|
+
*
|
|
505
|
+
* The `comment` and `trackedChange` fields on the input carry open
|
|
506
|
+
* index signatures because the function forwards the full payload to
|
|
507
|
+
* `isAllowed()`; tracked-change payloads from the editor include
|
|
508
|
+
* `type`, `attrs`, `from`, `to`, `segments`, and consumer comment
|
|
509
|
+
* shapes vary. The fields read directly here are documented on the
|
|
510
|
+
* input type itself.
|
|
511
|
+
*
|
|
512
|
+
* @see {@link CanPerformPermissionParams} for the input shape.
|
|
513
|
+
*/
|
|
514
|
+
canPerformPermission({ permission, role, isInternal, comment, trackedChange, }?: CanPerformPermissionParams): boolean;
|
|
515
|
+
/**
|
|
516
|
+
* Add a comments list to the superdoc
|
|
517
|
+
* Requires the comments module to be enabled
|
|
518
|
+
* @param element The DOM element to render the comments list in
|
|
519
|
+
*/
|
|
520
|
+
addCommentsList(element: HTMLElement): void;
|
|
521
|
+
/**
|
|
522
|
+
* Remove the comments list from the superdoc
|
|
523
|
+
*/
|
|
524
|
+
removeCommentsList(): void;
|
|
525
|
+
/**
|
|
526
|
+
* Scroll the document to a given comment by id.
|
|
527
|
+
*
|
|
528
|
+
* @param commentId The comment id
|
|
529
|
+
* @param [options]
|
|
530
|
+
* @returns Whether a matching element was found
|
|
531
|
+
*/
|
|
532
|
+
scrollToComment(commentId: string, options?: {
|
|
533
|
+
behavior?: ScrollBehavior;
|
|
534
|
+
block?: ScrollLogicalPosition;
|
|
535
|
+
}): boolean;
|
|
536
|
+
/**
|
|
537
|
+
* Navigate to a block, bookmark, comment, or tracked change target.
|
|
538
|
+
*
|
|
539
|
+
* Story-aware navigation is currently supported for bookmark and tracked
|
|
540
|
+
* change targets. Block and comment targets are body-only.
|
|
541
|
+
*
|
|
542
|
+
* @returns Whether the target was found and navigated to.
|
|
543
|
+
*/
|
|
544
|
+
navigateTo(target: NavigableAddress): Promise<boolean>;
|
|
545
|
+
/**
|
|
546
|
+
* Scroll to any document element by its ID.
|
|
547
|
+
*
|
|
548
|
+
* Pass any element ID — paragraph nodeId, comment entityId, or tracked
|
|
549
|
+
* change entityId. The method resolves the element type automatically
|
|
550
|
+
* and scrolls to it.
|
|
551
|
+
*
|
|
552
|
+
* @param elementId - The element's stable ID.
|
|
553
|
+
* @returns Whether the element was found and scrolled to.
|
|
554
|
+
*
|
|
555
|
+
* @example
|
|
556
|
+
* // Navigate to a paragraph by its nodeId
|
|
557
|
+
* await superdoc.scrollToElement('5AF80E61');
|
|
558
|
+
*
|
|
559
|
+
* // Navigate to a comment by its entityId
|
|
560
|
+
* await superdoc.scrollToElement('imported-25def254');
|
|
561
|
+
*/
|
|
562
|
+
scrollToElement(elementId: string): Promise<boolean>;
|
|
563
|
+
/**
|
|
564
|
+
* Toggle the custom context menu globally.
|
|
565
|
+
* Updates both flow editors and DocumentRendererRuntime instances so downstream listeners can short-circuit early.
|
|
566
|
+
*/
|
|
567
|
+
setDisableContextMenu(disabled?: boolean): void;
|
|
568
|
+
/**
|
|
569
|
+
* SD-2454: Toggle bookmark bracket indicators (opt-in, off by default).
|
|
570
|
+
* Matches Word's "Show bookmarks" option. Triggers a re-layout on change
|
|
571
|
+
* because the brackets are visible characters participating in text flow.
|
|
572
|
+
*/
|
|
573
|
+
setShowBookmarks(show?: boolean): void;
|
|
574
|
+
/**
|
|
575
|
+
* Toggle nonprinting formatting marks (spaces, tabs, paragraph marks) in the
|
|
576
|
+
* rendered layout. This is a view-only setting and is not exported to DOCX.
|
|
577
|
+
*/
|
|
578
|
+
setShowFormattingMarks(show?: boolean): void;
|
|
579
|
+
/**
|
|
580
|
+
* Toggle nonprinting formatting marks from their current state.
|
|
581
|
+
*/
|
|
582
|
+
toggleFormattingMarks(): void;
|
|
583
|
+
/**
|
|
584
|
+
* Set the document mode.
|
|
585
|
+
*/
|
|
586
|
+
setDocumentMode(type: DocumentMode): void;
|
|
587
|
+
/**
|
|
588
|
+
* Force DocumentRendererRuntime instances to render a specific tracked-changes mode
|
|
589
|
+
* or disable tracked-change metadata entirely.
|
|
590
|
+
*
|
|
591
|
+
* @param [preferences]
|
|
592
|
+
*/
|
|
593
|
+
setTrackedChangesPreferences(preferences?: {
|
|
594
|
+
mode?: 'review' | 'original' | 'final' | 'off';
|
|
595
|
+
enabled?: boolean;
|
|
596
|
+
}): void;
|
|
597
|
+
/**
|
|
598
|
+
* Search for text or regex in the active editor.
|
|
599
|
+
*
|
|
600
|
+
* Returns `undefined` when there is no active editor; otherwise
|
|
601
|
+
* returns the array of matches the underlying search command produced
|
|
602
|
+
* (possibly empty).
|
|
603
|
+
*
|
|
604
|
+
* @param text The text or regex to search for
|
|
605
|
+
* @returns The search results, or `undefined` when there is no active editor
|
|
606
|
+
* or the active legacy projection exposes no `search` command (e.g. a
|
|
607
|
+
* v2-shaped runtime with `commands: null`).
|
|
608
|
+
*/
|
|
609
|
+
search(text: string | RegExp): SearchMatch[] | undefined;
|
|
610
|
+
/**
|
|
611
|
+
* Go to the next search result.
|
|
612
|
+
*
|
|
613
|
+
* Pass back a match returned by `superdoc.search()` unchanged; the
|
|
614
|
+
* runtime resolves its current document position via the embedded
|
|
615
|
+
* tracker ids.
|
|
616
|
+
*
|
|
617
|
+
* @param match The match object returned by `superdoc.search()`.
|
|
618
|
+
* @returns Whether the command dispatched, or `undefined` when there is no
|
|
619
|
+
* active editor or the active legacy projection exposes no
|
|
620
|
+
* `goToSearchResult` command (e.g. a v2-shaped runtime with `commands:
|
|
621
|
+
* null`).
|
|
622
|
+
*/
|
|
623
|
+
goToSearchResult(match: SearchMatch): boolean | undefined;
|
|
624
|
+
/**
|
|
625
|
+
* Get the current zoom level as a percentage (e.g., 100 for 100%)
|
|
626
|
+
* @returns The current zoom level as a percentage
|
|
627
|
+
* @example
|
|
628
|
+
* const zoom = superdoc.getZoom(); // Returns 100, 150, 200, etc.
|
|
629
|
+
*/
|
|
630
|
+
getZoom(): number;
|
|
631
|
+
/**
|
|
632
|
+
* Set the zoom level for all documents and switch the zoom mode to
|
|
633
|
+
* `manual` (an explicit numeric zoom expresses intent to leave
|
|
634
|
+
* `fit-width`; use `setZoomMode('fit-width')` to re-enter fitting).
|
|
635
|
+
* Updates the centralized activeZoom state, which propagates to all
|
|
636
|
+
* presentation editors, PDF viewers, and whiteboard layers via the Vue watcher.
|
|
637
|
+
* @param percent - The zoom level as a percentage (e.g., 100, 150, 200)
|
|
638
|
+
* @example
|
|
639
|
+
* superdoc.setZoom(150); // Set zoom to 150%, mode becomes 'manual'
|
|
640
|
+
* superdoc.setZoom(50); // Set zoom to 50%
|
|
641
|
+
*/
|
|
642
|
+
setZoom(percent: number): void;
|
|
643
|
+
/**
|
|
644
|
+
* Switch the zoom mode. `fit-width` continuously re-fits the
|
|
645
|
+
* document to the available container width (clamped by
|
|
646
|
+
* `config.zoom.fitWidth`); `manual` holds the current value.
|
|
647
|
+
* Switching to `fit-width` applies the fit immediately when
|
|
648
|
+
* viewport metrics are available. Emits `zoomChange` (with the
|
|
649
|
+
* current value) so zoom UIs observe mode-only transitions; a
|
|
650
|
+
* same-mode call is a no-op.
|
|
651
|
+
* @param mode - The zoom mode: `'manual'` or `'fit-width'`
|
|
652
|
+
* @example
|
|
653
|
+
* superdoc.setZoomMode('fit-width'); // start fitting to the container
|
|
654
|
+
* superdoc.setZoomMode('manual'); // hold the current zoom value
|
|
655
|
+
*/
|
|
656
|
+
setZoomMode(mode: SuperDocZoomMode): void;
|
|
657
|
+
/**
|
|
658
|
+
* Get a snapshot of the current zoom state: mode, value, the latest
|
|
659
|
+
* computed fit zoom (null before the first viewport measurement),
|
|
660
|
+
* and the effective fit bounds.
|
|
661
|
+
* @returns The current zoom state snapshot
|
|
662
|
+
* @example
|
|
663
|
+
* const { mode, value, fitZoom } = superdoc.getZoomState();
|
|
664
|
+
*/
|
|
665
|
+
getZoomState(): SuperDocZoomState;
|
|
666
|
+
/**
|
|
667
|
+
* Get the latest viewport measurements: the width available to the
|
|
668
|
+
* document, the document's base page width at 100% zoom, and the
|
|
669
|
+
* unclamped fit zoom. Returns `null` until the first measurement
|
|
670
|
+
* (editors still mounting). Subscribe to `viewport-change` (or pass
|
|
671
|
+
* `Config.onViewportChange`) for updates.
|
|
672
|
+
* @returns The latest viewport metrics, or `null` before the first measurement
|
|
673
|
+
* @example
|
|
674
|
+
* const metrics = superdoc.getViewportMetrics();
|
|
675
|
+
* if (metrics) superdoc.setZoom(Math.min(100, metrics.fitZoom));
|
|
676
|
+
*/
|
|
677
|
+
getViewportMetrics(): SuperDocViewportMetrics | null;
|
|
678
|
+
/**
|
|
679
|
+
* Get the current measurement unit for rulers and measurement fields
|
|
680
|
+
* (`'in'` or `'cm'`). Defaults to `'in'` before initialization.
|
|
681
|
+
* @returns The current measurement unit
|
|
682
|
+
* @example
|
|
683
|
+
* const unit = superdoc.getMeasurementUnit(); // 'in' | 'cm'
|
|
684
|
+
*/
|
|
685
|
+
getMeasurementUnit(): SuperDocMeasurementUnit;
|
|
686
|
+
/**
|
|
687
|
+
* Set the document-wide measurement unit for rulers and measurement fields
|
|
688
|
+
* (Word's "measurement units" preference). Updates the centralized state,
|
|
689
|
+
* which propagates to the ruler and header/footer measurement fields via the
|
|
690
|
+
* Vue watcher in `SuperDoc.vue`.
|
|
691
|
+
* @param unit - `'in'` for inches or `'cm'` for centimetres
|
|
692
|
+
* @example
|
|
693
|
+
* superdoc.setMeasurementUnit('cm'); // ruler + measurement fields switch to cm
|
|
694
|
+
*/
|
|
695
|
+
setMeasurementUnit(unit: SuperDocMeasurementUnit): void;
|
|
696
|
+
/**
|
|
697
|
+
* Set the document to locked or unlocked
|
|
698
|
+
*/
|
|
699
|
+
setLocked(lock?: boolean): void;
|
|
700
|
+
/**
|
|
701
|
+
* Get the HTML content of all editors
|
|
702
|
+
* @returns The HTML content of all editors
|
|
703
|
+
*/
|
|
704
|
+
getHTML(options?: Parameters<Editor['getHTML']>[0]): unknown[];
|
|
705
|
+
/**
|
|
706
|
+
* Lock the current superdoc and emit the `locked` event.
|
|
707
|
+
*
|
|
708
|
+
* @param [isLocked] Whether the superdoc is locked. Defaults to `false`.
|
|
709
|
+
* @param [lockedBy] The user who locked the superdoc, or `null`
|
|
710
|
+
* when unlocking (or when no user is known). Defaults to `null`.
|
|
711
|
+
*/
|
|
712
|
+
lockSuperdoc(isLocked?: boolean, lockedBy?: User | null): void;
|
|
713
|
+
/**
|
|
714
|
+
* Export the superdoc to a file
|
|
715
|
+
* @param params - Export configuration
|
|
716
|
+
*/
|
|
717
|
+
export({ exportType, commentsType, exportedName, additionalFiles, additionalFileNames, isFinalDoc, triggerDownload, fieldsHighlightColor, }?: ExportParams): Promise<Blob>;
|
|
718
|
+
/**
|
|
719
|
+
* Replace the active document with a new file while preserving the mounted
|
|
720
|
+
* editor instance when the active runtime supports it.
|
|
721
|
+
*
|
|
722
|
+
* V2 collaboration routes this through the host-owned replace-file command so
|
|
723
|
+
* the room can be atomically cleared and reseeded instead of tearing down the
|
|
724
|
+
* SuperDoc instance and racing an empty Y.Doc against imported DOCX bytes.
|
|
725
|
+
*/
|
|
726
|
+
replaceFile(source: File | Blob | ArrayBuffer | Uint8Array): Promise<unknown>;
|
|
727
|
+
/**
|
|
728
|
+
* Export editors to DOCX format.
|
|
729
|
+
* @param [options]
|
|
730
|
+
*/
|
|
731
|
+
exportEditorsToDOCX({ commentsType, isFinalDoc, fieldsHighlightColor, }?: {
|
|
732
|
+
commentsType?: string;
|
|
733
|
+
isFinalDoc?: boolean;
|
|
734
|
+
fieldsHighlightColor?: string | null;
|
|
735
|
+
}): Promise<Blob[]>;
|
|
736
|
+
/**
|
|
737
|
+
* Save the superdoc if in collaboration mode. Resolves when all
|
|
738
|
+
* collaboration documents have flushed their pending writes.
|
|
739
|
+
*/
|
|
740
|
+
save(): Promise<void>;
|
|
741
|
+
/**
|
|
742
|
+
* Open a surface (dialog or floating) above the document content.
|
|
743
|
+
*
|
|
744
|
+
*/
|
|
745
|
+
openSurface<TResult = unknown>(request: SurfaceRequest): SurfaceHandle<TResult>;
|
|
746
|
+
/**
|
|
747
|
+
* Close a surface by id, or the topmost surface if no id is given.
|
|
748
|
+
*/
|
|
749
|
+
closeSurface(id?: string): void;
|
|
750
|
+
/**
|
|
751
|
+
* Remove one mounted document from the shell by document id.
|
|
752
|
+
*
|
|
753
|
+
* Clears any registered runtimes for that document without silently
|
|
754
|
+
* promoting another runtime, prunes shell-owned comment state for the
|
|
755
|
+
* document, and resolves after Vue flushes the unmount so DOM-based callers
|
|
756
|
+
* can observe the root disappearing.
|
|
757
|
+
*
|
|
758
|
+
* @param documentId The document id to remove.
|
|
759
|
+
* @returns `true` when a document was removed, `false` when none matched.
|
|
760
|
+
*/
|
|
761
|
+
removeDocument(documentId: string): Promise<boolean>;
|
|
762
|
+
/**
|
|
763
|
+
* Destroy the superdoc instance
|
|
764
|
+
*/
|
|
765
|
+
destroy(): void;
|
|
766
|
+
/**
|
|
767
|
+
* Focus the active editor or the first editor in the superdoc
|
|
768
|
+
*/
|
|
769
|
+
focus(options?: EditorRuntimeFocusOptions): void;
|
|
770
|
+
/**
|
|
771
|
+
* Set the high contrast mode
|
|
772
|
+
*/
|
|
773
|
+
setHighContrastMode(isHighContrast: boolean): void;
|
|
774
|
+
}
|
|
775
|
+
export {};
|