use-scroll-animate 6.2.0 → 6.3.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 (90) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/chunks/{base-C_3cAoRz.js → base-DchG4q_S.js} +2 -2
  3. package/dist/chunks/{base-C_3cAoRz.js.map → base-DchG4q_S.js.map} +1 -1
  4. package/dist/chunks/{core-ps8uvYuN.js → core-D2vF8kZb.js} +2 -2
  5. package/dist/chunks/{core-ps8uvYuN.js.map → core-D2vF8kZb.js.map} +1 -1
  6. package/dist/chunks/{core-VEBw36QK.js → core-DVyTlo9Q.js} +2 -2
  7. package/dist/chunks/{core-VEBw36QK.js.map → core-DVyTlo9Q.js.map} +1 -1
  8. package/dist/chunks/{fx-Bs6IrV4Q.js → fx-DUMVKSvg.js} +2 -2
  9. package/dist/chunks/{fx-Bs6IrV4Q.js.map → fx-DUMVKSvg.js.map} +1 -1
  10. package/dist/chunks/{generative-DzIZq-_g.cjs → generative-BHIj-NU0.cjs} +3 -56
  11. package/dist/chunks/generative-BHIj-NU0.cjs.map +1 -0
  12. package/dist/chunks/{generative-D2YyhaeO.js → generative-BRUZaIsX.js} +3 -49
  13. package/dist/chunks/generative-BRUZaIsX.js.map +1 -0
  14. package/dist/chunks/{gpu-CenK2l6b.cjs → gpu-BBRLgEzM.cjs} +13 -12
  15. package/dist/chunks/gpu-BBRLgEzM.cjs.map +1 -0
  16. package/dist/chunks/{gpu-Bu7qwugO.js → gpu-XHWzeNb5.js} +4 -3
  17. package/dist/chunks/gpu-XHWzeNb5.js.map +1 -0
  18. package/dist/chunks/{registry-CKNLQpwd.js → registry-Bu5NrAyA.js} +2 -2
  19. package/dist/chunks/{registry-CKNLQpwd.js.map → registry-Bu5NrAyA.js.map} +1 -1
  20. package/dist/chunks/shared-eweTlzxv.js +50 -0
  21. package/dist/chunks/shared-eweTlzxv.js.map +1 -0
  22. package/dist/chunks/shared-jkgRH-Hx.cjs +58 -0
  23. package/dist/chunks/shared-jkgRH-Hx.cjs.map +1 -0
  24. package/dist/chunks/{spring-CbvHfVtP.js → spring-BhoT09Qb.js} +2 -2
  25. package/dist/chunks/{spring-CbvHfVtP.js.map → spring-BhoT09Qb.js.map} +1 -1
  26. package/dist/chunks/{variants-DRlKVHvu.js → variants-C_hv_s23.js} +2 -2
  27. package/dist/chunks/{variants-DRlKVHvu.js.map → variants-C_hv_s23.js.map} +1 -1
  28. package/dist/components/a11y.js +2 -2
  29. package/dist/components/angular.js +7 -7
  30. package/dist/components/background.js +2 -2
  31. package/dist/components/bridge.js +1 -1
  32. package/dist/components/cards.js +2 -2
  33. package/dist/components/click.js +3 -3
  34. package/dist/components/depth.js +3 -3
  35. package/dist/components/effects.cjs +45 -44
  36. package/dist/components/effects.cjs.map +1 -1
  37. package/dist/components/effects.js +7 -6
  38. package/dist/components/effects.js.map +1 -1
  39. package/dist/components/feedback.js +1 -1
  40. package/dist/components/fx-gpu.cjs +3 -2
  41. package/dist/components/fx-gpu.cjs.map +1 -1
  42. package/dist/components/fx-gpu.js +5 -4
  43. package/dist/components/fx-gpu.js.map +1 -1
  44. package/dist/components/fx-text.cjs +267 -0
  45. package/dist/components/fx-text.cjs.map +1 -0
  46. package/dist/components/fx-text.d.cts +70 -0
  47. package/dist/components/fx-text.d.ts +70 -0
  48. package/dist/components/fx-text.js +263 -0
  49. package/dist/components/fx-text.js.map +1 -0
  50. package/dist/components/fx.js +5 -5
  51. package/dist/components/fx2.cjs +9 -2
  52. package/dist/components/fx2.cjs.map +1 -1
  53. package/dist/components/fx2.d.cts +27 -1
  54. package/dist/components/fx2.d.ts +27 -1
  55. package/dist/components/fx2.js +11 -6
  56. package/dist/components/fx2.js.map +1 -1
  57. package/dist/components/gesture.js +4 -4
  58. package/dist/components/interaction.js +1 -1
  59. package/dist/components/layout.js +1 -1
  60. package/dist/components/packs.js +1 -1
  61. package/dist/components/page.js +3 -3
  62. package/dist/components/perf.js +2 -2
  63. package/dist/components/physics.js +3 -3
  64. package/dist/components/reveal.js +1 -1
  65. package/dist/components/solid.js +7 -7
  66. package/dist/components/svelte.js +7 -7
  67. package/dist/components/svg.js +1 -1
  68. package/dist/components/text.js +2 -2
  69. package/dist/components/timeline.js +3 -3
  70. package/dist/components/transitions.js +1 -1
  71. package/dist/components/ui.js +4 -4
  72. package/dist/components/vue.js +7 -7
  73. package/dist/components/webgl.js +1 -1
  74. package/dist/components/widgets.cjs +591 -8
  75. package/dist/components/widgets.cjs.map +1 -1
  76. package/dist/components/widgets.d.cts +98 -2
  77. package/dist/components/widgets.d.ts +98 -2
  78. package/dist/components/widgets.js +585 -11
  79. package/dist/components/widgets.js.map +1 -1
  80. package/dist/components.js +9 -9
  81. package/dist/index.js +2 -2
  82. package/dist/widgets.umd.js +1 -1
  83. package/dist/widgets.umd.js.map +1 -1
  84. package/docs/ROADMAP.md +1 -1
  85. package/docs/components.md +32 -0
  86. package/package.json +11 -1
  87. package/dist/chunks/generative-D2YyhaeO.js.map +0 -1
  88. package/dist/chunks/generative-DzIZq-_g.cjs.map +0 -1
  89. package/dist/chunks/gpu-Bu7qwugO.js.map +0 -1
  90. package/dist/chunks/gpu-CenK2l6b.cjs.map +0 -1
