use-scroll-animate 2.6.0 → 2.8.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 (87) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +3 -2
  3. package/README_ja.md +3 -2
  4. package/README_zh.md +3 -2
  5. package/dist/chunks/{base-5DFCAnvH.cjs → base-BR6fYLBA.cjs} +23 -2
  6. package/dist/chunks/base-BR6fYLBA.cjs.map +1 -0
  7. package/dist/chunks/{base-08OYzphB.js → base-C_w9ibbn.js} +21 -3
  8. package/dist/chunks/base-C_w9ibbn.js.map +1 -0
  9. package/dist/chunks/{spring-CpeFkxNd.js → spring-Dc8ZqDWE.js} +3 -3
  10. package/dist/chunks/spring-Dc8ZqDWE.js.map +1 -0
  11. package/dist/chunks/{spring-Bi4qY0pL.cjs → spring-DyHe1Hfa.cjs} +3 -3
  12. package/dist/chunks/spring-DyHe1Hfa.cjs.map +1 -0
  13. package/dist/chunks/variants-Bbatdq8d.cjs +39 -0
  14. package/dist/chunks/variants-Bbatdq8d.cjs.map +1 -0
  15. package/dist/chunks/variants-idgMVXhE.js +35 -0
  16. package/dist/chunks/variants-idgMVXhE.js.map +1 -0
  17. package/dist/components/background.cjs +277 -11
  18. package/dist/components/background.cjs.map +1 -1
  19. package/dist/components/background.css +2 -0
  20. package/dist/components/background.d.cts +71 -2
  21. package/dist/components/background.d.ts +71 -2
  22. package/dist/components/background.js +274 -13
  23. package/dist/components/background.js.map +1 -1
  24. package/dist/components/cards.cjs +2 -2
  25. package/dist/components/cards.d.cts +8 -0
  26. package/dist/components/cards.d.ts +8 -0
  27. package/dist/components/cards.js +3 -3
  28. package/dist/components/click.cjs +2 -2
  29. package/dist/components/click.d.cts +8 -0
  30. package/dist/components/click.d.ts +8 -0
  31. package/dist/components/click.js +3 -3
  32. package/dist/components/feedback.cjs +1 -1
  33. package/dist/components/feedback.d.cts +8 -0
  34. package/dist/components/feedback.d.ts +8 -0
  35. package/dist/components/feedback.js +2 -2
  36. package/dist/components/interaction.cjs +1 -1
  37. package/dist/components/interaction.d.cts +8 -0
  38. package/dist/components/interaction.d.ts +8 -0
  39. package/dist/components/interaction.js +2 -2
  40. package/dist/components/page.cjs +801 -0
  41. package/dist/components/page.cjs.map +1 -0
  42. package/dist/components/page.css +11 -0
  43. package/dist/components/page.d.cts +275 -0
  44. package/dist/components/page.d.ts +275 -0
  45. package/dist/components/page.js +776 -0
  46. package/dist/components/page.js.map +1 -0
  47. package/dist/components/physics.cjs +2 -2
  48. package/dist/components/physics.d.cts +8 -0
  49. package/dist/components/physics.d.ts +8 -0
  50. package/dist/components/physics.js +4 -4
  51. package/dist/components/reveal.cjs +1 -1
  52. package/dist/components/reveal.d.cts +8 -0
  53. package/dist/components/reveal.d.ts +8 -0
  54. package/dist/components/reveal.js +2 -2
  55. package/dist/components/text.cjs +180 -11
  56. package/dist/components/text.cjs.map +1 -1
  57. package/dist/components/text.css +1 -0
  58. package/dist/components/text.d.cts +62 -2
  59. package/dist/components/text.d.ts +62 -2
  60. package/dist/components/text.js +177 -13
  61. package/dist/components/text.js.map +1 -1
  62. package/dist/components/transitions.cjs +1 -1
  63. package/dist/components/transitions.d.cts +8 -0
  64. package/dist/components/transitions.d.ts +8 -0
  65. package/dist/components/transitions.js +2 -2
  66. package/dist/components/ui.cjs +18 -48
  67. package/dist/components/ui.cjs.map +1 -1
  68. package/dist/components/ui.d.cts +8 -0
  69. package/dist/components/ui.d.ts +8 -0
  70. package/dist/components/ui.js +6 -35
  71. package/dist/components/ui.js.map +1 -1
  72. package/dist/components.cjs +45 -8
  73. package/dist/components.cjs.map +1 -1
  74. package/dist/components.css +12 -0
  75. package/dist/components.d.cts +354 -4
  76. package/dist/components.d.ts +354 -4
  77. package/dist/components.js +16 -10
  78. package/dist/components.js.map +1 -1
  79. package/dist/components.umd.js +2 -2
  80. package/dist/components.umd.js.map +1 -1
  81. package/docs/components.md +34 -0
  82. package/docs/windows-apps.md +11 -0
  83. package/package.json +13 -2
  84. package/dist/chunks/base-08OYzphB.js.map +0 -1
  85. package/dist/chunks/base-5DFCAnvH.cjs.map +0 -1
  86. package/dist/chunks/spring-Bi4qY0pL.cjs.map +0 -1
  87. package/dist/chunks/spring-CpeFkxNd.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { d as defineElement, s as srText, e as caf, n as now, r as raf, E as EASE_OUT, f as EASE_SPRING } from '../chunks/base-08OYzphB.js';
2
- export { a as configureComponents, p as prefersReducedMotion } from '../chunks/base-08OYzphB.js';
1
+ import { d as defineElement, s as srText, e as caf, n as now, r as raf, E as EASE_OUT, f as EASE_SPRING, b as clamp } from '../chunks/base-C_w9ibbn.js';
2
+ export { a as configureComponents, p as prefersReducedMotion } from '../chunks/base-C_w9ibbn.js';
3
3
 
4
- var css$4 = "usa-typewriter{white-space:pre-wrap}usa-typewriter .usa-tw-caret{display:inline-block;width:var(--usa-caret-width,0.08em);height:1.05em;margin-left:0.06em;vertical-align:-0.12em;background:var(--usa-caret-color,currentColor);animation:usa-caret 1.06s steps(1) infinite}usa-typewriter[data-typing] .usa-tw-caret{animation:none}usa-typewriter[data-no-cursor] .usa-tw-caret{display:none}@keyframes usa-caret{50%{opacity:0}}@media (prefers-reduced-motion:reduce){usa-typewriter .usa-tw-caret,usa-shimmer-text{animation:none}}";
4
+ var css$5 = "usa-typewriter{white-space:pre-wrap}usa-typewriter .usa-tw-caret{display:inline-block;width:var(--usa-caret-width,0.08em);height:1.05em;margin-left:0.06em;vertical-align:-0.12em;background:var(--usa-caret-color,currentColor);animation:usa-caret 1.06s steps(1) infinite}usa-typewriter[data-typing] .usa-tw-caret{animation:none}usa-typewriter[data-no-cursor] .usa-tw-caret{display:none}@keyframes usa-caret{50%{opacity:0}}@media (prefers-reduced-motion:reduce){usa-typewriter .usa-tw-caret,usa-shimmer-text{animation:none}}";
5
5
 
6
6
  function defineTypewriter(tag = 'usa-typewriter') {
7
7
  return defineElement(tag, (Base) => class UsaTypewriter extends Base {
@@ -115,10 +115,10 @@ function defineTypewriter(tag = 'usa-typewriter') {
115
115
  };
116
116
  this._timer = setTimeout(tick, this.num('delay', 0));
117
117
  }
118
- }, { id: 'typewriter', text: css$4 });
118
+ }, { id: 'typewriter', text: css$5 });
119
119
  }
120
120
 
121
- var css$3 = "usa-split-text .usa-split-word{display:inline-block;white-space:nowrap}usa-split-text .usa-split-unit{display:inline-block;white-space:pre}usa-split-text[data-state=\"hidden\"] .usa-split-unit{opacity:0}usa-split-text[data-state=\"play\"] .usa-split-unit{animation:usa-split-rise var(--usa-split-duration,620ms) cubic-bezier(0.22,1,0.36,1) both;animation-delay:calc(var(--usa-split-delay,0ms) + var(--i,0) * var(--usa-split-stagger,28ms))}usa-split-text[effect=\"fade\"][data-state=\"play\"] .usa-split-unit{animation-name:usa-split-fade}usa-split-text[effect=\"blur\"][data-state=\"play\"] .usa-split-unit{animation-name:usa-split-blur}usa-split-text[effect=\"flip\"][data-state=\"play\"] .usa-split-unit{animation-name:usa-split-flip;transform-origin:50% 100%}usa-split-text[effect=\"pop\"][data-state=\"play\"] .usa-split-unit{animation-name:usa-split-pop;animation-timing-function:cubic-bezier(0.34,1.56,0.64,1)}@keyframes usa-split-rise{from{opacity:0;transform:translate3d(0,0.6em,0)}to{opacity:1;transform:none}}@keyframes usa-split-fade{from{opacity:0}to{opacity:1}}@keyframes usa-split-blur{from{opacity:0;filter:blur(8px)}to{opacity:1;filter:none}}@keyframes usa-split-flip{from{opacity:0;transform:perspective(500px) rotateX(-80deg)}to{opacity:1;transform:none}}@keyframes usa-split-pop{from{opacity:0;transform:scale(0.3)}to{opacity:1;transform:none}}@media (prefers-reduced-motion:reduce){usa-split-text .usa-split-unit{animation:none !important;opacity:1 !important}}";
121
+ var css$4 = "usa-split-text .usa-split-word{display:inline-block;white-space:nowrap}usa-split-text .usa-split-unit{display:inline-block;white-space:pre}usa-split-text[data-state=\"hidden\"] .usa-split-unit{opacity:0}usa-split-text[data-state=\"play\"] .usa-split-unit{animation:usa-split-rise var(--usa-split-duration,620ms) cubic-bezier(0.22,1,0.36,1) both;animation-delay:calc(var(--usa-split-delay,0ms) + var(--i,0) * var(--usa-split-stagger,28ms))}usa-split-text[effect=\"fade\"][data-state=\"play\"] .usa-split-unit{animation-name:usa-split-fade}usa-split-text[effect=\"blur\"][data-state=\"play\"] .usa-split-unit{animation-name:usa-split-blur}usa-split-text[effect=\"flip\"][data-state=\"play\"] .usa-split-unit{animation-name:usa-split-flip;transform-origin:50% 100%}usa-split-text[effect=\"pop\"][data-state=\"play\"] .usa-split-unit{animation-name:usa-split-pop;animation-timing-function:cubic-bezier(0.34,1.56,0.64,1)}@keyframes usa-split-rise{from{opacity:0;transform:translate3d(0,0.6em,0)}to{opacity:1;transform:none}}@keyframes usa-split-fade{from{opacity:0}to{opacity:1}}@keyframes usa-split-blur{from{opacity:0;filter:blur(8px)}to{opacity:1;filter:none}}@keyframes usa-split-flip{from{opacity:0;transform:perspective(500px) rotateX(-80deg)}to{opacity:1;transform:none}}@keyframes usa-split-pop{from{opacity:0;transform:scale(0.3)}to{opacity:1;transform:none}}@media (prefers-reduced-motion:reduce){usa-split-text .usa-split-unit{animation:none !important;opacity:1 !important}}";
122
122
 
123
123
  function defineSplitText(tag = 'usa-split-text') {
124
124
  return defineElement(tag, (Base) => class UsaSplitText extends Base {
@@ -203,7 +203,7 @@ function defineSplitText(tag = 'usa-split-text') {
203
203
  clearTimeout(this._timer);
204
204
  this.setAttribute('data-state', this.reduced ? 'shown' : 'hidden');
205
205
  }
206
- }, { id: 'split-text', text: css$3 });
206
+ }, { id: 'split-text', text: css$4 });
207
207
  }
