use-scroll-animate 10.2.0 → 10.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +4 -0
- package/CHANGELOG.md +35 -0
- package/README.md +67 -0
- package/bin/motionary-mcp.mjs +265 -0
- package/dist/chunks/anim-image-DDdb9q3X.js +166 -0
- package/dist/chunks/anim-image-DDdb9q3X.js.map +1 -0
- package/dist/chunks/anim-image-blQgPFFS.cjs +174 -0
- package/dist/chunks/anim-image-blQgPFFS.cjs.map +1 -0
- package/dist/chunks/audio-BpU-A1m1.cjs.map +1 -1
- package/dist/chunks/{audio-D95jwlOh.js → audio-CWt1xdZB.js} +3 -3
- package/dist/chunks/{audio-D95jwlOh.js.map → audio-CWt1xdZB.js.map} +1 -1
- package/dist/chunks/{base-BnRyfuyM.js → base-BTev8qxg.js} +2 -2
- package/dist/chunks/{base-BnRyfuyM.js.map → base-BTev8qxg.js.map} +1 -1
- package/dist/chunks/base-DBheNxJu.cjs.map +1 -1
- package/dist/chunks/bind-B_CTL6Qn.js.map +1 -1
- package/dist/chunks/bind-Ui43-n2d.cjs.map +1 -1
- package/dist/chunks/builtins-CKKZNR95.cjs.map +1 -1
- package/dist/chunks/{builtins-CqIq1zBv.js → builtins-CPmS6aDB.js} +3 -3
- package/dist/chunks/{builtins-CqIq1zBv.js.map → builtins-CPmS6aDB.js.map} +1 -1
- package/dist/chunks/core-B5T0dhFH.cjs.map +1 -1
- package/dist/chunks/{core-DsGoL9EY.js → core-BviA7nFa.js} +2 -2
- package/dist/chunks/{core-DsGoL9EY.js.map → core-BviA7nFa.js.map} +1 -1
- package/dist/chunks/core-D74Fz-dL.cjs.map +1 -1
- package/dist/chunks/core-D7cVumUu.js.map +1 -1
- package/dist/chunks/{core-XA2yhn1b.js → core-KiM7MXjL.js} +2 -2
- package/dist/chunks/{core-XA2yhn1b.js.map → core-KiM7MXjL.js.map} +1 -1
- package/dist/chunks/core-MQlXZKUG.cjs.map +1 -1
- package/dist/chunks/ease-HwYZnZat.cjs +94 -0
- package/dist/chunks/ease-HwYZnZat.cjs.map +1 -0
- package/dist/chunks/ease-XN8_0sXu.js +89 -0
- package/dist/chunks/ease-XN8_0sXu.js.map +1 -0
- package/dist/chunks/fx-B_pbhpDp.cjs.map +1 -1
- package/dist/chunks/{fx-CtnrFEg9.js → fx-CgWKqVsn.js} +2 -2
- package/dist/chunks/{fx-CtnrFEg9.js.map → fx-CgWKqVsn.js.map} +1 -1
- package/dist/chunks/generative-2LhxG5BJ.js.map +1 -1
- package/dist/chunks/generative-BHIj-NU0.cjs.map +1 -1
- package/dist/chunks/{gpu-CDcXiNA8.js → gpu-BWfgYWMY.js} +2 -2
- package/dist/chunks/{gpu-CDcXiNA8.js.map → gpu-BWfgYWMY.js.map} +1 -1
- package/dist/chunks/gpu-cUixt7kT.cjs.map +1 -1
- package/dist/chunks/index-tags-B-JBecYg.js.map +1 -1
- package/dist/chunks/index-tags-hLIF2Clq.cjs.map +1 -1
- package/dist/chunks/{keyframes-W-474DMc.js → keyframes-B5PWe5bU.js} +3 -2
- package/dist/chunks/keyframes-B5PWe5bU.js.map +1 -0
- package/dist/chunks/{keyframes-ZheOkpt0.cjs → keyframes-tC3I7anQ.cjs} +4 -3
- package/dist/chunks/keyframes-tC3I7anQ.cjs.map +1 -0
- package/dist/chunks/{manifest-D58HXVY-.js → manifest-BHx5yPN6.js} +2 -2
- package/dist/chunks/{manifest-D58HXVY-.js.map → manifest-BHx5yPN6.js.map} +1 -1
- package/dist/chunks/manifest-PaF9B8Vt.cjs.map +1 -1
- package/dist/chunks/{player-48Zy_NBG.js → player-BfHMNtiM.js} +4 -4
- package/dist/chunks/{player-48Zy_NBG.js.map → player-BfHMNtiM.js.map} +1 -1
- package/dist/chunks/player-C4y4jXSv.cjs.map +1 -1
- package/dist/chunks/presets-BYBVJVeP.js.map +1 -1
- package/dist/chunks/presets-CUHys3sK.cjs.map +1 -1
- package/dist/chunks/{registry-gFJRpPES.js → registry-BKzyg1JV.js} +2 -2
- package/dist/chunks/{registry-gFJRpPES.js.map → registry-BKzyg1JV.js.map} +1 -1
- package/dist/chunks/{registry-BIEjKngP.js → registry-CT-TT_bx.js} +3 -3
- package/dist/chunks/{registry-BIEjKngP.js.map → registry-CT-TT_bx.js.map} +1 -1
- package/dist/chunks/{registry-eJgpFAzI.cjs → registry-tzwKkldE.cjs} +2 -2
- package/dist/chunks/{registry-eJgpFAzI.cjs.map → registry-tzwKkldE.cjs.map} +1 -1
- package/dist/chunks/registry-xQZnSqqV.cjs.map +1 -1
- package/dist/chunks/shared-CkKHWrtJ.js.map +1 -1
- package/dist/chunks/shared-jkgRH-Hx.cjs.map +1 -1
- package/dist/chunks/{spring-CZDNyqWp.js → spring-BHuP55DR.js} +2 -2
- package/dist/chunks/{spring-CZDNyqWp.js.map → spring-BHuP55DR.js.map} +1 -1
- package/dist/chunks/spring-BlTQD2AV.cjs.map +1 -1
- package/dist/chunks/stagger-CCFyhzSw.cjs.map +1 -1
- package/dist/chunks/stagger-DtMKo2SK.js.map +1 -1
- package/dist/chunks/{ticker-CM_56oVy.js → ticker-C8lSGml9.js} +2 -2
- package/dist/chunks/{ticker-CM_56oVy.js.map → ticker-C8lSGml9.js.map} +1 -1
- package/dist/chunks/{ticker-D4o6enH0.cjs → ticker-Un0bvTWR.cjs} +2 -2
- package/dist/chunks/{ticker-D4o6enH0.cjs.map → ticker-Un0bvTWR.cjs.map} +1 -1
- package/dist/chunks/{tween-CqX1JBuj.js → tween-BcejKpsx.js} +15 -91
- package/dist/chunks/tween-BcejKpsx.js.map +1 -0
- package/dist/chunks/{tween-CBuWYpI-.cjs → tween-CwLLC3Ko.cjs} +15 -95
- package/dist/chunks/tween-CwLLC3Ko.cjs.map +1 -0
- package/dist/chunks/variants-CrDDJoYK.cjs.map +1 -1
- package/dist/chunks/{variants-GU3yIL4F.js → variants-CsRGUIyA.js} +2 -2
- package/dist/chunks/{variants-GU3yIL4F.js.map → variants-CsRGUIyA.js.map} +1 -1
- package/dist/components/a11y.cjs.map +1 -1
- package/dist/components/a11y.js +2 -2
- package/dist/components/a11y.js.map +1 -1
- package/dist/components/angular.cjs.map +1 -1
- package/dist/components/angular.js +8 -8
- package/dist/components/angular.js.map +1 -1
- package/dist/components/background.cjs.map +1 -1
- package/dist/components/background.js +2 -2
- package/dist/components/background.js.map +1 -1
- package/dist/components/bridge.cjs.map +1 -1
- package/dist/components/bridge.js +1 -1
- package/dist/components/bridge.js.map +1 -1
- package/dist/components/cards.cjs.map +1 -1
- package/dist/components/cards.js +2 -2
- package/dist/components/cards.js.map +1 -1
- package/dist/components/click.cjs.map +1 -1
- package/dist/components/click.js +3 -3
- package/dist/components/click.js.map +1 -1
- package/dist/components/core.cjs.map +1 -1
- package/dist/components/core.js.map +1 -1
- package/dist/components/depth.cjs.map +1 -1
- package/dist/components/depth.js +3 -3
- package/dist/components/depth.js.map +1 -1
- package/dist/components/design.cjs.map +1 -1
- package/dist/components/design.js +3 -3
- package/dist/components/design.js.map +1 -1
- package/dist/components/dsl.cjs.map +1 -1
- package/dist/components/dsl.js +2 -2
- package/dist/components/dsl.js.map +1 -1
- package/dist/components/effects.cjs.map +1 -1
- package/dist/components/effects.js +9 -9
- package/dist/components/effects.js.map +1 -1
- package/dist/components/engine.cjs.map +1 -1
- package/dist/components/engine.js +2 -2
- package/dist/components/engine.js.map +1 -1
- package/dist/components/feedback.cjs.map +1 -1
- package/dist/components/feedback.js +1 -1
- package/dist/components/feedback.js.map +1 -1
- package/dist/components/fx-3d.cjs.map +1 -1
- package/dist/components/fx-3d.js +2 -2
- package/dist/components/fx-3d.js.map +1 -1
- package/dist/components/fx-ai.cjs.map +1 -1
- package/dist/components/fx-ai.js +2 -2
- package/dist/components/fx-ai.js.map +1 -1
- package/dist/components/fx-chart.cjs.map +1 -1
- package/dist/components/fx-chart.js +2 -2
- package/dist/components/fx-chart.js.map +1 -1
- package/dist/components/fx-cinema.cjs.map +1 -1
- package/dist/components/fx-cinema.js +2 -2
- package/dist/components/fx-cinema.js.map +1 -1
- package/dist/components/fx-cyber.cjs.map +1 -1
- package/dist/components/fx-cyber.js +2 -2
- package/dist/components/fx-cyber.js.map +1 -1
- package/dist/components/fx-festival.cjs.map +1 -1
- package/dist/components/fx-festival.js +2 -2
- package/dist/components/fx-festival.js.map +1 -1
- package/dist/components/fx-focus.cjs.map +1 -1
- package/dist/components/fx-focus.js +2 -2
- package/dist/components/fx-focus.js.map +1 -1
- package/dist/components/fx-form.cjs.map +1 -1
- package/dist/components/fx-form.js +2 -2
- package/dist/components/fx-form.js.map +1 -1
- package/dist/components/fx-game.cjs.map +1 -1
- package/dist/components/fx-game.js +2 -2
- package/dist/components/fx-game.js.map +1 -1
- package/dist/components/fx-genart.cjs.map +1 -1
- package/dist/components/fx-genart.js +2 -2
- package/dist/components/fx-genart.js.map +1 -1
- package/dist/components/fx-geo.cjs.map +1 -1
- package/dist/components/fx-geo.js +2 -2
- package/dist/components/fx-geo.js.map +1 -1
- package/dist/components/fx-gesture.cjs.map +1 -1
- package/dist/components/fx-gesture.js +2 -2
- package/dist/components/fx-gesture.js.map +1 -1
- package/dist/components/fx-gpu.js +3 -3
- package/dist/components/fx-light.cjs.map +1 -1
- package/dist/components/fx-light.js +2 -2
- package/dist/components/fx-light.js.map +1 -1
- package/dist/components/fx-lottie.cjs.map +1 -1
- package/dist/components/fx-lottie.js +2 -2
- package/dist/components/fx-lottie.js.map +1 -1
- package/dist/components/fx-morph.cjs.map +1 -1
- package/dist/components/fx-morph.js +2 -2
- package/dist/components/fx-morph.js.map +1 -1
- package/dist/components/fx-music.cjs.map +1 -1
- package/dist/components/fx-music.js +3 -3
- package/dist/components/fx-music.js.map +1 -1
- package/dist/components/fx-organic.cjs.map +1 -1
- package/dist/components/fx-organic.js +2 -2
- package/dist/components/fx-organic.js.map +1 -1
- package/dist/components/fx-paper.cjs.map +1 -1
- package/dist/components/fx-paper.js +2 -2
- package/dist/components/fx-paper.js.map +1 -1
- package/dist/components/fx-perf.cjs.map +1 -1
- package/dist/components/fx-perf.js +2 -2
- package/dist/components/fx-perf.js.map +1 -1
- package/dist/components/fx-physics.cjs.map +1 -1
- package/dist/components/fx-physics.js +2 -2
- package/dist/components/fx-physics.js.map +1 -1
- package/dist/components/fx-retro.cjs.map +1 -1
- package/dist/components/fx-retro.js +2 -2
- package/dist/components/fx-retro.js.map +1 -1
- package/dist/components/fx-safe.cjs.map +1 -1
- package/dist/components/fx-safe.js +2 -2
- package/dist/components/fx-safe.js.map +1 -1
- package/dist/components/fx-shop.cjs.map +1 -1
- package/dist/components/fx-shop.js +2 -2
- package/dist/components/fx-shop.js.map +1 -1
- package/dist/components/fx-social.cjs.map +1 -1
- package/dist/components/fx-social.js +2 -2
- package/dist/components/fx-social.js.map +1 -1
- package/dist/components/fx-spatial.cjs.map +1 -1
- package/dist/components/fx-spatial.js +2 -2
- package/dist/components/fx-spatial.js.map +1 -1
- package/dist/components/fx-surface.cjs.map +1 -1
- package/dist/components/fx-surface.js +2 -2
- package/dist/components/fx-surface.js.map +1 -1
- package/dist/components/fx-text.cjs.map +1 -1
- package/dist/components/fx-text.js +2 -2
- package/dist/components/fx-text.js.map +1 -1
- package/dist/components/fx-transitions.cjs.map +1 -1
- package/dist/components/fx-transitions.js +3 -3
- package/dist/components/fx-transitions.js.map +1 -1
- package/dist/components/fx-video.cjs.map +1 -1
- package/dist/components/fx-video.js +2 -2
- package/dist/components/fx-video.js.map +1 -1
- package/dist/components/fx-weather.cjs.map +1 -1
- package/dist/components/fx-weather.js +2 -2
- package/dist/components/fx-weather.js.map +1 -1
- package/dist/components/fx.cjs.map +1 -1
- package/dist/components/fx.js +6 -6
- package/dist/components/fx.js.map +1 -1
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.js +6 -6
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/gesture.cjs.map +1 -1
- package/dist/components/gesture.js +4 -4
- package/dist/components/gesture.js.map +1 -1
- package/dist/components/interaction.cjs.map +1 -1
- package/dist/components/interaction.js +1 -1
- package/dist/components/interaction.js.map +1 -1
- package/dist/components/layout.cjs.map +1 -1
- package/dist/components/layout.js +1 -1
- package/dist/components/layout.js.map +1 -1
- package/dist/components/lazy.cjs.map +1 -1
- package/dist/components/lazy.js.map +1 -1
- package/dist/components/lite.cjs.map +1 -1
- package/dist/components/lite.js.map +1 -1
- package/dist/components/marketplace.cjs.map +1 -1
- package/dist/components/marketplace.js +4 -4
- package/dist/components/marketplace.js.map +1 -1
- package/dist/components/native.cjs.map +1 -1
- package/dist/components/native.js +3 -3
- package/dist/components/native.js.map +1 -1
- package/dist/components/packs.cjs.map +1 -1
- package/dist/components/packs.js +1 -1
- package/dist/components/packs.js.map +1 -1
- package/dist/components/page.cjs.map +1 -1
- package/dist/components/page.js +3 -3
- package/dist/components/page.js.map +1 -1
- package/dist/components/perf.cjs.map +1 -1
- package/dist/components/perf.js +2 -2
- package/dist/components/perf.js.map +1 -1
- package/dist/components/physics.cjs.map +1 -1
- package/dist/components/physics.js +3 -3
- package/dist/components/physics.js.map +1 -1
- package/dist/components/plugins.cjs.map +1 -1
- package/dist/components/plugins.js +4 -4
- package/dist/components/plugins.js.map +1 -1
- package/dist/components/react.cjs.map +1 -1
- package/dist/components/react.js.map +1 -1
- package/dist/components/reveal.cjs.map +1 -1
- package/dist/components/reveal.js +1 -1
- package/dist/components/reveal.js.map +1 -1
- package/dist/components/solid.cjs.map +1 -1
- package/dist/components/solid.js +8 -8
- package/dist/components/solid.js.map +1 -1
- package/dist/components/svelte.cjs.map +1 -1
- package/dist/components/svelte.js +8 -8
- package/dist/components/svelte.js.map +1 -1
- package/dist/components/svg.cjs.map +1 -1
- package/dist/components/svg.js +1 -1
- package/dist/components/svg.js.map +1 -1
- package/dist/components/text.cjs.map +1 -1
- package/dist/components/text.js +2 -2
- package/dist/components/text.js.map +1 -1
- package/dist/components/timeline.cjs.map +1 -1
- package/dist/components/timeline.js +3 -3
- package/dist/components/timeline.js.map +1 -1
- package/dist/components/tokens.cjs.map +1 -1
- package/dist/components/tokens.js.map +1 -1
- package/dist/components/transitions.cjs.map +1 -1
- package/dist/components/transitions.js +1 -1
- package/dist/components/transitions.js.map +1 -1
- package/dist/components/ui.cjs.map +1 -1
- package/dist/components/ui.js +4 -4
- package/dist/components/ui.js.map +1 -1
- package/dist/components/vue.cjs.map +1 -1
- package/dist/components/vue.js +8 -8
- package/dist/components/vue.js.map +1 -1
- package/dist/components/webgl.cjs.map +1 -1
- package/dist/components/webgl.js +1 -1
- package/dist/components/webgl.js.map +1 -1
- package/dist/components/widgets.cjs +766 -212
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +207 -2
- package/dist/components/widgets.d.ts +207 -2
- package/dist/components/widgets.js +770 -221
- package/dist/components/widgets.js.map +1 -1
- package/dist/components.cjs.map +1 -1
- package/dist/components.js +10 -10
- package/dist/components.js.map +1 -1
- package/dist/element.cjs.map +1 -1
- package/dist/element.js.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +250 -1
- package/dist/llms.txt +13 -2
- package/dist/manifest.json +646 -1
- package/dist/presets/extended.cjs.map +1 -1
- package/dist/presets/extended.js.map +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.js.map +1 -1
- package/dist/runtime/format-apng.cjs +131 -0
- package/dist/runtime/format-apng.cjs.map +1 -0
- package/dist/runtime/format-apng.d.cts +250 -0
- package/dist/runtime/format-apng.d.ts +250 -0
- package/dist/runtime/format-apng.iife.js +2 -0
- package/dist/runtime/format-apng.iife.js.map +1 -0
- package/dist/runtime/format-apng.js +123 -0
- package/dist/runtime/format-apng.js.map +1 -0
- package/dist/runtime/format-css.cjs +5 -4
- package/dist/runtime/format-css.cjs.map +1 -1
- package/dist/runtime/format-css.js +5 -4
- package/dist/runtime/format-css.js.map +1 -1
- package/dist/runtime/format-gif.cjs +206 -0
- package/dist/runtime/format-gif.cjs.map +1 -0
- package/dist/runtime/format-gif.d.cts +223 -0
- package/dist/runtime/format-gif.d.ts +223 -0
- package/dist/runtime/format-gif.iife.js +2 -0
- package/dist/runtime/format-gif.iife.js.map +1 -0
- package/dist/runtime/format-gif.js +199 -0
- package/dist/runtime/format-gif.js.map +1 -0
- package/dist/runtime/format-motion.cjs +9 -8
- package/dist/runtime/format-motion.cjs.map +1 -1
- package/dist/runtime/format-motion.js +5 -4
- package/dist/runtime/format-motion.js.map +1 -1
- package/dist/runtime/format-sprite.cjs +226 -0
- package/dist/runtime/format-sprite.cjs.map +1 -0
- package/dist/runtime/format-sprite.d.cts +224 -0
- package/dist/runtime/format-sprite.d.ts +224 -0
- package/dist/runtime/format-sprite.iife.js +2 -0
- package/dist/runtime/format-sprite.iife.js.map +1 -0
- package/dist/runtime/format-sprite.js +216 -0
- package/dist/runtime/format-sprite.js.map +1 -0
- package/dist/runtime/format-svg.cjs +5 -4
- package/dist/runtime/format-svg.cjs.map +1 -1
- package/dist/runtime/format-svg.iife.js.map +1 -1
- package/dist/runtime/format-svg.js +4 -3
- package/dist/runtime/format-svg.js.map +1 -1
- package/dist/runtime/format-webp.cjs +123 -0
- package/dist/runtime/format-webp.cjs.map +1 -0
- package/dist/runtime/format-webp.d.cts +245 -0
- package/dist/runtime/format-webp.d.ts +245 -0
- package/dist/runtime/format-webp.iife.js +2 -0
- package/dist/runtime/format-webp.iife.js.map +1 -0
- package/dist/runtime/format-webp.js +115 -0
- package/dist/runtime/format-webp.js.map +1 -0
- package/dist/runtime/scroll.cjs +2 -2
- package/dist/runtime/scroll.cjs.map +1 -1
- package/dist/runtime/scroll.js +2 -2
- package/dist/runtime/scroll.js.map +1 -1
- package/dist/runtime/smooth.cjs +284 -0
- package/dist/runtime/smooth.cjs.map +1 -0
- package/dist/runtime/smooth.d.cts +137 -0
- package/dist/runtime/smooth.d.ts +137 -0
- package/dist/runtime/smooth.iife.js +2 -0
- package/dist/runtime/smooth.iife.js.map +1 -0
- package/dist/runtime/smooth.js +279 -0
- package/dist/runtime/smooth.js.map +1 -0
- package/dist/runtime/text.cjs +147 -0
- package/dist/runtime/text.cjs.map +1 -0
- package/dist/runtime/text.d.cts +65 -0
- package/dist/runtime/text.d.ts +65 -0
- package/dist/runtime/text.iife.js +2 -0
- package/dist/runtime/text.iife.js.map +1 -0
- package/dist/runtime/text.js +143 -0
- package/dist/runtime/text.js.map +1 -0
- package/dist/runtime.cjs +9 -8
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.d.cts +9 -2
- package/dist/runtime.d.ts +9 -2
- package/dist/runtime.iife.js +1 -1
- package/dist/runtime.iife.js.map +1 -1
- package/dist/runtime.js +6 -5
- package/dist/runtime.js.map +1 -1
- package/dist/solid.cjs.map +1 -1
- package/dist/solid.js.map +1 -1
- package/dist/svelte.cjs.map +1 -1
- package/dist/svelte.js.map +1 -1
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +2 -2
- package/docs/components/README.md +12 -7
- package/docs/components/usa-parallax-layers.md +38 -0
- package/docs/components/usa-route-transition.md +38 -0
- package/docs/components/usa-scroll-ring.md +32 -0
- package/docs/components/usa-smooth-scroll.md +60 -0
- package/docs/components/usa-text-splitter.md +60 -0
- package/docs/components.md +94 -0
- package/docs/mcp.md +50 -0
- package/docs/runtime/format-apng.md +59 -0
- package/docs/runtime/format-gif.md +60 -0
- package/docs/runtime/format-sprite.md +60 -0
- package/docs/runtime/format-webp.md +58 -0
- package/docs/runtime/smooth.md +60 -0
- package/docs/runtime/text.md +59 -0
- package/package.json +64 -2
- package/dist/chunks/keyframes-W-474DMc.js.map +0 -1
- package/dist/chunks/keyframes-ZheOkpt0.cjs.map +0 -1
- package/dist/chunks/tween-CBuWYpI-.cjs.map +0 -1
- package/dist/chunks/tween-CqX1JBuj.js.map +0 -1
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/** A runtime module: `{ id, version, api }`, registered with `use()`. */
|
|
2
|
+
interface RuntimeModule<A = unknown> {
|
|
3
|
+
/** Module id: 'core', 'format-css', 'scroll', … (import path `motionary/runtime/<id>`). */
|
|
4
|
+
id: string;
|
|
5
|
+
version: string;
|
|
6
|
+
/** Other modules this one needs (registered first by `use()` callers). */
|
|
7
|
+
requires?: string[];
|
|
8
|
+
/** The module's public API (what `requireModule(id)` returns). */
|
|
9
|
+
api: A;
|
|
10
|
+
/** Optional one-time setup, called on first registration. */
|
|
11
|
+
setup?(registry: RuntimeRegistry): void;
|
|
12
|
+
}
|
|
13
|
+
interface RuntimeRegistry {
|
|
14
|
+
version: string;
|
|
15
|
+
modules: Map<string, RuntimeModule>;
|
|
16
|
+
/** Shared per-page state slots (the ticker lives here). */
|
|
17
|
+
slots: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Easing functions (t ∈ [0, 1] → progress). Original implementations of the standard Penner-style curves. */
|
|
21
|
+
type Ease = (t: number) => number;
|
|
22
|
+
|
|
23
|
+
type Target = object | Element;
|
|
24
|
+
type Props = Record<string, number | string>;
|
|
25
|
+
interface PlayOptions {
|
|
26
|
+
/** Delay before the first iteration, ms. */
|
|
27
|
+
delay?: number;
|
|
28
|
+
/** Extra iterations (-1 = forever). */
|
|
29
|
+
repeat?: number;
|
|
30
|
+
/** Alternate direction on every other iteration. */
|
|
31
|
+
yoyo?: boolean;
|
|
32
|
+
/** Start paused (`play()` to start). */
|
|
33
|
+
paused?: boolean;
|
|
34
|
+
onUpdate?: (progress: number) => void;
|
|
35
|
+
onComplete?: () => void;
|
|
36
|
+
}
|
|
37
|
+
interface TweenOptions extends PlayOptions {
|
|
38
|
+
to?: Props;
|
|
39
|
+
from?: Props;
|
|
40
|
+
/** ms (default 600). */
|
|
41
|
+
duration?: number;
|
|
42
|
+
ease?: string | Ease;
|
|
43
|
+
/** Delay added per target index (ms) when several targets are given. */
|
|
44
|
+
stagger?: number;
|
|
45
|
+
}
|
|
46
|
+
/** Common playback: delay, repeat, yoyo, direction, ticker attachment, promise. */
|
|
47
|
+
declare abstract class Playable {
|
|
48
|
+
delay: number;
|
|
49
|
+
repeat: number;
|
|
50
|
+
yoyo: boolean;
|
|
51
|
+
/** Playback rate multiplier. */
|
|
52
|
+
timeScale: number;
|
|
53
|
+
onUpdate?: (progress: number) => void;
|
|
54
|
+
onComplete?: () => void;
|
|
55
|
+
protected _t: number;
|
|
56
|
+
private _dir;
|
|
57
|
+
private _off;
|
|
58
|
+
private _done;
|
|
59
|
+
private _resolve;
|
|
60
|
+
/** Resolves on completion (forward end, or start when reversed). */
|
|
61
|
+
finished: Promise<void>;
|
|
62
|
+
/** Set when owned by a timeline (then the ticker never drives it). */
|
|
63
|
+
parent: Timeline | null;
|
|
64
|
+
constructor(o: PlayOptions);
|
|
65
|
+
/** One iteration, ms. */
|
|
66
|
+
abstract get duration(): number;
|
|
67
|
+
/** Render at `ms` into one iteration. */
|
|
68
|
+
protected abstract renderLocal(ms: number, iterationEnded: boolean): void;
|
|
69
|
+
get totalDuration(): number;
|
|
70
|
+
get time(): number;
|
|
71
|
+
get progress(): number;
|
|
72
|
+
set progress(p: number);
|
|
73
|
+
get isActive(): boolean;
|
|
74
|
+
get reversed(): boolean;
|
|
75
|
+
/** Jump to `ms` (total time, including the delay) and render. */
|
|
76
|
+
seek(ms: number): this;
|
|
77
|
+
play(): this;
|
|
78
|
+
pause(): this;
|
|
79
|
+
/** Play backwards from the current time. */
|
|
80
|
+
reverse(): this;
|
|
81
|
+
restart(): this;
|
|
82
|
+
/** Stop and detach for good. */
|
|
83
|
+
kill(): void;
|
|
84
|
+
/** Promise-like: `await tween(...)`. */
|
|
85
|
+
then<R>(ok?: (v: void) => R, err?: (e: unknown) => R): Promise<R>;
|
|
86
|
+
private attach;
|
|
87
|
+
private advance;
|
|
88
|
+
protected complete(): void;
|
|
89
|
+
}
|
|
90
|
+
/** Position: ms number, '<' (start of previous), '>' (end of previous, default), '+=200' / '-=200' (relative to the end), 'label', 'label+=100', '<+=100'. */
|
|
91
|
+
type Position = number | string;
|
|
92
|
+
interface TimelineOptions extends PlayOptions {
|
|
93
|
+
/** Defaults merged into every `.to()`. */
|
|
94
|
+
defaults?: Omit<TweenOptions, 'to' | 'from'>;
|
|
95
|
+
}
|
|
96
|
+
/** A sequence of tweens, nested timelines and callbacks. */
|
|
97
|
+
declare class Timeline extends Playable {
|
|
98
|
+
private children;
|
|
99
|
+
private labels;
|
|
100
|
+
private prevStart;
|
|
101
|
+
private prevEnd;
|
|
102
|
+
private defaults;
|
|
103
|
+
private lastLocal;
|
|
104
|
+
constructor(o?: TimelineOptions);
|
|
105
|
+
get duration(): number;
|
|
106
|
+
private resolve;
|
|
107
|
+
/** Add a tween, timeline or callback at a position. */
|
|
108
|
+
add(item: Playable | (() => void), position?: Position): this;
|
|
109
|
+
/** `tween(target, vars)` placed at `position` (stagger across several targets). */
|
|
110
|
+
to(target: Target | Target[] | ArrayLike<Target>, vars: TweenOptions, position?: Position): this;
|
|
111
|
+
call(fn: () => void, position?: Position): this;
|
|
112
|
+
label(name: string, position?: Position): this;
|
|
113
|
+
/** Time of a label, ms. */
|
|
114
|
+
labelTime(name: string): number | undefined;
|
|
115
|
+
remove(item: Playable): void;
|
|
116
|
+
/** Children in start order (callbacks excluded). */
|
|
117
|
+
getChildren(): Playable[];
|
|
118
|
+
protected renderLocal(ms: number): void;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Shared internals of the animated-image loaders (`format-gif`, `format-apng`,
|
|
123
|
+
* `format-webp`, 10.4): the decoded-animation shape, frame compositing in
|
|
124
|
+
* plain RGBA arrays (no DOM — works in workers and on the server), the
|
|
125
|
+
* browser image decoder used for APNG / WebP frames, and the canvas player
|
|
126
|
+
* (a runtime `Playable`, so it can be paused, reversed, scrubbed and driven
|
|
127
|
+
* by a scroll scene). Bundled into each loader; not a public module.
|
|
128
|
+
*/
|
|
129
|
+
|
|
130
|
+
/** An RGBA bitmap (the shape of `ImageData`, without needing the DOM). */
|
|
131
|
+
interface Rgba {
|
|
132
|
+
width: number;
|
|
133
|
+
height: number;
|
|
134
|
+
data: Uint8ClampedArray;
|
|
135
|
+
}
|
|
136
|
+
/** One frame of an animation, already composited to the full canvas size. */
|
|
137
|
+
interface AnimFrame {
|
|
138
|
+
/** Display time, ms. */
|
|
139
|
+
delay: number;
|
|
140
|
+
image: Rgba;
|
|
141
|
+
}
|
|
142
|
+
interface AnimatedImage {
|
|
143
|
+
format: 'gif' | 'apng' | 'webp';
|
|
144
|
+
width: number;
|
|
145
|
+
height: number;
|
|
146
|
+
/** Number of plays: 0 = forever, 1 = once, … */
|
|
147
|
+
plays: number;
|
|
148
|
+
frames: AnimFrame[];
|
|
149
|
+
}
|
|
150
|
+
/** A frame region before compositing (APNG fcTL / WebP ANMF / GIF descriptor). */
|
|
151
|
+
interface FramePart {
|
|
152
|
+
x: number;
|
|
153
|
+
y: number;
|
|
154
|
+
image: Rgba;
|
|
155
|
+
delay: number;
|
|
156
|
+
/** 'over' alpha-blends onto the canvas, 'source' replaces the region. */
|
|
157
|
+
blend: 'over' | 'source';
|
|
158
|
+
/** What happens to the region after the frame is shown. */
|
|
159
|
+
dispose: 'none' | 'background' | 'previous';
|
|
160
|
+
}
|
|
161
|
+
/** Image decoder for one frame file (PNG / WebP bytes) → RGBA. Replaceable (workers, tests, servers). */
|
|
162
|
+
type FrameDecoder = (bytes: Uint8Array, mime: string) => Promise<Rgba>;
|
|
163
|
+
interface AnimPlayerOptions {
|
|
164
|
+
/** Extra repeats; default from the file (`plays`: 0 → forever). */
|
|
165
|
+
repeat?: number;
|
|
166
|
+
yoyo?: boolean;
|
|
167
|
+
paused?: boolean;
|
|
168
|
+
/** Playback speed (default 1). */
|
|
169
|
+
speed?: number;
|
|
170
|
+
}
|
|
171
|
+
type AnimPlayer = Playable & {
|
|
172
|
+
readonly frame: number;
|
|
173
|
+
readonly frameCount: number;
|
|
174
|
+
};
|
|
175
|
+
/** Play a decoded animation on a canvas as a runtime timeline (seek / reverse / `progress` scrub). */
|
|
176
|
+
declare function animatedImagePlayer(canvas: HTMLCanvasElement | OffscreenCanvas, anim: AnimatedImage, o?: AnimPlayerOptions): AnimPlayer;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* `motionary/runtime/format-webp` (10.4) — animated WebP loader written for
|
|
180
|
+
* Motionary: reads the RIFF container (`VP8X`, `ANIM`, `ANMF`), rebuilds each
|
|
181
|
+
* frame (lossy `VP8 ` with optional `ALPH`, or lossless `VP8L`) as a
|
|
182
|
+
* standalone WebP file that the browser's own decoder decodes, then
|
|
183
|
+
* composites the frames (blending on / off, dispose to background) into
|
|
184
|
+
* full-size RGBA. A still WebP loads as a one-frame animation.
|
|
185
|
+
*
|
|
186
|
+
* `parseWebp()` and `webpFrameFiles()` are pure (no DOM); `decodeWebp()` uses
|
|
187
|
+
* the browser decoder by default (also in workers) or your own `{ decode }`.
|
|
188
|
+
* Browsers without WebP support cannot decode the frames — fall back to `<img>`.
|
|
189
|
+
*/
|
|
190
|
+
|
|
191
|
+
interface WebpChunk {
|
|
192
|
+
type: string;
|
|
193
|
+
data: Uint8Array;
|
|
194
|
+
}
|
|
195
|
+
interface WebpFrameInfo {
|
|
196
|
+
x: number;
|
|
197
|
+
y: number;
|
|
198
|
+
width: number;
|
|
199
|
+
height: number;
|
|
200
|
+
delay: number;
|
|
201
|
+
blend: FramePart['blend'];
|
|
202
|
+
dispose: FramePart['dispose'];
|
|
203
|
+
/** The frame's image chunks (ALPH? + VP8, or VP8L). */
|
|
204
|
+
chunks: WebpChunk[];
|
|
205
|
+
}
|
|
206
|
+
interface WebpInfo {
|
|
207
|
+
width: number;
|
|
208
|
+
height: number;
|
|
209
|
+
animated: boolean;
|
|
210
|
+
/** ANIM loop count (0 = forever); 1 for a still image. */
|
|
211
|
+
plays: number;
|
|
212
|
+
/** ANIM background colour as [r, g, b, a] (a hint; browsers composite on transparent). */
|
|
213
|
+
background: [number, number, number, number];
|
|
214
|
+
frames: WebpFrameInfo[];
|
|
215
|
+
}
|
|
216
|
+
/** Read RIFF chunks from `start` to `end` (pure). */
|
|
217
|
+
declare function riffChunks(b: Uint8Array, start?: number, end?: number): WebpChunk[];
|
|
218
|
+
/** Parse the container (pure; no pixels decoded). */
|
|
219
|
+
declare function parseWebp(input: Uint8Array | ArrayBuffer): WebpInfo;
|
|
220
|
+
/** Rebuild every frame as a standalone (still) WebP file (pure). */
|
|
221
|
+
declare function webpFrameFiles(info: WebpInfo): Uint8Array[];
|
|
222
|
+
/** Decode an animated (or still) WebP into composited RGBA frames. */
|
|
223
|
+
declare function decodeWebp(input: Uint8Array | ArrayBuffer, o?: {
|
|
224
|
+
decode?: FrameDecoder;
|
|
225
|
+
}): Promise<AnimatedImage & {
|
|
226
|
+
info: WebpInfo;
|
|
227
|
+
}>;
|
|
228
|
+
/** Fetch (URL) or read (ArrayBuffer / Blob / bytes) and decode a WebP. */
|
|
229
|
+
declare function loadWebp(src: string | ArrayBuffer | ArrayBufferView | Blob, o?: {
|
|
230
|
+
decode?: FrameDecoder;
|
|
231
|
+
}): Promise<AnimatedImage & {
|
|
232
|
+
info: WebpInfo;
|
|
233
|
+
}>;
|
|
234
|
+
interface FormatWebpApi {
|
|
235
|
+
parseWebp: typeof parseWebp;
|
|
236
|
+
webpFrameFiles: typeof webpFrameFiles;
|
|
237
|
+
decodeWebp: typeof decodeWebp;
|
|
238
|
+
loadWebp: typeof loadWebp;
|
|
239
|
+
animatedImagePlayer: typeof animatedImagePlayer;
|
|
240
|
+
}
|
|
241
|
+
/** The module object for `use(formatWebp)`. */
|
|
242
|
+
declare const formatWebp: RuntimeModule<FormatWebpApi>;
|
|
243
|
+
|
|
244
|
+
export { animatedImagePlayer, decodeWebp, formatWebp, loadWebp, parseWebp, riffChunks, webpFrameFiles };
|
|
245
|
+
export type { AnimFrame, AnimPlayer, AnimPlayerOptions, AnimatedImage, FormatWebpApi, FrameDecoder, Rgba, WebpChunk, WebpFrameInfo, WebpInfo };
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/** A runtime module: `{ id, version, api }`, registered with `use()`. */
|
|
2
|
+
interface RuntimeModule<A = unknown> {
|
|
3
|
+
/** Module id: 'core', 'format-css', 'scroll', … (import path `motionary/runtime/<id>`). */
|
|
4
|
+
id: string;
|
|
5
|
+
version: string;
|
|
6
|
+
/** Other modules this one needs (registered first by `use()` callers). */
|
|
7
|
+
requires?: string[];
|
|
8
|
+
/** The module's public API (what `requireModule(id)` returns). */
|
|
9
|
+
api: A;
|
|
10
|
+
/** Optional one-time setup, called on first registration. */
|
|
11
|
+
setup?(registry: RuntimeRegistry): void;
|
|
12
|
+
}
|
|
13
|
+
interface RuntimeRegistry {
|
|
14
|
+
version: string;
|
|
15
|
+
modules: Map<string, RuntimeModule>;
|
|
16
|
+
/** Shared per-page state slots (the ticker lives here). */
|
|
17
|
+
slots: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Easing functions (t ∈ [0, 1] → progress). Original implementations of the standard Penner-style curves. */
|
|
21
|
+
type Ease = (t: number) => number;
|
|
22
|
+
|
|
23
|
+
type Target = object | Element;
|
|
24
|
+
type Props = Record<string, number | string>;
|
|
25
|
+
interface PlayOptions {
|
|
26
|
+
/** Delay before the first iteration, ms. */
|
|
27
|
+
delay?: number;
|
|
28
|
+
/** Extra iterations (-1 = forever). */
|
|
29
|
+
repeat?: number;
|
|
30
|
+
/** Alternate direction on every other iteration. */
|
|
31
|
+
yoyo?: boolean;
|
|
32
|
+
/** Start paused (`play()` to start). */
|
|
33
|
+
paused?: boolean;
|
|
34
|
+
onUpdate?: (progress: number) => void;
|
|
35
|
+
onComplete?: () => void;
|
|
36
|
+
}
|
|
37
|
+
interface TweenOptions extends PlayOptions {
|
|
38
|
+
to?: Props;
|
|
39
|
+
from?: Props;
|
|
40
|
+
/** ms (default 600). */
|
|
41
|
+
duration?: number;
|
|
42
|
+
ease?: string | Ease;
|
|
43
|
+
/** Delay added per target index (ms) when several targets are given. */
|
|
44
|
+
stagger?: number;
|
|
45
|
+
}
|
|
46
|
+
/** Common playback: delay, repeat, yoyo, direction, ticker attachment, promise. */
|
|
47
|
+
declare abstract class Playable {
|
|
48
|
+
delay: number;
|
|
49
|
+
repeat: number;
|
|
50
|
+
yoyo: boolean;
|
|
51
|
+
/** Playback rate multiplier. */
|
|
52
|
+
timeScale: number;
|
|
53
|
+
onUpdate?: (progress: number) => void;
|
|
54
|
+
onComplete?: () => void;
|
|
55
|
+
protected _t: number;
|
|
56
|
+
private _dir;
|
|
57
|
+
private _off;
|
|
58
|
+
private _done;
|
|
59
|
+
private _resolve;
|
|
60
|
+
/** Resolves on completion (forward end, or start when reversed). */
|
|
61
|
+
finished: Promise<void>;
|
|
62
|
+
/** Set when owned by a timeline (then the ticker never drives it). */
|
|
63
|
+
parent: Timeline | null;
|
|
64
|
+
constructor(o: PlayOptions);
|
|
65
|
+
/** One iteration, ms. */
|
|
66
|
+
abstract get duration(): number;
|
|
67
|
+
/** Render at `ms` into one iteration. */
|
|
68
|
+
protected abstract renderLocal(ms: number, iterationEnded: boolean): void;
|
|
69
|
+
get totalDuration(): number;
|
|
70
|
+
get time(): number;
|
|
71
|
+
get progress(): number;
|
|
72
|
+
set progress(p: number);
|
|
73
|
+
get isActive(): boolean;
|
|
74
|
+
get reversed(): boolean;
|
|
75
|
+
/** Jump to `ms` (total time, including the delay) and render. */
|
|
76
|
+
seek(ms: number): this;
|
|
77
|
+
play(): this;
|
|
78
|
+
pause(): this;
|
|
79
|
+
/** Play backwards from the current time. */
|
|
80
|
+
reverse(): this;
|
|
81
|
+
restart(): this;
|
|
82
|
+
/** Stop and detach for good. */
|
|
83
|
+
kill(): void;
|
|
84
|
+
/** Promise-like: `await tween(...)`. */
|
|
85
|
+
then<R>(ok?: (v: void) => R, err?: (e: unknown) => R): Promise<R>;
|
|
86
|
+
private attach;
|
|
87
|
+
private advance;
|
|
88
|
+
protected complete(): void;
|
|
89
|
+
}
|
|
90
|
+
/** Position: ms number, '<' (start of previous), '>' (end of previous, default), '+=200' / '-=200' (relative to the end), 'label', 'label+=100', '<+=100'. */
|
|
91
|
+
type Position = number | string;
|
|
92
|
+
interface TimelineOptions extends PlayOptions {
|
|
93
|
+
/** Defaults merged into every `.to()`. */
|
|
94
|
+
defaults?: Omit<TweenOptions, 'to' | 'from'>;
|
|
95
|
+
}
|
|
96
|
+
/** A sequence of tweens, nested timelines and callbacks. */
|
|
97
|
+
declare class Timeline extends Playable {
|
|
98
|
+
private children;
|
|
99
|
+
private labels;
|
|
100
|
+
private prevStart;
|
|
101
|
+
private prevEnd;
|
|
102
|
+
private defaults;
|
|
103
|
+
private lastLocal;
|
|
104
|
+
constructor(o?: TimelineOptions);
|
|
105
|
+
get duration(): number;
|
|
106
|
+
private resolve;
|
|
107
|
+
/** Add a tween, timeline or callback at a position. */
|
|
108
|
+
add(item: Playable | (() => void), position?: Position): this;
|
|
109
|
+
/** `tween(target, vars)` placed at `position` (stagger across several targets). */
|
|
110
|
+
to(target: Target | Target[] | ArrayLike<Target>, vars: TweenOptions, position?: Position): this;
|
|
111
|
+
call(fn: () => void, position?: Position): this;
|
|
112
|
+
label(name: string, position?: Position): this;
|
|
113
|
+
/** Time of a label, ms. */
|
|
114
|
+
labelTime(name: string): number | undefined;
|
|
115
|
+
remove(item: Playable): void;
|
|
116
|
+
/** Children in start order (callbacks excluded). */
|
|
117
|
+
getChildren(): Playable[];
|
|
118
|
+
protected renderLocal(ms: number): void;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Shared internals of the animated-image loaders (`format-gif`, `format-apng`,
|
|
123
|
+
* `format-webp`, 10.4): the decoded-animation shape, frame compositing in
|
|
124
|
+
* plain RGBA arrays (no DOM — works in workers and on the server), the
|
|
125
|
+
* browser image decoder used for APNG / WebP frames, and the canvas player
|
|
126
|
+
* (a runtime `Playable`, so it can be paused, reversed, scrubbed and driven
|
|
127
|
+
* by a scroll scene). Bundled into each loader; not a public module.
|
|
128
|
+
*/
|
|
129
|
+
|
|
130
|
+
/** An RGBA bitmap (the shape of `ImageData`, without needing the DOM). */
|
|
131
|
+
interface Rgba {
|
|
132
|
+
width: number;
|
|
133
|
+
height: number;
|
|
134
|
+
data: Uint8ClampedArray;
|
|
135
|
+
}
|
|
136
|
+
/** One frame of an animation, already composited to the full canvas size. */
|
|
137
|
+
interface AnimFrame {
|
|
138
|
+
/** Display time, ms. */
|
|
139
|
+
delay: number;
|
|
140
|
+
image: Rgba;
|
|
141
|
+
}
|
|
142
|
+
interface AnimatedImage {
|
|
143
|
+
format: 'gif' | 'apng' | 'webp';
|
|
144
|
+
width: number;
|
|
145
|
+
height: number;
|
|
146
|
+
/** Number of plays: 0 = forever, 1 = once, … */
|
|
147
|
+
plays: number;
|
|
148
|
+
frames: AnimFrame[];
|
|
149
|
+
}
|
|
150
|
+
/** A frame region before compositing (APNG fcTL / WebP ANMF / GIF descriptor). */
|
|
151
|
+
interface FramePart {
|
|
152
|
+
x: number;
|
|
153
|
+
y: number;
|
|
154
|
+
image: Rgba;
|
|
155
|
+
delay: number;
|
|
156
|
+
/** 'over' alpha-blends onto the canvas, 'source' replaces the region. */
|
|
157
|
+
blend: 'over' | 'source';
|
|
158
|
+
/** What happens to the region after the frame is shown. */
|
|
159
|
+
dispose: 'none' | 'background' | 'previous';
|
|
160
|
+
}
|
|
161
|
+
/** Image decoder for one frame file (PNG / WebP bytes) → RGBA. Replaceable (workers, tests, servers). */
|
|
162
|
+
type FrameDecoder = (bytes: Uint8Array, mime: string) => Promise<Rgba>;
|
|
163
|
+
interface AnimPlayerOptions {
|
|
164
|
+
/** Extra repeats; default from the file (`plays`: 0 → forever). */
|
|
165
|
+
repeat?: number;
|
|
166
|
+
yoyo?: boolean;
|
|
167
|
+
paused?: boolean;
|
|
168
|
+
/** Playback speed (default 1). */
|
|
169
|
+
speed?: number;
|
|
170
|
+
}
|
|
171
|
+
type AnimPlayer = Playable & {
|
|
172
|
+
readonly frame: number;
|
|
173
|
+
readonly frameCount: number;
|
|
174
|
+
};
|
|
175
|
+
/** Play a decoded animation on a canvas as a runtime timeline (seek / reverse / `progress` scrub). */
|
|
176
|
+
declare function animatedImagePlayer(canvas: HTMLCanvasElement | OffscreenCanvas, anim: AnimatedImage, o?: AnimPlayerOptions): AnimPlayer;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* `motionary/runtime/format-webp` (10.4) — animated WebP loader written for
|
|
180
|
+
* Motionary: reads the RIFF container (`VP8X`, `ANIM`, `ANMF`), rebuilds each
|
|
181
|
+
* frame (lossy `VP8 ` with optional `ALPH`, or lossless `VP8L`) as a
|
|
182
|
+
* standalone WebP file that the browser's own decoder decodes, then
|
|
183
|
+
* composites the frames (blending on / off, dispose to background) into
|
|
184
|
+
* full-size RGBA. A still WebP loads as a one-frame animation.
|
|
185
|
+
*
|
|
186
|
+
* `parseWebp()` and `webpFrameFiles()` are pure (no DOM); `decodeWebp()` uses
|
|
187
|
+
* the browser decoder by default (also in workers) or your own `{ decode }`.
|
|
188
|
+
* Browsers without WebP support cannot decode the frames — fall back to `<img>`.
|
|
189
|
+
*/
|
|
190
|
+
|
|
191
|
+
interface WebpChunk {
|
|
192
|
+
type: string;
|
|
193
|
+
data: Uint8Array;
|
|
194
|
+
}
|
|
195
|
+
interface WebpFrameInfo {
|
|
196
|
+
x: number;
|
|
197
|
+
y: number;
|
|
198
|
+
width: number;
|
|
199
|
+
height: number;
|
|
200
|
+
delay: number;
|
|
201
|
+
blend: FramePart['blend'];
|
|
202
|
+
dispose: FramePart['dispose'];
|
|
203
|
+
/** The frame's image chunks (ALPH? + VP8, or VP8L). */
|
|
204
|
+
chunks: WebpChunk[];
|
|
205
|
+
}
|
|
206
|
+
interface WebpInfo {
|
|
207
|
+
width: number;
|
|
208
|
+
height: number;
|
|
209
|
+
animated: boolean;
|
|
210
|
+
/** ANIM loop count (0 = forever); 1 for a still image. */
|
|
211
|
+
plays: number;
|
|
212
|
+
/** ANIM background colour as [r, g, b, a] (a hint; browsers composite on transparent). */
|
|
213
|
+
background: [number, number, number, number];
|
|
214
|
+
frames: WebpFrameInfo[];
|
|
215
|
+
}
|
|
216
|
+
/** Read RIFF chunks from `start` to `end` (pure). */
|
|
217
|
+
declare function riffChunks(b: Uint8Array, start?: number, end?: number): WebpChunk[];
|
|
218
|
+
/** Parse the container (pure; no pixels decoded). */
|
|
219
|
+
declare function parseWebp(input: Uint8Array | ArrayBuffer): WebpInfo;
|
|
220
|
+
/** Rebuild every frame as a standalone (still) WebP file (pure). */
|
|
221
|
+
declare function webpFrameFiles(info: WebpInfo): Uint8Array[];
|
|
222
|
+
/** Decode an animated (or still) WebP into composited RGBA frames. */
|
|
223
|
+
declare function decodeWebp(input: Uint8Array | ArrayBuffer, o?: {
|
|
224
|
+
decode?: FrameDecoder;
|
|
225
|
+
}): Promise<AnimatedImage & {
|
|
226
|
+
info: WebpInfo;
|
|
227
|
+
}>;
|
|
228
|
+
/** Fetch (URL) or read (ArrayBuffer / Blob / bytes) and decode a WebP. */
|
|
229
|
+
declare function loadWebp(src: string | ArrayBuffer | ArrayBufferView | Blob, o?: {
|
|
230
|
+
decode?: FrameDecoder;
|
|
231
|
+
}): Promise<AnimatedImage & {
|
|
232
|
+
info: WebpInfo;
|
|
233
|
+
}>;
|
|
234
|
+
interface FormatWebpApi {
|
|
235
|
+
parseWebp: typeof parseWebp;
|
|
236
|
+
webpFrameFiles: typeof webpFrameFiles;
|
|
237
|
+
decodeWebp: typeof decodeWebp;
|
|
238
|
+
loadWebp: typeof loadWebp;
|
|
239
|
+
animatedImagePlayer: typeof animatedImagePlayer;
|
|
240
|
+
}
|
|
241
|
+
/** The module object for `use(formatWebp)`. */
|
|
242
|
+
declare const formatWebp: RuntimeModule<FormatWebpApi>;
|
|
243
|
+
|
|
244
|
+
export { animatedImagePlayer, decodeWebp, formatWebp, loadWebp, parseWebp, riffChunks, webpFrameFiles };
|
|
245
|
+
export type { AnimFrame, AnimPlayer, AnimPlayerOptions, AnimatedImage, FormatWebpApi, FrameDecoder, Rgba, WebpChunk, WebpFrameInfo, WebpInfo };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(t,e,a){"use strict";function n(t,e,a,n){const i=new Uint8ClampedArray(t*e*4),r=[];for(const n of a){const a="previous"===n.dispose?i.slice():null,{width:s,height:o,data:h}=n.image;for(let a=0;a<o;a++){const r=n.y+a;if(!(r<0||r>=e))for(let e=0;e<s;e++){const o=n.x+e;if(o<0||o>=t)continue;const f=4*(a*s+e),d=4*(r*t+o),c=h[f+3];if("source"===n.blend||255===c)i[d]=h[f],i[d+1]=h[f+1],i[d+2]=h[f+2],i[d+3]=c;else if(c){const t=i[d+3]/255,e=c/255,a=e+t*(1-e);for(let n=0;n<3;n++)i[d+n]=(h[f+n]*e+i[d+n]*t*(1-e))/a;i[d+3]=255*a}}}if(r.push({delay:n.delay,image:{width:t,height:e,data:i.slice()}}),"background"===n.dispose)for(let a=Math.max(0,n.y);a<Math.min(e,n.y+o);a++)for(let e=Math.max(0,n.x);e<Math.min(t,n.x+s);e++)i.set([0,0,0,0],4*(a*t+e));else a&&i.set(a)}return r}const i=async(t,e)=>{const a=globalThis;if("function"!=typeof a.createImageBitmap)throw new Error("[motionary] no image decoder here (createImageBitmap is missing) — pass { decode } to the loader");const n=await a.createImageBitmap(new Blob([t],{type:e})),i=n.width,r=n.height,s=("function"==typeof a.OffscreenCanvas?new a.OffscreenCanvas(i,r):Object.assign(document.createElement("canvas"),{width:i,height:r})).getContext("2d",{willReadFrequently:!0});s.drawImage(n,0,0),n.close?.();const o=s.getImageData(0,0,i,r);return{width:o.width,height:o.height,data:o.data}};class r extends a.Playable{constructor(t,e,a){super({repeat:a.repeat??(0===e.plays?-1:Math.max(0,e.plays-1)),yoyo:a.yoyo}),this.canvas=t,this.anim=e,this.times=[0],this.cur=-1,this.timeScale=a.speed||1;for(const t of e.frames)this.times.push(this.times[this.times.length-1]+t.delay);t.width!==e.width&&(t.width=e.width),t.height!==e.height&&(t.height=e.height),this.ctx=t.getContext("2d"),this.datas=e.frames.map(()=>null),this.show(0),a.paused||this.play()}get duration(){return this.times[this.times.length-1]}get frame(){return this.cur}get frameCount(){return this.anim.frames.length}renderLocal(t){const e=Math.min(t,this.duration-.001);let a=0,n=this.anim.frames.length-1;for(;a<n;){const t=a+n+1>>1;this.times[t]<=e?a=t:n=t-1}this.show(a)}show(t){if(t===this.cur||!this.ctx)return;this.cur=t;const e=this.anim.frames[t];if(!e)return;let a=this.datas[t];a||"function"!=typeof ImageData||(a=this.datas[t]=new ImageData(new Uint8ClampedArray(e.image.data),e.image.width,e.image.height)),a&&this.ctx.putImageData(a,0,0)}}function s(t,e,a={}){if(!e.frames.length)throw new Error("[motionary] animatedImagePlayer: the animation has no frames");return new r(t,e,a)}const o=(t,e)=>t[e]|t[e+1]<<8|t[e+2]<<16,h=(t,e)=>(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0,f=(t,e)=>String.fromCharCode(t[e],t[e+1],t[e+2],t[e+3]);function d(t,e=12,a=t.length){const n=[];let i=e;for(;i+8<=a;){const e=h(t,i+4);n.push({type:f(t,i),data:t.subarray(i+8,i+8+e)}),i+=8+e+(1&e)}return n}function c(t){const e=(t=>t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength))(t);if("RIFF"!==f(e,0)||"WEBP"!==f(e,8))throw new Error("[motionary] format-webp: not a WebP file");const a=d(e,12,Math.min(e.length,8+h(e,4))),n=a.find(t=>"VP8X"===t.type),i=a.find(t=>"ANIM"===t.type),r=a.filter(t=>"ANMF"===t.type);if(n&&i&&r.length){const t=o(n.data,4)+1,e=o(n.data,7)+1,a=i.data,s=r.map(t=>{const e=t.data,a=e[15];return{x:2*o(e,0),y:2*o(e,3),width:o(e,6)+1,height:o(e,9)+1,delay:(n=o(e,12),n<=10?100:n),blend:2&a?"source":"over",dispose:1&a?"background":"none",chunks:d(e,16,e.length).filter(t=>/^(ALPH|VP8 |VP8L)$/.test(t.type))};var n});return{width:t,height:e,animated:!0,plays:a[4]|a[5]<<8,background:[a[2],a[1],a[0],a[3]],frames:s}}const s=a.filter(t=>/^(ALPH|VP8 |VP8L)$/.test(t.type)),c=s.find(t=>"ALPH"!==t.type);if(!c)throw new Error("[motionary] format-webp: no image data");const[m,u]=n?[o(n.data,4)+1,o(n.data,7)+1]:function(t){const e=t.data;if("VP8L"===t.type){const t=h(e,1);return[1+(16383&t),1+(t>>14&16383)]}return[16383&(e[6]|e[7]<<8),16383&(e[8]|e[9]<<8)]}(c);return{width:m,height:u,animated:!1,plays:1,background:[0,0,0,0],frames:[{x:0,y:0,width:m,height:u,delay:100,blend:"source",dispose:"none",chunks:s}]}}function m(t){const e=t.reduce((t,e)=>t+8+e.data.length+(1&e.data.length),4),a=new Uint8Array(8+e),n=new DataView(a.buffer),i=(t,e)=>{for(let n=0;n<4;n++)a[e+n]=t.charCodeAt(n)};i("RIFF",0),n.setUint32(4,e,!0),i("WEBP",8);let r=12;for(const e of t)i(e.type,r),n.setUint32(r+4,e.data.length,!0),a.set(e.data,r+8),r+=8+e.data.length+(1&e.data.length);return a}function u(t){return t.frames.map(t=>{if(!t.chunks.some(t=>"ALPH"===t.type))return m(t.chunks.filter(t=>"ALPH"!==t.type));const e=new Uint8Array(10);e[0]=16;const a=t.width-1,n=t.height-1;return e.set([255&a,a>>8&255,a>>16&255,255&n,n>>8&255,n>>16&255],4),m([{type:"VP8X",data:e},...t.chunks])})}async function l(t,e={}){const a=c(t),r=e.decode||i,s=await Promise.all(u(a).map(t=>r(t,"image/webp"))),o=a.frames.map((t,e)=>({x:t.x,y:t.y,image:s[e],delay:t.delay,blend:t.blend,dispose:t.dispose}));return{format:"webp",width:a.width,height:a.height,plays:a.plays,frames:n(a.width,a.height,o),info:a}}async function y(t,e={}){return l(await async function(t){if("string"==typeof t){const e=await fetch(t);if(!e.ok)throw new Error(`[motionary] could not load ${t} (${e.status})`);return new Uint8Array(await e.arrayBuffer())}return t instanceof ArrayBuffer?new Uint8Array(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(await t.arrayBuffer())}(t),e)}const g={id:"format-webp",version:e.RUNTIME_VERSION,requires:["core"],api:{parseWebp:c,webpFrameFiles:u,decodeWebp:l,loadWebp:y,animatedImagePlayer:s}};e.register(g),t.animatedImagePlayer=s,t.decodeWebp=l,t.formatWebp=g,t.loadWebp=y,t.parseWebp=c,t.riffChunks=d,t.webpFrameFiles=u}(this.MotionaryRuntime=this.MotionaryRuntime||{},MotionaryRuntime,MotionaryRuntime);
|
|
2
|
+
//# sourceMappingURL=format-webp.iife.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-webp.iife.js","sources":["../../src/runtime/anim-image.ts","../../src/runtime/format-webp.ts","../../src/runtime/iife/format-webp.ts"],"sourcesContent":["/**\n * Shared internals of the animated-image loaders (`format-gif`, `format-apng`,\n * `format-webp`, 10.4): the decoded-animation shape, frame compositing in\n * plain RGBA arrays (no DOM — works in workers and on the server), the\n * browser image decoder used for APNG / WebP frames, and the canvas player\n * (a runtime `Playable`, so it can be paused, reversed, scrubbed and driven\n * by a scroll scene). Bundled into each loader; not a public module.\n */\nimport { Playable } from './tween';\n\n/** An RGBA bitmap (the shape of `ImageData`, without needing the DOM). */\nexport interface Rgba {\n width: number;\n height: number;\n data: Uint8ClampedArray;\n}\n\n/** One frame of an animation, already composited to the full canvas size. */\nexport interface AnimFrame {\n /** Display time, ms. */\n delay: number;\n image: Rgba;\n}\n\nexport interface AnimatedImage {\n format: 'gif' | 'apng' | 'webp';\n width: number;\n height: number;\n /** Number of plays: 0 = forever, 1 = once, … */\n plays: number;\n frames: AnimFrame[];\n}\n\n/** A frame region before compositing (APNG fcTL / WebP ANMF / GIF descriptor). */\nexport interface FramePart {\n x: number;\n y: number;\n image: Rgba;\n delay: number;\n /** 'over' alpha-blends onto the canvas, 'source' replaces the region. */\n blend: 'over' | 'source';\n /** What happens to the region after the frame is shown. */\n dispose: 'none' | 'background' | 'previous';\n}\n\n/** Browsers clamp tiny delays (0–10 ms) to 100 ms; we do the same. */\nexport const fixDelay = (ms: number): number => (ms <= 10 ? 100 : ms);\n\n/** Composite frame parts onto a `width × height` canvas (pure; RGBA in, RGBA out). */\nexport function composeFrames(width: number, height: number, parts: FramePart[], background?: [number, number, number, number]): AnimFrame[] {\n const canvas = new Uint8ClampedArray(width * height * 4);\n const out: AnimFrame[] = [];\n for (const p of parts) {\n const before = p.dispose === 'previous' ? canvas.slice() : null;\n const { width: w, height: h, data } = p.image;\n for (let y = 0; y < h; y++) {\n const cy = p.y + y;\n if (cy < 0 || cy >= height) continue;\n for (let x = 0; x < w; x++) {\n const cx = p.x + x;\n if (cx < 0 || cx >= width) continue;\n const s = (y * w + x) * 4, d = (cy * width + cx) * 4;\n const a = data[s + 3];\n if (p.blend === 'source' || a === 255) {\n canvas[d] = data[s]; canvas[d + 1] = data[s + 1]; canvas[d + 2] = data[s + 2]; canvas[d + 3] = a;\n } else if (a) {\n // straight-alpha \"over\"\n const da = canvas[d + 3] / 255, sa = a / 255, oa = sa + da * (1 - sa);\n for (let c = 0; c < 3; c++) canvas[d + c] = (data[s + c] * sa + canvas[d + c] * da * (1 - sa)) / oa;\n canvas[d + 3] = oa * 255;\n }\n }\n }\n out.push({ delay: p.delay, image: { width, height, data: canvas.slice() } });\n if (p.dispose === 'background') {\n for (let y = Math.max(0, p.y); y < Math.min(height, p.y + h); y++)\n for (let x = Math.max(0, p.x); x < Math.min(width, p.x + w); x++) canvas.set(background || [0, 0, 0, 0], (y * width + x) * 4);\n } else if (before) canvas.set(before);\n }\n return out;\n}\n\n/** Image decoder for one frame file (PNG / WebP bytes) → RGBA. Replaceable (workers, tests, servers). */\nexport type FrameDecoder = (bytes: Uint8Array, mime: string) => Promise<Rgba>;\n\n/** Default decoder: the browser's own (`createImageBitmap` + a 2D canvas; OffscreenCanvas in workers). */\nexport const browserDecode: FrameDecoder = async (bytes, mime) => {\n const g = globalThis as any;\n if (typeof g.createImageBitmap !== 'function') throw new Error('[motionary] no image decoder here (createImageBitmap is missing) — pass { decode } to the loader');\n const bmp = await g.createImageBitmap(new Blob([bytes as BlobPart], { type: mime }));\n const w = bmp.width, h = bmp.height; // read before close(): a closed ImageBitmap reports 0 × 0\n const c = typeof g.OffscreenCanvas === 'function' ? new g.OffscreenCanvas(w, h) : Object.assign(document.createElement('canvas'), { width: w, height: h });\n const ctx = c.getContext('2d', { willReadFrequently: true });\n ctx.drawImage(bmp, 0, 0);\n bmp.close?.();\n const id = ctx.getImageData(0, 0, w, h);\n return { width: id.width, height: id.height, data: id.data };\n};\n\n/** Read a `src` (URL, ArrayBuffer, typed array or Blob) into bytes. */\nexport async function bytesOf(src: string | ArrayBuffer | ArrayBufferView | Blob): Promise<Uint8Array> {\n if (typeof src === 'string') {\n const r = await fetch(src);\n if (!r.ok) throw new Error(`[motionary] could not load ${src} (${r.status})`);\n return new Uint8Array(await r.arrayBuffer());\n }\n if (src instanceof ArrayBuffer) return new Uint8Array(src);\n if (ArrayBuffer.isView(src)) return new Uint8Array(src.buffer, src.byteOffset, src.byteLength);\n return new Uint8Array(await (src as Blob).arrayBuffer());\n}\n\nexport interface AnimPlayerOptions {\n /** Extra repeats; default from the file (`plays`: 0 → forever). */\n repeat?: number;\n yoyo?: boolean;\n paused?: boolean;\n /** Playback speed (default 1). */\n speed?: number;\n}\n\nexport type AnimPlayer = Playable & { readonly frame: number; readonly frameCount: number };\n\nclass AnimImagePlayer extends Playable {\n private times: number[] = [0];\n private cur = -1;\n private ctx: CanvasRenderingContext2D | null;\n private datas: (ImageData | null)[];\n constructor(private canvas: HTMLCanvasElement | OffscreenCanvas, private anim: AnimatedImage, o: AnimPlayerOptions) {\n super({ repeat: o.repeat ?? (anim.plays === 0 ? -1 : Math.max(0, anim.plays - 1)), yoyo: o.yoyo });\n this.timeScale = o.speed || 1;\n for (const f of anim.frames) this.times.push(this.times[this.times.length - 1] + f.delay);\n if (canvas.width !== anim.width) canvas.width = anim.width;\n if (canvas.height !== anim.height) canvas.height = anim.height;\n this.ctx = canvas.getContext('2d') as CanvasRenderingContext2D | null;\n this.datas = anim.frames.map(() => null);\n this.show(0);\n if (!o.paused) this.play();\n }\n get duration(): number {\n return this.times[this.times.length - 1];\n }\n get frame(): number {\n return this.cur;\n }\n get frameCount(): number {\n return this.anim.frames.length;\n }\n protected renderLocal(ms: number): void {\n const t = Math.min(ms, this.duration - 0.001);\n let lo = 0, hi = this.anim.frames.length - 1;\n while (lo < hi) {\n const mid = (lo + hi + 1) >> 1;\n if (this.times[mid] <= t) lo = mid;\n else hi = mid - 1;\n }\n this.show(lo);\n }\n private show(i: number): void {\n if (i === this.cur || !this.ctx) return;\n this.cur = i;\n const f = this.anim.frames[i];\n if (!f) return;\n let d = this.datas[i];\n if (!d && typeof ImageData === 'function') d = this.datas[i] = new ImageData(new Uint8ClampedArray(f.image.data), f.image.width, f.image.height);\n if (d) this.ctx.putImageData(d, 0, 0);\n }\n}\n\n/** Play a decoded animation on a canvas as a runtime timeline (seek / reverse / `progress` scrub). */\nexport function animatedImagePlayer(canvas: HTMLCanvasElement | OffscreenCanvas, anim: AnimatedImage, o: AnimPlayerOptions = {}): AnimPlayer {\n if (!anim.frames.length) throw new Error('[motionary] animatedImagePlayer: the animation has no frames');\n return new AnimImagePlayer(canvas, anim, o);\n}\n\n/** A plain Uint8Array view (Node Buffers' `slice()` shares memory — normalise them away). */\nexport const u8 = (x: Uint8Array | ArrayBuffer): Uint8Array => (x instanceof ArrayBuffer ? new Uint8Array(x) : new Uint8Array(x.buffer, x.byteOffset, x.byteLength));\n\n/** CRC-32 (PNG chunks). */\nlet CRC: Uint32Array | null = null;\nexport function crc32(bytes: Uint8Array, start = 0, end = bytes.length): number {\n if (!CRC) {\n CRC = new Uint32Array(256);\n for (let n = 0; n < 256; n++) {\n let c = n;\n for (let k = 0; k < 8; k++) c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;\n CRC[n] = c >>> 0;\n }\n }\n let c = 0xffffffff;\n for (let i = start; i < end; i++) c = CRC[(c ^ bytes[i]) & 0xff] ^ (c >>> 8);\n return (c ^ 0xffffffff) >>> 0;\n}\n","/**\n * `motionary/runtime/format-webp` (10.4) — animated WebP loader written for\n * Motionary: reads the RIFF container (`VP8X`, `ANIM`, `ANMF`), rebuilds each\n * frame (lossy `VP8 ` with optional `ALPH`, or lossless `VP8L`) as a\n * standalone WebP file that the browser's own decoder decodes, then\n * composites the frames (blending on / off, dispose to background) into\n * full-size RGBA. A still WebP loads as a one-frame animation.\n *\n * `parseWebp()` and `webpFrameFiles()` are pure (no DOM); `decodeWebp()` uses\n * the browser decoder by default (also in workers) or your own `{ decode }`.\n * Browsers without WebP support cannot decode the frames — fall back to `<img>`.\n */\nimport { RUNTIME_VERSION, type RuntimeModule } from './registry';\nimport { composeFrames, fixDelay, bytesOf, browserDecode, animatedImagePlayer, u8, type AnimatedImage, type FramePart, type FrameDecoder } from './anim-image';\n\nexport type { AnimatedImage, AnimFrame, Rgba, AnimPlayer, AnimPlayerOptions, FrameDecoder } from './anim-image';\nexport { animatedImagePlayer } from './anim-image';\n\nexport interface WebpChunk {\n type: string;\n data: Uint8Array;\n}\n\nexport interface WebpFrameInfo {\n x: number;\n y: number;\n width: number;\n height: number;\n delay: number;\n blend: FramePart['blend'];\n dispose: FramePart['dispose'];\n /** The frame's image chunks (ALPH? + VP8, or VP8L). */\n chunks: WebpChunk[];\n}\n\nexport interface WebpInfo {\n width: number;\n height: number;\n animated: boolean;\n /** ANIM loop count (0 = forever); 1 for a still image. */\n plays: number;\n /** ANIM background colour as [r, g, b, a] (a hint; browsers composite on transparent). */\n background: [number, number, number, number];\n frames: WebpFrameInfo[];\n}\n\nconst u24 = (b: Uint8Array, i: number) => b[i] | (b[i + 1] << 8) | (b[i + 2] << 16);\nconst u32le = (b: Uint8Array, i: number) => (b[i] | (b[i + 1] << 8) | (b[i + 2] << 16) | (b[i + 3] << 24)) >>> 0;\nconst tag = (b: Uint8Array, i: number) => String.fromCharCode(b[i], b[i + 1], b[i + 2], b[i + 3]);\n\n/** Read RIFF chunks from `start` to `end` (pure). */\nexport function riffChunks(b: Uint8Array, start = 12, end = b.length): WebpChunk[] {\n const out: WebpChunk[] = [];\n let p = start;\n while (p + 8 <= end) {\n const n = u32le(b, p + 4);\n out.push({ type: tag(b, p), data: b.subarray(p + 8, p + 8 + n) });\n p += 8 + n + (n & 1);\n }\n return out;\n}\n\n/** Size of a still VP8 / VP8L bitstream. */\nfunction bitstreamSize(c: WebpChunk): [number, number] {\n const d = c.data;\n if (c.type === 'VP8L') {\n const bits = u32le(d, 1);\n return [(bits & 0x3fff) + 1, ((bits >> 14) & 0x3fff) + 1];\n }\n return [(d[6] | (d[7] << 8)) & 0x3fff, (d[8] | (d[9] << 8)) & 0x3fff];\n}\n\n/** Parse the container (pure; no pixels decoded). */\nexport function parseWebp(input: Uint8Array | ArrayBuffer): WebpInfo {\n const b = u8(input);\n if (tag(b, 0) !== 'RIFF' || tag(b, 8) !== 'WEBP') throw new Error('[motionary] format-webp: not a WebP file');\n const chunks = riffChunks(b, 12, Math.min(b.length, 8 + u32le(b, 4)));\n const x = chunks.find((c) => c.type === 'VP8X');\n const anim = chunks.find((c) => c.type === 'ANIM');\n const anmf = chunks.filter((c) => c.type === 'ANMF');\n if (x && anim && anmf.length) {\n const width = u24(x.data, 4) + 1, height = u24(x.data, 7) + 1;\n const bg = anim.data;\n const frames = anmf.map((f): WebpFrameInfo => {\n const d = f.data, flags = d[15];\n return { x: u24(d, 0) * 2, y: u24(d, 3) * 2, width: u24(d, 6) + 1, height: u24(d, 9) + 1, delay: fixDelay(u24(d, 12)), blend: flags & 2 ? 'source' : 'over', dispose: flags & 1 ? 'background' : 'none', chunks: riffChunks(d, 16, d.length).filter((c) => /^(ALPH|VP8 |VP8L)$/.test(c.type)) };\n });\n // ANIM background is stored B, G, R, A\n return { width, height, animated: true, plays: bg[4] | (bg[5] << 8), background: [bg[2], bg[1], bg[0], bg[3]], frames };\n }\n const img = chunks.filter((c) => /^(ALPH|VP8 |VP8L)$/.test(c.type));\n const main = img.find((c) => c.type !== 'ALPH');\n if (!main) throw new Error('[motionary] format-webp: no image data');\n const [w, h] = x ? [u24(x.data, 4) + 1, u24(x.data, 7) + 1] : bitstreamSize(main);\n return { width: w, height: h, animated: false, plays: 1, background: [0, 0, 0, 0], frames: [{ x: 0, y: 0, width: w, height: h, delay: 100, blend: 'source', dispose: 'none', chunks: img }] };\n}\n\nfunction riff(chunks: WebpChunk[]): Uint8Array {\n const size = chunks.reduce((n, c) => n + 8 + c.data.length + (c.data.length & 1), 4);\n const out = new Uint8Array(8 + size);\n const v = new DataView(out.buffer);\n const put = (s: string, i: number) => { for (let k = 0; k < 4; k++) out[i + k] = s.charCodeAt(k); };\n put('RIFF', 0);\n v.setUint32(4, size, true);\n put('WEBP', 8);\n let p = 12;\n for (const c of chunks) {\n put(c.type, p);\n v.setUint32(p + 4, c.data.length, true);\n out.set(c.data, p + 8);\n p += 8 + c.data.length + (c.data.length & 1);\n }\n return out;\n}\n\n/** Rebuild every frame as a standalone (still) WebP file (pure). */\nexport function webpFrameFiles(info: WebpInfo): Uint8Array[] {\n return info.frames.map((f) => {\n if (!f.chunks.some((c) => c.type === 'ALPH')) return riff(f.chunks.filter((c) => c.type !== 'ALPH'));\n // lossy + alpha needs an extended header (VP8X with the alpha flag)\n const vp8x = new Uint8Array(10);\n vp8x[0] = 0x10;\n const w = f.width - 1, h = f.height - 1;\n vp8x.set([w & 255, (w >> 8) & 255, (w >> 16) & 255, h & 255, (h >> 8) & 255, (h >> 16) & 255], 4);\n return riff([{ type: 'VP8X', data: vp8x }, ...f.chunks]);\n });\n}\n\n/** Decode an animated (or still) WebP into composited RGBA frames. */\nexport async function decodeWebp(input: Uint8Array | ArrayBuffer, o: { decode?: FrameDecoder } = {}): Promise<AnimatedImage & { info: WebpInfo }> {\n const info = parseWebp(input);\n const decode = o.decode || browserDecode;\n const images = await Promise.all(webpFrameFiles(info).map((f) => decode(f, 'image/webp')));\n const parts: FramePart[] = info.frames.map((f, i) => ({ x: f.x, y: f.y, image: images[i], delay: f.delay, blend: f.blend, dispose: f.dispose }));\n return { format: 'webp', width: info.width, height: info.height, plays: info.plays, frames: composeFrames(info.width, info.height, parts), info };\n}\n\n/** Fetch (URL) or read (ArrayBuffer / Blob / bytes) and decode a WebP. */\nexport async function loadWebp(src: string | ArrayBuffer | ArrayBufferView | Blob, o: { decode?: FrameDecoder } = {}): Promise<AnimatedImage & { info: WebpInfo }> {\n return decodeWebp(await bytesOf(src), o);\n}\n\nexport interface FormatWebpApi {\n parseWebp: typeof parseWebp;\n webpFrameFiles: typeof webpFrameFiles;\n decodeWebp: typeof decodeWebp;\n loadWebp: typeof loadWebp;\n animatedImagePlayer: typeof animatedImagePlayer;\n}\n\n/** The module object for `use(formatWebp)`. */\nexport const formatWebp: RuntimeModule<FormatWebpApi> = { id: 'format-webp', version: RUNTIME_VERSION, requires: ['core'], api: { parseWebp, webpFrameFiles, decodeWebp, loadWebp, animatedImagePlayer } };\n","// CDN build: load runtime.iife.js first, then this file → registers motionary/runtime/format-webp and adds its API to window.MotionaryRuntime.\nimport { register } from '../registry';\nimport { formatWebp } from '../format-webp';\nexport * from '../format-webp';\nregister(formatWebp);\n"],"names":["composeFrames","width","height","parts","background","canvas","Uint8ClampedArray","out","p","before","dispose","slice","w","h","data","image","y","cy","x","cx","s","d","a","blend","da","sa","oa","c","push","delay","Math","max","min","set","browserDecode","async","bytes","mime","g","globalThis","createImageBitmap","Error","bmp","Blob","type","ctx","OffscreenCanvas","Object","assign","document","createElement","getContext","willReadFrequently","drawImage","close","id","getImageData","AnimImagePlayer","Playable","constructor","anim","o","super","repeat","plays","yoyo","this","times","cur","timeScale","speed","f","frames","length","datas","map","show","paused","play","duration","frame","frameCount","renderLocal","ms","t","lo","hi","mid","i","ImageData","putImageData","animatedImagePlayer","u24","b","u32le","tag","String","fromCharCode","riffChunks","start","end","n","subarray","parseWebp","input","ArrayBuffer","Uint8Array","buffer","byteOffset","byteLength","u8","chunks","find","anmf","filter","bg","flags","test","animated","img","main","bits","bitstreamSize","riff","size","reduce","v","DataView","put","k","charCodeAt","setUint32","webpFrameFiles","info","some","vp8x","decodeWebp","decode","images","Promise","all","format","loadWebp","src","r","fetch","ok","status","arrayBuffer","isView","bytesOf","formatWebp","version","RUNTIME_VERSION","requires","api","register"],"mappings":"8BAiDM,SAAUA,EAAcC,EAAeC,EAAgBC,EAAoBC,GAC/E,MAAMC,EAAS,IAAIC,kBAAkBL,EAAQC,EAAS,GAChDK,EAAmB,GACzB,IAAK,MAAMC,KAAKL,EAAO,CACrB,MAAMM,EAAuB,aAAdD,EAAEE,QAAyBL,EAAOM,QAAU,MACnDV,MAAOW,EAAGV,OAAQW,EAACC,KAAEA,GAASN,EAAEO,MACxC,IAAK,IAAIC,EAAI,EAAGA,EAAIH,EAAGG,IAAK,CAC1B,MAAMC,EAAKT,EAAEQ,EAAIA,EACjB,KAAIC,EAAK,GAAKA,GAAMf,GACpB,IAAK,IAAIgB,EAAI,EAAGA,EAAIN,EAAGM,IAAK,CAC1B,MAAMC,EAAKX,EAAEU,EAAIA,EACjB,GAAIC,EAAK,GAAKA,GAAMlB,EAAO,SAC3B,MAAMmB,EAAkB,GAAbJ,EAAIJ,EAAIM,GAAQG,EAAwB,GAAnBJ,EAAKhB,EAAQkB,GACvCG,EAAIR,EAAKM,EAAI,GACnB,GAAgB,WAAZZ,EAAEe,OAA4B,MAAND,EAC1BjB,EAAOgB,GAAKP,EAAKM,GAAIf,EAAOgB,EAAI,GAAKP,EAAKM,EAAI,GAAIf,EAAOgB,EAAI,GAAKP,EAAKM,EAAI,GAAIf,EAAOgB,EAAI,GAAKC,OAC1F,GAAIA,EAAG,CAEZ,MAAME,EAAKnB,EAAOgB,EAAI,GAAK,IAAKI,EAAKH,EAAI,IAAKI,EAAKD,EAAKD,GAAM,EAAIC,GAClE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