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,115 @@
|
|
|
1
|
+
import { R as RUNTIME_VERSION } from '../chunks/registry-CT-TT_bx.js';
|
|
2
|
+
import { a as animatedImagePlayer, b as browserDecode, c as composeFrames, d as bytesOf, u as u8, f as fixDelay } from '../chunks/anim-image-DDdb9q3X.js';
|
|
3
|
+
import '../chunks/tween-BcejKpsx.js';
|
|
4
|
+
import '../chunks/ticker-C8lSGml9.js';
|
|
5
|
+
import '../chunks/ease-XN8_0sXu.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* `motionary/runtime/format-webp` (10.4) — animated WebP loader written for
|
|
9
|
+
* Motionary: reads the RIFF container (`VP8X`, `ANIM`, `ANMF`), rebuilds each
|
|
10
|
+
* frame (lossy `VP8 ` with optional `ALPH`, or lossless `VP8L`) as a
|
|
11
|
+
* standalone WebP file that the browser's own decoder decodes, then
|
|
12
|
+
* composites the frames (blending on / off, dispose to background) into
|
|
13
|
+
* full-size RGBA. A still WebP loads as a one-frame animation.
|
|
14
|
+
*
|
|
15
|
+
* `parseWebp()` and `webpFrameFiles()` are pure (no DOM); `decodeWebp()` uses
|
|
16
|
+
* the browser decoder by default (also in workers) or your own `{ decode }`.
|
|
17
|
+
* Browsers without WebP support cannot decode the frames — fall back to `<img>`.
|
|
18
|
+
*/
|
|
19
|
+
const u24 = (b, i) => b[i] | (b[i + 1] << 8) | (b[i + 2] << 16);
|
|
20
|
+
const u32le = (b, i) => (b[i] | (b[i + 1] << 8) | (b[i + 2] << 16) | (b[i + 3] << 24)) >>> 0;
|
|
21
|
+
const tag = (b, i) => String.fromCharCode(b[i], b[i + 1], b[i + 2], b[i + 3]);
|
|
22
|
+
/** Read RIFF chunks from `start` to `end` (pure). */
|
|
23
|
+
function riffChunks(b, start = 12, end = b.length) {
|
|
24
|
+
const out = [];
|
|
25
|
+
let p = start;
|
|
26
|
+
while (p + 8 <= end) {
|
|
27
|
+
const n = u32le(b, p + 4);
|
|
28
|
+
out.push({ type: tag(b, p), data: b.subarray(p + 8, p + 8 + n) });
|
|
29
|
+
p += 8 + n + (n & 1);
|
|
30
|
+
}
|
|
31
|
+
return out;
|
|
32
|
+
}
|
|
33
|
+
/** Size of a still VP8 / VP8L bitstream. */
|
|
34
|
+
function bitstreamSize(c) {
|
|
35
|
+
const d = c.data;
|
|
36
|
+
if (c.type === 'VP8L') {
|
|
37
|
+
const bits = u32le(d, 1);
|
|
38
|
+
return [(bits & 0x3fff) + 1, ((bits >> 14) & 0x3fff) + 1];
|
|
39
|
+
}
|
|
40
|
+
return [(d[6] | (d[7] << 8)) & 0x3fff, (d[8] | (d[9] << 8)) & 0x3fff];
|
|
41
|
+
}
|
|
42
|
+
/** Parse the container (pure; no pixels decoded). */
|
|
43
|
+
function parseWebp(input) {
|
|
44
|
+
const b = u8(input);
|
|
45
|
+
if (tag(b, 0) !== 'RIFF' || tag(b, 8) !== 'WEBP')
|
|
46
|
+
throw new Error('[motionary] format-webp: not a WebP file');
|
|
47
|
+
const chunks = riffChunks(b, 12, Math.min(b.length, 8 + u32le(b, 4)));
|
|
48
|
+
const x = chunks.find((c) => c.type === 'VP8X');
|
|
49
|
+
const anim = chunks.find((c) => c.type === 'ANIM');
|
|
50
|
+
const anmf = chunks.filter((c) => c.type === 'ANMF');
|
|
51
|
+
if (x && anim && anmf.length) {
|
|
52
|
+
const width = u24(x.data, 4) + 1, height = u24(x.data, 7) + 1;
|
|
53
|
+
const bg = anim.data;
|
|
54
|
+
const frames = anmf.map((f) => {
|
|
55
|
+
const d = f.data, flags = d[15];
|
|
56
|
+
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)) };
|
|
57
|
+
});
|
|
58
|
+
// ANIM background is stored B, G, R, A
|
|
59
|
+
return { width, height, animated: true, plays: bg[4] | (bg[5] << 8), background: [bg[2], bg[1], bg[0], bg[3]], frames };
|
|
60
|
+
}
|
|
61
|
+
const img = chunks.filter((c) => /^(ALPH|VP8 |VP8L)$/.test(c.type));
|
|
62
|
+
const main = img.find((c) => c.type !== 'ALPH');
|
|
63
|
+
if (!main)
|
|
64
|
+
throw new Error('[motionary] format-webp: no image data');
|
|
65
|
+
const [w, h] = x ? [u24(x.data, 4) + 1, u24(x.data, 7) + 1] : bitstreamSize(main);
|
|
66
|
+
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 }] };
|
|
67
|
+
}
|
|
68
|
+
function riff(chunks) {
|
|
69
|
+
const size = chunks.reduce((n, c) => n + 8 + c.data.length + (c.data.length & 1), 4);
|
|
70
|
+
const out = new Uint8Array(8 + size);
|
|
71
|
+
const v = new DataView(out.buffer);
|
|
72
|
+
const put = (s, i) => { for (let k = 0; k < 4; k++)
|
|
73
|
+
out[i + k] = s.charCodeAt(k); };
|
|
74
|
+
put('RIFF', 0);
|
|
75
|
+
v.setUint32(4, size, true);
|
|
76
|
+
put('WEBP', 8);
|
|
77
|
+
let p = 12;
|
|
78
|
+
for (const c of chunks) {
|
|
79
|
+
put(c.type, p);
|
|
80
|
+
v.setUint32(p + 4, c.data.length, true);
|
|
81
|
+
out.set(c.data, p + 8);
|
|
82
|
+
p += 8 + c.data.length + (c.data.length & 1);
|
|
83
|
+
}
|
|
84
|
+
return out;
|
|
85
|
+
}
|
|
86
|
+
/** Rebuild every frame as a standalone (still) WebP file (pure). */
|
|
87
|
+
function webpFrameFiles(info) {
|
|
88
|
+
return info.frames.map((f) => {
|
|
89
|
+
if (!f.chunks.some((c) => c.type === 'ALPH'))
|
|
90
|
+
return riff(f.chunks.filter((c) => c.type !== 'ALPH'));
|
|
91
|
+
// lossy + alpha needs an extended header (VP8X with the alpha flag)
|
|
92
|
+
const vp8x = new Uint8Array(10);
|
|
93
|
+
vp8x[0] = 0x10;
|
|
94
|
+
const w = f.width - 1, h = f.height - 1;
|
|
95
|
+
vp8x.set([w & 255, (w >> 8) & 255, (w >> 16) & 255, h & 255, (h >> 8) & 255, (h >> 16) & 255], 4);
|
|
96
|
+
return riff([{ type: 'VP8X', data: vp8x }, ...f.chunks]);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/** Decode an animated (or still) WebP into composited RGBA frames. */
|
|
100
|
+
async function decodeWebp(input, o = {}) {
|
|
101
|
+
const info = parseWebp(input);
|
|
102
|
+
const decode = o.decode || browserDecode;
|
|
103
|
+
const images = await Promise.all(webpFrameFiles(info).map((f) => decode(f, 'image/webp')));
|
|
104
|
+
const parts = info.frames.map((f, i) => ({ x: f.x, y: f.y, image: images[i], delay: f.delay, blend: f.blend, dispose: f.dispose }));
|
|
105
|
+
return { format: 'webp', width: info.width, height: info.height, plays: info.plays, frames: composeFrames(info.width, info.height, parts), info };
|
|
106
|
+
}
|
|
107
|
+
/** Fetch (URL) or read (ArrayBuffer / Blob / bytes) and decode a WebP. */
|
|
108
|
+
async function loadWebp(src, o = {}) {
|
|
109
|
+
return decodeWebp(await bytesOf(src), o);
|
|
110
|
+
}
|
|
111
|
+
/** The module object for `use(formatWebp)`. */
|
|
112
|
+
const formatWebp = { id: 'format-webp', version: RUNTIME_VERSION, requires: ['core'], api: { parseWebp, webpFrameFiles, decodeWebp, loadWebp, animatedImagePlayer } };
|
|
113
|
+
|
|
114
|
+
export { animatedImagePlayer, decodeWebp, formatWebp, loadWebp, parseWebp, riffChunks, webpFrameFiles };
|
|
115
|
+
//# sourceMappingURL=format-webp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-webp.js","sources":["../../src/runtime/format-webp.ts"],"sourcesContent":["/**\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"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;AAWG;AAmCH,MAAM,GAAG,GAAG,CAAC,CAAa,EAAE,CAAS,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AACnF,MAAM,KAAK,GAAG,CAAC,CAAa,EAAE,CAAS,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC;AAChH,MAAM,GAAG,GAAG,CAAC,CAAa,EAAE,CAAS,KAAK,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAEjG;AACM,SAAU,UAAU,CAAC,CAAa,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,GAAG,CAAC,CAAC,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K,CAAC,EAAE,IAAI,EAAE;AACnJ;AAEA;AACO,eAAe,QAAQ,CAAC,GAAkD,EAAE,IAA+B,EAAE,EAAA;IAClH,OAAO,UAAU,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC1C;AAUA;AACO,MAAM,UAAU,GAAiC,EAAE,EAAE,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,mBAAmB,EAAE;;"}
|
package/dist/runtime/scroll.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var registry = require('../chunks/registry-
|
|
4
|
-
var ticker = require('../chunks/ticker-
|
|
3
|
+
var registry = require('../chunks/registry-tzwKkldE.cjs');
|
|
4
|
+
var ticker = require('../chunks/ticker-Un0bvTWR.cjs');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* `motionary/runtime/scroll` (10.2) — scroll-linked scenes, an original
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll.cjs","sources":["../../src/runtime/scroll.ts"],"sourcesContent":["/**\n * `motionary/runtime/scroll` (10.2) — scroll-linked scenes, an original\n * implementation: start / end rules, scrubbing (direct or smoothed), pinning,\n * debug markers, enter / leave callbacks and per-edge actions for a runtime\n * tween or timeline.\n *\n * ```ts\n * import { use, timeline } from 'motionary/runtime';\n * import { scroll, scrollScene } from 'motionary/runtime/scroll';\n * use(scroll);\n * const tl = timeline({ paused: true }).to('.card', { to: { x: 200, rotate: 8 } });\n * scrollScene({ trigger: '.section', start: 'top 80%', end: 'bottom 20%', scrub: 120, pin: true, markers: true, animation: tl });\n * ```\n *\n * Rules: `\"<trigger edge> <viewport edge>\"` where an edge is `top | center | bottom`,\n * a percentage or pixels, optionally `+=N` / `-=N` (e.g. `\"top top+=80\"`);\n * `end` may also be `\"+=600\"` (pixels after start). Horizontal scenes use\n * `left | center | right`. Nothing touches `window` until a scene is created.\n */\nimport { RUNTIME_VERSION, type RuntimeModule } from './registry';\nimport { getTicker } from './ticker';\nimport type { Playable } from './tween';\n\nexport type SceneAction = 'play' | 'pause' | 'resume' | 'reverse' | 'restart' | 'reset' | 'complete' | 'none';\n\nexport interface SceneOptions {\n /** Element (or selector) whose position defines the scene. */\n trigger: Element | string;\n /** Default 'top bottom' (trigger top meets viewport bottom). */\n start?: string;\n /** Default 'bottom top'. `'+=600'` = 600 px after start. */\n end?: string;\n /** Link the animation to the scroll position: `true` (direct) or a smoothing time in ms. */\n scrub?: boolean | number;\n /** Runtime tween / timeline (created `paused: true`). */\n animation?: Playable;\n /** Without scrub: actions on enter, leave, enter back, leave back. Default 'play none none reverse'. */\n actions?: string;\n /** Pin the trigger (or another element) while the scene is active. */\n pin?: boolean | Element | string;\n /** Show start / end markers (debugging). */\n markers?: boolean | { color?: string };\n /** Class toggled on the trigger while active. */\n toggleClass?: string;\n /** Kill after the first forward completion. */\n once?: boolean;\n horizontal?: boolean;\n /** Scroll container (default: the window). */\n scroller?: Element | string;\n onEnter?: (s: ScrollScene) => void;\n onLeave?: (s: ScrollScene) => void;\n onEnterBack?: (s: ScrollScene) => void;\n onLeaveBack?: (s: ScrollScene) => void;\n onUpdate?: (s: ScrollScene) => void;\n onToggle?: (s: ScrollScene) => void;\n}\n\nconst KEYWORDS: Record<string, number> = { top: 0, left: 0, center: 0.5, bottom: 1, right: 1 };\n\n/** One side of a rule ('top', '80%', '120px', 'center+=40') → pixels within `size`. */\nexport function parseEdge(spec: string, size: number): number {\n const m = /^([a-z]+|-?[\\d.]+%|-?[\\d.]+(?:px)?)?\\s*(?:([+-])=\\s*(-?[\\d.]+)(px|%)?)?$/.exec(spec.trim());\n if (!m) throw new Error(`[motionary] scroll: bad edge \"${spec}\"`);\n let v = 0;\n const b = m[1] || '0';\n if (b in KEYWORDS) v = KEYWORDS[b] * size;\n else if (b.endsWith('%')) v = (parseFloat(b) / 100) * size;\n else if (/^-?[\\d.]/.test(b)) v = parseFloat(b);\n else throw new Error(`[motionary] scroll: bad edge \"${spec}\"`);\n if (m[2]) {\n const n = m[4] === '%' ? (parseFloat(m[3]) / 100) * size : parseFloat(m[3]);\n v += m[2] === '+' ? n : -n;\n }\n return v;\n}\n\n/** Scroll offset at which `rule` is met: trigger edge (at `triggerStart`, size `triggerSize`) meets viewport edge. */\nexport function resolveRule(rule: string, triggerStart: number, triggerSize: number, viewport: number): number {\n const parts = rule.trim().split(/\\s+(?![+-]=)/);\n const t = parts[0] ?? 'top';\n const s = parts[1] ?? 'bottom';\n return triggerStart + parseEdge(t, triggerSize) - parseEdge(s, viewport);\n}\n\nconst scenes = new Set<ScrollScene>();\nconst q = (x: Element | string): Element => {\n const el = typeof x === 'string' ? document.querySelector(x) : x;\n if (!el) throw new Error(`[motionary] scroll: element \"${x}\" not found`);\n return el;\n};\n\n/** A scroll scene (see `scrollScene()`). */\nexport class ScrollScene {\n readonly trigger: Element;\n readonly options: SceneOptions;\n /** Scroll offsets (px) of the start and end. */\n start = 0;\n end = 0;\n /** 0 → 1 between start and end. */\n progress = 0;\n /** 1 scrolling forward, -1 back. */\n direction = 1;\n isActive = false;\n private shown = 0;\n private last = -1;\n private offs: (() => void)[] = [];\n private pinEl: HTMLElement | null = null;\n private spacer: HTMLElement | null = null;\n private marks: HTMLElement[] = [];\n private scroller: Element | Window;\n private killed = false;\n\n constructor(o: SceneOptions) {\n if (typeof window === 'undefined') throw new Error('[motionary] scroll scenes need a browser window');\n this.options = o;\n this.trigger = q(o.trigger);\n this.scroller = o.scroller ? q(o.scroller) : window;\n if (o.pin) this.setupPin(o.pin === true ? (this.trigger as HTMLElement) : (q(o.pin) as HTMLElement));\n const target: EventTarget = this.scroller;\n const onScroll = () => this.update();\n target.addEventListener('scroll', onScroll, { passive: true });\n window.addEventListener('resize', this.refreshBound);\n this.offs.push(() => target.removeEventListener('scroll', onScroll), () => window.removeEventListener('resize', this.refreshBound));\n if (o.scrub && typeof o.scrub === 'number') this.offs.push(getTicker().add((_, dt) => this.smooth(dt)));\n scenes.add(this);\n this.refresh();\n }\n private refreshBound = () => this.refresh();\n\n private pos(): number {\n const s = this.scroller as any;\n if (s === window) return this.options.horizontal ? window.scrollX : window.scrollY;\n return this.options.horizontal ? s.scrollLeft : s.scrollTop;\n }\n private viewport(): number {\n const s = this.scroller as any;\n if (s === window) return this.options.horizontal ? window.innerWidth : window.innerHeight;\n return this.options.horizontal ? s.clientWidth : s.clientHeight;\n }\n\n /** Re-measure start / end (after layout changes). */\n refresh(): void {\n if (this.killed) return;\n const h = !!this.options.horizontal;\n const ref = (this.spacer || this.trigger) as Element;\n const r = ref.getBoundingClientRect();\n const sr = this.scroller === window ? { top: 0, left: 0 } : (this.scroller as Element).getBoundingClientRect();\n const tStart = (h ? r.left - sr.left : r.top - sr.top) + this.pos();\n const tSize = (this.pinEl ? (h ? this.pinEl.offsetWidth : this.pinEl.offsetHeight) : h ? r.width : r.height) || 0;\n const vp = this.viewport();\n this.start = resolveRule(this.options.start || (h ? 'left right' : 'top bottom'), tStart, tSize, vp);\n const e = this.options.end || (h ? 'right left' : 'bottom top');\n this.end = /^\\+=/.test(e.trim()) ? this.start + parseFloat(e.trim().slice(2)) : resolveRule(e, tStart, tSize, vp);\n if (this.end <= this.start) this.end = this.start + 1;\n if (this.spacer && this.pinEl) this.spacer.style[h ? 'paddingRight' : 'paddingBottom'] = `${this.end - this.start}px`;\n this.drawMarkers(vp);\n this.last = -1;\n this.update();\n }\n\n /** Read the scroll position and fire callbacks / drive the animation. */\n update(): void {\n if (this.killed) return;\n const y = this.pos();\n const p = Math.min(1, Math.max(0, (y - this.start) / (this.end - this.start)));\n if (y !== this.last && this.last >= 0) this.direction = y > this.last ? 1 : -1;\n const prev = this.progress;\n const was = this.isActive;\n this.progress = p;\n this.isActive = y > this.start && y < this.end;\n this.last = y;\n const o = this.options;\n if (this.isActive !== was || (prev === 0 && p === 1) || (prev === 1 && p === 0)) {\n const toggles: [keyof SceneOptions, number][] = [];\n if (p > 0 && prev === 0) toggles.push(['onEnter', 0]);\n if (p === 1 && prev < 1) toggles.push(['onLeave', 1]);\n if (p < 1 && prev === 1) toggles.push(['onEnterBack', 2]);\n if (p === 0 && prev > 0) toggles.push(['onLeaveBack', 3]);\n for (const [cb, i] of toggles) {\n (o[cb] as ((s: ScrollScene) => void) | undefined)?.(this);\n if (!o.scrub) this.act(i);\n }\n if (o.toggleClass) this.trigger.classList.toggle(o.toggleClass, this.isActive);\n o.onToggle?.(this);\n if (o.once && p === 1) {\n this.applyPin(1);\n this.kill(true);\n return;\n }\n }\n this.applyPin(p);\n if (o.scrub === true && o.animation) o.animation.progress = p;\n o.onUpdate?.(this);\n }\n\n private smooth(dt: number): void {\n const a = this.options.animation;\n if (!a) return;\n const k = 1 - Math.exp(-dt / Math.max(1, this.options.scrub as number));\n this.shown += (this.progress - this.shown) * k;\n if (Math.abs(this.progress - this.shown) < 0.0005) this.shown = this.progress;\n a.progress = this.shown;\n }\n\n private act(i: number): void {\n const a = this.options.animation;\n if (!a) return;\n const act = ((this.options.actions || 'play none none reverse').split(/\\s+/)[i] || 'none') as SceneAction;\n if (act === 'play') a.play();\n else if (act === 'pause') a.pause();\n else if (act === 'resume') a.play();\n else if (act === 'reverse') a.reverse();\n else if (act === 'restart') a.restart();\n else if (act === 'reset') (a.pause(), a.seek(0));\n else if (act === 'complete') (a.pause(), (a.progress = 1));\n }\n\n private setupPin(el: HTMLElement): void {\n this.pinEl = el;\n const sp = document.createElement('div');\n sp.className = 'usa-pin-spacer';\n sp.style.boxSizing = 'content-box';\n el.parentNode?.insertBefore(sp, el);\n sp.appendChild(el);\n this.spacer = sp;\n this.offs.push(() => {\n el.style.position = el.style.top = el.style.left = el.style.width = el.style.transform = '';\n sp.parentNode?.insertBefore(el, sp);\n sp.remove();\n });\n }\n\n private applyPin(p: number): void {\n const el = this.pinEl, sp = this.spacer;\n if (!el || !sp) return;\n const h = !!this.options.horizontal;\n if (p > 0 && p < 1 && this.scroller === window) {\n const r = sp.getBoundingClientRect();\n const offset = this.start - (h ? r.left + window.scrollX : r.top + window.scrollY);\n el.style.position = 'fixed';\n el.style.width = `${r.width}px`;\n el.style.left = h ? `${-offset}px` : `${r.left}px`;\n el.style.top = h ? `${r.top}px` : `${-offset}px`;\n el.style.transform = '';\n } else {\n el.style.position = el.style.top = el.style.left = el.style.width = '';\n // inside a scroll container (or after the end) pinning is done with a transform\n const d = p >= 1 ? this.end - this.start : p > 0 ? this.pos() - this.start : 0;\n el.style.transform = d ? (h ? `translateX(${d}px)` : `translateY(${d}px)`) : '';\n }\n }\n\n private drawMarkers(vp: number): void {\n this.marks.forEach((m) => m.remove());\n this.marks = [];\n const mk = this.options.markers;\n if (!mk) return;\n const color = (typeof mk === 'object' && mk.color) || '#e11d48';\n const h = !!this.options.horizontal;\n const host = this.scroller === window ? document.body : (this.scroller as HTMLElement);\n const line = (label: string, at: number, fixed: boolean, c: string) => {\n const d = document.createElement('div');\n d.className = 'usa-scroll-marker';\n d.textContent = label;\n d.setAttribute('aria-hidden', 'true');\n Object.assign(d.style, { position: fixed ? 'fixed' : 'absolute', [h ? 'left' : 'top']: `${at}px`, [h ? 'top' : 'right']: '0', [h ? 'height' : 'width']: '80px', [h ? 'borderLeft' : 'borderTop']: `2px solid ${c}`, color: c, font: '600 11px/1.2 ui-monospace,monospace', padding: '2px 4px', zIndex: '2147483646', pointerEvents: 'none', background: 'rgba(255,255,255,.7)' });\n (fixed ? document.body : host).appendChild(d);\n this.marks.push(d);\n };\n const rule = (r: string | undefined, d: string) => (r || d).trim().split(/\\s+(?![+-]=)/)[1] ?? 'bottom';\n line(`start ${this.start | 0}`, this.start, false, color);\n line(`end ${this.end | 0}`, this.end, false, color);\n line('scroller-start', parseEdge(rule(this.options.start, 'top bottom'), vp), true, '#16a34a');\n if (!/^\\+=/.test((this.options.end || '').trim())) line('scroller-end', parseEdge(rule(this.options.end, 'bottom top'), vp), true, '#2563eb');\n }\n\n /** Remove listeners, pin spacer and markers (`keepState` keeps the animation where it is). */\n kill(keepState = false): void {\n if (this.killed) return;\n this.killed = true;\n if (!keepState) this.options.animation?.pause();\n this.offs.splice(0).forEach((f) => f());\n this.marks.forEach((m) => m.remove());\n scenes.delete(this);\n }\n}\n\n/** Create a scroll scene. */\nexport function scrollScene(o: SceneOptions): ScrollScene {\n return new ScrollScene(o);\n}\n/** Re-measure every scene (call after layout changes such as images loading). */\nexport function refreshScenes(): void {\n scenes.forEach((s) => s.refresh());\n}\n/** Kill every scene. */\nexport function killScenes(): void {\n Array.from(scenes).forEach((s) => s.kill());\n}\n/** The live scenes. */\nexport const allScenes = (): ScrollScene[] => Array.from(scenes);\n\nexport interface ScrollApi {\n scrollScene: typeof scrollScene;\n refreshScenes: typeof refreshScenes;\n killScenes: typeof killScenes;\n allScenes: typeof allScenes;\n parseEdge: typeof parseEdge;\n resolveRule: typeof resolveRule;\n ScrollScene: typeof ScrollScene;\n}\n\n/** The module object for `use(scroll)`. */\nexport const scroll: RuntimeModule<ScrollApi> = { id: 'scroll', version: RUNTIME_VERSION, requires: ['core'], api: { scrollScene, refreshScenes, killScenes, allScenes, parseEdge, resolveRule, ScrollScene } };\n"],"names":["getTicker","RUNTIME_VERSION"],"mappings":";;;;;AAAA;;;;;;;;;;;;;;;;;;AAkBG;AAuCH,MAAM,QAAQ,GAA2B,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;AAE9F;AACM,SAAU,SAAS,CAAC,IAAY,EAAE,IAAY,EAAA;IAClD,MAAM,CAAC,GAAG,0EAA0E,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;AACtG,IAAA,IAAI,CAAC,CAAC;AAAE,QAAA,MAAM,IAAI,KAAK,CAAC,iCAAiC,IA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C,CAAC,MAAM,EAAE,CAAC;AACrC,QAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACrB;AACD;AAED;AACM,SAAU,WAAW,CAAC,CAAe,EAAA;AACzC,IAAA,OAAO,IAAI,WAAW,CAAC,CAAC,CAAC;AAC3B;AACA;SACgB,aAAa,GAAA;AAC3B,IAAA,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;AACpC;AACA;SACgB,UAAU,GAAA;AACxB,IAAA,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AAC7C;AACA;AACO,MAAM,SAAS,GAAG,MAAqB,KAAK,CAAC,IAAI,CAAC,MAAM;AAY/D;AACO,MAAM,MAAM,GAA6B,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAEC,wBAAe,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"scroll.cjs","sources":["../../src/runtime/scroll.ts"],"sourcesContent":["/**\n * `motionary/runtime/scroll` (10.2) — scroll-linked scenes, an original\n * implementation: start / end rules, scrubbing (direct or smoothed), pinning,\n * debug markers, enter / leave callbacks and per-edge actions for a runtime\n * tween or timeline.\n *\n * ```ts\n * import { use, timeline } from 'motionary/runtime';\n * import { scroll, scrollScene } from 'motionary/runtime/scroll';\n * use(scroll);\n * const tl = timeline({ paused: true }).to('.card', { to: { x: 200, rotate: 8 } });\n * scrollScene({ trigger: '.section', start: 'top 80%', end: 'bottom 20%', scrub: 120, pin: true, markers: true, animation: tl });\n * ```\n *\n * Rules: `\"<trigger edge> <viewport edge>\"` where an edge is `top | center | bottom`,\n * a percentage or pixels, optionally `+=N` / `-=N` (e.g. `\"top top+=80\"`);\n * `end` may also be `\"+=600\"` (pixels after start). Horizontal scenes use\n * `left | center | right`. Nothing touches `window` until a scene is created.\n */\nimport { RUNTIME_VERSION, type RuntimeModule } from './registry';\nimport { getTicker } from './ticker';\nimport type { Playable } from './tween';\n\nexport type SceneAction = 'play' | 'pause' | 'resume' | 'reverse' | 'restart' | 'reset' | 'complete' | 'none';\n\nexport interface SceneOptions {\n /** Element (or selector) whose position defines the scene. */\n trigger: Element | string;\n /** Default 'top bottom' (trigger top meets viewport bottom). */\n start?: string;\n /** Default 'bottom top'. `'+=600'` = 600 px after start. */\n end?: string;\n /** Link the animation to the scroll position: `true` (direct) or a smoothing time in ms. */\n scrub?: boolean | number;\n /** Runtime tween / timeline (created `paused: true`). */\n animation?: Playable;\n /** Without scrub: actions on enter, leave, enter back, leave back. Default 'play none none reverse'. */\n actions?: string;\n /** Pin the trigger (or another element) while the scene is active. */\n pin?: boolean | Element | string;\n /** Show start / end markers (debugging). */\n markers?: boolean | { color?: string };\n /** Class toggled on the trigger while active. */\n toggleClass?: string;\n /** Kill after the first forward completion. */\n once?: boolean;\n horizontal?: boolean;\n /** Scroll container (default: the window). */\n scroller?: Element | string;\n onEnter?: (s: ScrollScene) => void;\n onLeave?: (s: ScrollScene) => void;\n onEnterBack?: (s: ScrollScene) => void;\n onLeaveBack?: (s: ScrollScene) => void;\n onUpdate?: (s: ScrollScene) => void;\n onToggle?: (s: ScrollScene) => void;\n}\n\nconst KEYWORDS: Record<string, number> = { top: 0, left: 0, center: 0.5, bottom: 1, right: 1 };\n\n/** One side of a rule ('top', '80%', '120px', 'center+=40') → pixels within `size`. */\nexport function parseEdge(spec: string, size: number): number {\n const m = /^([a-z]+|-?[\\d.]+%|-?[\\d.]+(?:px)?)?\\s*(?:([+-])=\\s*(-?[\\d.]+)(px|%)?)?$/.exec(spec.trim());\n if (!m) throw new Error(`[motionary] scroll: bad edge \"${spec}\"`);\n let v = 0;\n const b = m[1] || '0';\n if (b in KEYWORDS) v = KEYWORDS[b] * size;\n else if (b.endsWith('%')) v = (parseFloat(b) / 100) * size;\n else if (/^-?[\\d.]/.test(b)) v = parseFloat(b);\n else throw new Error(`[motionary] scroll: bad edge \"${spec}\"`);\n if (m[2]) {\n const n = m[4] === '%' ? (parseFloat(m[3]) / 100) * size : parseFloat(m[3]);\n v += m[2] === '+' ? n : -n;\n }\n return v;\n}\n\n/** Scroll offset at which `rule` is met: trigger edge (at `triggerStart`, size `triggerSize`) meets viewport edge. */\nexport function resolveRule(rule: string, triggerStart: number, triggerSize: number, viewport: number): number {\n const parts = rule.trim().split(/\\s+(?![+-]=)/);\n const t = parts[0] ?? 'top';\n const s = parts[1] ?? 'bottom';\n return triggerStart + parseEdge(t, triggerSize) - parseEdge(s, viewport);\n}\n\nconst scenes = new Set<ScrollScene>();\nconst q = (x: Element | string): Element => {\n const el = typeof x === 'string' ? document.querySelector(x) : x;\n if (!el) throw new Error(`[motionary] scroll: element \"${x}\" not found`);\n return el;\n};\n\n/** A scroll scene (see `scrollScene()`). */\nexport class ScrollScene {\n readonly trigger: Element;\n readonly options: SceneOptions;\n /** Scroll offsets (px) of the start and end. */\n start = 0;\n end = 0;\n /** 0 → 1 between start and end. */\n progress = 0;\n /** 1 scrolling forward, -1 back. */\n direction = 1;\n isActive = false;\n private shown = 0;\n private last = -1;\n private offs: (() => void)[] = [];\n private pinEl: HTMLElement | null = null;\n private spacer: HTMLElement | null = null;\n private marks: HTMLElement[] = [];\n private scroller: Element | Window;\n private killed = false;\n\n constructor(o: SceneOptions) {\n if (typeof window === 'undefined') throw new Error('[motionary] scroll scenes need a browser window');\n this.options = o;\n this.trigger = q(o.trigger);\n this.scroller = o.scroller ? q(o.scroller) : window;\n if (o.pin) this.setupPin(o.pin === true ? (this.trigger as HTMLElement) : (q(o.pin) as HTMLElement));\n const target: EventTarget = this.scroller;\n const onScroll = () => this.update();\n target.addEventListener('scroll', onScroll, { passive: true });\n window.addEventListener('resize', this.refreshBound);\n this.offs.push(() => target.removeEventListener('scroll', onScroll), () => window.removeEventListener('resize', this.refreshBound));\n if (o.scrub && typeof o.scrub === 'number') this.offs.push(getTicker().add((_, dt) => this.smooth(dt)));\n scenes.add(this);\n this.refresh();\n }\n private refreshBound = () => this.refresh();\n\n private pos(): number {\n const s = this.scroller as any;\n if (s === window) return this.options.horizontal ? window.scrollX : window.scrollY;\n return this.options.horizontal ? s.scrollLeft : s.scrollTop;\n }\n private viewport(): number {\n const s = this.scroller as any;\n if (s === window) return this.options.horizontal ? window.innerWidth : window.innerHeight;\n return this.options.horizontal ? s.clientWidth : s.clientHeight;\n }\n\n /** Re-measure start / end (after layout changes). */\n refresh(): void {\n if (this.killed) return;\n const h = !!this.options.horizontal;\n const ref = (this.spacer || this.trigger) as Element;\n const r = ref.getBoundingClientRect();\n const sr = this.scroller === window ? { top: 0, left: 0 } : (this.scroller as Element).getBoundingClientRect();\n const tStart = (h ? r.left - sr.left : r.top - sr.top) + this.pos();\n const tSize = (this.pinEl ? (h ? this.pinEl.offsetWidth : this.pinEl.offsetHeight) : h ? r.width : r.height) || 0;\n const vp = this.viewport();\n this.start = resolveRule(this.options.start || (h ? 'left right' : 'top bottom'), tStart, tSize, vp);\n const e = this.options.end || (h ? 'right left' : 'bottom top');\n this.end = /^\\+=/.test(e.trim()) ? this.start + parseFloat(e.trim().slice(2)) : resolveRule(e, tStart, tSize, vp);\n if (this.end <= this.start) this.end = this.start + 1;\n if (this.spacer && this.pinEl) this.spacer.style[h ? 'paddingRight' : 'paddingBottom'] = `${this.end - this.start}px`;\n this.drawMarkers(vp);\n this.last = -1;\n this.update();\n }\n\n /** Read the scroll position and fire callbacks / drive the animation. */\n update(): void {\n if (this.killed) return;\n const y = this.pos();\n const p = Math.min(1, Math.max(0, (y - this.start) / (this.end - this.start)));\n if (y !== this.last && this.last >= 0) this.direction = y > this.last ? 1 : -1;\n const prev = this.progress;\n const was = this.isActive;\n this.progress = p;\n this.isActive = y > this.start && y < this.end;\n this.last = y;\n const o = this.options;\n if (this.isActive !== was || (prev === 0 && p === 1) || (prev === 1 && p === 0)) {\n const toggles: [keyof SceneOptions, number][] = [];\n if (p > 0 && prev === 0) toggles.push(['onEnter', 0]);\n if (p === 1 && prev < 1) toggles.push(['onLeave', 1]);\n if (p < 1 && prev === 1) toggles.push(['onEnterBack', 2]);\n if (p === 0 && prev > 0) toggles.push(['onLeaveBack', 3]);\n for (const [cb, i] of toggles) {\n (o[cb] as ((s: ScrollScene) => void) | undefined)?.(this);\n if (!o.scrub) this.act(i);\n }\n if (o.toggleClass) this.trigger.classList.toggle(o.toggleClass, this.isActive);\n o.onToggle?.(this);\n if (o.once && p === 1) {\n this.applyPin(1);\n this.kill(true);\n return;\n }\n }\n this.applyPin(p);\n if (o.scrub === true && o.animation) o.animation.progress = p;\n o.onUpdate?.(this);\n }\n\n private smooth(dt: number): void {\n const a = this.options.animation;\n if (!a) return;\n const k = 1 - Math.exp(-dt / Math.max(1, this.options.scrub as number));\n this.shown += (this.progress - this.shown) * k;\n if (Math.abs(this.progress - this.shown) < 0.0005) this.shown = this.progress;\n a.progress = this.shown;\n }\n\n private act(i: number): void {\n const a = this.options.animation;\n if (!a) return;\n const act = ((this.options.actions || 'play none none reverse').split(/\\s+/)[i] || 'none') as SceneAction;\n if (act === 'play') a.play();\n else if (act === 'pause') a.pause();\n else if (act === 'resume') a.play();\n else if (act === 'reverse') a.reverse();\n else if (act === 'restart') a.restart();\n else if (act === 'reset') (a.pause(), a.seek(0));\n else if (act === 'complete') (a.pause(), (a.progress = 1));\n }\n\n private setupPin(el: HTMLElement): void {\n this.pinEl = el;\n const sp = document.createElement('div');\n sp.className = 'usa-pin-spacer';\n sp.style.boxSizing = 'content-box';\n el.parentNode?.insertBefore(sp, el);\n sp.appendChild(el);\n this.spacer = sp;\n this.offs.push(() => {\n el.style.position = el.style.top = el.style.left = el.style.width = el.style.transform = '';\n sp.parentNode?.insertBefore(el, sp);\n sp.remove();\n });\n }\n\n private applyPin(p: number): void {\n const el = this.pinEl, sp = this.spacer;\n if (!el || !sp) return;\n const h = !!this.options.horizontal;\n if (p > 0 && p < 1 && this.scroller === window) {\n const r = sp.getBoundingClientRect();\n const offset = this.start - (h ? r.left + window.scrollX : r.top + window.scrollY);\n el.style.position = 'fixed';\n el.style.width = `${r.width}px`;\n el.style.left = h ? `${-offset}px` : `${r.left}px`;\n el.style.top = h ? `${r.top}px` : `${-offset}px`;\n el.style.transform = '';\n } else {\n el.style.position = el.style.top = el.style.left = el.style.width = '';\n // inside a scroll container (or after the end) pinning is done with a transform\n const d = p >= 1 ? this.end - this.start : p > 0 ? this.pos() - this.start : 0;\n el.style.transform = d ? (h ? `translateX(${d}px)` : `translateY(${d}px)`) : '';\n }\n }\n\n private drawMarkers(vp: number): void {\n this.marks.forEach((m) => m.remove());\n this.marks = [];\n const mk = this.options.markers;\n if (!mk) return;\n const color = (typeof mk === 'object' && mk.color) || '#e11d48';\n const h = !!this.options.horizontal;\n const host = this.scroller === window ? document.body : (this.scroller as HTMLElement);\n const line = (label: string, at: number, fixed: boolean, c: string) => {\n const d = document.createElement('div');\n d.className = 'usa-scroll-marker';\n d.textContent = label;\n d.setAttribute('aria-hidden', 'true');\n Object.assign(d.style, { position: fixed ? 'fixed' : 'absolute', [h ? 'left' : 'top']: `${at}px`, [h ? 'top' : 'right']: '0', [h ? 'height' : 'width']: '80px', [h ? 'borderLeft' : 'borderTop']: `2px solid ${c}`, color: c, font: '600 11px/1.2 ui-monospace,monospace', padding: '2px 4px', zIndex: '2147483646', pointerEvents: 'none', background: 'rgba(255,255,255,.7)' });\n (fixed ? document.body : host).appendChild(d);\n this.marks.push(d);\n };\n const rule = (r: string | undefined, d: string) => (r || d).trim().split(/\\s+(?![+-]=)/)[1] ?? 'bottom';\n line(`start ${this.start | 0}`, this.start, false, color);\n line(`end ${this.end | 0}`, this.end, false, color);\n line('scroller-start', parseEdge(rule(this.options.start, 'top bottom'), vp), true, '#16a34a');\n if (!/^\\+=/.test((this.options.end || '').trim())) line('scroller-end', parseEdge(rule(this.options.end, 'bottom top'), vp), true, '#2563eb');\n }\n\n /** Remove listeners, pin spacer and markers (`keepState` keeps the animation where it is). */\n kill(keepState = false): void {\n if (this.killed) return;\n this.killed = true;\n if (!keepState) this.options.animation?.pause();\n this.offs.splice(0).forEach((f) => f());\n this.marks.forEach((m) => m.remove());\n scenes.delete(this);\n }\n}\n\n/** Create a scroll scene. */\nexport function scrollScene(o: SceneOptions): ScrollScene {\n return new ScrollScene(o);\n}\n/** Re-measure every scene (call after layout changes such as images loading). */\nexport function refreshScenes(): void {\n scenes.forEach((s) => s.refresh());\n}\n/** Kill every scene. */\nexport function killScenes(): void {\n Array.from(scenes).forEach((s) => s.kill());\n}\n/** The live scenes. */\nexport const allScenes = (): ScrollScene[] => Array.from(scenes);\n\nexport interface ScrollApi {\n scrollScene: typeof scrollScene;\n refreshScenes: typeof refreshScenes;\n killScenes: typeof killScenes;\n allScenes: typeof allScenes;\n parseEdge: typeof parseEdge;\n resolveRule: typeof resolveRule;\n ScrollScene: typeof ScrollScene;\n}\n\n/** The module object for `use(scroll)`. */\nexport const scroll: RuntimeModule<ScrollApi> = { id: 'scroll', version: RUNTIME_VERSION, requires: ['core'], api: { scrollScene, refreshScenes, killScenes, allScenes, parseEdge, resolveRule, ScrollScene } };\n"],"names":["getTicker","RUNTIME_VERSION"],"mappings":";;;;;AAAA;;;;;;;;;;;;;;;;;;AAkBG;AAuCH,MAAM,QAAQ,GAA2B,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE;AAE9F;AACM,SAAU,SAAS,CAAC,IAAY,EAAE,IAAY,EAAA;IAClD,MAAM,CAAC,GAAG,0EAA0E,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;AACtG,IAAA,IAAI,CAAC,CAAC;AAAE,QAAA,MAAM,IAAI,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,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;AACrC,QAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACrB;AACD;AAED;AACM,SAAU,WAAW,CAAC,CAAe,EAAA;AACzC,IAAA,OAAO,IAAI,WAAW,CAAC,CAAC,CAAC;AAC3B;AACA;SACgB,aAAa,GAAA;AAC3B,IAAA,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;AACpC;AACA;SACgB,UAAU,GAAA;AACxB,IAAA,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AAC7C;AACA;AACO,MAAM,SAAS,GAAG,MAAqB,KAAK,CAAC,IAAI,CAAC,MAAM;AAY/D;AACO,MAAM,MAAM,GAA6B,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAEC,wBAAe,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE;;;;;;;;;"}
|
package/dist/runtime/scroll.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RUNTIME_VERSION } from '../chunks/registry-
|
|
2
|
-
import { g as getTicker } from '../chunks/ticker-
|
|
1
|
+
import { R as RUNTIME_VERSION } from '../chunks/registry-CT-TT_bx.js';
|
|
2
|
+
import { g as getTicker } from '../chunks/ticker-C8lSGml9.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `motionary/runtime/scroll` (10.2) — scroll-linked scenes, an original
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll.js","sources":["../../src/runtime/scroll.ts"],"sourcesContent":["/**\n * `motionary/runtime/scroll` (10.2) — scroll-linked scenes, an original\n * implementation: start / end rules, scrubbing (direct or smoothed), pinning,\n * debug markers, enter / leave callbacks and per-edge actions for a runtime\n * tween or timeline.\n *\n * ```ts\n * import { use, timeline } from 'motionary/runtime';\n * import { scroll, scrollScene } from 'motionary/runtime/scroll';\n * use(scroll);\n * const tl = timeline({ paused: true }).to('.card', { to: { x: 200, rotate: 8 } });\n * scrollScene({ trigger: '.section', start: 'top 80%', end: 'bottom 20%', scrub: 120, pin: true, markers: true, animation: tl });\n * ```\n *\n * Rules: `\"<trigger edge> <viewport edge>\"` where an edge is `top | center | bottom`,\n * a percentage or pixels, optionally `+=N` / `-=N` (e.g. `\"top top+=80\"`);\n * `end` may also be `\"+=600\"` (pixels after start). Horizontal scenes use\n * `left | center | right`. Nothing touches `window` until a scene is created.\n */\nimport { RUNTIME_VERSION, type RuntimeModule } from './registry';\nimport { getTicker } from './ticker';\nimport type { Playable } from './tween';\n\nexport type SceneAction = 'play' | 'pause' | 'resume' | 'reverse' | 'restart' | 'reset' | 'complete' | 'none';\n\nexport interface SceneOptions {\n /** Element (or selector) whose position defines the scene. */\n trigger: Element | string;\n /** Default 'top bottom' (trigger top meets viewport bottom). */\n start?: string;\n /** Default 'bottom top'. `'+=600'` = 600 px after start. */\n end?: string;\n /** Link the animation to the scroll position: `true` (direct) or a smoothing time in ms. */\n scrub?: boolean | number;\n /** Runtime tween / timeline (created `paused: true`). */\n animation?: Playable;\n /** Without scrub: actions on enter, leave, enter back, leave back. Default 'play none none reverse'. */\n actions?: string;\n /** Pin the trigger (or another element) while the scene is active. */\n pin?: boolean | Element | string;\n /** Show start / end markers (debugging). */\n markers?: boolean | { color?: string };\n /** Class toggled on the trigger while active. */\n toggleClass?: string;\n /** Kill after the first forward completion. */\n once?: boolean;\n horizontal?: boolean;\n /** Scroll container (default: the window). */\n scroller?: Element | string;\n onEnter?: (s: ScrollScene) => void;\n onLeave?: (s: ScrollScene) => void;\n onEnterBack?: (s: ScrollScene) => void;\n onLeaveBack?: (s: ScrollScene) => void;\n onUpdate?: (s: ScrollScene) => void;\n onToggle?: (s: ScrollScene) => void;\n}\n\nconst KEYWORDS: Record<string, number> = { top: 0, left: 0, center: 0.5, bottom: 1, right: 1 };\n\n/** One side of a rule ('top', '80%', '120px', 'center+=40') → pixels within `size`. */\nexport function parseEdge(spec: string, size: number): number {\n const m = /^([a-z]+|-?[\\d.]+%|-?[\\d.]+(?:px)?)?\\s*(?:([+-])=\\s*(-?[\\d.]+)(px|%)?)?$/.exec(spec.trim());\n if (!m) throw new Error(`[motionary] scroll: bad edge \"${spec}\"`);\n let v = 0;\n const b = m[1] || '0';\n if (b in KEYWORDS) v = KEYWORDS[b] * size;\n else if (b.endsWith('%')) v = (parseFloat(b) / 100) * size;\n else if (/^-?[\\d.]/.test(b)) v = parseFloat(b);\n else throw new Error(`[motionary] scroll: bad edge \"${spec}\"`);\n if (m[2]) {\n const n = m[4] === '%' ? (parseFloat(m[3]) / 100) * size : parseFloat(m[3]);\n v += m[2] === '+' ? n : -n;\n }\n return v;\n}\n\n/** Scroll offset at which `rule` is met: trigger edge (at `triggerStart`, size `triggerSize`) meets viewport edge. */\nexport function resolveRule(rule: string, triggerStart: number, triggerSize: number, viewport: number): number {\n const parts = rule.trim().split(/\\s+(?![+-]=)/);\n const t = parts[0] ?? 'top';\n const s = parts[1] ?? 'bottom';\n return triggerStart + parseEdge(t, triggerSize) - parseEdge(s, viewport);\n}\n\nconst scenes = new Set<ScrollScene>();\nconst q = (x: Element | string): Element => {\n const el = typeof x === 'string' ? document.querySelector(x) : x;\n if (!el) throw new Error(`[motionary] scroll: element \"${x}\" not found`);\n return el;\n};\n\n/** A scroll scene (see `scrollScene()`). */\nexport class ScrollScene {\n readonly trigger: Element;\n readonly options: SceneOptions;\n /** Scroll offsets (px) of the start and end. */\n start = 0;\n end = 0;\n /** 0 → 1 between start and end. */\n progress = 0;\n /** 1 scrolling forward, -1 back. */\n direction = 1;\n isActive = false;\n private shown = 0;\n private last = -1;\n private offs: (() => void)[] = [];\n private pinEl: HTMLElement | null = null;\n private spacer: HTMLElement | null = null;\n private marks: HTMLElement[] = [];\n private scroller: Element | Window;\n private killed = false;\n\n constructor(o: SceneOptions) {\n if (typeof window === 'undefined') throw new Error('[motionary] scroll scenes need a browser window');\n this.options = o;\n this.trigger = q(o.trigger);\n this.scroller = o.scroller ? q(o.scroller) : window;\n if (o.pin) this.setupPin(o.pin === true ? (this.trigger as HTMLElement) : (q(o.pin) as HTMLElement));\n const target: EventTarget = this.scroller;\n const onScroll = () => this.update();\n target.addEventListener('scroll', onScroll, { passive: true });\n window.addEventListener('resize', this.refreshBound);\n this.offs.push(() => target.removeEventListener('scroll', onScroll), () => window.removeEventListener('resize', this.refreshBound));\n if (o.scrub && typeof o.scrub === 'number') this.offs.push(getTicker().add((_, dt) => this.smooth(dt)));\n scenes.add(this);\n this.refresh();\n }\n private refreshBound = () => this.refresh();\n\n private pos(): number {\n const s = this.scroller as any;\n if (s === window) return this.options.horizontal ? window.scrollX : window.scrollY;\n return this.options.horizontal ? s.scrollLeft : s.scrollTop;\n }\n private viewport(): number {\n const s = this.scroller as any;\n if (s === window) return this.options.horizontal ? window.innerWidth : window.innerHeight;\n return this.options.horizontal ? s.clientWidth : s.clientHeight;\n }\n\n /** Re-measure start / end (after layout changes). */\n refresh(): void {\n if (this.killed) return;\n const h = !!this.options.horizontal;\n const ref = (this.spacer || this.trigger) as Element;\n const r = ref.getBoundingClientRect();\n const sr = this.scroller === window ? { top: 0, left: 0 } : (this.scroller as Element).getBoundingClientRect();\n const tStart = (h ? r.left - sr.left : r.top - sr.top) + this.pos();\n const tSize = (this.pinEl ? (h ? this.pinEl.offsetWidth : this.pinEl.offsetHeight) : h ? r.width : r.height) || 0;\n const vp = this.viewport();\n this.start = resolveRule(this.options.start || (h ? 'left right' : 'top bottom'), tStart, tSize, vp);\n const e = this.options.end || (h ? 'right left' : 'bottom top');\n this.end = /^\\+=/.test(e.trim()) ? this.start + parseFloat(e.trim().slice(2)) : resolveRule(e, tStart, tSize, vp);\n if (this.end <= this.start) this.end = this.start + 1;\n if (this.spacer && this.pinEl) this.spacer.style[h ? 'paddingRight' : 'paddingBottom'] = `${this.end - this.start}px`;\n this.drawMarkers(vp);\n this.last = -1;\n this.update();\n }\n\n /** Read the scroll position and fire callbacks / drive the animation. */\n update(): void {\n if (this.killed) return;\n const y = this.pos();\n const p = Math.min(1, Math.max(0, (y - this.start) / (this.end - this.start)));\n if (y !== this.last && this.last >= 0) this.direction = y > this.last ? 1 : -1;\n const prev = this.progress;\n const was = this.isActive;\n this.progress = p;\n this.isActive = y > this.start && y < this.end;\n this.last = y;\n const o = this.options;\n if (this.isActive !== was || (prev === 0 && p === 1) || (prev === 1 && p === 0)) {\n const toggles: [keyof SceneOptions, number][] = [];\n if (p > 0 && prev === 0) toggles.push(['onEnter', 0]);\n if (p === 1 && prev < 1) toggles.push(['onLeave', 1]);\n if (p < 1 && prev === 1) toggles.push(['onEnterBack', 2]);\n if (p === 0 && prev > 0) toggles.push(['onLeaveBack', 3]);\n for (const [cb, i] of toggles) {\n (o[cb] as ((s: ScrollScene) => void) | undefined)?.(this);\n if (!o.scrub) this.act(i);\n }\n if (o.toggleClass) this.trigger.classList.toggle(o.toggleClass, this.isActive);\n o.onToggle?.(this);\n if (o.once && p === 1) {\n this.applyPin(1);\n this.kill(true);\n return;\n }\n }\n this.applyPin(p);\n if (o.scrub === true && o.animation) o.animation.progress = p;\n o.onUpdate?.(this);\n }\n\n private smooth(dt: number): void {\n const a = this.options.animation;\n if (!a) return;\n const k = 1 - Math.exp(-dt / Math.max(1, this.options.scrub as number));\n this.shown += (this.progress - this.shown) * k;\n if (Math.abs(this.progress - this.shown) < 0.0005) this.shown = this.progress;\n a.progress = this.shown;\n }\n\n private act(i: number): void {\n const a = this.options.animation;\n if (!a) return;\n const act = ((this.options.actions || 'play none none reverse').split(/\\s+/)[i] || 'none') as SceneAction;\n if (act === 'play') a.play();\n else if (act === 'pause') a.pause();\n else if (act === 'resume') a.play();\n else if (act === 'reverse') a.reverse();\n else if (act === 'restart') a.restart();\n else if (act === 'reset') (a.pause(), a.seek(0));\n else if (act === 'complete') (a.pause(), (a.progress = 1));\n }\n\n private setupPin(el: HTMLElement): void {\n this.pinEl = el;\n const sp = document.createElement('div');\n sp.className = 'usa-pin-spacer';\n sp.style.boxSizing = 'content-box';\n el.parentNode?.insertBefore(sp, el);\n sp.appendChild(el);\n this.spacer = sp;\n this.offs.push(() => {\n el.style.position = el.style.top = el.style.left = el.style.width = el.style.transform = '';\n sp.parentNode?.insertBefore(el, sp);\n sp.remove();\n });\n }\n\n private applyPin(p: number): void {\n const el = this.pinEl, sp = this.spacer;\n if (!el || !sp) return;\n const h = !!this.options.horizontal;\n if (p > 0 && p < 1 && this.scroller === window) {\n const r = sp.getBoundingClientRect();\n const offset = this.start - (h ? r.left + window.scrollX : r.top + window.scrollY);\n el.style.position = 'fixed';\n el.style.width = `${r.width}px`;\n el.style.left = h ? `${-offset}px` : `${r.left}px`;\n el.style.top = h ? `${r.top}px` : `${-offset}px`;\n el.style.transform = '';\n } else {\n el.style.position = el.style.top = el.style.left = el.style.width = '';\n // inside a scroll container (or after the end) pinning is done with a transform\n const d = p >= 1 ? this.end - this.start : p > 0 ? this.pos() - this.start : 0;\n el.style.transform = d ? (h ? `translateX(${d}px)` : `translateY(${d}px)`) : '';\n }\n }\n\n private drawMarkers(vp: number): void {\n this.marks.forEach((m) => m.remove());\n this.marks = [];\n const mk = this.options.markers;\n if (!mk) return;\n const color = (typeof mk === 'object' && mk.color) || '#e11d48';\n const h = !!this.options.horizontal;\n const host = this.scroller === window ? document.body : (this.scroller as HTMLElement);\n const line = (label: string, at: number, fixed: boolean, c: string) => {\n const d = document.createElement('div');\n d.className = 'usa-scroll-marker';\n d.textContent = label;\n d.setAttribute('aria-hidden', 'true');\n Object.assign(d.style, { position: fixed ? 'fixed' : 'absolute', [h ? 'left' : 'top']: `${at}px`, [h ? 'top' : 'right']: '0', [h ? 'height' : 'width']: '80px', [h ? 'borderLeft' : 'borderTop']: `2px solid ${c}`, color: c, font: '600 11px/1.2 ui-monospace,monospace', padding: '2px 4px', zIndex: '2147483646', pointerEvents: 'none', background: 'rgba(255,255,255,.7)' });\n (fixed ? document.body : host).appendChild(d);\n this.marks.push(d);\n };\n const rule = (r: string | undefined, d: string) => (r || d).trim().split(/\\s+(?![+-]=)/)[1] ?? 'bottom';\n line(`start ${this.start | 0}`, this.start, false, color);\n line(`end ${this.end | 0}`, this.end, false, color);\n line('scroller-start', parseEdge(rule(this.options.start, 'top bottom'), vp), true, '#16a34a');\n if (!/^\\+=/.test((this.options.end || '').trim())) line('scroller-end', parseEdge(rule(this.options.end, 'bottom top'), vp), true, '#2563eb');\n }\n\n /** Remove listeners, pin spacer and markers (`keepState` keeps the animation where it is). */\n kill(keepState = false): void {\n if (this.killed) return;\n this.killed = true;\n if (!keepState) this.options.animation?.pause();\n this.offs.splice(0).forEach((f) => f());\n this.marks.forEach((m) => m.remove());\n scenes.delete(this);\n }\n}\n\n/** Create a scroll scene. */\nexport function scrollScene(o: SceneOptions): ScrollScene {\n return new ScrollScene(o);\n}\n/** Re-measure every scene (call after layout changes such as images loading). */\nexport function refreshScenes(): void {\n scenes.forEach((s) => s.refresh());\n}\n/** Kill every scene. */\nexport function killScenes(): void {\n Array.from(scenes).forEach((s) => s.kill());\n}\n/** The live scenes. */\nexport const allScenes = (): ScrollScene[] => Array.from(scenes);\n\nexport interface ScrollApi {\n scrollScene: typeof scrollScene;\n refreshScenes: typeof refreshScenes;\n killScenes: typeof killScenes;\n allScenes: typeof allScenes;\n parseEdge: typeof parseEdge;\n resolveRule: typeof resolveRule;\n ScrollScene: typeof ScrollScene;\n}\n\n/** The module object for `use(scroll)`. */\nexport const scroll: RuntimeModule<ScrollApi> = { id: 'scroll', version: RUNTIME_VERSION, requires: ['core'], api: { scrollScene, refreshScenes, killScenes, allScenes, parseEdge, resolveRule, ScrollScene } };\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;AAkBG;AAuCH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AAA;QACpB,IAAI,IAAI,CAAC,MAAM;YAAE;AACjB,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI;AAClB,QAAA,IAAI,CAAC,SAAS;AAAE,YAAA,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE;AAC/C,QAAA,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;AACvC,QAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;AACrC,QAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACrB;AACD;AAED;AACM,SAAU,WAAW,CAAC,CAAe,EAAA;AACzC,IAAA,OAAO,IAAI,WAAW,CAAC,CAAC,CAAC;AAC3B;AACA;SACgB,aAAa,GAAA;AAC3B,IAAA,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;AACpC;AACA;SACgB,UAAU,GAAA;AACxB,IAAA,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AAC7C;AACA;AACO,MAAM,SAAS,GAAG,MAAqB,KAAK,CAAC,IAAI,CAAC,MAAM;AAY/D;AACO,MAAM,MAAM,GAA6B,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE;;;;"}
|
|
1
|
+
{"version":3,"file":"scroll.js","sources":["../../src/runtime/scroll.ts"],"sourcesContent":["/**\n * `motionary/runtime/scroll` (10.2) — scroll-linked scenes, an original\n * implementation: start / end rules, scrubbing (direct or smoothed), pinning,\n * debug markers, enter / leave callbacks and per-edge actions for a runtime\n * tween or timeline.\n *\n * ```ts\n * import { use, timeline } from 'motionary/runtime';\n * import { scroll, scrollScene } from 'motionary/runtime/scroll';\n * use(scroll);\n * const tl = timeline({ paused: true }).to('.card', { to: { x: 200, rotate: 8 } });\n * scrollScene({ trigger: '.section', start: 'top 80%', end: 'bottom 20%', scrub: 120, pin: true, markers: true, animation: tl });\n * ```\n *\n * Rules: `\"<trigger edge> <viewport edge>\"` where an edge is `top | center | bottom`,\n * a percentage or pixels, optionally `+=N` / `-=N` (e.g. `\"top top+=80\"`);\n * `end` may also be `\"+=600\"` (pixels after start). Horizontal scenes use\n * `left | center | right`. Nothing touches `window` until a scene is created.\n */\nimport { RUNTIME_VERSION, type RuntimeModule } from './registry';\nimport { getTicker } from './ticker';\nimport type { Playable } from './tween';\n\nexport type SceneAction = 'play' | 'pause' | 'resume' | 'reverse' | 'restart' | 'reset' | 'complete' | 'none';\n\nexport interface SceneOptions {\n /** Element (or selector) whose position defines the scene. */\n trigger: Element | string;\n /** Default 'top bottom' (trigger top meets viewport bottom). */\n start?: string;\n /** Default 'bottom top'. `'+=600'` = 600 px after start. */\n end?: string;\n /** Link the animation to the scroll position: `true` (direct) or a smoothing time in ms. */\n scrub?: boolean | number;\n /** Runtime tween / timeline (created `paused: true`). */\n animation?: Playable;\n /** Without scrub: actions on enter, leave, enter back, leave back. Default 'play none none reverse'. */\n actions?: string;\n /** Pin the trigger (or another element) while the scene is active. */\n pin?: boolean | Element | string;\n /** Show start / end markers (debugging). */\n markers?: boolean | { color?: string };\n /** Class toggled on the trigger while active. */\n toggleClass?: string;\n /** Kill after the first forward completion. */\n once?: boolean;\n horizontal?: boolean;\n /** Scroll container (default: the window). */\n scroller?: Element | string;\n onEnter?: (s: ScrollScene) => void;\n onLeave?: (s: ScrollScene) => void;\n onEnterBack?: (s: ScrollScene) => void;\n onLeaveBack?: (s: ScrollScene) => void;\n onUpdate?: (s: ScrollScene) => void;\n onToggle?: (s: ScrollScene) => void;\n}\n\nconst KEYWORDS: Record<string, number> = { top: 0, left: 0, center: 0.5, bottom: 1, right: 1 };\n\n/** One side of a rule ('top', '80%', '120px', 'center+=40') → pixels within `size`. */\nexport function parseEdge(spec: string, size: number): number {\n const m = /^([a-z]+|-?[\\d.]+%|-?[\\d.]+(?:px)?)?\\s*(?:([+-])=\\s*(-?[\\d.]+)(px|%)?)?$/.exec(spec.trim());\n if (!m) throw new Error(`[motionary] scroll: bad edge \"${spec}\"`);\n let v = 0;\n const b = m[1] || '0';\n if (b in KEYWORDS) v = KEYWORDS[b] * size;\n else if (b.endsWith('%')) v = (parseFloat(b) / 100) * size;\n else if (/^-?[\\d.]/.test(b)) v = parseFloat(b);\n else throw new Error(`[motionary] scroll: bad edge \"${spec}\"`);\n if (m[2]) {\n const n = m[4] === '%' ? (parseFloat(m[3]) / 100) * size : parseFloat(m[3]);\n v += m[2] === '+' ? n : -n;\n }\n return v;\n}\n\n/** Scroll offset at which `rule` is met: trigger edge (at `triggerStart`, size `triggerSize`) meets viewport edge. */\nexport function resolveRule(rule: string, triggerStart: number, triggerSize: number, viewport: number): number {\n const parts = rule.trim().split(/\\s+(?![+-]=)/);\n const t = parts[0] ?? 'top';\n const s = parts[1] ?? 'bottom';\n return triggerStart + parseEdge(t, triggerSize) - parseEdge(s, viewport);\n}\n\nconst scenes = new Set<ScrollScene>();\nconst q = (x: Element | string): Element => {\n const el = typeof x === 'string' ? document.querySelector(x) : x;\n if (!el) throw new Error(`[motionary] scroll: element \"${x}\" not found`);\n return el;\n};\n\n/** A scroll scene (see `scrollScene()`). */\nexport class ScrollScene {\n readonly trigger: Element;\n readonly options: SceneOptions;\n /** Scroll offsets (px) of the start and end. */\n start = 0;\n end = 0;\n /** 0 → 1 between start and end. */\n progress = 0;\n /** 1 scrolling forward, -1 back. */\n direction = 1;\n isActive = false;\n private shown = 0;\n private last = -1;\n private offs: (() => void)[] = [];\n private pinEl: HTMLElement | null = null;\n private spacer: HTMLElement | null = null;\n private marks: HTMLElement[] = [];\n private scroller: Element | Window;\n private killed = false;\n\n constructor(o: SceneOptions) {\n if (typeof window === 'undefined') throw new Error('[motionary] scroll scenes need a browser window');\n this.options = o;\n this.trigger = q(o.trigger);\n this.scroller = o.scroller ? q(o.scroller) : window;\n if (o.pin) this.setupPin(o.pin === true ? (this.trigger as HTMLElement) : (q(o.pin) as HTMLElement));\n const target: EventTarget = this.scroller;\n const onScroll = () => this.update();\n target.addEventListener('scroll', onScroll, { passive: true });\n window.addEventListener('resize', this.refreshBound);\n this.offs.push(() => target.removeEventListener('scroll', onScroll), () => window.removeEventListener('resize', this.refreshBound));\n if (o.scrub && typeof o.scrub === 'number') this.offs.push(getTicker().add((_, dt) => this.smooth(dt)));\n scenes.add(this);\n this.refresh();\n }\n private refreshBound = () => this.refresh();\n\n private pos(): number {\n const s = this.scroller as any;\n if (s === window) return this.options.horizontal ? window.scrollX : window.scrollY;\n return this.options.horizontal ? s.scrollLeft : s.scrollTop;\n }\n private viewport(): number {\n const s = this.scroller as any;\n if (s === window) return this.options.horizontal ? window.innerWidth : window.innerHeight;\n return this.options.horizontal ? s.clientWidth : s.clientHeight;\n }\n\n /** Re-measure start / end (after layout changes). */\n refresh(): void {\n if (this.killed) return;\n const h = !!this.options.horizontal;\n const ref = (this.spacer || this.trigger) as Element;\n const r = ref.getBoundingClientRect();\n const sr = this.scroller === window ? { top: 0, left: 0 } : (this.scroller as Element).getBoundingClientRect();\n const tStart = (h ? r.left - sr.left : r.top - sr.top) + this.pos();\n const tSize = (this.pinEl ? (h ? this.pinEl.offsetWidth : this.pinEl.offsetHeight) : h ? r.width : r.height) || 0;\n const vp = this.viewport();\n this.start = resolveRule(this.options.start || (h ? 'left right' : 'top bottom'), tStart, tSize, vp);\n const e = this.options.end || (h ? 'right left' : 'bottom top');\n this.end = /^\\+=/.test(e.trim()) ? this.start + parseFloat(e.trim().slice(2)) : resolveRule(e, tStart, tSize, vp);\n if (this.end <= this.start) this.end = this.start + 1;\n if (this.spacer && this.pinEl) this.spacer.style[h ? 'paddingRight' : 'paddingBottom'] = `${this.end - this.start}px`;\n this.drawMarkers(vp);\n this.last = -1;\n this.update();\n }\n\n /** Read the scroll position and fire callbacks / drive the animation. */\n update(): void {\n if (this.killed) return;\n const y = this.pos();\n const p = Math.min(1, Math.max(0, (y - this.start) / (this.end - this.start)));\n if (y !== this.last && this.last >= 0) this.direction = y > this.last ? 1 : -1;\n const prev = this.progress;\n const was = this.isActive;\n this.progress = p;\n this.isActive = y > this.start && y < this.end;\n this.last = y;\n const o = this.options;\n if (this.isActive !== was || (prev === 0 && p === 1) || (prev === 1 && p === 0)) {\n const toggles: [keyof SceneOptions, number][] = [];\n if (p > 0 && prev === 0) toggles.push(['onEnter', 0]);\n if (p === 1 && prev < 1) toggles.push(['onLeave', 1]);\n if (p < 1 && prev === 1) toggles.push(['onEnterBack', 2]);\n if (p === 0 && prev > 0) toggles.push(['onLeaveBack', 3]);\n for (const [cb, i] of toggles) {\n (o[cb] as ((s: ScrollScene) => void) | undefined)?.(this);\n if (!o.scrub) this.act(i);\n }\n if (o.toggleClass) this.trigger.classList.toggle(o.toggleClass, this.isActive);\n o.onToggle?.(this);\n if (o.once && p === 1) {\n this.applyPin(1);\n this.kill(true);\n return;\n }\n }\n this.applyPin(p);\n if (o.scrub === true && o.animation) o.animation.progress = p;\n o.onUpdate?.(this);\n }\n\n private smooth(dt: number): void {\n const a = this.options.animation;\n if (!a) return;\n const k = 1 - Math.exp(-dt / Math.max(1, this.options.scrub as number));\n this.shown += (this.progress - this.shown) * k;\n if (Math.abs(this.progress - this.shown) < 0.0005) this.shown = this.progress;\n a.progress = this.shown;\n }\n\n private act(i: number): void {\n const a = this.options.animation;\n if (!a) return;\n const act = ((this.options.actions || 'play none none reverse').split(/\\s+/)[i] || 'none') as SceneAction;\n if (act === 'play') a.play();\n else if (act === 'pause') a.pause();\n else if (act === 'resume') a.play();\n else if (act === 'reverse') a.reverse();\n else if (act === 'restart') a.restart();\n else if (act === 'reset') (a.pause(), a.seek(0));\n else if (act === 'complete') (a.pause(), (a.progress = 1));\n }\n\n private setupPin(el: HTMLElement): void {\n this.pinEl = el;\n const sp = document.createElement('div');\n sp.className = 'usa-pin-spacer';\n sp.style.boxSizing = 'content-box';\n el.parentNode?.insertBefore(sp, el);\n sp.appendChild(el);\n this.spacer = sp;\n this.offs.push(() => {\n el.style.position = el.style.top = el.style.left = el.style.width = el.style.transform = '';\n sp.parentNode?.insertBefore(el, sp);\n sp.remove();\n });\n }\n\n private applyPin(p: number): void {\n const el = this.pinEl, sp = this.spacer;\n if (!el || !sp) return;\n const h = !!this.options.horizontal;\n if (p > 0 && p < 1 && this.scroller === window) {\n const r = sp.getBoundingClientRect();\n const offset = this.start - (h ? r.left + window.scrollX : r.top + window.scrollY);\n el.style.position = 'fixed';\n el.style.width = `${r.width}px`;\n el.style.left = h ? `${-offset}px` : `${r.left}px`;\n el.style.top = h ? `${r.top}px` : `${-offset}px`;\n el.style.transform = '';\n } else {\n el.style.position = el.style.top = el.style.left = el.style.width = '';\n // inside a scroll container (or after the end) pinning is done with a transform\n const d = p >= 1 ? this.end - this.start : p > 0 ? this.pos() - this.start : 0;\n el.style.transform = d ? (h ? `translateX(${d}px)` : `translateY(${d}px)`) : '';\n }\n }\n\n private drawMarkers(vp: number): void {\n this.marks.forEach((m) => m.remove());\n this.marks = [];\n const mk = this.options.markers;\n if (!mk) return;\n const color = (typeof mk === 'object' && mk.color) || '#e11d48';\n const h = !!this.options.horizontal;\n const host = this.scroller === window ? document.body : (this.scroller as HTMLElement);\n const line = (label: string, at: number, fixed: boolean, c: string) => {\n const d = document.createElement('div');\n d.className = 'usa-scroll-marker';\n d.textContent = label;\n d.setAttribute('aria-hidden', 'true');\n Object.assign(d.style, { position: fixed ? 'fixed' : 'absolute', [h ? 'left' : 'top']: `${at}px`, [h ? 'top' : 'right']: '0', [h ? 'height' : 'width']: '80px', [h ? 'borderLeft' : 'borderTop']: `2px solid ${c}`, color: c, font: '600 11px/1.2 ui-monospace,monospace', padding: '2px 4px', zIndex: '2147483646', pointerEvents: 'none', background: 'rgba(255,255,255,.7)' });\n (fixed ? document.body : host).appendChild(d);\n this.marks.push(d);\n };\n const rule = (r: string | undefined, d: string) => (r || d).trim().split(/\\s+(?![+-]=)/)[1] ?? 'bottom';\n line(`start ${this.start | 0}`, this.start, false, color);\n line(`end ${this.end | 0}`, this.end, false, color);\n line('scroller-start', parseEdge(rule(this.options.start, 'top bottom'), vp), true, '#16a34a');\n if (!/^\\+=/.test((this.options.end || '').trim())) line('scroller-end', parseEdge(rule(this.options.end, 'bottom top'), vp), true, '#2563eb');\n }\n\n /** Remove listeners, pin spacer and markers (`keepState` keeps the animation where it is). */\n kill(keepState = false): void {\n if (this.killed) return;\n this.killed = true;\n if (!keepState) this.options.animation?.pause();\n this.offs.splice(0).forEach((f) => f());\n this.marks.forEach((m) => m.remove());\n scenes.delete(this);\n }\n}\n\n/** Create a scroll scene. */\nexport function scrollScene(o: SceneOptions): ScrollScene {\n return new ScrollScene(o);\n}\n/** Re-measure every scene (call after layout changes such as images loading). */\nexport function refreshScenes(): void {\n scenes.forEach((s) => s.refresh());\n}\n/** Kill every scene. */\nexport function killScenes(): void {\n Array.from(scenes).forEach((s) => s.kill());\n}\n/** The live scenes. */\nexport const allScenes = (): ScrollScene[] => Array.from(scenes);\n\nexport interface ScrollApi {\n scrollScene: typeof scrollScene;\n refreshScenes: typeof refreshScenes;\n killScenes: typeof killScenes;\n allScenes: typeof allScenes;\n parseEdge: typeof parseEdge;\n resolveRule: typeof resolveRule;\n ScrollScene: typeof ScrollScene;\n}\n\n/** The module object for `use(scroll)`. */\nexport const scroll: RuntimeModule<ScrollApi> = { id: 'scroll', version: RUNTIME_VERSION, requires: ['core'], api: { scrollScene, refreshScenes, killScenes, allScenes, parseEdge, resolveRule, ScrollScene } };\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;AAkBG;AAuCH,MAAM,QAAQ,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