208
208
 
209
209
  const GLYPHS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789#%&*+=<>/\\?!';
@@ -297,7 +297,7 @@ function defineScramble(tag = 'usa-scramble') {
297
297
  }, undefined);
298
298
  }
299
299
 
300
- var css$2 = "usa-counter{font-variant-numeric:tabular-nums}";
300
+ var css$3 = "usa-counter{font-variant-numeric:tabular-nums}";
301
301
 
302
302
  /** easeOutExpo */
303
303
  const easeOutExpo = (t) => (t >= 1 ? 1 : 1 - Math.pow(2, -10 * t));
@@ -397,10 +397,10 @@ function defineCounter(tag = 'usa-counter') {
397
397
  this._frame = raf(step);
398
398
  });
399
399
  }
400
- }, { id: 'counter', text: css$2 });
400
+ }, { id: 'counter', text: css$3 });
401
401
  }
402
402
 
403
- var css$1 = "usa-shimmer-text{--usa-shimmer-color:currentColor;--usa-shimmer-shine:#fff;background:linear-gradient(var(--usa-shimmer-angle,110deg),var(--usa-shimmer-color) 35%,var(--usa-shimmer-shine) 50%,var(--usa-shimmer-color) 65%) 0 0 / 250% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;animation:usa-shimmer var(--usa-shimmer-duration,2600ms) linear infinite}@keyframes usa-shimmer{from{background-position:100% 0}to{background-position:-150% 0}}";
403
+ var css$2 = "usa-shimmer-text{--usa-shimmer-color:currentColor;--usa-shimmer-shine:#fff;background:linear-gradient(var(--usa-shimmer-angle,110deg),var(--usa-shimmer-color) 35%,var(--usa-shimmer-shine) 50%,var(--usa-shimmer-color) 65%) 0 0 / 250% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;animation:usa-shimmer var(--usa-shimmer-duration,2600ms) linear infinite}@keyframes usa-shimmer{from{background-position:100% 0}to{background-position:-150% 0}}";
404
404
 
405
405
  function defineShimmerText(tag = 'usa-shimmer-text') {
406
406
  return defineElement(tag, (Base) => class UsaShimmerText extends Base {
@@ -420,10 +420,10 @@ function defineShimmerText(tag = 'usa-shimmer-text') {
420
420
  set('shine', '--usa-shimmer-shine');
421
421
  set('angle', '--usa-shimmer-angle', 'deg');
422
422
  }
423
- }, { id: 'shimmer-text', text: css$1 });
423
+ }, { id: 'shimmer-text', text: css$2 });
424
424
  }
425
425
 
426
- var css = "usa-text-rotate{display:inline-grid;vertical-align:bottom;overflow:hidden;padding-block:0.08em}usa-text-rotate .usa-rotate-word{grid-area:1 / 1;white-space:nowrap}usa-text-rotate .usa-rotate-word[data-hidden]{opacity:0}";
426
+ var css$1 = "usa-text-rotate{display:inline-grid;vertical-align:bottom;overflow:hidden;padding-block:0.08em}usa-text-rotate .usa-rotate-word{grid-area:1 / 1;white-space:nowrap}usa-text-rotate .usa-rotate-word[data-hidden]{opacity:0}";
427
427
 
428
428
  function defineTextRotate(tag = 'usa-text-rotate') {
429
429
  return defineElement(tag, (Base) => class UsaTextRotate extends Base {
@@ -495,7 +495,166 @@ function defineTextRotate(tag = 'usa-text-rotate') {
495
495
  this.motion(cur, [inFrom, pick(inFrom)], { duration: 520, easing: effect === 'slide' ? EASE_SPRING : EASE_OUT });
496
496
  this.emit('change', { index: this._index, word: cur.textContent });
497
497
  }
498
- }, { id: 'text-rotate', text: css });
498
+ }, { id: 'text-rotate', text: css$1 });
499
+ }
500
+
501
+ var css = "usa-wave-text .usa-word,usa-scroll-highlight .usa-word{display:inline-block;white-space:nowrap}usa-wave-text .usa-char{display:inline-block;animation:usa-wave var(--usa-wave-s,1.6s) ease-in-out infinite;animation-delay:calc(var(--i) * var(--usa-wave-d,0.06s))}@keyframes usa-wave{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(calc(var(--usa-wave-a,0.25em) * -1))}}usa-glitch{position:relative;display:inline-block}usa-glitch::before,usa-glitch::after{content:attr(data-text);position:absolute;inset:0;pointer-events:none}usa-glitch::before{color:#ff2bd6;transform:translate(calc(var(--usa-glitch-i,3px) * -1),0);clip-path:inset(0 0 55% 0);mix-blend-mode:screen;animation:usa-glitch-a 2.4s steps(2,end) infinite}usa-glitch::after{color:#00f0ff;transform:translate(var(--usa-glitch-i,3px),0);clip-path:inset(50% 0 0 0);mix-blend-mode:screen;animation:usa-glitch-b 1.9s steps(2,end) infinite}usa-glitch[trigger=\"hover\"]::before,usa-glitch[trigger=\"hover\"]::after{animation-play-state:paused;opacity:0}usa-glitch[trigger=\"hover\"]:hover::before,usa-glitch[trigger=\"hover\"]:hover::after{animation-play-state:running;opacity:1}@keyframes usa-glitch-a{0%{clip-path:inset(0 0 80% 0)}20%{clip-path:inset(30% 0 40% 0)}40%{clip-path:inset(70% 0 5% 0)}60%{clip-path:inset(10% 0 60% 0)}80%{clip-path:inset(50% 0 30% 0)}100%{clip-path:inset(0 0 80% 0)}}@keyframes usa-glitch-b{0%{clip-path:inset(60% 0 10% 0)}25%{clip-path:inset(15% 0 70% 0)}50%{clip-path:inset(80% 0 2% 0)}75%{clip-path:inset(40% 0 35% 0)}100%{clip-path:inset(60% 0 10% 0)}}usa-gradient-text{background:var(--usa-grad) 0 50% / 300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:usa-grad-flow var(--usa-grad-s,6s) linear infinite}@keyframes usa-grad-flow{to{background-position:150% 50%}}usa-handwriting{--usa-hw-stroke:currentColor;display:inline-block;line-height:0}usa-handwriting svg{max-width:100%;height:auto;overflow:visible}usa-handwriting text{fill:transparent;stroke:var(--usa-hw-stroke);stroke-width:1.2;stroke-dasharray:1600;stroke-dashoffset:1600;font-family:\"Segoe Script\",\"Brush Script MT\",\"Snell Roundhand\",cursive}usa-handwriting[data-state=\"drawing\"] text{animation:usa-hw-draw var(--usa-hw-d,2400ms) cubic-bezier(0.55,0,0.45,1) forwards,usa-hw-fill 0.6s ease calc(var(--usa-hw-d,2400ms) * 0.8) forwards}usa-handwriting[data-state=\"done\"] text{stroke-dashoffset:0;fill:currentColor}@keyframes usa-hw-draw{to{stroke-dashoffset:0}}@keyframes usa-hw-fill{to{fill:currentColor}}usa-scroll-highlight .usa-hl-word{opacity:var(--usa-hl-dim,0.2);transition:opacity 0.35s ease}usa-scroll-highlight .usa-hl-word[data-on]{opacity:1}usa-scroll-highlight[mode=\"marker\"]{--usa-hl-color:color-mix(in srgb,#facc15 55%,transparent);background:linear-gradient(var(--usa-hl-color),var(--usa-hl-color)) 0 88% / 0% 40% no-repeat;transition:background-size 1s cubic-bezier(0.65,0,0.35,1);-webkit-box-decoration-break:clone;box-decoration-break:clone}usa-scroll-highlight[mode=\"marker\"][data-lit]{background-size:100% 40%}@media (prefers-reduced-motion:reduce){usa-wave-text .usa-char,usa-glitch::before,usa-glitch::after,usa-gradient-text{animation:none !important}usa-glitch::before,usa-glitch::after{display:none}usa-scroll-highlight .usa-hl-word,usa-scroll-highlight[mode=\"marker\"]{transition:none}}";
502
+
503
+ /** Split `text` into per-character spans (words never break). The animated copy is aria-hidden. */
504
+ function splitChars(host, text) {
505
+ const vis = document.createElement('span');
506
+ vis.setAttribute('aria-hidden', 'true');
507
+ const chars = [];
508
+ text.split(/(\s+)/).forEach((w) => {
509
+ if (/^\s+$/.test(w)) {
510
+ vis.append(document.createTextNode(w));
511
+ return;
512
+ }
513
+ const word = document.createElement('span');
514
+ word.className = 'usa-word';
515
+ for (const c of Array.from(w)) {
516
+ const s = document.createElement('span');
517
+ s.className = 'usa-char';
518
+ s.textContent = c;
519
+ s.style.setProperty('--i', String(chars.length));
520
+ word.append(s);
521
+ chars.push(s);
522
+ }
523
+ vis.append(word);
524
+ });
525
+ host.replaceChildren(srText(text), vis);
526
+ return chars;
527
+ }
528
+ const textOf = (el) => (el.getAttribute('text') ?? el.dataset.usaText ?? (el.dataset.usaText = (el.textContent || '').trim()));
529
+ function defineWaveText(tag = 'usa-wave-text') {
530
+ return defineElement(tag, (Base) => class extends Base {
531
+ static get observedAttributes() { return ['text']; }
532
+ mount() {
533
+ splitChars(this, textOf(this));
534
+ this.style.setProperty('--usa-wave-a', `${this.num('amplitude', 0.25)}em`);
535
+ this.style.setProperty('--usa-wave-s', `${this.num('speed', 1.6)}s`);
536
+ this.style.setProperty('--usa-wave-d', `${this.num('stagger', 0.06)}s`);
537
+ }
538
+ }, { id: 'text-fx', text: css });
539
+ }
540
+ function defineGlitch(tag = 'usa-glitch') {
541
+ return defineElement(tag, (Base) => class extends Base {
542
+ static get observedAttributes() { return ['text', 'intensity']; }
543
+ mount() {
544
+ const t = textOf(this);
545
+ this.setAttribute('data-text', t);
546
+ this.style.setProperty('--usa-glitch-i', `${this.num('intensity', 3)}px`);
547
+ if (!this.firstChild)
548
+ this.textContent = t;
549
+ }
550
+ }, { id: 'text-fx', text: css });
551
+ }
552
+ function defineGradientText(tag = 'usa-gradient-text') {
553
+ return defineElement(tag, (Base) => class extends Base {
554
+ static get observedAttributes() { return ['colors', 'speed', 'angle']; }
555
+ mount() {
556
+ const c = this.str('colors', '#7c5cff,#22d3ee,#f472b6,#facc15').split(',').map((s) => s.trim());
557
+ this.style.setProperty('--usa-grad', `linear-gradient(${this.num('angle', 90)}deg, ${[...c, c[0]].join(', ')})`);
558
+ this.style.setProperty('--usa-grad-s', `${this.num('speed', 6)}s`);
559
+ }
560
+ }, { id: 'text-fx', text: css });
561
+ }
562
+ function defineHandwriting(tag = 'usa-handwriting') {
563
+ return defineElement(tag, (Base) => class extends Base {
564
+ static get observedAttributes() { return ['text', 'size', 'font']; }
565
+ mount() {
566
+ const t = textOf(this);
567
+ const size = this.num('size', 64);
568
+ const w = Math.ceil(t.length * size * 0.62) + 8;
569
+ this.replaceChildren(srText(t));
570
+ this.insertAdjacentHTML('beforeend', `<svg aria-hidden="true" viewBox="0 0 ${w} ${Math.ceil(size * 1.3)}" width="${w}" height="${Math.ceil(size * 1.3)}"><text x="4" y="${Math.round(size)}" font-size="${size}"></text></svg>`);
571
+ const text = this.querySelector('text');
572
+ text.textContent = t;
573
+ if (this.str('font'))
574
+ text.setAttribute('font-family', this.str('font'));
575
+ if (this.str('stroke'))
576
+ this.style.setProperty('--usa-hw-stroke', this.str('stroke'));
577
+ this.style.setProperty('--usa-hw-d', `${this.num('duration', 2400)}ms`);
578
+ if (this.reduced) {
579
+ this.setAttribute('data-state', 'done');
580
+ return;
581
+ }
582
+ this.inView((v) => v && this.play(), { threshold: 0.3 });
583
+ }
584
+ play() {
585
+ this.removeAttribute('data-state');
586
+ void this.offsetWidth;
587
+ this.setAttribute('data-state', 'drawing');
588
+ setTimeout(() => {
589
+ this.setAttribute('data-state', 'done');
590
+ this.emit('complete');
591
+ }, this.reduced ? 0 : this.num('duration', 2400));
592
+ }
593
+ }, { id: 'text-fx', text: css });
594
+ }
595
+ function defineScrollHighlight(tag = 'usa-scroll-highlight') {
596
+ return defineElement(tag, (Base) => class extends Base {
597
+ constructor() {
598
+ super(...arguments);
599
+ this._f = 0;
600
+ this._p = 0;
601
+ }
602
+ static get observedAttributes() { return ['mode', 'text']; }
603
+ get progress() { return this._p; }
604
+ mount() {
605
+ const mode = this.str('mode', 'words');
606
+ if (this.str('color'))
607
+ this.style.setProperty('--usa-hl-color', this.str('color'));
608
+ this.style.setProperty('--usa-hl-dim', String(this.num('dim', 0.2)));
609
+ if (mode === 'marker') {
610
+ if (this.reduced)
611
+ this.setAttribute('data-lit', '');
612
+ else
613
+ this.inView((v) => v && this.setAttribute('data-lit', ''), { threshold: 0.6 });
614
+ return;
615
+ }
616
+ const t = textOf(this);
617
+ const vis = document.createElement('span');
618
+ vis.setAttribute('aria-hidden', 'true');
619
+ const words = t.split(/\s+/).filter(Boolean).map((w) => {
620
+ const s = document.createElement('span');
621
+ s.className = 'usa-hl-word';
622
+ s.textContent = w;
623
+ vis.append(s, ' ');
624
+ return s;
625
+ });
626
+ this.replaceChildren(srText(t), vis);
627
+ if (this.reduced) {
628
+ words.forEach((w) => w.setAttribute('data-on', ''));
629
+ return;
630
+ }
631
+ const update = () => {
632
+ this._f = 0;
633
+ const r = this.getBoundingClientRect();
634
+ const H = window.innerHeight || 800;
635
+ this._p = clamp((H * 0.85 - r.top) / (r.height + H * 0.35), 0, 1);
636
+ const lit = Math.round(this._p * words.length);
637
+ words.forEach((w, i) => w.toggleAttribute('data-on', i < lit));
638
+ };
639
+ const on = () => !this._f && (this._f = raf(update));
640
+ let active = false;
641
+ this.inView((v) => {
642
+ if (v === active)
643
+ return;
644
+ active = v;
645
+ if (v)
646
+ window.addEventListener('scroll', on, { passive: true });
647
+ else
648
+ window.removeEventListener('scroll', on);
649
+ on();
650
+ });
651
+ this.onCleanup(() => window.removeEventListener('scroll', on));
652
+ }
653
+ unmount() {
654
+ caf(this._f);
655
+ this._f = 0;
656
+ }
657
+ }, { id: 'text-fx', text: css });
499
658
  }
