use-scroll-animate 5.8.0 → 6.0.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 +31 -0
- package/README.md +3 -2
- package/README_ja.md +1 -0
- package/README_zh.md +2 -1
- package/bin/usa-codemod-6.mjs +146 -0
- package/dist/components/angular.d.cts +5 -3
- package/dist/components/angular.d.ts +5 -3
- package/dist/components/click.cjs +2 -4
- package/dist/components/click.cjs.map +1 -1
- package/dist/components/click.d.cts +3 -8
- package/dist/components/click.d.ts +3 -8
- package/dist/components/click.js +3 -2
- package/dist/components/click.js.map +1 -1
- package/dist/components/effects.cjs +306 -1
- package/dist/components/effects.cjs.map +1 -1
- package/dist/components/effects.d.cts +66 -2
- package/dist/components/effects.d.ts +66 -2
- package/dist/components/effects.js +303 -2
- package/dist/components/effects.js.map +1 -1
- package/dist/components/fx.cjs +2 -2
- package/dist/components/fx.cjs.map +1 -1
- package/dist/components/fx.js +2 -2
- package/dist/components/fx.js.map +1 -1
- package/dist/components/lite.cjs +9 -10
- package/dist/components/lite.cjs.map +1 -1
- package/dist/components/lite.js +10 -8
- package/dist/components/lite.js.map +1 -1
- package/dist/components/page.cjs +6 -5
- package/dist/components/page.cjs.map +1 -1
- package/dist/components/page.css +1 -1
- package/dist/components/page.d.cts +4 -3
- package/dist/components/page.d.ts +4 -3
- package/dist/components/page.js +6 -5
- package/dist/components/page.js.map +1 -1
- package/dist/components/solid.d.cts +5 -3
- package/dist/components/solid.d.ts +5 -3
- package/dist/components/svelte.d.cts +5 -3
- package/dist/components/svelte.d.ts +5 -3
- package/dist/components/vue.d.cts +5 -3
- package/dist/components/vue.d.ts +5 -3
- package/dist/components.cjs +2 -5
- package/dist/components.cjs.map +1 -1
- package/dist/components.css +1 -1
- package/dist/components.d.cts +7 -11
- package/dist/components.d.ts +7 -11
- package/dist/components.js +1 -1
- package/dist/components.umd.js +2 -2
- package/dist/components.umd.js.map +1 -1
- package/docs/ROADMAP.md +12 -12
- package/docs/components.md +29 -3
- package/docs/deprecations.md +4 -0
- package/docs/performance.md +1 -1
- package/docs/upgrading-6.md +32 -0
- package/package.json +3 -2
package/dist/components/lite.js
CHANGED
|
@@ -6347,7 +6347,8 @@ function defineCheckbox(tag = 'usa-checkbox') {
|
|
|
6347
6347
|
* `<usa-button>` (button click deformation: squash, wobble, gooey, dent;
|
|
6348
6348
|
* shape morph; submit → loading → success), `<usa-icon-morph>`,
|
|
6349
6349
|
* `<usa-like>`, `<usa-hold>`, `<usa-double-tap>`, `<usa-checkbox>`, plus
|
|
6350
|
-
* `
|
|
6350
|
+
* `haptic()`. 6.0: `burst()`, `confetti()` and `shake()` were removed — play
|
|
6351
|
+
* the registered effects instead: `playEffect(el, 'burst' | 'confetti' | 'shake')`.
|
|
6351
6352
|
*/
|
|
6352
6353
|
/** Register every component of this category under its default tag. */
|
|
6353
6354
|
function defineClickComponents() {
|
|
@@ -7389,7 +7390,7 @@ function defineUiComponents() {
|
|
|
7389
7390
|
|
|
7390
7391
|
var css$e = "";
|
|
7391
7392
|
|
|
7392
|
-
const CURSOR_MODES = ['dot', '
|
|
7393
|
+
const CURSOR_MODES = ['dot', 'magnetic', 'glow'];
|
|
7393
7394
|
function defineCursor(tag = 'usa-cursor') {
|
|
7394
7395
|
return defineElement(tag, (Base) => class UsaCursor extends Base {
|
|
7395
7396
|
constructor() {
|
|
@@ -7410,8 +7411,9 @@ function defineCursor(tag = 'usa-cursor') {
|
|
|
7410
7411
|
this.replaceChildren();
|
|
7411
7412
|
return;
|
|
7412
7413
|
}
|
|
7413
|
-
const
|
|
7414
|
-
const
|
|
7414
|
+
const m = this.str('mode', 'dot');
|
|
7415
|
+
const mode = CURSOR_MODES.includes(m) ? m : 'dot';
|
|
7416
|
+
const n = 1;
|
|
7415
7417
|
this.innerHTML = Array.from({ length: n }, (_, i) => `<span class="usa-cursor-${mode === 'glow' ? 'glow' : 'ring'}" style="--i:${i}"></span>`).join('') + (mode === 'glow' ? '' : '<span class="usa-cursor-dot"></span>');
|
|
7416
7418
|
if (this.str('color'))
|
|
7417
7419
|
this.style.setProperty('--usa-cursor-color', this.str('color'));
|
|
@@ -7431,7 +7433,7 @@ function defineCursor(tag = 'usa-cursor') {
|
|
|
7431
7433
|
let tx = mx;
|
|
7432
7434
|
let ty = my;
|
|
7433
7435
|
pts.forEach((p, i) => {
|
|
7434
|
-
const k = mode === '
|
|
7436
|
+
const k = mode === 'glow' ? 0.12 : 0.22;
|
|
7435
7437
|
const goalX = snap && i === 0 ? snap.left + snap.width / 2 : tx;
|
|
7436
7438
|
const goalY = snap && i === 0 ? snap.top + snap.height / 2 : ty;
|
|
7437
7439
|
p.x += (goalX - p.x) * k;
|
|
@@ -10279,14 +10281,14 @@ const click = [
|
|
|
10279
10281
|
{
|
|
10280
10282
|
name: 'burst',
|
|
10281
10283
|
kind: 'click',
|
|
10282
|
-
description: 'Particle burst from the click point (or the element center).',
|
|
10284
|
+
description: 'Particle burst from the click point (or `x` / `y`, or the element center).',
|
|
10283
10285
|
defaults: { count: 12 },
|
|
10284
10286
|
run: (el, o, ctx) => {
|
|
10285
10287
|
if (ctx.reduced)
|
|
10286
10288
|
return;
|
|
10287
10289
|
const r = el.getBoundingClientRect();
|
|
10288
10290
|
const e = ctx.event;
|
|
10289
|
-
burst(e?.clientX ?? r.left + r.width / 2, e?.clientY ?? r.top + r.height / 2, o);
|
|
10291
|
+
burst(o.x ?? e?.clientX ?? r.left + r.width / 2, o.y ?? e?.clientY ?? r.top + r.height / 2, o);
|
|
10290
10292
|
},
|
|
10291
10293
|
},
|
|
10292
10294
|
{
|
|
@@ -10821,5 +10823,5 @@ function defineComponents(categories) {
|
|
|
10821
10823
|
const STYLE_BASE = new URL('../', import.meta.url).href;
|
|
10822
10824
|
onDemandStyles(STYLE_BASE);
|
|
10823
10825
|
|
|
10824
|
-
export { ALL_TAGS, AMBIENT_EFFECTS, ANIM_ICONS, BRIDGE_PROTOCOL_VERSION, BUILTIN_EFFECTS, BUTTON_DEFORMS, CARD_EFFECTS, CLICK_EFFECTS, COMPONENT_CATEGORIES, CURSOR_MODES, EFFECT_KINDS, EFFECT_TRIGGERS, 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, animateWithMotion, animationBudget, announce, applyMotionTokens, applyNativeSettings, applyPack, auditMotionA11y, autoAnimate, autoDegrade, baselineReport, bindEffect,
|
|
10826
|
+
export { ALL_TAGS, AMBIENT_EFFECTS, ANIM_ICONS, BRIDGE_PROTOCOL_VERSION, BUILTIN_EFFECTS, BUTTON_DEFORMS, CARD_EFFECTS, CLICK_EFFECTS, COMPONENT_CATEGORIES, CURSOR_MODES, EFFECT_KINDS, EFFECT_TRIGGERS, 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, animateWithMotion, animationBudget, announce, applyMotionTokens, applyNativeSettings, applyPack, auditMotionA11y, autoAnimate, autoDegrade, baselineReport, bindEffect, categoryOf, 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, defineFx, defineFxComponents, 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, getEffect, getMotionIntensity, getMotionLevel, getMotionSensitivity, getMotionTokens, glFallbackCss, glGovernor, glQuad, graphemes, haptic, hasEffect, importMotionTokens, interpolatePath, linearEasing, listEffects, liveRegion, loadCategoryStyles, loadedStyles, loadingBar, masonryLayout, mergeMotionTokens, morphPath, morphTo, motionAllowed, motionScale, motionToken, motionTokensToCss, motionTokensToJSON, motionTokensToVars, motionVar, onDemandStyles, onFrame, orientationToTilt, pageTransition, parseDuration, parseEasing, parseNativeSettings, pathsCompatible, pinchScale, playEffect, postFxShader, postToNative, prefersReducedMotion, projectInertia, readScrollProgress, registerBuiltinEffects, registerEffect, registerEffects, requestOrientationPermission, resolveDurationToken, resolveEasingToken, resolvePosition, resolveSpring, restoreMotionIntensity, restoreMotionSensitivity, revealKeyframes, rubberBand, schedulerStats, scrambleFrame, scrollToTarget, setAnimationBudget, setMotionIntensity, setMotionLevel, setMotionSensitivity, setVariant, 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, withoutDeprecations };
|
|
10825
10827
|
//# sourceMappingURL=lite.js.map
|