@@ -78,6 +78,98 @@ interface UsaStoriesElement extends UsaElement {
78
78
  }
79
79
  declare function defineStories(tag?: string): CustomElementConstructor | undefined;
80
80
 
81
+ /**
82
+ * `<usa-toast-stack>` (6.3) — notifications that pile up into a collapsed
83
+ * stack (newest in front, older ones peeking behind), fan out on hover or
84
+ * focus, auto-dismiss (paused while hovered), and can be swiped away.
85
+ *
86
+ * Attributes: `position` (`bottom-right` · `bottom-left` · `bottom-center` ·
87
+ * `top-right` · `top-left` · `top-center`), `duration` (ms, `0` = sticky),
88
+ * `max` (visible in the stack), `contained` (positioned inside its parent
89
+ * instead of the viewport). API: `show(message | options)` → id,
90
+ * `dismiss(id)`, `clear()`; module helper `stackToast()` uses the first stack on
91
+ * the page (creating one). Any `[data-usa-toast="message"]` element shows a
92
+ * toast on click (`data-usa-toast-type`, `data-usa-target`). Events:
93
+ * `usa:show`, `usa:dismiss` (`{ id, reason }`). Toasts live in a polite live
94
+ * region. Reduced motion: no slide or swipe animation.
95
+ */
96
+ interface StackToastOptions {
97
+ message?: string;
98
+ title?: string;
99
+ type?: 'info' | 'success' | 'warning' | 'error';
100
+ /** ms; 0 = stays until dismissed. Defaults to the stack's `duration`. */
101
+ duration?: number;
102
+ /** An action button. */
103
+ action?: {
104
+ label: string;
105
+ onClick?: () => void;
106
+ };
107
+ }
108
+ interface UsaToastStackElement extends UsaElement {
109
+ show(input: string | StackToastOptions): string;
110
+ dismiss(id: string, reason?: string): void;
111
+ clear(): void;
112
+ readonly count: number;
113
+ }
114
+ declare const TOAST_POSITIONS: readonly ["bottom-right", "bottom-left", "bottom-center", "top-right", "top-left", "top-center"];
115
+ declare function defineToastStack(tag?: string): CustomElementConstructor | undefined;
116
+ /** Show a toast on the first `<usa-toast-stack>` of the page (one is created when missing). */
117
+ declare function stackToast(input: string | StackToastOptions, stack?: UsaToastStackElement | null): string;
118
+
119
+ /**
120
+ * `<usa-modal>` and `<usa-sheet>` (6.3) — modal overlays on the native
121
+ * `<dialog>` (top layer, focus trap, Esc, inert page), with animated open
122
+ * and close and a fading, blurred backdrop.
123
+ *
124
+ * - `<usa-modal effect="scale | slide-up | flip | origin">` — `origin`
125
+ * grows the dialog out of the button that opened it.
126
+ * - `<usa-sheet side="right | left | bottom | top">` — a side sheet; a
127
+ * bottom sheet can be dragged down to dismiss (`<div data-handle>` or the
128
+ * built-in grab handle).
129
+ *
130
+ * Attributes: `open` (initial), `label`, `persistent` (backdrop click / Esc
131
+ * don't close). Any element with `data-usa-open="<id>"` opens the overlay
132
+ * with that id; `[data-usa-close]` inside closes it. API: `show(trigger?)`,
133
+ * `close(value?)`, `toggle()`, `opened`. Events: `usa:open`, `usa:close`
134
+ * (`{ value }`). Focus returns to the opener. Reduced motion: no movement,
135
+ * a short fade.
136
+ */
137
+ interface UsaOverlayElement extends UsaElement {
138
+ readonly opened: boolean;
139
+ readonly returnValue: string;
140
+ show(trigger?: Element | null): void;
141
+ close(value?: string): Promise<void>;
142
+ toggle(): void;
143
+ }
144
+ type UsaModalElement = UsaOverlayElement;
145
+ type UsaSheetElement = UsaOverlayElement;
146
+ declare const MODAL_EFFECTS: readonly ["scale", "slide-up", "flip", "origin"];
147
+ declare const SHEET_SIDES: readonly ["right", "left", "bottom", "top"];
148
+ declare const defineModal: (tag?: string) => CustomElementConstructor | undefined;
149
+ declare const defineSheet: (tag?: string) => CustomElementConstructor | undefined;
150
+
151
+ /**
152
+ * `<usa-menu>` (6.3) — a dropdown menu that unfolds from its button: the
153
+ * list scales out of the trigger corner and the items cascade in. The first
154
+ * child is the trigger (or `[data-trigger]`); the other children (`<button>`,
155
+ * `<a>`, `<hr>` separators) become menu items.
156
+ *
157
+ * Attributes: `placement` (`bottom-start` · `bottom-end` · `top-start` ·
158
+ * `top-end`), `effect` (`scale` · `fold` · `slide`). Keyboard: Enter / Space /
159
+ * ArrowDown open, arrows and Home / End move, Esc closes, Tab leaves; outside
160
+ * clicks close. API: `open()`, `close()`, `toggle()`, `opened`. Events:
161
+ * `usa:select` (`{ index, value, item }`), `usa:open`, `usa:close`. Reduced
162
+ * motion: a short fade.
163
+ */
164
+ interface UsaMenuElement extends UsaElement {
165
+ readonly opened: boolean;
166
+ open(focus?: 'first' | 'last'): void;
167
+ close(focusTrigger?: boolean): void;
168
+ toggle(): void;
169
+ }
170
+ declare const MENU_EFFECTS: readonly ["scale", "fold", "slide"];
171
+ declare function defineMenu(tag?: string): CustomElementConstructor | undefined;
172
+
81
173
  /**
82
174
  * motionary/components/widgets — the 6.x animated UI widgets, in their own
83
175
  * entry so `motionary/components` and `components/lite` keep their size
@@ -103,8 +195,12 @@ declare global {
103
195
  'usa-tab-bar': UsaTabBarElement;
104
196
  'usa-disclosure': UsaDisclosureElement;
105
197
  'usa-stories': UsaStoriesElement;
198
+ 'usa-toast-stack': UsaToastStackElement;
199
+ 'usa-modal': UsaModalElement;
200
+ 'usa-sheet': UsaSheetElement;
201
+ 'usa-menu': UsaMenuElement;
106
202
  }
107
203
  }
108
204
 
109
- export { CAROUSEL_EFFECTS, TAB_INDICATORS, WIDGETS, WIDGET_TAGS, defineCarousel, defineDisclosure, defineStories, defineTabBar, defineWidgets };
110
- export type { UsaCarouselElement, UsaDisclosureElement, UsaStoriesElement, UsaTabBarElement };
205
+ export { CAROUSEL_EFFECTS, MENU_EFFECTS, MODAL_EFFECTS, SHEET_SIDES, TAB_INDICATORS, TOAST_POSITIONS, WIDGETS, WIDGET_TAGS, defineCarousel, defineDisclosure, defineMenu, defineModal, defineSheet, defineStories, defineTabBar, defineToastStack, defineWidgets, stackToast };
206
+ export type { StackToastOptions, UsaCarouselElement, UsaDisclosureElement, UsaMenuElement, UsaModalElement, UsaSheetElement, UsaStoriesElement, UsaTabBarElement, UsaToastStackElement };