use-scroll-animate 4.8.0 → 4.9.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.
Files changed (100) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/bin/usa-codemod-5.mjs +79 -0
  3. package/dist/chunks/{base-CxYU2NK_.cjs → base-BvpQ4Ggj.cjs} +30 -1
  4. package/dist/chunks/base-BvpQ4Ggj.cjs.map +1 -0
  5. package/dist/chunks/{base-CZiIAMBc.js → base-DbbRUxaa.js} +29 -2
  6. package/dist/chunks/base-DbbRUxaa.js.map +1 -0
  7. package/dist/chunks/{core-CJHJeMI_.js → core-BVTuet9o.js} +2 -2
  8. package/dist/chunks/{core-CJHJeMI_.js.map → core-BVTuet9o.js.map} +1 -1
  9. package/dist/chunks/{core-HLqH3qkA.cjs → core-BWO7JKJ5.cjs} +2 -2
  10. package/dist/chunks/{core-HLqH3qkA.cjs.map → core-BWO7JKJ5.cjs.map} +1 -1
  11. package/dist/chunks/{core-CctNfzuP.cjs → core-CCAM3nKw.cjs} +2 -2
  12. package/dist/chunks/{core-CctNfzuP.cjs.map → core-CCAM3nKw.cjs.map} +1 -1
  13. package/dist/chunks/{core-COi3DrLx.js → core-CcaSsbV8.js} +2 -2
  14. package/dist/chunks/{core-COi3DrLx.js.map → core-CcaSsbV8.js.map} +1 -1
  15. package/dist/chunks/{spring-BS5tg6aK.js → spring-B6w7mVCU.js} +2 -2
  16. package/dist/chunks/{spring-BS5tg6aK.js.map → spring-B6w7mVCU.js.map} +1 -1
  17. package/dist/chunks/{spring-Dkpygsuj.cjs → spring-fFkqE9J0.cjs} +2 -2
  18. package/dist/chunks/{spring-Dkpygsuj.cjs.map → spring-fFkqE9J0.cjs.map} +1 -1
  19. package/dist/chunks/{variants-CfJzrzMh.cjs → variants-C8xj8gfd.cjs} +2 -2
  20. package/dist/chunks/{variants-CfJzrzMh.cjs.map → variants-C8xj8gfd.cjs.map} +1 -1
  21. package/dist/chunks/{variants-D9n-3x27.js → variants-Cal4DB0E.js} +2 -2
  22. package/dist/chunks/{variants-D9n-3x27.js.map → variants-Cal4DB0E.js.map} +1 -1
  23. package/dist/components/a11y.cjs +37 -1
  24. package/dist/components/a11y.cjs.map +1 -1
  25. package/dist/components/a11y.d.cts +12 -2
  26. package/dist/components/a11y.d.ts +12 -2
  27. package/dist/components/a11y.js +37 -3
  28. package/dist/components/a11y.js.map +1 -1
  29. package/dist/components/angular.cjs +5 -5
  30. package/dist/components/angular.js +5 -5
  31. package/dist/components/background.cjs +2 -2
  32. package/dist/components/background.js +3 -3
  33. package/dist/components/bridge.cjs +1 -1
  34. package/dist/components/bridge.js +1 -1
  35. package/dist/components/cards.cjs +2 -2
  36. package/dist/components/cards.js +3 -3
  37. package/dist/components/click.cjs +2 -2
  38. package/dist/components/click.js +3 -3
  39. package/dist/components/depth.cjs +3 -3
  40. package/dist/components/depth.js +4 -4
  41. package/dist/components/feedback.cjs +1 -1
  42. package/dist/components/feedback.js +2 -2
  43. package/dist/components/gesture.cjs +3 -3
  44. package/dist/components/gesture.js +5 -5
  45. package/dist/components/interaction.cjs +1 -1
  46. package/dist/components/interaction.js +2 -2
  47. package/dist/components/layout.cjs +1 -1
  48. package/dist/components/layout.js +2 -2
  49. package/dist/components/lite.cjs +75 -2
  50. package/dist/components/lite.cjs.map +1 -1
  51. package/dist/components/lite.js +74 -3
  52. package/dist/components/lite.js.map +1 -1
  53. package/dist/components/packs.cjs +1 -1
  54. package/dist/components/packs.js +2 -2
  55. package/dist/components/page.cjs +12 -4
  56. package/dist/components/page.cjs.map +1 -1
  57. package/dist/components/page.js +13 -5
  58. package/dist/components/page.js.map +1 -1
  59. package/dist/components/perf.cjs +1 -1
  60. package/dist/components/perf.js +2 -2
  61. package/dist/components/physics.cjs +2 -2
  62. package/dist/components/physics.js +4 -4
  63. package/dist/components/reveal.cjs +1 -1
  64. package/dist/components/reveal.js +2 -2
  65. package/dist/components/solid.cjs +5 -5
  66. package/dist/components/solid.js +5 -5
  67. package/dist/components/svelte.cjs +5 -5
  68. package/dist/components/svelte.js +5 -5
  69. package/dist/components/svg.cjs +1 -1
  70. package/dist/components/svg.js +2 -2
  71. package/dist/components/text.cjs +2 -2
  72. package/dist/components/text.js +3 -3
  73. package/dist/components/timeline.cjs +4 -2
  74. package/dist/components/timeline.cjs.map +1 -1
  75. package/dist/components/timeline.js +6 -4
  76. package/dist/components/timeline.js.map +1 -1
  77. package/dist/components/transitions.cjs +1 -1
  78. package/dist/components/transitions.js +2 -2
  79. package/dist/components/ui.cjs +3 -3
  80. package/dist/components/ui.js +5 -5
  81. package/dist/components/vue.cjs +5 -5
  82. package/dist/components/vue.js +5 -5
  83. package/dist/components/webgl.cjs +1 -1
  84. package/dist/components/webgl.js +2 -2
  85. package/dist/components.cjs +7 -5
  86. package/dist/components.cjs.map +1 -1
  87. package/dist/components.d.cts +12 -2
  88. package/dist/components.d.ts +12 -2
  89. package/dist/components.js +8 -8
  90. package/dist/components.umd.js +2 -2
  91. package/dist/components.umd.js.map +1 -1
  92. package/dist/index.cjs +2 -2
  93. package/dist/index.js +2 -2
  94. package/dist/index.umd.js.map +1 -1
  95. package/docs/ROADMAP.md +1 -1
  96. package/docs/deprecations.md +6 -0
  97. package/docs/upgrading-5.md +31 -0
  98. package/package.json +5 -1
  99. package/dist/chunks/base-CZiIAMBc.js.map +0 -1
  100. package/dist/chunks/base-CxYU2NK_.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