500
659
 
501
660
  /**
@@ -511,7 +670,12 @@ function defineTextComponents() {
511
670
  defineCounter();
512
671
  defineShimmerText();
513
672
  defineTextRotate();
673
+ defineWaveText();
674
+ defineGlitch();
675
+ defineGradientText();
676
+ defineHandwriting();
677
+ defineScrollHighlight();
514
678
  }
515
679
 
516
- export { defineCounter, defineScramble, defineShimmerText, defineSplitText, defineTextComponents, defineTextRotate, defineTypewriter, easeOutExpo, scrambleFrame };
680
+ export { defineCounter, defineGlitch, defineGradientText, defineHandwriting, defineScramble, defineScrollHighlight, defineShimmerText, defineSplitText, defineTextComponents, defineTextRotate, defineTypewriter, defineWaveText, easeOutExpo, scrambleFrame };
517
681
  //# sourceMappingURL=text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","sources":["../../src/components/text/typewriter.ts","../../src/components/text/split-text.ts","../../src/components/text/scramble.ts","../../src/components/text/counter.ts","../../src/components/text/shimmer-text.ts","../../src/components/text/text-rotate.ts","../../src/components/text/index.ts"],"sourcesContent":["import { defineElement, srText, type UsaElement } from '../base';\nimport css from './typewriter.css?raw';\n\n/**\n * `<usa-typewriter>` — types text character by character, optionally cycling\n * through several phrases (typing, pausing, deleting).\n *\n * Attributes: `text` (default: the element's text), `words` (phrases\n * separated by `|`, overrides `text`), `speed` (ms per character, 55),\n * `delete-speed` (ms, 30), `pause` (ms before deleting, 1400), `delay`\n * (ms, 0), `loop`, `cursor=\"false\"` to hide the caret, `start`\n * (`view` | `load` | `manual`, default `view`). The full text is exposed to\n * assistive tech via `aria-label`. Event: `usa:complete` (one pass done).\n * Reduced motion: the text appears at once.\n */\nexport interface UsaTypewriterElement extends UsaElement {\n /** Phrases being typed. */\n readonly phrases: string[];\n start(): void;\n stop(): void;\n restart(): void;\n}\n\nexport function defineTypewriter(tag = 'usa-typewriter'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaTypewriter extends Base {\n static get observedAttributes(): string[] {\n return ['text', 'words'];\n }\n\n private _source: string | null = null;\n private _out: HTMLElement | null = null;\n private _timer: ReturnType<typeof setTimeout> | 0 = 0;\n private _running = false;\n\n get phrases(): string[] {\n const words = this.getAttribute('words');\n if (words) return words.split('|').map((w) => w.trim()).filter(Boolean);\n return [this.getAttribute('text') ?? this._source ?? ''];\n }\n\n mount(): void {\n if (this._source === null) this._source = (this.textContent || '').trim();\n const phrases = this.phrases;\n const sr = srText(phrases.join(', '));\n this._out = document.createElement('span');\n this._out.className = 'usa-tw-text';\n this._out.setAttribute('aria-hidden', 'true');\n const caret = document.createElement('span');\n caret.className = 'usa-tw-caret';\n caret.setAttribute('aria-hidden', 'true');\n this.replaceChildren(sr, this._out, caret);\n this.toggleAttribute('data-no-cursor', this.getAttribute('cursor') === 'false');\n if (this.reduced) {\n this._out.textContent = phrases[0] || '';\n return;\n }\n const start = this.str('start', 'view');\n if (start === 'load') this.start();\n else if (start === 'view') {\n this.inView((visible) => {\n if (visible && !this._running && !this._out?.textContent) this.start();\n });\n }\n }\n\n unmount(): void {\n this.stop();\n }\n\n stop(): void {\n clearTimeout(this._timer as ReturnType<typeof setTimeout>);\n this._timer = 0;\n this._running = false;\n this.removeAttribute('data-typing');\n }\n\n restart(): void {\n this.stop();\n if (this._out) this._out.textContent = '';\n this.start();\n }\n\n start(): void {\n if (this._running || !this._out) return;\n const out = this._out;\n const phrases = this.phrases;\n if (this.reduced) {\n out.textContent = phrases[0] || '';\n return;\n }\n this._running = true;\n const speed = this.num('speed', 55);\n const del = this.num('delete-speed', 30);\n const pause = this.num('pause', 1400);\n const loop = this.flag('loop') || phrases.length > 1;\n let p = 0;\n let i = 0;\n let deleting = false;\n const tick = () => {\n const word = phrases[p] || '';\n if (!deleting) {\n i++;\n out.textContent = word.slice(0, i);\n this.setAttribute('data-typing', '');\n if (i >= word.length) {\n this.removeAttribute('data-typing');\n const last = p === phrases.length - 1;\n if (last) this.emit('complete');\n if (!loop && last) {\n this._running = false;\n return;\n }\n deleting = true;\n this._timer = setTimeout(tick, pause);\n return;\n }\n this._timer = setTimeout(tick, speed * (0.6 + Math.random() * 0.8));\n } else {\n i--;\n out.textContent = word.slice(0, Math.max(0, i));\n if (i <= 0) {\n deleting = false;\n p = (p + 1) % phrases.length;\n this._timer = setTimeout(tick, speed * 4);\n return;\n }\n this._timer = setTimeout(tick, del);\n }\n };\n this._timer = setTimeout(tick, this.num('delay', 0));\n }\n },\n { id: 'typewriter', text: css }\n );\n}\n","import { defineElement, srText, type UsaElement } from '../base';\nimport css from './split-text.css?raw';\n\n/**\n * `<usa-split-text>` — splits its text into words or characters and reveals\n * them in a cascade (pure CSS animation per unit, transform / opacity /\n * filter only). Words never break across lines.\n *\n * Attributes: `by` (`chars` | `words`, default `chars`), `effect`\n * (`rise` | `fade` | `blur` | `flip` | `pop`, default `rise`), `stagger`\n * (ms between units, 28 for chars / 70 for words), `duration` (ms, 620),\n * `delay` (ms, 0), `trigger` (`view` | `load` | `manual`, default `view`),\n * `repeat`. The original text stays readable via `aria-label`.\n * Event: `usa:complete`.\n */\nexport interface UsaSplitTextElement extends UsaElement {\n readonly units: HTMLElement[];\n play(): void;\n reset(): void;\n}\n\nexport function defineSplitText(tag = 'usa-split-text'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaSplitText extends Base {\n static get observedAttributes(): string[] {\n return ['by', 'text'];\n }\n\n private _source: string | null = null;\n private _timer: ReturnType<typeof setTimeout> | 0 = 0;\n\n get units(): HTMLElement[] {\n return Array.from(this.querySelectorAll<HTMLElement>('.usa-split-unit'));\n }\n\n mount(): void {\n if (this._source === null) this._source = this.getAttribute('text') ?? (this.textContent || '').replace(/\\s+/g, ' ').trim();\n const text = this.getAttribute('text') ?? this._source;\n const byWords = this.str('by', 'chars') === 'words';\n const frag = document.createDocumentFragment();\n frag.append(srText(text));\n let i = 0;\n text.split(' ').forEach((word, w) => {\n if (w > 0) frag.append(' ');\n const wordEl = document.createElement('span');\n wordEl.className = 'usa-split-word';\n wordEl.setAttribute('aria-hidden', 'true');\n const parts = byWords ? [word] : Array.from(word);\n for (const part of parts) {\n const u = document.createElement('span');\n u.className = 'usa-split-unit';\n u.textContent = part;\n u.style.setProperty('--i', String(i++));\n wordEl.append(u);\n }\n frag.append(wordEl);\n });\n this.replaceChildren(frag);\n this.style.setProperty('--usa-split-stagger', `${this.num('stagger', byWords ? 70 : 28)}ms`);\n this.style.setProperty('--usa-split-duration', `${this.num('duration', 620)}ms`);\n this.style.setProperty('--usa-split-delay', `${this.num('delay', 0)}ms`);\n this.style.setProperty('--usa-split-count', String(i));\n if (this.reduced) {\n this.setAttribute('data-state', 'shown');\n return;\n }\n this.setAttribute('data-state', 'hidden');\n const trigger = this.str('trigger', 'view');\n if (trigger === 'load') this.play();\n else if (trigger === 'view') {\n this.inView((visible) => {\n if (visible && this.getAttribute('data-state') === 'hidden') this.play();\n else if (!visible && this.flag('repeat')) this.reset();\n }, { threshold: 0.2 });\n }\n }\n\n unmount(): void {\n clearTimeout(this._timer as ReturnType<typeof setTimeout>);\n }\n\n play(): void {\n clearTimeout(this._timer as ReturnType<typeof setTimeout>);\n if (this.reduced) {\n this.setAttribute('data-state', 'shown');\n return;\n }\n // Restart the CSS animations\n this.setAttribute('data-state', 'hidden');\n void this.offsetWidth;\n this.setAttribute('data-state', 'play');\n const n = this.units.length;\n const total = this.num('delay', 0) + this.num('duration', 620) + Math.max(0, n - 1) * this.num('stagger', this.str('by') === 'words' ? 70 : 28);\n this._timer = setTimeout(() => {\n this.setAttribute('data-state', 'shown');\n this.emit('complete');\n }, total);\n }\n\n reset(): void {\n clearTimeout(this._timer as ReturnType<typeof setTimeout>);\n this.setAttribute('data-state', this.reduced ? 'shown' : 'hidden');\n }\n },\n { id: 'split-text', text: css }\n );\n}\n","import { defineElement, srText, raf, caf, now, type UsaElement } from '../base';\n\nconst GLYPHS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789#%&*+=<>/\\\\?!';\n\n/**\n * `<usa-scramble>` — \"decodes\" text out of random glyphs, left to right.\n *\n * Attributes: `text` (default: the element's text), `duration` (ms, 900),\n * `chars` (glyph set), `trigger` (`view` | `hover` | `load` | `manual`,\n * default `view`). Spaces and punctuation stay in place. Uses a monospace-\n * friendly fixed width per glyph only if you style it so; the element sets\n * nothing that causes reflow beyond its own text. Event: `usa:complete`.\n * Reduced motion: shows the final text.\n */\nexport interface UsaScrambleElement extends UsaElement {\n play(): Promise<void>;\n}\n\n/** One frame of the scramble: the first `progress` share is resolved. */\nexport function scrambleFrame(text: string, progress: number, glyphs = GLYPHS, rnd: () => number = Math.random): string {\n const done = Math.floor(text.length * progress);\n let out = '';\n for (let i = 0; i < text.length; i++) {\n const ch = text[i];\n out += i < done || /\\s|[.,:;!?'\"()\\-–—]/.test(ch) ? ch : glyphs[Math.floor(rnd() * glyphs.length)];\n }\n return out;\n}\n\nexport function defineScramble(tag = 'usa-scramble'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaScramble extends Base {\n static get observedAttributes(): string[] {\n return ['text'];\n }\n\n private _source: string | null = null;\n private _out: HTMLElement | null = null;\n private _frame = 0;\n\n private get text(): string {\n return this.getAttribute('text') ?? this._source ?? '';\n }\n\n mount(): void {\n if (this._source === null) this._source = (this.textContent || '').trim();\n this._out = document.createElement('span');\n this._out.setAttribute('aria-hidden', 'true');\n this._out.textContent = this.text;\n this.replaceChildren(srText(this.text), this._out);\n if (this.reduced) return;\n const trigger = this.str('trigger', 'view');\n if (trigger === 'load') this.play();\n else if (trigger === 'hover') {\n this.listen(this, 'pointerenter', () => this.play());\n this.listen(this, 'focusin', () => this.play());\n } else if (trigger === 'view') {\n let played = false;\n this.inView((v) => {\n if (v && !played) {\n played = true;\n this.play();\n }\n });\n }\n }\n\n unmount(): void {\n caf(this._frame);\n this._frame = 0;\n }\n\n play(): Promise<void> {\n caf(this._frame);\n const out = this._out;\n const text = this.text;\n if (!out || this.reduced) {\n if (out) out.textContent = text;\n return Promise.resolve();\n }\n const duration = this.num('duration', 900);\n const glyphs = this.str('chars', GLYPHS) || GLYPHS;\n const t0 = now();\n let last = -1;\n return new Promise((resolve) => {\n const step = () => {\n const p = Math.min(1, Math.max(0, now() - t0) / duration);\n // ~30 fps glyph churn is plenty and halves DOM writes\n const bucket = Math.floor(p * duration / 33);\n if (bucket !== last || p === 1) {\n last = bucket;\n out.textContent = p === 1 ? text : scrambleFrame(text, p, glyphs);\n }\n if (p < 1) this._frame = raf(step);\n else {\n this._frame = 0;\n this.emit('complete');\n resolve();\n }\n };\n this._frame = raf(step);\n });\n }\n },\n undefined\n );\n}\n","import { defineElement, raf, caf, now, type UsaElement } from '../base';\nimport css from './counter.css?raw';\n\n/**\n * `<usa-counter>` — counts up (or down) to a number when it scrolls into view.\n *\n * Attributes: `to` (target, required), `from` (0), `duration` (ms, 1600),\n * `decimals` (0), `locale` (default: the document language), `prefix`,\n * `suffix`, `grouping=\"false\"` (no thousands separators), `start`\n * (`view` | `load` | `manual`). Setting the `value` property animates from\n * the current value — handy for live dashboards. Uses tabular digits so\n * the width does not jump. Event: `usa:complete`. Reduced motion: jumps.\n */\nexport interface UsaCounterElement extends UsaElement {\n /** Current target; setting it animates to the new number. */\n value: number;\n /** Animate to `to` (default: the `to` attribute). */\n play(to?: number): Promise<void>;\n format(n: number): string;\n}\n\n/** easeOutExpo */\nexport const easeOutExpo = (t: number): number => (t >= 1 ? 1 : 1 - Math.pow(2, -10 * t));\n\nexport function defineCounter(tag = 'usa-counter'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaCounter extends Base {\n static get observedAttributes(): string[] {\n return ['to', 'decimals', 'locale', 'prefix', 'suffix', 'grouping'];\n }\n\n private _current = NaN;\n private _target = NaN;\n private _frame = 0;\n private _fmt: Intl.NumberFormat | null = null;\n\n get value(): number {\n return Number.isNaN(this._target) ? this.num('to', 0) : this._target;\n }\n set value(v: number) {\n this.play(Number(v));\n }\n\n format(n: number): string {\n if (!this._fmt) {\n const d = Math.max(0, Math.min(20, this.num('decimals', 0)));\n const locale = this.getAttribute('locale') || (typeof document !== 'undefined' && document.documentElement.lang) || undefined;\n try {\n this._fmt = new Intl.NumberFormat(locale, { minimumFractionDigits: d, maximumFractionDigits: d, useGrouping: this.getAttribute('grouping') !== 'false' });\n } catch {\n this._fmt = new Intl.NumberFormat(undefined, { minimumFractionDigits: d, maximumFractionDigits: d });\n }\n }\n return `${this.str('prefix')}${this._fmt.format(n)}${this.str('suffix')}`;\n }\n\n private render(n: number): void {\n this._current = n;\n this.textContent = this.format(n);\n }\n\n changed(name: string): void {\n this._fmt = null;\n if (name === 'to') this.play();\n else this.render(Number.isNaN(this._current) ? this.num('from', 0) : this._current);\n }\n\n mount(): void {\n this._fmt = null;\n const to = this.num('to', 0);\n if (this.reduced) {\n this._target = to;\n this.render(to);\n return;\n }\n if (Number.isNaN(this._current)) this.render(this.num('from', 0));\n const start = this.str('start', 'view');\n if (start === 'load') this.play();\n else if (start === 'view') {\n let done = false;\n this.inView((v) => {\n if (v && !done) {\n done = true;\n this.play();\n }\n }, { threshold: 0.4 });\n }\n }\n\n unmount(): void {\n caf(this._frame);\n this._frame = 0;\n }\n\n play(to = this.num('to', 0)): Promise<void> {\n caf(this._frame);\n this._target = to;\n const from = Number.isNaN(this._current) ? this.num('from', 0) : this._current;\n if (this.reduced || from === to || !this.isConnected) {\n this.render(to);\n this.emit('complete', { value: to });\n return Promise.resolve();\n }\n const duration = this.num('duration', 1600);\n const t0 = now();\n return new Promise((resolve) => {\n const step = () => {\n const t = Math.min(1, Math.max(0, now() - t0) / duration);\n this.render(from + (to - from) * easeOutExpo(t));\n if (t < 1) this._frame = raf(step);\n else {\n this._frame = 0;\n this.render(to);\n this.emit('complete', { value: to });\n resolve();\n }\n };\n this._frame = raf(step);\n });\n }\n },\n { id: 'counter', text: css }\n );\n}\n","import { defineElement, type UsaElement } from '../base';\nimport css from './shimmer-text.css?raw';\n\n/**\n * `<usa-shimmer-text>` — a light sweep across gradient-filled text (CSS\n * only; the element just maps attributes to custom properties).\n *\n * Attributes: `duration` (ms, 2600), `color` (base text colour), `shine`\n * (highlight colour), `angle` (deg, 110). Or style `--usa-shimmer-*`\n * directly. Reduced motion: static gradient text.\n */\nexport type UsaShimmerTextElement = UsaElement;\n\nexport function defineShimmerText(tag = 'usa-shimmer-text'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaShimmerText extends Base {\n static get observedAttributes(): string[] {\n return ['duration', 'color', 'shine', 'angle'];\n }\n\n mount(): void {\n const set = (attr: string, prop: string, unit = '') => {\n const v = this.getAttribute(attr);\n if (v !== null) this.style.setProperty(prop, v + unit);\n else this.style.removeProperty(prop);\n };\n set('duration', '--usa-shimmer-duration', 'ms');\n set('color', '--usa-shimmer-color');\n set('shine', '--usa-shimmer-shine');\n set('angle', '--usa-shimmer-angle', 'deg');\n }\n },\n { id: 'shimmer-text', text: css }\n );\n}\n","import { defineElement, srText, EASE_SPRING, EASE_OUT, type UsaElement } from '../base';\nimport css from './text-rotate.css?raw';\n\n/**\n * `<usa-text-rotate>` — cycles through words in place (\"Build *fast* /\n * *small* / *typed* apps\"). All words share one grid cell, so the width is\n * that of the longest word and nothing around it reflows.\n *\n * Attributes: `words` (separated by `|`, default: the element's text split\n * on `|`), `interval` (ms, 2200), `effect` (`slide` | `fade` | `flip` |\n * `blur`, default `slide`), `paused`. Pauses while off-screen and on hover\n * is not needed. Event: `usa:change` (`detail.index`, `detail.word`).\n * Reduced motion: words still change, without movement (fade only).\n */\nexport interface UsaTextRotateElement extends UsaElement {\n readonly index: number;\n next(): void;\n}\n\nexport function defineTextRotate(tag = 'usa-text-rotate'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaTextRotate extends Base {\n static get observedAttributes(): string[] {\n return ['words', 'interval', 'paused'];\n }\n\n private _source: string | null = null;\n private _index = 0;\n private _timer: ReturnType<typeof setInterval> | 0 = 0;\n private _visible = true;\n\n get index(): number {\n return this._index;\n }\n\n private get words(): string[] {\n return (this.getAttribute('words') ?? this._source ?? '').split('|').map((w) => w.trim()).filter(Boolean);\n }\n\n mount(): void {\n if (this._source === null) this._source = (this.textContent || '').trim();\n const words = this.words;\n this.replaceChildren(\n srText(words.join(', ')),\n ...words.map((w, i) => {\n const s = document.createElement('span');\n s.className = 'usa-rotate-word';\n s.textContent = w;\n s.setAttribute('aria-hidden', 'true');\n if (i !== this._index) s.setAttribute('data-hidden', '');\n return s;\n })\n );\n if (this._index >= words.length) this._index = 0;\n if (words.length < 2) return;\n this.inView((v) => (this._visible = v));\n if (!this.flag('paused')) {\n this._timer = setInterval(() => {\n if (this._visible && !(typeof document !== 'undefined' && document.hidden)) this.next();\n }, Math.max(400, this.num('interval', 2200)));\n }\n }\n\n unmount(): void {\n clearInterval(this._timer as ReturnType<typeof setInterval>);\n this._timer = 0;\n }\n\n next(): void {\n const els = Array.from(this.querySelectorAll<HTMLElement>('.usa-rotate-word'));\n if (els.length < 2) return;\n const prev = els[this._index];\n this._index = (this._index + 1) % els.length;\n const cur = els[this._index];\n prev.setAttribute('data-hidden', '');\n cur.removeAttribute('data-hidden');\n const effect = this.reduced ? 'fade' : this.str('effect', 'slide');\n const [inFrom, outTo] =\n effect === 'fade'\n ? [{ opacity: 0 }, { opacity: 0 }]\n : effect === 'flip'\n ? [{ opacity: 0, transform: 'perspective(400px) rotateX(-90deg)' }, { opacity: 0, transform: 'perspective(400px) rotateX(90deg)' }]\n : effect === 'blur'\n ? [{ opacity: 0, filter: 'blur(8px)' }, { opacity: 0, filter: 'blur(8px)' }]\n : [{ opacity: 0, transform: 'translateY(0.8em)' }, { opacity: 0, transform: 'translateY(-0.8em)' }];\n const neutral = { opacity: 1, transform: 'none', filter: 'none' };\n const pick = (f: Keyframe) => Object.fromEntries(Object.keys(f).map((k) => [k, (neutral as any)[k]]));\n this.motion(prev, [{ ...pick(outTo) }, outTo], { duration: 380, easing: EASE_OUT });\n this.motion(cur, [inFrom, pick(inFrom)], { duration: 520, easing: effect === 'slide' ? EASE_SPRING : EASE_OUT });\n this.emit('change', { index: this._index, word: cur.textContent });\n }\n },\n { id: 'text-rotate', text: css }\n );\n}\n","/**\n * use-scroll-animate/components/text — text effects.\n * `<usa-typewriter>`, `<usa-split-text>`, `<usa-scramble>`, `<usa-counter>`,\n * `<usa-shimmer-text>`, `<usa-text-rotate>`.\n */\nimport { defineTypewriter, type UsaTypewriterElement } from './typewriter';\nimport { defineSplitText, type UsaSplitTextElement } from './split-text';\nimport { defineScramble, type UsaScrambleElement } from './scramble';\nimport { defineCounter, type UsaCounterElement } from './counter';\nimport { defineShimmerText, type UsaShimmerTextElement } from './shimmer-text';\nimport { defineTextRotate, type UsaTextRotateElement } from './text-rotate';\n\nexport { defineTypewriter, defineSplitText, defineScramble, defineCounter, defineShimmerText, defineTextRotate };\nexport { scrambleFrame } from './scramble';\nexport { easeOutExpo } from './counter';\nexport type { UsaTypewriterElement, UsaSplitTextElement, UsaScrambleElement, UsaCounterElement, UsaShimmerTextElement, UsaTextRotateElement };\nexport { configureComponents, prefersReducedMotion } from '../base';\nexport type { ComponentsConfig, UsaElement } from '../base';\n\n/** Register every component of this category under its default tag. */\nexport function defineTextComponents(): void {\n defineTypewriter();\n defineSplitText();\n defineScramble();\n defineCounter();\n defineShimmerText();\n defineTextRotate();\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'usa-typewriter': UsaTypewriterElement;\n 'usa-split-text': UsaSplitTextElement;\n 'usa-scramble': UsaScrambleElement;\n 'usa-counter': UsaCounterElement;\n 'usa-shimmer-text': UsaShimmerTextElement;\n 'usa-text-rotate': UsaTextRotateElement;\n }\n}\n"],"names":["css"],"mappings":";;;;;AAuBM,SAAU,gBAAgB,CAAC,GAAG,GAAG,gBAAgB,EAAA;AACrD,IAAA,OAAO,aAAa,CAClB,GAAG,E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E;AACnB,IAAA,gBAAgB,EAAE;AACpB;;;;"}
1
+ {"version":3,"file":"text.js","sources":["../../src/components/text/typewriter.ts","../../src/components/text/split-text.ts","../../src/components/text/scramble.ts","../../src/components/text/counter.ts","../../src/components/text/shimmer-text.ts","../../src/components/text/text-rotate.ts","../../src/components/text/text-fx.ts","../../src/components/text/index.ts"],"sourcesContent":["import { defineElement, srText, type UsaElement } from '../base';\nimport css from './typewriter.css?raw';\n\n/**\n * `<usa-typewriter>` — types text character by character, optionally cycling\n * through several phrases (typing, pausing, deleting).\n *\n * Attributes: `text` (default: the element's text), `words` (phrases\n * separated by `|`, overrides `text`), `speed` (ms per character, 55),\n * `delete-speed` (ms, 30), `pause` (ms before deleting, 1400), `delay`\n * (ms, 0), `loop`, `cursor=\"false\"` to hide the caret, `start`\n * (`view` | `load` | `manual`, default `view`). The full text is exposed to\n * assistive tech via `aria-label`. Event: `usa:complete` (one pass done).\n * Reduced motion: the text appears at once.\n */\nexport interface UsaTypewriterElement extends UsaElement {\n /** Phrases being typed. */\n readonly phrases: string[];\n start(): void;\n stop(): void;\n restart(): void;\n}\n\nexport function defineTypewriter(tag = 'usa-typewriter'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaTypewriter extends Base {\n static get observedAttributes(): string[] {\n return ['text', 'words'];\n }\n\n private _source: string | null = null;\n private _out: HTMLElement | null = null;\n private _timer: ReturnType<typeof setTimeout> | 0 = 0;\n private _running = false;\n\n get phrases(): string[] {\n const words = this.getAttribute('words');\n if (words) return words.split('|').map((w) => w.trim()).filter(Boolean);\n return [this.getAttribute('text') ?? this._source ?? ''];\n }\n\n mount(): void {\n if (this._source === null) this._source = (this.textContent || '').trim();\n const phrases = this.phrases;\n const sr = srText(phrases.join(', '));\n this._out = document.createElement('span');\n this._out.className = 'usa-tw-text';\n this._out.setAttribute('aria-hidden', 'true');\n const caret = document.createElement('span');\n caret.className = 'usa-tw-caret';\n caret.setAttribute('aria-hidden', 'true');\n this.replaceChildren(sr, this._out, caret);\n this.toggleAttribute('data-no-cursor', this.getAttribute('cursor') === 'false');\n if (this.reduced) {\n this._out.textContent = phrases[0] || '';\n return;\n }\n const start = this.str('start', 'view');\n if (start === 'load') this.start();\n else if (start === 'view') {\n this.inView((visible) => {\n if (visible && !this._running && !this._out?.textContent) this.start();\n });\n }\n }\n\n unmount(): void {\n this.stop();\n }\n\n stop(): void {\n clearTimeout(this._timer as ReturnType<typeof setTimeout>);\n this._timer = 0;\n this._running = false;\n this.removeAttribute('data-typing');\n }\n\n restart(): void {\n this.stop();\n if (this._out) this._out.textContent = '';\n this.start();\n }\n\n start(): void {\n if (this._running || !this._out) return;\n const out = this._out;\n const phrases = this.phrases;\n if (this.reduced) {\n out.textContent = phrases[0] || '';\n return;\n }\n this._running = true;\n const speed = this.num('speed', 55);\n const del = this.num('delete-speed', 30);\n const pause = this.num('pause', 1400);\n const loop = this.flag('loop') || phrases.length > 1;\n let p = 0;\n let i = 0;\n let deleting = false;\n const tick = () => {\n const word = phrases[p] || '';\n if (!deleting) {\n i++;\n out.textContent = word.slice(0, i);\n this.setAttribute('data-typing', '');\n if (i >= word.length) {\n this.removeAttribute('data-typing');\n const last = p === phrases.length - 1;\n if (last) this.emit('complete');\n if (!loop && last) {\n this._running = false;\n return;\n }\n deleting = true;\n this._timer = setTimeout(tick, pause);\n return;\n }\n this._timer = setTimeout(tick, speed * (0.6 + Math.random() * 0.8));\n } else {\n i--;\n out.textContent = word.slice(0, Math.max(0, i));\n if (i <= 0) {\n deleting = false;\n p = (p + 1) % phrases.length;\n this._timer = setTimeout(tick, speed * 4);\n return;\n }\n this._timer = setTimeout(tick, del);\n }\n };\n this._timer = setTimeout(tick, this.num('delay', 0));\n }\n },\n { id: 'typewriter', text: css }\n );\n}\n","import { defineElement, srText, type UsaElement } from '../base';\nimport css from './split-text.css?raw';\n\n/**\n * `<usa-split-text>` — splits its text into words or characters and reveals\n * them in a cascade (pure CSS animation per unit, transform / opacity /\n * filter only). Words never break across lines.\n *\n * Attributes: `by` (`chars` | `words`, default `chars`), `effect`\n * (`rise` | `fade` | `blur` | `flip` | `pop`, default `rise`), `stagger`\n * (ms between units, 28 for chars / 70 for words), `duration` (ms, 620),\n * `delay` (ms, 0), `trigger` (`view` | `load` | `manual`, default `view`),\n * `repeat`. The original text stays readable via `aria-label`.\n * Event: `usa:complete`.\n */\nexport interface UsaSplitTextElement extends UsaElement {\n readonly units: HTMLElement[];\n play(): void;\n reset(): void;\n}\n\nexport function defineSplitText(tag = 'usa-split-text'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaSplitText extends Base {\n static get observedAttributes(): string[] {\n return ['by', 'text'];\n }\n\n private _source: string | null = null;\n private _timer: ReturnType<typeof setTimeout> | 0 = 0;\n\n get units(): HTMLElement[] {\n return Array.from(this.querySelectorAll<HTMLElement>('.usa-split-unit'));\n }\n\n mount(): void {\n if (this._source === null) this._source = this.getAttribute('text') ?? (this.textContent || '').replace(/\\s+/g, ' ').trim();\n const text = this.getAttribute('text') ?? this._source;\n const byWords = this.str('by', 'chars') === 'words';\n const frag = document.createDocumentFragment();\n frag.append(srText(text));\n let i = 0;\n text.split(' ').forEach((word, w) => {\n if (w > 0) frag.append(' ');\n const wordEl = document.createElement('span');\n wordEl.className = 'usa-split-word';\n wordEl.setAttribute('aria-hidden', 'true');\n const parts = byWords ? [word] : Array.from(word);\n for (const part of parts) {\n const u = document.createElement('span');\n u.className = 'usa-split-unit';\n u.textContent = part;\n u.style.setProperty('--i', String(i++));\n wordEl.append(u);\n }\n frag.append(wordEl);\n });\n this.replaceChildren(frag);\n this.style.setProperty('--usa-split-stagger', `${this.num('stagger', byWords ? 70 : 28)}ms`);\n this.style.setProperty('--usa-split-duration', `${this.num('duration', 620)}ms`);\n this.style.setProperty('--usa-split-delay', `${this.num('delay', 0)}ms`);\n this.style.setProperty('--usa-split-count', String(i));\n if (this.reduced) {\n this.setAttribute('data-state', 'shown');\n return;\n }\n this.setAttribute('data-state', 'hidden');\n const trigger = this.str('trigger', 'view');\n if (trigger === 'load') this.play();\n else if (trigger === 'view') {\n this.inView((visible) => {\n if (visible && this.getAttribute('data-state') === 'hidden') this.play();\n else if (!visible && this.flag('repeat')) this.reset();\n }, { threshold: 0.2 });\n }\n }\n\n unmount(): void {\n clearTimeout(this._timer as ReturnType<typeof setTimeout>);\n }\n\n play(): void {\n clearTimeout(this._timer as ReturnType<typeof setTimeout>);\n if (this.reduced) {\n this.setAttribute('data-state', 'shown');\n return;\n }\n // Restart the CSS animations\n this.setAttribute('data-state', 'hidden');\n void this.offsetWidth;\n this.setAttribute('data-state', 'play');\n const n = this.units.length;\n const total = this.num('delay', 0) + this.num('duration', 620) + Math.max(0, n - 1) * this.num('stagger', this.str('by') === 'words' ? 70 : 28);\n this._timer = setTimeout(() => {\n this.setAttribute('data-state', 'shown');\n this.emit('complete');\n }, total);\n }\n\n reset(): void {\n clearTimeout(this._timer as ReturnType<typeof setTimeout>);\n this.setAttribute('data-state', this.reduced ? 'shown' : 'hidden');\n }\n },\n { id: 'split-text', text: css }\n );\n}\n","import { defineElement, srText, raf, caf, now, type UsaElement } from '../base';\n\nconst GLYPHS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789#%&*+=<>/\\\\?!';\n\n/**\n * `<usa-scramble>` — \"decodes\" text out of random glyphs, left to right.\n *\n * Attributes: `text` (default: the element's text), `duration` (ms, 900),\n * `chars` (glyph set), `trigger` (`view` | `hover` | `load` | `manual`,\n * default `view`). Spaces and punctuation stay in place. Uses a monospace-\n * friendly fixed width per glyph only if you style it so; the element sets\n * nothing that causes reflow beyond its own text. Event: `usa:complete`.\n * Reduced motion: shows the final text.\n */\nexport interface UsaScrambleElement extends UsaElement {\n play(): Promise<void>;\n}\n\n/** One frame of the scramble: the first `progress` share is resolved. */\nexport function scrambleFrame(text: string, progress: number, glyphs = GLYPHS, rnd: () => number = Math.random): string {\n const done = Math.floor(text.length * progress);\n let out = '';\n for (let i = 0; i < text.length; i++) {\n const ch = text[i];\n out += i < done || /\\s|[.,:;!?'\"()\\-–—]/.test(ch) ? ch : glyphs[Math.floor(rnd() * glyphs.length)];\n }\n return out;\n}\n\nexport function defineScramble(tag = 'usa-scramble'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaScramble extends Base {\n static get observedAttributes(): string[] {\n return ['text'];\n }\n\n private _source: string | null = null;\n private _out: HTMLElement | null = null;\n private _frame = 0;\n\n private get text(): string {\n return this.getAttribute('text') ?? this._source ?? '';\n }\n\n mount(): void {\n if (this._source === null) this._source = (this.textContent || '').trim();\n this._out = document.createElement('span');\n this._out.setAttribute('aria-hidden', 'true');\n this._out.textContent = this.text;\n this.replaceChildren(srText(this.text), this._out);\n if (this.reduced) return;\n const trigger = this.str('trigger', 'view');\n if (trigger === 'load') this.play();\n else if (trigger === 'hover') {\n this.listen(this, 'pointerenter', () => this.play());\n this.listen(this, 'focusin', () => this.play());\n } else if (trigger === 'view') {\n let played = false;\n this.inView((v) => {\n if (v && !played) {\n played = true;\n this.play();\n }\n });\n }\n }\n\n unmount(): void {\n caf(this._frame);\n this._frame = 0;\n }\n\n play(): Promise<void> {\n caf(this._frame);\n const out = this._out;\n const text = this.text;\n if (!out || this.reduced) {\n if (out) out.textContent = text;\n return Promise.resolve();\n }\n const duration = this.num('duration', 900);\n const glyphs = this.str('chars', GLYPHS) || GLYPHS;\n const t0 = now();\n let last = -1;\n return new Promise((resolve) => {\n const step = () => {\n const p = Math.min(1, Math.max(0, now() - t0) / duration);\n // ~30 fps glyph churn is plenty and halves DOM writes\n const bucket = Math.floor(p * duration / 33);\n if (bucket !== last || p === 1) {\n last = bucket;\n out.textContent = p === 1 ? text : scrambleFrame(text, p, glyphs);\n }\n if (p < 1) this._frame = raf(step);\n else {\n this._frame = 0;\n this.emit('complete');\n resolve();\n }\n };\n this._frame = raf(step);\n });\n }\n },\n undefined\n );\n}\n","import { defineElement, raf, caf, now, type UsaElement } from '../base';\nimport css from './counter.css?raw';\n\n/**\n * `<usa-counter>` — counts up (or down) to a number when it scrolls into view.\n *\n * Attributes: `to` (target, required), `from` (0), `duration` (ms, 1600),\n * `decimals` (0), `locale` (default: the document language), `prefix`,\n * `suffix`, `grouping=\"false\"` (no thousands separators), `start`\n * (`view` | `load` | `manual`). Setting the `value` property animates from\n * the current value — handy for live dashboards. Uses tabular digits so\n * the width does not jump. Event: `usa:complete`. Reduced motion: jumps.\n */\nexport interface UsaCounterElement extends UsaElement {\n /** Current target; setting it animates to the new number. */\n value: number;\n /** Animate to `to` (default: the `to` attribute). */\n play(to?: number): Promise<void>;\n format(n: number): string;\n}\n\n/** easeOutExpo */\nexport const easeOutExpo = (t: number): number => (t >= 1 ? 1 : 1 - Math.pow(2, -10 * t));\n\nexport function defineCounter(tag = 'usa-counter'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaCounter extends Base {\n static get observedAttributes(): string[] {\n return ['to', 'decimals', 'locale', 'prefix', 'suffix', 'grouping'];\n }\n\n private _current = NaN;\n private _target = NaN;\n private _frame = 0;\n private _fmt: Intl.NumberFormat | null = null;\n\n get value(): number {\n return Number.isNaN(this._target) ? this.num('to', 0) : this._target;\n }\n set value(v: number) {\n this.play(Number(v));\n }\n\n format(n: number): string {\n if (!this._fmt) {\n const d = Math.max(0, Math.min(20, this.num('decimals', 0)));\n const locale = this.getAttribute('locale') || (typeof document !== 'undefined' && document.documentElement.lang) || undefined;\n try {\n this._fmt = new Intl.NumberFormat(locale, { minimumFractionDigits: d, maximumFractionDigits: d, useGrouping: this.getAttribute('grouping') !== 'false' });\n } catch {\n this._fmt = new Intl.NumberFormat(undefined, { minimumFractionDigits: d, maximumFractionDigits: d });\n }\n }\n return `${this.str('prefix')}${this._fmt.format(n)}${this.str('suffix')}`;\n }\n\n private render(n: number): void {\n this._current = n;\n this.textContent = this.format(n);\n }\n\n changed(name: string): void {\n this._fmt = null;\n if (name === 'to') this.play();\n else this.render(Number.isNaN(this._current) ? this.num('from', 0) : this._current);\n }\n\n mount(): void {\n this._fmt = null;\n const to = this.num('to', 0);\n if (this.reduced) {\n this._target = to;\n this.render(to);\n return;\n }\n if (Number.isNaN(this._current)) this.render(this.num('from', 0));\n const start = this.str('start', 'view');\n if (start === 'load') this.play();\n else if (start === 'view') {\n let done = false;\n this.inView((v) => {\n if (v && !done) {\n done = true;\n this.play();\n }\n }, { threshold: 0.4 });\n }\n }\n\n unmount(): void {\n caf(this._frame);\n this._frame = 0;\n }\n\n play(to = this.num('to', 0)): Promise<void> {\n caf(this._frame);\n this._target = to;\n const from = Number.isNaN(this._current) ? this.num('from', 0) : this._current;\n if (this.reduced || from === to || !this.isConnected) {\n this.render(to);\n this.emit('complete', { value: to });\n return Promise.resolve();\n }\n const duration = this.num('duration', 1600);\n const t0 = now();\n return new Promise((resolve) => {\n const step = () => {\n const t = Math.min(1, Math.max(0, now() - t0) / duration);\n this.render(from + (to - from) * easeOutExpo(t));\n if (t < 1) this._frame = raf(step);\n else {\n this._frame = 0;\n this.render(to);\n this.emit('complete', { value: to });\n resolve();\n }\n };\n this._frame = raf(step);\n });\n }\n },\n { id: 'counter', text: css }\n );\n}\n","import { defineElement, type UsaElement } from '../base';\nimport css from './shimmer-text.css?raw';\n\n/**\n * `<usa-shimmer-text>` — a light sweep across gradient-filled text (CSS\n * only; the element just maps attributes to custom properties).\n *\n * Attributes: `duration` (ms, 2600), `color` (base text colour), `shine`\n * (highlight colour), `angle` (deg, 110). Or style `--usa-shimmer-*`\n * directly. Reduced motion: static gradient text.\n */\nexport type UsaShimmerTextElement = UsaElement;\n\nexport function defineShimmerText(tag = 'usa-shimmer-text'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaShimmerText extends Base {\n static get observedAttributes(): string[] {\n return ['duration', 'color', 'shine', 'angle'];\n }\n\n mount(): void {\n const set = (attr: string, prop: string, unit = '') => {\n const v = this.getAttribute(attr);\n if (v !== null) this.style.setProperty(prop, v + unit);\n else this.style.removeProperty(prop);\n };\n set('duration', '--usa-shimmer-duration', 'ms');\n set('color', '--usa-shimmer-color');\n set('shine', '--usa-shimmer-shine');\n set('angle', '--usa-shimmer-angle', 'deg');\n }\n },\n { id: 'shimmer-text', text: css }\n );\n}\n","import { defineElement, srText, EASE_SPRING, EASE_OUT, type UsaElement } from '../base';\nimport css from './text-rotate.css?raw';\n\n/**\n * `<usa-text-rotate>` — cycles through words in place (\"Build *fast* /\n * *small* / *typed* apps\"). All words share one grid cell, so the width is\n * that of the longest word and nothing around it reflows.\n *\n * Attributes: `words` (separated by `|`, default: the element's text split\n * on `|`), `interval` (ms, 2200), `effect` (`slide` | `fade` | `flip` |\n * `blur`, default `slide`), `paused`. Pauses while off-screen and on hover\n * is not needed. Event: `usa:change` (`detail.index`, `detail.word`).\n * Reduced motion: words still change, without movement (fade only).\n */\nexport interface UsaTextRotateElement extends UsaElement {\n readonly index: number;\n next(): void;\n}\n\nexport function defineTextRotate(tag = 'usa-text-rotate'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaTextRotate extends Base {\n static get observedAttributes(): string[] {\n return ['words', 'interval', 'paused'];\n }\n\n private _source: string | null = null;\n private _index = 0;\n private _timer: ReturnType<typeof setInterval> | 0 = 0;\n private _visible = true;\n\n get index(): number {\n return this._index;\n }\n\n private get words(): string[] {\n return (this.getAttribute('words') ?? this._source ?? '').split('|').map((w) => w.trim()).filter(Boolean);\n }\n\n mount(): void {\n if (this._source === null) this._source = (this.textContent || '').trim();\n const words = this.words;\n this.replaceChildren(\n srText(words.join(', ')),\n ...words.map((w, i) => {\n const s = document.createElement('span');\n s.className = 'usa-rotate-word';\n s.textContent = w;\n s.setAttribute('aria-hidden', 'true');\n if (i !== this._index) s.setAttribute('data-hidden', '');\n return s;\n })\n );\n if (this._index >= words.length) this._index = 0;\n if (words.length < 2) return;\n this.inView((v) => (this._visible = v));\n if (!this.flag('paused')) {\n this._timer = setInterval(() => {\n if (this._visible && !(typeof document !== 'undefined' && document.hidden)) this.next();\n }, Math.max(400, this.num('interval', 2200)));\n }\n }\n\n unmount(): void {\n clearInterval(this._timer as ReturnType<typeof setInterval>);\n this._timer = 0;\n }\n\n next(): void {\n const els = Array.from(this.querySelectorAll<HTMLElement>('.usa-rotate-word'));\n if (els.length < 2) return;\n const prev = els[this._index];\n this._index = (this._index + 1) % els.length;\n const cur = els[this._index];\n prev.setAttribute('data-hidden', '');\n cur.removeAttribute('data-hidden');\n const effect = this.reduced ? 'fade' : this.str('effect', 'slide');\n const [inFrom, outTo] =\n effect === 'fade'\n ? [{ opacity: 0 }, { opacity: 0 }]\n : effect === 'flip'\n ? [{ opacity: 0, transform: 'perspective(400px) rotateX(-90deg)' }, { opacity: 0, transform: 'perspective(400px) rotateX(90deg)' }]\n : effect === 'blur'\n ? [{ opacity: 0, filter: 'blur(8px)' }, { opacity: 0, filter: 'blur(8px)' }]\n : [{ opacity: 0, transform: 'translateY(0.8em)' }, { opacity: 0, transform: 'translateY(-0.8em)' }];\n const neutral = { opacity: 1, transform: 'none', filter: 'none' };\n const pick = (f: Keyframe) => Object.fromEntries(Object.keys(f).map((k) => [k, (neutral as any)[k]]));\n this.motion(prev, [{ ...pick(outTo) }, outTo], { duration: 380, easing: EASE_OUT });\n this.motion(cur, [inFrom, pick(inFrom)], { duration: 520, easing: effect === 'slide' ? EASE_SPRING : EASE_OUT });\n this.emit('change', { index: this._index, word: cur.textContent });\n }\n },\n { id: 'text-rotate', text: css }\n );\n}\n","import { defineElement, srText, raf, caf, clamp, type UsaElement } from '../base';\nimport css from './text-fx.css?raw';\n\n/** Split `text` into per-character spans (words never break). The animated copy is aria-hidden. */\nfunction splitChars(host: HTMLElement, text: string): HTMLElement[] {\n const vis = document.createElement('span');\n vis.setAttribute('aria-hidden', 'true');\n const chars: HTMLElement[] = [];\n text.split(/(\\s+)/).forEach((w) => {\n if (/^\\s+$/.test(w)) {\n vis.append(document.createTextNode(w));\n return;\n }\n const word = document.createElement('span');\n word.className = 'usa-word';\n for (const c of Array.from(w)) {\n const s = document.createElement('span');\n s.className = 'usa-char';\n s.textContent = c;\n s.style.setProperty('--i', String(chars.length));\n word.append(s);\n chars.push(s);\n }\n vis.append(word);\n });\n host.replaceChildren(srText(text), vis);\n return chars;\n}\n\nconst textOf = (el: HTMLElement): string => (el.getAttribute('text') ?? el.dataset.usaText ?? (el.dataset.usaText = (el.textContent || '').trim()));\n\n/**\n * `<usa-wave-text>` — letters bob in a travelling wave.\n * Attributes: `amplitude` (em, 0.25), `speed` (s per cycle, 1.6), `stagger`\n * (s between letters, 0.06). Reduced motion: still text.\n */\nexport interface UsaWaveTextElement extends UsaElement {}\nexport function defineWaveText(tag = 'usa-wave-text'): CustomElementConstructor | undefined {\n return defineElement(tag, (Base) => class extends Base {\n static get observedAttributes(): string[] { return ['text']; }\n mount(): void {\n splitChars(this, textOf(this));\n this.style.setProperty('--usa-wave-a', `${this.num('amplitude', 0.25)}em`);\n this.style.setProperty('--usa-wave-s', `${this.num('speed', 1.6)}s`);\n this.style.setProperty('--usa-wave-d', `${this.num('stagger', 0.06)}s`);\n }\n }, { id: 'text-fx', text: css });\n}\n\n/**\n * `<usa-glitch>` — an RGB-split glitch on its text (`trigger=\"always\"`\n * default, or `hover`). Attributes: `intensity` (px, 3), `trigger`.\n * Reduced motion: no animation (plain text).\n */\nexport interface UsaGlitchElement extends UsaElement {}\nexport function defineGlitch(tag = 'usa-glitch'): CustomElementConstructor | undefined {\n return defineElement(tag, (Base) => class extends Base {\n static get observedAttributes(): string[] { return ['text', 'intensity']; }\n mount(): void {\n const t = textOf(this);\n this.setAttribute('data-text', t);\n this.style.setProperty('--usa-glitch-i', `${this.num('intensity', 3)}px`);\n if (!this.firstChild) this.textContent = t;\n }\n }, { id: 'text-fx', text: css });\n}\n\n/**\n * `<usa-gradient-text>` — text filled with a flowing multi-colour gradient.\n * Attributes: `colors` (comma list), `speed` (s, 6), `angle` (deg, 90).\n * Reduced motion: a static gradient.\n */\nexport interface UsaGradientTextElement extends UsaElement {}\nexport function defineGradientText(tag = 'usa-gradient-text'): CustomElementConstructor | undefined {\n return defineElement(tag, (Base) => class extends Base {\n static get observedAttributes(): string[] { return ['colors', 'speed', 'angle']; }\n mount(): void {\n const c = this.str('colors', '#7c5cff,#22d3ee,#f472b6,#facc15').split(',').map((s) => s.trim());\n this.style.setProperty('--usa-grad', `linear-gradient(${this.num('angle', 90)}deg, ${[...c, c[0]].join(', ')})`);\n this.style.setProperty('--usa-grad-s', `${this.num('speed', 6)}s`);\n }\n }, { id: 'text-fx', text: css });\n}\n\n/**\n * `<usa-handwriting>` — the text draws itself stroke by stroke (SVG text\n * outline), then fills in, when it scrolls into view.\n * Attributes: `text`, `duration` (ms, 2400), `stroke` (colour), `size` (px,\n * 64), `font` (family; a script font looks best). Events: `usa:complete`.\n * Reduced motion: the filled text appears at once.\n */\nexport interface UsaHandwritingElement extends UsaElement {\n play(): void;\n}\nexport function defineHandwriting(tag = 'usa-handwriting'): CustomElementConstructor | undefined {\n return defineElement(tag, (Base) => class extends Base {\n static get observedAttributes(): string[] { return ['text', 'size', 'font']; }\n mount(): void {\n const t = textOf(this);\n const size = this.num('size', 64);\n const w = Math.ceil(t.length * size * 0.62) + 8;\n this.replaceChildren(srText(t));\n this.insertAdjacentHTML('beforeend', `<svg aria-hidden=\"true\" viewBox=\"0 0 ${w} ${Math.ceil(size * 1.3)}\" width=\"${w}\" height=\"${Math.ceil(size * 1.3)}\"><text x=\"4\" y=\"${Math.round(size)}\" font-size=\"${size}\"></text></svg>`);\n const text = this.querySelector('text')!;\n text.textContent = t;\n if (this.str('font')) text.setAttribute('font-family', this.str('font'));\n if (this.str('stroke')) this.style.setProperty('--usa-hw-stroke', this.str('stroke'));\n this.style.setProperty('--usa-hw-d', `${this.num('duration', 2400)}ms`);\n if (this.reduced) {\n this.setAttribute('data-state', 'done');\n return;\n }\n this.inView((v) => v && this.play(), { threshold: 0.3 });\n }\n play(): void {\n this.removeAttribute('data-state');\n void this.offsetWidth;\n this.setAttribute('data-state', 'drawing');\n setTimeout(() => {\n this.setAttribute('data-state', 'done');\n this.emit('complete');\n }, this.reduced ? 0 : this.num('duration', 2400));\n }\n }, { id: 'text-fx', text: css });\n}\n\n/**\n * `<usa-scroll-highlight>` — reading highlight: words light up one by one\n * as the paragraph scrolls through the viewport (`mode=\"words\"`, default),\n * or a highlighter marker sweeps behind the text on enter (`mode=\"marker\"`).\n * Attributes: `mode`, `color` (marker), `dim` (opacity of unread words,\n * 0.2). Reduced motion: fully highlighted text.\n */\nexport interface UsaScrollHighlightElement extends UsaElement {\n readonly progress: number;\n}\nexport function defineScrollHighlight(tag = 'usa-scroll-highlight'): CustomElementConstructor | undefined {\n return defineElement(tag, (Base) => class extends Base {\n static get observedAttributes(): string[] { return ['mode', 'text']; }\n private _f = 0;\n private _p = 0;\n get progress(): number { return this._p; }\n mount(): void {\n const mode = this.str('mode', 'words');\n if (this.str('color')) this.style.setProperty('--usa-hl-color', this.str('color'));\n this.style.setProperty('--usa-hl-dim', String(this.num('dim', 0.2)));\n if (mode === 'marker') {\n if (this.reduced) this.setAttribute('data-lit', '');\n else this.inView((v) => v && this.setAttribute('data-lit', ''), { threshold: 0.6 });\n return;\n }\n const t = textOf(this);\n const vis = document.createElement('span');\n vis.setAttribute('aria-hidden', 'true');\n const words = t.split(/\\s+/).filter(Boolean).map((w) => {\n const s = document.createElement('span');\n s.className = 'usa-hl-word';\n s.textContent = w;\n vis.append(s, ' ');\n return s;\n });\n this.replaceChildren(srText(t), vis);\n if (this.reduced) {\n words.forEach((w) => w.setAttribute('data-on', ''));\n return;\n }\n const update = () => {\n this._f = 0;\n const r = this.getBoundingClientRect();\n const H = window.innerHeight || 800;\n this._p = clamp((H * 0.85 - r.top) / (r.height + H * 0.35), 0, 1);\n const lit = Math.round(this._p * words.length);\n words.forEach((w, i) => w.toggleAttribute('data-on', i < lit));\n };\n const on = () => !this._f && (this._f = raf(update));\n let active = false;\n this.inView((v) => {\n if (v === active) return;\n active = v;\n if (v) window.addEventListener('scroll', on, { passive: true });\n else window.removeEventListener('scroll', on);\n on();\n });\n this.onCleanup(() => window.removeEventListener('scroll', on));\n }\n unmount(): void {\n caf(this._f);\n this._f = 0;\n }\n }, { id: 'text-fx', text: css });\n}\n","/**\n * use-scroll-animate/components/text — text effects.\n * `<usa-typewriter>`, `<usa-split-text>`, `<usa-scramble>`, `<usa-counter>`,\n * `<usa-shimmer-text>`, `<usa-text-rotate>`.\n */\nimport { defineTypewriter, type UsaTypewriterElement } from './typewriter';\nimport { defineSplitText, type UsaSplitTextElement } from './split-text';\nimport { defineScramble, type UsaScrambleElement } from './scramble';\nimport { defineCounter, type UsaCounterElement } from './counter';\nimport { defineShimmerText, type UsaShimmerTextElement } from './shimmer-text';\nimport { defineTextRotate, type UsaTextRotateElement } from './text-rotate';\n\nimport { defineWaveText, defineGlitch, defineGradientText, defineHandwriting, defineScrollHighlight } from './text-fx';\nimport type { UsaWaveTextElement, UsaGlitchElement, UsaGradientTextElement, UsaHandwritingElement, UsaScrollHighlightElement } from './text-fx';\nexport { defineTypewriter, defineSplitText, defineScramble, defineCounter, defineShimmerText, defineTextRotate };\nexport { scrambleFrame } from './scramble';\nexport { easeOutExpo } from './counter';\nexport type { UsaTypewriterElement, UsaSplitTextElement, UsaScrambleElement, UsaCounterElement, UsaShimmerTextElement, UsaTextRotateElement };\nexport { defineWaveText, defineGlitch, defineGradientText, defineHandwriting, defineScrollHighlight };\nexport type { UsaWaveTextElement, UsaGlitchElement, UsaGradientTextElement, UsaHandwritingElement, UsaScrollHighlightElement };\nexport { configureComponents, prefersReducedMotion } from '../base';\nexport type { ComponentsConfig, UsaElement } from '../base';\n\n/** Register every component of this category under its default tag. */\nexport function defineTextComponents(): void {\n defineTypewriter();\n defineSplitText();\n defineScramble();\n defineCounter();\n defineShimmerText();\n defineTextRotate();\n defineWaveText();\n defineGlitch();\n defineGradientText();\n defineHandwriting();\n defineScrollHighlight();\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'usa-wave-text': UsaWaveTextElement;\n 'usa-glitch': UsaGlitchElement;\n 'usa-gradient-text': UsaGradientTextElement;\n 'usa-handwriting': UsaHandwritingElement;\n 'usa-scroll-highlight': UsaScrollHighlightElement;\n 'usa-typewriter': UsaTypewriterElement;\n 'usa-split-text': UsaSplitTextElement;\n 'usa-scramble': UsaScrambleElement;\n 'usa-counter': UsaCounterElement;\n 'usa-shimmer-text': UsaShimmerTextElement;\n 'usa-text-rotate': UsaTextRotateElement;\n }\n}\n"],"names":["css"],"mappings":";;;;;AAuBM,SAAU,gBAAgB,CAAC,GAAG,GAAG,gBAAgB,EAAA;AACrD,IAAA,OAAO,aAAa,CAClB,GAAG,EACH,CAAC,IAAI,KACH,MAAM,aAAc,SAAQ,IAAI,CAAA;AAAhC,QAAA,WAAA,GAAA;;YAKU,IAAA,CAAA,OAAO,GAAkB,IAAI;YAC7B,IAAA,CAAA,IAAI,GAAuB,IAAI;YAC/B,IAAA,CAAA,MAAM,GAAsC,CAAC;YAC7C,IAAA,CAAA,QAAQ,GAAG,KAAK;QAmG1B;AA1GE,QAAA,WAAW,kBAAkB,GAAA;AAC3B,YAAA,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC;QAC1B;AAOA,QAAA,IAAI,OAAO,GAAA;YACT,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;AACxC,YAAA,IAAI,KAAK;gBAAE,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;AACvE,YAAA,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC;QAC1D;QAEA,KAAK,GAAA;AACH,YAAA,IAAI,IAAI,CAAC,OAAO,KAAK,IAAI;AAAE,gBAAA,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,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AK,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;YACpD,IAAI,MAAM,GAAG,KAAK;AAClB,YAAA,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAI;gBAChB,IAAI,CAAC,KAAK,MAAM;oBAAE;gBAClB,MAAM,GAAG,CAAC;AACV,gBAAA,IAAI,CAAC;AAAE,oBAAA,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;AAC1D,oBAAA,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,EAAE,CAAC;AAC7C,gBAAA,EAAE,EAAE;AACN,YAAA,CAAC,CAAC;AACF,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAChE;QACA,OAAO,GAAA;AACL,YAAA,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;AACZ,YAAA,IAAI,CAAC,EAAE,GAAG,CAAC;QACb;KACD,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AAClC;;AC9LA;;;;AAIG;AAmBH;SACgB,oBAAoB,GAAA;AAClC,IAAA,gBAAgB,EAAE;AAClB,IAAA,eAAe,EAAE;AACjB,IAAA,cAAc,EAAE;AAChB,IAAA,aAAa,EAAE;AACf,IAAA,iBAAiB,EAAE;AACnB,IAAA,gBAAgB,EAAE;AAClB,IAAA,cAAc,EAAE;AAChB,IAAA,YAAY,EAAE;AACd,IAAA,kBAAkB,EAAE;AACpB,IAAA,iBAAiB,EAAE;AACnB,IAAA,qBAAqB,EAAE;AACzB;;;;"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var base = require('../chunks/base-5DFCAnvH.cjs');
3
+ var base = require('../chunks/base-BR6fYLBA.cjs');
4
4
 
5
5
  var shadowCss = ":host{display:contents}dialog{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;color:inherit;overflow:hidden}dialog:not([open]){display:none}dialog::backdrop{background:transparent}[part=\"backdrop\"]{position:absolute;inset:0;background:var(--usa-dialog-backdrop,rgb(0 0 0 / 0.42))}[part=\"panel\"]{position:absolute;left:50%;top:50%;translate:-50% -50%;box-sizing:border-box;width:min(var(--usa-dialog-width,480px),calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;padding:var(--usa-dialog-padding,24px);border-radius:var(--usa-dialog-radius,12px);background:var(--usa-dialog-bg,Canvas);color:var(--usa-dialog-fg,CanvasText);box-shadow:0 32px 64px -12px rgb(0 0 0 / 0.45),0 0 0 1px rgb(127 127 127 / 0.18)}dialog[data-variant^=\"drawer\"] [part=\"panel\"]{top:0;bottom:0;translate:none;max-height:none;height:100%;border-radius:0;width:min(var(--usa-dialog-width,380px),88vw)}dialog[data-variant=\"drawer-start\"] [part=\"panel\"]{left:0}dialog[data-variant=\"drawer-end\"] [part=\"panel\"]{left:auto;right:0}dialog[data-variant=\"drawer-bottom\"] [part=\"panel\"],dialog[data-variant=\"sheet\"] [part=\"panel\"]{top:auto;bottom:0;left:0;right:0;translate:none;width:100%;height:auto;max-height:85vh;border-radius:var(--usa-dialog-radius,16px) var(--usa-dialog-radius,16px) 0 0}dialog[data-variant=\"sheet\"] [part=\"panel\"]{left:50%;translate:-50% 0;width:min(var(--usa-dialog-width,560px),100vw)}";
6
6
 
@@ -20,7 +20,15 @@ interface ComponentsConfig {
20
20
  * `'no-preference'` ignores the OS setting (only for demos — respect your users).
21
21
  */
22
22
  reducedMotion?: 'user' | 'reduce' | 'no-preference';
23
+ /**
24
+ * Global motion intensity (v2.7): `'off'` (same as reduced motion),
25
+ * `'low'` (shorter, calmer), `'normal'` (default) or `'high'`. Scales every
26
+ * component animation's duration and sets `--usa-motion` (0 / 0.6 / 1 /
27
+ * 1.25) on `<html>` for your own CSS. See `setMotionIntensity()`.
28
+ */
29
+ motionIntensity?: MotionIntensity;
23
30
  }
31
+ type MotionIntensity = 'off' | 'low' | 'normal' | 'high';
24
32
  /** Change global component settings (call before `define*()` for `injectStyles`). */
25
33
  declare function configureComponents(options: ComponentsConfig): void;
26
34
  /** `true` when animations should be reduced (OS setting or `configureComponents`). */
@@ -20,7 +20,15 @@ interface ComponentsConfig {
20
20
  * `'no-preference'` ignores the OS setting (only for demos — respect your users).
21
21
  */
22
22
  reducedMotion?: 'user' | 'reduce' | 'no-preference';
23
+ /**
24
+ * Global motion intensity (v2.7): `'off'` (same as reduced motion),
25
+ * `'low'` (shorter, calmer), `'normal'` (default) or `'high'`. Scales every
26
+ * component animation's duration and sets `--usa-motion` (0 / 0.6 / 1 /
27
+ * 1.25) on `<html>` for your own CSS. See `setMotionIntensity()`.
28
+ */
29
+ motionIntensity?: MotionIntensity;
23
30
  }
31
+ type MotionIntensity = 'off' | 'low' | 'normal' | 'high';
24
32
  /** Change global component settings (call before `define*()` for `injectStyles`). */
25
33
  declare function configureComponents(options: ComponentsConfig): void;
26
34
  /** `true` when animations should be reduced (OS setting or `configureComponents`). */
@@ -1,5 +1,5 @@
1
- import { d as defineElement, g as shadowStyles, E as EASE_OUT, F as FLUENT_DECELERATE, p as prefersReducedMotion } from '../chunks/base-08OYzphB.js';
2
- export { a as configureComponents } from '../chunks/base-08OYzphB.js';
1
+ import { d as defineElement, i as shadowStyles, E as EASE_OUT, F as FLUENT_DECELERATE, p as prefersReducedMotion } from '../chunks/base-C_w9ibbn.js';
2
+ export { a as configureComponents } from '../chunks/base-C_w9ibbn.js';
3
3
 
4
4
  var shadowCss = ":host{display:contents}dialog{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;color:inherit;overflow:hidden}dialog:not([open]){display:none}dialog::backdrop{background:transparent}[part=\"backdrop\"]{position:absolute;inset:0;background:var(--usa-dialog-backdrop,rgb(0 0 0 / 0.42))}[part=\"panel\"]{position:absolute;left:50%;top:50%;translate:-50% -50%;box-sizing:border-box;width:min(var(--usa-dialog-width,480px),calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;padding:var(--usa-dialog-padding,24px);border-radius:var(--usa-dialog-radius,12px);background:var(--usa-dialog-bg,Canvas);color:var(--usa-dialog-fg,CanvasText);box-shadow:0 32px 64px -12px rgb(0 0 0 / 0.45),0 0 0 1px rgb(127 127 127 / 0.18)}dialog[data-variant^=\"drawer\"] [part=\"panel\"]{top:0;bottom:0;translate:none;max-height:none;height:100%;border-radius:0;width:min(var(--usa-dialog-width,380px),88vw)}dialog[data-variant=\"drawer-start\"] [part=\"panel\"]{left:0}dialog[data-variant=\"drawer-end\"] [part=\"panel\"]{left:auto;right:0}dialog[data-variant=\"drawer-bottom\"] [part=\"panel\"],dialog[data-variant=\"sheet\"] [part=\"panel\"]{top:auto;bottom:0;left:0;right:0;translate:none;width:100%;height:auto;max-height:85vh;border-radius:var(--usa-dialog-radius,16px) var(--usa-dialog-radius,16px) 0 0}dialog[data-variant=\"sheet\"] [part=\"panel\"]{left:50%;translate:-50% 0;width:min(var(--usa-dialog-width,560px),100vw)}";
5
5