@officedk/pptxdk 0.1.0 → 0.2.1
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/dist/build.d.ts +14 -76
- package/dist/build.js +69 -97
- package/dist/cli.js +1 -1
- package/dist/core/dist/capabilities/audio/audio-declaration.js +7 -0
- package/dist/core/dist/capabilities/audio/audio-source.js +172 -0
- package/dist/core/dist/capabilities/audio/entry.js +122 -0
- package/dist/core/dist/capabilities/box/box-codegen.js +83 -0
- package/dist/core/dist/capabilities/box/box-declaration.js +32 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/box/box.js +32 -29
- package/dist/core/dist/capabilities/box/entry.js +2 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-codegen.js +17 -22
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-declaration.js +2 -2
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-import.js +1025 -471
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-labels.js +30 -3
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-model.js +3 -3
- package/dist/{capabilities/dist/chart/preview/number-format.js → core/dist/capabilities/chart/chart-number-format.js} +1 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-schemas.js +216 -212
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-xml.js +41 -36
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart.js +228 -171
- package/dist/core/dist/capabilities/chart/entry.js +2 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/axes-and-grid.js +23 -10
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/bar-column.js +1 -1
- package/dist/core/dist/capabilities/chart/preview/data-labels.js +474 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/error-bars.js +3 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/index.js +30 -9
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/layout.js +160 -89
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/legend.js +4 -4
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/line-area.js +4 -4
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/markers.js +1 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/pie-doughnut.js +39 -60
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/scales.js +1 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/scatter.js +3 -3
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/style.js +15 -3
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/text-render.js +34 -24
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/trendlines.js +5 -5
- package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/types.js +1 -1
- package/dist/core/dist/capabilities/comment/comment-codegen.js +25 -0
- package/dist/core/dist/capabilities/comment/comment-declaration.js +37 -0
- package/dist/core/dist/capabilities/comment/comment-import.js +176 -0
- package/dist/core/dist/capabilities/comment/comment.js +141 -0
- package/dist/core/dist/capabilities/comment/entry.js +1 -0
- package/dist/core/dist/capabilities/footer-placeholder/entry.js +2 -0
- package/dist/core/dist/capabilities/footer-placeholder/footer-placeholder-codegen.js +16 -0
- package/dist/{capabilities/dist/masters → core/dist/capabilities/footer-placeholder}/footer-placeholder.js +194 -133
- package/dist/core/dist/capabilities/footer-placeholder/print-header-footer-import.js +121 -0
- package/dist/core/dist/capabilities/footer-placeholder/print-header-footer.js +123 -0
- package/dist/core/dist/capabilities/group/entry.js +2 -0
- package/dist/core/dist/capabilities/group/group-codegen.js +73 -0
- package/dist/core/dist/capabilities/group/group-declaration.js +41 -0
- package/dist/core/dist/capabilities/group/group-import.js +608 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/group/group-xml.js +4 -3
- package/dist/core/dist/capabilities/group/group.js +260 -0
- package/dist/core/dist/capabilities/image/entry.js +4 -0
- package/dist/core/dist/capabilities/image/image-codegen.js +59 -0
- package/dist/core/dist/capabilities/image/image-declaration.js +8 -0
- package/dist/core/dist/capabilities/image/image-import.js +26 -0
- package/dist/core/dist/capabilities/image/image.js +57 -0
- package/dist/core/dist/capabilities/line/entry.js +3 -0
- package/dist/core/dist/capabilities/line/line-codegen.js +88 -0
- package/dist/core/dist/capabilities/line/line-declaration.js +78 -0
- package/dist/core/dist/capabilities/line/line-import.js +424 -0
- package/dist/core/dist/capabilities/line/line-xml.js +9 -0
- package/dist/core/dist/capabilities/line/line.js +329 -0
- package/dist/core/dist/capabilities/masters/entry.js +1 -0
- package/dist/core/dist/capabilities/masters/masters-codegen.js +50 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/masters/masters.js +35 -47
- package/dist/core/dist/capabilities/motion/entry.js +5 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/motion/motion-codegen.js +97 -51
- package/dist/{capabilities/dist → core/dist/capabilities}/motion/motion-import.js +653 -102
- package/dist/{capabilities/dist → core/dist/capabilities}/motion/motion-plan.js +317 -163
- package/dist/{capabilities/dist → core/dist/capabilities}/motion/motion-query.js +9 -6
- package/dist/{capabilities/dist → core/dist/capabilities}/motion/motion.js +357 -108
- package/dist/core/dist/capabilities/notes/entry.js +2 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/notes/notes-codegen.js +5 -7
- package/dist/{capabilities/dist → core/dist/capabilities}/notes/notes-declaration.js +2 -2
- package/dist/{capabilities/dist → core/dist/capabilities}/notes/notes-import.js +16 -13
- package/dist/{capabilities/dist → core/dist/capabilities}/notes/notes-schemas.js +12 -9
- package/dist/{capabilities/dist → core/dist/capabilities}/notes/notes.js +20 -42
- package/dist/{import/dist/sections.js → core/dist/capabilities/notes/sections-import.js} +5 -5
- package/dist/core/dist/capabilities/placeholder/entry.js +3 -0
- package/dist/core/dist/capabilities/placeholder/placeholder-codegen.js +44 -0
- package/dist/core/dist/capabilities/placeholder/placeholder-schemas.js +31 -0
- package/dist/core/dist/capabilities/placeholder/placeholder.js +394 -0
- package/dist/core/dist/capabilities/shape/entry.js +6 -0
- package/dist/core/dist/capabilities/shape/shape-codegen.js +112 -0
- package/dist/core/dist/capabilities/shape/shape-import.js +152 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/shape/shape-xml.js +1 -1
- package/dist/{capabilities/dist → core/dist/capabilities}/shape/shape.js +100 -103
- package/dist/core/dist/capabilities/shared/container-slots.js +59 -0
- package/dist/core/dist/capabilities/shared/date-time.js +98 -0
- package/dist/core/dist/capabilities/shared/font/font-embedding.js +118 -0
- package/dist/core/dist/capabilities/shared/font/font-engine.js +855 -0
- package/dist/core/dist/capabilities/shared/font/font-import.js +805 -0
- package/dist/{capabilities/dist → core/dist/capabilities/shared}/font/font-subset.js +24 -9
- package/dist/core/dist/capabilities/shared/font/font.js +72 -0
- package/dist/{capabilities/dist/shape/shape-codegen.js → core/dist/capabilities/shared/geometry-codegen.js} +4 -69
- package/dist/{capabilities/dist → core/dist/capabilities}/shared/geometry.js +384 -123
- package/dist/{capabilities/dist → core/dist/capabilities}/shared/identity.js +56 -38
- package/dist/core/dist/capabilities/shared/image-codegen.js +94 -0
- package/dist/{capabilities/dist/image → core/dist/capabilities/shared}/image-decode.js +17 -56
- package/dist/{capabilities/dist/image → core/dist/capabilities/shared}/image-schemas.js +49 -61
- package/dist/core/dist/capabilities/shared/line-match.js +78 -0
- package/dist/core/dist/capabilities/shared/media-codegen.js +86 -0
- package/dist/core/dist/capabilities/shared/media-import.js +156 -0
- package/dist/core/dist/capabilities/shared/media-placement.js +20 -0
- package/dist/core/dist/capabilities/shared/media-poster.js +50 -0
- package/dist/core/dist/capabilities/shared/media-schemas.js +60 -0
- package/dist/core/dist/capabilities/shared/media-source.js +107 -0
- package/dist/core/dist/capabilities/shared/media-trim.js +102 -0
- package/dist/core/dist/capabilities/shared/media.js +134 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/shared/morph-api.js +5 -5
- package/dist/core/dist/capabilities/shared/motion-api.js +770 -0
- package/dist/core/dist/capabilities/shared/motion-schemas.js +353 -0
- package/dist/{capabilities/dist/image/image-import.js → core/dist/capabilities/shared/picture-import.js} +313 -168
- package/dist/core/dist/capabilities/shared/picture-xml.js +13 -0
- package/dist/core/dist/capabilities/shared/picture.js +510 -0
- package/dist/core/dist/capabilities/shared/placeholder-import.js +268 -0
- package/dist/core/dist/capabilities/shared/placeholder-roles.js +42 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/shared/preset-definitions.js +1221 -188
- package/dist/core/dist/capabilities/shared/print-xml.js +77 -0
- package/dist/core/dist/capabilities/shared/rich-text-codegen.js +119 -0
- package/dist/core/dist/capabilities/shared/rich-text-import.js +472 -0
- package/dist/core/dist/capabilities/shared/shape-declaration.js +45 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/shared/style-inheritance.js +26 -24
- package/dist/core/dist/capabilities/shared/text-declaration.js +31 -0
- package/dist/core/dist/capabilities/shared/text-schemas.js +241 -0
- package/dist/core/dist/capabilities/shared/text-service.js +2563 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/shared/visual.js +441 -137
- package/dist/core/dist/capabilities/slide-background/entry.js +1 -0
- package/dist/core/dist/capabilities/slide-background/slide-background-codegen.js +15 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/slide-background/slide-background-import.js +12 -7
- package/dist/core/dist/capabilities/slide-background/slide-background-xml.js +33 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/slide-background/slide-background.js +61 -50
- package/dist/core/dist/capabilities/table/entry.js +2 -0
- package/dist/core/dist/capabilities/table/table-codegen.js +118 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/table/table-declaration.js +2 -2
- package/dist/{capabilities/dist → core/dist/capabilities}/table/table-import.js +116 -84
- package/dist/core/dist/capabilities/table/table-schemas.js +337 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/table/table-xml.js +13 -15
- package/dist/{capabilities/dist → core/dist/capabilities}/table/table.js +284 -192
- package/dist/core/dist/capabilities/text/entry.js +3 -0
- package/dist/core/dist/capabilities/text/text-codegen.js +66 -0
- package/dist/core/dist/capabilities/text/text-import.js +468 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/text/text-xml.js +3 -4
- package/dist/{capabilities/dist → core/dist/capabilities}/text/text.js +103 -111
- package/dist/core/dist/capabilities/transition/entry.js +3 -0
- package/dist/{capabilities/dist → core/dist/capabilities}/transition/transition-api.js +13 -16
- package/dist/{capabilities/dist → core/dist/capabilities}/transition/transition-codegen.js +2 -3
- package/dist/{capabilities/dist → core/dist/capabilities}/transition/transition-import.js +25 -27
- package/dist/{capabilities/dist → core/dist/capabilities}/transition/transition.js +23 -23
- package/dist/core/dist/capabilities/video/entry.js +77 -0
- package/dist/core/dist/capabilities/video/video-declaration.js +7 -0
- package/dist/core/dist/capabilities/video/video-source.js +42 -0
- package/dist/{codegen/dist → core/dist/codegen}/assets.js +16 -10
- package/dist/{codegen/dist → core/dist/codegen}/codegen.js +152 -140
- package/dist/{codegen/dist → core/dist/codegen}/identifiers.js +27 -1
- package/dist/{codegen/dist → core/dist/codegen}/index.js +2 -2
- package/dist/{codegen/dist → core/dist/codegen}/printer.js +23 -4
- package/dist/core/dist/document/all.js +41 -0
- package/dist/core/dist/document/default.js +10 -0
- package/dist/core/dist/document/document.js +218 -0
- package/dist/core/dist/document/index.js +62 -0
- package/dist/core/dist/document/stages.js +54 -0
- package/dist/{emit/dist → core/dist/emit}/emit.js +173 -90
- package/dist/core/dist/emit/index.js +6 -0
- package/dist/core/dist/emit/ooxml.js +241 -0
- package/dist/core/dist/import/import.js +547 -0
- package/dist/core/dist/import/index.js +19 -0
- package/dist/{import/dist → core/dist/import}/masters.js +404 -328
- package/dist/core/dist/import/media-timing.js +233 -0
- package/dist/{import/dist → core/dist/import}/notes-masters.js +48 -45
- package/dist/core/dist/index.js +47 -15
- package/dist/core/dist/{author-ids.js → kernel/author-ids.js} +9 -6
- package/dist/core/dist/{author-schemas.js → kernel/author-schemas.js} +105 -127
- package/dist/core/dist/{block-flex-layout.js → kernel/block-flex-layout.js} +225 -142
- package/dist/core/dist/kernel/build.js +4 -0
- package/dist/core/dist/kernel/capability.js +17 -0
- package/dist/core/dist/kernel/codegen.js +97 -0
- package/dist/core/dist/kernel/container-slots.js +104 -0
- package/dist/core/dist/kernel/date-time-format.js +18 -0
- package/dist/core/dist/kernel/declaration-snapshot.js +68 -0
- package/dist/core/dist/{declaration.js → kernel/declaration.js} +3 -2
- package/dist/core/dist/kernel/diagnostics.js +370 -0
- package/dist/core/dist/kernel/document-internals.js +26 -0
- package/dist/core/dist/{document.js → kernel/document.js} +23 -13
- package/dist/core/dist/kernel/drawing-units.js +14 -0
- package/dist/core/dist/kernel/font-seal.js +204 -0
- package/dist/core/dist/{geometry-schemas.js → kernel/geometry-schemas.js} +21 -18
- package/dist/core/dist/{grid-layout.js → kernel/grid-layout.js} +177 -72
- package/dist/core/dist/{host.js → kernel/host.js} +1 -1
- package/dist/core/dist/kernel/index.js +24 -0
- package/dist/core/dist/kernel/input-values.js +62 -0
- package/dist/core/dist/kernel/layout-definition.js +7 -0
- package/dist/core/dist/{layout-protocol.js → kernel/layout-protocol.js} +5 -10
- package/dist/core/dist/{layout-schemas.js → kernel/layout-schemas.js} +33 -44
- package/dist/core/dist/kernel/layout.js +339 -0
- package/dist/core/dist/kernel/masters.js +171 -0
- package/dist/core/dist/{morph.js → kernel/morph.js} +1 -1
- package/dist/core/dist/kernel/placeholders.js +289 -0
- package/dist/{import/dist → core/dist/kernel/pptx-read}/alternate-content.js +1 -1
- package/dist/{import/dist → core/dist/kernel/pptx-read}/diagnostics.js +33 -29
- package/dist/core/dist/kernel/pptx-read/drawing-list-import.js +251 -0
- package/dist/{import/dist → core/dist/kernel/pptx-read}/fonts.js +71 -12
- package/dist/core/dist/kernel/pptx-read/index.js +15 -0
- package/dist/{import/dist → core/dist/kernel/pptx-read}/mechanism.js +1 -1
- package/dist/core/dist/kernel/pptx-read/media.js +26 -0
- package/dist/{import/dist → core/dist/kernel/pptx-read}/namespaces.js +6 -7
- package/dist/{import/dist → core/dist/kernel/pptx-read}/opc.js +62 -13
- package/dist/{import/dist → core/dist/kernel/pptx-read}/resources.js +1 -1
- package/dist/core/dist/kernel/pptx-read/shape-tree.js +57 -0
- package/dist/{import/dist → core/dist/kernel/pptx-read}/themes.js +182 -41
- package/dist/{import/dist → core/dist/kernel/pptx-read}/visual.js +175 -88
- package/dist/core/dist/kernel/pptx-read/xml-fragments.js +320 -0
- package/dist/{import/dist → core/dist/kernel/pptx-read}/xml-reader.js +8 -1
- package/dist/{emit/dist → core/dist/kernel/pptx-write}/shape-tree.js +1 -1
- package/dist/core/dist/kernel/pptx-write/timing.js +52 -0
- package/dist/{emit/dist/ooxml.js → core/dist/kernel/pptx-write/xml.js} +133 -290
- package/dist/core/dist/{query.js → kernel/query.js} +76 -37
- package/dist/core/dist/{resolution.js → kernel/resolution.js} +2 -1
- package/dist/core/dist/kernel/resolve-work.js +58 -0
- package/dist/core/dist/{resolve.js → kernel/resolve.js} +797 -409
- package/dist/core/dist/kernel/resource-source.js +11 -0
- package/dist/core/dist/kernel/stage-options.js +312 -0
- package/dist/core/dist/{theme.js → kernel/theme.js} +399 -289
- package/dist/core/dist/kernel/transform-geometry.js +72 -0
- package/dist/core/dist/kernel/xml-values.js +13 -0
- package/dist/document-C0lPlH-L.d.ts +1442 -0
- package/dist/index-B9_OUeA-.d.ts +2238 -0
- package/dist/index-BJEzQxWV.d.ts +75 -0
- package/dist/index-DA9flrlR.d.ts +146 -0
- package/dist/index-GSt0t9VO.d.ts +54 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.js +75 -61
- package/dist/node.d.ts +37 -35
- package/dist/node.js +125 -51
- package/dist/pptxdk/src/cli-commands.js +79 -81
- package/dist/pptxdk/src/compose.js +32 -24
- package/dist/pptxdk/src/preview-result.js +24 -0
- package/dist/{capabilities/dist/image → preview/dist}/gif-decoder.js +5 -5
- package/dist/preview/dist/index.js +229 -77
- package/dist/preview/dist/options.js +17 -26
- package/dist/preview/dist/raster.js +66 -0
- package/dist/preview/dist/svg-guard.js +1090 -0
- package/dist/preview.d.ts +6 -3
- package/dist/preview.js +8 -24
- package/dist/react/dist/append.js +3 -3
- package/dist/react/dist/author/audio-elements.js +14 -0
- package/dist/{capabilities/dist/box → react/dist/author}/box-elements.js +5 -3
- package/dist/react/dist/author/chart-elements.js +14 -0
- package/dist/react/dist/author/comment-elements.js +15 -0
- package/dist/react/dist/author/group-elements.js +14 -0
- package/dist/react/dist/author/image-elements.js +14 -0
- package/dist/react/dist/author/line-elements.js +14 -0
- package/dist/{capabilities/dist/motion → react/dist/author}/motion-elements.js +6 -4
- package/dist/react/dist/author/notes-elements.js +14 -0
- package/dist/react/dist/author/placeholder-elements.js +14 -0
- package/dist/react/dist/author/shape-elements.js +14 -0
- package/dist/{capabilities/dist/table → react/dist/author}/table-elements.js +6 -4
- package/dist/react/dist/author/text-elements.js +64 -0
- package/dist/react/dist/author/video-elements.js +14 -0
- package/dist/react/dist/document-adapter.js +376 -37
- package/dist/react/dist/elements.js +30 -4
- package/dist/react/dist/from-vanilla.js +57 -0
- package/dist/react/dist/index.js +47 -12
- package/dist/react/dist/mount.js +34 -0
- package/dist/react/dist/reconciler.js +26 -26
- package/dist/react.d.ts +174 -50
- package/dist/react.js +31 -27
- package/dist/stages-DYHSHKt4.d.ts +80 -0
- package/dist/vanilla.d.ts +4 -4
- package/dist/vanilla.js +14 -14
- package/package.json +6 -8
- package/README.md +0 -49
- package/dist/capabilities/dist/all.js +0 -32
- package/dist/capabilities/dist/box/box-codegen.js +0 -51
- package/dist/capabilities/dist/box/box-declaration.js +0 -31
- package/dist/capabilities/dist/chart/chart-elements.js +0 -12
- package/dist/capabilities/dist/chart/preview/data-labels.js +0 -334
- package/dist/capabilities/dist/document.js +0 -148
- package/dist/capabilities/dist/font/font-embedding.js +0 -289
- package/dist/capabilities/dist/font/font-family.js +0 -10
- package/dist/capabilities/dist/font/font-import.js +0 -302
- package/dist/capabilities/dist/font/font.js +0 -25
- package/dist/capabilities/dist/group/group-codegen.js +0 -51
- package/dist/capabilities/dist/group/group-declaration.js +0 -42
- package/dist/capabilities/dist/group/group-elements.js +0 -12
- package/dist/capabilities/dist/group/group-import.js +0 -319
- package/dist/capabilities/dist/group/group.js +0 -211
- package/dist/capabilities/dist/image/image-codegen.js +0 -94
- package/dist/capabilities/dist/image/image-declaration.js +0 -8
- package/dist/capabilities/dist/image/image-elements.js +0 -12
- package/dist/capabilities/dist/image/image-xml.js +0 -12
- package/dist/capabilities/dist/image/image.js +0 -472
- package/dist/capabilities/dist/masters/masters-codegen.js +0 -21
- package/dist/capabilities/dist/motion/motion-api.js +0 -527
- package/dist/capabilities/dist/motion/motion-schemas.js +0 -216
- package/dist/capabilities/dist/notes/notes-elements.js +0 -12
- package/dist/capabilities/dist/notes/notes-xml.js +0 -38
- package/dist/capabilities/dist/placeholder/placeholder-codegen.js +0 -23
- package/dist/capabilities/dist/placeholder/placeholder-elements.js +0 -12
- package/dist/capabilities/dist/placeholder/placeholder.js +0 -292
- package/dist/capabilities/dist/shape/shape-declaration.js +0 -57
- package/dist/capabilities/dist/shape/shape-elements.js +0 -12
- package/dist/capabilities/dist/shape/shape-import.js +0 -579
- package/dist/capabilities/dist/shared/placeholder-import.js +0 -113
- package/dist/capabilities/dist/shared/style-parse.js +0 -11
- package/dist/capabilities/dist/shared/text-schemas.js +0 -216
- package/dist/capabilities/dist/shared/text-service.js +0 -1883
- package/dist/capabilities/dist/slide-background/slide-background-codegen.js +0 -44
- package/dist/capabilities/dist/slide-background/slide-background-xml.js +0 -21
- package/dist/capabilities/dist/table/table-codegen.js +0 -81
- package/dist/capabilities/dist/table/table-schemas.js +0 -279
- package/dist/capabilities/dist/text/text-codegen.js +0 -129
- package/dist/capabilities/dist/text/text-declaration.js +0 -19
- package/dist/capabilities/dist/text/text-elements.js +0 -38
- package/dist/capabilities/dist/text/text-import.js +0 -1077
- package/dist/capability-D_xeNVIw.d.ts +0 -29496
- package/dist/codegen/dist/types.js +0 -49
- package/dist/core/dist/build.js +0 -4
- package/dist/core/dist/capability.js +0 -13
- package/dist/core/dist/diagnostics.js +0 -21
- package/dist/core/dist/document-internals.js +0 -13
- package/dist/core/dist/input-values.js +0 -45
- package/dist/core/dist/layout.js +0 -299
- package/dist/core/dist/masters.js +0 -169
- package/dist/core/dist/placeholders.js +0 -213
- package/dist/core/dist/stage-options.js +0 -67
- package/dist/document-BHPUODPP.d.ts +0 -27759
- package/dist/emit/dist/index.js +0 -5
- package/dist/import/dist/import.js +0 -504
- package/dist/import/dist/index.js +0 -16
- package/dist/import/dist/xml-fragments.js +0 -36
- package/dist/index-B5m3hqjC.d.ts +0 -7
- package/dist/index-CCy-Yo8G.d.ts +0 -1208
- package/dist/index-DpxcZ4Gs.d.ts +0 -725
- package/dist/pptxdk/src/slide.js +0 -9
- package/dist/preview-Cfw0QdMM.d.ts +0 -86
- package/dist/transition-Cips9wma.d.ts +0 -82
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { CapabilityError } from "
|
|
2
|
-
import "
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import { ownerMotionSchema } from "
|
|
6
|
-
import "
|
|
7
|
-
import { defineShowMechanism } from "
|
|
8
|
-
import
|
|
1
|
+
import { CapabilityError, zodIssueField } from "../../kernel/diagnostics.js";
|
|
2
|
+
import { pxToEmu } from "../../kernel/drawing-units.js";
|
|
3
|
+
import { resolvePlaceholderBoxFromLayers } from "../../kernel/placeholders.js";
|
|
4
|
+
import { motionSlots } from "../shared/container-slots.js";
|
|
5
|
+
import { ownerMotionSchema, spinOptionsSchema } from "../shared/motion-schemas.js";
|
|
6
|
+
import { after, appear, breathe, collapse, createMotionScopeHandle, disappear, fade, fadeOut, fillColor, floatDown, floatOut, floatUp, fly, flyOut, motionScopeAnnotation, motionStepAnnotation, onStep, repeat, spin, spinIn, spinOut, stretch, wipe, wipeOut, zoom, zoomOut } from "../shared/motion-api.js";
|
|
7
|
+
import { defineShowMechanism } from "../../kernel/pptx-read/mechanism.js";
|
|
8
|
+
import "../../kernel/capability.js";
|
|
9
|
+
import "../../kernel/pptx-read/index.js";
|
|
10
|
+
import { createTimingIds } from "../../kernel/pptx-write/timing.js";
|
|
11
|
+
import { xmlEscape } from "../../kernel/pptx-write/xml.js";
|
|
9
12
|
import { motionCodegen } from "./motion-codegen.js";
|
|
10
13
|
import { readSlideMotionImport } from "./motion-import.js";
|
|
11
14
|
import { addMotionPlanStartDelay, compileMotionPlan, composeMotionPlanStarts, motionPlanStartLayers } from "./motion-plan.js";
|
|
12
|
-
import {
|
|
13
|
-
// ../
|
|
15
|
+
import { motionSchedule, registerMotionObservation } from "./motion-query.js";
|
|
16
|
+
// ../core/dist/capabilities/motion/motion.js
|
|
14
17
|
function invalidMotionTime(field) {
|
|
15
18
|
throw new CapabilityError("invalid-motion-time", `${field} must be an exact non-negative integer in milliseconds, and must not exceed ST_TLTime range when written`);
|
|
16
19
|
}
|
|
@@ -46,12 +49,6 @@ function element(name, attributes, ...children) {
|
|
|
46
49
|
return ` ${key}="${xmlEscape(String(typeof value === "boolean" ? value ? "1" : "0" : value))}"`;
|
|
47
50
|
}).join("")}>${children.filter(Boolean).join("")}</${name}>`;
|
|
48
51
|
}
|
|
49
|
-
function createTimingIds() {
|
|
50
|
-
let next = 1;
|
|
51
|
-
return { take() {
|
|
52
|
-
return next++;
|
|
53
|
-
} };
|
|
54
|
-
}
|
|
55
52
|
function timingTarget(effect, range = effect.target.range, background = false) {
|
|
56
53
|
return element("p:tgtEl", void 0, element("p:spTgt", { spid: effect.target.id }, background ? element("p:bg", void 0) : void 0, range?.type === "paragraph" ? element("p:txEl", void 0, element("p:pRg", {
|
|
57
54
|
st: range.start,
|
|
@@ -62,38 +59,42 @@ function timingTarget(effect, range = effect.target.range, background = false) {
|
|
|
62
59
|
bldStep: range.step
|
|
63
60
|
})) : void 0));
|
|
64
61
|
}
|
|
62
|
+
const nativeChartBuildBy = {
|
|
63
|
+
series: "series",
|
|
64
|
+
category: "category",
|
|
65
|
+
seriesElements: "seriesEl",
|
|
66
|
+
categoryElements: "categoryEl",
|
|
67
|
+
paragraph: void 0,
|
|
68
|
+
word: void 0,
|
|
69
|
+
letter: void 0
|
|
70
|
+
};
|
|
65
71
|
function nativeChartBuild(by) {
|
|
66
|
-
|
|
67
|
-
case "series": return "series";
|
|
68
|
-
case "category": return "category";
|
|
69
|
-
case "seriesElements": return "seriesEl";
|
|
70
|
-
case "categoryElements": return "categoryEl";
|
|
71
|
-
default: return;
|
|
72
|
-
}
|
|
72
|
+
return typeof by === "string" ? nativeChartBuildBy[by] : void 0;
|
|
73
73
|
}
|
|
74
74
|
function attributeNames(value) {
|
|
75
75
|
return element("p:attrNameLst", void 0, element("p:attrName", void 0, value));
|
|
76
76
|
}
|
|
77
|
-
function visibilitySet(targetElement, visibility, ids) {
|
|
77
|
+
function visibilitySet(targetElement, visibility, ids, delay = 0) {
|
|
78
78
|
return element("p:set", void 0, element("p:cBhvr", void 0, element("p:cTn", {
|
|
79
79
|
id: ids.take(),
|
|
80
80
|
dur: 1,
|
|
81
81
|
fill: "hold"
|
|
82
|
-
}, element("p:stCondLst", void 0, element("p:cond", { delay
|
|
82
|
+
}, element("p:stCondLst", void 0, element("p:cond", { delay }))), targetElement, attributeNames("style.visibility")), element("p:to", void 0, element("p:strVal", { val: visibility })));
|
|
83
83
|
}
|
|
84
84
|
function direction(effect) {
|
|
85
85
|
return typeof effect.from === "string" ? effect.from : "bottom";
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
|
-
* Shape.text is native text inside the shape object, not a standalone text box. A whole entrance
|
|
89
|
-
* such a shape must keep its fill and text in one object target so applications cannot
|
|
90
|
-
* background
|
|
88
|
+
* Shape.text is native text inside the shape object, not a standalone text box. A whole entrance
|
|
89
|
+
* or exit on such a shape must keep its fill and text in one object target so applications cannot
|
|
90
|
+
* reveal or hide the background independently from the text. Standalone Text and explicit
|
|
91
|
+
* granularity keep their text projection.
|
|
91
92
|
*/
|
|
92
|
-
function
|
|
93
|
-
return effect.kind === "entrance" && effect.targetKind === "shape" && effect.targetTextBody && effect.targetHasBackground && effect.target.range === void 0 && effect.by !== "paragraph" && effect.by !== "word" && effect.by !== "letter";
|
|
93
|
+
function isWholeShapeTextLifecycle(effect) {
|
|
94
|
+
return (effect.kind === "entrance" || effect.kind === "exit") && effect.targetKind === "shape" && effect.targetTextBody && effect.targetHasBackground && effect.target.range === void 0 && effect.by !== "paragraph" && effect.by !== "word" && effect.by !== "letter";
|
|
94
95
|
}
|
|
95
96
|
function wholeTextRanges(effect) {
|
|
96
|
-
if (
|
|
97
|
+
if (isWholeShapeTextLifecycle(effect)) return [];
|
|
97
98
|
if (!effect.targetTextBody || effect.target.range !== void 0 || effect.preset === "breathe" || effect.preset === "fillColor" || effect.by === "word" || effect.by === "letter" || effect.targetParagraphCount === void 0 || effect.targetParagraphCount < 1) return [];
|
|
98
99
|
return Array.from({ length: effect.targetParagraphCount }, (_, index) => ({
|
|
99
100
|
type: "paragraph",
|
|
@@ -137,7 +138,9 @@ function targetBox(effect, purpose) {
|
|
|
137
138
|
}
|
|
138
139
|
function rotationFormula(effect) {
|
|
139
140
|
const relativeBy = typeof effect.by === "number";
|
|
140
|
-
const
|
|
141
|
+
const fromDegrees = typeof effect.from === "number" ? effect.from : typeof effect.to === "number" ? 0 : 360;
|
|
142
|
+
const toDegrees = typeof effect.to === "number" ? effect.to : 0;
|
|
143
|
+
const degrees = relativeBy ? effect.by : fromDegrees - toDegrees;
|
|
141
144
|
return {
|
|
142
145
|
angle: `(${formulaNumber(degrees)}*pi/180)*${relativeBy ? "$" : "(1-$)"}`,
|
|
143
146
|
degrees
|
|
@@ -191,9 +194,11 @@ function behaviorIds(effect, ids, dimensions, mixedShapeText) {
|
|
|
191
194
|
else timeNodeValue(duration, "animation behavior duration");
|
|
192
195
|
if (effect.repeatCount !== void 0 && effect.repeatCount !== "forever") timeNodeValue(effect.repeatCount * 1e3, "animation repeat count");
|
|
193
196
|
if (effect.intervalMs !== void 0) timeNodeValue(effect.intervalMs, "animation iteration interval");
|
|
194
|
-
const show = (targetElement) => visibilitySet(targetElement, "visible", ids);
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
+
const show = (targetElement) => visibilitySet(targetElement, "visible", ids, 0);
|
|
198
|
+
const hideDelay = effect.preset === "disappear" ? 0 : Math.max(0, duration - 1);
|
|
199
|
+
const hide = (targetElement) => visibilitySet(targetElement, "hidden", ids, hideDelay);
|
|
200
|
+
const filter = (name, targetElement, transition = "in") => element("p:animEffect", {
|
|
201
|
+
transition,
|
|
197
202
|
filter: name
|
|
198
203
|
}, element("p:cBhvr", void 0, element("p:cTn", {
|
|
199
204
|
id: ids.take(),
|
|
@@ -213,19 +218,20 @@ function behaviorIds(effect, ids, dimensions, mixedShapeText) {
|
|
|
213
218
|
}, element("p:val", void 0, value(from))), element("p:tav", { tm: 1e5 }, element("p:val", void 0, value(to)))));
|
|
214
219
|
const singleMotion = (name, from, to, additive, targetElement = target()) => motion(name, from, to, additive, targetElement);
|
|
215
220
|
const progressMotion = (name, formula, targetElement = target(), additive = "sum") => motion(name, 0, 1, additive, targetElement, formula);
|
|
216
|
-
const rotation = (targetElement, additive = false) => element("p:animRot", typeof effect.by === "number" ? { by: Math.round(effect.by * 6e4) } : {
|
|
217
|
-
from: Math.round((typeof effect.from === "number" ? effect.from : 360) * 6e4),
|
|
218
|
-
to: 0
|
|
221
|
+
const rotation = (targetElement, additive = false, fromOverride, toOverride) => element("p:animRot", fromOverride === void 0 && typeof effect.by === "number" ? { by: Math.round(effect.by * 6e4) } : {
|
|
222
|
+
from: Math.round((fromOverride ?? (typeof effect.from === "number" ? effect.from : typeof effect.to === "number" ? 0 : 360)) * 6e4),
|
|
223
|
+
to: Math.round((toOverride ?? (typeof effect.to === "number" ? effect.to : 0)) * 6e4)
|
|
219
224
|
}, element("p:cBhvr", { additive: additive === false ? void 0 : additive === true ? "base" : additive }, element("p:cTn", {
|
|
220
225
|
id: ids.take(),
|
|
221
226
|
dur: duration,
|
|
222
227
|
fill: "hold"
|
|
223
228
|
}), targetElement, attributeNames("r")));
|
|
224
229
|
const showOnce = () => wholeText && effect.kind === "entrance" ? [...paragraphTargets(), ...backgroundTargets()].map((targetElement) => show(targetElement)).join("") : show(wholeText ? timingTarget(effect, void 0) : target());
|
|
230
|
+
const hideOnce = () => wholeText && effect.kind === "exit" ? [...paragraphTargets(), ...backgroundTargets()].map((targetElement) => hide(targetElement)).join("") : hide(wholeText ? timingTarget(effect, void 0) : target());
|
|
225
231
|
const filterTargets = () => wholeText ? paragraphTargets() : [target()];
|
|
226
232
|
const positionTargets = () => wholeText ? paragraphTargets() : [target()];
|
|
227
233
|
const backgroundTargets = () => wholeText && effect.targetHasBackground ? [backgroundTarget()] : [];
|
|
228
|
-
const mixedShapeRanges =
|
|
234
|
+
const mixedShapeRanges = effect.kind === "entrance" && isWholeShapeTextLifecycle(effect) && mixedShapeText ? Array.from({ length: effect.targetParagraphCount ?? 0 }, (_, index) => ({
|
|
229
235
|
type: "paragraph",
|
|
230
236
|
start: index,
|
|
231
237
|
end: index
|
|
@@ -268,16 +274,40 @@ function behaviorIds(effect, ids, dimensions, mixedShapeText) {
|
|
|
268
274
|
const fromY = effect.preset === "floatDown" ? -.1 : .1;
|
|
269
275
|
return [singleMotion("ppt_x", 0, 0, "sum", targetElement), singleMotion("ppt_y", fromY, 0, "sum", targetElement)];
|
|
270
276
|
}
|
|
271
|
-
|
|
277
|
+
case "appear":
|
|
278
|
+
case "fade":
|
|
279
|
+
case "wipe":
|
|
280
|
+
case "spin":
|
|
281
|
+
case "breathe":
|
|
282
|
+
case "fillColor":
|
|
283
|
+
case "disappear":
|
|
284
|
+
case "fadeOut":
|
|
285
|
+
case "wipeOut":
|
|
286
|
+
case "flyOut":
|
|
287
|
+
case "zoomOut":
|
|
288
|
+
case "floatOut":
|
|
289
|
+
case "spinOut":
|
|
290
|
+
case "collapse": return [];
|
|
291
|
+
default: {
|
|
292
|
+
const exhaustive = effect.preset;
|
|
293
|
+
throw new Error(`Unsupported mixed-shape effect: ${String(exhaustive)}`);
|
|
294
|
+
}
|
|
272
295
|
}
|
|
273
296
|
};
|
|
274
297
|
const primaryBehaviors = () => {
|
|
275
298
|
switch (effect.preset) {
|
|
299
|
+
case "appear": return [showOnce()];
|
|
300
|
+
case "disappear": return [hideOnce()];
|
|
276
301
|
case "fade": return [
|
|
277
302
|
showOnce(),
|
|
278
303
|
...filterTargets().map((targetElement) => filter("fade", targetElement)),
|
|
279
304
|
...backgroundTargets().map((targetElement) => filter("fade", targetElement))
|
|
280
305
|
];
|
|
306
|
+
case "fadeOut": return [
|
|
307
|
+
...filterTargets().map((targetElement) => filter("fade", targetElement, "out")),
|
|
308
|
+
...backgroundTargets().map((targetElement) => filter("fade", targetElement, "out")),
|
|
309
|
+
hideOnce()
|
|
310
|
+
];
|
|
281
311
|
case "wipe": {
|
|
282
312
|
const filters = {
|
|
283
313
|
top: "wipe(up)",
|
|
@@ -291,6 +321,19 @@ function behaviorIds(effect, ids, dimensions, mixedShapeText) {
|
|
|
291
321
|
...backgroundTargets().map((targetElement) => filter(filters[direction(effect)], targetElement))
|
|
292
322
|
];
|
|
293
323
|
}
|
|
324
|
+
case "wipeOut": {
|
|
325
|
+
const filters = {
|
|
326
|
+
top: "wipe(up)",
|
|
327
|
+
right: "wipe(right)",
|
|
328
|
+
bottom: "wipe(down)",
|
|
329
|
+
left: "wipe(left)"
|
|
330
|
+
};
|
|
331
|
+
return [
|
|
332
|
+
...filterTargets().map((targetElement) => filter(filters[direction(effect)], targetElement, "out")),
|
|
333
|
+
...backgroundTargets().map((targetElement) => filter(filters[direction(effect)], targetElement, "out")),
|
|
334
|
+
hideOnce()
|
|
335
|
+
];
|
|
336
|
+
}
|
|
294
337
|
case "zoom": {
|
|
295
338
|
const targets = positionTargets();
|
|
296
339
|
if (!wholeText) return [
|
|
@@ -399,6 +442,102 @@ function behaviorIds(effect, ids, dimensions, mixedShapeText) {
|
|
|
399
442
|
...targets.flatMap((targetElement) => [singleMotion("ppt_x", 0, 0, "sum", targetElement), singleMotion("ppt_y", fromY, 0, "sum", targetElement)])
|
|
400
443
|
];
|
|
401
444
|
}
|
|
445
|
+
case "zoomOut": {
|
|
446
|
+
const targets = positionTargets();
|
|
447
|
+
if (!wholeText) return [
|
|
448
|
+
singleMotion("ppt_w", "#ppt_w", 0, false),
|
|
449
|
+
singleMotion("ppt_h", "#ppt_h", 0, false),
|
|
450
|
+
filter("fade", target(), "out"),
|
|
451
|
+
hideOnce()
|
|
452
|
+
];
|
|
453
|
+
const center = geometryCenter(targetBox(effect, "whole-text zoom-out"), dimensions);
|
|
454
|
+
return [
|
|
455
|
+
...[...targets, ...backgroundTargets()].flatMap((targetElement) => [
|
|
456
|
+
singleMotion("ppt_x", 0, `${formulaNumber(center.x)}-#ppt_x`, "sum", targetElement),
|
|
457
|
+
singleMotion("ppt_y", 0, `${formulaNumber(center.y)}-#ppt_y`, "sum", targetElement),
|
|
458
|
+
singleMotion("ppt_w", "#ppt_w", 0, false, targetElement),
|
|
459
|
+
singleMotion("ppt_h", "#ppt_h", 0, false, targetElement)
|
|
460
|
+
]),
|
|
461
|
+
...filterTargets().map((targetElement) => filter("fade", targetElement, "out")),
|
|
462
|
+
...backgroundTargets().map((targetElement) => filter("fade", targetElement, "out")),
|
|
463
|
+
hideOnce()
|
|
464
|
+
];
|
|
465
|
+
}
|
|
466
|
+
case "flyOut": {
|
|
467
|
+
const flyTo = {
|
|
468
|
+
left: ["0-#ppt_w/2", "#ppt_y"],
|
|
469
|
+
right: ["1+#ppt_w/2", "#ppt_y"],
|
|
470
|
+
top: ["#ppt_x", "0-#ppt_h/2"],
|
|
471
|
+
bottom: ["#ppt_x", "1+#ppt_h/2"]
|
|
472
|
+
};
|
|
473
|
+
if (!wholeText) {
|
|
474
|
+
const [x, y] = flyTo[direction(effect)];
|
|
475
|
+
return [
|
|
476
|
+
singleMotion("ppt_x", "#ppt_x", x, true),
|
|
477
|
+
singleMotion("ppt_y", "#ppt_y", y, true),
|
|
478
|
+
hideOnce()
|
|
479
|
+
];
|
|
480
|
+
}
|
|
481
|
+
const offset = flyOffset(effect, dimensions);
|
|
482
|
+
return [...[...positionTargets(), ...backgroundTargets()].flatMap((targetElement) => [singleMotion("ppt_x", "#ppt_x", formulaOffset("#ppt_x", offset.x), true, targetElement), singleMotion("ppt_y", "#ppt_y", formulaOffset("#ppt_y", offset.y), true, targetElement)]), hideOnce()];
|
|
483
|
+
}
|
|
484
|
+
case "spinOut": {
|
|
485
|
+
if (!wholeText) return [
|
|
486
|
+
singleMotion("ppt_w", "#ppt_w", 0, false),
|
|
487
|
+
singleMotion("ppt_h", "#ppt_h", 0, false),
|
|
488
|
+
singleMotion("style.rotation", 0, 360, false),
|
|
489
|
+
filter("fade", target(), "out"),
|
|
490
|
+
hideOnce()
|
|
491
|
+
];
|
|
492
|
+
const center = serializedGeometryCenter(targetBox(effect, "whole-text spin-out"), dimensions);
|
|
493
|
+
return [
|
|
494
|
+
...positionTargets().flatMap((targetElement) => [
|
|
495
|
+
singleMotion("ppt_w", "#ppt_w", 0, false, targetElement),
|
|
496
|
+
singleMotion("ppt_h", "#ppt_h", 0, false, targetElement),
|
|
497
|
+
singleMotion("style.rotation", 0, 360, false, targetElement),
|
|
498
|
+
singleMotion("ppt_x", 0, `${formulaNumber(center.x)}-#ppt_x`, "sum", targetElement),
|
|
499
|
+
singleMotion("ppt_y", 0, `${formulaNumber(center.y)}-#ppt_y`, "sum", targetElement)
|
|
500
|
+
]),
|
|
501
|
+
...backgroundTargets().flatMap((targetElement) => [
|
|
502
|
+
singleMotion("ppt_x", 0, `${formulaNumber(center.x)}-#ppt_x`, "sum", targetElement),
|
|
503
|
+
singleMotion("ppt_y", 0, `${formulaNumber(center.y)}-#ppt_y`, "sum", targetElement),
|
|
504
|
+
singleMotion("ppt_w", "#ppt_w", 0, false, targetElement),
|
|
505
|
+
singleMotion("ppt_h", "#ppt_h", 0, false, targetElement),
|
|
506
|
+
rotation(targetElement, "sum", 0, 360),
|
|
507
|
+
filter("fade", targetElement, "out")
|
|
508
|
+
]),
|
|
509
|
+
...filterTargets().map((targetElement) => filter("fade", targetElement, "out")),
|
|
510
|
+
hideOnce()
|
|
511
|
+
];
|
|
512
|
+
}
|
|
513
|
+
case "collapse": {
|
|
514
|
+
if (!wholeText) return [
|
|
515
|
+
singleMotion("ppt_w", "#ppt_w", 0, false),
|
|
516
|
+
singleMotion("ppt_h", "#ppt_h", "#ppt_h", false),
|
|
517
|
+
hideOnce()
|
|
518
|
+
];
|
|
519
|
+
const center = geometryCenter(targetBox(effect, "whole-text collapse"), dimensions);
|
|
520
|
+
return [...[...positionTargets(), ...backgroundTargets()].flatMap((targetElement) => [
|
|
521
|
+
singleMotion("ppt_x", 0, `${formulaNumber(center.x)}-#ppt_x`, "sum", targetElement),
|
|
522
|
+
singleMotion("ppt_w", "#ppt_w", 0, false, targetElement),
|
|
523
|
+
singleMotion("ppt_h", "#ppt_h", "#ppt_h", false, targetElement)
|
|
524
|
+
]), hideOnce()];
|
|
525
|
+
}
|
|
526
|
+
case "floatOut": {
|
|
527
|
+
if (!wholeText) return [
|
|
528
|
+
filter("fade", target(), "out"),
|
|
529
|
+
singleMotion("ppt_x", "#ppt_x", "#ppt_x", false),
|
|
530
|
+
singleMotion("ppt_y", "#ppt_y", "#ppt_y+.1", false),
|
|
531
|
+
hideOnce()
|
|
532
|
+
];
|
|
533
|
+
const targets = [...positionTargets(), ...backgroundTargets()];
|
|
534
|
+
return [
|
|
535
|
+
...filterTargets().map((targetElement) => filter("fade", targetElement, "out")),
|
|
536
|
+
...backgroundTargets().map((targetElement) => filter("fade", targetElement, "out")),
|
|
537
|
+
...targets.flatMap((targetElement) => [singleMotion("ppt_x", 0, 0, "sum", targetElement), singleMotion("ppt_y", 0, .1, "sum", targetElement)]),
|
|
538
|
+
hideOnce()
|
|
539
|
+
];
|
|
540
|
+
}
|
|
402
541
|
case "spin": {
|
|
403
542
|
if (!wholeText && effect.groupSpinCenter === void 0) return [rotation(target(), typeof effect.by === "number" ? "sum" : false)];
|
|
404
543
|
const position = centerRotationDelta(effect, effect.groupSpinCenter ?? serializedGeometryCenter(targetBox(effect, "whole-text spin"), dimensions), dimensions);
|
|
@@ -440,6 +579,10 @@ function behaviorIds(effect, ids, dimensions, mixedShapeText) {
|
|
|
440
579
|
function effectTreeXml(effect, nodeType, startCondition, effectId, buildGroupId, behaviors) {
|
|
441
580
|
if (effect.startAfter !== void 0) validateKnownTime(effect.startAfter.offsetMs, "completion dependency offset");
|
|
442
581
|
const preset = {
|
|
582
|
+
appear: {
|
|
583
|
+
id: 1,
|
|
584
|
+
class: "entr"
|
|
585
|
+
},
|
|
443
586
|
fade: {
|
|
444
587
|
id: 10,
|
|
445
588
|
class: "entr"
|
|
@@ -483,9 +626,41 @@ function effectTreeXml(effect, nodeType, startCondition, effectId, buildGroupId,
|
|
|
483
626
|
fillColor: {
|
|
484
627
|
id: 9,
|
|
485
628
|
class: "emph"
|
|
629
|
+
},
|
|
630
|
+
disappear: {
|
|
631
|
+
id: 1,
|
|
632
|
+
class: "exit"
|
|
633
|
+
},
|
|
634
|
+
fadeOut: {
|
|
635
|
+
id: 10,
|
|
636
|
+
class: "exit"
|
|
637
|
+
},
|
|
638
|
+
wipeOut: {
|
|
639
|
+
id: 22,
|
|
640
|
+
class: "exit"
|
|
641
|
+
},
|
|
642
|
+
zoomOut: {
|
|
643
|
+
id: 53,
|
|
644
|
+
class: "exit"
|
|
645
|
+
},
|
|
646
|
+
flyOut: {
|
|
647
|
+
id: 2,
|
|
648
|
+
class: "exit"
|
|
649
|
+
},
|
|
650
|
+
floatOut: {
|
|
651
|
+
id: 42,
|
|
652
|
+
class: "exit"
|
|
653
|
+
},
|
|
654
|
+
spinOut: {
|
|
655
|
+
id: 49,
|
|
656
|
+
class: "exit"
|
|
657
|
+
},
|
|
658
|
+
collapse: {
|
|
659
|
+
id: 17,
|
|
660
|
+
class: "exit"
|
|
486
661
|
}
|
|
487
662
|
}[effect.preset];
|
|
488
|
-
const subtype = effect.preset === "zoom" ? 16 : effect.preset === "stretch" ? 10 : effect.preset === "wipe" || effect.preset === "fly" ? {
|
|
663
|
+
const subtype = effect.preset === "zoom" || effect.preset === "zoomOut" ? 16 : effect.preset === "stretch" || effect.preset === "collapse" ? 10 : effect.preset === "wipe" || effect.preset === "wipeOut" || effect.preset === "fly" || effect.preset === "flyOut" ? {
|
|
489
664
|
top: 1,
|
|
490
665
|
right: 2,
|
|
491
666
|
bottom: 4,
|
|
@@ -521,6 +696,7 @@ const motionFadeMechanism = defineShowMechanism({
|
|
|
521
696
|
import: {
|
|
522
697
|
target: "slide",
|
|
523
698
|
slot: "timing",
|
|
699
|
+
readsGraphicMotion: true,
|
|
524
700
|
read: readSlideMotionImport
|
|
525
701
|
}
|
|
526
702
|
});
|
|
@@ -632,30 +808,39 @@ const motionFillColorMechanism = defineShowMechanism({
|
|
|
632
808
|
read: readSlideMotionImport
|
|
633
809
|
}
|
|
634
810
|
});
|
|
635
|
-
/** Native show mechanism for
|
|
811
|
+
/** Native show mechanism for `<p:par>` instant appear entrance (`presetID="1"`). */
|
|
812
|
+
const motionAppearMechanism = defineShowMechanism({
|
|
813
|
+
key: "motion-appear",
|
|
814
|
+
role: "show",
|
|
815
|
+
emit: (model, _context) => emitMotionEffectTree(model),
|
|
816
|
+
import: {
|
|
817
|
+
target: "slide",
|
|
818
|
+
slot: "timing",
|
|
819
|
+
matches: () => false,
|
|
820
|
+
read: readSlideMotionImport
|
|
821
|
+
}
|
|
822
|
+
});
|
|
823
|
+
/** Native show mechanism for `<p:par>` exit effects (`presetClass="exit"`). */
|
|
824
|
+
const motionExitMechanism = defineShowMechanism({
|
|
825
|
+
key: "motion-exit",
|
|
826
|
+
role: "show",
|
|
827
|
+
emit: (model, _context) => emitMotionEffectTree(model),
|
|
828
|
+
import: {
|
|
829
|
+
target: "slide",
|
|
830
|
+
slot: "timing",
|
|
831
|
+
matches: () => false,
|
|
832
|
+
read: readSlideMotionImport
|
|
833
|
+
}
|
|
834
|
+
});
|
|
835
|
+
/** Native main sequence and build-list contribution to the slide timing tree. */
|
|
636
836
|
const motionChoreographyMechanism = defineShowMechanism({
|
|
637
837
|
key: "motion-choreography",
|
|
638
838
|
role: "show",
|
|
639
839
|
emit(model, _context) {
|
|
640
|
-
return {
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
nodeType: "tmRoot"
|
|
645
|
-
}, element("p:childTnLst", void 0, element("p:seq", {
|
|
646
|
-
concurrent: true,
|
|
647
|
-
nextAc: "seek"
|
|
648
|
-
}, element("p:cTn", {
|
|
649
|
-
id: model.sequenceId,
|
|
650
|
-
dur: "indefinite",
|
|
651
|
-
nodeType: "mainSeq"
|
|
652
|
-
}, element("p:childTnLst", void 0, ...model.stepGroups)), element("p:prevCondLst", void 0, element("p:cond", {
|
|
653
|
-
evt: "onPrev",
|
|
654
|
-
delay: 0
|
|
655
|
-
}, model.slideTarget)), element("p:nextCondLst", void 0, element("p:cond", {
|
|
656
|
-
evt: "onNext",
|
|
657
|
-
delay: 0
|
|
658
|
-
}, model.slideTarget))))))), model.buildList.length === 0 ? void 0 : element("p:bldLst", void 0, ...model.buildList)) };
|
|
840
|
+
return {
|
|
841
|
+
mainSequenceSteps: model.stepGroups,
|
|
842
|
+
buildList: model.buildList
|
|
843
|
+
};
|
|
659
844
|
},
|
|
660
845
|
import: {
|
|
661
846
|
target: "slide",
|
|
@@ -665,6 +850,7 @@ const motionChoreographyMechanism = defineShowMechanism({
|
|
|
665
850
|
}
|
|
666
851
|
});
|
|
667
852
|
const effectMechanismByPreset = {
|
|
853
|
+
appear: motionAppearMechanism,
|
|
668
854
|
fade: motionFadeMechanism,
|
|
669
855
|
wipe: motionWipeMechanism,
|
|
670
856
|
zoom: motionZoomMechanism,
|
|
@@ -675,7 +861,15 @@ const effectMechanismByPreset = {
|
|
|
675
861
|
stretch: motionStretchMechanism,
|
|
676
862
|
spin: motionSpinMechanism,
|
|
677
863
|
breathe: motionBreatheMechanism,
|
|
678
|
-
fillColor: motionFillColorMechanism
|
|
864
|
+
fillColor: motionFillColorMechanism,
|
|
865
|
+
disappear: motionExitMechanism,
|
|
866
|
+
fadeOut: motionExitMechanism,
|
|
867
|
+
wipeOut: motionExitMechanism,
|
|
868
|
+
zoomOut: motionExitMechanism,
|
|
869
|
+
flyOut: motionExitMechanism,
|
|
870
|
+
floatOut: motionExitMechanism,
|
|
871
|
+
spinOut: motionExitMechanism,
|
|
872
|
+
collapse: motionExitMechanism
|
|
679
873
|
};
|
|
680
874
|
function effectTree(effect, nodeType, startCondition, ids, effectId, buildGroupId, dimensions, mixedShapeText) {
|
|
681
875
|
const output = effectMechanismByPreset[effect.preset].emit({
|
|
@@ -704,7 +898,10 @@ function addNativeStartDelay(start, delayMs) {
|
|
|
704
898
|
}
|
|
705
899
|
function dependencyTimingId(dependency, stepKey, effectNodeIds, scopeNodeIds, targetGroupIds) {
|
|
706
900
|
if ("scopeId" in dependency) return scopeNodeIds.get(`${stepKey}:${dependency.point}:${dependency.scopeId}`);
|
|
707
|
-
if ("group" in dependency)
|
|
901
|
+
if ("group" in dependency) {
|
|
902
|
+
const targetKey = dependency.targetKey;
|
|
903
|
+
return typeof targetKey === "string" ? targetGroupIds.get(`${stepKey}:${targetKey}`) ?? targetGroupIds.get(`${stepKey}:byId:${dependency.targetId}`) : targetGroupIds.get(`${stepKey}:byId:${dependency.targetId}`);
|
|
904
|
+
}
|
|
708
905
|
return effectNodeIds.get(`${dependency.targetId}:${dependency.effectIndex}:${dependency.partIndex ?? ""}`);
|
|
709
906
|
}
|
|
710
907
|
function nativeStartCondition(start, stepKey, effectNodeIds, scopeNodeIds, targetGroupIds, conditionNodeIds) {
|
|
@@ -791,10 +988,8 @@ function mainSequenceWithGroup(id, children) {
|
|
|
791
988
|
fill: "hold"
|
|
792
989
|
}, element("p:stCondLst", void 0, element("p:cond", { delay: 0 })), element("p:childTnLst", void 0, ...children)));
|
|
793
990
|
}
|
|
794
|
-
function
|
|
795
|
-
const
|
|
796
|
-
const rootId = ids.take();
|
|
797
|
-
const sequenceId = ids.take();
|
|
991
|
+
function writeMotionTiming(steps, dimensions, ids) {
|
|
992
|
+
const sequenceId = ids.mainSequenceId;
|
|
798
993
|
const effectNodeIds = /* @__PURE__ */ new Map();
|
|
799
994
|
const scopeNodeIds = /* @__PURE__ */ new Map();
|
|
800
995
|
const targetGroupIds = /* @__PURE__ */ new Map();
|
|
@@ -807,7 +1002,10 @@ function timingXml(steps, dimensions) {
|
|
|
807
1002
|
const key = `${stepKey}:${dependency.point}:${dependency.scopeId}`;
|
|
808
1003
|
if (dependency.point === "start") referencedScopeStartNodes.add(key);
|
|
809
1004
|
else referencedScopeNodes.add(key);
|
|
810
|
-
} else if ("group" in dependency)
|
|
1005
|
+
} else if ("group" in dependency) {
|
|
1006
|
+
const targetKey = dependency.targetKey;
|
|
1007
|
+
referencedTargetGroups.add(typeof targetKey === "string" ? `${stepKey}:${targetKey}` : `${stepKey}:${dependency.targetId}`);
|
|
1008
|
+
}
|
|
811
1009
|
};
|
|
812
1010
|
const collectStartReferences = (start, stepKey) => {
|
|
813
1011
|
if (start.kind === "delay-layer") collectStartReferences(start.start, stepKey);
|
|
@@ -852,8 +1050,18 @@ function timingXml(steps, dimensions) {
|
|
|
852
1050
|
scopeNodeIds.set(`${stepKey}:end:${node.scopeId}`, ids.take());
|
|
853
1051
|
continue;
|
|
854
1052
|
}
|
|
855
|
-
if (node.effects.length > 1)
|
|
856
|
-
|
|
1053
|
+
if (node.effects.length > 1) {
|
|
1054
|
+
const groupTimingId = ids.take();
|
|
1055
|
+
targetGroupIds.set(`${stepKey}:${node.targetKey}`, groupTimingId);
|
|
1056
|
+
if (!targetGroupIds.has(`${stepKey}:byId:${node.targetId}`)) targetGroupIds.set(`${stepKey}:byId:${node.targetId}`, groupTimingId);
|
|
1057
|
+
}
|
|
1058
|
+
for (const effect of node.effects) {
|
|
1059
|
+
if (effect.groupNativeStart !== void 0) {
|
|
1060
|
+
const { base: groupStartBase } = motionPlanStartLayers(effect.groupNativeStart);
|
|
1061
|
+
if (groupStartBase.kind === "condition-join" && !conditionNodeIds.has(`${stepKey}:${groupStartBase.id}`)) conditionNodeIds.set(`${stepKey}:${groupStartBase.id}`, ids.take());
|
|
1062
|
+
}
|
|
1063
|
+
effectNodeIds.set(effectKey(effect), ids.take());
|
|
1064
|
+
}
|
|
857
1065
|
}
|
|
858
1066
|
};
|
|
859
1067
|
for (const step of steps) {
|
|
@@ -1001,7 +1209,7 @@ function timingXml(steps, dimensions) {
|
|
|
1001
1209
|
const deferredCompanions = [];
|
|
1002
1210
|
let pendingRootNodeType = firstRootNodeType;
|
|
1003
1211
|
for (const [index, node] of nodes.entries()) {
|
|
1004
|
-
const nodeId = node.kind === "scope" ? `scope:${node.id}` : node.kind === "completion-collector" ? `completion:${node.scopeId}` : `target:${node.
|
|
1212
|
+
const nodeId = node.kind === "scope" ? `scope:${node.id}` : node.kind === "completion-collector" ? `completion:${node.scopeId}` : `target:${node.targetKey}`;
|
|
1005
1213
|
for (const placement of conditionDefinitionsBefore) {
|
|
1006
1214
|
if (placement.join.beforeNodeId !== nodeId) continue;
|
|
1007
1215
|
rendered.push(renderedRoot(conditionJoinTree(placement.join, step.key, ids, effectNodeIds, scopeNodeIds, targetGroupIds, conditionNodeIds), "condition-definition"));
|
|
@@ -1068,9 +1276,14 @@ function timingXml(steps, dimensions) {
|
|
|
1068
1276
|
continue;
|
|
1069
1277
|
}
|
|
1070
1278
|
const condition = nativeStartCondition(effectiveStart, step.key, effectNodeIds, scopeNodeIds, targetGroupIds, conditionNodeIds);
|
|
1071
|
-
const targetGroupKey = `${step.key}:${node.
|
|
1072
|
-
const
|
|
1073
|
-
|
|
1279
|
+
const targetGroupKey = `${step.key}:${node.targetKey}`;
|
|
1280
|
+
const targetIdGroupKey = `${step.key}:${node.targetId}`;
|
|
1281
|
+
const effectStarts = node.effects.map((effect) => {
|
|
1282
|
+
const relative = effect.groupNativeStart;
|
|
1283
|
+
if (relative === void 0 || relative.kind === "parent-start") return addNativeStartDelay(effectiveStart, relative?.delayMs ?? childDelay(effect));
|
|
1284
|
+
return composeMotionPlanStarts(effectiveStart, relative) ?? relative;
|
|
1285
|
+
});
|
|
1286
|
+
if (node.effects.length > 1 && (referencedTargetGroups.has(targetGroupKey) || referencedTargetGroups.has(targetIdGroupKey) || effectStarts.some((start) => start === void 0))) {
|
|
1074
1287
|
const groupId = targetGroupIds.get(targetGroupKey);
|
|
1075
1288
|
if (groupId === void 0) throw new Error("MotionPlan object member is missing native aggregate node identity");
|
|
1076
1289
|
const primaryChildren = [];
|
|
@@ -1079,7 +1292,26 @@ function timingXml(steps, dimensions) {
|
|
|
1079
1292
|
const effectId = effectNodeIds.get(effectKey(effect));
|
|
1080
1293
|
if (effectId === void 0) throw new Error("MotionPlan effect is missing native time node identity");
|
|
1081
1294
|
const buildGroupId = effect.target.range?.type === "chart" ? chartBuildGroupIds.get(effect.target.id) : void 0;
|
|
1082
|
-
|
|
1295
|
+
let resolvedChildStart = effect.groupNativeStart ?? {
|
|
1296
|
+
kind: "parent-start",
|
|
1297
|
+
delayMs: childDelay(effect)
|
|
1298
|
+
};
|
|
1299
|
+
if (resolvedChildStart.kind === "condition-join") {
|
|
1300
|
+
primaryChildren.push(conditionJoinTree(resolvedChildStart, step.key, ids, effectNodeIds, scopeNodeIds, targetGroupIds, conditionNodeIds));
|
|
1301
|
+
resolvedChildStart = {
|
|
1302
|
+
kind: "condition-end",
|
|
1303
|
+
id: resolvedChildStart.id,
|
|
1304
|
+
delayMs: 0
|
|
1305
|
+
};
|
|
1306
|
+
}
|
|
1307
|
+
if (resolvedChildStart.kind === "delay-layer") {
|
|
1308
|
+
const lastDelay = motionPlanStartLayers(resolvedChildStart).delays.at(-1) ?? 0;
|
|
1309
|
+
const projection = renderedEffect(effect, effectIndex === 0 ? "afterEffect" : "withEffect", element("p:cond", { delay: lastDelay }), effectId, buildGroupId);
|
|
1310
|
+
primaryChildren.push(...wrapDelayLayers(resolvedChildStart, effectRoots([...projection.primary, ...projection.companions], false), effectIndex === 0 ? "afterEffect" : "withEffect").map(({ xml }) => xml));
|
|
1311
|
+
continue;
|
|
1312
|
+
}
|
|
1313
|
+
const childCond = nativeStartCondition(resolvedChildStart, step.key, effectNodeIds, scopeNodeIds, targetGroupIds, conditionNodeIds);
|
|
1314
|
+
const projection = renderedEffect(effect, effectIndex === 0 ? "afterEffect" : "withEffect", childCond, effectId, buildGroupId);
|
|
1083
1315
|
primaryChildren.push(...projection.primary);
|
|
1084
1316
|
companionChildren.push(...projection.companions);
|
|
1085
1317
|
}
|
|
@@ -1105,6 +1337,14 @@ function timingXml(steps, dimensions) {
|
|
|
1105
1337
|
};
|
|
1106
1338
|
effectNodeType = effectIndex === 0 ? "afterEffect" : "withEffect";
|
|
1107
1339
|
}
|
|
1340
|
+
if (effectStart.kind === "condition-join") {
|
|
1341
|
+
rendered.push(renderedRoot(conditionJoinTree(effectStart, step.key, ids, effectNodeIds, scopeNodeIds, targetGroupIds, conditionNodeIds), "condition-definition"));
|
|
1342
|
+
effectStart = {
|
|
1343
|
+
kind: "condition-end",
|
|
1344
|
+
id: effectStart.id,
|
|
1345
|
+
delayMs: 0
|
|
1346
|
+
};
|
|
1347
|
+
}
|
|
1108
1348
|
const effectCondition = nativeStartCondition(effectStart, step.key, effectNodeIds, scopeNodeIds, targetGroupIds, conditionNodeIds);
|
|
1109
1349
|
const buildGroupId = effect.target.range?.type === "chart" ? chartBuildGroupIds.get(effect.target.id) : void 0;
|
|
1110
1350
|
const projection = renderedEffect(effect, effectNodeType, effectCondition, effectId, buildGroupId);
|
|
@@ -1139,7 +1379,6 @@ function timingXml(steps, dimensions) {
|
|
|
1139
1379
|
fill: "hold"
|
|
1140
1380
|
}, element("p:stCondLst", void 0, trigger), element("p:childTnLst", void 0, ...stepTimingGroups)));
|
|
1141
1381
|
});
|
|
1142
|
-
const slideTarget = element("p:tgtEl", void 0, element("p:sldTgt", void 0));
|
|
1143
1382
|
const paragraphBuilds = /* @__PURE__ */ new Map();
|
|
1144
1383
|
const chartBuildTargets = /* @__PURE__ */ new Map();
|
|
1145
1384
|
const wholeTextArrays = /* @__PURE__ */ new Map();
|
|
@@ -1148,7 +1387,7 @@ function timingXml(steps, dimensions) {
|
|
|
1148
1387
|
for (const { effect, declaration } of nativeTextEffects) {
|
|
1149
1388
|
if (!declaration.targetTextBody || declaration.target.id !== effect.target.id) continue;
|
|
1150
1389
|
if (!isWholeTextProjection(declaration)) continue;
|
|
1151
|
-
if (declaration.kind === "entrance") wholeTextEntranceTargets.add(effect.target.id);
|
|
1390
|
+
if (declaration.kind === "entrance" || declaration.kind === "exit") wholeTextEntranceTargets.add(effect.target.id);
|
|
1152
1391
|
const declarations = wholeTextDeclarations.get(effect.target.id) ?? /* @__PURE__ */ new Set();
|
|
1153
1392
|
declarations.add(declaration.effectIndex);
|
|
1154
1393
|
wholeTextDeclarations.set(effect.target.id, declarations);
|
|
@@ -1159,7 +1398,7 @@ function timingXml(steps, dimensions) {
|
|
|
1159
1398
|
const key = `${effect.target.id}:${groupId}`;
|
|
1160
1399
|
const previous = paragraphBuilds.get(key);
|
|
1161
1400
|
const isDeclaredTextEffect = declaration.targetTextBody && declaration.target.id === effect.target.id;
|
|
1162
|
-
const wholeShape =
|
|
1401
|
+
const wholeShape = isWholeShapeTextLifecycle(effect) && declaration.target.id === effect.target.id;
|
|
1163
1402
|
const build = groupId === 1 ? wholeTextEntranceTargets.has(effect.target.id) || wholeTextArrays.has(effect.target.id) ? "p" : "allAtOnce" : isDeclaredTextEffect && (declaration.by === "paragraph" || declaration.target.range?.type === "paragraph") ? "p" : previous?.build;
|
|
1164
1403
|
const animBg = previous?.animBg === true || groupId === 1 && hasWholeTextBackgroundBehaviors(effect) || wholeShape && effect.targetHasBackground;
|
|
1165
1404
|
paragraphBuilds.set(key, {
|
|
@@ -1186,19 +1425,16 @@ function timingXml(steps, dimensions) {
|
|
|
1186
1425
|
}, build === void 0 ? element("p:bldAsOne", void 0) : element("p:bldSub", void 0, element("a:bldChart", { bld: build })));
|
|
1187
1426
|
})];
|
|
1188
1427
|
return {
|
|
1189
|
-
|
|
1190
|
-
rootId,
|
|
1191
|
-
sequenceId,
|
|
1192
|
-
slideTarget,
|
|
1428
|
+
...motionChoreographyMechanism.emit({
|
|
1193
1429
|
stepGroups,
|
|
1194
1430
|
buildList
|
|
1195
|
-
}, void 0)
|
|
1431
|
+
}, void 0),
|
|
1196
1432
|
nativeProjections
|
|
1197
1433
|
};
|
|
1198
1434
|
}
|
|
1199
1435
|
function buildOwnerMotionSteps(ownerPath, rawMotion, rawPlaceholders) {
|
|
1200
1436
|
const parsed = ownerMotionSchema.safeParse(rawMotion);
|
|
1201
|
-
if (!parsed.success) throw new CapabilityError("invalid-owner-motion", parsed.error.issues[0]?.message ?? `${ownerPath} motion declaration is invalid`, ownerPath);
|
|
1437
|
+
if (!parsed.success) throw new CapabilityError("invalid-owner-motion", parsed.error.issues[0]?.message ?? `${ownerPath} motion declaration is invalid`, ownerPath, { field: zodIssueField(parsed.error.issues[0], "motion") });
|
|
1202
1438
|
const placeholderEntries = typeof rawPlaceholders === "object" && rawPlaceholders !== null ? Object.entries(rawPlaceholders) : [];
|
|
1203
1439
|
const placeholderByKey = /* @__PURE__ */ new Map();
|
|
1204
1440
|
placeholderEntries.forEach(([key, spec], index) => {
|
|
@@ -1221,11 +1457,12 @@ function buildOwnerMotionSteps(ownerPath, rawMotion, rawPlaceholders) {
|
|
|
1221
1457
|
if (entry === void 0) throw new CapabilityError("missing-motion-target", `${ownerPath} motion references unknown placeholder ${JSON.stringify(item.target.placeholder)}`, ownerPath);
|
|
1222
1458
|
spid = entry.spid;
|
|
1223
1459
|
targetName = entry.name;
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1460
|
+
const resolvedBox = resolvePlaceholderBoxFromLayers([entry.spec]);
|
|
1461
|
+
if (typeof resolvedBox.x === "number" && typeof resolvedBox.y === "number" && typeof resolvedBox.width === "number" && typeof resolvedBox.height === "number") box = {
|
|
1462
|
+
x: resolvedBox.x,
|
|
1463
|
+
y: resolvedBox.y,
|
|
1464
|
+
width: resolvedBox.width,
|
|
1465
|
+
height: resolvedBox.height
|
|
1229
1466
|
};
|
|
1230
1467
|
} else {
|
|
1231
1468
|
spid = item.target.spid;
|
|
@@ -1251,6 +1488,7 @@ function buildOwnerMotionSteps(ownerPath, rawMotion, rawPlaceholders) {
|
|
|
1251
1488
|
delayMs,
|
|
1252
1489
|
...repeatCount === void 0 ? {} : { repeatCount },
|
|
1253
1490
|
...rawEffect.from === void 0 ? {} : { from: rawEffect.from },
|
|
1491
|
+
...rawEffect.to === void 0 ? {} : { to: rawEffect.to },
|
|
1254
1492
|
...rawEffect.by === void 0 ? {} : { by: rawEffect.by },
|
|
1255
1493
|
...rawEffect.intervalMs === void 0 ? {} : { intervalMs: rawEffect.intervalMs },
|
|
1256
1494
|
...rawEffect.easing === void 0 ? {} : { easing: rawEffect.easing },
|
|
@@ -1275,6 +1513,7 @@ function buildOwnerMotionSteps(ownerPath, rawMotion, rawPlaceholders) {
|
|
|
1275
1513
|
const nodes = [...targetGroups.entries()].map(([targetId, list]) => ({
|
|
1276
1514
|
kind: "target",
|
|
1277
1515
|
targetId,
|
|
1516
|
+
targetKey: `${stepKey}:${targetId}:whole`,
|
|
1278
1517
|
nativeStart: {
|
|
1279
1518
|
kind: "parent-start",
|
|
1280
1519
|
delayMs: 0
|
|
@@ -1290,25 +1529,27 @@ function buildOwnerMotionSteps(ownerPath, rawMotion, rawPlaceholders) {
|
|
|
1290
1529
|
};
|
|
1291
1530
|
});
|
|
1292
1531
|
}
|
|
1532
|
+
const motionMechanisms = [
|
|
1533
|
+
motionAppearMechanism,
|
|
1534
|
+
motionFadeMechanism,
|
|
1535
|
+
motionWipeMechanism,
|
|
1536
|
+
motionZoomMechanism,
|
|
1537
|
+
motionFlyMechanism,
|
|
1538
|
+
motionFloatMechanism,
|
|
1539
|
+
motionSpinInMechanism,
|
|
1540
|
+
motionStretchMechanism,
|
|
1541
|
+
motionSpinMechanism,
|
|
1542
|
+
motionBreatheMechanism,
|
|
1543
|
+
motionFillColorMechanism,
|
|
1544
|
+
motionExitMechanism,
|
|
1545
|
+
motionChoreographyMechanism
|
|
1546
|
+
];
|
|
1293
1547
|
/** Slide-level motion module binds choreography, writes object timing, and leaves preview on the static edit canvas. */
|
|
1294
1548
|
const motionCapability = Object.freeze({
|
|
1295
|
-
|
|
1296
|
-
slideProp: "motion",
|
|
1549
|
+
...motionSlots,
|
|
1297
1550
|
slot: "timing",
|
|
1298
1551
|
always: true,
|
|
1299
|
-
mechanisms:
|
|
1300
|
-
motionFadeMechanism,
|
|
1301
|
-
motionWipeMechanism,
|
|
1302
|
-
motionZoomMechanism,
|
|
1303
|
-
motionFlyMechanism,
|
|
1304
|
-
motionFloatMechanism,
|
|
1305
|
-
motionSpinInMechanism,
|
|
1306
|
-
motionStretchMechanism,
|
|
1307
|
-
motionSpinMechanism,
|
|
1308
|
-
motionBreatheMechanism,
|
|
1309
|
-
motionFillColorMechanism,
|
|
1310
|
-
motionChoreographyMechanism
|
|
1311
|
-
],
|
|
1552
|
+
mechanisms: motionMechanisms,
|
|
1312
1553
|
codegen: motionCodegen,
|
|
1313
1554
|
transparentDeclarations: [{
|
|
1314
1555
|
declaration: "motion-scope",
|
|
@@ -1335,7 +1576,10 @@ const motionCapability = Object.freeze({
|
|
|
1335
1576
|
extensions: [],
|
|
1336
1577
|
observation: input.props["motion"],
|
|
1337
1578
|
emit(emitContext) {
|
|
1338
|
-
return {
|
|
1579
|
+
return {
|
|
1580
|
+
xml: "",
|
|
1581
|
+
timing: (ids) => writeMotionTiming(steps, emitContext.dimensions, ids)
|
|
1582
|
+
};
|
|
1339
1583
|
}
|
|
1340
1584
|
};
|
|
1341
1585
|
} };
|
|
@@ -1353,7 +1597,9 @@ const motionCapability = Object.freeze({
|
|
|
1353
1597
|
}
|
|
1354
1598
|
};
|
|
1355
1599
|
}
|
|
1356
|
-
const
|
|
1600
|
+
const ids = createTimingIds();
|
|
1601
|
+
ids.take();
|
|
1602
|
+
const timing = writeMotionTiming(plan.steps, context.dimensions, ids);
|
|
1357
1603
|
const observation = {
|
|
1358
1604
|
...plan.observation,
|
|
1359
1605
|
...timing.nativeProjections.length === 0 ? {} : { nativeProjections: timing.nativeProjections }
|
|
@@ -1363,10 +1609,13 @@ const motionCapability = Object.freeze({
|
|
|
1363
1609
|
extensions: [],
|
|
1364
1610
|
observation,
|
|
1365
1611
|
emit(emitContext) {
|
|
1366
|
-
return {
|
|
1612
|
+
return {
|
|
1613
|
+
xml: "",
|
|
1614
|
+
timing: (ids) => writeMotionTiming(plan.steps, emitContext.dimensions, ids)
|
|
1615
|
+
};
|
|
1367
1616
|
}
|
|
1368
1617
|
};
|
|
1369
1618
|
} };
|
|
1370
1619
|
}
|
|
1371
1620
|
});
|
|
1372
|
-
export { after, breathe, createMotionScopeHandle, fade, fillColor, floatDown, floatUp, fly, motionBreatheMechanism, motionCapability, motionChoreographyMechanism, motionFadeMechanism, motionFillColorMechanism, motionFloatMechanism, motionFlyMechanism, motionSpinInMechanism, motionSpinMechanism, motionStretchMechanism, motionWipeMechanism, motionZoomMechanism,
|
|
1621
|
+
export { after, appear, breathe, collapse, createMotionScopeHandle, disappear, fade, fadeOut, fillColor, floatDown, floatOut, floatUp, fly, flyOut, motionAppearMechanism, motionBreatheMechanism, motionCapability, motionChoreographyMechanism, motionExitMechanism, motionFadeMechanism, motionFillColorMechanism, motionFloatMechanism, motionFlyMechanism, motionSchedule, motionSpinInMechanism, motionSpinMechanism, motionStretchMechanism, motionWipeMechanism, motionZoomMechanism, onStep, repeat, spin, spinIn, spinOptionsSchema, spinOut, stretch, wipe, wipeOut, zoom, zoomOut };
|