- import { u as defineElement, j as clamp, r as raf, k as caf } from '../chunks/base-CZiIAMBc.js';
2
- export { f as configureComponents, p as prefersReducedMotion } from '../chunks/base-CZiIAMBc.js';
3
- import { c as createSpring } from '../chunks/spring-BS5tg6aK.js';
4
- import { g as gesture } from '../chunks/core-COi3DrLx.js';
1
+ import { v as defineElement, j as clamp, r as raf, k as caf } from '../chunks/base-DbbRUxaa.js';
2
+ export { f as configureComponents, p as prefersReducedMotion } from '../chunks/base-DbbRUxaa.js';
3
+ import { c as createSpring } from '../chunks/spring-B6w7mVCU.js';
4
+ import { g as gesture } from '../chunks/core-CcaSsbV8.js';
5
5
 
6
6
  var css = "usa-cube{--usa-cube-size:200px;display:block;width:var(--usa-cube-size);height:var(--usa-cube-size);perspective:var(--usa-cube-perspective,900px);touch-action:pan-y;user-select:none;-webkit-user-select:none;position:relative}usa-cube>[data-face]{position:absolute;inset:0;backface-visibility:hidden;transform:translateZ(calc(var(--usa-cube-size) / -2)) rotateX(var(--usa-cube-rx,0deg)) rotateY(var(--usa-cube-ry,0deg)) var(--usa-face) translateZ(calc(var(--usa-cube-size) / 2));transform-origin:50% 50%}usa-cube>[data-face=\"front\"]{--usa-face:rotateY(0deg)}usa-cube>[data-face=\"right\"]{--usa-face:rotateY(90deg)}usa-cube>[data-face=\"back\"]{--usa-face:rotateY(180deg)}usa-cube>[data-face=\"left\"]{--usa-face:rotateY(-90deg)}usa-cube>[data-face=\"top\"]{--usa-face:rotateX(90deg)}usa-cube>[data-face=\"bottom\"]{--usa-face:rotateX(-90deg)}usa-cube:focus-visible{outline:2px solid currentColor;outline-offset:6px}usa-depth{display:block;position:relative;perspective:1000px}usa-depth>*{transform:var(--usa-depth-rot,none);transform-style:preserve-3d}usa-depth [data-depth]{will-change:transform;transition:transform 0.12s linear}@media (prefers-reduced-motion:reduce){usa-depth [data-depth]{transform:none !important}}";
