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,142 @@
|
|
|
1
|
+
import { ReceiptFailure } from '../types/receipt.js';
|
|
2
|
+
import { StylesChannel } from './registry.js';
|
|
3
|
+
import { StylesGetCatalogInput, StylesGetCatalogResult } from './catalog.js';
|
|
4
|
+
/** Tri-state for OOXML boolean style properties. */
|
|
5
|
+
export type StylesBooleanState = 'on' | 'off' | 'inherit';
|
|
6
|
+
export type StylesNumberState = number | 'inherit';
|
|
7
|
+
export type StylesEnumState = string | 'inherit';
|
|
8
|
+
export type StylesObjectState = Record<string, unknown> | 'inherit';
|
|
9
|
+
export type StylesArrayState = unknown[] | 'inherit';
|
|
10
|
+
/** Patch for run-channel properties (docDefaults/w:rPrDefault/w:rPr). */
|
|
11
|
+
export interface StylesRunPatch {
|
|
12
|
+
bold?: boolean;
|
|
13
|
+
boldCs?: boolean;
|
|
14
|
+
italic?: boolean;
|
|
15
|
+
iCs?: boolean;
|
|
16
|
+
smallCaps?: boolean;
|
|
17
|
+
strike?: boolean;
|
|
18
|
+
dstrike?: boolean;
|
|
19
|
+
emboss?: boolean;
|
|
20
|
+
imprint?: boolean;
|
|
21
|
+
outline?: boolean;
|
|
22
|
+
shadow?: boolean;
|
|
23
|
+
vanish?: boolean;
|
|
24
|
+
webHidden?: boolean;
|
|
25
|
+
specVanish?: boolean;
|
|
26
|
+
snapToGrid?: boolean;
|
|
27
|
+
noProof?: boolean;
|
|
28
|
+
fontSize?: number;
|
|
29
|
+
fontSizeCs?: number;
|
|
30
|
+
letterSpacing?: number;
|
|
31
|
+
kern?: number;
|
|
32
|
+
position?: number;
|
|
33
|
+
w?: number;
|
|
34
|
+
textTransform?: string;
|
|
35
|
+
vertAlign?: string;
|
|
36
|
+
em?: string;
|
|
37
|
+
effect?: string;
|
|
38
|
+
fontFamily?: Record<string, unknown>;
|
|
39
|
+
color?: Record<string, unknown>;
|
|
40
|
+
underline?: Record<string, unknown>;
|
|
41
|
+
borders?: Record<string, unknown>;
|
|
42
|
+
shading?: Record<string, unknown>;
|
|
43
|
+
lang?: Record<string, unknown>;
|
|
44
|
+
eastAsianLayout?: Record<string, unknown>;
|
|
45
|
+
fitText?: Record<string, unknown>;
|
|
46
|
+
}
|
|
47
|
+
/** Patch for paragraph-channel properties (docDefaults/w:pPrDefault/w:pPr). */
|
|
48
|
+
export interface StylesParagraphPatch {
|
|
49
|
+
keepLines?: boolean;
|
|
50
|
+
keepNext?: boolean;
|
|
51
|
+
widowControl?: boolean;
|
|
52
|
+
contextualSpacing?: boolean;
|
|
53
|
+
pageBreakBefore?: boolean;
|
|
54
|
+
suppressAutoHyphens?: boolean;
|
|
55
|
+
suppressLineNumbers?: boolean;
|
|
56
|
+
suppressOverlap?: boolean;
|
|
57
|
+
mirrorIndents?: boolean;
|
|
58
|
+
wordWrap?: boolean;
|
|
59
|
+
kinsoku?: boolean;
|
|
60
|
+
overflowPunct?: boolean;
|
|
61
|
+
topLinePunct?: boolean;
|
|
62
|
+
autoSpaceDE?: boolean;
|
|
63
|
+
autoSpaceDN?: boolean;
|
|
64
|
+
adjustRightInd?: boolean;
|
|
65
|
+
rightToLeft?: boolean;
|
|
66
|
+
snapToGrid?: boolean;
|
|
67
|
+
outlineLvl?: number;
|
|
68
|
+
justification?: string;
|
|
69
|
+
textAlignment?: string;
|
|
70
|
+
textDirection?: string;
|
|
71
|
+
textboxTightWrap?: string;
|
|
72
|
+
spacing?: Record<string, unknown>;
|
|
73
|
+
indent?: Record<string, unknown>;
|
|
74
|
+
shading?: Record<string, unknown>;
|
|
75
|
+
numberingProperties?: Record<string, unknown>;
|
|
76
|
+
framePr?: Record<string, unknown>;
|
|
77
|
+
borders?: Record<string, unknown>;
|
|
78
|
+
tabStops?: unknown[];
|
|
79
|
+
}
|
|
80
|
+
export interface StylesTargetResolution {
|
|
81
|
+
scope: 'docDefaults';
|
|
82
|
+
channel: StylesChannel;
|
|
83
|
+
xmlPart: 'word/styles.xml';
|
|
84
|
+
xmlPath: string;
|
|
85
|
+
}
|
|
86
|
+
export interface StylesApplyRunInput {
|
|
87
|
+
target: {
|
|
88
|
+
scope: 'docDefaults';
|
|
89
|
+
channel: 'run';
|
|
90
|
+
};
|
|
91
|
+
patch: StylesRunPatch;
|
|
92
|
+
}
|
|
93
|
+
export interface StylesApplyParagraphInput {
|
|
94
|
+
target: {
|
|
95
|
+
scope: 'docDefaults';
|
|
96
|
+
channel: 'paragraph';
|
|
97
|
+
};
|
|
98
|
+
patch: StylesParagraphPatch;
|
|
99
|
+
}
|
|
100
|
+
export type StylesApplyInput = StylesApplyRunInput | StylesApplyParagraphInput;
|
|
101
|
+
export interface StylesApplyOptions {
|
|
102
|
+
dryRun?: boolean;
|
|
103
|
+
expectedRevision?: string;
|
|
104
|
+
}
|
|
105
|
+
export type StylesStateMap = Record<string, StylesBooleanState | StylesNumberState | StylesEnumState | StylesObjectState | StylesArrayState>;
|
|
106
|
+
export interface StylesApplyReceiptSuccess {
|
|
107
|
+
success: true;
|
|
108
|
+
changed: boolean;
|
|
109
|
+
resolution: StylesTargetResolution;
|
|
110
|
+
dryRun: boolean;
|
|
111
|
+
before: StylesStateMap;
|
|
112
|
+
after: StylesStateMap;
|
|
113
|
+
}
|
|
114
|
+
export interface StylesApplyReceiptFailure {
|
|
115
|
+
success: false;
|
|
116
|
+
resolution: StylesTargetResolution;
|
|
117
|
+
failure: ReceiptFailure;
|
|
118
|
+
}
|
|
119
|
+
export type StylesApplyReceipt = StylesApplyReceiptSuccess | StylesApplyReceiptFailure;
|
|
120
|
+
export interface StylesAdapter {
|
|
121
|
+
apply(input: StylesApplyRunInput, options: NormalizedStylesApplyOptions): StylesApplyReceipt;
|
|
122
|
+
apply(input: StylesApplyParagraphInput, options: NormalizedStylesApplyOptions): StylesApplyReceipt;
|
|
123
|
+
apply(input: StylesApplyInput, options: NormalizedStylesApplyOptions): StylesApplyReceipt;
|
|
124
|
+
/** Read the normalized style catalogue. See `styles/catalog.ts`. */
|
|
125
|
+
getCatalog?(input?: StylesGetCatalogInput): StylesGetCatalogResult;
|
|
126
|
+
}
|
|
127
|
+
export interface NormalizedStylesApplyOptions {
|
|
128
|
+
dryRun: boolean;
|
|
129
|
+
expectedRevision: string | undefined;
|
|
130
|
+
}
|
|
131
|
+
export interface StylesApi {
|
|
132
|
+
apply(input: StylesApplyRunInput, options?: StylesApplyOptions): StylesApplyReceipt;
|
|
133
|
+
apply(input: StylesApplyParagraphInput, options?: StylesApplyOptions): StylesApplyReceipt;
|
|
134
|
+
apply(input: StylesApplyInput, options?: StylesApplyOptions): StylesApplyReceipt;
|
|
135
|
+
/** Read the normalized style catalogue for discovery and quick-gallery UI. */
|
|
136
|
+
getCatalog(input?: StylesGetCatalogInput): StylesGetCatalogResult;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Executes `styles.apply` using the provided adapter.
|
|
140
|
+
* Validates input and options, then delegates to the adapter.
|
|
141
|
+
*/
|
|
142
|
+
export declare function executeStylesApply(adapter: StylesAdapter, input: StylesApplyInput, options?: StylesApplyOptions): StylesApplyReceipt;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `styles.getCatalog`: read-only style catalogue projection.
|
|
3
|
+
*
|
|
4
|
+
* The catalogue is the stable, normalized, editor-neutral view of the styles
|
|
5
|
+
* available in a document. It is the SDK / CLI / MCP / custom-UI integration
|
|
6
|
+
* point for style discovery, and the source the built-in toolbar and the
|
|
7
|
+
* future Styles pane consume.
|
|
8
|
+
*
|
|
9
|
+
* This module owns only the public contract types, input validation, and the
|
|
10
|
+
* execution entry point. The runtime projection is produced by the v2 adapter
|
|
11
|
+
* (which compiles a Word style model from package parts and calls the shared
|
|
12
|
+
* style-model projector); the raw style-engine shapes never reach this public
|
|
13
|
+
* surface.
|
|
14
|
+
*
|
|
15
|
+
* `DocumentInfo.styles` is a usage summary and intentionally stays separate
|
|
16
|
+
* from this available-style catalogue.
|
|
17
|
+
*
|
|
18
|
+
* Engine-agnostic: no ProseMirror, Yjs, or converter imports.
|
|
19
|
+
*/
|
|
20
|
+
/** Catalogue view selector. `inUse` lists styles referenced by document content. */
|
|
21
|
+
export type StyleCatalogView = 'quickGallery' | 'recommended' | 'currentDocument' | 'all' | 'inUse';
|
|
22
|
+
/** Normalized style kind. `linked` is a deduplicated paragraph/character pair. */
|
|
23
|
+
export type StyleCatalogItemType = 'paragraph' | 'character' | 'linked' | 'table' | 'numbering' | 'unknown';
|
|
24
|
+
/** Type filter values accepted on input (the concrete, requestable kinds). */
|
|
25
|
+
export type StyleCatalogFilterType = Exclude<StyleCatalogItemType, 'unknown'>;
|
|
26
|
+
/** Where a catalogue item originated. */
|
|
27
|
+
export type StyleProvenance = 'authored' | 'default-floor' | 'latent';
|
|
28
|
+
export type StyleCatalogDiagnosticSeverity = 'info' | 'warning' | 'error';
|
|
29
|
+
/** Status of a backing OOXML package part. */
|
|
30
|
+
export type StyleSourcePartStatus = 'present' | 'missing' | 'malformed';
|
|
31
|
+
/**
|
|
32
|
+
* Usage-scan availability. `unsupported` when usage was not requested;
|
|
33
|
+
* `complete` when the full document was scanned; `partial` when the body story
|
|
34
|
+
* was scanned but secondary stories (headers/footers/comments/footnotes/endnotes)
|
|
35
|
+
* were deferred; `failed` when the body story could not be scanned and usage is
|
|
36
|
+
* unavailable.
|
|
37
|
+
*/
|
|
38
|
+
export type StyleCatalogUsageStatus = 'unsupported' | 'complete' | 'partial' | 'failed';
|
|
39
|
+
/** Preview-resolution availability. `available` once previews were requested and resolved. */
|
|
40
|
+
export type StyleCatalogPreviewStatus = 'unsupported' | 'available';
|
|
41
|
+
/** Whether the requested `view` is supported in this pass. */
|
|
42
|
+
export type StyleCatalogViewStatus = 'supported' | 'unsupported';
|
|
43
|
+
export declare const STYLE_CATALOG_VIEWS: readonly StyleCatalogView[];
|
|
44
|
+
export declare const STYLE_CATALOG_FILTER_TYPES: readonly StyleCatalogFilterType[];
|
|
45
|
+
export interface StyleCatalogItemVisibility {
|
|
46
|
+
/** Belongs in the Word-style quick gallery (Home-tab Styles gallery). */
|
|
47
|
+
quickGallery: boolean;
|
|
48
|
+
/** Belongs in the pane "Recommended" view. */
|
|
49
|
+
recommended: boolean;
|
|
50
|
+
/** Belongs in the pane "All styles" view. */
|
|
51
|
+
all: boolean;
|
|
52
|
+
/** Hard-hidden or semi-hidden, so it should not surface in quick UI. */
|
|
53
|
+
effectivelyHidden: boolean;
|
|
54
|
+
}
|
|
55
|
+
/** Optional usage rollup. Present when `includeUsage` (or the `inUse` view) is requested. */
|
|
56
|
+
export interface StyleCatalogItemUsage {
|
|
57
|
+
used: boolean;
|
|
58
|
+
paragraphCount?: number;
|
|
59
|
+
runCount?: number;
|
|
60
|
+
tableCount?: number;
|
|
61
|
+
numberingCount?: number;
|
|
62
|
+
}
|
|
63
|
+
/** Optional resolved preview tokens. Present when `includePreview` is requested. */
|
|
64
|
+
export interface StyleCatalogItemPreview {
|
|
65
|
+
available: boolean;
|
|
66
|
+
css?: Record<string, string | number>;
|
|
67
|
+
unsupportedReason?: string;
|
|
68
|
+
}
|
|
69
|
+
/** One normalized style. Linked paragraph/character pairs are deduplicated. */
|
|
70
|
+
export interface StyleCatalogItem {
|
|
71
|
+
id: string;
|
|
72
|
+
name: string;
|
|
73
|
+
aliases: string[];
|
|
74
|
+
type: StyleCatalogItemType;
|
|
75
|
+
custom: boolean;
|
|
76
|
+
builtin: boolean;
|
|
77
|
+
default: boolean;
|
|
78
|
+
basedOn: string | null;
|
|
79
|
+
next: string | null;
|
|
80
|
+
link: string | null;
|
|
81
|
+
priority: number | null;
|
|
82
|
+
qFormat: boolean;
|
|
83
|
+
hidden: boolean;
|
|
84
|
+
semiHidden: boolean;
|
|
85
|
+
unhideWhenUsed: boolean;
|
|
86
|
+
locked: boolean;
|
|
87
|
+
provenance: StyleProvenance;
|
|
88
|
+
visibility: StyleCatalogItemVisibility;
|
|
89
|
+
usage?: StyleCatalogItemUsage;
|
|
90
|
+
preview?: StyleCatalogItemPreview;
|
|
91
|
+
}
|
|
92
|
+
export interface StyleCatalogDefaults {
|
|
93
|
+
paragraphStyleId: string | null;
|
|
94
|
+
characterStyleId: string | null;
|
|
95
|
+
tableStyleId: string | null;
|
|
96
|
+
}
|
|
97
|
+
export interface StyleCatalogDiagnostic {
|
|
98
|
+
severity: StyleCatalogDiagnosticSeverity;
|
|
99
|
+
code: string;
|
|
100
|
+
part?: string;
|
|
101
|
+
message: string;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Per-source status so consumers can fail closed. A `missing` or `malformed`
|
|
105
|
+
* styles part still yields a default-floor catalogue with provenance, rather
|
|
106
|
+
* than guessing.
|
|
107
|
+
*/
|
|
108
|
+
export interface StyleCatalogSourceStatus {
|
|
109
|
+
styles: StyleSourcePartStatus;
|
|
110
|
+
settings: StyleSourcePartStatus;
|
|
111
|
+
usage: StyleCatalogUsageStatus;
|
|
112
|
+
preview: StyleCatalogPreviewStatus;
|
|
113
|
+
view: StyleCatalogViewStatus;
|
|
114
|
+
}
|
|
115
|
+
export interface StylesGetCatalogInput {
|
|
116
|
+
/** Which list to return as `items`. Defaults to `all`. */
|
|
117
|
+
view?: StyleCatalogView;
|
|
118
|
+
/** Restrict items to these style kinds. */
|
|
119
|
+
types?: StyleCatalogFilterType[];
|
|
120
|
+
/** Include hard-hidden / semi-hidden styles. Defaults to false. */
|
|
121
|
+
includeHidden?: boolean;
|
|
122
|
+
/** Include latent-only style metadata as `provenance: 'latent'`. Defaults to false. */
|
|
123
|
+
includeLatent?: boolean;
|
|
124
|
+
/** Request per-style usage counts (body-story scan; secondary stories deferred). */
|
|
125
|
+
includeUsage?: boolean;
|
|
126
|
+
/** Request resolved style previews (small UI-safe CSS tokens). */
|
|
127
|
+
includePreview?: boolean;
|
|
128
|
+
/** Include diagnostics on the result. Defaults to true. */
|
|
129
|
+
includeDiagnostics?: boolean;
|
|
130
|
+
}
|
|
131
|
+
export interface StylesGetCatalogResult {
|
|
132
|
+
version: 'style-catalog/v1';
|
|
133
|
+
/** Opaque catalogue revision token, or null when the runtime omits one. */
|
|
134
|
+
revision: string | null;
|
|
135
|
+
/** The view that `items` reflects (echoes the requested view). */
|
|
136
|
+
view: StyleCatalogView;
|
|
137
|
+
defaults: StyleCatalogDefaults;
|
|
138
|
+
/** The list selected by `view`, after `types` / `includeHidden` filtering. */
|
|
139
|
+
items: StyleCatalogItem[];
|
|
140
|
+
/** The full available style set, after `types` / `includeHidden` filtering. */
|
|
141
|
+
styles: StyleCatalogItem[];
|
|
142
|
+
sourceStatus: StyleCatalogSourceStatus;
|
|
143
|
+
diagnostics: StyleCatalogDiagnostic[];
|
|
144
|
+
}
|
|
145
|
+
export interface StylesGetCatalogAdapter {
|
|
146
|
+
getCatalog(input?: StylesGetCatalogInput): StylesGetCatalogResult;
|
|
147
|
+
}
|
|
148
|
+
/** Validates `styles.getCatalog` input. `undefined` is a valid (default) call. */
|
|
149
|
+
export declare function validateStylesGetCatalogInput(input?: StylesGetCatalogInput): void;
|
|
150
|
+
/**
|
|
151
|
+
* Executes `styles.getCatalog` using the provided adapter.
|
|
152
|
+
* Validates input, then delegates to the adapter.
|
|
153
|
+
*/
|
|
154
|
+
export declare function executeStylesGetCatalog(adapter: Partial<StylesGetCatalogAdapter> | null | undefined, input?: StylesGetCatalogInput): StylesGetCatalogResult;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barrel re-export for styles/ submodules.
|
|
3
|
+
*
|
|
4
|
+
* Public surface only: internal validation/schema helpers are not exposed.
|
|
5
|
+
*/
|
|
6
|
+
export type { ValueSchema, StylesChannel, MergeStrategy, PropertyDefinition } from './registry.js';
|
|
7
|
+
export { PROPERTY_REGISTRY, ALLOWED_KEYS_BY_CHANNEL, EXCLUDED_KEYS, XML_PATH_BY_CHANNEL, getPropertyDefinition, ST_VERTICAL_ALIGN_RUN, ST_EM, ST_TEXT_ALIGNMENT, ST_TEXT_DIRECTION, ST_TEXTBOX_TIGHT_WRAP, ST_TEXT_TRANSFORM, ST_JUSTIFICATION, } from './registry.js';
|
|
8
|
+
export { toJsonSchema, buildPatchSchema, buildStateSchema } from './schema.js';
|
|
9
|
+
export type { StylesBooleanState, StylesNumberState, StylesEnumState, StylesObjectState, StylesArrayState, StylesRunPatch, StylesParagraphPatch, StylesTargetResolution, StylesApplyRunInput, StylesApplyParagraphInput, StylesApplyInput, StylesApplyOptions, StylesStateMap, StylesApplyReceiptSuccess, StylesApplyReceiptFailure, StylesApplyReceipt, StylesAdapter, NormalizedStylesApplyOptions, StylesApi, } from './apply.js';
|
|
10
|
+
export { executeStylesApply } from './apply.js';
|
|
11
|
+
export type { StyleCatalogView, StyleCatalogItemType, StyleCatalogFilterType, StyleProvenance, StyleCatalogDiagnosticSeverity, StyleSourcePartStatus, StyleCatalogUsageStatus, StyleCatalogPreviewStatus, StyleCatalogViewStatus, StyleCatalogItemVisibility, StyleCatalogItemUsage, StyleCatalogItemPreview, StyleCatalogItem, StyleCatalogDefaults, StyleCatalogDiagnostic, StyleCatalogSourceStatus, StylesGetCatalogInput, StylesGetCatalogResult, StylesGetCatalogAdapter, } from './catalog.js';
|
|
12
|
+
export { STYLE_CATALOG_VIEWS, STYLE_CATALOG_FILTER_TYPES, executeStylesGetCatalog, validateStylesGetCatalogInput, } from './catalog.js';
|
|
13
|
+
export type { PatchKeyClassification } from './validation.js';
|
|
14
|
+
export { validateValue, classifyPatchKey } from './validation.js';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ST_UNDERLINE_VALUES } from '../inline-semantics/token-sets.js';
|
|
2
|
+
export declare const ST_VERTICAL_ALIGN_RUN: readonly ["superscript", "subscript", "baseline"];
|
|
3
|
+
export declare const ST_EM: readonly ["none", "dot", "comma", "circle", "sesame"];
|
|
4
|
+
export declare const ST_TEXT_ALIGNMENT: readonly ["top", "center", "baseline", "bottom", "auto"];
|
|
5
|
+
export declare const ST_TEXT_DIRECTION: readonly ["lrTb", "tbRl", "btLr", "lrTbV", "tbRlV", "tbLrV"];
|
|
6
|
+
export declare const ST_TEXTBOX_TIGHT_WRAP: readonly ["none", "allLines", "firstAndLastLine", "firstLineOnly", "lastLineOnly"];
|
|
7
|
+
export declare const ST_TEXT_TRANSFORM: readonly ["uppercase", "none"];
|
|
8
|
+
export declare const ST_JUSTIFICATION: readonly ["left", "center", "right", "justify", "distribute"];
|
|
9
|
+
export { ST_UNDERLINE_VALUES };
|
|
10
|
+
/** Recursive schema AST describing the shape of a property value. */
|
|
11
|
+
export type ValueSchema = {
|
|
12
|
+
kind: 'boolean';
|
|
13
|
+
} | {
|
|
14
|
+
kind: 'integer';
|
|
15
|
+
min?: number;
|
|
16
|
+
max?: number;
|
|
17
|
+
} | {
|
|
18
|
+
kind: 'enum';
|
|
19
|
+
values: readonly string[];
|
|
20
|
+
} | {
|
|
21
|
+
kind: 'string';
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'object';
|
|
24
|
+
children: Record<string, ValueSchema>;
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'array';
|
|
27
|
+
item: ValueSchema;
|
|
28
|
+
};
|
|
29
|
+
export type StylesChannel = 'run' | 'paragraph';
|
|
30
|
+
export type MergeStrategy = 'replace' | 'shallowMerge' | 'edgeMerge';
|
|
31
|
+
export interface PropertyDefinition {
|
|
32
|
+
key: string;
|
|
33
|
+
channel: StylesChannel;
|
|
34
|
+
schema: ValueSchema;
|
|
35
|
+
mergeStrategy: MergeStrategy;
|
|
36
|
+
}
|
|
37
|
+
export declare const PROPERTY_REGISTRY: PropertyDefinition[];
|
|
38
|
+
/** Allowed patch keys per channel, derived from the registry. */
|
|
39
|
+
export declare const ALLOWED_KEYS_BY_CHANNEL: Record<StylesChannel, Set<string>>;
|
|
40
|
+
/** Lookup a property definition by key and channel. */
|
|
41
|
+
export declare function getPropertyDefinition(key: string, channel: StylesChannel): PropertyDefinition | undefined;
|
|
42
|
+
export declare const EXCLUDED_KEYS: Record<StylesChannel, Map<string, string>>;
|
|
43
|
+
export declare const XML_PATH_BY_CHANNEL: Record<StylesChannel, string>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ValueSchema, StylesChannel } from './registry.js';
|
|
2
|
+
type JsonSchema = Record<string, unknown>;
|
|
3
|
+
/** Converts a ValueSchema AST node to a JSON Schema object. */
|
|
4
|
+
export declare function toJsonSchema(schema: ValueSchema): JsonSchema;
|
|
5
|
+
/** Builds a JSON Schema for the patch object of a given channel. */
|
|
6
|
+
export declare function buildPatchSchema(channel: StylesChannel): JsonSchema;
|
|
7
|
+
/** Builds a JSON Schema for the before/after state map covering all registry keys. */
|
|
8
|
+
export declare function buildStateSchema(): JsonSchema;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ValueSchema, StylesChannel } from './registry.js';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a value against a ValueSchema AST node.
|
|
4
|
+
*
|
|
5
|
+
* @param path - Dot-delimited path for error messages (e.g. "patch.borders.top.size")
|
|
6
|
+
* @param value - The value to validate
|
|
7
|
+
* @param schema - The schema to validate against
|
|
8
|
+
*/
|
|
9
|
+
export declare function validateValue(path: string, value: unknown, schema: ValueSchema): void;
|
|
10
|
+
export type StylesApplyInputShape = {
|
|
11
|
+
target: {
|
|
12
|
+
scope: 'docDefaults';
|
|
13
|
+
channel: StylesChannel;
|
|
14
|
+
};
|
|
15
|
+
patch: Record<string, unknown>;
|
|
16
|
+
};
|
|
17
|
+
export declare function validateStylesApplyInput(input: unknown): asserts input is StylesApplyInputShape;
|
|
18
|
+
export declare function validateStylesApplyOptions(options: unknown): void;
|
|
19
|
+
/** Discriminated union returned by `classifyPatchKey`. */
|
|
20
|
+
export type PatchKeyClassification = {
|
|
21
|
+
status: 'valid';
|
|
22
|
+
} | {
|
|
23
|
+
status: 'excluded';
|
|
24
|
+
reason: string;
|
|
25
|
+
} | {
|
|
26
|
+
status: 'cross_channel';
|
|
27
|
+
ownerChannel: StylesChannel;
|
|
28
|
+
} | {
|
|
29
|
+
status: 'unknown';
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Classifies a patch key relative to a given channel.
|
|
33
|
+
*
|
|
34
|
+
* Returns a discriminated union so callers can switch on `status` instead of
|
|
35
|
+
* nesting conditionals across excluded-key maps, allowed-key sets, and
|
|
36
|
+
* cross-channel lookups.
|
|
37
|
+
*/
|
|
38
|
+
export declare function classifyPatchKey(key: string, channel: StylesChannel): PatchKeyClassification;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the table-color regex used by both:
|
|
3
|
+
* - the schema-time validator (a string pattern in `contract/schemas.ts`)
|
|
4
|
+
* - the runtime executor validator (a compiled RegExp in `tables/tables.ts`)
|
|
5
|
+
*
|
|
6
|
+
* Accepts canonical `RRGGBB` and `auto`, plus loose forms `#RRGGBB`, `RGB`,
|
|
7
|
+
* and `#RGB`. Adapters call `normalizeColorInput` to canonicalize before
|
|
8
|
+
* storage, so any of these forms round-trips to uppercase `RRGGBB`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const TABLE_COLOR_PATTERN_SOURCE = "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$";
|
|
11
|
+
/** Compiled once for runtime use. */
|
|
12
|
+
export declare const TABLE_COLOR_PATTERN: RegExp;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { MutationOptions } from '../write/write.js';
|
|
2
|
+
import { TablesApplyStyleInput, TablesSetBordersInput, TablesSetCellPaddingInput, TablesSetLayoutInput, TablesSetTableOptionsInput } from '../types/table-operations.types.js';
|
|
3
|
+
type RowLocatorInput = {
|
|
4
|
+
target?: unknown;
|
|
5
|
+
nodeId?: unknown;
|
|
6
|
+
rowIndex?: unknown;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Validation options for the row locator.
|
|
10
|
+
*
|
|
11
|
+
* `allowAppendShorthand`: when true, a table-level locator (target/nodeId
|
|
12
|
+
* pointing at a table) with NEITHER `rowIndex` NOR `position` is accepted —
|
|
13
|
+
* the caller's adapter is expected to compute "below the last row". Used by
|
|
14
|
+
* `tables.insertRow`. All other row ops require `rowIndex` when targeting a
|
|
15
|
+
* table; pass this as `false` (the default) for them.
|
|
16
|
+
*/
|
|
17
|
+
interface RowLocatorOptions {
|
|
18
|
+
allowAppendShorthand?: boolean;
|
|
19
|
+
}
|
|
20
|
+
type CellOrTableScopedCellLocatorInput = {
|
|
21
|
+
target?: unknown;
|
|
22
|
+
nodeId?: unknown;
|
|
23
|
+
rowIndex?: unknown;
|
|
24
|
+
columnIndex?: unknown;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Returns `true` when the input carries non-`undefined` row + column coordinates,
|
|
28
|
+
* meaning it can participate in table-scoped cell targeting.
|
|
29
|
+
*
|
|
30
|
+
* This is the validation-time check for coordinate presence. Adapter-level
|
|
31
|
+
* resolution may still refine ambiguous `nodeId` handoffs by resolved node
|
|
32
|
+
* type so payloads like `TableCellInfo` from `tables.getCells()` continue to
|
|
33
|
+
* work as direct cell locators.
|
|
34
|
+
*/
|
|
35
|
+
export declare function hasTableScopedCellCoordinates(input: CellOrTableScopedCellLocatorInput): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Normalizes legacy `atRowIndex` to canonical `rowIndex` for tables.split.
|
|
38
|
+
*
|
|
39
|
+
* Accepts either name, prefers `rowIndex` when both match, and rejects
|
|
40
|
+
* conflicting dual-name input. Returns the input unchanged when only
|
|
41
|
+
* `rowIndex` is present.
|
|
42
|
+
*/
|
|
43
|
+
export declare function normalizeTablesSplitInput<T extends {
|
|
44
|
+
rowIndex?: number;
|
|
45
|
+
}>(input: T): T;
|
|
46
|
+
/**
|
|
47
|
+
* Execute a table operation that uses the standard locator (target/nodeId).
|
|
48
|
+
* Validates the locator and normalizes MutationOptions.
|
|
49
|
+
*/
|
|
50
|
+
export declare function executeTableLocatorOp<TInput extends {
|
|
51
|
+
target?: unknown;
|
|
52
|
+
nodeId?: unknown;
|
|
53
|
+
}, TResult>(operationName: string, adapter: (input: TInput, options?: MutationOptions) => TResult, input: TInput, options?: MutationOptions): TResult;
|
|
54
|
+
export declare function executeTablesSetLayoutOp<TResult>(adapter: (input: TablesSetLayoutInput, options?: MutationOptions) => TResult, input: TablesSetLayoutInput, options?: MutationOptions): TResult;
|
|
55
|
+
export declare function executeRowLocatorOp<TInput extends RowLocatorInput, TResult>(operationName: string, adapter: (input: TInput, options?: MutationOptions) => TResult, input: TInput, options?: MutationOptions, rowLocatorOptions?: RowLocatorOptions): TResult;
|
|
56
|
+
export declare function executeCellOrTableScopedCellLocatorOp<TInput extends CellOrTableScopedCellLocatorInput, TResult>(operationName: string, adapter: (input: TInput, options?: MutationOptions) => TResult, input: TInput, options?: MutationOptions): TResult;
|
|
57
|
+
/**
|
|
58
|
+
* Execute a document-level table mutation (no locator validation needed).
|
|
59
|
+
* Only normalizes MutationOptions.
|
|
60
|
+
*/
|
|
61
|
+
export declare function executeDocumentLevelTableOp<TInput, TResult>(adapter: (input: TInput, options?: MutationOptions) => TResult, input: TInput, options?: MutationOptions): TResult;
|
|
62
|
+
/**
|
|
63
|
+
* Validate and execute `tables.applyStyle`.
|
|
64
|
+
*/
|
|
65
|
+
export declare function executeTablesApplyStyle<TResult>(operationName: string, adapter: (input: TablesApplyStyleInput, options?: MutationOptions) => TResult, input: TablesApplyStyleInput, options?: MutationOptions): TResult;
|
|
66
|
+
/**
|
|
67
|
+
* Validate and execute `tables.setBorders`.
|
|
68
|
+
*/
|
|
69
|
+
export declare function executeTablesSetBorders<TResult>(operationName: string, adapter: (input: TablesSetBordersInput, options?: MutationOptions) => TResult, input: TablesSetBordersInput, options?: MutationOptions): TResult;
|
|
70
|
+
/**
|
|
71
|
+
* Validate and execute `tables.setTableOptions`.
|
|
72
|
+
*/
|
|
73
|
+
export declare function executeTablesSetTableOptions<TResult>(operationName: string, adapter: (input: TablesSetTableOptionsInput, options?: MutationOptions) => TResult, input: TablesSetTableOptionsInput, options?: MutationOptions): TResult;
|
|
74
|
+
/**
|
|
75
|
+
* Validate and execute `tables.setCellPadding`.
|
|
76
|
+
*
|
|
77
|
+
* Partial side updates are accepted and preserve omitted sides, but at least
|
|
78
|
+
* one of `topPt`, `rightPt`, `bottomPt`, or `leftPt` must be present. An
|
|
79
|
+
* all-omitted call is rejected so the direct typed API agrees with the schema's
|
|
80
|
+
* any-of side requirement (and the adapter never authors an empty `w:tcMar`).
|
|
81
|
+
*/
|
|
82
|
+
export declare function executeTablesSetCellPadding<TResult>(operationName: string, adapter: (input: TablesSetCellPaddingInput, options?: MutationOptions) => TResult, input: TablesSetCellPaddingInput, options?: MutationOptions): TResult;
|
|
83
|
+
export {};
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `templates.apply`: source-authoritative template adoption (SD-3247).
|
|
3
|
+
*
|
|
4
|
+
* Adopts a source DOCX's template **style system and reusable template assets**
|
|
5
|
+
* onto the currently open document while preserving the open document's
|
|
6
|
+
* body/story content (`word/document.xml` is never replaced). This is template
|
|
7
|
+
* adoption, not a blind substrate transplant. The adoption semantics are:
|
|
8
|
+
*
|
|
9
|
+
* - `styles`: source-authoritative overlap. For a `styleId` defined in both
|
|
10
|
+
* documents the source definition wins **in place** under the original id
|
|
11
|
+
* (no `*-tmpl` rename). The source `w:docDefaults` and `w:latentStyles`
|
|
12
|
+
* singletons replace the target's. Source-only styles are imported; target-only
|
|
13
|
+
* styles still required by preserved content are retained.
|
|
14
|
+
* - `numbering`: reconciled as a dependency graph (not a flat append / blind
|
|
15
|
+
* replace). The `w:num`/`w:abstractNum` graph required by imported
|
|
16
|
+
* numbering-bearing styles is imported, colliding ids are remapped
|
|
17
|
+
* deterministically, and references are rewritten coherently in both
|
|
18
|
+
* `numbering.xml` and `styles.xml`.
|
|
19
|
+
* - `settings`: bounded reconciliation — layout/style-affecting settings (e.g.
|
|
20
|
+
* default tab stop) are adopted; identity/workflow settings (`rsid*`, `docId`,
|
|
21
|
+
* protection/revision state, `attachedTemplate`) are preserved.
|
|
22
|
+
* - `theme`, `fontTable`, `webSettings`: whole-part adoption.
|
|
23
|
+
* - `headersFooters`: **all** source `header*.xml` / `footer*.xml` parts are
|
|
24
|
+
* imported as reusable template assets (even ones the page-1 governing
|
|
25
|
+
* section does not reference), together with their `.rels` and transitive
|
|
26
|
+
* media closure; colliding part names / relationship ids / media names are
|
|
27
|
+
* reallocated and references rewritten consistently.
|
|
28
|
+
* - `sectionDefaults`: the source `w:sectPr` that governs page 1 is adopted as
|
|
29
|
+
* the current document's active/final section-default model. On multi-section
|
|
30
|
+
* targets, its header/footer visibility model (`headerReference`,
|
|
31
|
+
* `footerReference`, `w:titlePg`) is also propagated across the earlier
|
|
32
|
+
* sections without overwriting their own page geometry. Intermediate / later
|
|
33
|
+
* source sections are not imported.
|
|
34
|
+
*
|
|
35
|
+
* Selected non-body package sidecars (`customXml`, `docProps/custom.xml`,
|
|
36
|
+
* comments, notes, people, keymap customizations, and `settings.xml.rels`) are
|
|
37
|
+
* imported when present so reconstructed content can reuse the source package
|
|
38
|
+
* substrate faithfully. Source body content, glossary, signatures, embeddings,
|
|
39
|
+
* and body media remain out of scope and are reported, never applied.
|
|
40
|
+
*
|
|
41
|
+
* Engine-agnostic contract + execution entry point. No ProseMirror/converter imports.
|
|
42
|
+
*/
|
|
43
|
+
export type TemplatesApplySourcePath = {
|
|
44
|
+
kind: 'path';
|
|
45
|
+
path: string;
|
|
46
|
+
};
|
|
47
|
+
export type TemplatesApplySourceBase64 = {
|
|
48
|
+
kind: 'base64';
|
|
49
|
+
data: string;
|
|
50
|
+
filename?: string;
|
|
51
|
+
};
|
|
52
|
+
export type TemplatesApplySource = TemplatesApplySourcePath | TemplatesApplySourceBase64;
|
|
53
|
+
export type TemplateBodyPolicy = 'preserve';
|
|
54
|
+
export type TemplateScope = 'styles' | 'numbering' | 'settings' | 'theme' | 'fontTable' | 'webSettings' | 'headersFooters' | 'sectionDefaults';
|
|
55
|
+
export interface TemplatesApplyInput {
|
|
56
|
+
source: TemplatesApplySource;
|
|
57
|
+
bodyPolicy?: TemplateBodyPolicy;
|
|
58
|
+
}
|
|
59
|
+
export interface TemplatesApplyOptions {
|
|
60
|
+
dryRun?: boolean;
|
|
61
|
+
expectedRevision?: string | number;
|
|
62
|
+
}
|
|
63
|
+
export interface NormalizedTemplatesApplyOptions {
|
|
64
|
+
dryRun: boolean;
|
|
65
|
+
expectedRevision: string | undefined;
|
|
66
|
+
}
|
|
67
|
+
export interface TemplateScopeReport {
|
|
68
|
+
scope: TemplateScope;
|
|
69
|
+
part: string;
|
|
70
|
+
detail?: string;
|
|
71
|
+
}
|
|
72
|
+
export type TemplateSkipReason = 'NOT_PRESENT_IN_SOURCE' | 'OUT_OF_SCOPE' | 'NO_CHANGE' | 'CAPABILITY_UNAVAILABLE';
|
|
73
|
+
export interface TemplateScopeSkip {
|
|
74
|
+
scope: string;
|
|
75
|
+
part?: string;
|
|
76
|
+
reason: TemplateSkipReason;
|
|
77
|
+
message: string;
|
|
78
|
+
}
|
|
79
|
+
export interface TemplateUnsupportedItem {
|
|
80
|
+
part: string;
|
|
81
|
+
category: string;
|
|
82
|
+
reason: string;
|
|
83
|
+
}
|
|
84
|
+
export type TemplateChangeKind = 'created' | 'replaced' | 'merged' | 'imported';
|
|
85
|
+
export interface TemplateChangedPart {
|
|
86
|
+
part: string;
|
|
87
|
+
scope: TemplateScope | 'package';
|
|
88
|
+
change: TemplateChangeKind;
|
|
89
|
+
}
|
|
90
|
+
export interface TemplateIdMapping {
|
|
91
|
+
kind: 'style' | 'numbering' | 'relationship';
|
|
92
|
+
from: string;
|
|
93
|
+
to: string;
|
|
94
|
+
}
|
|
95
|
+
export interface TemplateApplyWarning {
|
|
96
|
+
code: string;
|
|
97
|
+
message: string;
|
|
98
|
+
}
|
|
99
|
+
export interface TemplatesApplySourceInfo {
|
|
100
|
+
kind: 'path' | 'base64';
|
|
101
|
+
fingerprint: string;
|
|
102
|
+
partCount: number;
|
|
103
|
+
}
|
|
104
|
+
export interface TemplatesApplyReceiptSuccess {
|
|
105
|
+
success: true;
|
|
106
|
+
changed: boolean;
|
|
107
|
+
dryRun: boolean;
|
|
108
|
+
bodyPolicy: 'preserve';
|
|
109
|
+
source: TemplatesApplySourceInfo;
|
|
110
|
+
detectedScopes: TemplateScopeReport[];
|
|
111
|
+
appliedScopes: TemplateScopeReport[];
|
|
112
|
+
skippedScopes: TemplateScopeSkip[];
|
|
113
|
+
unsupportedItems: TemplateUnsupportedItem[];
|
|
114
|
+
changedParts: TemplateChangedPart[];
|
|
115
|
+
idMappings: {
|
|
116
|
+
styles?: TemplateIdMapping[];
|
|
117
|
+
numbering?: TemplateIdMapping[];
|
|
118
|
+
relationships?: TemplateIdMapping[];
|
|
119
|
+
};
|
|
120
|
+
warnings: TemplateApplyWarning[];
|
|
121
|
+
}
|
|
122
|
+
export type TemplatesApplyFailureCode = 'UNSUPPORTED_SOURCE' | 'INVALID_PACKAGE' | 'CAPABILITY_UNAVAILABLE' | 'UNSUPPORTED_TEMPLATE_CONTENT';
|
|
123
|
+
export interface TemplatesApplyReceiptFailure {
|
|
124
|
+
success: false;
|
|
125
|
+
failure: {
|
|
126
|
+
code: TemplatesApplyFailureCode;
|
|
127
|
+
message: string;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
export type TemplatesApplyReceipt = TemplatesApplyReceiptSuccess | TemplatesApplyReceiptFailure;
|
|
131
|
+
export interface TemplatesAdapter {
|
|
132
|
+
/**
|
|
133
|
+
* Adopt a source package's template substrate. Returns a Promise: the source
|
|
134
|
+
* package is loaded asynchronously (JSZip), so the receipt resolves after the
|
|
135
|
+
* async OPC read + mutation work completes. Pre-apply guards (converter
|
|
136
|
+
* availability, `expectedRevision`) still throw synchronously before any
|
|
137
|
+
* Promise is returned — see `throws.preApply` in the contract metadata.
|
|
138
|
+
*/
|
|
139
|
+
apply(input: TemplatesApplyInput, options: NormalizedTemplatesApplyOptions): Promise<TemplatesApplyReceipt>;
|
|
140
|
+
}
|
|
141
|
+
export interface TemplatesApi {
|
|
142
|
+
/**
|
|
143
|
+
* Apply detected template substrate from a source DOCX onto the open document.
|
|
144
|
+
*
|
|
145
|
+
* Must be awaited: source acquisition and OPC/ZIP package loading are async.
|
|
146
|
+
* Synchronous input validation and pre-apply preconditions still throw before
|
|
147
|
+
* the returned Promise is created.
|
|
148
|
+
*/
|
|
149
|
+
apply(input: TemplatesApplyInput, options?: TemplatesApplyOptions): Promise<TemplatesApplyReceipt>;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Execute `templates.apply`.
|
|
153
|
+
*
|
|
154
|
+
* Input validation and option normalization run synchronously, so invalid
|
|
155
|
+
* input and other `throws.preApply` cases still throw synchronously (before any
|
|
156
|
+
* Promise is created). The successful/receipt-returning path is async: the
|
|
157
|
+
* adapter loads the source package via the async OPC reader and resolves a
|
|
158
|
+
* {@link TemplatesApplyReceipt}.
|
|
159
|
+
*/
|
|
160
|
+
export declare function executeTemplatesApply(adapter: TemplatesAdapter, input: TemplatesApplyInput, options?: TemplatesApplyOptions): Promise<TemplatesApplyReceipt>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barrel re-export for templates/ submodule.
|
|
3
|
+
*
|
|
4
|
+
* Public surface only: internal validation helpers are not exposed.
|
|
5
|
+
*/
|
|
6
|
+
export type { TemplatesApplySourcePath, TemplatesApplySourceBase64, TemplatesApplySource, TemplateBodyPolicy, TemplateScope, TemplatesApplyInput, TemplatesApplyOptions, NormalizedTemplatesApplyOptions, TemplateScopeReport, TemplateSkipReason, TemplateScopeSkip, TemplateUnsupportedItem, TemplateChangeKind, TemplateChangedPart, TemplateIdMapping, TemplateApplyWarning, TemplatesApplySourceInfo, TemplatesApplyReceiptSuccess, TemplatesApplyFailureCode, TemplatesApplyReceiptFailure, TemplatesApplyReceipt, TemplatesAdapter, TemplatesApi, } from './apply.js';
|
|
7
|
+
export { executeTemplatesApply } from './apply.js';
|