ooxml-ui 1.51.0 → 1.52.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/README.md +17 -1
- package/custom-elements.json +72 -0
- package/dist/chart/format-pane-analysis.d.ts +1 -0
- package/dist/chart/format-pane-axis.d.ts +1 -0
- package/dist/chart/format-pane-fill-kinds.d.ts +1 -0
- package/dist/chart/format-pane-fill-line.d.ts +1 -0
- package/dist/chart/format-pane-locales/index.d.ts +1 -1
- package/dist/chart/format-pane-locales/index.d.ts.map +1 -1
- package/dist/chart/format-pane-locales/ja.d.ts +3 -0
- package/dist/chart/format-pane-locales/ja.d.ts.map +1 -0
- package/dist/chart/format-pane-locales/ko.d.ts +3 -0
- package/dist/chart/format-pane-locales/ko.d.ts.map +1 -0
- package/dist/chart/format-pane-model.d.ts +1 -0
- package/dist/chart/format-pane-text.d.ts +1 -0
- package/dist/chart/format-pane-types.d.ts +1 -0
- package/dist/chart/format-pane-view.d.ts +1 -0
- package/dist/chart-format-locales.js +1 -1
- package/dist/chrome/format-section.d.ts +50 -0
- package/dist/chrome/format-section.d.ts.map +1 -0
- package/dist/{chunk-SRYBCJC2.js → chunk-3TF5IIIJ.js} +62 -13
- package/dist/{chunk-FE5KE5TR.js → chunk-4W4QZF4C.js} +1 -1
- package/dist/{chunk-6EOS74O4.js → chunk-5FMWQWLP.js} +27 -2
- package/dist/{chunk-N6AKS4ED.js → chunk-6C6S4AWF.js} +47 -4
- package/dist/{chunk-63ELC26U.js → chunk-ALWA7Q42.js} +6 -5
- package/dist/{chunk-IHZK4NPQ.js → chunk-FP45SLBV.js} +6 -6
- package/dist/{chunk-Q6WZEGAM.js → chunk-FQN4XNEF.js} +1 -1
- package/dist/{chunk-4OBMFPGF.js → chunk-GSO4HLIY.js} +620 -2
- package/dist/{chunk-II43ALTT.js → chunk-HUR5JAG7.js} +1 -1
- package/dist/{chunk-BY7X2LNM.js → chunk-JNCHVQQA.js} +4 -4
- package/dist/{chunk-6FFZFH73.js → chunk-QDU4GLWK.js} +1 -1
- package/dist/{chunk-2JHM6UO3.js → chunk-QGRJJUH7.js} +1 -1
- package/dist/controls.d.ts +4 -2
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +5 -5
- package/dist/docx/backstage-pages.d.ts +2 -0
- package/dist/docx/context-menu-actions.d.ts +14 -1
- package/dist/docx/context-menu-items.d.ts +13 -0
- package/dist/docx/convert-notes-dialog.d.ts +14 -0
- package/dist/docx/document-information-attr.d.ts +14 -0
- package/dist/docx/document-inspector-apply.d.ts +20 -0
- package/dist/docx/document-inspector-dialog.d.ts +16 -0
- package/dist/docx/editor-chrome.d.ts +2 -0
- package/dist/docx/editor-plugins.d.ts +5 -0
- package/dist/docx/field-update.d.ts +4 -3
- package/dist/docx/format-dialogs.d.ts +7 -1
- package/dist/docx/locales/convert-notes.d.ts +14 -0
- package/dist/docx/locales/document-inspector.d.ts +39 -0
- package/dist/docx/locales/en.d.ts +66 -0
- package/dist/docx/locales/find-stories.d.ts +10 -0
- package/dist/docx/locales/paste-options.d.ts +17 -0
- package/dist/docx/locales/picture-watermark.d.ts +12 -0
- package/dist/docx/locales/picture.d.ts +11 -0
- package/dist/docx/localization-strings.d.ts +66 -0
- package/dist/docx/note-commands.d.ts +12 -1
- package/dist/docx/page-controller.d.ts +5 -4
- package/dist/docx/parts-controller.d.ts +21 -3
- package/dist/docx/parts-story-writes.d.ts +10 -0
- package/dist/docx/paste-options-button.d.ts +18 -0
- package/dist/docx/paste-options.d.ts +45 -0
- package/dist/docx/paste-special-dialog.d.ts +11 -0
- package/dist/docx/picture-dialog.d.ts +3 -2
- package/dist/docx/picture-drop.d.ts +25 -0
- package/dist/docx/picture-format-commands.d.ts +25 -0
- package/dist/docx/picture-format-ribbon.d.ts +4 -0
- package/dist/docx/print-header-footer.d.ts +6 -2
- package/dist/docx/print-inline-object.d.ts +3 -0
- package/dist/docx/print-picture-watermark.d.ts +11 -0
- package/dist/docx/ribbon-action.d.ts +14 -0
- package/dist/docx/ribbon-icons.d.ts +1 -0
- package/dist/docx/search-controller.d.ts +24 -2
- package/dist/docx/search-panel-options.d.ts +10 -0
- package/dist/docx/search-panel.d.ts +3 -0
- package/dist/docx/search-stories.d.ts +38 -0
- package/dist/docx/search-story-host.d.ts +13 -0
- package/dist/docx/search-story-replace.d.ts +33 -0
- package/dist/docx/shape-commands.d.ts +2 -2
- package/dist/docx/shape-format-ribbon.d.ts +1 -0
- package/dist/docx/table-properties.d.ts +2 -1
- package/dist/docx/watermark-commands.d.ts +6 -3
- package/dist/docx/watermark-dialog.d.ts +25 -4
- package/dist/docx/watermark-picture.d.ts +12 -0
- package/dist/docx/word-paste.d.ts +13 -0
- package/dist/docx.js +3435 -1256
- package/dist/embedding/region-host.d.ts +1 -0
- package/dist/export/pdf-embedded-font.d.ts +1 -0
- package/dist/export/pdf-embedded-font.d.ts.map +1 -0
- package/dist/export/pdf-font-faces.d.ts +26 -0
- package/dist/export/pdf-font-faces.d.ts.map +1 -0
- package/dist/export/pdf-fonts.d.ts +1 -0
- package/dist/export/pdf-fonts.d.ts.map +1 -0
- package/dist/export/pdf-image.d.ts +18 -0
- package/dist/export/pdf-image.d.ts.map +1 -0
- package/dist/{visio → export}/pdf-path.d.ts +1 -0
- package/dist/export/pdf-path.d.ts.map +1 -0
- package/dist/{visio → export}/pdf-svg-gradient.d.ts +2 -1
- package/dist/export/pdf-svg-gradient.d.ts.map +1 -0
- package/dist/export/pdf-svg-notes.d.ts +25 -0
- package/dist/export/pdf-svg-notes.d.ts.map +1 -0
- package/dist/export/pdf-svg-shapes.d.ts +3 -0
- package/dist/export/pdf-svg-shapes.d.ts.map +1 -0
- package/dist/{visio → export}/pdf-svg-style.d.ts +1 -0
- package/dist/export/pdf-svg-style.d.ts.map +1 -0
- package/dist/export/pdf-svg-text.d.ts +11 -0
- package/dist/export/pdf-svg-text.d.ts.map +1 -0
- package/dist/{visio → export}/pdf-svg.d.ts +13 -3
- package/dist/export/pdf-svg.d.ts.map +1 -0
- package/dist/export/pdf-vector.d.ts +14 -8
- package/dist/export/pdf-vector.d.ts.map +1 -0
- package/dist/fonts/webfonts.d.ts +5 -3
- package/dist/fonts/webfonts.d.ts.map +1 -1
- package/dist/image-native-size.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/look-tokens.d.ts +25 -0
- package/dist/look-tokens.d.ts.map +1 -0
- package/dist/look.d.ts +29 -0
- package/dist/look.d.ts.map +1 -0
- package/dist/notices/toasts.d.ts +3 -0
- package/dist/notices/toasts.d.ts.map +1 -1
- package/dist/picture-effects.d.ts +1 -0
- package/dist/pptx/{chunk-VOBKKF45.mjs → chunk-5454QDUH.mjs} +712 -3
- package/dist/pptx/{chunk-U6YDJVNS.cjs → chunk-7ZRVQFQN.cjs} +47 -47
- package/dist/pptx/{chunk-2FKBWWSS.cjs → chunk-AN34Z3QP.cjs} +145 -2
- package/dist/pptx/{chunk-XLSW7WM3.mjs → chunk-EEELXUAE.mjs} +135 -3
- package/dist/pptx/{chunk-XZSGVMRN.cjs → chunk-IV2F5JWR.cjs} +62 -3
- package/dist/pptx/{chunk-VR6UAL2A.mjs → chunk-KCIIXE4D.mjs} +93724 -88066
- package/dist/pptx/{chunk-EU7TGRWX.mjs → chunk-NGOH4ENE.mjs} +2 -2
- package/dist/pptx/{chunk-G4VNRJUX.mjs → chunk-Q23MZFWZ.mjs} +62 -3
- package/dist/pptx/{chunk-OIEN54CC.cjs → chunk-SC4VATDY.cjs} +90551 -84780
- package/dist/pptx/{chunk-3JGYWDMR.cjs → chunk-WKKLVLLP.cjs} +712 -3
- package/dist/pptx/dom/index.cjs +380 -380
- package/dist/pptx/dom/index.mjs +8 -8
- package/dist/pptx/export/html2canvas-clone.cjs +6 -6
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/export/index.d.ts +6 -0
- package/dist/pptx/export/index.d.ts.map +1 -1
- package/dist/pptx/export/pdf-export-diagnostics.d.ts +44 -0
- package/dist/pptx/export/pdf-export-diagnostics.d.ts.map +1 -0
- package/dist/pptx/export/pdf-export-notice.d.ts +52 -0
- package/dist/pptx/export/pdf-export-notice.d.ts.map +1 -0
- package/dist/pptx/export/pdf-export-run.d.ts +30 -0
- package/dist/pptx/export/pdf-export-run.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-box.d.ts +26 -0
- package/dist/pptx/export/pdf-vector-box.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-collect-parts.d.ts +49 -0
- package/dist/pptx/export/pdf-vector-collect-parts.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-collect.d.ts +39 -0
- package/dist/pptx/export/pdf-vector-collect.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-css.d.ts +36 -0
- package/dist/pptx/export/pdf-vector-css.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-display-list.d.ts +92 -0
- package/dist/pptx/export/pdf-vector-display-list.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-export.d.ts +63 -0
- package/dist/pptx/export/pdf-vector-export.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-paint.d.ts +44 -0
- package/dist/pptx/export/pdf-vector-paint.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-raster-batch.d.ts +43 -0
- package/dist/pptx/export/pdf-vector-raster-batch.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-raster-isolate.d.ts +67 -0
- package/dist/pptx/export/pdf-vector-raster-isolate.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-raster-live.d.ts +17 -0
- package/dist/pptx/export/pdf-vector-raster-live.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-raster-template.d.ts +26 -0
- package/dist/pptx/export/pdf-vector-raster-template.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-raster.d.ts +27 -0
- package/dist/pptx/export/pdf-vector-raster.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-select.d.ts +30 -0
- package/dist/pptx/export/pdf-vector-select.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-svg.d.ts +13 -0
- package/dist/pptx/export/pdf-vector-svg.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-text.d.ts +35 -0
- package/dist/pptx/export/pdf-vector-text.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-timeout.d.ts +15 -0
- package/dist/pptx/export/pdf-vector-timeout.d.ts.map +1 -0
- package/dist/pptx/export/pdf-vector-transforms.d.ts +15 -0
- package/dist/pptx/export/pdf-vector-transforms.d.ts.map +1 -0
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/locale-catalog.d.ts.map +1 -1
- package/dist/pptx/i18n/translations-en-pdf-export.d.ts +7 -0
- package/dist/pptx/i18n/translations-en-pdf-export.d.ts.map +1 -0
- package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
- package/dist/pptx/index.cjs +3652 -3260
- package/dist/pptx/index.mjs +4 -4
- package/dist/pptx/render/chrome-controls-state.d.ts +10 -0
- package/dist/pptx/render/chrome-controls-state.d.ts.map +1 -1
- package/dist/pptx/render/compatibility-warning-toasts.d.ts +12 -0
- package/dist/pptx/render/compatibility-warning-toasts.d.ts.map +1 -1
- package/dist/pptx/render/controller/format-pane-controller.d.ts +69 -0
- package/dist/pptx/render/controller/format-pane-controller.d.ts.map +1 -0
- package/dist/pptx/render/controller/index.d.ts +2 -0
- package/dist/pptx/render/controller/index.d.ts.map +1 -1
- package/dist/pptx/render/customization/customization-resolve.d.ts +4 -0
- package/dist/pptx/render/customization/customization-resolve.d.ts.map +1 -1
- package/dist/pptx/render/customization/customization-types.d.ts +7 -1
- package/dist/pptx/render/customization/customization-types.d.ts.map +1 -1
- package/dist/pptx/render/customization/ribbon-control-visibility.d.ts.map +1 -1
- package/dist/pptx/render/deck-webfont-readiness.d.ts.map +1 -1
- package/dist/pptx/render/editor-chrome/cards-css.d.ts +9 -0
- package/dist/pptx/render/editor-chrome/cards-css.d.ts.map +1 -0
- package/dist/pptx/render/editor-chrome/home-layout-css.d.ts.map +1 -1
- package/dist/pptx/render/editor-chrome/index.d.ts +1 -0
- package/dist/pptx/render/editor-chrome/index.d.ts.map +1 -1
- package/dist/pptx/render/embedded-font-bytes.d.ts.map +1 -1
- package/dist/pptx/render/embedded-font-trust.d.ts.map +1 -1
- package/dist/pptx/render/export-clone.d.ts.map +1 -1
- package/dist/pptx/render/font-embedding.d.ts +26 -0
- package/dist/pptx/render/font-embedding.d.ts.map +1 -1
- package/dist/pptx/render/foreign-object-svg-document.d.ts +32 -1
- package/dist/pptx/render/foreign-object-svg-document.d.ts.map +1 -1
- package/dist/pptx/render/google-webfonts.d.ts +11 -1
- package/dist/pptx/render/google-webfonts.d.ts.map +1 -1
- package/dist/pptx/render/html-text-paste.d.ts +26 -0
- package/dist/pptx/render/html-text-paste.d.ts.map +1 -0
- package/dist/pptx/render/index.d.ts +13 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/inline-caret-offset.d.ts +12 -0
- package/dist/pptx/render/inline-caret-offset.d.ts.map +1 -0
- package/dist/pptx/render/inline-caret.d.ts +0 -9
- package/dist/pptx/render/inline-caret.d.ts.map +1 -1
- package/dist/pptx/render/inline-rich-paste.d.ts +53 -0
- package/dist/pptx/render/inline-rich-paste.d.ts.map +1 -0
- package/dist/pptx/render/inspector/format-panel-sections.d.ts +42 -0
- package/dist/pptx/render/inspector/format-panel-sections.d.ts.map +1 -0
- package/dist/pptx/render/inspector/format-section-mixed.d.ts +27 -0
- package/dist/pptx/render/inspector/format-section-mixed.d.ts.map +1 -0
- package/dist/pptx/render/inspector/format-section-reveal.d.ts +21 -0
- package/dist/pptx/render/inspector/format-section-reveal.d.ts.map +1 -0
- package/dist/pptx/render/inspector/format-sections.d.ts +54 -0
- package/dist/pptx/render/inspector/format-sections.d.ts.map +1 -0
- package/dist/pptx/render/inspector/index.d.ts +7 -0
- package/dist/pptx/render/inspector/index.d.ts.map +1 -1
- package/dist/pptx/render/options/viewer-options-apply.d.ts +8 -0
- package/dist/pptx/render/options/viewer-options-apply.d.ts.map +1 -1
- package/dist/pptx/render/options/viewer-options-tabs-advanced.d.ts.map +1 -1
- package/dist/pptx/render/options/viewer-options.d.ts +4 -0
- package/dist/pptx/render/options/viewer-options.d.ts.map +1 -1
- package/dist/pptx/render/pdf-export-range.d.ts +39 -0
- package/dist/pptx/render/pdf-export-range.d.ts.map +1 -0
- package/dist/pptx/render/slide-package-clipboard.d.ts +5 -0
- package/dist/pptx/render/slide-package-clipboard.d.ts.map +1 -1
- package/dist/pptx/render/system-clipboard-copy.d.ts +54 -0
- package/dist/pptx/render/system-clipboard-copy.d.ts.map +1 -0
- package/dist/pptx/render/table-cell-edit-outcome.d.ts +59 -0
- package/dist/pptx/render/table-cell-edit-outcome.d.ts.map +1 -0
- package/dist/pptx/render/table-cell-navigation.d.ts +97 -0
- package/dist/pptx/render/table-cell-navigation.d.ts.map +1 -0
- package/dist/pptx/render/table-cell-rich-text.d.ts +7 -0
- package/dist/pptx/render/table-cell-rich-text.d.ts.map +1 -0
- package/dist/pptx/render/table-cell-text-editor-dom.d.ts +42 -0
- package/dist/pptx/render/table-cell-text-editor-dom.d.ts.map +1 -0
- package/dist/pptx/render/table-cell-text-editor.d.ts +64 -0
- package/dist/pptx/render/table-cell-text-editor.d.ts.map +1 -0
- package/dist/pptx/render/table-cell-text-range.d.ts +24 -0
- package/dist/pptx/render/table-cell-text-range.d.ts.map +1 -0
- package/dist/pptx/render/table-cells-format.d.ts +32 -0
- package/dist/pptx/render/table-cells-format.d.ts.map +1 -0
- package/dist/pptx/render/table-cells-paste-listener.d.ts +27 -0
- package/dist/pptx/render/table-cells-paste-listener.d.ts.map +1 -0
- package/dist/pptx/render/table-tsv-paste.d.ts +36 -0
- package/dist/pptx/render/table-tsv-paste.d.ts.map +1 -0
- package/dist/pptx/render/text-design-tracking.d.ts +6 -0
- package/dist/pptx/render/text-design-tracking.d.ts.map +1 -1
- package/dist/pptx/render/text-metric-tracking.d.ts.map +1 -1
- package/dist/pptx/render/text-run-style.d.ts.map +1 -1
- package/dist/pptx/render/text-tracking-settle.d.ts +13 -0
- package/dist/pptx/render/text-tracking-settle.d.ts.map +1 -0
- package/dist/pptx/render/text-warp-outline-webfont-fetch.d.ts +1 -1
- package/dist/pptx/render/text-warp-outline-webfont-fetch.d.ts.map +1 -1
- package/dist/pptx/render/viewer-props-manifest.d.ts.map +1 -1
- package/dist/pptx/{smartart-insert-preview-QZWYQJRA.mjs → smartart-insert-preview-H2LZCTYG.mjs} +5 -5
- package/dist/pptx/{smartart-insert-preview-4DGDUPAL.cjs → smartart-insert-preview-MMCWPA26.cjs} +6 -6
- package/dist/pptx/theme/index.cjs +18 -18
- package/dist/pptx/theme/index.mjs +1 -1
- package/dist/pptx/web-components/format-section.d.ts +7 -0
- package/dist/pptx/web-components/format-section.d.ts.map +1 -0
- package/dist/pptx/web-components/index.d.ts +5 -2
- package/dist/pptx/web-components/index.d.ts.map +1 -1
- package/dist/pptx/web-components/office-aliases.d.ts.map +1 -1
- package/dist/pptx/web-components/office-token-bridge.d.ts +1 -1
- package/dist/pptx/web-components/office-token-bridge.d.ts.map +1 -1
- package/dist/pptx/web-components/pdf-export-dialog-body.d.ts +26 -0
- package/dist/pptx/web-components/pdf-export-dialog-body.d.ts.map +1 -0
- package/dist/pptx/web-components/pdf-export-dialog.d.ts +33 -0
- package/dist/pptx/web-components/pdf-export-dialog.d.ts.map +1 -0
- package/dist/pptx/web-components/pdf-export-options.d.ts +26 -0
- package/dist/pptx/web-components/pdf-export-options.d.ts.map +1 -0
- package/dist/pptx/web-components/ribbon-launchers.d.ts +12 -2
- package/dist/pptx/web-components/ribbon-launchers.d.ts.map +1 -1
- package/dist/pptx/web-components/theme-editor-dock.d.ts.map +1 -1
- package/dist/presence.js +3 -3
- package/dist/render-cache.d.ts +1 -0
- package/dist/smartart.js +3 -3
- package/dist/teams.js +7 -7
- package/dist/theme.d.ts +9 -0
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +2 -2
- package/dist/tokens.d.ts +10 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/visio/font-stack.d.ts +6 -0
- package/dist/visio.js +198 -102
- package/dist/xlsx.js +14 -14
- package/package.json +2 -2
- package/dist/visio/pdf-svg-text.d.ts +0 -8
|
@@ -128,6 +128,72 @@ export declare const strings: {
|
|
|
128
128
|
readonly 'Drop Cap Options\u2026': 'Drop Cap Options…';
|
|
129
129
|
readonly 'Lines to drop': 'Lines to drop';
|
|
130
130
|
readonly 'Enter a font, 1 to 10 lines and a distance from 0 to 22 inches.': 'Enter a font, 1 to 10 lines and a distance from 0 to 22 inches.';
|
|
131
|
+
readonly 'Main Document': 'Main Document';
|
|
132
|
+
readonly 'Text Boxes': 'Text Boxes';
|
|
133
|
+
readonly '-Section {section}-': '-Section {section}-';
|
|
134
|
+
readonly 'Search location': 'Search location';
|
|
135
|
+
readonly 'Paste Options (Ctrl)': 'Paste Options (Ctrl)';
|
|
136
|
+
readonly 'Keep Source Formatting': 'Keep Source Formatting';
|
|
137
|
+
readonly 'Merge Formatting': 'Merge Formatting';
|
|
138
|
+
readonly 'Keep Text Only': 'Keep Text Only';
|
|
139
|
+
readonly 'Paste Special': 'Paste Special';
|
|
140
|
+
readonly 'Paste Special...': 'Paste Special...';
|
|
141
|
+
readonly 'Paste as:': 'Paste as:';
|
|
142
|
+
readonly 'HTML Format': 'HTML Format';
|
|
143
|
+
readonly 'Unformatted Text': 'Unformatted Text';
|
|
144
|
+
readonly 'The browser did not let the editor read the clipboard. Press Ctrl+V to paste instead.': 'The browser did not let the editor read the clipboard. Press Ctrl+V to paste instead.';
|
|
145
|
+
readonly 'The clipboard holds nothing the editor can paste.': 'The clipboard holds nothing the editor can paste.';
|
|
146
|
+
readonly 'tab.picture-format': 'Picture Format';
|
|
147
|
+
readonly Crop: 'Crop';
|
|
148
|
+
readonly 'Crop (%)': 'Crop (%)';
|
|
149
|
+
readonly 'The crop must leave part of the picture showing.': 'The crop must leave part of the picture showing.';
|
|
150
|
+
readonly 'Picture watermark': 'Picture watermark';
|
|
151
|
+
readonly 'Select Picture\u2026': 'Select Picture…';
|
|
152
|
+
readonly Scale: 'Scale';
|
|
153
|
+
readonly Auto: 'Auto';
|
|
154
|
+
readonly Washout: 'Washout';
|
|
155
|
+
readonly 'Select a picture for the watermark.': 'Select a picture for the watermark.';
|
|
156
|
+
readonly 'Convert notes': 'Convert notes';
|
|
157
|
+
readonly 'Convert Notes\u2026': 'Convert Notes…';
|
|
158
|
+
readonly 'Convert Notes': 'Convert Notes';
|
|
159
|
+
readonly 'Convert all footnotes to endnotes': 'Convert all footnotes to endnotes';
|
|
160
|
+
readonly 'Convert all endnotes to footnotes': 'Convert all endnotes to footnotes';
|
|
161
|
+
readonly 'Swap footnotes and endnotes': 'Swap footnotes and endnotes';
|
|
162
|
+
readonly 'Convert to Endnote': 'Convert to Endnote';
|
|
163
|
+
readonly 'Convert to Footnote': 'Convert to Footnote';
|
|
164
|
+
readonly 'Document Inspector': 'Document Inspector';
|
|
165
|
+
readonly 'Check for Issues': 'Check for Issues';
|
|
166
|
+
readonly 'Before publishing this file, check it for hidden properties and personal information.': 'Before publishing this file, check it for hidden properties and personal information.';
|
|
167
|
+
readonly 'To check the document for the selected content, click Inspect.': 'To check the document for the selected content, click Inspect.';
|
|
168
|
+
readonly 'Review the inspection results.': 'Review the inspection results.';
|
|
169
|
+
readonly Inspect: 'Inspect';
|
|
170
|
+
readonly Reinspect: 'Reinspect';
|
|
171
|
+
readonly 'Remove All': 'Remove All';
|
|
172
|
+
readonly 'Comments, Revisions, and Versions': 'Comments, Revisions, and Versions';
|
|
173
|
+
readonly 'Inspects the document for comments and revision marks.': 'Inspects the document for comments and revision marks.';
|
|
174
|
+
readonly 'Document Properties and Personal Information': 'Document Properties and Personal Information';
|
|
175
|
+
readonly 'Inspects for hidden metadata or personal information saved with the document.': 'Inspects for hidden metadata or personal information saved with the document.';
|
|
176
|
+
readonly 'Custom XML Data': 'Custom XML Data';
|
|
177
|
+
readonly 'Inspects for custom XML data stored with this document.': 'Inspects for custom XML data stored with this document.';
|
|
178
|
+
readonly 'Headers, Footers, and Watermarks': 'Headers, Footers, and Watermarks';
|
|
179
|
+
readonly 'Inspects the document for information in headers, footers, and watermarks.': 'Inspects the document for information in headers, footers, and watermarks.';
|
|
180
|
+
readonly 'Hidden Text': 'Hidden Text';
|
|
181
|
+
readonly 'Inspects the document for text that has been formatted as hidden.': 'Inspects the document for text that has been formatted as hidden.';
|
|
182
|
+
readonly 'No items were found.': 'No items were found.';
|
|
183
|
+
readonly 'The following items were found:': 'The following items were found:';
|
|
184
|
+
readonly 'All items were removed.': 'All items were removed.';
|
|
185
|
+
readonly 'Removing these items is not allowed while the document is protected.': 'Removing these items is not allowed while the document is protected.';
|
|
186
|
+
readonly 'Revision marks': 'Revision marks';
|
|
187
|
+
readonly Company: 'Company';
|
|
188
|
+
readonly 'Reviewer names': 'Reviewer names';
|
|
189
|
+
readonly 'Hyperlink base': 'Hyperlink base';
|
|
190
|
+
readonly 'Template name': 'Template name';
|
|
191
|
+
readonly 'Custom properties': 'Custom properties';
|
|
192
|
+
readonly 'Custom XML data': 'Custom XML data';
|
|
193
|
+
readonly Headers: 'Headers';
|
|
194
|
+
readonly Footers: 'Footers';
|
|
195
|
+
readonly Watermarks: 'Watermarks';
|
|
196
|
+
readonly Manager: 'Manager';
|
|
131
197
|
readonly 'Add line numbering': 'Add line numbering';
|
|
132
198
|
readonly 'Automatic distance from text': 'Automatic distance from text';
|
|
133
199
|
readonly 'Count by': 'Count by';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Plugin } from 'prosemirror-state';
|
|
2
2
|
import type { EditorView } from 'prosemirror-view';
|
|
3
|
-
import { type DocumentModel, type Note } from 'ooxml-core/docx';
|
|
3
|
+
import { type DocumentModel, type Note, type NoteConversionPlan, type NoteSelection } from 'ooxml-core/docx';
|
|
4
4
|
export type NoteKind = 'footnote' | 'endnote';
|
|
5
5
|
/** The next free note id: Word numbers user notes from 1 (separators use -1 and 0). */
|
|
6
6
|
export declare function nextNoteId(notes: Note[] | undefined): string;
|
|
@@ -13,5 +13,16 @@ export declare function insertNote(view: EditorView, model: DocumentModel, kind:
|
|
|
13
13
|
model: DocumentModel;
|
|
14
14
|
id: string;
|
|
15
15
|
};
|
|
16
|
+
/** The note reference touching the caret (a right-click beside it), or undefined. */
|
|
17
|
+
export declare function noteReferenceAtSelection(view: EditorView): {
|
|
18
|
+
kind: NoteKind;
|
|
19
|
+
id: string;
|
|
20
|
+
} | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Word's Convert Notes and "Convert to Endnote/Footnote": moves the selected notes to the other
|
|
23
|
+
* part and retargets their references in one undoable transaction. `reservedIds` are the ids
|
|
24
|
+
* each part holds on disk, so a moved note never takes over a deleted note's element.
|
|
25
|
+
*/
|
|
26
|
+
export declare function convertNotesInView(view: EditorView, model: DocumentModel, selection: NoteSelection, reservedIds?: Partial<Record<NoteKind, Iterable<string>>>): NoteConversionPlan;
|
|
16
27
|
/** Keeps note reference numbers in document order, as Word renumbers notes after every change. */
|
|
17
28
|
export declare function noteNumberingPlugin(): Plugin;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { SectionProperties
|
|
1
|
+
import type { SectionProperties } from 'ooxml-core/docx';
|
|
2
2
|
import { type PageSetupValues } from 'ooxml-core/docx';
|
|
3
3
|
import type { EditorHost } from './editor-host.js';
|
|
4
4
|
import type { PrintLayoutController } from './print-layout-view.js';
|
|
5
|
+
import { type AnyWatermark } from './watermark-commands.js';
|
|
5
6
|
import type { RibbonAction } from './ribbon.js';
|
|
6
7
|
import type { StatusBar } from './status-bar.js';
|
|
7
8
|
import { type ZoomFit } from 'ooxml-core/docx/ui';
|
|
@@ -36,10 +37,10 @@ export declare class PageController {
|
|
|
36
37
|
applyColumns(columns: SectionProperties['columns'], footnoteColumns?: number): void;
|
|
37
38
|
/** Layout > Line Numbers options, recorded as one undoable section edit. */
|
|
38
39
|
applyLineNumberSettings(settings: SectionProperties['lineNumberSettings']): void;
|
|
39
|
-
/**
|
|
40
|
-
applyWatermark(spec:
|
|
40
|
+
/** Design > Watermark: a text or picture watermark in every header (or none), one undoable step. */
|
|
41
|
+
applyWatermark(spec: AnyWatermark | undefined): void;
|
|
41
42
|
/** The document's current watermark, for the Watermark dialog. */
|
|
42
|
-
currentWatermark():
|
|
43
|
+
currentWatermark(): AnyWatermark | undefined;
|
|
43
44
|
/** Layout > Page Borders, recorded as one undoable section edit. */
|
|
44
45
|
applyPageBorders(borders: SectionProperties['pageBorders']): void;
|
|
45
46
|
/** Insert > Page Number: a PAGE field in the header or footer, creating the part when needed. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Block, ReviewDisplayMode } from 'ooxml-core/docx';
|
|
1
|
+
import type { Block, DocumentModel, NoteSelection, ReviewDisplayMode } from 'ooxml-core/docx';
|
|
2
|
+
import type { FindStory } from 'ooxml-core/docx/ui';
|
|
2
3
|
import { type Plugin } from 'prosemirror-state';
|
|
3
4
|
import type { EditorView } from 'prosemirror-view';
|
|
4
5
|
import type { EditorHost } from './editor-host.js';
|
|
@@ -6,6 +7,7 @@ import { type HeaderFooterSlotName } from './header-footer-editor.js';
|
|
|
6
7
|
import { type ImageMediaCache } from './image-media.js';
|
|
7
8
|
import { type NoteKind } from './note-commands.js';
|
|
8
9
|
import type { HeaderFooterContext } from './header-footer-ribbon.js';
|
|
10
|
+
import type { HeaderFooterStory } from './search-story-replace.js';
|
|
9
11
|
export interface PartsControllerHost extends EditorHost {
|
|
10
12
|
images(): ImageMediaCache;
|
|
11
13
|
/** Plugins shared with in-place editors (e.g. Ctrl+K). */
|
|
@@ -15,6 +17,8 @@ export interface PartsControllerHost extends EditorHost {
|
|
|
15
17
|
sectionIndex?(): number;
|
|
16
18
|
refreshControls?(): void;
|
|
17
19
|
reviewDisplayMode?(): ReviewDisplayMode;
|
|
20
|
+
/** The model as last loaded or saved, whose note ids a conversion must not reuse. */
|
|
21
|
+
savedModel?(): DocumentModel | undefined;
|
|
18
22
|
}
|
|
19
23
|
/** Headers, footers, footnotes and endnotes around the continuous editing surface. */
|
|
20
24
|
export declare class PartsController {
|
|
@@ -23,6 +27,7 @@ export declare class PartsController {
|
|
|
23
27
|
private footerEl?;
|
|
24
28
|
private notesEl?;
|
|
25
29
|
private active?;
|
|
30
|
+
private activeNote?;
|
|
26
31
|
private closeActive?;
|
|
27
32
|
private headerContext?;
|
|
28
33
|
private shownSection;
|
|
@@ -60,8 +65,8 @@ export declare class PartsController {
|
|
|
60
65
|
opened?(view: EditorView): void;
|
|
61
66
|
closed(): void;
|
|
62
67
|
}): boolean;
|
|
63
|
-
/** Closes the open header, footer or note editor, leaving the body focused. */
|
|
64
|
-
closeOpenStory(): void;
|
|
68
|
+
/** Closes the open header, footer or note editor, leaving the body focused unless told not to. */
|
|
69
|
+
closeOpenStory(focusBody?: boolean): void;
|
|
65
70
|
closeHeaderFooter(canvas?: HTMLElement, paper?: HTMLElement): void;
|
|
66
71
|
navigate(target: 'header' | 'footer' | 'previous' | 'next', canvas?: HTMLElement, paper?: HTMLElement): void;
|
|
67
72
|
toggleLink(): void;
|
|
@@ -76,8 +81,21 @@ export declare class PartsController {
|
|
|
76
81
|
render(canvas: HTMLElement | undefined, paper: HTMLElement | undefined, keepEditor?: boolean): void;
|
|
77
82
|
/** Inserts a footnote or endnote reference at the selection and opens the new note for typing. */
|
|
78
83
|
insertNote(kind: NoteKind, canvas?: HTMLElement, paper?: HTMLElement): void;
|
|
84
|
+
/** References > Convert Notes, or Convert to Endnote/Footnote on one note's reference. */
|
|
85
|
+
convertNotes(selection: NoteSelection): void;
|
|
79
86
|
/** Replaces one footnote's or endnote's blocks. */
|
|
80
87
|
private updateNote;
|
|
81
88
|
/** Applies header/footer edits to every section slot that shares the edited part. */
|
|
82
89
|
private updateHeaderFooter;
|
|
90
|
+
/** The story key (`findStoryKey`) of the open header, footer or note editor. */
|
|
91
|
+
activeStoryKey(): string | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* Find's way into a story on the continuous surface: shows the header or footer's section (or
|
|
94
|
+
* the note), opens its editor when editing is allowed and selects `from`..`to` in it.
|
|
95
|
+
*/
|
|
96
|
+
showStory(story: FindStory, from: number, to: number, canvas?: HTMLElement, paper?: HTMLElement): void;
|
|
97
|
+
/** Replace All's write of a header or footer part, as its own undo step. */
|
|
98
|
+
writeHeaderFooter(story: HeaderFooterStory, blocks: Block[]): void;
|
|
99
|
+
/** Replace All's write of the footnotes or endnotes story, as one undo step. */
|
|
100
|
+
writeNotes(kind: NoteKind, blocks: ReadonlyMap<string, Block[]>): void;
|
|
83
101
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Block, DocumentModel } from 'ooxml-core/docx';
|
|
2
|
+
import type { EditorState, Transaction } from 'prosemirror-state';
|
|
3
|
+
import type { HeaderFooterSlotName } from './header-footer-editor.js';
|
|
4
|
+
import type { NoteKind } from './note-commands.js';
|
|
5
|
+
/** Replaces footnotes' or endnotes' blocks, by note id. */
|
|
6
|
+
export declare function notesTransaction(state: EditorState, model: DocumentModel, kind: NoteKind, blocks: ReadonlyMap<string, Block[]>): Transaction;
|
|
7
|
+
/** Applies header/footer blocks to every section slot that shares the edited part. */
|
|
8
|
+
export declare function headerFooterTransaction(state: EditorState, source: DocumentModel, kind: 'headers' | 'footers', slot: HeaderFooterSlotName, sectionIndex: number, blocks: Block[]): Transaction;
|
|
9
|
+
/** The story key (`findStoryKey`) of the header or footer a section shows in `slot`. */
|
|
10
|
+
export declare function headerFooterStoryKey(model: DocumentModel, kind: 'headers' | 'footers', slot: HeaderFooterSlotName, sectionIndex: number): string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Paste Options button Word shows at the end of a pasted range, and its menu (the shared
|
|
3
|
+
* `office-ui-context-menu`): Keep Source Formatting, Merge Formatting, Keep Text Only. Ctrl on
|
|
4
|
+
* its own opens the menu while the button shows; Escape withdraws it.
|
|
5
|
+
*/
|
|
6
|
+
import { Plugin } from 'prosemirror-state';
|
|
7
|
+
import { type OfficeMenuItem } from '../controls.js';
|
|
8
|
+
import { type EditorLocale } from './localization.js';
|
|
9
|
+
import { type PastedRange } from './paste-options.js';
|
|
10
|
+
export interface PasteOptionsButtonHost {
|
|
11
|
+
/** Where the button and its menu are appended (inside the shadow root, for the theme). */
|
|
12
|
+
container(): HTMLElement | undefined;
|
|
13
|
+
locale(): EditorLocale;
|
|
14
|
+
}
|
|
15
|
+
/** The menu rows for `range`: the current choice is checked, HTML choices need HTML. */
|
|
16
|
+
export declare function pasteOptionItems(range: PastedRange, locale: EditorLocale): OfficeMenuItem[];
|
|
17
|
+
/** Draws the Paste Options button for the body editor. */
|
|
18
|
+
export declare function pasteOptionsButtonPlugin(host: PasteOptionsButtonHost): Plugin;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Word's Paste Options: after a paste the editor remembers the pasted range and what the
|
|
3
|
+
* clipboard held, so Keep Source Formatting, Merge Formatting and Keep Text Only can paste it
|
|
4
|
+
* again in place, as one undoable change. Typing, or Escape, ends the offer, as in Word.
|
|
5
|
+
*/
|
|
6
|
+
import type { WordPasteMode } from 'ooxml-core/docx';
|
|
7
|
+
import { Slice } from 'prosemirror-model';
|
|
8
|
+
import { Plugin, PluginKey } from 'prosemirror-state';
|
|
9
|
+
import type { EditorView } from 'prosemirror-view';
|
|
10
|
+
export type PasteOption = WordPasteMode | 'text';
|
|
11
|
+
/** What the clipboard held for one paste. */
|
|
12
|
+
export interface PastePayload {
|
|
13
|
+
html: string | null;
|
|
14
|
+
text: string;
|
|
15
|
+
}
|
|
16
|
+
export interface PastedRange {
|
|
17
|
+
from: number;
|
|
18
|
+
to: number;
|
|
19
|
+
payload: PastePayload;
|
|
20
|
+
option: PasteOption;
|
|
21
|
+
/** The style of the paragraph the text was first pasted into, which Merge Formatting takes. */
|
|
22
|
+
targetStyle: string;
|
|
23
|
+
}
|
|
24
|
+
/** Shared between the plugin's state and the commands that paste again. */
|
|
25
|
+
export declare class PasteController {
|
|
26
|
+
/** The payload the next paste transaction comes from, captured before ProseMirror reads it. */
|
|
27
|
+
payload: PastePayload | null;
|
|
28
|
+
/** How the next paste is applied; `source` for an ordinary paste. */
|
|
29
|
+
option: PasteOption;
|
|
30
|
+
/** Set when pasting again: the first paste's destination style. */
|
|
31
|
+
targetStyle: string | null;
|
|
32
|
+
}
|
|
33
|
+
export declare const pasteOptionsKey: PluginKey<PastedRange | null>;
|
|
34
|
+
/** A pasted slice as Merge Formatting pastes it into a paragraph styled `style`. */
|
|
35
|
+
export declare function mergeSlice(slice: Slice, style: string): Slice;
|
|
36
|
+
/** Tracks the last paste; `controller` is filled by the paste event and the clipboard commands. */
|
|
37
|
+
export declare function pasteOptionsPlugin(controller: PasteController): Plugin<PastedRange | null>;
|
|
38
|
+
/** Pastes `payload` as `option` at the selection, recording it for Paste Options. */
|
|
39
|
+
export declare function pastePayload(view: EditorView, payload: PastePayload, option: PasteOption, targetStyle?: string | null): boolean;
|
|
40
|
+
/** The last paste, while its Paste Options are on offer. */
|
|
41
|
+
export declare const pastedRange: (view: EditorView) => PastedRange | null;
|
|
42
|
+
/** Pastes the last paste again as `option`, replacing it as one undoable change. */
|
|
43
|
+
export declare function applyPasteOption(view: EditorView, option: PasteOption): boolean;
|
|
44
|
+
/** Withdraws the offer (Escape). */
|
|
45
|
+
export declare function dismissPasteOptions(view: EditorView): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EditorView } from 'prosemirror-view';
|
|
2
|
+
import { type ClipboardContents } from './context-menu-actions.js';
|
|
3
|
+
import type { FormatDialog } from './font-dialog.js';
|
|
4
|
+
import { type LocalizationKey } from './localization.js';
|
|
5
|
+
import { type PasteOption } from './paste-options.js';
|
|
6
|
+
/** The formats Paste Special offers for what the browser let the editor read. */
|
|
7
|
+
export declare function pasteSpecialFormats(contents: ClipboardContents): Array<{
|
|
8
|
+
option: PasteOption;
|
|
9
|
+
label: LocalizationKey;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function createPasteSpecialDialog(viewOf: () => EditorView | undefined): FormatDialog;
|
|
@@ -2,10 +2,11 @@ import type { EditorView } from 'prosemirror-view';
|
|
|
2
2
|
import { type EditorLocale } from './localization.js';
|
|
3
3
|
export interface PictureDialog {
|
|
4
4
|
element: HTMLElement;
|
|
5
|
-
|
|
5
|
+
/** Opens on the picture at `pos`; `focus: 'crop'` starts in the Crop fields (Picture Format > Crop). */
|
|
6
|
+
open(pos: number, focus?: 'crop'): void;
|
|
6
7
|
close(): void;
|
|
7
8
|
setLocale(locale: EditorLocale): void;
|
|
8
9
|
readonly isOpen: boolean;
|
|
9
10
|
}
|
|
10
|
-
/** Word's Format Picture essentials: alt text
|
|
11
|
+
/** Word's Format Picture essentials: alt text, size (px) with an aspect-ratio lock, and crop. */
|
|
11
12
|
export declare function createPictureDialog(getView: () => EditorView | undefined): PictureDialog;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Plugin } from 'prosemirror-state';
|
|
2
|
+
import type { EditorView } from 'prosemirror-view';
|
|
3
|
+
/** The picture files a drop or paste carries, in order. */
|
|
4
|
+
export declare function pictureFiles(data: DataTransfer | null | undefined): File[];
|
|
5
|
+
/** Whether a drag may carry a picture file; during `dragover` only the item types are readable. */
|
|
6
|
+
export declare function dragHasPicture(data: DataTransfer | null | undefined): boolean;
|
|
7
|
+
export interface PictureDropHost {
|
|
8
|
+
/** The editable body view, or undefined while the document cannot take a picture here. */
|
|
9
|
+
editableView(): EditorView | undefined;
|
|
10
|
+
/** Puts the caret at a viewport point on the pages; false to fall back to the view's own hit. */
|
|
11
|
+
placeCaret?(clientX: number, clientY: number): boolean;
|
|
12
|
+
insert(file: File): Promise<boolean>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Listens on the canvas, which holds both the Draft paper and the Print Layout pages, so a drop
|
|
16
|
+
* anywhere on the page lands at the nearest text position. Runs in the capture phase, ahead of
|
|
17
|
+
* ProseMirror's own drop handling, and stops the event so a host page's drop-to-open does not
|
|
18
|
+
* also open the file.
|
|
19
|
+
*/
|
|
20
|
+
export declare function attachPictureDrop(canvas: HTMLElement, host: PictureDropHost): () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Pastes a copied picture file (an image with no text or HTML alongside it) as a new picture, in
|
|
23
|
+
* the views `accepts` (the body; headers and notes keep the default paste).
|
|
24
|
+
*/
|
|
25
|
+
export declare function pictureClipboardPlugin(accepts: (view: EditorView) => boolean, insert: (file: File) => Promise<boolean>): Plugin;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type EditorState } from 'prosemirror-state';
|
|
2
|
+
import type { Node as ProseMirrorNode } from 'prosemirror-model';
|
|
3
|
+
import type { EditorView } from 'prosemirror-view';
|
|
4
|
+
import { type DrawingWrap, type InlineImage } from 'ooxml-core/docx';
|
|
5
|
+
import type { CropInsets } from 'ooxml-core/geometry';
|
|
6
|
+
/** Whether `node` is a real picture (not a chart, SmartArt, shape, text box or placeholder). */
|
|
7
|
+
export declare function isPictureNode(node: ProseMirrorNode | null | undefined): node is ProseMirrorNode;
|
|
8
|
+
/** The selected picture's position, if the selection is on one. */
|
|
9
|
+
export declare function selectedPicturePos(state: EditorState): number | undefined;
|
|
10
|
+
/** The model fields of a picture node that cropping and wrapping read and write. */
|
|
11
|
+
export declare function pictureOf(node: ProseMirrorNode): InlineImage;
|
|
12
|
+
/** The Wrap Text choice that describes a picture node. */
|
|
13
|
+
export declare function pictureWrapOf(node: ProseMirrorNode): DrawingWrap;
|
|
14
|
+
/** Wrap Text on the picture at `pos` (the selected one by default). */
|
|
15
|
+
export declare function setPictureWrap(view: EditorView, wrap: DrawingWrap, at?: number): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Crops the picture at `pos` to `crop` (fractions of the whole picture). `size`, when given, is
|
|
18
|
+
* the shown size after cropping; otherwise the picture keeps its scale, as Word's Crop fields do.
|
|
19
|
+
*/
|
|
20
|
+
export declare function setPictureCropAt(view: EditorView, pos: number, crop: CropInsets, size?: {
|
|
21
|
+
widthPx: number;
|
|
22
|
+
heightPx: number;
|
|
23
|
+
}): boolean;
|
|
24
|
+
/** Selects the picture a pointer event landed on, as Word does before showing its menu. */
|
|
25
|
+
export declare function selectPictureAt(view: EditorView, target: EventTarget | null): boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EditorState } from 'prosemirror-state';
|
|
2
|
+
export declare function buildPictureFormatPanel(panel: HTMLElement): void;
|
|
3
|
+
/** Shows the tab while a picture is selected (switching to it on entry) and fills its controls. */
|
|
4
|
+
export declare function syncPictureFormat(toolbar: HTMLElement, state: EditorState, editable: boolean): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DocumentModel, type HeaderFooterContent, type ReviewDisplayMode } from 'ooxml-core/docx';
|
|
2
2
|
import { type PageFieldContext, type LayoutPageBox } from 'ooxml-core/docx/layout';
|
|
3
3
|
import type { PictureUrl } from './print-layout.js';
|
|
4
|
+
import { type WatermarkPage } from './print-picture-watermark.js';
|
|
4
5
|
/** Page facts a header or footer field can show. */
|
|
5
6
|
export interface PageFieldValues extends PageFieldContext {
|
|
6
7
|
reviewDisplayMode?: ReviewDisplayMode;
|
|
@@ -10,6 +11,9 @@ export interface PageFieldValues extends PageFieldContext {
|
|
|
10
11
|
export { pageNumbers, headerFooterForPage, fieldDisplayText } from 'ooxml-core/docx/layout';
|
|
11
12
|
/** Renders read-only header/footer content with page fields filled in for one page. */
|
|
12
13
|
export declare function renderHeaderFooter(content: HeaderFooterContent, values: PageFieldValues, kind: 'header' | 'footer'): HTMLElement;
|
|
13
|
-
/**
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The header's watermark as a layer behind the page text, or null: text centred and rotated as
|
|
16
|
+
* Word sets it, or a picture centred on the margins.
|
|
17
|
+
*/
|
|
18
|
+
export declare function watermarkElement(content: HeaderFooterContent, page: WatermarkPage, reviewDisplayMode?: ReviewDisplayMode, pictureUrl?: PictureUrl): HTMLElement | null;
|
|
15
19
|
export declare function decoratePages(model: DocumentModel, pages: LayoutPageBox[], sheets: HTMLElement[], now?: Date, pictureUrl?: PictureUrl, reviewDisplayMode?: ReviewDisplayMode): void;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { EditorView } from 'prosemirror-view';
|
|
2
|
+
/** Selects the inline picture under `target`; false when the press is not on one. */
|
|
3
|
+
export declare function selectInlineObject(view: EditorView, target: EventTarget | null, position: (blockId: string, offset: number) => number | undefined): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PictureWatermarkSpec } from 'ooxml-core/docx';
|
|
2
|
+
import type { LayoutPageBox } from 'ooxml-core/docx/layout';
|
|
3
|
+
/**
|
|
4
|
+
* Washout as a CSS filter: DrawingML's washout (contrast -70%, then brightness +70%) maps every
|
|
5
|
+
* channel x to 0.09x + 0.805, which `contrast(0.053) brightness(1.7)` reproduces.
|
|
6
|
+
*/
|
|
7
|
+
export declare const WASHOUT_FILTER = "contrast(0.053) brightness(1.7)";
|
|
8
|
+
/** The page box a watermark is drawn on; without margins a picture centres on the page. */
|
|
9
|
+
export type WatermarkPage = Pick<LayoutPageBox, 'widthPx' | 'heightPx'> & Partial<Pick<LayoutPageBox, 'marginLeftPx' | 'marginRightPx' | 'marginTopPx' | 'marginBottomPx'>>;
|
|
10
|
+
/** A header's picture watermark, centred on the page's margins behind the text. */
|
|
11
|
+
export declare function pictureWatermarkElement(spec: PictureWatermarkSpec, page: WatermarkPage, url: string | undefined): HTMLElement;
|
|
@@ -207,6 +207,15 @@ export type RibbonAction = {
|
|
|
207
207
|
value: 'richText' | 'text' | 'checkbox' | 'dropDownList' | 'comboBox' | 'date';
|
|
208
208
|
} | {
|
|
209
209
|
type: 'formatPicture';
|
|
210
|
+
}
|
|
211
|
+
/** Picture Format: Wrap Text (a `DrawingWrap`) or Crop (the Format Picture crop fields). */
|
|
212
|
+
| {
|
|
213
|
+
type: 'picture';
|
|
214
|
+
key: 'wrap';
|
|
215
|
+
value: string;
|
|
216
|
+
} | {
|
|
217
|
+
type: 'picture';
|
|
218
|
+
key: 'crop';
|
|
210
219
|
} | {
|
|
211
220
|
type: 'link';
|
|
212
221
|
} | {
|
|
@@ -219,6 +228,11 @@ export type RibbonAction = {
|
|
|
219
228
|
} | {
|
|
220
229
|
type: 'insertNote';
|
|
221
230
|
kind: 'footnote' | 'endnote';
|
|
231
|
+
}
|
|
232
|
+
/** Convert Notes, or Convert to Endnote/Footnote on one note. */
|
|
233
|
+
| {
|
|
234
|
+
type: 'convertNotes';
|
|
235
|
+
selection: import('ooxml-core/docx').NoteSelection;
|
|
222
236
|
} | {
|
|
223
237
|
type: 'toc';
|
|
224
238
|
key: 'insert' | 'update' | 'remove' | 'fields' | 'figures' | 'updateFigures';
|
|
@@ -51,6 +51,7 @@ declare const paths: {
|
|
|
51
51
|
readonly updateTable: 'M20 12a8 8 0 1 1-2.5-5.8 M20 4v5h-5';
|
|
52
52
|
readonly footnote: 'M5 4h9v12H5z M8 8h3 M8 11h3 M4 20h16 M17 6v.01';
|
|
53
53
|
readonly endnote: 'M5 3h9v11H5z M8 7h3 M8 10h3 M4 17h16 M4 21h16';
|
|
54
|
+
readonly convertNotes: 'M4 4h7v9H4z M13 11h7v9h-7z M14 5h4l-2-2 M18 5v4 M10 19H6v-4 M6 19l2 2';
|
|
54
55
|
readonly sectionNext: 'M5 3h9l3 3v8H5z M5 18h14 M5 21h14 M12 9v4 M10 11l2 2 2-2';
|
|
55
56
|
readonly sectionContinuous: 'M5 4h14v6H5z M5 14h14v6H5z M3 12h2 M8 12h2 M14 12h2 M19 12h2';
|
|
56
57
|
readonly sectionEven: 'M6 3h9l3 3v15H6z M9 13a1.5 1.5 0 0 1 3 0c0 1.2-3 2.5-3 3.5h3';
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import type { EditorView } from 'prosemirror-view';
|
|
2
2
|
import { type FindOptions } from 'ooxml-core/docx/ui';
|
|
3
3
|
import { findDocumentMatches } from './search-document.js';
|
|
4
|
+
import { type SearchStoryHost } from './search-story-replace.js';
|
|
5
|
+
export type { SearchStoryHost } from './search-story-replace.js';
|
|
4
6
|
export interface SearchMatch {
|
|
5
7
|
from: number;
|
|
6
8
|
to: number;
|
|
7
9
|
}
|
|
10
|
+
/** The story a match is in: what the Find dialog names beside its count. */
|
|
11
|
+
export interface SearchStoryInfo {
|
|
12
|
+
readonly kind: 'main' | 'footnote' | 'endnote' | 'textBoxes' | 'header' | 'footer';
|
|
13
|
+
/** Headers and footers: `default`, `first` or `even`. */
|
|
14
|
+
readonly slot?: 'default' | 'first' | 'even';
|
|
15
|
+
/** Headers and footers: the zero-based section that owns the part. */
|
|
16
|
+
readonly sectionIndex?: number;
|
|
17
|
+
}
|
|
8
18
|
export interface SearchStatus {
|
|
9
19
|
query: string;
|
|
10
20
|
count: number;
|
|
@@ -12,17 +22,26 @@ export interface SearchStatus {
|
|
|
12
22
|
readOnly: boolean;
|
|
13
23
|
/** The query is a wildcard pattern Word would reject; nothing matches it. */
|
|
14
24
|
invalid: boolean;
|
|
25
|
+
/** The story of the active match, when there is one. */
|
|
26
|
+
story?: SearchStoryInfo;
|
|
15
27
|
}
|
|
16
28
|
/** The Find options of the dialog: Match case, whole words, wildcards and the rest of More >>. */
|
|
17
29
|
export type SearchOptions = FindOptions;
|
|
30
|
+
/**
|
|
31
|
+
* Find and Replace over the body and, given a story host, the other stories in Word's order (see
|
|
32
|
+
* `findStories`): Find Next runs off the end of one story into the next and wraps to the body.
|
|
33
|
+
*/
|
|
18
34
|
export declare class SearchController {
|
|
19
35
|
private readonly getView;
|
|
36
|
+
private readonly stories?;
|
|
20
37
|
private query;
|
|
21
38
|
private options;
|
|
39
|
+
private units;
|
|
22
40
|
private matches;
|
|
23
41
|
private activeIndex;
|
|
24
42
|
private invalid;
|
|
25
|
-
|
|
43
|
+
private placed;
|
|
44
|
+
constructor(getView: () => EditorView | undefined, stories?: SearchStoryHost | undefined);
|
|
26
45
|
get status(): SearchStatus;
|
|
27
46
|
search(query: string, options?: SearchOptions): SearchStatus;
|
|
28
47
|
refresh(): SearchStatus;
|
|
@@ -30,9 +49,12 @@ export declare class SearchController {
|
|
|
30
49
|
findPrevious(): SearchMatch | null;
|
|
31
50
|
replaceOne(replacement: string): boolean;
|
|
32
51
|
replaceAll(replacement: string): number;
|
|
52
|
+
/** The open story's selection, a placed match, or the body caret, as a search-order position. */
|
|
53
|
+
private cursor;
|
|
54
|
+
private currentPlaced;
|
|
33
55
|
private indexAtSelection;
|
|
34
56
|
private select;
|
|
35
|
-
/** Replaces the matches
|
|
57
|
+
/** Replaces the matches, one undoable step per story; the count replaced, 0 if invalid. */
|
|
36
58
|
private replace;
|
|
37
59
|
}
|
|
38
60
|
/** Every match of a query in the document, as ranges (Find without its replacement details). */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SearchStoryInfo } from './search-controller.js';
|
|
2
|
+
import { type EditorLocale } from './localization.js';
|
|
3
|
+
/** Find codes for the Special menu, in Word's order: the English label and the code it inserts. */
|
|
4
|
+
export declare const SPECIAL_CODES: ReadonlyArray<readonly [label: string, code: string]>;
|
|
5
|
+
/** The Find options of More >>, each with its English label. */
|
|
6
|
+
export declare const OPTION_LABELS: readonly [readonly ['wholeWords', 'Find whole words only'], readonly ['wildcards', 'Use wildcards'], readonly ['matchPrefix', 'Match prefix'], readonly ['matchSuffix', 'Match suffix'], readonly ['ignorePunctuation', 'Ignore punctuation characters'], readonly ['ignoreWhitespace', 'Ignore white-space characters']];
|
|
7
|
+
/** Word disables these options while Use wildcards is on. */
|
|
8
|
+
export declare const WILDCARD_DISABLED: Set<string>;
|
|
9
|
+
/** The story a match is in, as Word names it: "Footnotes", "First page header -Section 2-". */
|
|
10
|
+
export declare function storyLabel(locale: EditorLocale, story: SearchStoryInfo | undefined): string;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { EditorView } from 'prosemirror-view';
|
|
2
|
+
import { type SearchStoryHost } from './search-controller.js';
|
|
2
3
|
export interface SearchPanelOptions {
|
|
3
4
|
getView: () => EditorView | undefined;
|
|
5
|
+
/** Headers, footers, notes and text boxes; without it Find searches the body only. */
|
|
6
|
+
stories?: SearchStoryHost;
|
|
4
7
|
onClose?: () => void;
|
|
5
8
|
}
|
|
6
9
|
export interface SearchPanelHandle {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Node as ProseMirrorNode } from 'prosemirror-model';
|
|
2
|
+
import { type Block, type DocumentModel } from 'ooxml-core/docx';
|
|
3
|
+
import { type FindOptions, type FindStory } from 'ooxml-core/docx/ui';
|
|
4
|
+
import { type DocumentMatch } from './search-document.js';
|
|
5
|
+
import type { ReplacementTarget } from './search-document.js';
|
|
6
|
+
/** One searchable unit: a story, or one text box of the Text Boxes story. */
|
|
7
|
+
export interface SearchUnit {
|
|
8
|
+
readonly story: FindStory;
|
|
9
|
+
/** The unit's identity: the story key, or `textBox:<pos>` for a text box. */
|
|
10
|
+
readonly key: string;
|
|
11
|
+
/** Replace All applies one undo step per group (see `findStoryGroup`). */
|
|
12
|
+
readonly group: string;
|
|
13
|
+
readonly doc: ProseMirrorNode;
|
|
14
|
+
/** The text box's position in the body (text boxes only). */
|
|
15
|
+
readonly textBoxPos?: number;
|
|
16
|
+
/** A text box Word wrote in a form this editor can rewrite; other units are always true. */
|
|
17
|
+
readonly replaceable: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface StoryMatch extends DocumentMatch {
|
|
20
|
+
readonly unit: SearchUnit;
|
|
21
|
+
/** The unit's index in search order. */
|
|
22
|
+
readonly order: number;
|
|
23
|
+
}
|
|
24
|
+
/** An open in-place story editor, whose live document stands in for the model's copy. */
|
|
25
|
+
export interface OpenStory {
|
|
26
|
+
readonly key: string;
|
|
27
|
+
readonly doc: ProseMirrorNode;
|
|
28
|
+
}
|
|
29
|
+
/** The body only: Find without a story host (the surface mode's host dialog). */
|
|
30
|
+
export declare function mainUnits(body: ProseMirrorNode): SearchUnit[];
|
|
31
|
+
/** Every unit of the document in Word's order. `open` replaces its story's model copy. */
|
|
32
|
+
export declare function searchUnits(body: ProseMirrorNode, model: DocumentModel, open?: OpenStory): SearchUnit[];
|
|
33
|
+
/** Every match in every unit, in search order. */
|
|
34
|
+
export declare function findUnitMatches(units: readonly SearchUnit[], query: string, options: FindOptions): StoryMatch[];
|
|
35
|
+
/** A header, footer or note's blocks after the replacements (in its editor's positions). */
|
|
36
|
+
export declare function replacedStoryBlocks(unit: SearchUnit, targets: readonly ReplacementTarget[]): Block[];
|
|
37
|
+
/** A text box's lines after the replacements; a paragraph mark in a replacement starts a line. */
|
|
38
|
+
export declare function replacedTextBoxLines(unit: SearchUnit, targets: readonly ReplacementTarget[]): string[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EditorCore } from './editor-core.js';
|
|
2
|
+
import type { SearchStoryHost } from './search-story-replace.js';
|
|
3
|
+
/**
|
|
4
|
+
* The editor's stories for Find. Headers, footers and notes open on the continuous surface (the
|
|
5
|
+
* Draft view), so a match in one switches Print Layout to it, as the Navigation pane's headings do.
|
|
6
|
+
*/
|
|
7
|
+
export declare function editorSearchStories(core: EditorCore): SearchStoryHost;
|
|
8
|
+
/**
|
|
9
|
+
* A story editor Find opened keeps its selection while the focus stays in Find. When the focus
|
|
10
|
+
* leaves Find for anywhere but that editor or the ribbon, the editor closes, as it does when it
|
|
11
|
+
* loses the focus itself.
|
|
12
|
+
*/
|
|
13
|
+
export declare function closeStoryWhenFindBlurs(core: EditorCore, panel: HTMLElement): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { EditorView } from 'prosemirror-view';
|
|
2
|
+
import type { Block, DocumentModel } from 'ooxml-core/docx';
|
|
3
|
+
import { type FindStory } from 'ooxml-core/docx/ui';
|
|
4
|
+
import { type StoryMatch } from './search-stories.js';
|
|
5
|
+
export type HeaderFooterStory = Extract<FindStory, {
|
|
6
|
+
kind: 'header' | 'footer';
|
|
7
|
+
}>;
|
|
8
|
+
/** How Find reaches the stories outside the body; the editor's parts controller provides it. */
|
|
9
|
+
export interface SearchStoryHost {
|
|
10
|
+
model(): DocumentModel;
|
|
11
|
+
/** The open header, footer or note editor, keyed like `findStoryKey`. */
|
|
12
|
+
openStory(): {
|
|
13
|
+
key: string;
|
|
14
|
+
view: EditorView;
|
|
15
|
+
} | undefined;
|
|
16
|
+
/** Shows the story and selects `from`..`to` in its editor when it can open one. */
|
|
17
|
+
showStory(story: FindStory, from: number, to: number): void;
|
|
18
|
+
/** Closes an open story editor; does nothing when none is open. */
|
|
19
|
+
closeStory(): void;
|
|
20
|
+
/** Headers, footers and notes are locked in collaboration and forms protection. */
|
|
21
|
+
canEditStories(): boolean;
|
|
22
|
+
writeHeaderFooter(story: HeaderFooterStory, blocks: Block[]): void;
|
|
23
|
+
writeNotes(kind: 'footnote' | 'endnote', notes: ReadonlyMap<string, Block[]>): void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Applies the replacement to `matches` (in search order) and returns how many were replaced. A
|
|
27
|
+
* story that cannot change (read-only text boxes, locked headers and notes) is skipped. Throws
|
|
28
|
+
* `FindPatternError` before changing anything when the replacement is invalid.
|
|
29
|
+
*/
|
|
30
|
+
export declare function applyReplacements(view: EditorView, host: SearchStoryHost | undefined, matches: readonly StoryMatch[], options: {
|
|
31
|
+
readonly replacement: string;
|
|
32
|
+
readonly wildcards: boolean;
|
|
33
|
+
}): number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type EditorState } from 'prosemirror-state';
|
|
2
2
|
import type { EditorView } from 'prosemirror-view';
|
|
3
|
-
import { type PicturePlacement, type ShapeSpec } from 'ooxml-core/docx';
|
|
3
|
+
import { type DrawingWrap, type PicturePlacement, type ShapeSpec } from 'ooxml-core/docx';
|
|
4
4
|
export interface SelectedShape {
|
|
5
5
|
pos: number;
|
|
6
6
|
spec: ShapeSpec;
|
|
@@ -19,7 +19,7 @@ export declare function setShapeOutline(view: EditorView, value: string): boolea
|
|
|
19
19
|
export declare function setShapeWeight(view: EditorView, points: number): boolean;
|
|
20
20
|
export declare function setShapeText(view: EditorView, lines: string[]): boolean;
|
|
21
21
|
export declare function setShapeSize(view: EditorView, widthPx?: number, heightPx?: number): boolean;
|
|
22
|
-
export type ShapeWrap =
|
|
22
|
+
export type ShapeWrap = DrawingWrap;
|
|
23
23
|
/** Wrap Text: the wrapping of the shape, or In Line with Text. */
|
|
24
24
|
export declare function setShapeWrap(view: EditorView, wrap: ShapeWrap): boolean;
|
|
25
25
|
/** The Wrap Text choice that describes the selected shape. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { EditorState } from 'prosemirror-state';
|
|
2
|
+
export declare const WRAPS: Array<[string, string]>;
|
|
2
3
|
export declare function buildShapeFormatPanel(panel: HTMLElement): void;
|
|
3
4
|
/** Shows the tab while a shape is selected (switching to it on entry) and fills its controls. */
|
|
4
5
|
export declare function syncShapeFormat(toolbar: HTMLElement, state: EditorState, editable: boolean): void;
|