7
7
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var base = require('../chunks/base-CxYU2NK_.cjs');
3
+ var base = require('../chunks/base-BvpQ4Ggj.cjs');
4
4
 
5
5
  var css$4 = "usa-spinner{--usa-spinner-size:32px;--usa-spinner-color:currentColor;position:relative;display:inline-block;vertical-align:middle;flex:none;width:var(--usa-spinner-size);height:var(--usa-spinner-size);color:var(--usa-spinner-color)}usa-spinner i{position:absolute;display:block}usa-spinner[paused] *,usa-spinner[paused] *::after{animation-play-state:paused !important}usa-spinner svg{width:100%;height:100%;animation:usa-spin 2s linear infinite;overflow:visible}usa-spinner svg circle{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-dasharray:0.5 100;stroke-dashoffset:0;animation:usa-ring-arc 1.6s ease-in-out infinite}@keyframes usa-spin{to{transform:rotate(360deg)}}@keyframes usa-ring-arc{0%{stroke-dasharray:0.5 100;stroke-dashoffset:0}50%{stroke-dasharray:62 100;stroke-dashoffset:-20}100%{stroke-dasharray:0.5 100;stroke-dashoffset:-99}}usa-spinner[data-kind=\"windows\"] i{inset:0;opacity:0;animation:usa-orbit 5.5s infinite}usa-spinner[data-kind=\"windows\"] i::after{content:\"\";position:absolute;left:50%;top:0;width:12%;height:12%;margin-left:-6%;border-radius:50%;background:currentColor}usa-spinner[data-kind=\"windows\"] i:nth-child(2){animation-delay:240ms;--n:1}usa-spinner[data-kind=\"windows\"] i:nth-child(3){animation-delay:480ms;--n:2}usa-spinner[data-kind=\"windows\"] i:nth-child(4){animation-delay:720ms;--n:3}usa-spinner[data-kind=\"windows\"] i:nth-child(5){animation-delay:960ms;--n:4}@keyframes usa-orbit{0%{transform:rotate(225deg);opacity:1;animation-timing-function:ease-out}7%{transform:rotate(345deg);animation-timing-function:linear}30%{transform:rotate(455deg);animation-timing-function:ease-in-out}39%{transform:rotate(690deg);animation-timing-function:linear}70%{transform:rotate(815deg);opacity:1;animation-timing-function:ease-out}75%{transform:rotate(945deg);animation-timing-function:ease-out}76%,100%{transform:rotate(945deg);opacity:0}}usa-spinner[data-kind=\"ring\"] i{inset:0;border-radius:50%;border:calc(var(--usa-spinner-size) / 9) solid color-mix(in srgb,currentColor 20%,transparent);border-top-color:currentColor;animation:usa-spin 0.8s linear infinite}usa-spinner[data-kind=\"dots\"]{display:inline-flex;align-items:center;justify-content:space-between;height:calc(var(--usa-spinner-size) / 2.5)}usa-spinner[data-kind=\"dots\"] i{position:static;width:22%;aspect-ratio:1;border-radius:50%;background:currentColor;animation:usa-dot 1.2s ease-in-out infinite}usa-spinner[data-kind=\"dots\"] i:nth-child(2){animation-delay:0.15s}usa-spinner[data-kind=\"dots\"] i:nth-child(3){animation-delay:0.3s}@keyframes usa-dot{0%,60%,100%{transform:translateY(0);opacity:0.35}30%{transform:translateY(-70%);opacity:1}}usa-spinner[data-kind=\"pulse\"] i{inset:0;border-radius:50%;background:currentColor;opacity:0;animation:usa-pulse 1.6s cubic-bezier(0.22,1,0.36,1) infinite}usa-spinner[data-kind=\"pulse\"] i:nth-child(2){animation-delay:0.8s}@keyframes usa-pulse{from{transform:scale(0.1);opacity:0.8}to{transform:scale(1);opacity:0}}usa-spinner[data-kind=\"bars\"]{display:inline-flex;align-items:center;justify-content:space-between}usa-spinner[data-kind=\"bars\"] i{position:static;width:16%;height:100%;border-radius:2px;background:currentColor;transform:scaleY(0.35);animation:usa-bar 1s ease-in-out infinite}usa-spinner[data-kind=\"bars\"] i:nth-child(2){animation-delay:0.12s}usa-spinner[data-kind=\"bars\"] i:nth-child(3){animation-delay:0.24s}usa-spinner[data-kind=\"bars\"] i:nth-child(4){animation-delay:0.36s}@keyframes usa-bar{0%,100%{transform:scaleY(0.35)}40%{transform:scaleY(1)}}@media (prefers-reduced-motion:reduce){usa-spinner svg,usa-spinner i,usa-spinner i::after{animation:usa-calm 2.4s ease-in-out infinite !important}usa-spinner[data-kind=\"windows\"] i{transform:rotate(calc(var(--n,0) * 72deg))}usa-spinner svg circle{animation:none;stroke-dasharray:30 100}}@keyframes usa-calm{0%,100%{opacity:1}50%{opacity:0.4}}";
