use-scroll-animate 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -133,6 +133,15 @@ All attributes are optional unless noted. Events are `CustomEvent`s that bubble,
133
133
 
134
134
  Presets (`SPRING_PRESETS`): `default` (170/26), `gentle` (120/14), `wobbly` (180/12), `stiff` (210/20), `bouncy` (300/10), `slow` (280/60), `molasses` (280/120) — stiffness/damping, mass 1.
135
135
 
136
+ ### 8. Card effects — `components/cards`
137
+
138
+ | Element | What it does | Key attributes | JS API / events |
139
+ |---|---|---|---|
140
+ | `<usa-card>` | Combinable card effects: `flip`, `holo`, `glass`, `border-glow`, `conic-border`, `lift`, `spotlight`, `sheen`, `parallax-layers`, `expand` | `effect` (space-separated), `trigger` (`hover` · `click`, flip), `axis` (`y` · `x`), `depth` (16), `color`, `flipped`, `disabled`; children `[data-front]` / `[data-back]` / `[data-detail]` / `[data-depth]` / `[data-close]` | `flip(force?)`, `expand()`, `collapse()`, `flipped`, `expanded`; `usa:flip`, `usa:expand`, `usa:collapse`; `--usa-card-x/-y/-nx/-ny`, `--usa-card-radius`, `--usa-card-bg`, `--usa-card-glow` |
141
+ | `<usa-card-stack>` | Swipeable deck, cards fan out behind the top one | `threshold` (90), `visible` (3), `offset` (10), `loop`, `disabled` | `top`, `swipe('left' \| 'right')`; `usa:swipe`, `usa:empty` |
142
+ | `<usa-sticky-stack>` | Cards stack while scrolling; covered ones shrink & dim | `top` (80), `gap` (16), `scale` (0.06) | `update()` |
143
+ | `<usa-carousel-3d>` | 3D ring carousel with spring rotation | `radius` (auto), `perspective` (1200), `autoplay` (ms), `index` | `index`, `next()`, `prev()`, `goTo(i)`; `usa:change` |
144
+
136
145
  ## Frameworks
137
146
 
138
147
  Custom elements work in every framework. Register once (e.g. in your entry file), then use the tags.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "use-scroll-animate",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "A lightweight, high-performance, dependency-free scroll animation library and animated UI components (Web Components) for the web and Windows web-view apps.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -148,6 +148,16 @@
148
148
  "default": "./dist/components/physics.cjs"
149
149
  }
150
150
  },
151
+ "./components/cards": {
152
+ "import": {
153
+ "types": "./dist/components/cards.d.ts",
154
+ "default": "./dist/components/cards.js"
155
+ },
156
+ "require": {
157
+ "types": "./dist/components/cards.d.cts",
158
+ "default": "./dist/components/cards.cjs"
159
+ }
160
+ },
151
161
  "./components.css": "./dist/components.css",
152
162
  "./components/reveal.css": "./dist/components/reveal.css",
153
163
  "./components/text.css": "./dist/components/text.css",
@@ -156,6 +166,7 @@
156
166
  "./components/background.css": "./dist/components/background.css",
157
167
  "./components/transitions.css": "./dist/components/transitions.css",
158
168
  "./components/physics.css": "./dist/components/physics.css",
169
+ "./components/cards.css": "./dist/components/cards.css",
159
170
  "./package.json": "./package.json"
160
171
  },
161
172
  "files": [
@@ -176,7 +187,7 @@
176
187
  "typecheck": "tsc --noEmit -p .",
177
188
  "test": "vitest run",
178
189
  "check:exports": "node scripts/check-exports.mjs",
179
- "lint:package": "publint && attw --pack . --profile node16 --exclude-entrypoints ./components.css ./components/reveal.css ./components/text.css ./components/interaction.css ./components/feedback.css ./components/background.css ./components/transitions.css ./components/physics.css",
190
+ "lint:package": "publint && attw --pack . --profile node16 --exclude-entrypoints ./components.css ./components/reveal.css ./components/text.css ./components/interaction.css ./components/feedback.css ./components/background.css ./components/transitions.css ./components/physics.css ./components/cards.css",
180
191
  "size": "node scripts/size.mjs",
181
192
  "prepublishOnly": "npm run typecheck && npm test && npm run build && npm run check:exports",
182
193
  "size:check": "node scripts/size.mjs --check",