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,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One back-to-front order for EVERYTHING a morph's transition overlay paints:
|
|
3
|
+
* the runs of ghosts and lifted arrivals (`morph-overlay-layers`) and the
|
|
4
|
+
* cross-dissolving pairs whose two halves are painted together
|
|
5
|
+
* (`morph-crossfade-group`).
|
|
6
|
+
*
|
|
7
|
+
* Crossfade groups used to be painted above every run. That is only right
|
|
8
|
+
* while nothing the overlay paints belongs above a dissolving pair, and issue
|
|
9
|
+
* #141's slides 6 to 7 break it: three columns of "L"s change font (so each
|
|
10
|
+
* column dissolves) while they slide under the top and bottom picture bands,
|
|
11
|
+
* which the incoming slide stacks above them. Painted over every run, the
|
|
12
|
+
* columns showed across both bands for the whole morph and vanished from
|
|
13
|
+
* them in one frame when the overlay came down. Ranking a group at its
|
|
14
|
+
* incoming shape's layer, like any other arrival, keeps the bands on top.
|
|
15
|
+
*
|
|
16
|
+
* A binding never sorts anything itself: it reads the z-slots from
|
|
17
|
+
* {@link morphOverlayStackSlots} (one per run) or
|
|
18
|
+
* {@link morphOverlayElementSlots} (one per painted element) and puts each on
|
|
19
|
+
* its layer, group or element.
|
|
20
|
+
*
|
|
21
|
+
* @module render/morph-overlay-stack
|
|
22
|
+
*/
|
|
23
|
+
import type { PptxElement } from 'ooxml-core/pptx';
|
|
24
|
+
import type { MorphCrossfadeGroup } from './morph-crossfade-group.js';
|
|
25
|
+
import type { MorphOverlayLayer } from './morph-overlay-layers.js';
|
|
26
|
+
import type { MorphPair } from './morph-types.js';
|
|
27
|
+
/** One entry of the overlay's back-to-front stack. */
|
|
28
|
+
export interface MorphOverlayStackEntry {
|
|
29
|
+
/** `'layer'` indexes `overlayLayers`; `'crossfade'` indexes `crossfadeGroups`. */
|
|
30
|
+
readonly kind: 'layer' | 'crossfade';
|
|
31
|
+
readonly index: number;
|
|
32
|
+
}
|
|
33
|
+
/** The overlay's runs and the stack that interleaves them with the groups. */
|
|
34
|
+
export interface MorphOverlayStack {
|
|
35
|
+
/** Runs of consecutive same-slide shapes, split wherever a group falls inside one. */
|
|
36
|
+
readonly layers: MorphOverlayLayer[];
|
|
37
|
+
/** Every run and group, back to front. */
|
|
38
|
+
readonly stack: MorphOverlayStackEntry[];
|
|
39
|
+
}
|
|
40
|
+
/** The part of a morph plan the slot helpers read. */
|
|
41
|
+
export interface MorphOverlayStackSource {
|
|
42
|
+
readonly overlayLayers?: readonly MorphOverlayLayer[];
|
|
43
|
+
readonly crossfadeGroups?: readonly unknown[];
|
|
44
|
+
readonly overlayStack?: readonly MorphOverlayStackEntry[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Rank the runs' shapes and the crossfade groups in one order anchored to the
|
|
48
|
+
* incoming slide (see `buildMorphIncomingAnchoredOrder`), then cut the shapes
|
|
49
|
+
* into runs at every change of slide and at every group.
|
|
50
|
+
*
|
|
51
|
+
* A group ranks at its INCOMING half's layer, which is where the pair rests
|
|
52
|
+
* once the overlay comes down. On a tie (a ghost and its own lifted
|
|
53
|
+
* counterpart) the outgoing side is painted first, as `resolveMorphOverlayLayers`
|
|
54
|
+
* does.
|
|
55
|
+
*
|
|
56
|
+
* @param ghosts - The outgoing elements the overlay paints outside groups.
|
|
57
|
+
* @param lifted - The incoming elements the overlay paints outside groups.
|
|
58
|
+
* @param groups - The crossfade groups, in the plan's order.
|
|
59
|
+
* @param outgoing - The outgoing slide's elements, flattened, in document order.
|
|
60
|
+
* @param incoming - The incoming slide's elements, flattened, in document order.
|
|
61
|
+
* @param pairs - The matched pairs.
|
|
62
|
+
* @param aliases - Painted copies (id -> the element they copy) that rank as
|
|
63
|
+
* the element they copy (see `morph-text-piece-plan`).
|
|
64
|
+
* @returns The runs and the stack, back to front.
|
|
65
|
+
*/
|
|
66
|
+
export declare function resolveMorphOverlayStack(ghosts: readonly PptxElement[], lifted: readonly PptxElement[], groups: readonly MorphCrossfadeGroup[], outgoing: readonly PptxElement[], incoming: readonly PptxElement[], pairs: readonly MorphPair[], aliases?: ReadonlyMap<string, string>): MorphOverlayStack;
|
|
67
|
+
/**
|
|
68
|
+
* Back-to-front slots for a binding that paints each RUN as one layer:
|
|
69
|
+
* `layers[i]` for `overlayLayers[i]`, `groups[j]` for `crossfadeGroups[j]`.
|
|
70
|
+
* Add the binding's own base z-index to each.
|
|
71
|
+
*/
|
|
72
|
+
export declare function morphOverlayStackSlots(plan: MorphOverlayStackSource): {
|
|
73
|
+
layers: number[];
|
|
74
|
+
groups: number[];
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Back-to-front slots for a binding that gives every painted ELEMENT its own
|
|
78
|
+
* z-index: each run's shapes take consecutive slots, and each group one slot
|
|
79
|
+
* of its own.
|
|
80
|
+
*/
|
|
81
|
+
export declare function morphOverlayElementSlots(plan: MorphOverlayStackSource): {
|
|
82
|
+
elements: Map<string, number>;
|
|
83
|
+
groups: number[];
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=morph-overlay-stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"morph-overlay-stack.d.ts","sourceRoot":"","sources":["../../../src/p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AAiB,CA8CnB;AAYD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,uBAAuB,GAAG;IACtE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CACjB,CAOA;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,uBAAuB,GAAG;IACxE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,MAAM,EAAE,MAAM,EAAE,CAAC;CACjB,CAgBA"}
|
|
@@ -39,7 +39,11 @@
|
|
|
39
39
|
*/
|
|
40
40
|
import type { PptxElement, PptxSlide } from 'ooxml-core/pptx';
|
|
41
41
|
import type { MorphCrossfadeGroup } from './morph-crossfade-group.js';
|
|
42
|
+
import type { MorphViewSize } from './morph-flip-turn.js';
|
|
42
43
|
import type { MorphOverlayLayer } from './morph-overlay-layers.js';
|
|
44
|
+
import type { MorphOverlayStackEntry } from './morph-overlay-stack.js';
|
|
45
|
+
import type { MorphCopyPart } from './morph-text-body.js';
|
|
46
|
+
import type { MorphTextMeasure } from './morph-text-frame.js';
|
|
43
47
|
import type { MorphMode } from './morph-types.js';
|
|
44
48
|
/** Everything needed to play one morph transition. */
|
|
45
49
|
export interface MorphTransitionPlan {
|
|
@@ -65,6 +69,22 @@ export interface MorphTransitionPlan {
|
|
|
65
69
|
incomingImageAnimations: Map<string, string>;
|
|
66
70
|
/** Outgoing (ghost) counterpart of {@link MorphTransitionPlan.incomingImageAnimations}. */
|
|
67
71
|
outgoingImageAnimations: Map<string, string>;
|
|
72
|
+
/**
|
|
73
|
+
* Element id -> CSS `animation` shorthand for the PATH of the element's
|
|
74
|
+
* outline overlay (the `<svg data-pptx-outline>` every binding paints a
|
|
75
|
+
* centred or gradient outline with), present only when a shape's outline is
|
|
76
|
+
* re-pathed per frame (see `morph-shape-carry`). Like the image channel it is
|
|
77
|
+
* a descendant rule, emitted by {@link buildMorphScopedCss}; the ids may be
|
|
78
|
+
* incoming, outgoing or copy ids, so each half's rules carry all of them.
|
|
79
|
+
*/
|
|
80
|
+
outlineAnimations?: Map<string, string>;
|
|
81
|
+
/**
|
|
82
|
+
* Element id -> CSS `animation` shorthand for the paths of a freeform's
|
|
83
|
+
* custom-geometry `<svg data-pptx-custom-geometry>`, which a binding that
|
|
84
|
+
* paints custom geometry as a vector (rather than a clipped box) stamps;
|
|
85
|
+
* emitted next to {@link MorphTransitionPlan.outlineAnimations}.
|
|
86
|
+
*/
|
|
87
|
+
customGeometryAnimations?: Map<string, string>;
|
|
68
88
|
/**
|
|
69
89
|
* Incoming-slide element id -> CSS `animation` shorthand for the copy the
|
|
70
90
|
* overlay paints, above every ghost.
|
|
@@ -149,9 +169,36 @@ export interface MorphTransitionPlan {
|
|
|
149
169
|
* slide inside a `data-pptx-morph-lifted` scope. Painting every ghost below
|
|
150
170
|
* every lifted arrival instead let a full-slide picture fading in veil the
|
|
151
171
|
* title travelling above it (issue #141).
|
|
152
|
-
*
|
|
172
|
+
*
|
|
173
|
+
* A run is split wherever a crossfade group belongs inside it, and
|
|
174
|
+
* {@link MorphTransitionPlan.overlayStack} says where each group goes.
|
|
153
175
|
*/
|
|
154
176
|
overlayLayers: MorphOverlayLayer[];
|
|
177
|
+
/**
|
|
178
|
+
* Every run of {@link MorphTransitionPlan.overlayLayers} and every
|
|
179
|
+
* {@link MorphTransitionPlan.crossfadeGroups} group, back to front. Read it
|
|
180
|
+
* through `morphOverlayStackSlots` or `morphOverlayElementSlots` (see
|
|
181
|
+
* `morph-overlay-stack`). Painting every group above every run let three
|
|
182
|
+
* dissolving text columns show through the picture bands the incoming slide
|
|
183
|
+
* stacks above them, then vanish from them when the overlay came down
|
|
184
|
+
* (issue #141, slides 6 to 7).
|
|
185
|
+
*/
|
|
186
|
+
overlayStack: MorphOverlayStackEntry[];
|
|
187
|
+
/**
|
|
188
|
+
* Id -> source id for the copies the overlay paints of a text pair that is
|
|
189
|
+
* carried piece by piece (see `morph-text-piece-plan`). Each copy is in
|
|
190
|
+
* {@link MorphTransitionPlan.crossfadeGroups} as an element of its own; a
|
|
191
|
+
* binding that builds its overlay from a clone of the rendered slide instead
|
|
192
|
+
* clones the source's node under the copy's id.
|
|
193
|
+
*/
|
|
194
|
+
textPieceSources?: ReadonlyMap<string, string>;
|
|
195
|
+
/**
|
|
196
|
+
* Copy id -> the part of its source a copy paints, for a shape whose text is
|
|
197
|
+
* carried apart from its body (see `morph-text-body`): `'body'` without the
|
|
198
|
+
* text, `'text'` without the fill and outline. The copy's element already
|
|
199
|
+
* says so; a binding that clones the source's node strips the other part.
|
|
200
|
+
*/
|
|
201
|
+
morphCopyParts?: ReadonlyMap<string, MorphCopyPart>;
|
|
155
202
|
/** Animation duration in ms, echoed for convenience. */
|
|
156
203
|
durationMs: number;
|
|
157
204
|
}
|
|
@@ -167,6 +214,17 @@ export interface MorphPlanOptions {
|
|
|
167
214
|
* a stage that starts the slide at 0 leaves it out.
|
|
168
215
|
*/
|
|
169
216
|
readonly zIndexBase?: number;
|
|
217
|
+
/**
|
|
218
|
+
* How text is measured when a pair's unchanged text is carried line for
|
|
219
|
+
* line (see `morph-text-frame`). Defaults to a canvas; tests pass their own.
|
|
220
|
+
*/
|
|
221
|
+
readonly measureText?: MorphTextMeasure;
|
|
222
|
+
/**
|
|
223
|
+
* The slide's size in element pixels: the camera a turning flip is seen
|
|
224
|
+
* through sits over its centre (see `morph-flip-turn`). Defaults to the
|
|
225
|
+
* 16:9 slide, 1280 x 720.
|
|
226
|
+
*/
|
|
227
|
+
readonly slideSize?: MorphViewSize;
|
|
170
228
|
}
|
|
171
229
|
/**
|
|
172
230
|
* Build the render plan for morphing `fromSlide` into `toSlide`.
|
|
@@ -214,4 +272,18 @@ export declare function buildMorphScopedCss(plan: MorphTransitionPlan, scopeAttr
|
|
|
214
272
|
* @returns The newline-joined rules (no trailing newline); `''` when there are none.
|
|
215
273
|
*/
|
|
216
274
|
export declare function buildMorphAnimationRules(plan: MorphTransitionPlan, scopeAttribute: string, which?: 'incoming' | 'outgoing' | 'lifted', only?: 'image'): string;
|
|
275
|
+
/**
|
|
276
|
+
* The outline-path rules of a plan (see
|
|
277
|
+
* {@link MorphTransitionPlan.outlineAnimations}), keyed on `keyAttribute`.
|
|
278
|
+
*
|
|
279
|
+
* {@link buildMorphAnimationRules} keys them on `data-element-id`; a binding
|
|
280
|
+
* whose overlay paints its halves without that attribute (React's overlay
|
|
281
|
+
* wraps each one in a `data-pptx-morph-outgoing` / `data-pptx-morph-lifted`
|
|
282
|
+
* element named after its id instead) passes that attribute. A re-pathed
|
|
283
|
+
* outline animates the CSS `d` property, so the rules sit behind a support
|
|
284
|
+
* check; without it the static path stays, scaled with its box as before.
|
|
285
|
+
*
|
|
286
|
+
* @returns The rules, or `''` when the plan re-paths no outline.
|
|
287
|
+
*/
|
|
288
|
+
export declare function buildMorphOutlineRules(plan: MorphTransitionPlan, keyAttribute: string, prefix?: string): string;
|
|
217
289
|
//# sourceMappingURL=morph-plan.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"morph-plan.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAU9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"morph-plan.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAU9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,E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AAM,EACtB,KAAK,GAAE,UAAU,GAAG,UAAU,GAAG,QAAqB,EACtD,IAAI,CAAC,EAAE,OAAO,GACZ,MAAM,CA+BR;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CACrC,IAAI,EAAE,mBAAmB,EACzB,YAAY,EAAE,MAAM,EACpB,MAAM,SAAK,GACT,MAAM,CAYR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"morph-predicates.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-predicates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"morph-predicates.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-predicates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA+BnD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAMrE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAO7E;AAED,4EAA4E;AAC5E,wBAAgB,aAAa,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,CAQjE;AAED,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM,CAIrE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAOtE;AAED,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAaxE;AAED,4EAA4E;AAC5E,eAAO,MAAM,eAAe,YAC3B,UAAU,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,eAAe,EACf,YAAY,CACH,CAAC;AAEX;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAMzD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAU3D;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CA0BxE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACtC,MAAM,EAAE,WAAW,EACnB,IAAI,EAAE,WAAW,EACjB,YAAY,EAAE,SAAS,WAAW,EAAE,EACpC,UAAU,EAAE,SAAS,WAAW,EAAE,EAClC,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,EAC7B,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,GACzB,OAAO,CAQT"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path and stop helpers of `morph-shape-carry`: an outline's commands, their
|
|
3
|
+
* box-normalised interpolation, and the keyframe stops that bake it.
|
|
4
|
+
*
|
|
5
|
+
* @module render/morph-shape-carry-path
|
|
6
|
+
*/
|
|
7
|
+
import type { PptxElement } from 'ooxml-core/pptx';
|
|
8
|
+
import type { SvgPathCommand } from './morph-types.js';
|
|
9
|
+
/** Fewest stops baked into a per-stop track (clip or outline); never further apart than this. */
|
|
10
|
+
export declare const SHAPE_CARRY_STOPS = 12;
|
|
11
|
+
export declare function outlineCommands(element: PptxElement): SvgPathCommand[] | undefined;
|
|
12
|
+
/** Whether two outlines are the same commands with the same flags, so their vertices pair up. */
|
|
13
|
+
export declare function sameStructure(a: SvgPathCommand[], b: SvgPathCommand[]): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* The two outlines of a pair with one structure, so their vertices pair up:
|
|
16
|
+
* as authored when they already share one, else blended (see
|
|
17
|
+
* `morph-outline-blend`). `blended` says which.
|
|
18
|
+
*/
|
|
19
|
+
export declare function pairOutlines(from: PptxElement, to: PptxElement): {
|
|
20
|
+
a: SvgPathCommand[];
|
|
21
|
+
b: SvgPathCommand[];
|
|
22
|
+
blended: boolean;
|
|
23
|
+
} | undefined;
|
|
24
|
+
/** Whether two same-structure outlines are the same shape relative to their boxes. */
|
|
25
|
+
export declare function sameRelativeGeometry(a: SvgPathCommand[], b: SvgPathCommand[], from: PptxElement, to: PptxElement): boolean;
|
|
26
|
+
export declare function lerp(a: number, b: number, p: number): number;
|
|
27
|
+
/** The pair's geometry at eased progress `p`, scaled from box-normalised units by `kx`, `ky`. */
|
|
28
|
+
export declare function geometryAt(a: SvgPathCommand[], b: SvgPathCommand[], from: PptxElement, to: PptxElement, p: number, kx: number, ky: number): string;
|
|
29
|
+
/** Scale every coordinate of a path by `kx`, `ky` (flags and rotations kept). */
|
|
30
|
+
export declare function scalePath(d: string, kx: number, ky: number): string;
|
|
31
|
+
export declare function round(value: number): number;
|
|
32
|
+
/**
|
|
33
|
+
* The eased progress of each stop: evenly spaced, plus, where the outline's
|
|
34
|
+
* share of the box changes by a large ratio `u0 -> u1`, spaced geometrically in
|
|
35
|
+
* that share so no two neighbours differ by more than {@link MAX_STOP_RATIO}.
|
|
36
|
+
*/
|
|
37
|
+
export declare function stopProgress(u0: number, u1: number): number[];
|
|
38
|
+
/** One keyframe per stop, each carrying its slice of the morph curve to the next. */
|
|
39
|
+
export declare function bakeStops(progress: readonly number[], declarationsAt: (p: number) => string[]): string;
|
|
40
|
+
//# sourceMappingURL=morph-shape-carry-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"morph-shape-carry-path.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-shape-carry-path.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAA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GAAG,MAAM,CAE3C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAa7D;AAED,qFAAqF;AACrF,wBAAgB,SAAS,CACxB,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,cAAc,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,EAAE,GACrC,MAAM,CAWR"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A resizing shape's GEOMETRY carried the way PowerPoint's Morph carries it.
|
|
3
|
+
*
|
|
4
|
+
* Every morphing element travels on a FLIP journey: it is painted at one end's
|
|
5
|
+
* box and scaled onto the other's. That is exact for a picture, but not for a
|
|
6
|
+
* vector shape, whose outline, corner radii and adjustment handles are a
|
|
7
|
+
* function of its box. Measured on PowerPoint 16 (`CreateVideo`, 60 fps, 720p,
|
|
8
|
+
* Morph by object, 2 s), PowerPoint interpolates the shape's rendered geometry
|
|
9
|
+
* in BOX-NORMALISED coordinates and maps it onto the interpolated box:
|
|
10
|
+
*
|
|
11
|
+
* - a rounded rectangle with a 6 pt (8 px) outline growing from 60 x 60 pt to
|
|
12
|
+
* 480 x 240 pt keeps no fixed stroke width: its vertical edges read 8, 9.6,
|
|
13
|
+
* 13.1, 16.1, 18.0, 18.6, 18.0, 16.8, 14.9, 12.5, 10.2, 8.4, 7.8 px
|
|
14
|
+
* across the morph and its horizontal ones 8 to 12.0 and back;
|
|
15
|
+
* `W(p) * lerp(w / W0, w / W1, p)` predicts every one of those within
|
|
16
|
+
* 0.3 to 0.6 px (`H(p) * lerp(w / H0, w / H1, p)` within 0.4 px). One
|
|
17
|
+
* solid stroke, never two crossfading;
|
|
18
|
+
* - the same shape growing only 1.4x (300 x 120 to 420 x 180 pt) therefore
|
|
19
|
+
* keeps its outline within 0.3 px of 8 px on every frame;
|
|
20
|
+
* - an adjustment change (a rounded rectangle's corner 0.05 -> 0.5, an
|
|
21
|
+
* arrow's shaft and head 0.3 -> 0.7 / 0.9) morphs as one outline whose
|
|
22
|
+
* vertices move linearly, never a dissolve.
|
|
23
|
+
*
|
|
24
|
+
* Our journey scaled the INCOMING shape, so its geometry was the incoming
|
|
25
|
+
* one's for the whole flight: the outline was `w * W(p) / W1` (1.1 px instead
|
|
26
|
+
* of 8 at the start of the grow) and the corners the final ones, stretched.
|
|
27
|
+
*
|
|
28
|
+
* This module bakes the measured model onto the element's own nodes, in the
|
|
29
|
+
* element's LOCAL frame (the box the journey scales):
|
|
30
|
+
*
|
|
31
|
+
* - a rounded rectangle's `border-radius` lerps between the two normalised
|
|
32
|
+
* radii, on the journey's own two frames (linear in eased progress);
|
|
33
|
+
* - a clipped preset's `clip-path` is re-evaluated per stop;
|
|
34
|
+
* - the outline path (`[data-pptx-outline] path`) gets a `d` per stop and a
|
|
35
|
+
* `transform: scale(ax, ay)` that undoes the journey's anisotropic scale on
|
|
36
|
+
* its stroke, so the stroke is `lerp(w0 / W0, w1 / W1, p)` of the box on
|
|
37
|
+
* each axis, as measured.
|
|
38
|
+
*
|
|
39
|
+
* Both halves of a pair get the same geometry, so a dissolving pair's ghost
|
|
40
|
+
* and incoming half stay on top of each other.
|
|
41
|
+
*
|
|
42
|
+
* @module render/morph-shape-carry
|
|
43
|
+
*/
|
|
44
|
+
import type { PptxElement } from 'ooxml-core/pptx';
|
|
45
|
+
/** Which half of a pair a carry is painted on: its box is the local frame. */
|
|
46
|
+
export type MorphCarryHalf = 'from' | 'to';
|
|
47
|
+
/** What a carry adds to one half. */
|
|
48
|
+
export interface MorphShapeCarry {
|
|
49
|
+
/** Declarations for the half's container at the start (`from`) and end (`to`) of the morph. */
|
|
50
|
+
readonly startDeclarations: readonly string[];
|
|
51
|
+
readonly endDeclarations: readonly string[];
|
|
52
|
+
/** Baked `clip-path` keyframes body for the container, when the preset is clipped. */
|
|
53
|
+
readonly clipKeyframes?: string;
|
|
54
|
+
/** Baked keyframes body for the outline path, when the outline is carried. */
|
|
55
|
+
readonly outlineKeyframes?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Baked keyframes body for the paths of a freeform painted as a vector in
|
|
58
|
+
* its own path units (`[data-pptx-custom-geometry]`): the geometry per stop.
|
|
59
|
+
*/
|
|
60
|
+
readonly customKeyframes?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Whether a pair is one shape whose geometry changes: its box, its handles,
|
|
64
|
+
* its custom path, or (for a `!!`-named pair, the only kind the matcher lets
|
|
65
|
+
* through, see `morphGeometryBreaksPair`) its preset.
|
|
66
|
+
*/
|
|
67
|
+
export declare function morphShapeCarryApplies(from: PptxElement, to: PptxElement): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* The carry for one half of a pair, in that half's local frame, or `undefined`
|
|
70
|
+
* when the pair is not a resizing or re-handled preset shape.
|
|
71
|
+
*/
|
|
72
|
+
export declare function buildMorphShapeCarry(from: PptxElement, to: PptxElement, half: MorphCarryHalf): MorphShapeCarry | undefined;
|
|
73
|
+
//# sourceMappingURL=morph-shape-carry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"morph-shape-carry.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-shape-carry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAkBnD,8EAA8E;AAC9E,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,IAAI,CAAC;AAE3C,qCAAqC;AACrC,MAAM,WAAW,eAAe;IAC/B,+FAA+F;IAC/F,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,sFAAsF;IACtF,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,8EAA8E;IAC9E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CAClC;AAUD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,GAAG,OAAO,CA8BlF;AAsBD;;;GAGG;AACH,wBAAgB,oBAAoB,CACnC,IAAI,EAAE,WAAW,EACjB,EAAE,EAAE,WAAW,EACf,IAAI,EAAE,cAAc,GAClB,eAAe,GAAG,SAAS,CA0G7B"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The band of each half a morphing text piece shows (see `morph-text-pieces`).
|
|
3
|
+
*
|
|
4
|
+
* A piece is a copy of the whole box clipped to the words it owns. Cut along
|
|
5
|
+
* the line boxes, the clip slices off whatever hangs past them (descenders,
|
|
6
|
+
* italic overhangs, accents) and, when lines sit tight, shows the hanging
|
|
7
|
+
* glyphs of the neighbouring line a second time. With the glyphs' ink measured
|
|
8
|
+
* (`morph-text-ink`), the edge between two lines instead steps along the gap
|
|
9
|
+
* between the ink of the line above and the ink of the line below: at the
|
|
10
|
+
* line boxes' shared edge wherever that is clear, else as close to it as the
|
|
11
|
+
* gap allows, and through the middle of the overlap where the two lines' glyph
|
|
12
|
+
* boxes genuinely overlap. The pieces of neighbouring lines share that edge,
|
|
13
|
+
* so they tile the box without a gap or a double.
|
|
14
|
+
*
|
|
15
|
+
* Words on one line part halfway between their ink (else their advances).
|
|
16
|
+
*
|
|
17
|
+
* @module render/morph-text-bands
|
|
18
|
+
*/
|
|
19
|
+
import type { MorphTextLayout, MorphTextRect } from './morph-text-lines.js';
|
|
20
|
+
/** One step of a band edge: at height `y` from `x0` to `x1`. */
|
|
21
|
+
export interface MorphTextEdgeStep {
|
|
22
|
+
x0: number;
|
|
23
|
+
x1: number;
|
|
24
|
+
y: number;
|
|
25
|
+
}
|
|
26
|
+
/** A band: its bounding rectangle, and the stepped top and bottom edges when ink was measured. */
|
|
27
|
+
export interface MorphTextBand extends MorphTextRect {
|
|
28
|
+
topEdge?: MorphTextEdgeStep[];
|
|
29
|
+
bottomEdge?: MorphTextEdgeStep[];
|
|
30
|
+
}
|
|
31
|
+
/** How far an open band edge (a line's outer end, the first or last line) reaches. */
|
|
32
|
+
export declare const OPEN_EDGE_PX = 2000;
|
|
33
|
+
/** Every edge between consecutive lines of `layout`. */
|
|
34
|
+
export declare function morphTextBoundaries(layout: MorphTextLayout): (MorphTextEdgeStep[] | undefined)[];
|
|
35
|
+
/**
|
|
36
|
+
* The band of `layout` a run of words `[first, last]` owns, open at the outer
|
|
37
|
+
* edges.
|
|
38
|
+
*
|
|
39
|
+
* @param boundaries - The layout's {@link morphTextBoundaries}.
|
|
40
|
+
*/
|
|
41
|
+
export declare function morphTextBandOf(layout: MorphTextLayout, first: number, last: number, boundaries: readonly (MorphTextEdgeStep[] | undefined)[]): MorphTextBand;
|
|
42
|
+
/** The band's outline, clockwise from its top-left corner, as `[x, y]` points. */
|
|
43
|
+
export declare function morphTextBandOutline(band: MorphTextBand): [number, number][];
|
|
44
|
+
//# sourceMappingURL=morph-text-bands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"morph-text-bands.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-text-bands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAiB,MAAM,oBAAoB,CAAC;AAExF,gEAAgE;AAChE,MAAM,WAAW,iBAAiB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;CACV;AAED,kGAAkG;AAClG,MAAM,WAAW,aAAc,SAAQ,aAAa;IACnD,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACjC;AAED,sFAAsF;AACtF,eAAO,MAAM,YAAY,OAAO,CAAC;AA4DjC,wDAAwD;AACxD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,eAAe,GAAG,CAAC,iBAAiB,EAAE,GAAG,SAAS,CAAC,EAAE,CAEhG;AAQD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC9B,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,SAAS,CAAC,iBAAiB,EAAE,GAAG,SAAS,CAAC,EAAE,GACtD,aAAa,CA6Bf;AAED,kFAAkF;AAClF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAoB5E"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a carried text's first BASELINE sits and how tall its capitals are,
|
|
3
|
+
* so two restyled halves can be laid baseline on baseline and cap on cap.
|
|
4
|
+
*
|
|
5
|
+
* PowerPoint 16 (`CreateVideo`, 720p) on a 36 pt line changing Calibri ->
|
|
6
|
+
* Arial: the "L" of "Lorem" is ONE stem whose height runs 30 -> 33 -> 33 ->
|
|
7
|
+
* 34 -> 35 px through the morph, its foot on one baseline; the two faces only
|
|
8
|
+
* double where their advances differ, along the line. Laid line top on line
|
|
9
|
+
* top at one vertical scale, ours painted two stems, 30 and 35 px tall. The
|
|
10
|
+
* same holds for the change in a box standing at 20 degrees.
|
|
11
|
+
*
|
|
12
|
+
* Two faces can also put their baselines at different depths in a line box
|
|
13
|
+
* (CSS centres each face's ascent + descent in the line height), so the
|
|
14
|
+
* anchor moves to the first baseline before anything is scaled about it.
|
|
15
|
+
*
|
|
16
|
+
* @module render/morph-text-baseline
|
|
17
|
+
*/
|
|
18
|
+
import type { TextFrame } from './morph-text-frame-read.js';
|
|
19
|
+
/**
|
|
20
|
+
* A face's ascent, descent and (when known) capital height, in px, for a canvas
|
|
21
|
+
* `font` shorthand.
|
|
22
|
+
*/
|
|
23
|
+
export type MorphFontMetrics = (font: string) => {
|
|
24
|
+
ascent: number;
|
|
25
|
+
descent: number;
|
|
26
|
+
capHeight?: number;
|
|
27
|
+
} | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* The default metrics: the font bounding box a 2D canvas reports, which CSS
|
|
30
|
+
* lays lines out with, and the height of a capital "H". Measured at
|
|
31
|
+
* {@link REFERENCE_PX} and scaled down, so whole-px rounding cannot skew a
|
|
32
|
+
* small size (two sizes of one face then compare at exactly their ratio).
|
|
33
|
+
*/
|
|
34
|
+
export declare const measureMorphFontWithCanvas: MorphFontMetrics;
|
|
35
|
+
/**
|
|
36
|
+
* How far below the frame's anchor its first baseline sits, in px, or
|
|
37
|
+
* `undefined` when it cannot be worked out (a `line-height` of `normal`, a
|
|
38
|
+
* space before a paragraph of a block not anchored at its top, no metrics).
|
|
39
|
+
* Every paragraph is taken to be one line, as the carried-text mapping needs.
|
|
40
|
+
*/
|
|
41
|
+
export declare function morphTextFirstBaseline(frame: TextFrame, metrics: MorphFontMetrics): number | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* The capital height (px) a one-line, one-face frame paints, or `undefined`
|
|
44
|
+
* when the frame has several lines or faces, or no metrics say.
|
|
45
|
+
*/
|
|
46
|
+
export declare function morphTextCapHeight(frame: TextFrame, metrics: MorphFontMetrics): number | undefined;
|
|
47
|
+
//# sourceMappingURL=morph-text-baseline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"morph-text-baseline.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-text-baseline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAkB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzE;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAC9B,IAAI,EAAE,MAAM,KACR;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAAC;AAOzE;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,EAAE,gBAqBxC,CAAC;AA4CF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,gBAAgB,GACvB,MAAM,GAAG,SAAS,CAsBpB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,gBAAgB,GACvB,MAAM,GAAG,SAAS,CAYpB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which carried-text pairs (see `morph-text-frame`) the overlay should paint as
|
|
3
|
+
* an additive cross-dissolve group.
|
|
4
|
+
*
|
|
5
|
+
* Once both halves of a restyled text are laid glyph over glyph, stacking them
|
|
6
|
+
* with ordinary source-over blending dims every glyph they share: at the middle
|
|
7
|
+
* of the dissolve the ink reaches only `1 - t + t^2` = 0.75 of full strength
|
|
8
|
+
* (see `morph-crossfade-group`). Measured on a 32 pt white line changing
|
|
9
|
+
* Calibri -> Arial: PowerPoint 16 keeps the brightest stroke at 255 for every
|
|
10
|
+
* frame, while the stacked halves dipped to 193 mid-morph. A crossfade group
|
|
11
|
+
* sums the two halves instead, which is PowerPoint's blend.
|
|
12
|
+
*
|
|
13
|
+
* PowerPoint keeps that blend when something stacked ABOVE the text crosses
|
|
14
|
+
* its path. Measured (`CreateVideo`, 720p) on a 36 pt line changing Calibri ->
|
|
15
|
+
* Arial while it slides under an opaque grey bar the slide stacks above it:
|
|
16
|
+
* the bar covers the text on every frame, and the text left uncovered keeps
|
|
17
|
+
* its brightest stroke at 255 (its 99th percentile too) through the whole
|
|
18
|
+
* dissolve, where the stacked halves dipped to 205.
|
|
19
|
+
*
|
|
20
|
+
* A group is ranked at its incoming half's layer in the overlay's one stack
|
|
21
|
+
* (`morph-overlay-stack`), where the pair's ghost was already painted, so
|
|
22
|
+
* lifting a pair only changes what covers its INCOMING half: that half leaves
|
|
23
|
+
* the live stage, under the whole overlay, for the pair's own layer. Whatever
|
|
24
|
+
* the incoming slide stacks above the pair and paints in the overlay already
|
|
25
|
+
* stays above it. What it paints only on the live stage would end up below
|
|
26
|
+
* it, so each such shape that crosses the pair's path rises into the overlay
|
|
27
|
+
* with it (and, in turn, whatever crosses that shape's path); when one cannot
|
|
28
|
+
* rise, the pair stays where it was.
|
|
29
|
+
*
|
|
30
|
+
* @module render/morph-text-blend
|
|
31
|
+
*/
|
|
32
|
+
import type { PptxElement } from 'ooxml-core/pptx';
|
|
33
|
+
import type { MorphBox } from './morph-overlay-order.js';
|
|
34
|
+
import type { MorphTextMeasure } from './morph-text-frame.js';
|
|
35
|
+
import type { MorphPair } from './morph-types.js';
|
|
36
|
+
/** What decides whether a shape crossing a lifted pair can rise with it. */
|
|
37
|
+
export interface MorphLiftContext {
|
|
38
|
+
/** The outgoing slide, flattened, in document order. */
|
|
39
|
+
outgoing: readonly PptxElement[];
|
|
40
|
+
/** The incoming slide, flattened, in document order. */
|
|
41
|
+
incoming: readonly PptxElement[];
|
|
42
|
+
/** The matched pairs. */
|
|
43
|
+
pairs: readonly MorphPair[];
|
|
44
|
+
/** Outgoing ids the overlay paints. */
|
|
45
|
+
ghostIds: ReadonlySet<string>;
|
|
46
|
+
/** Incoming ids the overlay already paints (lifted, or carried by copies). */
|
|
47
|
+
overlaid: ReadonlySet<string>;
|
|
48
|
+
/** Whether an incoming element has an animation the overlay can run instead. */
|
|
49
|
+
animated: (id: string) => boolean;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The incoming ids that have to rise into the overlay so a pair lifted over
|
|
53
|
+
* `box` keeps everything the incoming slide stacks above it on top, or
|
|
54
|
+
* `undefined` when one of them cannot.
|
|
55
|
+
*
|
|
56
|
+
* @param context - The slides, pairs and what the overlay already paints.
|
|
57
|
+
* @param box - The ground the lifted pair travels over.
|
|
58
|
+
* @param from - The pair's outgoing half.
|
|
59
|
+
* @param to - The pair's incoming half.
|
|
60
|
+
*/
|
|
61
|
+
export declare function resolveMorphLiftCrossers(context: MorphLiftContext, box: MorphBox, from: PptxElement, to: PptxElement): Set<string> | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Incoming ids of the carried-text pairs to lift into a crossfade group, plus
|
|
64
|
+
* the ids of the shapes that rise into the overlay with them.
|
|
65
|
+
*
|
|
66
|
+
* @param context - The slides, pairs and what the overlay already paints.
|
|
67
|
+
* @param dissolvingInIds - Incoming ids whose half fades in over its ghost.
|
|
68
|
+
* @param measure - Text measurement, as for `resolveMorphTextAlignment`.
|
|
69
|
+
*/
|
|
70
|
+
export declare function resolveMorphTextBlendLifts(context: MorphLiftContext, dissolvingInIds: ReadonlySet<string>, measure?: MorphTextMeasure): Set<string>;
|
|
71
|
+
//# sourceMappingURL=morph-text-blend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"morph-text-blend.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-text-blend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,4EAA4E;AAC5E,MAAM,WAAW,gBAAgB;IAChC,wDAAwD;IACxD,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;IACjC,wDAAwD;IACxD,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;IACjC,yBAAyB;IACzB,KAAK,EAAE,SAAS,SAAS,EAAE,CAAC;IAC5B,uCAAuC;IACvC,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9B,8EAA8E;IAC9E,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9B,gFAAgF;IAChF,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;CAClC;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACvC,OAAO,EAAE,gBAAgB,EACzB,GAAG,EAAE,QAAQ,EACb,IAAI,EAAE,WAAW,EACjB,EAAE,EAAE,WAAW,GACb,GAAG,CAAC,MAAM,CAAC,GAAG,SAAS,CAmDzB;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACzC,OAAO,EAAE,gBAAgB,EACzB,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,EACpC,OAAO,CAAC,EAAE,gBAAgB,GACxB,GAAG,CAAC,MAAM,CAAC,CAwBb"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The copies `morph-text-body` paints a shape's body and text with, and the
|
|
3
|
+
* keyframes each copy travels on.
|
|
4
|
+
*
|
|
5
|
+
* @module render/morph-text-body-copies
|
|
6
|
+
*/
|
|
7
|
+
import type { PptxElement } from 'ooxml-core/pptx';
|
|
8
|
+
import type { MorphTextTransform } from './morph-text-transform.js';
|
|
9
|
+
/**
|
|
10
|
+
* Whether `element` carries an effect its body and text copies could not
|
|
11
|
+
* share out. An outer shadow under an opaque fill is the body's alone (the
|
|
12
|
+
* shape casts it, and the fill hides any the text would cast); measured on a
|
|
13
|
+
* shadowed rounded rectangle whose text changes Calibri 28 pt -> Arial 40 pt,
|
|
14
|
+
* PowerPoint 16 keeps the shadow under the body on every frame and carries
|
|
15
|
+
* the text glyph over glyph with no shadow of its own. Every other effect
|
|
16
|
+
* keeps the pair whole.
|
|
17
|
+
*/
|
|
18
|
+
export declare function morphCopiesCannotSplitEffects(element: PptxElement): boolean;
|
|
19
|
+
/** `element` under `id` with its text taken out. */
|
|
20
|
+
export declare function morphBodyCopy(element: PptxElement, id: string): PptxElement;
|
|
21
|
+
/**
|
|
22
|
+
* `element` with its flips taken out and a vertical flip turned into a half
|
|
23
|
+
* turn, when its text paints the same that way, else `undefined` (see
|
|
24
|
+
* `morph-text-flip`).
|
|
25
|
+
*/
|
|
26
|
+
export declare function morphUprightText(element: PptxElement): PptxElement | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* `element` under `id` with its fill, outline and body effects taken out,
|
|
29
|
+
* painted unflipped. Pass the upright element ({@link morphUprightText}).
|
|
30
|
+
*/
|
|
31
|
+
export declare function morphTextCopy(element: PptxElement, id: string): PptxElement;
|
|
32
|
+
/**
|
|
33
|
+
* One frame of a copy's journey: the transform, then its rotation, scale,
|
|
34
|
+
* flips (stated only when the pair has any, so both frames share one
|
|
35
|
+
* function list) and, for a turning text copy, the pivot.
|
|
36
|
+
*/
|
|
37
|
+
export declare function morphCopyTransform(t: MorphTextTransform, rotation: number, flips?: Pick<PptxElement, 'flipHorizontal' | 'flipVertical'>): string;
|
|
38
|
+
/** The box interpolation's incoming start: the incoming box laid over the outgoing one. */
|
|
39
|
+
export declare function morphBoxStart(from: PptxElement, to: PptxElement): MorphTextTransform;
|
|
40
|
+
/** The box interpolation's ghost end: the outgoing box laid over the incoming one. */
|
|
41
|
+
export declare function morphBoxEnd(from: PptxElement, to: PptxElement): MorphTextTransform;
|
|
42
|
+
/** Whether two transforms place the same box within a fraction of a pixel. */
|
|
43
|
+
export declare function sameMorphTransform(a: MorphTextTransform, b: MorphTextTransform): boolean;
|
|
44
|
+
export declare function morphCopyKeyframes(name: string, from: {
|
|
45
|
+
transform: string;
|
|
46
|
+
opacity: number;
|
|
47
|
+
}, to: {
|
|
48
|
+
transform: string;
|
|
49
|
+
opacity: number;
|
|
50
|
+
}): string;
|
|
51
|
+
//# sourceMappingURL=morph-text-body-copies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"morph-text-body-copies.d.ts","sour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AE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACxC,MAAM,CAYR"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { MorphLiftContext } from './morph-text-blend.js';
|
|
2
|
+
import type { MorphTextMeasure } from './morph-text-frame.js';
|
|
3
|
+
import type { MorphTextPiecePlan } from './morph-text-piece-plan.js';
|
|
4
|
+
import type { MorphPair } from './morph-types.js';
|
|
5
|
+
/** Which part of its source element a copy paints. */
|
|
6
|
+
export type MorphCopyPart = 'body' | 'text';
|
|
7
|
+
/** The copies that carry the text of a shape apart from its body. */
|
|
8
|
+
export interface MorphTextBodyPlan extends MorphTextPiecePlan {
|
|
9
|
+
/** Copy id -> the part of its source it paints. */
|
|
10
|
+
parts: Map<string, MorphCopyPart>;
|
|
11
|
+
/** Incoming ids that rise into the overlay so the groups stay under them. */
|
|
12
|
+
rising: Set<string>;
|
|
13
|
+
}
|
|
14
|
+
/** The id a body or text copy is painted under. */
|
|
15
|
+
export declare function morphCopyId(sourceId: string, part: MorphCopyPart): string;
|
|
16
|
+
/**
|
|
17
|
+
* Split every matched shape whose text should be carried apart from its body.
|
|
18
|
+
*
|
|
19
|
+
* @param pairs - The matched pairs (object mode only).
|
|
20
|
+
* @param context - The slides and what the overlay already paints, to keep
|
|
21
|
+
* whatever the incoming slide stacks above a split pair on top of it.
|
|
22
|
+
* @param durationMs - The morph's duration.
|
|
23
|
+
* @param measure - Text measurement; defaults to a canvas.
|
|
24
|
+
*/
|
|
25
|
+
export declare function buildMorphTextBodyPlan(pairs: readonly MorphPair[], context: MorphLiftContext, durationMs: number, measure?: MorphTextMeasure): MorphTextBodyPlan;
|
|
26
|
+
/**
|
|
27
|
+
* Add `body`'s copies to the piece plan the overlay already paints copies
|
|
28
|
+
* from, so both are hidden, stacked and painted by the same code.
|
|
29
|
+
*/
|
|
30
|
+
export declare function mergeMorphTextBodyPlan(into: MorphTextPiecePlan, body: MorphTextBodyPlan): void;
|
|
31
|
+
//# sourceMappingURL=morph-text-body.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"morph-text-body.d.ts","sourceRoot":"","sources":["../../../src/pptx/render/morph-text-body.ts"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAa3D,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,oBAAoB,CAAC;AAS/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAOlE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG/C,sDAAsD;AACtD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC;AAE5C,qEAAqE;AACrE,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC5D,mDAAmD;IACnD,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAClC,6EAA6E;IAC7E,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACpB;AAED,mDAAmD;AACnD,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,MAAM,CAEzE;AA+CD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,SAAS,SAAS,EAAE,EAC3B,OAAO,EAAE,gBAAgB,EACzB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,gBAAgB,GACxB,iBAAiB,CAyHnB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAa9F"}
|