6
6
 
@@ -1,5 +1,5 @@
1
- import { u as defineElement, w as kindOf, v as EASE_OUT, j as clamp, F as FLUENT_DECELERATE, E as EASE_SPRING } from '../chunks/base-CZiIAMBc.js';
2
- export { f as configureComponents, p as prefersReducedMotion } from '../chunks/base-CZiIAMBc.js';
1
+ import { v as defineElement, x as kindOf, w as EASE_OUT, j as clamp, F as FLUENT_DECELERATE, E as EASE_SPRING } from '../chunks/base-DbbRUxaa.js';
2
+ export { f as configureComponents, p as prefersReducedMotion } from '../chunks/base-DbbRUxaa.js';
3
3
 
4
4
  var css$4 = "usa-spinner{--usa-spinner-size:32px;--usa-spinner-color:currentColor;position:relative;display:inline-block;vertical-align:middle;flex:none;width:var(--usa-spinner-size);height:var(--usa-spinner-size);color:var(--usa-spinner-color)}usa-spinner i{position:absolute;display:block}usa-spinner[paused] *,usa-spinner[paused] *::after{animation-play-state:paused !important}usa-spinner svg{width:100%;height:100%;animation:usa-spin 2s linear infinite;overflow:visible}usa-spinner svg circle{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-dasharray:0.5 100;stroke-dashoffset:0;animation:usa-ring-arc 1.6s ease-in-out infinite}@keyframes usa-spin{to{transform:rotate(360deg)}}@keyframes usa-ring-arc{0%{stroke-dasharray:0.5 100;stroke-dashoffset:0}50%{stroke-dasharray:62 100;stroke-dashoffset:-20}100%{stroke-dasharray:0.5 100;stroke-dashoffset:-99}}usa-spinner[data-kind=\"windows\"] i{inset:0;opacity:0;animation:usa-orbit 5.5s infinite}usa-spinner[data-kind=\"windows\"] i::after{content:\"\";position:absolute;left:50%;top:0;width:12%;height:12%;margin-left:-6%;border-radius:50%;background:currentColor}usa-spinner[data-kind=\"windows\"] i:nth-child(2){animation-delay:240ms;--n:1}usa-spinner[data-kind=\"windows\"] i:nth-child(3){animation-delay:480ms;--n:2}usa-spinner[data-kind=\"windows\"] i:nth-child(4){animation-delay:720ms;--n:3}usa-spinner[data-kind=\"windows\"] i:nth-child(5){animation-delay:960ms;--n:4}@keyframes usa-orbit{0%{transform:rotate(225deg);opacity:1;animation-timing-function:ease-out}7%{transform:rotate(345deg);animation-timing-function:linear}30%{transform:rotate(455deg);animation-timing-function:ease-in-out}39%{transform:rotate(690deg);animation-timing-function:linear}70%{transform:rotate(815deg);opacity:1;animation-timing-function:ease-out}75%{transform:rotate(945deg);animation-timing-function:ease-out}76%,100%{transform:rotate(945deg);opacity:0}}usa-spinner[data-kind=\"ring\"] i{inset:0;border-radius:50%;border:calc(var(--usa-spinner-size) / 9) solid color-mix(in srgb,currentColor 20%,transparent);border-top-color:currentColor;animation:usa-spin 0.8s linear infinite}usa-spinner[data-kind=\"dots\"]{display:inline-flex;align-items:center;justify-content:space-between;height:calc(var(--usa-spinner-size) / 2.5)}usa-spinner[data-kind=\"dots\"] i{position:static;width:22%;aspect-ratio:1;border-radius:50%;background:currentColor;animation:usa-dot 1.2s ease-in-out infinite}usa-spinner[data-kind=\"dots\"] i:nth-child(2){animation-delay:0.15s}usa-spinner[data-kind=\"dots\"] i:nth-child(3){animation-delay:0.3s}@keyframes usa-dot{0%,60%,100%{transform:translateY(0);opacity:0.35}30%{transform:translateY(-70%);opacity:1}}usa-spinner[data-kind=\"pulse\"] i{inset:0;border-radius:50%;background:currentColor;opacity:0;animation:usa-pulse 1.6s cubic-bezier(0.22,1,0.36,1) infinite}usa-spinner[data-kind=\"pulse\"] i:nth-child(2){animation-delay:0.8s}@keyframes usa-pulse{from{transform:scale(0.1);opacity:0.8}to{transform:scale(1);opacity:0}}usa-spinner[data-kind=\"bars\"]{display:inline-flex;align-items:center;justify-content:space-between}usa-spinner[data-kind=\"bars\"] i{position:static;width:16%;height:100%;border-radius:2px;background:currentColor;transform:scaleY(0.35);animation:usa-bar 1s ease-in-out infinite}usa-spinner[data-kind=\"bars\"] i:nth-child(2){animation-delay:0.12s}usa-spinner[data-kind=\"bars\"] i:nth-child(3){animation-delay:0.24s}usa-spinner[data-kind=\"bars\"] i:nth-child(4){animation-delay:0.36s}@keyframes usa-bar{0%,100%{transform:scaleY(0.35)}40%{transform:scaleY(1)}}@media (prefers-reduced-motion:reduce){usa-spinner svg,usa-spinner i,usa-spinner i::after{animation:usa-calm 2.4s ease-in-out infinite !important}usa-spinner[data-kind=\"windows\"] i{transform:rotate(calc(var(--n,0) * 72deg))}usa-spinner svg circle{animation:none;stroke-dasharray:30 100}}@keyframes usa-calm{0%,100%{opacity:1}50%{opacity:0.4}}";
