use-scroll-animate 6.4.0 → 6.6.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.
@@ -114,6 +114,56 @@ declare const LIGHT_FX: EffectDefinition[];
114
114
  /** Register the 6.4 light & materials pack (idempotent). */
115
115
  declare function registerLightEffects(): void;
116
116
 
117
+ /**
118
+ * 6.5 — 3D scene cards (`motionary/components/fx-3d`), registered through
119
+ * `registerEffect()`:
120
+ *
121
+ * - `depth-stack` (card, persistent) — the children (or `[data-depth]`
122
+ * layers) separate in Z and parallax against each other as the card tilts
123
+ * toward the pointer.
124
+ * - `product-spin` (card, persistent) — a 360° product viewer: drag to turn
125
+ * the element in 3D with inertia, idles with a slow turntable spin.
126
+ * - `card-flip-3d` (click) — a thick card flips to its back face (second
127
+ * child) with an edge that shows its depth.
128
+ * - `origami` (enter) — the element unfolds panel by panel like folded paper.
129
+ * - `orbit-camera` (scroll, persistent) — while the element scrolls through
130
+ * the viewport the camera orbits its 3D children.
131
+ *
132
+ * Reduced motion: no tilt, spin, orbit or fold; the flip swaps faces with a
133
+ * crossfade.
134
+ */
135
+
136
+ declare const DEPTH3_FX: EffectDefinition[];
137
+ /** Register the 6.5 3D pack (idempotent). */
138
+ declare function register3dEffects(): void;
139
+
140
+ /**
141
+ * 6.6 — Morph & SVG 2.0 (`motionary/components/fx-morph`), registered
142
+ * through `registerEffect()`:
143
+ *
144
+ * - `path-morph` (loop) — an SVG `<path>` flows between shapes (`paths`, any
145
+ * number of `d` strings): both shapes are resampled to the same number of
146
+ * points, so paths with different commands still morph smoothly.
147
+ * - `blob-button` (hover, persistent) — a liquid blob behind the element
148
+ * wobbles and bulges toward the pointer.
149
+ * - `stroke-draw` (enter) — every stroke in an inline SVG draws itself,
150
+ * staggered, then the fills fade in.
151
+ * - `noise-reveal` (enter) — the element condenses out of SVG turbulence
152
+ * (displacement + blur) — an SVG-filter transition.
153
+ * - `icon-swap` (click) — cycles through the element's child icons with a
154
+ * gooey morph (blur + scale + rotate crossfade).
155
+ *
156
+ * Reduced motion: no loops / wobble; enter effects and swaps fade.
157
+ */
158
+
159
+ /** Sample `d` into `n` points (needs SVG geometry support; `null` without it). */
160
+ declare function samplePath(d: string, n?: number): [number, number][] | null;
161
+ /** Points → closed path `d`. */
162
+ declare const pointsToPath: (pts: [number, number][]) => string;
163
+ declare const MORPH2_FX: EffectDefinition[];
164
+ /** Register the 6.6 morph & SVG pack (idempotent). */
165
+ declare function registerMorphEffects2(): void;
166
+
117
167
  /**
118
168
  * 5.5 — generative backgrounds on Canvas 2D, registered through
119
169
  * `registerEffect()` (kind `background`): `flow-field`, `voronoi`,
@@ -186,5 +236,5 @@ declare const FX2_PACKS: Record<string, EffectDefinition[]>;
186
236
  /** Register every 6.x pack (idempotent). */
187
237
  declare function registerFx2(): void;
188
238
 
189
- export { FX2_PACKS, GLSL_HEAD, GPU_FX, LIGHT_FX, TEXT3_FX, fieldFallback, registerFx2, registerGpuEffects, registerLightEffects, registerTextEffects3, shaderBackground, splitChars, supportsWebGL2, trackPointer };
239
+ export { DEPTH3_FX, FX2_PACKS, GLSL_HEAD, GPU_FX, LIGHT_FX, MORPH2_FX, TEXT3_FX, fieldFallback, pointsToPath, register3dEffects, registerFx2, registerGpuEffects, registerLightEffects, registerMorphEffects2, registerTextEffects3, samplePath, shaderBackground, splitChars, supportsWebGL2, trackPointer };
190
240
  export type { ShaderSpec };
@@ -4,6 +4,9 @@ import { TEXT3_FX, registerTextEffects3 } from './fx-text.js';
4
4
  export { splitChars } from './fx-text.js';
5
5
  import { LIGHT_FX, registerLightEffects } from './fx-light.js';
6
6
  export { trackPointer } from './fx-light.js';
7
+ import { DEPTH3_FX, register3dEffects } from './fx-3d.js';
8
+ import { MORPH2_FX, registerMorphEffects2 } from './fx-morph.js';
9
+ export { pointsToPath, samplePath } from './fx-morph.js';
7
10
  import '../chunks/registry-Bu5NrAyA.js';
8
11
  import '../chunks/base-DchG4q_S.js';
9
12
  import '../chunks/generative-2LhxG5BJ.js';
