use-scroll-animate 4.7.0 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +1 -1
- package/README_ja.md +1 -1
- package/README_zh.md +1 -1
- package/bin/usa-codemod-5.mjs +79 -0
- package/dist/chunks/{base-CxYU2NK_.cjs → base-BvpQ4Ggj.cjs} +30 -1
- package/dist/chunks/base-BvpQ4Ggj.cjs.map +1 -0
- package/dist/chunks/{base-CZiIAMBc.js → base-DbbRUxaa.js} +29 -2
- package/dist/chunks/base-DbbRUxaa.js.map +1 -0
- package/dist/chunks/{core-CJHJeMI_.js → core-BVTuet9o.js} +2 -2
- package/dist/chunks/{core-CJHJeMI_.js.map → core-BVTuet9o.js.map} +1 -1
- package/dist/chunks/{core-HLqH3qkA.cjs → core-BWO7JKJ5.cjs} +2 -2
- package/dist/chunks/{core-HLqH3qkA.cjs.map → core-BWO7JKJ5.cjs.map} +1 -1
- package/dist/chunks/{core-CctNfzuP.cjs → core-CCAM3nKw.cjs} +2 -2
- package/dist/chunks/{core-CctNfzuP.cjs.map → core-CCAM3nKw.cjs.map} +1 -1
- package/dist/chunks/{core-COi3DrLx.js → core-CcaSsbV8.js} +2 -2
- package/dist/chunks/{core-COi3DrLx.js.map → core-CcaSsbV8.js.map} +1 -1
- package/dist/chunks/{index-tags-BQh_uGqH.cjs → index-tags-CIRY2KnU.cjs} +2 -2
- package/dist/chunks/{index-tags-BQh_uGqH.cjs.map → index-tags-CIRY2KnU.cjs.map} +1 -1
- package/dist/chunks/{index-tags-43Xtd01A.js → index-tags-Dh8nwXqw.js} +2 -2
- package/dist/chunks/{index-tags-43Xtd01A.js.map → index-tags-Dh8nwXqw.js.map} +1 -1
- package/dist/chunks/{spring-BS5tg6aK.js → spring-B6w7mVCU.js} +2 -2
- package/dist/chunks/{spring-BS5tg6aK.js.map → spring-B6w7mVCU.js.map} +1 -1
- package/dist/chunks/{spring-Dkpygsuj.cjs → spring-fFkqE9J0.cjs} +2 -2
- package/dist/chunks/{spring-Dkpygsuj.cjs.map → spring-fFkqE9J0.cjs.map} +1 -1
- package/dist/chunks/{variants-CfJzrzMh.cjs → variants-C8xj8gfd.cjs} +2 -2
- package/dist/chunks/{variants-CfJzrzMh.cjs.map → variants-C8xj8gfd.cjs.map} +1 -1
- package/dist/chunks/{variants-D9n-3x27.js → variants-Cal4DB0E.js} +2 -2
- package/dist/chunks/{variants-D9n-3x27.js.map → variants-Cal4DB0E.js.map} +1 -1
- package/dist/components/a11y.cjs +38 -2
- package/dist/components/a11y.cjs.map +1 -1
- package/dist/components/a11y.d.cts +13 -3
- package/dist/components/a11y.d.ts +13 -3
- package/dist/components/a11y.js +38 -4
- package/dist/components/a11y.js.map +1 -1
- package/dist/components/angular.cjs +6 -6
- package/dist/components/angular.d.cts +2 -1
- package/dist/components/angular.d.ts +2 -1
- package/dist/components/angular.js +6 -6
- package/dist/components/background.cjs +2 -2
- package/dist/components/background.js +3 -3
- package/dist/components/bridge.cjs +1 -1
- package/dist/components/bridge.js +1 -1
- package/dist/components/cards.cjs +2 -2
- package/dist/components/cards.js +3 -3
- package/dist/components/click.cjs +2 -2
- package/dist/components/click.js +3 -3
- package/dist/components/depth.cjs +3 -3
- package/dist/components/depth.js +4 -4
- package/dist/components/feedback.cjs +1 -1
- package/dist/components/feedback.js +2 -2
- package/dist/components/gesture.cjs +3 -3
- package/dist/components/gesture.js +5 -5
- package/dist/components/interaction.cjs +1 -1
- package/dist/components/interaction.js +2 -2
- package/dist/components/jsx.d.cts +1 -1
- package/dist/components/jsx.d.ts +1 -1
- package/dist/components/layout.cjs +1 -1
- package/dist/components/layout.js +2 -2
- package/dist/components/lazy.cjs +1 -1
- package/dist/components/lazy.d.cts +1 -1
- package/dist/components/lazy.d.ts +1 -1
- package/dist/components/lazy.js +1 -1
- package/dist/components/lite.cjs +259 -12
- package/dist/components/lite.cjs.map +1 -1
- package/dist/components/lite.js +250 -13
- package/dist/components/lite.js.map +1 -1
- package/dist/components/packs.cjs +1 -1
- package/dist/components/packs.js +2 -2
- package/dist/components/page.cjs +12 -4
- package/dist/components/page.cjs.map +1 -1
- package/dist/components/page.js +13 -5
- package/dist/components/page.js.map +1 -1
- package/dist/components/perf.cjs +2 -2
- package/dist/components/perf.d.cts +1 -1
- package/dist/components/perf.d.ts +1 -1
- package/dist/components/perf.js +3 -3
- package/dist/components/physics.cjs +2 -2
- package/dist/components/physics.js +4 -4
- package/dist/components/react.cjs +1 -1
- package/dist/components/react.js +1 -1
- package/dist/components/reveal.cjs +1 -1
- package/dist/components/reveal.js +2 -2
- package/dist/components/solid.cjs +6 -6
- package/dist/components/solid.d.cts +2 -1
- package/dist/components/solid.d.ts +2 -1
- package/dist/components/solid.js +6 -6
- package/dist/components/svelte.cjs +6 -6
- package/dist/components/svelte.d.cts +2 -1
- package/dist/components/svelte.d.ts +2 -1
- package/dist/components/svelte.js +6 -6
- package/dist/components/svg.cjs +1 -1
- package/dist/components/svg.js +2 -2
- package/dist/components/text.cjs +2 -2
- package/dist/components/text.js +3 -3
- package/dist/components/timeline.cjs +4 -2
- package/dist/components/timeline.cjs.map +1 -1
- package/dist/components/timeline.js +6 -4
- package/dist/components/timeline.js.map +1 -1
- package/dist/components/transitions.cjs +1 -1
- package/dist/components/transitions.js +2 -2
- package/dist/components/ui.cjs +3 -3
- package/dist/components/ui.js +5 -5
- package/dist/components/vue.cjs +6 -6
- package/dist/components/vue.d.cts +2 -1
- package/dist/components/vue.d.ts +2 -1
- package/dist/components/vue.js +6 -6
- package/dist/components/webgl.cjs +185 -11
- package/dist/components/webgl.cjs.map +1 -1
- package/dist/components/webgl.css +1 -1
- package/dist/components/webgl.d.cts +59 -5
- package/dist/components/webgl.d.ts +59 -5
- package/dist/components/webgl.js +179 -13
- package/dist/components/webgl.js.map +1 -1
- package/dist/components.cjs +16 -6
- package/dist/components.cjs.map +1 -1
- package/dist/components.css +1 -1
- package/dist/components.d.cts +70 -6
- package/dist/components.d.ts +70 -6
- package/dist/components.js +10 -10
- package/dist/components.umd.js +2 -2
- package/dist/components.umd.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/docs/ROADMAP.md +2 -2
- package/docs/components.md +7 -0
- package/docs/deprecations.md +6 -0
- package/docs/upgrading-5.md +31 -0
- package/package.json +5 -1
- package/dist/chunks/base-CZiIAMBc.js.map +0 -1
- package/dist/chunks/base-CxYU2NK_.cjs.map +0 -1
package/dist/components/lite.js
CHANGED
|
@@ -11,6 +11,13 @@ const MOTION_SCALE = { off: 0, low: 0.6, normal: 1, high: 1.25 };
|
|
|
11
11
|
const config = { injectStyles: true, reducedMotion: 'user', motionIntensity: 'normal', motionSensitivity: 'full' };
|
|
12
12
|
/** Change global component settings (call before `define*()` for `injectStyles`). */
|
|
13
13
|
function configureComponents(options) {
|
|
14
|
+
if (!quiet) {
|
|
15
|
+
// 4.9: removed in 5.0 (see docs/upgrading-5.md, `npx usa-codemod-5`)
|
|
16
|
+
if (options.motionIntensity === 'off')
|
|
17
|
+
deprecate('intensity-off', "motionIntensity: 'off' is deprecated and will be removed in 5.0 — use motionSensitivity: 'minimal' (setMotionSensitivity('minimal')) instead.");
|
|
18
|
+
if (options.reducedMotion === 'no-preference')
|
|
19
|
+
deprecate('reduced-no-preference', "reducedMotion: 'no-preference' is deprecated and will be removed in 5.0 — the OS setting is always respected; use 'user' (default) or 'reduce'.");
|
|
20
|
+
}
|
|
14
21
|
Object.assign(config, options);
|
|
15
22
|
if (options.motionIntensity && typeof document !== 'undefined') {
|
|
16
23
|
document.documentElement.style.setProperty('--usa-motion', String(MOTION_SCALE[options.motionIntensity] ?? 1));
|
|
@@ -55,6 +62,17 @@ function adaptKeyframes(frames, level = config.motionSensitivity) {
|
|
|
55
62
|
return out;
|
|
56
63
|
});
|
|
57
64
|
}
|
|
65
|
+
let quiet = 0;
|
|
66
|
+
/** Run `fn` without 4.9 deprecation warnings (library-internal calls). */
|
|
67
|
+
function withoutDeprecations(fn) {
|
|
68
|
+
quiet++;
|
|
69
|
+
try {
|
|
70
|
+
return fn();
|
|
71
|
+
}
|
|
72
|
+
finally {
|
|
73
|
+
quiet--;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
58
76
|
/** The current global motion intensity. */
|
|
59
77
|
function getMotionIntensity() {
|
|
60
78
|
return config.motionIntensity;
|
|
@@ -358,6 +376,15 @@ const EASE_OUT = 'cubic-bezier(0.22, 1, 0.36, 1)';
|
|
|
358
376
|
const EASE_SPRING = 'cubic-bezier(0.34, 1.56, 0.64, 1)';
|
|
359
377
|
/** Windows Fluent "decelerate" / "point-to-point" curves. */
|
|
360
378
|
const FLUENT_DECELERATE = 'cubic-bezier(0.1, 0.9, 0.2, 1)';
|
|
379
|
+
const warned = new Set();
|
|
380
|
+
/** Log a deprecation once per key (console.warn). */
|
|
381
|
+
function deprecate(key, message) {
|
|
382
|
+
if (warned.has(key))
|
|
383
|
+
return;
|
|
384
|
+
warned.add(key);
|
|
385
|
+
if (typeof console !== 'undefined')
|
|
386
|
+
console.warn(`[use-scroll-animate] ${message}`);
|
|
387
|
+
}
|
|
361
388
|
/**
|
|
362
389
|
* The `kind` attribute of `<usa-spinner>`, `<usa-check>`, `<usa-dialog>` and
|
|
363
390
|
* `<usa-acrylic>` (3.0: `variant` only selects a style variant).
|
|
@@ -385,7 +412,7 @@ const COMPONENT_CATEGORIES = {
|
|
|
385
412
|
timeline: ['usa-timeline'],
|
|
386
413
|
gesture: ['usa-swipeable', 'usa-pinch-zoom'],
|
|
387
414
|
svg: ['usa-draw', 'usa-morph', 'usa-mask-reveal', 'usa-anim-icon'],
|
|
388
|
-
webgl: ['usa-shader', 'usa-distort', 'usa-liquid'],
|
|
415
|
+
webgl: ['usa-shader', 'usa-distort', 'usa-liquid', 'usa-post-fx'],
|
|
389
416
|
depth: ['usa-cube', 'usa-depth'],
|
|
390
417
|
layout: ['usa-auto-animate', 'usa-masonry'],
|
|
391
418
|
packs: ['usa-pack'],
|
|
@@ -7943,6 +7970,7 @@ var css$7 = "";
|
|
|
7943
7970
|
|
|
7944
7971
|
const LEVELS = ['off', 'low', 'normal', 'high'];
|
|
7945
7972
|
const KEY$1 = 'usa:motion';
|
|
7973
|
+
let fromSwitch = false;
|
|
7946
7974
|
/**
|
|
7947
7975
|
* Set the global motion intensity for every `<usa-*>` component:
|
|
7948
7976
|
* `'off'` (like reduced motion), `'low'`, `'normal'` (default), `'high'`.
|
|
@@ -7952,7 +7980,9 @@ const KEY$1 = 'usa:motion';
|
|
|
7952
7980
|
function setMotionIntensity(level, persist = false) {
|
|
7953
7981
|
if (!LEVELS.includes(level))
|
|
7954
7982
|
return;
|
|
7955
|
-
|
|
7983
|
+
if (level === 'off' && !fromSwitch)
|
|
7984
|
+
deprecate('set-intensity-off', "setMotionIntensity('off') is deprecated and will be removed in 5.0 — use setMotionSensitivity('minimal') from use-scroll-animate/components/a11y.");
|
|
7985
|
+
withoutDeprecations(() => configureComponents({ motionIntensity: level }));
|
|
7956
7986
|
if (persist) {
|
|
7957
7987
|
try {
|
|
7958
7988
|
localStorage.setItem(KEY$1, level);
|
|
@@ -7968,12 +7998,15 @@ function setMotionIntensity(level, persist = false) {
|
|
|
7968
7998
|
function restoreMotionIntensity() {
|
|
7969
7999
|
try {
|
|
7970
8000
|
const v = localStorage.getItem(KEY$1);
|
|
7971
|
-
if (v && LEVELS.includes(v))
|
|
8001
|
+
if (v && LEVELS.includes(v)) {
|
|
8002
|
+
fromSwitch = true;
|
|
7972
8003
|
setMotionIntensity(v);
|
|
8004
|
+
}
|
|
7973
8005
|
}
|
|
7974
8006
|
catch {
|
|
7975
8007
|
/* ignore */
|
|
7976
8008
|
}
|
|
8009
|
+
fromSwitch = false;
|
|
7977
8010
|
return getMotionIntensity();
|
|
7978
8011
|
}
|
|
7979
8012
|
function defineMotionSwitch(tag = 'usa-motion-switch') {
|
|
@@ -7982,7 +8015,9 @@ function defineMotionSwitch(tag = 'usa-motion-switch') {
|
|
|
7982
8015
|
return getMotionIntensity();
|
|
7983
8016
|
}
|
|
7984
8017
|
set value(v) {
|
|
8018
|
+
fromSwitch = true;
|
|
7985
8019
|
setMotionIntensity(v, true);
|
|
8020
|
+
fromSwitch = false;
|
|
7986
8021
|
this.sync();
|
|
7987
8022
|
}
|
|
7988
8023
|
mount() {
|
|
@@ -8173,6 +8208,8 @@ function defineTimeline(tag = 'usa-timeline') {
|
|
|
8173
8208
|
// (0–0.95) or `scrub="js"` opt into the JS engine, `scrub="scroll"`
|
|
8174
8209
|
// follows this element's own scroll position.
|
|
8175
8210
|
const v = this.str('scrub');
|
|
8211
|
+
if (v === 'js')
|
|
8212
|
+
deprecate('timeline-scrub-js', '<usa-timeline scrub="js"> is deprecated and will be removed in 5.0 — the JS engine is picked automatically where native scroll timelines are missing; add smooth="…" to opt into smoothing.');
|
|
8176
8213
|
const stop = tl.scrub(this, { smooth: this.num('smooth', 0), engine: v === 'js' ? 'js' : 'auto', source: v === 'scroll' ? 'scroll' : 'view' });
|
|
8177
8214
|
this.toggleAttribute('data-native', stop.native);
|
|
8178
8215
|
this.onCleanup(stop);
|
|
@@ -8950,6 +8987,12 @@ const SHADERS = {
|
|
|
8950
8987
|
waves: 'void main(){vec2 u=v_uv;float t=u_time*.4;float w=0.;for(int i=0;i<4;i++){float f=float(i)+1.;w+=sin(u.x*6.*f+t*f)*.08/f;}float l=smoothstep(.0,.02,abs(u.y-.5-w));vec3 col=mix(vec3(.2,.5,1.),vec3(.04,.06,.15),l)+vec3(.1,.0,.2)*u.y;gl_FragColor=vec4(col,1.);}',
|
|
8951
8988
|
aurora: 'void main(){vec2 u=v_uv;float t=u_time*.2;float b=0.;for(int i=0;i<3;i++){float f=float(i);b+=.4/abs((u.y-.6+.15*sin(u.x*3.+t+f*1.7))*(8.+f*4.));}vec3 col=vec3(.02,.03,.08)+b*mix(vec3(.1,.9,.6),vec3(.6,.3,1.),u.x)*.35;gl_FragColor=vec4(col,1.);}',
|
|
8952
8989
|
distort: 'void main(){vec2 u=v_uv;vec2 d=u-u_mouse;float r=length(d);float k=u_hover*.08*exp(-r*r*18.);u-=normalize(d+1e-4)*k;float s=u_hover*.006;vec3 col=vec3(texture2D(u_tex,u+vec2(s,0.)).r,texture2D(u_tex,u).g,texture2D(u_tex,u-vec2(s,0.)).b);gl_FragColor=vec4(col,1.);}',
|
|
8990
|
+
// 4.8 particle presets (procedural, one quad: no buffers, no per-particle JS)
|
|
8991
|
+
snow: 'float h(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);}void main(){vec2 u=v_uv;u.x*=u_resolution.x/max(u_resolution.y,1.);vec3 col=mix(vec3(.05,.08,.16),vec3(.12,.16,.3),v_uv.y);for(int l=0;l<3;l++){float s=8.+float(l)*7.;vec2 q=u*s;q.y+=u_time*(.6+float(l)*.35);q.x+=sin(q.y*.7+float(l))*.3;vec2 id=floor(q);vec2 f=fract(q)-.5;float r=h(id);if(r>.6){vec2 o=vec2(h(id+3.)-.5,h(id+7.)-.5)*.6;float d=length(f-o);col+=smoothstep(.09-float(l)*.02,0.,d)*(.5+.5*r);}}gl_FragColor=vec4(col,1.);}',
|
|
8992
|
+
fireflies: 'float h(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);}void main(){vec2 u=v_uv;u.x*=u_resolution.x/max(u_resolution.y,1.);vec3 col=vec3(.02,.04,.03);for(int l=0;l<2;l++){vec2 q=u*(5.+float(l)*4.);vec2 id=floor(q);vec2 f=fract(q)-.5;float r=h(id+float(l)*13.);vec2 o=.35*vec2(sin(u_time*(.4+r)+r*6.28),cos(u_time*(.3+r)+r*12.));float d=length(f-o);float tw=.5+.5*sin(u_time*3.*r+r*20.);col+=vec3(1.,.85,.3)*smoothstep(.12,0.,d)*tw*step(.45,r);}gl_FragColor=vec4(col,1.);}',
|
|
8993
|
+
stars: 'float h(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);}void main(){vec2 c=v_uv-.5;c.x*=u_resolution.x/max(u_resolution.y,1.);vec3 col=vec3(.01,.01,.04);for(int l=0;l<4;l++){float z=fract(float(l)*.25+u_time*.05);float sc=mix(20.,.5,z);vec2 q=c*sc+float(l)*7.;vec2 id=floor(q);vec2 f=fract(q)-.5;float r=h(id);float d=length(f-(vec2(h(id+1.),h(id+2.))-.5)*.7);col+=vec3(.8,.9,1.)*smoothstep(.06,0.,d)*step(.8,r)*smoothstep(0.,.5,z)*smoothstep(1.,.8,z)*2.;}gl_FragColor=vec4(col,1.);}',
|
|
8994
|
+
bokeh: 'float h(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);}void main(){vec2 u=v_uv;u.x*=u_resolution.x/max(u_resolution.y,1.);vec3 col=mix(vec3(.08,.03,.12),vec3(.02,.05,.12),v_uv.y);for(int l=0;l<3;l++){vec2 q=u*(2.5+float(l)*1.5);q.y-=u_time*.05*(1.+float(l));vec2 id=floor(q);vec2 f=fract(q)-.5;float r=h(id+float(l)*5.);float d=length(f-(vec2(h(id+4.),h(id+9.))-.5)*.5);vec3 tint=.5+.5*cos(r*6.28+vec3(0.,2.,4.));col+=tint*smoothstep(.3,.26,d)*.18*step(.35,r);}gl_FragColor=vec4(col,1.);}',
|
|
8995
|
+
rain: 'float h(float n){return fract(sin(n)*43758.5453);}void main(){vec2 u=v_uv;vec3 col=mix(vec3(.04,.06,.1),vec3(.1,.13,.2),u.y);float n=floor(u.x*120.);float sp=.8+h(n)*1.2;float y=fract(u.y+u_time*sp+h(n+1.));float drop=smoothstep(.0,.08,y)*smoothstep(.16,.08,y)*step(.7,h(n+2.));col+=vec3(.5,.6,.8)*drop*.6;gl_FragColor=vec4(col,1.);}',
|
|
8953
8996
|
liquid: 'void main(){vec2 u=v_uv;vec2 o=vec2(0.);for(int i=0;i<4;i++){vec4 r=u_ripples[i];if(r.w>0.){float d=distance(u,r.xy);float w=sin(d*60.-r.z*12.)*exp(-d*6.)*exp(-r.z*1.6)*r.w*.02;o+=normalize(u-r.xy+1e-4)*w;}}o+=vec2(sin(u.y*10.+u_time),cos(u.x*10.+u_time))*.002*u_hover;gl_FragColor=texture2D(u_tex,u+o);}',
|
|
8954
8997
|
};
|
|
8955
8998
|
/** Full fragment source for a preset or custom body (adds the shared header). */
|
|
@@ -9009,9 +9052,10 @@ function glQuad(canvas, frag) {
|
|
|
9009
9052
|
const U = (n) => g.getUniformLocation(prog, n);
|
|
9010
9053
|
const uT = U('u_time'), uR = U('u_resolution'), uM = U('u_mouse'), uH = U('u_hover'), uRp = U('u_ripples');
|
|
9011
9054
|
let tex = null;
|
|
9055
|
+
const extraLoc = {};
|
|
9012
9056
|
const quad = {
|
|
9013
|
-
resize() {
|
|
9014
|
-
const dpr = Math.min(2, (typeof devicePixelRatio === 'number' && devicePixelRatio) || 1);
|
|
9057
|
+
resize(scale = 1) {
|
|
9058
|
+
const dpr = Math.min(2, (typeof devicePixelRatio === 'number' && devicePixelRatio) || 1) * Math.min(1, Math.max(0.25, scale));
|
|
9015
9059
|
const w = Math.max(1, Math.round((canvas.clientWidth || 300) * dpr));
|
|
9016
9060
|
const h = Math.max(1, Math.round((canvas.clientHeight || 150) * dpr));
|
|
9017
9061
|
if (canvas.width !== w || canvas.height !== h)
|
|
@@ -9034,6 +9078,9 @@ function glQuad(canvas, frag) {
|
|
|
9034
9078
|
g.uniform1f(uH, u.hover ?? 0);
|
|
9035
9079
|
if (uRp)
|
|
9036
9080
|
g.uniform4fv(uRp, new Float32Array((u.ripples ?? []).concat(Array(16).fill(0)).slice(0, 16)));
|
|
9081
|
+
if (u.extra)
|
|
9082
|
+
for (const [k, v] of Object.entries(u.extra))
|
|
9083
|
+
g.uniform1f((extraLoc[k] ?? (extraLoc[k] = U(k))), v);
|
|
9037
9084
|
g.drawArrays(g.TRIANGLES, 0, 6);
|
|
9038
9085
|
},
|
|
9039
9086
|
dispose() {
|
|
@@ -9048,6 +9095,131 @@ function glQuad(canvas, frag) {
|
|
|
9048
9095
|
return quad;
|
|
9049
9096
|
}
|
|
9050
9097
|
|
|
9098
|
+
/**
|
|
9099
|
+
* 4.8 — WebGL preset library on `glQuad()`: particle presets (`snow`,
|
|
9100
|
+
* `fireflies`, `stars`, `bokeh`, `rain` — usable as `<usa-shader preset>`),
|
|
9101
|
+
* chainable post-processing passes for images (`<usa-post-fx>`), one CSS
|
|
9102
|
+
* fallback per preset, and an adaptive quality governor (fps + battery).
|
|
9103
|
+
*/
|
|
9104
|
+
const PARTICLE_PRESETS = ['snow', 'fireflies', 'stars', 'bokeh', 'rain'];
|
|
9105
|
+
/** Post-processing passes: `vec3 fx(vec3 c, vec2 uv)` bodies, applied in order. `u_intensity` 0–1. */
|
|
9106
|
+
const POST_EFFECTS = {
|
|
9107
|
+
vignette: 'c*=mix(1.,smoothstep(.85,.25,length(uv-.5)),u_intensity);',
|
|
9108
|
+
grain: 'c+=(fract(sin(dot(uv*u_resolution+u_time,vec2(12.9898,78.233)))*43758.5453)-.5)*.18*u_intensity;',
|
|
9109
|
+
chromatic: 'float s=.008*u_intensity;c=vec3(texture2D(u_tex,uv+vec2(s,0.)).r,c.g,texture2D(u_tex,uv-vec2(s,0.)).b);',
|
|
9110
|
+
scanlines: 'c*=1.-.25*u_intensity*step(.5,fract(uv.y*u_resolution.y*.5));',
|
|
9111
|
+
crt: 'vec2 d=uv-.5;float r=dot(d,d);c*=1.-.6*u_intensity*r;c*=.92+.08*sin(uv.y*u_resolution.y*3.14159);c.r*=1.+.05*u_intensity;',
|
|
9112
|
+
bloom: 'vec3 b=vec3(0.);for(int i=0;i<8;i++){float a=float(i)*.785;b+=max(texture2D(u_tex,uv+vec2(cos(a),sin(a))*.012).rgb-.6,0.);}c+=b*.35*u_intensity;',
|
|
9113
|
+
pixelate: 'float px=mix(1.,48.,u_intensity);vec2 g=floor(uv*u_resolution/px)*px/u_resolution;c=texture2D(u_tex,g+.5*px/u_resolution).rgb;',
|
|
9114
|
+
duotone: 'float l=dot(c,vec3(.299,.587,.114));c=mix(c,mix(vec3(.12,.05,.35),vec3(1.,.55,.4),l),u_intensity);',
|
|
9115
|
+
glitch: 'float k=step(.97,fract(sin(floor(uv.y*24.)+floor(u_time*6.))*4375.5));c=mix(c,texture2D(u_tex,uv+vec2(k*.04*u_intensity,0.)).rgb,k);',
|
|
9116
|
+
};
|
|
9117
|
+
/** One fragment shader running the passes in order over `u_tex` (pixel-sampling passes read the source). */
|
|
9118
|
+
function postFxShader(effects) {
|
|
9119
|
+
const list = effects.filter((e) => POST_EFFECTS[e]);
|
|
9120
|
+
const body = list.map((e) => `{${POST_EFFECTS[e]}}`).join('');
|
|
9121
|
+
return `uniform float u_intensity;void main(){vec2 uv=v_uv;vec3 c=texture2D(u_tex,uv).rgb;${body}gl_FragColor=vec4(clamp(c,0.,1.),1.);}`;
|
|
9122
|
+
}
|
|
9123
|
+
/** The unified CSS fallback (no WebGL / reduced data): a still background or image filter per preset. */
|
|
9124
|
+
const GL_FALLBACKS = {
|
|
9125
|
+
gradient: 'linear-gradient(120deg,#6366f1,#ec4899 50%,#22d3ee)',
|
|
9126
|
+
plasma: 'conic-gradient(from 90deg,#f43f5e,#a855f7,#06b6d4,#f43f5e)',
|
|
9127
|
+
waves: 'linear-gradient(#0a0f26,#1e3a8a)',
|
|
9128
|
+
aurora: 'radial-gradient(120% 60% at 30% 40%,#10b98155,transparent),radial-gradient(100% 50% at 70% 50%,#8b5cf655,transparent),#05070f',
|
|
9129
|
+
snow: 'radial-gradient(2px 2px at 20% 30%,#fff,transparent),radial-gradient(2px 2px at 70% 60%,#fff,transparent),radial-gradient(1.5px 1.5px at 40% 80%,#fff,transparent),linear-gradient(#0d1428,#1f2a4d)',
|
|
9130
|
+
fireflies: 'radial-gradient(3px 3px at 25% 40%,#fde68a,transparent),radial-gradient(3px 3px at 65% 70%,#fde68a,transparent),#05090a',
|
|
9131
|
+
stars: 'radial-gradient(1px 1px at 10% 20%,#fff,transparent),radial-gradient(1px 1px at 80% 30%,#fff,transparent),radial-gradient(1.5px 1.5px at 50% 70%,#cfe0ff,transparent),#02020a',
|
|
9132
|
+
bokeh: 'radial-gradient(40px 40px at 30% 40%,#f472b633,transparent),radial-gradient(60px 60px at 70% 60%,#60a5fa33,transparent),#140820',
|
|
9133
|
+
rain: 'repeating-linear-gradient(100deg,#ffffff10 0 1px,transparent 1px 14px),linear-gradient(#0a0f1a,#1a2133)',
|
|
9134
|
+
// post-fx fallbacks are CSS filters on the <img>
|
|
9135
|
+
'post:duotone': 'grayscale(1) sepia(.6) hue-rotate(220deg) saturate(2)',
|
|
9136
|
+
'post:vignette': 'brightness(.95) contrast(1.05)',
|
|
9137
|
+
'post:crt': 'contrast(1.15) saturate(1.2)',
|
|
9138
|
+
'post:bloom': 'brightness(1.08) saturate(1.15)',
|
|
9139
|
+
};
|
|
9140
|
+
/** CSS fallback for a shader preset / post effect list. */
|
|
9141
|
+
function glFallbackCss(preset, post = false) {
|
|
9142
|
+
if (post)
|
|
9143
|
+
return preset.split(/\s+/).map((e) => GL_FALLBACKS[`post:${e}`]).filter(Boolean).join(' ');
|
|
9144
|
+
return GL_FALLBACKS[preset] || GL_FALLBACKS.gradient;
|
|
9145
|
+
}
|
|
9146
|
+
/**
|
|
9147
|
+
* Adaptive quality for GL loops: measures fps, steps the resolution scale
|
|
9148
|
+
* down (1 → 0.5 → 0.35) after two slow seconds and back up after five good
|
|
9149
|
+
* ones, and caps the frame rate in battery-saver mode. Pure — feed it times.
|
|
9150
|
+
*/
|
|
9151
|
+
function glGovernor(options = {}) {
|
|
9152
|
+
const { minFps = 40, saverFps = 30 } = options;
|
|
9153
|
+
const STEPS = [1, 0.5, 0.35];
|
|
9154
|
+
let step = 0;
|
|
9155
|
+
let frames = 0;
|
|
9156
|
+
let winStart = -1;
|
|
9157
|
+
let last = -Infinity;
|
|
9158
|
+
let slow = 0;
|
|
9159
|
+
let good = 0;
|
|
9160
|
+
let fps = 60;
|
|
9161
|
+
const g = {
|
|
9162
|
+
saver: false,
|
|
9163
|
+
get scale() {
|
|
9164
|
+
return Math.min(STEPS[step], g.saver ? 0.6 : 1);
|
|
9165
|
+
},
|
|
9166
|
+
get fps() {
|
|
9167
|
+
return fps;
|
|
9168
|
+
},
|
|
9169
|
+
tick(t) {
|
|
9170
|
+
if (winStart < 0)
|
|
9171
|
+
winStart = t;
|
|
9172
|
+
if (g.saver && t - last < 1000 / saverFps - 1)
|
|
9173
|
+
return false;
|
|
9174
|
+
last = t;
|
|
9175
|
+
frames++;
|
|
9176
|
+
if (t - winStart >= 1000) {
|
|
9177
|
+
fps = Math.round((frames * 1000) / (t - winStart));
|
|
9178
|
+
frames = 0;
|
|
9179
|
+
winStart = t;
|
|
9180
|
+
const before = g.scale;
|
|
9181
|
+
if (fps < minFps && !g.saver) {
|
|
9182
|
+
good = 0;
|
|
9183
|
+
if (++slow >= 2 && step < STEPS.length - 1)
|
|
9184
|
+
((step++), (slow = 0));
|
|
9185
|
+
}
|
|
9186
|
+
else {
|
|
9187
|
+
slow = 0;
|
|
9188
|
+
if (++good >= 5 && step > 0)
|
|
9189
|
+
((step--), (good = 0));
|
|
9190
|
+
}
|
|
9191
|
+
if (g.scale !== before)
|
|
9192
|
+
g.onScale?.(g.scale);
|
|
9193
|
+
}
|
|
9194
|
+
return true;
|
|
9195
|
+
},
|
|
9196
|
+
};
|
|
9197
|
+
return g;
|
|
9198
|
+
}
|
|
9199
|
+
/** Watch the Battery Status API (where available) and Save-Data; calls `cb(true)` in saver conditions. Returns a stop function. */
|
|
9200
|
+
function watchPowerSaver(cb) {
|
|
9201
|
+
let stopped = false;
|
|
9202
|
+
const nav = (typeof navigator !== 'undefined' ? navigator : {});
|
|
9203
|
+
const saveData = !!nav.connection?.saveData;
|
|
9204
|
+
if (saveData)
|
|
9205
|
+
cb(true);
|
|
9206
|
+
if (typeof nav.getBattery !== 'function')
|
|
9207
|
+
return () => undefined;
|
|
9208
|
+
let battery = null;
|
|
9209
|
+
const update = () => !stopped && cb(saveData || (!!battery && !battery.charging && battery.level <= 0.2));
|
|
9210
|
+
nav.getBattery().then((b) => {
|
|
9211
|
+
battery = b;
|
|
9212
|
+
update();
|
|
9213
|
+
b.addEventListener?.('levelchange', update);
|
|
9214
|
+
b.addEventListener?.('chargingchange', update);
|
|
9215
|
+
}, () => undefined);
|
|
9216
|
+
return () => {
|
|
9217
|
+
stopped = true;
|
|
9218
|
+
battery?.removeEventListener?.('levelchange', update);
|
|
9219
|
+
battery?.removeEventListener?.('chargingchange', update);
|
|
9220
|
+
};
|
|
9221
|
+
}
|
|
9222
|
+
|
|
9051
9223
|
var css$2 = "";
|
|
9052
9224
|
|
|
9053
9225
|
function make(kind) {
|
|
@@ -9061,15 +9233,23 @@ function make(kind) {
|
|
|
9061
9233
|
this._hover = 0;
|
|
9062
9234
|
this._hoverTo = 0;
|
|
9063
9235
|
this._ripples = [];
|
|
9236
|
+
this._scale = 1;
|
|
9064
9237
|
}
|
|
9065
9238
|
static get observedAttributes() {
|
|
9066
|
-
return kind === 'shader' ? ['preset', 'speed'] : ['src'];
|
|
9239
|
+
return kind === 'shader' ? ['preset', 'speed', 'quality'] : kind === 'post' ? ['effects', 'intensity', 'quality'] : ['src'];
|
|
9067
9240
|
}
|
|
9068
9241
|
get active() {
|
|
9069
9242
|
return !!this._q;
|
|
9070
9243
|
}
|
|
9071
9244
|
fallback(reason) {
|
|
9072
9245
|
this.setAttribute('data-fallback', reason);
|
|
9246
|
+
// 4.8 unified fallback: a still CSS rendering of the preset / effects
|
|
9247
|
+
if (reason !== 'off') {
|
|
9248
|
+
if (kind === 'shader')
|
|
9249
|
+
this.style.setProperty('--usa-gl-fallback', glFallbackCss(this.str('preset', 'gradient')));
|
|
9250
|
+
if (kind === 'post')
|
|
9251
|
+
this.style.setProperty('--usa-gl-filter', glFallbackCss(this.str('effects', 'vignette grain'), true) || 'none');
|
|
9252
|
+
}
|
|
9073
9253
|
this._c?.remove();
|
|
9074
9254
|
this._c = null;
|
|
9075
9255
|
this._q?.dispose();
|
|
@@ -9087,12 +9267,13 @@ function make(kind) {
|
|
|
9087
9267
|
mouse: this._mouse,
|
|
9088
9268
|
hover: this._hover,
|
|
9089
9269
|
ripples: this._ripples.flatMap((r) => [r.x, r.y, (t - r.t) / 1000, this.num('strength', 1)]),
|
|
9270
|
+
extra: kind === 'post' ? { u_intensity: clamp(this.num('intensity', 0.6), 0, 1) } : undefined,
|
|
9090
9271
|
});
|
|
9091
9272
|
}
|
|
9092
9273
|
mount() {
|
|
9093
9274
|
this.removeAttribute('data-fallback');
|
|
9094
9275
|
const custom = this.querySelector('script[type="x-shader/x-fragment"]');
|
|
9095
|
-
const frag = kind === 'shader' ? custom?.textContent || this.str('preset', 'gradient') : kind;
|
|
9276
|
+
const frag = kind === 'shader' ? custom?.textContent || this.str('preset', 'gradient') : kind === 'post' ? postFxShader(this.str('effects', 'vignette grain').split(/[\s,]+/)) : kind;
|
|
9096
9277
|
const img = kind === 'shader' ? null : this.querySelector('img');
|
|
9097
9278
|
if (kind !== 'shader' && !img)
|
|
9098
9279
|
return this.fallback('no-image');
|
|
@@ -9117,7 +9298,7 @@ function make(kind) {
|
|
|
9117
9298
|
}
|
|
9118
9299
|
};
|
|
9119
9300
|
const draw = () => {
|
|
9120
|
-
q.resize();
|
|
9301
|
+
q.resize(this._scale);
|
|
9121
9302
|
this.frame();
|
|
9122
9303
|
};
|
|
9123
9304
|
if (img && !(img.complete && img.naturalWidth)) {
|
|
@@ -9131,7 +9312,7 @@ function make(kind) {
|
|
|
9131
9312
|
this.setAttribute('data-active', '');
|
|
9132
9313
|
this.onCleanup(() => this.removeAttribute('data-active'));
|
|
9133
9314
|
draw();
|
|
9134
|
-
if (kind
|
|
9315
|
+
if (kind === 'distort' || kind === 'liquid') {
|
|
9135
9316
|
const pos = (e) => {
|
|
9136
9317
|
const r = this.getBoundingClientRect();
|
|
9137
9318
|
this._mouse = [clamp((e.clientX - r.left) / (r.width || 1), 0, 1), clamp(1 - (e.clientY - r.top) / (r.height || 1), 0, 1)];
|
|
@@ -9148,7 +9329,7 @@ function make(kind) {
|
|
|
9148
9329
|
// 4.0.1: also follow the element's own size (grid reflow, card expand…)
|
|
9149
9330
|
if (typeof ResizeObserver !== 'undefined') {
|
|
9150
9331
|
const ro = new ResizeObserver(() => {
|
|
9151
|
-
q.resize();
|
|
9332
|
+
q.resize(this._scale);
|
|
9152
9333
|
if (!this._id)
|
|
9153
9334
|
this.frame();
|
|
9154
9335
|
});
|
|
@@ -9157,9 +9338,20 @@ function make(kind) {
|
|
|
9157
9338
|
}
|
|
9158
9339
|
if (this.reduced)
|
|
9159
9340
|
return; // one static frame, no loop
|
|
9341
|
+
// 4.8 adaptive quality: fps-driven resolution steps + battery saver frame cap
|
|
9342
|
+
const gov = glGovernor();
|
|
9343
|
+
const auto = this.str('quality', 'auto') !== 'high';
|
|
9344
|
+
gov.onScale = (sc) => {
|
|
9345
|
+
this._scale = sc;
|
|
9346
|
+
this.setAttribute('data-quality', String(sc));
|
|
9347
|
+
q.resize(sc);
|
|
9348
|
+
};
|
|
9349
|
+
if (auto)
|
|
9350
|
+
this.onCleanup(watchPowerSaver((saver) => ((gov.saver = saver), gov.onScale?.(gov.scale))));
|
|
9160
9351
|
let visible = false;
|
|
9161
9352
|
const loop = () => {
|
|
9162
|
-
|
|
9353
|
+
if (!auto || gov.tick(now()))
|
|
9354
|
+
this.frame();
|
|
9163
9355
|
this._id = raf(loop);
|
|
9164
9356
|
};
|
|
9165
9357
|
const sync = () => {
|
|
@@ -9170,7 +9362,7 @@ function make(kind) {
|
|
|
9170
9362
|
};
|
|
9171
9363
|
this.inView((v) => ((visible = v), sync()));
|
|
9172
9364
|
this.listen(document, 'visibilitychange', sync);
|
|
9173
|
-
this.listen(window, 'resize', () => q.resize(), { passive: true });
|
|
9365
|
+
this.listen(window, 'resize', () => q.resize(this._scale), { passive: true });
|
|
9174
9366
|
this.onCleanup(() => caf(this._id));
|
|
9175
9367
|
}
|
|
9176
9368
|
};
|
|
@@ -9198,6 +9390,16 @@ function defineDistort(tag = 'usa-distort') {
|
|
|
9198
9390
|
function defineLiquid(tag = 'usa-liquid') {
|
|
9199
9391
|
return defineElement(tag, make('liquid'), { id: 'webgl', text: css$2 });
|
|
9200
9392
|
}
|
|
9393
|
+
/**
|
|
9394
|
+
* `<usa-post-fx effects="vignette grain crt" intensity="0.6">` — GPU
|
|
9395
|
+
* post-processing over the `<img>` inside (4.8): `vignette` · `grain` ·
|
|
9396
|
+
* `chromatic` · `scanlines` · `crt` · `bloom` · `pixelate` · `duotone` ·
|
|
9397
|
+
* `glitch`, chained in order. `quality="high"` disables adaptive quality.
|
|
9398
|
+
* Fallback: the image with an approximate CSS filter.
|
|
9399
|
+
*/
|
|
9400
|
+
function definePostFx(tag = 'usa-post-fx') {
|
|
9401
|
+
return defineElement(tag, make('post'), { id: 'webgl', text: css$2 });
|
|
9402
|
+
}
|
|
9201
9403
|
|
|
9202
9404
|
/**
|
|
9203
9405
|
* use-scroll-animate/components/webgl — lightweight canvas / WebGL (v3.4).
|
|
@@ -9210,6 +9412,7 @@ function defineWebglComponents() {
|
|
|
9210
9412
|
defineShader();
|
|
9211
9413
|
defineDistort();
|
|
9212
9414
|
defineLiquid();
|
|
9415
|
+
definePostFx();
|
|
9213
9416
|
}
|
|
9214
9417
|
|
|
9215
9418
|
var css$1 = "";
|
|
@@ -9873,6 +10076,40 @@ function definePacksComponents() {
|
|
|
9873
10076
|
definePack();
|
|
9874
10077
|
}
|
|
9875
10078
|
|
|
10079
|
+
/**
|
|
10080
|
+
* 4.9 — the 5.0 modern-browser baseline. `baselineReport()` lists which
|
|
10081
|
+
* required / progressive features this browser has; `warnBaseline()` logs
|
|
10082
|
+
* once in development when a required one is missing.
|
|
10083
|
+
*/
|
|
10084
|
+
/** Required in 5.0: Custom Elements, WAAPI, IntersectionObserver, ResizeObserver, adoptedStyleSheets. Progressive: View Transitions, scroll-driven animations, WebGL. */
|
|
10085
|
+
function baselineReport() {
|
|
10086
|
+
const w = (typeof window !== 'undefined' ? window : {});
|
|
10087
|
+
const d = (typeof document !== 'undefined' ? document : {});
|
|
10088
|
+
const css = (q) => typeof w.CSS?.supports === 'function' && w.CSS.supports(q);
|
|
10089
|
+
return [
|
|
10090
|
+
{ id: 'custom-elements', required: true, supported: !!w.customElements },
|
|
10091
|
+
{ id: 'web-animations', required: true, supported: typeof w.Element?.prototype?.animate === 'function' },
|
|
10092
|
+
{ id: 'intersection-observer', required: true, supported: typeof w.IntersectionObserver === 'function' },
|
|
10093
|
+
{ id: 'resize-observer', required: true, supported: typeof w.ResizeObserver === 'function' },
|
|
10094
|
+
{ id: 'adopted-stylesheets', required: true, supported: 'adoptedStyleSheets' in d },
|
|
10095
|
+
{ id: 'view-transitions', required: false, supported: typeof d.startViewTransition === 'function' },
|
|
10096
|
+
{ id: 'scroll-driven-animations', required: false, supported: css('animation-timeline: view()') },
|
|
10097
|
+
{ id: 'webgl', required: false, supported: !!(d.createElement && (() => { try {
|
|
10098
|
+
return d.createElement('canvas').getContext('webgl');
|
|
10099
|
+
}
|
|
10100
|
+
catch {
|
|
10101
|
+
return null;
|
|
10102
|
+
} })()) },
|
|
10103
|
+
];
|
|
10104
|
+
}
|
|
10105
|
+
/** Log (once) which required 5.0 features are missing here. Returns the missing ids. */
|
|
10106
|
+
function warnBaseline() {
|
|
10107
|
+
const missing = baselineReport().filter((f) => f.required && !f.supported).map((f) => f.id);
|
|
10108
|
+
if (missing.length)
|
|
10109
|
+
deprecate('baseline', `this browser lacks ${missing.join(', ')}; use-scroll-animate 5.0 requires them (modern-browser baseline, see docs/upgrading-5.md).`);
|
|
10110
|
+
return missing;
|
|
10111
|
+
}
|
|
10112
|
+
|
|
9876
10113
|
/**
|
|
9877
10114
|
* use-scroll-animate/components/a11y — accessibility toolkit (4.4).
|
|
9878
10115
|
*
|
|
@@ -10300,5 +10537,5 @@ function defineComponents(categories) {
|
|
|
10300
10537
|
const STYLE_BASE = new URL('../', import.meta.url).href;
|
|
10301
10538
|
onDemandStyles(STYLE_BASE);
|
|
10302
10539
|
|
|
10303
|
-
export { ALL_TAGS, AMBIENT_EFFECTS, ANIM_ICONS, BRIDGE_PROTOCOL_VERSION, BUTTON_DEFORMS, CARD_EFFECTS, CLICK_EFFECTS, COMPONENT_CATEGORIES, CURSOR_MODES, JOINING_SCRIPT, LIVE_REGION_IDS, MASK_SHAPES, MORPH_ICONS, MOTION_SCALE, MOTION_SENSITIVITY, MOTION_SENSITIVITY_LEVELS, MOTION_TOKENS, PACKS, PACK_PRIMITIVES, PAGE_EFFECTS, REVEAL_EFFECTS, SENSITIVITY_CSS, SHADERS, SPINNER_VARIANTS, SPRING_EFFECTS, SPRING_PRESETS, STATIC_ALTERNATIVES, STYLE_BASE, TIMELINE_PRESETS, VARIANTS, activeAnimations, adaptKeyframes, adoptVariants, animationBudget, announce, applyMotionTokens, applyNativeSettings, applyPack, auditMotionA11y, autoAnimate, autoDegrade, burst, categoryOf, confetti, configureComponents, connectNativeShell, countUp, createSpring, defineAccordion, defineAcrylic, defineAmbient, defineAnimIcon, defineAurora, defineAutoAnimate, defineAutoSkeleton, defineAvatarStack, defineBackToTop, defineBackgroundComponents, defineBadge, defineBlobs, defineBottomSheet, defineButton, defineCard, defineCardComponents, defineCardStack, defineCarousel3d, defineCheck, defineCheckbox, defineClick, defineClickComponents, defineComponents, defineCounter, defineCube, defineCursor, defineDepth, defineDepthComponents, defineDialog, defineDistort, defineDotNetwork, defineDoubleTap, defineDraggable, defineDraw, defineDrawer, defineFab, defineFeedbackComponents, defineFullpage, defineGestureComponents, defineGlitch, defineGradientText, defineGrain, defineGridGlow, defineHandwriting, defineHold, defineIconMorph, defineInteractionComponents, defineLayoutComponents, defineLike, defineLiquid, defineLoadingBar, defineMagnetic, defineMarquee, defineMaskReveal, defineMasonry, defineMorph, defineMotionSwitch, defineNavbar, defineOverscroll, definePack, definePacksComponents, definePageComponents, defineParticles, definePhysicsComponents, definePinchZoom, definePopover, definePress, defineProgress, definePullRefresh, defineRating, defineReveal, defineRevealComponents, defineRipple, defineScramble, defineScrollHighlight, defineScrollProgress, defineScrolly, defineShader, defineShimmerText, defineSkeleton, defineSlider, defineSpinner, defineSplash, defineSplitText, defineSpotlight, defineSpring, defineStagger, defineStickyStack, defineSvgComponents, defineSwipeable, defineTabs, defineTextComponents, defineTextRotate, defineTilt, defineTimeline, defineTimelineComponents, defineToaster, defineToggle, defineTooltip, defineTransitionComponents, defineTypewriter, defineUiComponents, defineViewSwitch, defineWaterRipple, defineWaveText, defineWebglComponents, detectNativeHost, deviceTilt, drawLines, easeOutExpo, enableMpaTransitions, flip, flipFrames, fluentPreset, flyToCart, fragmentSource, gesture, getMotionIntensity, getMotionSensitivity, getMotionTokens, glQuad, graphemes, haptic, importMotionTokens, interpolatePath, linearEasing, liveRegion, loadCategoryStyles, loadedStyles, loadingBar, masonryLayout, mergeMotionTokens, morphPath, morphTo, motionAllowed, motionToken, motionTokensToCss, motionTokensToJSON, motionTokensToVars, motionVar, onDemandStyles, onFrame, orientationToTilt, pageTransition, parseDuration, parseEasing, parseNativeSettings, pathsCompatible, pinchScale, postToNative, prefersReducedMotion, projectInertia, readScrollProgress, requestOrientationPermission, resolveDurationToken, resolveEasingToken, resolvePosition, resolveSpring, restoreMotionIntensity, restoreMotionSensitivity, revealKeyframes, rubberBand, schedulerStats, scrambleFrame, scrollToTarget, setAnimationBudget, setMotionIntensity, setMotionSensitivity, setVariant, shake, sharedTransition, smoothScroll, snapTo, splitOrder, splitText, splitTimeline, words as splitWords, spring, springEasing, springEffectKeyframes, springSamples, staticAlternative, stepSpring, supportsLinearEasing, supportsNativeScrub, supportsOrientation, supportsViewTransitions, supportsWebGL, swipeDirection, themeTransition, timeline, toast, viewTransition };
|
|
10540
|
+
export { ALL_TAGS, AMBIENT_EFFECTS, ANIM_ICONS, BRIDGE_PROTOCOL_VERSION, BUTTON_DEFORMS, CARD_EFFECTS, CLICK_EFFECTS, COMPONENT_CATEGORIES, CURSOR_MODES, GL_FALLBACKS, JOINING_SCRIPT, LIVE_REGION_IDS, MASK_SHAPES, MORPH_ICONS, MOTION_SCALE, MOTION_SENSITIVITY, MOTION_SENSITIVITY_LEVELS, MOTION_TOKENS, PACKS, PACK_PRIMITIVES, PAGE_EFFECTS, PARTICLE_PRESETS, POST_EFFECTS, REVEAL_EFFECTS, SENSITIVITY_CSS, SHADERS, SPINNER_VARIANTS, SPRING_EFFECTS, SPRING_PRESETS, STATIC_ALTERNATIVES, STYLE_BASE, TIMELINE_PRESETS, VARIANTS, activeAnimations, adaptKeyframes, adoptVariants, animationBudget, announce, applyMotionTokens, applyNativeSettings, applyPack, auditMotionA11y, autoAnimate, autoDegrade, baselineReport, burst, categoryOf, confetti, configureComponents, connectNativeShell, countUp, createSpring, defineAccordion, defineAcrylic, defineAmbient, defineAnimIcon, defineAurora, defineAutoAnimate, defineAutoSkeleton, defineAvatarStack, defineBackToTop, defineBackgroundComponents, defineBadge, defineBlobs, defineBottomSheet, defineButton, defineCard, defineCardComponents, defineCardStack, defineCarousel3d, defineCheck, defineCheckbox, defineClick, defineClickComponents, defineComponents, defineCounter, defineCube, defineCursor, defineDepth, defineDepthComponents, defineDialog, defineDistort, defineDotNetwork, defineDoubleTap, defineDraggable, defineDraw, defineDrawer, defineFab, defineFeedbackComponents, defineFullpage, defineGestureComponents, defineGlitch, defineGradientText, defineGrain, defineGridGlow, defineHandwriting, defineHold, defineIconMorph, defineInteractionComponents, defineLayoutComponents, defineLike, defineLiquid, defineLoadingBar, defineMagnetic, defineMarquee, defineMaskReveal, defineMasonry, defineMorph, defineMotionSwitch, defineNavbar, defineOverscroll, definePack, definePacksComponents, definePageComponents, defineParticles, definePhysicsComponents, definePinchZoom, definePopover, definePostFx, definePress, defineProgress, definePullRefresh, defineRating, defineReveal, defineRevealComponents, defineRipple, defineScramble, defineScrollHighlight, defineScrollProgress, defineScrolly, defineShader, defineShimmerText, defineSkeleton, defineSlider, defineSpinner, defineSplash, defineSplitText, defineSpotlight, defineSpring, defineStagger, defineStickyStack, defineSvgComponents, defineSwipeable, defineTabs, defineTextComponents, defineTextRotate, defineTilt, defineTimeline, defineTimelineComponents, defineToaster, defineToggle, defineTooltip, defineTransitionComponents, defineTypewriter, defineUiComponents, defineViewSwitch, defineWaterRipple, defineWaveText, defineWebglComponents, detectNativeHost, deviceTilt, drawLines, easeOutExpo, enableMpaTransitions, flip, flipFrames, fluentPreset, flyToCart, fragmentSource, gesture, getMotionIntensity, getMotionSensitivity, getMotionTokens, glFallbackCss, glGovernor, glQuad, graphemes, haptic, importMotionTokens, interpolatePath, linearEasing, liveRegion, loadCategoryStyles, loadedStyles, loadingBar, masonryLayout, mergeMotionTokens, morphPath, morphTo, motionAllowed, motionToken, motionTokensToCss, motionTokensToJSON, motionTokensToVars, motionVar, onDemandStyles, onFrame, orientationToTilt, pageTransition, parseDuration, parseEasing, parseNativeSettings, pathsCompatible, pinchScale, postFxShader, postToNative, prefersReducedMotion, projectInertia, readScrollProgress, requestOrientationPermission, resolveDurationToken, resolveEasingToken, resolvePosition, resolveSpring, restoreMotionIntensity, restoreMotionSensitivity, revealKeyframes, rubberBand, schedulerStats, scrambleFrame, scrollToTarget, setAnimationBudget, setMotionIntensity, setMotionSensitivity, setVariant, shake, sharedTransition, smoothScroll, snapTo, splitOrder, splitText, splitTimeline, words as splitWords, spring, springEasing, springEffectKeyframes, springSamples, staticAlternative, stepSpring, supportsLinearEasing, supportsNativeScrub, supportsOrientation, supportsViewTransitions, supportsWebGL, swipeDirection, themeTransition, timeline, toast, viewTransition, warnBaseline, watchPowerSaver };
|
|
10304
10541
|
//# sourceMappingURL=lite.js.map
|