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,146 @@
|
|
|
1
|
+
import { DrawingBlock, DrawingMeasure, Line, ParagraphBlock, PartialRowInfo, SdtMetadata, TableBlock, TableBorders, TableMeasure } from '../../../../contracts/src/index.js';
|
|
2
|
+
import { ResolvePhysicalFamily } from '../../../../../shared/font-system/src/index.js';
|
|
3
|
+
import { FragmentRenderContext } from '../renderer.js';
|
|
4
|
+
import { SdtAncestorOptions } from '../sdt/container.js';
|
|
5
|
+
type TableRowMeasure = TableMeasure['rows'][number];
|
|
6
|
+
type TableRow = TableBlock['rows'][number];
|
|
7
|
+
/**
|
|
8
|
+
* Dependencies required for rendering a table row.
|
|
9
|
+
*
|
|
10
|
+
* Contains all information needed to render cells in a table row, including
|
|
11
|
+
* positioning, measurements, border resolution, and rendering functions.
|
|
12
|
+
*/
|
|
13
|
+
type TableRowRenderDependencies = {
|
|
14
|
+
/** Document object for creating DOM elements */
|
|
15
|
+
doc: Document;
|
|
16
|
+
/** Container element to append cell elements to */
|
|
17
|
+
container: HTMLElement;
|
|
18
|
+
/** Zero-based index of this row */
|
|
19
|
+
rowIndex: number;
|
|
20
|
+
/** Vertical position (top edge) in pixels */
|
|
21
|
+
y: number;
|
|
22
|
+
/** Measurement data for this row (height, cell measurements) */
|
|
23
|
+
rowMeasure: TableRowMeasure;
|
|
24
|
+
/** Row data (cells, attributes), or undefined for empty rows */
|
|
25
|
+
row?: TableRow;
|
|
26
|
+
/** Previous (above) row data + measure, for collapsed-border conflict resolution (§17.4.66). */
|
|
27
|
+
prevRow?: TableRow;
|
|
28
|
+
prevRowMeasure?: TableRowMeasure;
|
|
29
|
+
/** Next (below) row data, to detect a row-level border override that suppresses the shared
|
|
30
|
+
* horizontal edge so the current row closes the grid itself (§17.4.61/§17.4.66). */
|
|
31
|
+
nextRow?: TableRow;
|
|
32
|
+
/** Next (below) row measure, to detect a gridAfter gap under a spanning cell (SD-3345). */
|
|
33
|
+
nextRowMeasure?: TableRowMeasure;
|
|
34
|
+
/**
|
|
35
|
+
* Rightmost occupied grid column (exclusive) for THIS row, counting cells that span into it
|
|
36
|
+
* via w:vMerge (rowspan) from an earlier row. Falls back to this row's own cells when absent.
|
|
37
|
+
* Prevents a leftmost cell on a rowspan-continuation row from being treated as the rightmost
|
|
38
|
+
* column. (SD-1797)
|
|
39
|
+
*/
|
|
40
|
+
rowOccupiedRightCol?: number;
|
|
41
|
+
/** Same as {@link rowOccupiedRightCol} for the NEXT row, so a rowspan continuation below is
|
|
42
|
+
* not mistaken for a gridAfter gap (which would double the shared bottom edge). (SD-1797) */
|
|
43
|
+
nextRowOccupiedRightCol?: number;
|
|
44
|
+
/** Total number of rows in the table (for border resolution) */
|
|
45
|
+
totalRows: number;
|
|
46
|
+
/** Table-level borders (for resolving cell borders) */
|
|
47
|
+
tableBorders?: TableBorders;
|
|
48
|
+
/** Column widths array for calculating x positions from gridColumnStart */
|
|
49
|
+
columnWidths: number[];
|
|
50
|
+
/** All row heights for calculating rowspan cell heights */
|
|
51
|
+
allRowHeights: number[];
|
|
52
|
+
/** Table indent in pixels (applied to table fragment positioning) */
|
|
53
|
+
tableIndent?: number;
|
|
54
|
+
/** Whether the table is visually right-to-left (w:bidiVisual, ECMA-376 §17.4.1) */
|
|
55
|
+
isRtl?: boolean;
|
|
56
|
+
/** Rendering context */
|
|
57
|
+
context: FragmentRenderContext;
|
|
58
|
+
/** Function to render a line of paragraph content */
|
|
59
|
+
renderLine: (block: ParagraphBlock, line: Line, context: FragmentRenderContext, lineIndex: number, isLastLine: boolean) => HTMLElement;
|
|
60
|
+
/** Optional callback invoked after a table line's final styles/markers are applied. */
|
|
61
|
+
captureLineSnapshot?: (lineEl: HTMLElement, context: FragmentRenderContext, options?: {
|
|
62
|
+
inTableParagraph?: boolean;
|
|
63
|
+
wrapperEl?: HTMLElement;
|
|
64
|
+
}) => void;
|
|
65
|
+
/** Function to render drawing content (images, shapes, shape groups) */
|
|
66
|
+
renderDrawingContent?: (block: DrawingBlock, interactionHost: HTMLElement, measure: DrawingMeasure) => HTMLElement;
|
|
67
|
+
/** Function to apply SDT metadata as data attributes */
|
|
68
|
+
applySdtDataset: (el: HTMLElement | null, metadata?: SdtMetadata | null) => void;
|
|
69
|
+
/** Ancestor SDT container key for suppressing duplicate container styling in cells */
|
|
70
|
+
ancestorContainerKey?: string | null;
|
|
71
|
+
/** Ancestor SDT metadata for suppressing duplicate id-less container styling in cells */
|
|
72
|
+
ancestorContainerSdt?: SdtMetadata | null;
|
|
73
|
+
/** Ancestor SDT keys for suppressing duplicate container styling in cells */
|
|
74
|
+
ancestorContainerKeys?: SdtAncestorOptions['ancestorContainerKeys'];
|
|
75
|
+
/** Ancestor SDT metadata chain for suppressing duplicate id-less container styling in cells */
|
|
76
|
+
ancestorContainerSdts?: SdtAncestorOptions['ancestorContainerSdts'];
|
|
77
|
+
/** Receives notification when cells render SDT container chrome */
|
|
78
|
+
onSdtContainerChrome?: () => void;
|
|
79
|
+
/**
|
|
80
|
+
* If true, this row is the first body row of a continuation fragment.
|
|
81
|
+
* MS Word draws borders at split points to visually close the table on each page,
|
|
82
|
+
* so we do NOT suppress borders - both fragments draw their edge borders.
|
|
83
|
+
*/
|
|
84
|
+
continuesFromPrev?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* If true, this row is the last body row before a page break continuation.
|
|
87
|
+
* MS Word draws borders at split points to visually close the table on each page,
|
|
88
|
+
* so we do NOT suppress borders - both fragments draw their edge borders.
|
|
89
|
+
*/
|
|
90
|
+
continuesOnNext?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Partial row information for mid-row splits.
|
|
93
|
+
* Contains per-cell line ranges (fromLineByCell, toLineByCell) for rendering
|
|
94
|
+
* only a portion of the row's content.
|
|
95
|
+
*/
|
|
96
|
+
partialRow?: PartialRowInfo;
|
|
97
|
+
/**
|
|
98
|
+
* Cell spacing in pixels (border-spacing between cells).
|
|
99
|
+
* Applied to cell x positions and row y advancement.
|
|
100
|
+
*/
|
|
101
|
+
cellSpacingPx?: number;
|
|
102
|
+
/** Built-in SDT chrome rendering mode. */
|
|
103
|
+
chrome?: 'default' | 'none';
|
|
104
|
+
/**
|
|
105
|
+
* Per-document logical->physical font resolver for in-cell list markers and drop caps. Threaded
|
|
106
|
+
* from the renderer's per-document resolver so they paint the same physical family they were
|
|
107
|
+
* measured in. Undefined falls back to the global resolver.
|
|
108
|
+
*/
|
|
109
|
+
resolvePhysical?: ResolvePhysicalFamily;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Renders all cells in a table row.
|
|
113
|
+
*
|
|
114
|
+
* Iterates through cells in the row, resolving borders based on cell position,
|
|
115
|
+
* and rendering each cell with its content. Cells are positioned horizontally
|
|
116
|
+
* by accumulating their widths.
|
|
117
|
+
*
|
|
118
|
+
* Border resolution logic:
|
|
119
|
+
* - Cells with explicit borders use those borders
|
|
120
|
+
* - Otherwise, cells use position-based borders from table borders:
|
|
121
|
+
* - Edge cells use outer table borders
|
|
122
|
+
* - Interior cells use inside borders (insideH, insideV)
|
|
123
|
+
* - If no table borders exist, default borders are applied
|
|
124
|
+
*
|
|
125
|
+
* @param deps - All dependencies required for rendering
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```typescript
|
|
129
|
+
* renderTableRow({
|
|
130
|
+
* doc: document,
|
|
131
|
+
* container: tableContainer,
|
|
132
|
+
* rowIndex: 0,
|
|
133
|
+
* y: 0,
|
|
134
|
+
* rowMeasure,
|
|
135
|
+
* row,
|
|
136
|
+
* totalRows: 3,
|
|
137
|
+
* tableBorders,
|
|
138
|
+
* context,
|
|
139
|
+
* renderLine,
|
|
140
|
+
* applySdtDataset
|
|
141
|
+
* });
|
|
142
|
+
* // Appends all cell elements to container
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
145
|
+
export declare const renderTableRow: (deps: TableRowRenderDependencies) => void;
|
|
146
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test-only normalization helpers for comparing rendered line output
|
|
3
|
+
* across different rendering contexts (body, table-cell).
|
|
4
|
+
*
|
|
5
|
+
* DO NOT import this file from production code. Only *.test.ts and
|
|
6
|
+
* other test-utils/ files may import from here.
|
|
7
|
+
*/
|
|
8
|
+
export interface NormalizedRun {
|
|
9
|
+
text: string;
|
|
10
|
+
fontFamily: string | undefined;
|
|
11
|
+
fontSize: string | undefined;
|
|
12
|
+
fontWeight: string | undefined;
|
|
13
|
+
fontStyle: string | undefined;
|
|
14
|
+
color: string | undefined;
|
|
15
|
+
textDecoration: string | undefined;
|
|
16
|
+
backgroundColor: string | undefined;
|
|
17
|
+
href: string | undefined;
|
|
18
|
+
target: string | undefined;
|
|
19
|
+
rel: string | undefined;
|
|
20
|
+
}
|
|
21
|
+
export interface NormalizedLine {
|
|
22
|
+
textAlign: string;
|
|
23
|
+
wordSpacing: string;
|
|
24
|
+
runs: NormalizedRun[];
|
|
25
|
+
marker?: {
|
|
26
|
+
text: string;
|
|
27
|
+
justification: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Normalize a single .superdoc-line element into a semantic representation.
|
|
32
|
+
* Extracts line-level styles (textAlign, wordSpacing) and per-run styles
|
|
33
|
+
* from child span elements.
|
|
34
|
+
*/
|
|
35
|
+
export declare function normalizeLine(lineEl: HTMLElement): NormalizedLine;
|
|
36
|
+
/**
|
|
37
|
+
* Find all .superdoc-line elements within a container and normalize them.
|
|
38
|
+
*/
|
|
39
|
+
export declare function normalizeLines(container: HTMLElement): NormalizedLine[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { WrapExclusion } from '../../../../contracts/src/index.js';
|
|
2
|
+
import { RenderedLineInfo } from '../renderer.js';
|
|
3
|
+
export declare const applySquareWrapExclusionsToLines: (renderedLines: RenderedLineInfo[], exclusions: WrapExclusion[], contentWidthPx: number, alignmentOffsetY: number) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const applyStyles: (el: HTMLElement, styles: Partial<CSSStyleDeclaration>) => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LayoutSourceIdentity } from '../../../../contracts/src/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Stamp the editor-neutral layout-identity dataset (prep-001).
|
|
4
|
+
*
|
|
5
|
+
* Additive only — runs alongside legacy `data-pm-*` / `data-block-id` writes.
|
|
6
|
+
* v1 consumers still read PM-shaped datasets; future editor-neutral consumers
|
|
7
|
+
* read `data-layout-fragment-id` / `data-layout-story` / `data-layout-block-ref`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function applyLayoutIdentityDataset(element: HTMLElement, identity: LayoutSourceIdentity | undefined): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ParagraphProperties, RunFontFamilyProperties, RunProperties } from './ooxml/types.js';
|
|
2
|
+
import { TableCellProperties, TableProperties } from './ooxml/styles-types.js';
|
|
3
|
+
export type PropertyObject = ParagraphProperties | RunProperties | TableCellProperties | TableProperties;
|
|
4
|
+
/**
|
|
5
|
+
* Performs a deep merge on an ordered list of property objects.
|
|
6
|
+
*
|
|
7
|
+
* This is the core cascade function used throughout style resolution.
|
|
8
|
+
* Properties from later objects in the array override earlier ones.
|
|
9
|
+
*
|
|
10
|
+
* @param propertiesArray - Ordered list of property objects to combine (low -> high priority).
|
|
11
|
+
* @param options - Configuration for full overrides and special handling.
|
|
12
|
+
* @returns Combined property object.
|
|
13
|
+
*/
|
|
14
|
+
export declare function combineProperties<T extends PropertyObject>(propertiesArray: T[], options?: {
|
|
15
|
+
/**
|
|
16
|
+
* Keys that should completely overwrite instead of deep merge.
|
|
17
|
+
* Use this for complex objects like fontFamily or color that should
|
|
18
|
+
* be replaced entirely rather than merged property-by-property.
|
|
19
|
+
*/
|
|
20
|
+
fullOverrideProps?: string[];
|
|
21
|
+
/**
|
|
22
|
+
* Custom merge handlers for specific keys.
|
|
23
|
+
* The handler receives the accumulated target and current source,
|
|
24
|
+
* and returns the new value for that key.
|
|
25
|
+
*/
|
|
26
|
+
specialHandling?: Record<string, (target: Record<string, unknown>, source: Record<string, unknown>) => unknown>;
|
|
27
|
+
}): T;
|
|
28
|
+
/**
|
|
29
|
+
* Combines run property objects while fully overriding certain keys.
|
|
30
|
+
* This is a convenience wrapper for run properties (w:rPr).
|
|
31
|
+
*
|
|
32
|
+
* @param propertiesArray - Ordered list of run property objects.
|
|
33
|
+
* @returns Combined run property object.
|
|
34
|
+
*/
|
|
35
|
+
export declare const FONT_SLOT_THEME_PAIRS: Array<[keyof RunFontFamilyProperties, keyof RunFontFamilyProperties]>;
|
|
36
|
+
export declare function combineRunProperties(propertiesArray: RunProperties[]): RunProperties;
|
|
37
|
+
/**
|
|
38
|
+
* Combines indent properties with special handling for firstLine/hanging mutual exclusivity.
|
|
39
|
+
*
|
|
40
|
+
* @param indentChain - Ordered list of indent property objects (or objects with indent property).
|
|
41
|
+
* @returns Combined indent object.
|
|
42
|
+
*/
|
|
43
|
+
export declare function combineIndentProperties(indentChain: ParagraphProperties[]): ParagraphProperties;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { TabStop, FieldAnnotationMetadata, StructuredContentMetadata, DocumentSectionMetadata, DocPartMetadata, SdtMetadata } from '../../contracts/src/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* @superdoc/style-engine
|
|
4
|
+
*
|
|
5
|
+
* Resolves OOXML styles to normalized ComputedStyle objects that engines can consume.
|
|
6
|
+
* This module owns the cascade rules (defaults -> styles -> numbering -> direct formatting).
|
|
7
|
+
*
|
|
8
|
+
* Tab Stops:
|
|
9
|
+
* - Passes through OOXML TabStop values unchanged (positions in twips, val: start/end/etc.)
|
|
10
|
+
* - No unit conversion happens here - preserves exact OOXML values for round-trip fidelity
|
|
11
|
+
* - Conversion to pixels happens at measurement boundary only
|
|
12
|
+
*/
|
|
13
|
+
export { combineProperties, combineRunProperties, combineIndentProperties, type PropertyObject } from './cascade.js';
|
|
14
|
+
export type { FieldAnnotationMetadata, StructuredContentMetadata, DocumentSectionMetadata, DocPartMetadata, SdtMetadata, };
|
|
15
|
+
export type SdtNodeType = 'fieldAnnotation' | 'structuredContent' | 'structuredContentBlock' | 'documentSection' | 'docPartObject';
|
|
16
|
+
export interface ResolveSdtMetadataInput {
|
|
17
|
+
nodeType?: SdtNodeType | string | null;
|
|
18
|
+
attrs?: Record<string, unknown> | null;
|
|
19
|
+
/**
|
|
20
|
+
* Optional cache key for reusing normalized metadata between identical SDT nodes.
|
|
21
|
+
* When omitted, the helper derives a key from attrs.hash/id when available.
|
|
22
|
+
*/
|
|
23
|
+
cacheKey?: string | null;
|
|
24
|
+
}
|
|
25
|
+
export interface ResolveStyleOptions {
|
|
26
|
+
sdt?: ResolveSdtMetadataInput | null;
|
|
27
|
+
}
|
|
28
|
+
export interface BorderStyle {
|
|
29
|
+
style?: 'none' | 'solid' | 'dashed' | 'dotted' | 'double';
|
|
30
|
+
width?: number;
|
|
31
|
+
color?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ComputedParagraphStyle {
|
|
34
|
+
alignment?: 'left' | 'center' | 'right' | 'justify';
|
|
35
|
+
spacing?: {
|
|
36
|
+
before?: number;
|
|
37
|
+
after?: number;
|
|
38
|
+
line?: number;
|
|
39
|
+
lineRule?: 'auto' | 'exact' | 'atLeast';
|
|
40
|
+
};
|
|
41
|
+
indent?: {
|
|
42
|
+
left?: number;
|
|
43
|
+
right?: number;
|
|
44
|
+
firstLine?: number;
|
|
45
|
+
hanging?: number;
|
|
46
|
+
};
|
|
47
|
+
borders?: {
|
|
48
|
+
top?: BorderStyle;
|
|
49
|
+
right?: BorderStyle;
|
|
50
|
+
bottom?: BorderStyle;
|
|
51
|
+
left?: BorderStyle;
|
|
52
|
+
};
|
|
53
|
+
shading?: {
|
|
54
|
+
fill?: string;
|
|
55
|
+
pattern?: string;
|
|
56
|
+
};
|
|
57
|
+
tabs?: TabStop[];
|
|
58
|
+
}
|
|
59
|
+
export interface StyleContext {
|
|
60
|
+
styles?: Record<string, unknown>;
|
|
61
|
+
numbering?: Record<string, unknown>;
|
|
62
|
+
theme?: Record<string, unknown>;
|
|
63
|
+
defaults?: {
|
|
64
|
+
paragraphFont?: string;
|
|
65
|
+
fontSize?: number;
|
|
66
|
+
paragraphFontFallback?: string;
|
|
67
|
+
paragraphFontFamily?: string;
|
|
68
|
+
decimalSeparator?: string;
|
|
69
|
+
defaultTabIntervalTwips?: number;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Clears the internal SDT metadata cache.
|
|
74
|
+
*
|
|
75
|
+
* This is primarily useful for testing to ensure a clean state between test runs.
|
|
76
|
+
* In production, the cache persists for the lifetime of the module to maximize performance.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```typescript
|
|
80
|
+
* import { clearSdtMetadataCache } from './index.js';
|
|
81
|
+
*
|
|
82
|
+
* // Before each test
|
|
83
|
+
* beforeEach(() => {
|
|
84
|
+
* clearSdtMetadataCache();
|
|
85
|
+
* });
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export declare function clearSdtMetadataCache(): void;
|
|
89
|
+
/**
|
|
90
|
+
* Normalizes Structured Document Tag (SDT) metadata into a stable contract shape.
|
|
91
|
+
*
|
|
92
|
+
* Supports the following SDT node types:
|
|
93
|
+
* - `fieldAnnotation`: Inline field annotations with display labels, colors, and visibility
|
|
94
|
+
* - `structuredContent` / `structuredContentBlock`: Inline or block-level structured content containers
|
|
95
|
+
* - `documentSection`: Document section metadata with locks and descriptions
|
|
96
|
+
* - `docPartObject`: Document part objects (e.g., TOC, bibliography)
|
|
97
|
+
*
|
|
98
|
+
* Results are cached by hash/id to avoid recomputing metadata for identical SDT instances.
|
|
99
|
+
*
|
|
100
|
+
* @param input - SDT node information including nodeType, attrs, and optional cacheKey
|
|
101
|
+
* @returns Normalized SdtMetadata or undefined if nodeType is unsupported/missing
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* import { resolveSdtMetadata } from './index.js';
|
|
106
|
+
*
|
|
107
|
+
* const metadata = resolveSdtMetadata({
|
|
108
|
+
* nodeType: 'fieldAnnotation',
|
|
109
|
+
* attrs: {
|
|
110
|
+
* fieldId: 'CLIENT_NAME',
|
|
111
|
+
* displayLabel: 'Client Name',
|
|
112
|
+
* fieldColor: '#980043',
|
|
113
|
+
* visibility: 'visible'
|
|
114
|
+
* }
|
|
115
|
+
* });
|
|
116
|
+
*
|
|
117
|
+
* console.log(metadata?.type); // 'fieldAnnotation'
|
|
118
|
+
* console.log(metadata?.fieldColor); // '#980043'
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
export declare function resolveSdtMetadata(input?: ResolveSdtMetadataInput | null): SdtMetadata | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WordThemeColorPalette } from '../ooxml/word-style-model/parse-theme.js';
|
|
2
|
+
export declare function normalizeHexColor(value: string | undefined | null): string | undefined;
|
|
3
|
+
export declare function resolveThemeColor(themeColor: string | undefined, palette: WordThemeColorPalette | undefined): string | undefined;
|
|
4
|
+
/**
|
|
5
|
+
* Apply OOXML theme tint / shade to a base hex color.
|
|
6
|
+
*
|
|
7
|
+
* Both attributes are encoded as a hex byte (00..FF). tint blends the color
|
|
8
|
+
* toward white; shade blends it toward black. This is an approximation of
|
|
9
|
+
* the HSL-based Word behavior good enough for first-paint visual parity
|
|
10
|
+
* and proven elsewhere in the v1 pipeline. The painter / pm-adapter parity
|
|
11
|
+
* gate will harden corner cases if needed.
|
|
12
|
+
*/
|
|
13
|
+
export declare function applyThemeTintShade(hexInput: string, themeTint?: string, themeShade?: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Editor-neutral normalize layer.
|
|
3
|
+
*
|
|
4
|
+
* Maps the typed style-engine `ParagraphProperties` / `RunProperties` into
|
|
5
|
+
* the visual subset of `@superdoc/contracts` `ParagraphAttrs` / `TextRun`
|
|
6
|
+
* that the v2 review-layout adapter can safely emit without depending on
|
|
7
|
+
* ProseMirror or v1 editor runtime.
|
|
8
|
+
*/
|
|
9
|
+
export { normalizeParagraphAttrsFromOoxml } from './paragraph-attrs.js';
|
|
10
|
+
export { normalizeRunAttrsFromOoxml, type NormalizeRunAttrsContext } from './run-attrs.js';
|
|
11
|
+
export type { TextRunStyleAttrs, ParagraphAttrs } from './types.js';
|
|
12
|
+
export { applyThemeTintShade, normalizeHexColor, resolveThemeColor } from './colors.js';
|
|
13
|
+
export { PX_PER_EIGHTH_POINT, PX_PER_POINT, PX_PER_TWIP, eighthPointsToPx, halfPointsToPx, twipsToPx, } from './units.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RunProperties } from '../ooxml/types.js';
|
|
2
|
+
import { WordThemeColorPalette, WordThemeFontScheme } from '../ooxml/word-style-model/parse-theme.js';
|
|
3
|
+
import { TextRunStyleAttrs } from './types.js';
|
|
4
|
+
export interface NormalizeRunAttrsContext {
|
|
5
|
+
/** Compiled theme color palette from the Word style model. */
|
|
6
|
+
themeColors?: WordThemeColorPalette;
|
|
7
|
+
/** Compiled theme font scheme. */
|
|
8
|
+
themeFontScheme?: WordThemeFontScheme;
|
|
9
|
+
/**
|
|
10
|
+
* Resolved background color in which the run will render (e.g. shaded cell
|
|
11
|
+
* background). When set and the run color resolves to `auto`, the
|
|
12
|
+
* normalizer picks a contrasting color so dark-on-dark text does not
|
|
13
|
+
* silently render unreadable inside shaded cells.
|
|
14
|
+
*/
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function normalizeRunAttrsFromOoxml(props: RunProperties | null | undefined, context?: NormalizeRunAttrsContext): TextRunStyleAttrs;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ParagraphAttrs, TextRun } from '../../../contracts/src/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Visual text-run style attributes the adapter is allowed to emit safely.
|
|
4
|
+
* This is the **partial** typed shape — every field is optional because
|
|
5
|
+
* the resolver may only know a subset and must not invent defaults.
|
|
6
|
+
*
|
|
7
|
+
* Caller responsibility:
|
|
8
|
+
* - `fontFamily` / `fontSize` are visual defaults; only emit when resolved.
|
|
9
|
+
* - Run text is always built with a non-empty `fontFamily` and a positive
|
|
10
|
+
* `fontSize` at the projection layer; partial attrs only override.
|
|
11
|
+
*/
|
|
12
|
+
export interface TextRunStyleAttrs {
|
|
13
|
+
fontFamily?: string;
|
|
14
|
+
fontSize?: number;
|
|
15
|
+
bold?: boolean;
|
|
16
|
+
italic?: boolean;
|
|
17
|
+
underline?: NonNullable<TextRun['underline']>;
|
|
18
|
+
strike?: boolean;
|
|
19
|
+
doubleStrike?: boolean;
|
|
20
|
+
color?: string;
|
|
21
|
+
highlight?: string;
|
|
22
|
+
textTransform?: TextRun['textTransform'];
|
|
23
|
+
allCaps?: boolean;
|
|
24
|
+
smallCaps?: boolean;
|
|
25
|
+
vertAlign?: TextRun['vertAlign'];
|
|
26
|
+
baselineShift?: number;
|
|
27
|
+
letterSpacing?: number;
|
|
28
|
+
horizontalScale?: number;
|
|
29
|
+
script?: TextRun['script'];
|
|
30
|
+
vanish?: boolean;
|
|
31
|
+
specVanish?: boolean;
|
|
32
|
+
noProof?: boolean;
|
|
33
|
+
bidi?: NonNullable<TextRun['bidi']>;
|
|
34
|
+
}
|
|
35
|
+
/** Re-export so v2 adapter can consume one paragraph attrs type. */
|
|
36
|
+
export type { ParagraphAttrs };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit helpers used by the editor-neutral normalize layer.
|
|
3
|
+
*
|
|
4
|
+
* Kept tiny and pure so v2 rendering can map twips/half-points/eighth-points
|
|
5
|
+
* into the layout-engine pixel domain without depending on pm-adapter or v1
|
|
6
|
+
* editor runtime.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PX_PER_TWIP: number;
|
|
9
|
+
export declare const PX_PER_POINT: number;
|
|
10
|
+
export declare const PX_PER_EIGHTH_POINT: number;
|
|
11
|
+
export declare function twipsToPx(value: number): number;
|
|
12
|
+
export declare function halfPointsToPx(value: number): number;
|
|
13
|
+
export declare function eighthPointsToPx(value: number): number;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { combineIndentProperties, combineProperties, combineRunProperties, FONT_SLOT_THEME_PAIRS, PropertyObject } from '../cascade.js';
|
|
2
|
+
import { ParagraphConditionalFormatting, ParagraphProperties, RunProperties } from './types.js';
|
|
3
|
+
import { NumberingProperties } from './numbering-types.js';
|
|
4
|
+
import { StylesDocumentProperties, TableProperties, TableLookProperties, TableCellProperties } from './styles-types.js';
|
|
5
|
+
export { combineIndentProperties, combineProperties, combineRunProperties, FONT_SLOT_THEME_PAIRS };
|
|
6
|
+
export type { PropertyObject };
|
|
7
|
+
export type * from './types.js';
|
|
8
|
+
export type * from './numbering-types.js';
|
|
9
|
+
export type * from './styles-types.js';
|
|
10
|
+
export { TABLE_STYLE_ID_TABLE_GRID, TABLE_STYLE_ID_TABLE_NORMAL, TABLE_FALLBACK_BORDER, TABLE_FALLBACK_BORDERS, TABLE_FALLBACK_CELL_PADDING, isKnownTableStyleId, findTypeDefaultTableStyleId, resolveExistingTableEffectiveStyleId, resolvePreferredNewTableStyleId, } from './table-style-selection.js';
|
|
11
|
+
export type { ResolvedStyle, ResolvedStyleSource, TableSemanticStyleHints } from './table-style-selection.js';
|
|
12
|
+
export interface OoxmlResolverParams {
|
|
13
|
+
translatedNumbering: NumberingProperties | null | undefined;
|
|
14
|
+
translatedLinkedStyles: StylesDocumentProperties | null | undefined;
|
|
15
|
+
/** Actual `w:type="paragraph" w:default="1"` style ID. */
|
|
16
|
+
defaultParagraphStyleId?: string;
|
|
17
|
+
/** Bounded read-only aliases for legacy dangling semantic references. */
|
|
18
|
+
styleIdAliases?: Readonly<Record<string, string>>;
|
|
19
|
+
/**
|
|
20
|
+
* Opt-in memoization of `resolveStyleChain` results, keyed per params
|
|
21
|
+
* object. Only set this when `translatedLinkedStyles` is immutable for the
|
|
22
|
+
* lifetime of this params object (the compiled WordStyleModel guarantees
|
|
23
|
+
* that; callers that rebuild styles in place must not opt in).
|
|
24
|
+
*/
|
|
25
|
+
enableChainMemo?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface TableInfo {
|
|
28
|
+
tableProperties: TableProperties | null | undefined;
|
|
29
|
+
directTableProperties?: TableProperties | null | undefined;
|
|
30
|
+
rowIndex: number;
|
|
31
|
+
cellIndex: number;
|
|
32
|
+
numCells: number;
|
|
33
|
+
numRows: number;
|
|
34
|
+
rowCnfStyle?: ParagraphConditionalFormatting | null;
|
|
35
|
+
cellCnfStyle?: ParagraphConditionalFormatting | null;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* OOXML default tblLook value (0x04A0) per ECMA-376 §17.4.56.
|
|
39
|
+
* Word applies these flags when a table has no explicit w:tblLook element.
|
|
40
|
+
*/
|
|
41
|
+
export declare const DEFAULT_TBL_LOOK: TableLookProperties;
|
|
42
|
+
export declare function resolveRunProperties(params: OoxmlResolverParams, inlineRpr: RunProperties | null | undefined, resolvedPpr: ParagraphProperties | null | undefined, tableInfo?: TableInfo | null | undefined, isListNumber?: boolean, numberingDefinedInline?: boolean): RunProperties;
|
|
43
|
+
export declare function resolveParagraphProperties(params: OoxmlResolverParams, inlineProps: ParagraphProperties | null | undefined, tableInfo: TableInfo | null | undefined): ParagraphProperties;
|
|
44
|
+
export declare function resolveStyleChain<T extends PropertyObject>(propertyType: 'paragraphProperties' | 'runProperties' | 'tableProperties', params: OoxmlResolverParams, styleId: string | undefined, followBasedOnChain?: boolean): T;
|
|
45
|
+
export declare function getNumberingProperties<T extends ParagraphProperties | RunProperties>(propertyType: 'paragraphProperties' | 'runProperties', params: OoxmlResolverParams, ilvl: number, numId: number, tries?: number): T;
|
|
46
|
+
/**
|
|
47
|
+
* Resolves table-level properties (borders, cellMargins, justification,
|
|
48
|
+
* tableWidth, tableCellSpacing) by walking the full basedOn chain.
|
|
49
|
+
*
|
|
50
|
+
* Returns raw OOXML-translated shapes exactly as stored in
|
|
51
|
+
* `translatedLinkedStyles`. Conversion to layout units (px, pt)
|
|
52
|
+
* remains in the pm-adapter hydrator.
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveTableProperties(tableStyleId: string | null | undefined, translatedLinkedStyles: StylesDocumentProperties | null | undefined): TableProperties;
|
|
55
|
+
export declare function resolveDocxFontFamily(attributes: Record<string, unknown> | null | undefined, docx: Record<string, unknown> | null | undefined, toCssFontFamily?: (fontName: string, docx?: Record<string, unknown>) => string): string | null;
|
|
56
|
+
export declare function resolveCellStyles<T extends PropertyObject>(propertyType: 'paragraphProperties' | 'runProperties' | 'tableCellProperties', tableInfo: TableInfo | null | undefined, translatedLinkedStyles: StylesDocumentProperties): T[];
|
|
57
|
+
/**
|
|
58
|
+
* Resolve table cell properties (shading, borders, margins) by cascading
|
|
59
|
+
* conditional table style properties with inline cell properties.
|
|
60
|
+
*
|
|
61
|
+
* Cascade order (low → high priority):
|
|
62
|
+
* wholeTable → bands → firstRow/lastRow/firstCol/lastCol → corner cells → inline
|
|
63
|
+
*/
|
|
64
|
+
export declare function resolveTableCellProperties(inlineProps: TableCellProperties | null | undefined, tableInfo: TableInfo | null | undefined, translatedLinkedStyles: StylesDocumentProperties | null | undefined): TableCellProperties;
|