@@ -14,13 +17,17 @@ const FX2_PACKS = {
14
17
  gpu: GPU_FX,
15
18
  text: TEXT3_FX,
16
19
  light: LIGHT_FX,
20
+ depth: DEPTH3_FX,
21
+ morph: MORPH2_FX,
17
22
  };
18
23
  /** Register every 6.x pack (idempotent). */
19
24
  function registerFx2() {
20
25
  registerGpuEffects();
21
26
  registerTextEffects3();
22
27
  registerLightEffects();
28
+ register3dEffects();
29
+ registerMorphEffects2();
23
30
  }
24
31
 
25
- export { FX2_PACKS, GPU_FX, LIGHT_FX, TEXT3_FX, registerFx2, registerGpuEffects, registerLightEffects, registerTextEffects3 };
32
+ export { DEPTH3_FX, FX2_PACKS, GPU_FX, LIGHT_FX, MORPH2_FX, TEXT3_FX, register3dEffects, registerFx2, registerGpuEffects, registerLightEffects, registerMorphEffects2, registerTextEffects3 };
26
33
  //# sourceMappingURL=fx2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fx2.js","sources":["../../src/components/fx2/index.ts"],"sourcesContent":["/**\n * The 6.x effect packs, one entry each (`motionary/components/fx-gpu`, …) so\n * their size budgets stay separate. This module (`registerFx2()`) registers\n * them all — used by dist/widgets.umd.js and the showcase.\n */\nimport type { EffectDefinition } from '../fx/registry';\nimport { GPU_FX, registerGpuEffects } from './gpu';\nimport { TEXT3_FX, registerTextEffects3, splitChars } from './text3';\nimport { LIGHT_FX, registerLightEffects, trackPointer } from './light';\n\nexport { GPU_FX, registerGpuEffects, TEXT3_FX, registerTextEffects3, splitChars };\nexport { shaderBackground, supportsWebGL2, fieldFallback, GLSL_HEAD } from './gl';\nexport type { ShaderSpec } from './gl';\n\nexport { LIGHT_FX, registerLightEffects, trackPointer };\n\n/** The 6.x effect packs by name. */\nexport const FX2_PACKS: Record<string, EffectDefinition[]> = {\n gpu: GPU_FX,\n text: TEXT3_FX,\n light: LIGHT_FX,\n};\n\n/** Register every 6.x pack (idempotent). */\nexport function registerFx2(): void {\n registerGpuEffects();\n registerTextEffects3();\n registerLightEffects();\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAgBA;AACO,MAAM,SAAS,GAAuC;AAC3D,IAAA,GAAG,EAAE,MAAM;AACX,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,KAAK,EAAE,QAAQ;;AAGjB;SACgB,WAAW,GAAA;AACzB,IAAA,kBAAkB,EAAE;AACpB,IAAA,oBAAoB,EAAE;AACtB,IAAA,oBAAoB,EAAE;AACxB;;;;"}
1
+ {"version":3,"file":"fx2.js","sources":["../../src/components/fx2/index.ts"],"sourcesContent":["/**\n * The 6.x effect packs, one entry each (`motionary/components/fx-gpu`, …) so\n * their size budgets stay separate. This module (`registerFx2()`) registers\n * them all — used by dist/widgets.umd.js and the showcase.\n */\nimport type { EffectDefinition } from '../fx/registry';\nimport { GPU_FX, registerGpuEffects } from './gpu';\nimport { TEXT3_FX, registerTextEffects3, splitChars } from './text3';\nimport { LIGHT_FX, registerLightEffects, trackPointer } from './light';\nimport { DEPTH3_FX, register3dEffects } from './depth3';\nimport { MORPH2_FX, registerMorphEffects2, samplePath, pointsToPath } from './morph2';\n\nexport { GPU_FX, registerGpuEffects, TEXT3_FX, registerTextEffects3, splitChars };\nexport { shaderBackground, supportsWebGL2, fieldFallback, GLSL_HEAD } from './gl';\nexport type { ShaderSpec } from './gl';\n\nexport { LIGHT_FX, registerLightEffects, trackPointer };\n\nexport { DEPTH3_FX, register3dEffects };\n\nexport { MORPH2_FX, registerMorphEffects2, samplePath, pointsToPath };\n\n/** The 6.x effect packs by name. */\nexport const FX2_PACKS: Record<string, EffectDefinition[]> = {\n gpu: GPU_FX,\n text: TEXT3_FX,\n light: LIGHT_FX,\n depth: DEPTH3_FX,\n morph: MORPH2_FX,\n};\n\n/** Register every 6.x pack (idempotent). */\nexport function registerFx2(): void {\n registerGpuEffects();\n registerTextEffects3();\n registerLightEffects();\n register3dEffects();\n registerMorphEffects2();\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAsBA;AACO,MAAM,SAAS,GAAuC;AAC3D,IAAA,GAAG,EAAE,MAAM;AACX,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,KAAK,EAAE,SAAS;;AAGlB;SACgB,WAAW,GAAA;AACzB,IAAA,kBAAkB,EAAE;AACpB,IAAA,oBAAoB,EAAE;AACtB,IAAA,oBAAoB,EAAE;AACtB,IAAA,iBAAiB,EAAE;AACnB,IAAA,qBAAqB,EAAE;AACzB;;;;"}