5
5
 
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var base = require('../chunks/base-CxYU2NK_.cjs');
4
- var spring = require('../chunks/spring-Dkpygsuj.cjs');
5
- var core = require('../chunks/core-CctNfzuP.cjs');
3
+ var base = require('../chunks/base-BvpQ4Ggj.cjs');
4
+ var spring = require('../chunks/spring-fFkqE9J0.cjs');
5
+ var core = require('../chunks/core-CCAM3nKw.cjs');
6
6
 
7
7
  var css = "usa-swipeable{display:block;touch-action:pan-y;user-select:none;-webkit-user-select:none}usa-swipeable[axis=\"y\"]{touch-action:pan-x}usa-swipeable>*{transform:translate3d(var(--usa-swipe,0px),0,0);opacity:calc(1 - var(--usa-swipe-p,0) * 0.5)}usa-swipeable[axis=\"y\"]>*{transform:translate3d(0,var(--usa-swipe,0px),0)}usa-swipeable:focus-visible{outline:2px solid currentColor;outline-offset:2px}usa-pinch-zoom{display:block;overflow:hidden;touch-action:none;position:relative}usa-pinch-zoom>*{transform:translate3d(var(--usa-zoom-x,0px),var(--usa-zoom-y,0px),0) scale(var(--usa-zoom,1));transform-origin:50% 50%}usa-pinch-zoom[data-zoomed]{cursor:grab}usa-pinch-zoom:focus-visible{outline:2px solid currentColor;outline-offset:2px}";
8
8
 
@@ -1,8 +1,8 @@
1
- import { u as defineElement, j as clamp } from '../chunks/base-CZiIAMBc.js';
2
- export { f as configureComponents, p as prefersReducedMotion } from '../chunks/base-CZiIAMBc.js';
3
- import { c as createSpring } from '../chunks/spring-BS5tg6aK.js';
4
- import { g as gesture } from '../chunks/core-COi3DrLx.js';
5
- export { p as pinchScale, s as swipeDirection } from '../chunks/core-COi3DrLx.js';
1
+ import { v as defineElement, j as clamp } from '../chunks/base-DbbRUxaa.js';
2
+ export { f as configureComponents, p as prefersReducedMotion } from '../chunks/base-DbbRUxaa.js';
3
+ import { c as createSpring } from '../chunks/spring-B6w7mVCU.js';
4
+ import { g as gesture } from '../chunks/core-CcaSsbV8.js';
5
+ export { p as pinchScale, s as swipeDirection } from '../chunks/core-CcaSsbV8.js';
6
6
 
