ooxml-ui 1.40.0 → 1.41.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 +1 -1
- package/custom-elements.json +480 -0
- package/dist/base.d.ts +0 -1
- package/dist/building-block-styles.d.ts +0 -1
- package/dist/chart/data-sheet-keys.d.ts +0 -1
- package/dist/chart/data-sheet.d.ts +1 -2
- package/dist/chart/format-pane-advanced-space.d.ts +0 -1
- package/dist/chart/format-pane-analysis.d.ts +0 -1
- package/dist/chart/format-pane-fields.d.ts +0 -1
- package/dist/chart/format-pane-fill-line.d.ts +0 -1
- package/dist/chart/format-pane-intent.d.ts +0 -1
- package/dist/chart/format-pane-locales/de.d.ts +0 -1
- package/dist/chart/format-pane-locales/en.d.ts +0 -1
- package/dist/chart/format-pane-text.d.ts +0 -1
- package/dist/chart/format-pane-translate.d.ts +0 -1
- package/dist/chrome/account.d.ts +1 -2
- package/dist/chrome/print-preview.d.ts +1 -2
- package/dist/chrome/ruler.d.ts +1 -2
- package/dist/chrome/status-bar.d.ts +1 -2
- package/dist/chrome/tab-drag.d.ts +0 -1
- package/dist/chrome/task-pane.d.ts +1 -2
- package/dist/chunk-4RFFOPBU.js +90 -0
- package/dist/{chunk-BOTLS2PR.js → chunk-4ZSZPUE5.js} +20 -0
- package/dist/{chunk-XL77FR4B.js → chunk-6EOS74O4.js} +6 -0
- package/dist/{chunk-GZNBWWJ5.js → chunk-6FFZFH73.js} +43 -27
- package/dist/{chunk-FYBLAPAJ.js → chunk-7L4NP4HN.js} +149 -76
- package/dist/{chunk-QLHCGV4C.js → chunk-FE5KE5TR.js} +1 -1
- package/dist/{chunk-C4KI635Q.js → chunk-II43ALTT.js} +1 -1
- package/dist/{chunk-6VF4FEMY.js → chunk-LBIABP4I.js} +1 -1
- package/dist/{chunk-T5ARELU2.js → chunk-N6AKS4ED.js} +1 -1
- package/dist/{chunk-YZH2QS7J.js → chunk-Q6WZEGAM.js} +1 -1
- package/dist/{chunk-IZ7XMMMJ.js → chunk-TTT5IQBU.js} +10 -5
- package/dist/{chunk-QAX4FAB7.js → chunk-Y6KY34VD.js} +1632 -202
- package/dist/comments/mentions.d.ts +0 -1
- package/dist/comments/types.d.ts +0 -1
- package/dist/controls.d.ts +16 -3
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +4 -4
- package/dist/dialog/chart-picker.d.ts +1 -2
- package/dist/dialog/dialog-footer.d.ts +1 -2
- package/dist/dialog/dialog-session.d.ts +0 -1
- package/dist/dialog/dialog.d.ts +1 -2
- package/dist/dialog/focus.d.ts +0 -1
- package/dist/dialog/message-dialog.d.ts +84 -0
- package/dist/dialog/message-dialog.d.ts.map +1 -0
- package/dist/dialog/message-dialogs.d.ts +38 -0
- package/dist/dialog/message-dialogs.d.ts.map +1 -0
- package/dist/dialog/options-categories.d.ts +0 -1
- package/dist/dialog/options-controls.d.ts +0 -1
- package/dist/dialog/progress-dialog.d.ts +1 -2
- package/dist/dialog/share-controller.d.ts +38 -0
- package/dist/dialog/share-dialog-locales.d.ts +47 -0
- package/dist/dialog/share-dialog-locales.d.ts.map +1 -0
- package/dist/dialog/share-dialog.d.ts +121 -0
- package/dist/dialog/share-dialog.d.ts.map +1 -0
- package/dist/docx/backstage-account.d.ts +3 -0
- package/dist/docx/backstage-open.d.ts +4 -0
- package/dist/docx/backstage-pages.d.ts +8 -1
- package/dist/docx/backstage.d.ts +1 -1
- package/dist/docx/cloud-labels.d.ts +4 -0
- package/dist/docx/editor-chrome.d.ts +16 -1
- package/dist/docx/editor-core.d.ts +13 -1
- package/dist/docx/element-api.d.ts +17 -1
- package/dist/docx/file-commands.d.ts +2 -2
- package/dist/docx/locales/en-app.d.ts +36 -0
- package/dist/docx/locales/en.d.ts +36 -0
- package/dist/docx/localization-strings.d.ts +36 -0
- package/dist/docx.js +402 -54
- package/dist/files/cloud-files-labels.d.ts +44 -0
- package/dist/files/cloud-files-labels.d.ts.map +1 -0
- package/dist/files/cloud-files-view.d.ts +42 -0
- package/dist/files/cloud-files-view.d.ts.map +1 -0
- package/dist/files/cloud-files.d.ts +130 -0
- package/dist/files/cloud-files.d.ts.map +1 -0
- package/dist/files/connected-services-labels.d.ts +6 -0
- package/dist/files/connected-services.d.ts +70 -0
- package/dist/files/connected-services.d.ts.map +1 -0
- package/dist/files/open-places.d.ts +58 -0
- package/dist/files/open-places.d.ts.map +1 -0
- package/dist/fonts/availability.d.ts +0 -1
- package/dist/fonts/catalog.d.ts +0 -1
- package/dist/fonts/custom-fonts.d.ts +0 -1
- package/dist/form/checkbox.d.ts +1 -2
- package/dist/form/color-custom.d.ts +1 -2
- package/dist/form/color-grid.d.ts +1 -2
- package/dist/form/color-input/live-color-leaves.d.ts +0 -1
- package/dist/form/radio.d.ts +1 -2
- package/dist/form/search-field.d.ts +1 -2
- package/dist/form/symbol-picker.d.ts +1 -2
- package/dist/form/zoom-slider.d.ts +1 -2
- package/dist/image-native-size.d.ts +0 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -10
- package/dist/menu/command-search.d.ts +1 -2
- package/dist/menu/context-menu.d.ts +1 -2
- package/dist/menu/menu-item.d.ts +1 -2
- package/dist/notices/paste-options.d.ts +1 -2
- package/dist/notices/read-only-banner.d.ts.map +1 -1
- package/dist/notices/toasts.d.ts +1 -2
- package/dist/picture-effects.d.ts +0 -1
- package/dist/picture-pixels.d.ts.map +1 -1
- package/dist/picture-standard-filter.d.ts +0 -1
- package/dist/picture-view.d.ts +0 -1
- package/dist/pptx/{chart-3d-view-scene-V55XPBBF.cjs → chart-3d-view-scene-C7QUQTXD.cjs} +37 -37
- package/dist/pptx/{chart-3d-view-scene-BKNMGRGO.mjs → chart-3d-view-scene-CGLU6ISD.mjs} +2 -2
- package/dist/pptx/{chunk-ZLK243QC.cjs → chunk-4SZSTDER.cjs} +49 -49
- package/dist/pptx/{chunk-S5VKG3XJ.cjs → chunk-7XXOLM7H.cjs} +1 -1
- package/dist/pptx/{chunk-WZHYA2B3.mjs → chunk-DH6EKOVI.mjs} +1 -1
- package/dist/pptx/{chunk-MK2ASJSY.mjs → chunk-G4VNRJUX.mjs} +6 -0
- package/dist/pptx/{chunk-BLONL4S7.mjs → chunk-IN46QNJE.mjs} +1 -1
- package/dist/pptx/{chunk-NUB6VP7R.mjs → chunk-J6PRXB72.mjs} +6986 -2851
- package/dist/pptx/{chunk-HIRBPTML.cjs → chunk-JP26TA3Q.cjs} +12 -12
- package/dist/pptx/{chunk-XTC6MQYM.mjs → chunk-JU3ZV73R.mjs} +3 -3
- package/dist/pptx/{chunk-XWAX3PZO.cjs → chunk-RN3JVXVN.cjs} +7198 -3021
- package/dist/pptx/{chunk-WQI3NLMY.mjs → chunk-SF3MYUTD.mjs} +41 -0
- package/dist/pptx/{chunk-QK6LJT3K.mjs → chunk-TW5UQCZS.mjs} +7 -17
- package/dist/pptx/{chunk-CRV7G4GC.cjs → chunk-WNDGU3GQ.cjs} +41 -0
- package/dist/pptx/{chunk-3ESFHUZI.cjs → chunk-XZSGVMRN.cjs} +6 -0
- package/dist/pptx/{chunk-KJICUZXM.cjs → chunk-YZWKNFPU.cjs} +6 -16
- package/dist/pptx/dom/elements/shape-filter-defs.d.ts.map +1 -1
- package/dist/pptx/dom/elements/text-shape.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +434 -428
- package/dist/pptx/dom/index.mjs +17 -11
- package/dist/pptx/dom/slide-stage.d.ts.map +1 -1
- package/dist/pptx/dom/types.d.ts +8 -1
- package/dist/pptx/dom/types.d.ts.map +1 -1
- package/dist/pptx/export/html2canvas-clone.cjs +6 -6
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/export/presentation-save.d.ts +15 -0
- package/dist/pptx/export/presentation-save.d.ts.map +1 -1
- package/dist/pptx/i18n/index.cjs +6 -6
- package/dist/pptx/i18n/index.mjs +1 -1
- package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
- package/dist/pptx/index.cjs +3541 -3373
- package/dist/pptx/index.mjs +6 -6
- package/dist/pptx/render/abutting-edge-bleed-style.d.ts +24 -0
- package/dist/pptx/render/abutting-edge-bleed-style.d.ts.map +1 -0
- package/dist/pptx/render/abutting-edge-bleed.d.ts +56 -0
- package/dist/pptx/render/abutting-edge-bleed.d.ts.map +1 -0
- package/dist/pptx/render/chart-combo-stock.cjs +3 -3
- package/dist/pptx/render/chart-combo-stock.mjs +1 -1
- package/dist/pptx/render/chart-overlays.cjs +7 -7
- package/dist/pptx/render/chart-overlays.mjs +1 -1
- package/dist/pptx/render/chart-surface-treemap.cjs +4 -4
- package/dist/pptx/render/chart-surface-treemap.mjs +1 -1
- package/dist/pptx/render/chart-view-model.cjs +44 -44
- package/dist/pptx/render/chart-view-model.mjs +1 -1
- package/dist/pptx/render/chart-waterfall-map.cjs +6 -6
- package/dist/pptx/render/chart-waterfall-map.mjs +1 -1
- package/dist/pptx/render/cloud-open.d.ts +56 -0
- package/dist/pptx/render/cloud-open.d.ts.map +1 -0
- package/dist/pptx/render/connector-style.d.ts +2 -2
- package/dist/pptx/render/connector-style.d.ts.map +1 -1
- package/dist/pptx/render/element-style-transform.d.ts +11 -3
- package/dist/pptx/render/element-style-transform.d.ts.map +1 -1
- package/dist/pptx/render/fill-style.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +11 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/inline-list-presentation.d.ts.map +1 -1
- package/dist/pptx/render/morph-animation.d.ts +23 -11
- package/dist/pptx/render/morph-animation.d.ts.map +1 -1
- package/dist/pptx/render/morph-body-carry.d.ts +8 -0
- package/dist/pptx/render/morph-body-carry.d.ts.map +1 -0
- package/dist/pptx/render/morph-carry.d.ts +60 -0
- package/dist/pptx/render/morph-carry.d.ts.map +1 -0
- package/dist/pptx/render/morph-easing.d.ts +37 -0
- package/dist/pptx/render/morph-easing.d.ts.map +1 -0
- package/dist/pptx/render/morph-effect-carry.d.ts +75 -0
- package/dist/pptx/render/morph-effect-carry.d.ts.map +1 -0
- package/dist/pptx/render/morph-effect-glow.d.ts +42 -0
- package/dist/pptx/render/morph-effect-glow.d.ts.map +1 -0
- package/dist/pptx/render/morph-effect-parse.d.ts +10 -0
- package/dist/pptx/render/morph-effect-parse.d.ts.map +1 -0
- package/dist/pptx/render/morph-effect-shadow.d.ts +71 -0
- package/dist/pptx/render/morph-effect-shadow.d.ts.map +1 -0
- package/dist/pptx/render/morph-flatten.d.ts +2 -2
- package/dist/pptx/render/morph-flip-turn.d.ts +55 -0
- package/dist/pptx/render/morph-flip-turn.d.ts.map +1 -0
- package/dist/pptx/render/morph-geometry-key.d.ts +30 -0
- package/dist/pptx/render/morph-geometry-key.d.ts.map +1 -0
- package/dist/pptx/render/morph-image-crop.d.ts.map +1 -1
- package/dist/pptx/render/morph-matching.d.ts.map +1 -1
- package/dist/pptx/render/morph-outline-blend.d.ts +7 -0
- package/dist/pptx/render/morph-outline-blend.d.ts.map +1 -0
- package/dist/pptx/render/morph-overlay-order.d.ts +1 -1
- package/dist/pptx/render/morph-overlay-stack.d.ts +85 -0
- package/dist/pptx/render/morph-overlay-stack.d.ts.map +1 -0
- package/dist/pptx/render/morph-plan.d.ts +73 -1
- package/dist/pptx/render/morph-plan.d.ts.map +1 -1
- package/dist/pptx/render/morph-predicates.d.ts.map +1 -1
- package/dist/pptx/render/morph-shape-carry-path.d.ts +40 -0
- package/dist/pptx/render/morph-shape-carry-path.d.ts.map +1 -0
- package/dist/pptx/render/morph-shape-carry.d.ts +73 -0
- package/dist/pptx/render/morph-shape-carry.d.ts.map +1 -0
- package/dist/pptx/render/morph-text-bands.d.ts +44 -0
- package/dist/pptx/render/morph-text-bands.d.ts.map +1 -0
- package/dist/pptx/render/morph-text-baseline.d.ts +47 -0
- package/dist/pptx/render/morph-text-baseline.d.ts.map +1 -0
- package/dist/pptx/render/morph-text-blend.d.ts +71 -0
- package/dist/pptx/render/morph-text-blend.d.ts.map +1 -0
- package/dist/pptx/render/morph-text-body-copies.d.ts +51 -0
- package/dist/pptx/render/morph-text-body-copies.d.ts.map +1 -0
- package/dist/pptx/render/morph-text-body.d.ts +31 -0
- package/dist/pptx/render/morph-text-body.d.ts.map +1 -0
- package/dist/pptx/render/morph-text-flip.d.ts +49 -0
- package/dist/pptx/render/morph-text-flip.d.ts.map +1 -0
- package/dist/pptx/render/morph-text-frame-read.d.ts +97 -0
- package/dist/pptx/render/morph-text-frame-read.d.ts.map +1 -0
- package/dist/pptx/render/morph-text-frame.d.ts +66 -0
- package/dist/pptx/render/morph-text-frame.d.ts.map +1 -0
- package/dist/pptx/render/morph-text-ink.d.ts +43 -0
- package/dist/pptx/render/morph-text-ink.d.ts.map +1 -0
- package/dist/pptx/render/morph-text-lines.d.ts +73 -0
- package/dist/pptx/render/morph-text-lines.d.ts.map +1 -0
- package/dist/pptx/render/morph-text-piece-plan.d.ts +37 -0
- package/dist/pptx/render/morph-text-piece-plan.d.ts.map +1 -0
- package/dist/pptx/render/morph-text-pieces.d.ts +87 -0
- package/dist/pptx/render/morph-text-pieces.d.ts.map +1 -0
- package/dist/pptx/render/morph-text-slot.d.ts +19 -4
- package/dist/pptx/render/morph-text-slot.d.ts.map +1 -1
- package/dist/pptx/render/morph-text-spans.d.ts +27 -0
- package/dist/pptx/render/morph-text-spans.d.ts.map +1 -0
- package/dist/pptx/render/morph-text-transform.d.ts +108 -0
- package/dist/pptx/render/morph-text-transform.d.ts.map +1 -0
- package/dist/pptx/render/morph-types.d.ts +79 -38
- package/dist/pptx/render/morph-types.d.ts.map +1 -1
- package/dist/pptx/render/paragraph-baseline.d.ts +87 -0
- package/dist/pptx/render/paragraph-baseline.d.ts.map +1 -0
- package/dist/pptx/render/paragraph-spacing.d.ts +29 -66
- package/dist/pptx/render/paragraph-spacing.d.ts.map +1 -1
- package/dist/pptx/render/paragraph-types.d.ts +7 -0
- package/dist/pptx/render/paragraph-types.d.ts.map +1 -1
- package/dist/pptx/render/presentation-action.d.ts +3 -2
- package/dist/pptx/render/presentation-action.d.ts.map +1 -1
- package/dist/pptx/render/read-only-badge.d.ts +23 -0
- package/dist/pptx/render/read-only-badge.d.ts.map +1 -0
- package/dist/pptx/render/share-session.d.ts +4 -7
- package/dist/pptx/render/share-session.d.ts.map +1 -1
- package/dist/pptx/render/stroke-clip-edge.d.ts +6 -1
- package/dist/pptx/render/stroke-clip-edge.d.ts.map +1 -1
- package/dist/pptx/render/stroke-compound-strands.d.ts +30 -0
- package/dist/pptx/render/stroke-compound-strands.d.ts.map +1 -0
- package/dist/pptx/render/stroke-outline.d.ts.map +1 -1
- package/dist/pptx/render/table-cell-paragraphs.d.ts.map +1 -1
- package/dist/pptx/render/text-block-style.d.ts.map +1 -1
- package/dist/pptx/render/text-flip-compensation.d.ts +51 -0
- package/dist/pptx/render/text-flip-compensation.d.ts.map +1 -0
- package/dist/pptx/render/text-paragraphs.d.ts.map +1 -1
- package/dist/pptx/render/transition-template-elements.d.ts +33 -0
- package/dist/pptx/render/transition-template-elements.d.ts.map +1 -0
- package/dist/pptx/render/viewer-api-guard.d.ts +36 -0
- package/dist/pptx/render/viewer-api-guard.d.ts.map +1 -0
- package/dist/pptx/render/viewer-dialogs.d.ts +31 -0
- package/dist/pptx/render/viewer-dialogs.d.ts.map +1 -0
- package/dist/pptx/render/viewer-hyperlinks.d.ts +2 -1
- package/dist/pptx/render/viewer-hyperlinks.d.ts.map +1 -1
- package/dist/pptx/render/viewer-props-manifest.d.ts.map +1 -1
- package/dist/pptx/{smartart-insert-preview-BP4WAD5U.mjs → smartart-insert-preview-GA6ELFRB.mjs} +7 -7
- package/dist/pptx/{smartart-insert-preview-USGRDZHJ.cjs → smartart-insert-preview-PQTEVG7C.cjs} +8 -8
- package/dist/pptx/theme/index.cjs +18 -18
- package/dist/pptx/theme/index.mjs +1 -1
- package/dist/pptx/web-components/index.d.ts.map +1 -1
- package/dist/pptx/web-components/office-aliases.d.ts +4 -0
- 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/presence.js +3 -3
- package/dist/{presentation-preview-ZVJNGOJO.js → presentation-preview-KGBTDTNM.js} +1 -1
- package/dist/render-cache.d.ts +0 -1
- package/dist/ribbon/auto-collapse.d.ts +0 -1
- package/dist/ribbon/button.d.ts +1 -2
- package/dist/ribbon/gallery-styles.d.ts +0 -1
- package/dist/ribbon/keytip-run.d.ts +0 -1
- package/dist/ribbon/overflow.d.ts +0 -1
- package/dist/ribbon/ribbon-section.d.ts +1 -2
- package/dist/ribbon/ribbon-stack.d.ts +1 -2
- package/dist/ribbon/safe-svg.d.ts +0 -1
- package/dist/ribbon/scroll-more.d.ts +0 -1
- package/dist/smartart/smartart-picker.d.ts +1 -2
- package/dist/smartart/smartart-text-pane-tools.d.ts +0 -1
- package/dist/smartart.js +3 -3
- package/dist/suite/document-store.d.ts +10 -0
- package/dist/suite.js +45 -6
- package/dist/teams/app/content-preview.d.ts +1 -1
- package/dist/teams/app/dialogs.d.ts +18 -0
- package/dist/teams/app/teams-app.d.ts +8 -0
- package/dist/teams/i18n/locales/de.d.ts +4 -0
- package/dist/teams/i18n/locales/en/shell.d.ts +4 -0
- package/dist/teams/i18n/locales/en.d.ts +4 -0
- package/dist/teams/i18n/locales/es.d.ts +4 -0
- package/dist/teams/i18n/locales/fr.d.ts +4 -0
- package/dist/teams/i18n/locales/zh-CN.d.ts +4 -0
- package/dist/teams.js +7 -7
- package/dist/theme-bridge.d.ts +0 -1
- package/dist/theme.js +2 -2
- package/dist/tokens.d.ts +5 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/visio/binding.d.ts +3 -0
- package/dist/visio/controller.d.ts +2 -0
- package/dist/visio/locales/cloud-files.d.ts +4 -0
- package/dist/visio/viewer-backstage.d.ts +5 -1
- package/dist/visio/viewer-cloud-places.d.ts +16 -0
- package/dist/visio/viewer-connected-services.d.ts +13 -0
- package/dist/visio/viewer-element.d.ts +16 -1
- package/dist/visio/viewer-share-ui.d.ts +27 -0
- package/dist/visio/viewer-share.d.ts +7 -2
- package/dist/visio.js +476 -69
- package/dist/xlsx/backstage/cloud-labels.d.ts +4 -0
- package/dist/xlsx/backstage/index.d.ts +1 -1
- package/dist/xlsx/backstage/pages-account.d.ts +2 -0
- package/dist/xlsx/backstage/pages-file.d.ts +0 -1
- package/dist/xlsx/backstage/pages-open.d.ts +2 -0
- package/dist/xlsx/backstage/pages-share.d.ts +5 -6
- package/dist/xlsx/backstage/parts.d.ts +5 -0
- package/dist/xlsx/component.d.ts +8 -0
- package/dist/xlsx/editor-core.d.ts +10 -1
- package/dist/xlsx/editor-files.d.ts +14 -1
- package/dist/xlsx/editor-shell.d.ts +3 -0
- package/dist/xlsx/element-api.d.ts +14 -5
- package/dist/xlsx.js +247 -89
- package/package.json +3 -3
- package/dist/chunk-7RRN2GPO.js +0 -19
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The element transforms that carry a text mapping (`morph-text-frame`): the
|
|
3
|
+
* frames a matched pair's two halves start and end on so their glyphs stay
|
|
4
|
+
* laid over each other.
|
|
5
|
+
*
|
|
6
|
+
* Every transform is `translate(dx, dy) rotate(r) scale(sx, sy)`, followed by
|
|
7
|
+
* the element's own flips and, for a TURNING pair, `translate(-tail)`, about
|
|
8
|
+
* the element's own centre: the keyframe layout every morph journey shares.
|
|
9
|
+
*
|
|
10
|
+
* A pair standing at one rotation keeps the translation-only frames it always
|
|
11
|
+
* had. A pair whose rotation CHANGES turns about a pivot instead. Measured on
|
|
12
|
+
* PowerPoint 16 (`CreateVideo`, 60 fps, 720p), a 32 pt line in a box turning
|
|
13
|
+
* 0 -> 40 degrees while its box widens 262 -> 520 pt and moves: the text is
|
|
14
|
+
* never stretched with its box (its ink stays 324 px long on every frame),
|
|
15
|
+
* and the point that travels in a STRAIGHT line is the middle of the text
|
|
16
|
+
* (53% along its ink; within 0.9 px of the line at every frame, at the
|
|
17
|
+
* rotation's own progress), not the box's centre, which would have swung the
|
|
18
|
+
* line's start 25 px off that path. The two faces of a restyle turn the same
|
|
19
|
+
* way, one glyph-aligned copy whose faces dissolve.
|
|
20
|
+
*
|
|
21
|
+
* The CSS function list interpolates each function on its own, so a pivot
|
|
22
|
+
* that travels straight while the box turns about it is
|
|
23
|
+
* `translate(A(t) - centre) rotate(r(t)) scale(s(t)) translate(-pivot)`:
|
|
24
|
+
* the trailing translation lays the pivot on the element's centre, which the
|
|
25
|
+
* leading one then carries along the straight path. Both halves share the
|
|
26
|
+
* path, the angle and (up to the mapping's own ratio) the scale, so they stay
|
|
27
|
+
* glyph over glyph on every frame.
|
|
28
|
+
*
|
|
29
|
+
* @module render/morph-text-transform
|
|
30
|
+
*/
|
|
31
|
+
import type { PptxElement } from 'ooxml-core/pptx';
|
|
32
|
+
/** A slide point, in px. */
|
|
33
|
+
export interface MorphPoint {
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* How the outgoing half's text maps onto the incoming half's: a point at
|
|
39
|
+
* `from + v` (slide px) corresponds to `to + scale * v`.
|
|
40
|
+
*/
|
|
41
|
+
export interface MorphTextAlignment {
|
|
42
|
+
from: MorphPoint;
|
|
43
|
+
to: MorphPoint;
|
|
44
|
+
scaleX: number;
|
|
45
|
+
scaleY: number;
|
|
46
|
+
/**
|
|
47
|
+
* The rotation (degrees) BOTH halves stand at, when it is not zero. The
|
|
48
|
+
* anchors and scales are then in the boxes' own, unrotated coordinates, and
|
|
49
|
+
* `centres` holds the two boxes' centres the rotation turns them about.
|
|
50
|
+
*/
|
|
51
|
+
rotation?: number;
|
|
52
|
+
centres?: {
|
|
53
|
+
from: MorphPoint;
|
|
54
|
+
to: MorphPoint;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Set when the halves stand at DIFFERENT rotations: each half's rotation
|
|
58
|
+
* and the pivot (in its own unrotated slide frame) the text turns about.
|
|
59
|
+
* `centres` is then always set. `pivots.to` is the image of `pivots.from`
|
|
60
|
+
* under the mapping.
|
|
61
|
+
*/
|
|
62
|
+
turn?: {
|
|
63
|
+
from: number;
|
|
64
|
+
to: number;
|
|
65
|
+
pivots: {
|
|
66
|
+
from: MorphPoint;
|
|
67
|
+
to: MorphPoint;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* A `translate(dx, dy) scale(sx, sy)` about the element's own centre, then
|
|
73
|
+
* (for a turning pair) `translate(-tail)`: `tail` is the pivot's offset from
|
|
74
|
+
* the element's centre in its unrotated, unflipped-as-painted frame.
|
|
75
|
+
*/
|
|
76
|
+
export interface MorphTextTransform {
|
|
77
|
+
dx: number;
|
|
78
|
+
dy: number;
|
|
79
|
+
sx: number;
|
|
80
|
+
sy: number;
|
|
81
|
+
tail?: MorphPoint;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The incoming half's STARTING transform: it is painted at its own geometry and
|
|
85
|
+
* has to begin with its text laid over the outgoing text.
|
|
86
|
+
*/
|
|
87
|
+
export declare function morphTextIncomingStart(alignment: MorphTextAlignment, to: PptxElement): MorphTextTransform;
|
|
88
|
+
/**
|
|
89
|
+
* The ghost's ENDING transform: it is painted at the outgoing geometry and has
|
|
90
|
+
* to end with its text laid over the incoming text.
|
|
91
|
+
*/
|
|
92
|
+
export declare function morphTextGhostEnd(alignment: MorphTextAlignment, from: PptxElement): MorphTextTransform;
|
|
93
|
+
/**
|
|
94
|
+
* The incoming half's ENDING transform: its own geometry. Only a turning
|
|
95
|
+
* pair's differs from no transform at all, since its frames carry a pivot.
|
|
96
|
+
*/
|
|
97
|
+
export declare function morphTextIncomingEnd(alignment: MorphTextAlignment, to: PptxElement): MorphTextTransform;
|
|
98
|
+
/** The ghost's STARTING transform: its own geometry (see {@link morphTextIncomingEnd}). */
|
|
99
|
+
export declare function morphTextGhostStart(alignment: MorphTextAlignment, from: PptxElement): MorphTextTransform;
|
|
100
|
+
/**
|
|
101
|
+
* The `translate(-tail)` that closes a turning frame's function list, after
|
|
102
|
+
* the element's flips (so the tail is negated along a flipped axis), or `''`.
|
|
103
|
+
* A vertically flipped element paints its text turned half way round (see
|
|
104
|
+
* `morph-text-flip`), so its tail, measured on that turned text, is negated
|
|
105
|
+
* once more.
|
|
106
|
+
*/
|
|
107
|
+
export declare function morphTextTail(transform: MorphTextTransform, element: Pick<PptxElement, 'flipHorizontal' | 'flipVertical'>): string;
|
|
108
|
+
//# sourceMappingURL=morph-text-transform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"morph-text-transform.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-text-transform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,4BAA4B;AAC5B,MAAM,WAAW,UAAU;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACV;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,UAAU,CAAC;IACjB,EAAE,EAAE,UAAU,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,UAAU,CAAC;QAAC,EAAE,EAAE,UAAU,CAAA;KAAE,CAAC;IAC/C;;;;;OAKG;IACH,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE;YAAE,IAAI,EAAE,UAAU,CAAC;YAAC,EAAE,EAAE,UAAU,CAAA;SAAE,CAAA;KAAE,CAAC;CAClF;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,UAAU,CAAC;CAClB;AA+DD;;;GAGG;AACH,wBAAgB,sBAAsB,CACrC,SAAS,EAAE,kBAAkB,EAC7B,EAAE,EAAE,WAAW,GACb,kBAAkB,CAuBpB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAChC,SAAS,EAAE,kBAAkB,EAC7B,IAAI,EAAE,WAAW,GACf,kBAAkB,CA2BpB;AAID;;;GAGG;AACH,wBAAgB,oBAAoB,CACnC,SAAS,EAAE,kBAAkB,EAC7B,EAAE,EAAE,WAAW,GACb,kBAAkB,CAapB;AAED,2FAA2F;AAC3F,wBAAgB,mBAAmB,CAClC,SAAS,EAAE,kBAAkB,EAC7B,IAAI,EAAE,WAAW,GACf,kBAAkB,CAapB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC5B,SAAS,EAAE,kBAAkB,EAC7B,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,gBAAgB,GAAG,cAAc,CAAC,GAC3D,MAAM,CASR"}
|
|
@@ -37,11 +37,16 @@ export interface MorphAnimationStyle {
|
|
|
37
37
|
* (`a:srcRect`) is painted by transforming the img within its frame, so
|
|
38
38
|
* morphing a crop change has to animate that node and not the frame - the
|
|
39
39
|
* frame is usually exactly the same size on both slides (issue #148).
|
|
40
|
+
* `outline` is the `<path>` of the outline overlay every binding stamps
|
|
41
|
+
* `data-pptx-outline` on, which a resizing shape re-paths per frame (see
|
|
42
|
+
* `morph-shape-carry`). `custom` is the paths of the custom-geometry
|
|
43
|
+
* `<svg data-pptx-custom-geometry>` a binding paints a freeform with (in
|
|
44
|
+
* path units), which a reshaping freeform re-paths per frame too.
|
|
40
45
|
*/
|
|
41
46
|
target?: MorphAnimationTarget;
|
|
42
47
|
}
|
|
43
48
|
/** @see MorphAnimationStyle.target */
|
|
44
|
-
export type MorphAnimationTarget = 'element' | 'image';
|
|
49
|
+
export type MorphAnimationTarget = 'element' | 'image' | 'outline' | 'custom';
|
|
45
50
|
/** Morph granularity mode matching PowerPoint's morph effect options. */
|
|
46
51
|
export type MorphMode = 'object' | 'word' | 'character';
|
|
47
52
|
/** A single token (word or character) with its computed position for text morphing. */
|
|
@@ -74,56 +79,92 @@ export interface SvgPathCommand {
|
|
|
74
79
|
}
|
|
75
80
|
/**
|
|
76
81
|
* Control points of PowerPoint's morph easing curve, `[x1, y1, x2, y2]`.
|
|
77
|
-
* Anything that samples the curve itself (the stepped crop track
|
|
78
|
-
* so the CSS string
|
|
82
|
+
* Anything that samples the curve itself (the stepped crop track, the dissolve
|
|
83
|
+
* windows below) reads these, so the CSS string and the sampled keyframes
|
|
84
|
+
* cannot drift apart.
|
|
85
|
+
*
|
|
86
|
+
* Measured on PowerPoint 16 for issue #141. Synthetic 960x540pt decks were
|
|
87
|
+
* built through COM (solid rectangles on white, Morph by object) and exported
|
|
88
|
+
* with `CreateVideo` at 60fps, at morph durations of 1s and 2s. On the one
|
|
89
|
+
* matched pair deck, a rectangle travelling 840pt, another travelling 80pt, a
|
|
90
|
+
* 40x40 box growing to 300x140, a 300x20 bar turning 0 to 90 degrees, a fill
|
|
91
|
+
* turning blue to yellow and a fill going 0% to 80% transparent ALL follow the
|
|
92
|
+
* same normalised progress curve, which does not depend on distance or
|
|
93
|
+
* duration. It reads 0.022 at 5% of the duration, 0.075 at 10%, 0.236 at 20%,
|
|
94
|
+
* 0.419 at 30%, 0.588 at 40%, 0.726 at 50%, 0.832 at 60%, 0.911 at 70%, 0.960
|
|
95
|
+
* at 80% and 0.988 at 90%. This curve tracks the geometry of both durations to
|
|
96
|
+
* an RMS of 0.0015 (max 0.004) and the colour and transparency to an RMS of
|
|
97
|
+
* 0.003 (max 0.008). The `cubic-bezier(0.4, 0, 0.2, 1)` used before was up to
|
|
98
|
+
* 0.10 behind at the start and 0.05 ahead in the middle.
|
|
79
99
|
*/
|
|
80
100
|
export declare const MORPH_EASING_POINTS: readonly [number, number, number, number];
|
|
81
101
|
/** PowerPoint's morph transition uses a specific cubic-bezier easing. */
|
|
82
102
|
export declare const MORPH_EASING: string;
|
|
83
103
|
/**
|
|
84
|
-
* The curve a matched pair DISSOLVES on
|
|
104
|
+
* The curve a matched pair DISSOLVES on: the same curve it travels on.
|
|
85
105
|
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
106
|
+
* PowerPoint blends a matched shape's fill colour and transparency on exactly
|
|
107
|
+
* the progress that moves it (see {@link MORPH_EASING_POINTS}), and our ghost
|
|
108
|
+
* crossfade over an opaque incoming half shows that blend, so the dissolve
|
|
109
|
+
* rides the travel curve. The earlier separate fit, `cubic-bezier(0.2, 0, 0.4,
|
|
110
|
+
* 1)` from the issue #131 deck's crossfading title (alpha 0.035 at 7%, 0.232 at
|
|
111
|
+
* 20%, 0.477 at 34%, 0.684 at 47%, 0.888 at 68%, 0.988 at 88%), agrees with
|
|
112
|
+
* this curve to within 0.017 at every one of those samples, so it was the same
|
|
113
|
+
* curve measured on fewer frames. Kept as its own export because the dissolve
|
|
114
|
+
* rides its own animation.
|
|
95
115
|
*/
|
|
96
|
-
export declare const MORPH_CROSSFADE_EASING
|
|
116
|
+
export declare const MORPH_CROSSFADE_EASING: string;
|
|
97
117
|
/**
|
|
98
|
-
*
|
|
99
|
-
*
|
|
118
|
+
* The dissolve windows of unmatched shapes, in EASED progress (0..1) of
|
|
119
|
+
* {@link MORPH_EASING_POINTS}, not in time.
|
|
100
120
|
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
121
|
+
* A shape with no counterpart is not cross-faded over the whole transition: it
|
|
122
|
+
* is gone a third of the way along the morph's progress, and its replacement
|
|
123
|
+
* only starts to appear two thirds of the way along, so the middle shows
|
|
124
|
+
* neither. Within each window the alpha is LINEAR in the morph's eased
|
|
125
|
+
* progress. Measured for issue #141 with the same `CreateVideo` method as the
|
|
126
|
+
* curve, alpha read from the luma of the shape's centre (the RGB decode clips
|
|
127
|
+
* saturated fills, which is what made an earlier fit look shape dependent): on
|
|
128
|
+
* fourteen fades (rectangles, ovals and a triangle; leaving, arriving, alone,
|
|
129
|
+
* beside a travelling shape and with both at once; 1s and 2s), fitting the
|
|
130
|
+
* window per fade gives 0.002 to 0.336 for leaving shapes and 0.665 to 1.003
|
|
131
|
+
* for arriving ones, all fourteen within 0.002 of each other. The fixed
|
|
132
|
+
* windows below fit every one of them to an RMS under 0.007. The best window
|
|
133
|
+
* that is linear in TIME instead is 3.5 to 6 times worse.
|
|
134
|
+
*/
|
|
135
|
+
export declare const MORPH_FADE_OUT_END_PROGRESS: number;
|
|
136
|
+
/** @see MORPH_FADE_OUT_END_PROGRESS */
|
|
137
|
+
export declare const MORPH_FADE_IN_START_PROGRESS: number;
|
|
138
|
+
/**
|
|
139
|
+
* When an unmatched OUTGOING shape starts dissolving, as a percentage of the
|
|
140
|
+
* morph's duration. It starts at once: the slow start of the curve is what
|
|
141
|
+
* makes it look as if it holds for the first few frames.
|
|
142
|
+
*/
|
|
143
|
+
export declare const MORPH_FADE_OUT_HOLD_PERCENT = 0;
|
|
144
|
+
/**
|
|
145
|
+
* When an unmatched OUTGOING shape has finished dissolving, as a percentage of
|
|
146
|
+
* the duration: where the eased progress reaches
|
|
147
|
+
* {@link MORPH_FADE_OUT_END_PROGRESS} (about 25%).
|
|
148
|
+
*/
|
|
149
|
+
export declare const MORPH_FADE_OUT_END_PERCENT: number;
|
|
150
|
+
/**
|
|
151
|
+
* The timing function of the leaving dissolve, from 0% to
|
|
152
|
+
* {@link MORPH_FADE_OUT_END_PERCENT}: the slice of the morph curve over that
|
|
153
|
+
* window, so the alpha stays linear in the morph's eased progress.
|
|
110
154
|
*/
|
|
111
|
-
export declare const
|
|
112
|
-
/** @see MORPH_FADE_OUT_HOLD_PERCENT */
|
|
113
|
-
export declare const MORPH_FADE_OUT_END_PERCENT = 23;
|
|
155
|
+
export declare const MORPH_FADE_OUT_EASING: string;
|
|
114
156
|
/**
|
|
115
157
|
* When an unmatched INCOMING shape starts dissolving in, as a percentage of the
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
*
|
|
122
|
-
*
|
|
158
|
+
* duration: where the eased progress reaches
|
|
159
|
+
* {@link MORPH_FADE_IN_START_PROGRESS} (about 45%). Nothing of it shows before.
|
|
160
|
+
*/
|
|
161
|
+
export declare const MORPH_FADE_IN_START_PERCENT: number;
|
|
162
|
+
/**
|
|
163
|
+
* The timing function of the arriving dissolve, from
|
|
164
|
+
* {@link MORPH_FADE_IN_START_PERCENT} to 100%: the slice of the morph curve
|
|
165
|
+
* over that window, which decelerates hard into the end.
|
|
123
166
|
*/
|
|
124
|
-
export declare const
|
|
125
|
-
/** @see MORPH_FADE_IN_START_PERCENT */
|
|
126
|
-
export declare const MORPH_FADE_IN_EASING = "cubic-bezier(0, 0, 0.35, 1)";
|
|
167
|
+
export declare const MORPH_FADE_IN_EASING: string;
|
|
127
168
|
/** Maximum pixel distance for proximity-based element matching. */
|
|
128
169
|
export declare const PROXIMITY_THRESHOLD = 300;
|
|
129
170
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"morph-types.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"morph-types.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,M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AAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACV;AAED,4DAA4D;AAC5D,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;CACjB;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAyB,CAAC;AAEpG,yEAAyE;AACzE,eAAO,MAAM,YAAY,QAAoD,CAAC;AAE9E;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB,QAAe,CAAC;AAEnD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,2BAA2B,QAAQ,CAAC;AACjD,uCAAuC;AACvC,eAAO,MAAM,4BAA4B,QAAQ,CAAC;AAUlD;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAC7C;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,QAAsC,CAAC;AAC9E;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,QAA0B,CAAC;AAE7D;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,QAAuC,CAAC;AAChF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,QAAyB,CAAC;AAE3D,mEAAmE;AACnE,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,IAAI,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where PowerPoint puts a line's baseline inside its line pitch, and how far
|
|
3
|
+
* CSS has to move a paragraph to match.
|
|
4
|
+
*
|
|
5
|
+
* CSS centres the line height on the font's own ascent and descent (half the
|
|
6
|
+
* leading above, half below), so changing `line-height` by some amount moves
|
|
7
|
+
* every baseline by half of it. PowerPoint does not. Measured on PowerPoint 16
|
|
8
|
+
* slide exports (three one-line paragraphs at 40pt, Calibri, Georgia, Arial
|
|
9
|
+
* and Segoe UI, `a:spcPct` 70% to 200% and `a:spcPts` 30 to 60pt, read at
|
|
10
|
+
* 4px per point), with `p` the line pitch, `s` the font size and `D` the
|
|
11
|
+
* font's descent:
|
|
12
|
+
*
|
|
13
|
+
* - A line taller than single spacing (`p > 1.2 s`) sits its baseline at
|
|
14
|
+
* exactly 75% of the pitch, whatever the font: 102% to 200% and every exact
|
|
15
|
+
* pitch above single all measured `0.75 p` (plus the glyph overshoot).
|
|
16
|
+
* - At single spacing and below, the descent stays at the bottom of the line
|
|
17
|
+
* and the space is taken above it, `p - D` (100%, 95% and 90%), until that
|
|
18
|
+
* falls under `0.75 p` (85% and tighter), which holds again.
|
|
19
|
+
*
|
|
20
|
+
* So `baseline = p > 1.2 s ? 0.75 p : max(0.75 p, p - D)`. The jump at single
|
|
21
|
+
* spacing is real: 102% put the Calibri baseline 0.75pt HIGHER than 100% did.
|
|
22
|
+
*
|
|
23
|
+
* The move is taken relative to single spacing, which is left exactly as the
|
|
24
|
+
* renderer already draws it. The descent PowerPoint keeps at single spacing
|
|
25
|
+
* is close to, not equal to, the one the browser reports (0.261 em against
|
|
26
|
+
* Calibri's 0.269, 0.225 against Segoe UI's 0.251), so placing single-spaced
|
|
27
|
+
* lines from the browser's metrics moved the most common text, Calibri at
|
|
28
|
+
* 100%, by a fraction of a pixel the wrong way; only the change the spacing
|
|
29
|
+
* makes is applied.
|
|
30
|
+
*
|
|
31
|
+
* @module render/paragraph-baseline
|
|
32
|
+
*/
|
|
33
|
+
import type { TextStyle } from 'ooxml-core/pptx';
|
|
34
|
+
import type { ParagraphRun, RenderParagraph } from './paragraph-types.js';
|
|
35
|
+
/** A font's ascent and descent in px, as CSS lays a line box out with them. */
|
|
36
|
+
export interface FontBox {
|
|
37
|
+
ascent: number;
|
|
38
|
+
descent: number;
|
|
39
|
+
}
|
|
40
|
+
/** Ascent and descent of a CSS `font` shorthand, or `undefined` when they cannot be measured. */
|
|
41
|
+
export type FontBoxMeasure = (font: string) => FontBox | undefined;
|
|
42
|
+
/** PowerPoint's baseline, in px from the top of a line `pitch` tall of text `size` px. */
|
|
43
|
+
export declare function powerPointBaseline(pitch: number, size: number, descent: number): number;
|
|
44
|
+
/** One inline box CSS puts on a line: its `line-height` in px and its font's box. */
|
|
45
|
+
export interface CssLineBox {
|
|
46
|
+
lineHeight: number;
|
|
47
|
+
font: FontBox;
|
|
48
|
+
}
|
|
49
|
+
/** The baseline CSS gives a line holding `boxes`, in px from the line's top. */
|
|
50
|
+
export declare function cssBaseline(boxes: readonly CssLineBox[]): number;
|
|
51
|
+
/**
|
|
52
|
+
* {@link FontBoxMeasure} on a 2D canvas (`fontBoundingBoxAscent` /
|
|
53
|
+
* `fontBoundingBoxDescent`, the metrics the browser lays a line box out
|
|
54
|
+
* with). Answers `undefined` outside a browser and for a web font that has
|
|
55
|
+
* not loaded yet, and caches only fonts that are ready.
|
|
56
|
+
*/
|
|
57
|
+
export declare const measureFontBoxWithCanvas: FontBoxMeasure;
|
|
58
|
+
/** What {@link resolveParagraphBaselineShift} reads from one paragraph. */
|
|
59
|
+
export interface BaselineShiftInput {
|
|
60
|
+
runs: readonly ParagraphRun[];
|
|
61
|
+
/** The paragraph's `line-height`: its own, else the text body's. */
|
|
62
|
+
lineHeight: number | string;
|
|
63
|
+
/** The paragraph element's own `font-size` (its strut) and `font-family`. */
|
|
64
|
+
strutSizePx: number;
|
|
65
|
+
strutFamily: string;
|
|
66
|
+
measure?: FontBoxMeasure;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* How far (px) to move a paragraph down so its baselines sit where PowerPoint
|
|
70
|
+
* puts them (see the module comment), or `undefined` when it needs no move or
|
|
71
|
+
* its lines cannot be modelled: no text, runs in more than one size or face,
|
|
72
|
+
* shifted (superscript, subscript) runs, equations, tabs, ruby or script
|
|
73
|
+
* fallback pieces. Every line of such a paragraph has the same pitch and the
|
|
74
|
+
* same baseline offset, so one move fixes them all and leaves the flow alone.
|
|
75
|
+
*/
|
|
76
|
+
export declare function resolveParagraphBaselineShift(input: BaselineShiftInput): number | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Move `paragraph` onto PowerPoint's baselines (see
|
|
79
|
+
* {@link resolveParagraphBaselineShift}) with a relative `top`, which leaves
|
|
80
|
+
* every other paragraph where it is. Skipped for vertical text, the legacy
|
|
81
|
+
* `compatLnSpc` model and a box the browser shrinks to fit at run time.
|
|
82
|
+
*/
|
|
83
|
+
export declare function applyParagraphBaselineShift(paragraph: RenderParagraph, body: TextStyle | undefined, block: {
|
|
84
|
+
fontFamily: string;
|
|
85
|
+
fontSizePx: number;
|
|
86
|
+
}, measure?: FontBoxMeasure): void;
|
|
87
|
+
//# sourceMappingURL=paragraph-baseline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paragraph-baseline.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/paragraph-baseline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGvE,+EAA+E;AAC/E,MAAM,WAAW,OAAO;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,iGAAiG;AACjG,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAAG,SAAS,CAAC;AAWnE,0FAA0F;AAC1F,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAKvF;AAED,qFAAqF;AACrF,MAAM,WAAW,UAAU;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;CACd;AAED,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,GAAG,MAAM,CAIhE;AAKD;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,cAqBtC,CAAC;AAWF,2EAA2E;AAC3E,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,SAAS,YAAY,EAAE,CAAC;IAC9B,oEAAoE;IACpE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,6EAA6E;IAC7E,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,cAAc,CAAC;CACzB;AAmBD;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,GAAG,SAAS,CA6C3F;AAkBD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAC1C,SAAS,EAAE,eAAe,EAC1B,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,KAAK,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,EACjD,OAAO,CAAC,EAAE,cAAc,GACtB,IAAI,CAwBN"}
|
|
@@ -11,17 +11,17 @@ export interface ParagraphSpacing {
|
|
|
11
11
|
/** Unitless multiplier (`a:spcPct`) or a `"<n>pt"` / `"<n>px"` string (`a:spcPts`). */
|
|
12
12
|
lineHeight?: number | string;
|
|
13
13
|
/**
|
|
14
|
-
* `margin-top` in px
|
|
15
|
-
* paragraph
|
|
16
|
-
* {@link
|
|
17
|
-
* stability (every binding's paragraph renderer already reads it and maps
|
|
18
|
-
* it to `margin-top`, so removing the field is unnecessary churn); it is
|
|
19
|
-
* simply never populated any more.
|
|
14
|
+
* `margin-top` in px: this paragraph's own `a:spcBef`. Suppressed on the
|
|
15
|
+
* first paragraph unless `spaceFirstLast` (see
|
|
16
|
+
* {@link ParagraphSpacingInput.spaceFirstLast}).
|
|
20
17
|
*/
|
|
21
18
|
spaceBeforePx?: number;
|
|
22
19
|
/**
|
|
23
|
-
* `margin-bottom` in px
|
|
24
|
-
*
|
|
20
|
+
* `margin-bottom` in px: this paragraph's own `a:spcAft`. Suppressed on the
|
|
21
|
+
* last paragraph unless `spaceFirstLast`. The text body lays its paragraphs
|
|
22
|
+
* out in a flex column, so the two margins never collapse: the gap between
|
|
23
|
+
* two paragraphs is the first one's `spcAft` PLUS the next one's `spcBef`,
|
|
24
|
+
* as PowerPoint adds them.
|
|
25
25
|
*/
|
|
26
26
|
spaceAfterPx?: number;
|
|
27
27
|
/**
|
|
@@ -63,38 +63,13 @@ export interface ParagraphSpacingInput {
|
|
|
63
63
|
* paragraph only: the very first paragraph's own `spcBef`, and the very
|
|
64
64
|
* last paragraph's own `spcAft`. Off (the default, including omitted)
|
|
65
65
|
* suppresses both; every other paragraph's own spacing is unaffected by
|
|
66
|
-
* this flag either way.
|
|
67
|
-
* paragraph's own `spcBef` and `spcAft` combine once resolved - that part
|
|
68
|
-
* is NOT what this flag controls, and is where the real complexity in
|
|
69
|
-
* this area actually lives.
|
|
66
|
+
* this flag either way.
|
|
70
67
|
*
|
|
71
|
-
* Measured
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* rather than several candidates that happen to sum the same:
|
|
77
|
-
*
|
|
78
|
-
* - The first paragraph's own `BoundHeight` grows by exactly ITS OWN
|
|
79
|
-
* `spcBef` when the flag is on (e.g. 42.6pt -> 53.6pt on the distinct-
|
|
80
|
-
* value deck, a +11pt delta matching p1's own 11pt `spcBef` exactly);
|
|
81
|
-
* its `BoundTop` never moves either way. The last paragraph's own
|
|
82
|
-
* `BoundHeight` mirrors it for `spcAft` (95.6pt -> 179.6pt, +84pt,
|
|
83
|
-
* matching p4's own 84pt `spcAft` exactly).
|
|
84
|
-
* - Every paragraph strictly between the first and last is completely
|
|
85
|
-
* unaffected by the flag in every N tested: its own gap to the next
|
|
86
|
-
* paragraph is identical whether the flag is omitted, `"0"` or `"1"`.
|
|
87
|
-
*
|
|
88
|
-
* This confirms an earlier reading of the ORIGINAL 3-paragraph,
|
|
89
|
-
* `BoundTop`-only measurement (`project_spcfirstlastpara_com_measurement`
|
|
90
|
-
* memory), which concluded the flag "governs the SECOND paragraph's
|
|
91
|
-
* before-spacing": with only 3 paragraphs and uniform spacing, "p1's own
|
|
92
|
-
* spcBef, rendered after p1 instead of before it" and "p2's own spcBef"
|
|
93
|
-
* are numerically indistinguishable (both predict the exact same gap).
|
|
94
|
-
* The distinct-value deck (which paragraph's specific number shows up)
|
|
95
|
-
* and the `BoundHeight` reads (which paragraph's box the change lives in)
|
|
96
|
-
* together rule that reading out: it is the edge paragraph's OWN value,
|
|
97
|
-
* not its neighbour's.
|
|
68
|
+
* Measured on PowerPoint 16 slide exports (`Slide.Export` PNG, Calibri 28pt,
|
|
69
|
+
* zero insets): a first paragraph's `spcBef` of 24pt moves its first line
|
|
70
|
+
* down by exactly 24pt only with the flag on, and a bottom-anchored body's
|
|
71
|
+
* last paragraph `spcAft` of 24pt lifts the block by exactly 24pt only with
|
|
72
|
+
* the flag on.
|
|
98
73
|
*/
|
|
99
74
|
spaceFirstLast?: boolean;
|
|
100
75
|
/**
|
|
@@ -120,34 +95,22 @@ export interface ParagraphSpacingInput {
|
|
|
120
95
|
* from the same level; a paragraph's own multiplier is never mixed with an
|
|
121
96
|
* exact value inherited from the body.
|
|
122
97
|
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
* `spcAft`
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
* | gap | measured |
|
|
136
|
-
* | ------ | --------- |
|
|
137
|
-
* | p1->p2 | line only (21.6pt); p2's 100pt `spcBef` contributes NOTHING |
|
|
138
|
-
* | p2->p3 | line + 100pt; ALL of it lands here, after p2, not before |
|
|
98
|
+
* A paragraph's own `spcBef` is space ABOVE it and its own `spcAft` space
|
|
99
|
+
* BELOW it, and PowerPoint adds the two across a paragraph boundary. Measured
|
|
100
|
+
* on PowerPoint 16 slide exports (Calibri 28pt, single spacing, a 33.6pt
|
|
101
|
+
* pitch): `spcAft` 6pt on the first paragraph and `spcBef` 12pt on the second
|
|
102
|
+
* put the second line 51.75pt below the first (33.6 + 6 + 12), and a lone
|
|
103
|
+
* `spcBef` of 30pt on a middle paragraph opens the gap ABOVE it (63.75pt)
|
|
104
|
+
* while the gap below it stays one pitch. Percentage spacing (`spcPct`) is a
|
|
105
|
+
* fraction of the paragraph's 1.2 x font-size line (core resolves it to px):
|
|
106
|
+
* `spcAft` 100% plus the next paragraph's `spcBef` 50% at 28pt measured
|
|
107
|
+
* 84pt between the lines (33.6 + 33.6 + 16.8). Autofit's `lnSpcReduction`
|
|
108
|
+
* shrinks the line pitch only, never this spacing (with a 20% reduction a
|
|
109
|
+
* 6pt `spcAft` and a 12pt `spcBef` still added 18pt to the gap).
|
|
139
110
|
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
* The one exception is the two paragraphs `spaceFirstLast` gates (see that
|
|
144
|
-
* field's doc comment): the very first paragraph's own `spcBef` and the very
|
|
145
|
-
* last paragraph's own `spcAft`, each defaulting to suppressed. Cross-checked
|
|
146
|
-
* against a 4-paragraph deck with four distinct `spcBef`/`spcAft` pairs (own
|
|
147
|
-
* `BoundHeight` per paragraph matches `line + effective(spcBef) +
|
|
148
|
-
* effective(spcAft)` to 0.1pt on every paragraph, in every `spaceFirstLast`
|
|
149
|
-
* state) and against the original 3-paragraph uniform-value deck (which this
|
|
150
|
-
* model reproduces exactly - see the test file).
|
|
111
|
+
* (`TextRange2.Paragraphs(n).BoundTop` reads cannot tell these apart: a
|
|
112
|
+
* paragraph's bound box already includes its own `spcBef`, which once led
|
|
113
|
+
* this function to fold `spcBef` below the paragraph instead.)
|
|
151
114
|
*
|
|
152
115
|
* `paragraphSpacingBefore` / `paragraphSpacingAfter` are already px from core.
|
|
153
116
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paragraph-spacing.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/paragraph-spacing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAOjD,+DAA+D;AAC/D,MAAM,WAAW,gBAAgB;IAChC,uFAAuF;IACvF,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B
|
|
1
|
+
{"version":3,"file":"paragraph-spacing.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/paragraph-spacing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAOjD,+DAA+D;AAC/D,MAAM,WAAW,gBAAgB;IAChC,uFAAuF;IACvF,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAE/C,iDAAiD;AACjD,MAAM,WAAW,qBAAqB;IACrC,sEAAsE;IACtE,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,+DAA+D;IAC/D,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,gDAAgD;IAChD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;;;;;;;;OAYG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;;;;OASG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,qBAAqB,GAAG,gBAAgB,CAgEtF"}
|
|
@@ -125,6 +125,13 @@ export interface RenderParagraph {
|
|
|
125
125
|
spaceBeforePx?: number;
|
|
126
126
|
/** `margin-bottom` in px from this paragraph's `a:pPr > a:spcAft` (space after). */
|
|
127
127
|
spaceAfterPx?: number;
|
|
128
|
+
/**
|
|
129
|
+
* How far (px) `paragraphStyle` moves the paragraph down (a relative `top`)
|
|
130
|
+
* so its baselines sit where PowerPoint puts them in their line pitch. See
|
|
131
|
+
* `resolveParagraphBaselineShift`. Already applied through
|
|
132
|
+
* `paragraphStyle`; carried for code that models the layout (morph).
|
|
133
|
+
*/
|
|
134
|
+
baselineShiftPx?: number;
|
|
128
135
|
/**
|
|
129
136
|
* `font-size` in px to set on the paragraph element so its CSS line boxes
|
|
130
137
|
* are built from its OWN runs rather than the text body's default size.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paragraph-types.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/paragraph-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,q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"}
|
|
@@ -166,10 +166,11 @@ export interface PresentationActionRunner {
|
|
|
166
166
|
* Trust Center gate for an on-slide action that opens an external URL
|
|
167
167
|
* (Options > Trust Center > "Confirm before opening external hyperlinks").
|
|
168
168
|
* Called with the resolved URL before it is opened; returning `false`
|
|
169
|
-
* blocks the navigation.
|
|
169
|
+
* blocks the navigation. It may answer later (an in-app dialog): the URL
|
|
170
|
+
* then opens once the promise resolves true. Omitted (or unset) opens unconditionally, matching
|
|
170
171
|
* the pre-existing behavior for a binding that has not wired the gate yet.
|
|
171
172
|
*/
|
|
172
|
-
confirmUrl?: (url: string) => boolean
|
|
173
|
+
confirmUrl?: (url: string) => boolean | Promise<boolean>;
|
|
173
174
|
/**
|
|
174
175
|
* `ppaction://hlinkshowjump?jump=lastslideviewed`: jump back to the last
|
|
175
176
|
* slide the audience actually saw (not necessarily the previous slide in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation-action.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/presentation-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAe1E,uEAAuE;AACvE,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAWhF;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,wBAAwB,GACjC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE;AAClC,gGAAgG;GAC9F;IAAE,IAA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AE,MAAM,CAAC;IAClB,MAAM,EAAE,UAAU,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,4BAA4B,CAC3C,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,SAAS,GAAG,SAAS,GAC1B,wBAAwB,GAAG,SAAS,CA8BtC;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACxC,8CAA8C;IAC9C,SAAS,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,uEAAuE;IACvE,IAAI,EAAE,CAAC,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC;IAClC,sBAAsB;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oEAAoE;IACpE,SAAS,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC
|
|
1
|
+
{"version":3,"file":"presentation-action.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/presentation-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAe1E,uEAAuE;AACvE,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAWhF;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,wBAAwB,GACjC;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE;AAClC,gGAAgG;GAC9F;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE;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KAAK,IAAI,CAAC;CACtC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACpC,MAAM,EAAE,UAAU,GAAG,SAAS,EAC9B,OAAO,EAAE,gCAAgC,EACzC,MAAM,EAAE,wBAAwB,GAC9B,OAAO,CAoDT;AAED,oEAAoE;AACpE,MAAM,MAAM,wBAAwB,GACjC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,GACzD;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC;AAErB;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACvC,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,SAAS,GAAG,SAAS,GAC1B,wBAAwB,CAM1B;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC3C,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,SAAS,GAAG,SAAS,EAC5B,OAAO,EAAE,gCAAgC,EACzC,MAAM,EAAE,wBAAwB,GAC9B,wBAAwB,CAAC,MAAM,CAAC,CAclC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The "Read-only" badge in the quick-access row, decided once for all five bindings.
|
|
3
|
+
*
|
|
4
|
+
* It shows whenever the deck cannot be edited (host `canEdit={false}`, a cloud file the write
|
|
5
|
+
* policy leaves read-only, collaboration read-only), except in Protected View with an Enable
|
|
6
|
+
* Editing action, where that action takes the badge's place. Bindings map the descriptor onto
|
|
7
|
+
* their template; they keep no copy of the rule.
|
|
8
|
+
*/
|
|
9
|
+
export declare const READ_ONLY_BADGE_ATTR = "data-pptx-read-only-badge";
|
|
10
|
+
export interface ReadOnlyBadgeInput {
|
|
11
|
+
/** Whether editing is active for the open deck. */
|
|
12
|
+
editable: boolean;
|
|
13
|
+
/** Protected View with an Enable Editing action: that button replaces the badge. */
|
|
14
|
+
enableEditingAvailable?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ReadOnlyBadgeView {
|
|
17
|
+
visible: boolean;
|
|
18
|
+
textKey: 'pptx.toolbar.readOnly';
|
|
19
|
+
/** The badge is a status message, announced politely. */
|
|
20
|
+
role: 'status';
|
|
21
|
+
}
|
|
22
|
+
export declare function resolveReadOnlyBadge(input: ReadOnlyBadgeInput): ReadOnlyBadgeView;
|
|
23
|
+
//# sourceMappingURL=read-only-badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-only-badge.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/read-only-badge.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,8BAA8B,CAAC;AAEhE,MAAM,WAAW,kBAAkB;IAClC,mDAAmD;IACnD,QAAQ,EAAE,OAAO,CAAC;IAClB,oFAAoF;IACpF,sBAAsB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,iBAAiB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,uBAAuB,CAAC;IACjC,yDAAyD;IACzD,IAAI,EAAE,QAAQ,CAAC;CACf;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,kBAAkB,GAAG,iBAAiB,CAMjF"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Framework-neutral Share dialog form, invitation-link, and join parsing.
|
|
3
|
-
* Every UI binding emits the same CollaborationConfig shape from these helpers.
|
|
4
|
-
*/
|
|
5
1
|
import type { CollaborationConfig } from '../types.js';
|
|
6
2
|
export interface ShareSessionDefaults {
|
|
7
3
|
roomId?: string;
|
|
@@ -24,9 +20,10 @@ export declare function seedShareSessionFields(defaults?: ShareSessionDefaults):
|
|
|
24
20
|
export declare function canCreateCollaborationSession(fields: ShareSessionFields): boolean;
|
|
25
21
|
export declare function buildCreateCollaborationConfig(fields: ShareSessionFields): CollaborationConfig | null;
|
|
26
22
|
/**
|
|
27
|
-
* Parse an invitation produced by any framework binding
|
|
28
|
-
* the standard `room`, `server`,
|
|
29
|
-
* parameters. A bare room ID uses the supplied
|
|
23
|
+
* Parse an invitation produced by any framework binding (or any product: the links are the
|
|
24
|
+
* shared `ooxml-core/collab` format). Complete links carry the standard `room`, `server`,
|
|
25
|
+
* `transport`, and optional `signaling` query parameters. A bare room ID uses the supplied
|
|
26
|
+
* fallback server.
|
|
30
27
|
*/
|
|
31
28
|
export declare function buildJoinCollaborationConfig(fields: JoinSessionFields): CollaborationConfig | null;
|
|
32
29
|
export declare function canJoinCollaborationSession(fields: JoinSessionFields): boolean;
|