7
7
  var css = "usa-swipeable{display:block;touch-action:pan-y;user-select:none;-webkit-user-select:none}usa-swipeable[axis=\"y\"]{touch-action:pan-x}usa-swipeable>*{transform:translate3d(var(--usa-swipe,0px),0,0);opacity:calc(1 - var(--usa-swipe-p,0) * 0.5)}usa-swipeable[axis=\"y\"]>*{transform:translate3d(0,var(--usa-swipe,0px),0)}usa-swipeable:focus-visible{outline:2px solid currentColor;outline-offset:2px}usa-pinch-zoom{display:block;overflow:hidden;touch-action:none;position:relative}usa-pinch-zoom>*{transform:translate3d(var(--usa-zoom-x,0px),var(--usa-zoom-y,0px),0) scale(var(--usa-zoom,1));transform-origin:50% 50%}usa-pinch-zoom[data-zoomed]{cursor:grab}usa-pinch-zoom:focus-visible{outline:2px solid currentColor;outline-offset:2px}";
8
8
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var base = require('../chunks/base-CxYU2NK_.cjs');
3
+ var base = require('../chunks/base-BvpQ4Ggj.cjs');
4
4
 
5
5
  var css$5 = "usa-ripple{position:relative;display:inline-block;overflow:hidden;isolation:isolate;border-radius:inherit;-webkit-tap-highlight-color:transparent}usa-ripple[block]{display:block}usa-ripple .usa-ripple-wave{position:absolute;border-radius:50%;pointer-events:none;transform:scale(0);z-index:-1;will-change:transform,opacity}";
6
6
 
@@ -1,5 +1,5 @@
1
- import { u as defineElement, v as EASE_OUT, r as raf, k as caf, j as clamp, E as EASE_SPRING } from '../chunks/base-CZiIAMBc.js';
2
- export { f as configureComponents, p as prefersReducedMotion } from '../chunks/base-CZiIAMBc.js';
1
+ import { v as defineElement, w as EASE_OUT, r as raf, k as caf, j as clamp, E as EASE_SPRING } from '../chunks/base-DbbRUxaa.js';
2
+ export { f as configureComponents, p as prefersReducedMotion } from '../chunks/base-DbbRUxaa.js';
3
3
 
4
4
  var css$5 = "usa-ripple{position:relative;display:inline-block;overflow:hidden;isolation:isolate;border-radius:inherit;-webkit-tap-highlight-color:transparent}usa-ripple[block]{display:block}usa-ripple .usa-ripple-wave{position:absolute;border-radius:50%;pointer-events:none;transform:scale(0);z-index:-1;will-change:transform,opacity}";
5
5
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var base = require('../chunks/base-CxYU2NK_.cjs');
3
+ var base = require('../chunks/base-BvpQ4Ggj.cjs');
4
4
 
5
5
  /** FLIP keyframes from a previous box to the current one (pure). */
6
6
  function flipFrames(from, to, scale = true) {
@@ -1,5 +1,5 @@
1
- import { p as prefersReducedMotion, v as EASE_OUT, m as motionScale, u as defineElement } from '../chunks/base-CZiIAMBc.js';
2
- export { f as configureComponents } from '../chunks/base-CZiIAMBc.js';
1
+ import { p as prefersReducedMotion, w as EASE_OUT, m as motionScale, v as defineElement } from '../chunks/base-DbbRUxaa.js';
2
+ export { f as configureComponents } from '../chunks/base-DbbRUxaa.js';
3
3
 
4
4
  /** FLIP keyframes from a previous box to the current one (pure). */
5
5
  function flipFrames(from, to, scale = true) {
@@ -14,6 +14,13 @@ const MOTION_SCALE = { off: 0, low: 0.6, normal: 1, high: 1.25 };
14
14
  const config = { injectStyles: true, reducedMotion: 'user', motionIntensity: 'normal', motionSensitivity: 'full' };
15
15
  /** Change global component settings (call before `define*()` for `injectStyles`). */
16
16
  function configureComponents(options) {
17
+ if (!quiet) {
18
+ // 4.9: removed in 5.0 (see docs/upgrading-5.md, `npx usa-codemod-5`)
19
+ if (options.motionIntensity === 'off')
20
+ deprecate('intensity-off', "motionIntensity: 'off' is deprecated and will be removed in 5.0 — use motionSensitivity: 'minimal' (setMotionSensitivity('minimal')) instead.");
21
+ if (options.reducedMotion === 'no-preference')
22
+ deprecate('reduced-no-preference', "reducedMotion: 'no-preference' is deprecated and will be removed in 5.0 — the OS setting is always respected; use 'user' (default) or 'reduce'.");
23
+ }
17
24
  Object.assign(config, options);
18
25
  if (options.motionIntensity && typeof document !== 'undefined') {
19
26
  document.documentElement.style.setProperty('--usa-motion', String(MOTION_SCALE[options.motionIntensity] ?? 1));
@@ -58,6 +65,17 @@ function adaptKeyframes(frames, level = config.motionSensitivity) {
58
65
  return out;
59
66
  });
60
67
  }
68
+ let quiet = 0;
69
+ /** Run `fn` without 4.9 deprecation warnings (library-internal calls). */
70
+ function withoutDeprecations(fn) {
71
+ quiet++;
72
+ try {
73
+ return fn();
74
+ }
75
+ finally {
76
+ quiet--;
77
+ }
78
+ }
61
79
  /** The current global motion intensity. */
62
80
  function getMotionIntensity() {
63
81
  return config.motionIntensity;
@@ -361,6 +379,15 @@ const EASE_OUT = 'cubic-bezier(0.22, 1, 0.36, 1)';
361
379
  const EASE_SPRING = 'cubic-bezier(0.34, 1.56, 0.64, 1)';
362
380
  /** Windows Fluent "decelerate" / "point-to-point" curves. */
363
381
  const FLUENT_DECELERATE = 'cubic-bezier(0.1, 0.9, 0.2, 1)';
382
+ const warned = new Set();
383
+ /** Log a deprecation once per key (console.warn). */
384
+ function deprecate(key, message) {
385
+ if (warned.has(key))
386
+ return;
387
+ warned.add(key);
388
+ if (typeof console !== 'undefined')
389
+ console.warn(`[use-scroll-animate] ${message}`);
390
+ }
364
391
  /**
365
392
  * The `kind` attribute of `<usa-spinner>`, `<usa-check>`, `<usa-dialog>` and
366
393
  * `<usa-acrylic>` (3.0: `variant` only selects a style variant).
@@ -7946,6 +7973,7 @@ var css$7 = "";
7946
7973
 
7947
7974
  const LEVELS = ['off', 'low', 'normal', 'high'];
7948
7975
  const KEY$1 = 'usa:motion';
7976
+ let fromSwitch = false;
7949
7977
  /**
7950
7978
  * Set the global motion intensity for every `<usa-*>` component:
7951
7979
  * `'off'` (like reduced motion), `'low'`, `'normal'` (default), `'high'`.
@@ -7955,7 +7983,9 @@ const KEY$1 = 'usa:motion';
7955
7983
  function setMotionIntensity(level, persist = false) {
7956
7984
  if (!LEVELS.includes(level))
7957
7985
  return;
7958
- configureComponents({ motionIntensity: level });
7986
+ if (level === 'off' && !fromSwitch)
7987
+ deprecate('set-intensity-off', "setMotionIntensity('off') is deprecated and will be removed in 5.0 — use setMotionSensitivity('minimal') from use-scroll-animate/components/a11y.");
7988
+ withoutDeprecations(() => configureComponents({ motionIntensity: level }));
7959
7989
  if (persist) {
7960
7990
  try {
7961
7991
  localStorage.setItem(KEY$1, level);
@@ -7971,12 +8001,15 @@ function setMotionIntensity(level, persist = false) {
7971
8001
  function restoreMotionIntensity() {
7972
8002
  try {
7973
8003
  const v = localStorage.getItem(KEY$1);
7974
- if (v && LEVELS.includes(v))
8004
+ if (v && LEVELS.includes(v)) {
8005
+ fromSwitch = true;
7975
8006
  setMotionIntensity(v);
8007
+ }
7976
8008
  }
7977
8009
  catch {
7978
8010
  /* ignore */
7979
8011
  }
8012
+ fromSwitch = false;
7980
8013
  return getMotionIntensity();
7981
8014
  }
7982
8015
  function defineMotionSwitch(tag = 'usa-motion-switch') {
@@ -7985,7 +8018,9 @@ function defineMotionSwitch(tag = 'usa-motion-switch') {
7985
8018
  return getMotionIntensity();
7986
8019
  }
7987
8020
  set value(v) {
8021
+ fromSwitch = true;
7988
8022
  setMotionIntensity(v, true);
8023
+ fromSwitch = false;
7989
8024
  this.sync();
7990
8025
  }
7991
8026
  mount() {
@@ -8176,6 +8211,8 @@ function defineTimeline(tag = 'usa-timeline') {
8176
8211
  // (0–0.95) or `scrub="js"` opt into the JS engine, `scrub="scroll"`
8177
8212
  // follows this element's own scroll position.
8178
8213
  const v = this.str('scrub');
8214
+ if (v === 'js')
8215
+ deprecate('timeline-scrub-js', '<usa-timeline scrub="js"> is deprecated and will be removed in 5.0 — the JS engine is picked automatically where native scroll timelines are missing; add smooth="…" to opt into smoothing.');
8179
8216
  const stop = tl.scrub(this, { smooth: this.num('smooth', 0), engine: v === 'js' ? 'js' : 'auto', source: v === 'scroll' ? 'scroll' : 'view' });
8180
8217
  this.toggleAttribute('data-native', stop.native);
8181
8218
  this.onCleanup(stop);
@@ -10042,6 +10079,40 @@ function definePacksComponents() {
10042
10079
  definePack();
10043
10080
  }
10044
10081
 
10082
+ /**
10083
+ * 4.9 — the 5.0 modern-browser baseline. `baselineReport()` lists which
10084
+ * required / progressive features this browser has; `warnBaseline()` logs
10085
+ * once in development when a required one is missing.
10086
+ */
10087
+ /** Required in 5.0: Custom Elements, WAAPI, IntersectionObserver, ResizeObserver, adoptedStyleSheets. Progressive: View Transitions, scroll-driven animations, WebGL. */
10088
+ function baselineReport() {
10089
+ const w = (typeof window !== 'undefined' ? window : {});
10090
+ const d = (typeof document !== 'undefined' ? document : {});
10091
+ const css = (q) => typeof w.CSS?.supports === 'function' && w.CSS.supports(q);
10092
+ return [
10093
+ { id: 'custom-elements', required: true, supported: !!w.customElements },
10094
+ { id: 'web-animations', required: true, supported: typeof w.Element?.prototype?.animate === 'function' },
10095
+ { id: 'intersection-observer', required: true, supported: typeof w.IntersectionObserver === 'function' },
10096
+ { id: 'resize-observer', required: true, supported: typeof w.ResizeObserver === 'function' },
10097
+ { id: 'adopted-stylesheets', required: true, supported: 'adoptedStyleSheets' in d },
10098
+ { id: 'view-transitions', required: false, supported: typeof d.startViewTransition === 'function' },
10099
+ { id: 'scroll-driven-animations', required: false, supported: css('animation-timeline: view()') },
10100
+ { id: 'webgl', required: false, supported: !!(d.createElement && (() => { try {
10101
+ return d.createElement('canvas').getContext('webgl');
10102
+ }
10103
+ catch {
10104
+ return null;
10105
+ } })()) },
10106
+ ];
10107
+ }
10108
+ /** Log (once) which required 5.0 features are missing here. Returns the missing ids. */
10109
+ function warnBaseline() {
10110
+ const missing = baselineReport().filter((f) => f.required && !f.supported).map((f) => f.id);
10111
+ if (missing.length)
10112
+ deprecate('baseline', `this browser lacks ${missing.join(', ')}; use-scroll-animate 5.0 requires them (modern-browser baseline, see docs/upgrading-5.md).`);
10113
+ return missing;
10114
+ }
10115
+
10045
10116
  /**
10046
10117
  * use-scroll-animate/components/a11y — accessibility toolkit (4.4).
10047
10118
  *
@@ -10513,6 +10584,7 @@ exports.applyPack = applyPack;
10513
10584
  exports.auditMotionA11y = auditMotionA11y;
10514
10585
  exports.autoAnimate = autoAnimate;
10515
10586
  exports.autoDegrade = autoDegrade;
10587
+ exports.baselineReport = baselineReport;
10516
10588
  exports.burst = burst;
10517
10589
  exports.categoryOf = categoryOf;
10518
10590
  exports.confetti = confetti;
@@ -10717,5 +10789,6 @@ exports.themeTransition = themeTransition;
10717
10789
  exports.timeline = timeline;
10718
10790
  exports.toast = toast;
10719
10791
  exports.viewTransition = viewTransition;
10792
+ exports.warnBaseline = warnBaseline;
10720
10793
  exports.watchPowerSaver = watchPowerSaver;
10721
10794
  //# sourceMappingURL=lite.cjs.map