@ansh-ui/core 0.2.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/LICENSE +21 -0
- package/dist/behaviours.cjs +64 -0
- package/dist/behaviours.cjs.map +1 -0
- package/dist/behaviours.d.cts +3 -0
- package/dist/behaviours.d.ts +3 -0
- package/dist/behaviours.js +7 -0
- package/dist/behaviours.js.map +1 -0
- package/dist/chunk-23GSSIMK.cjs +439 -0
- package/dist/chunk-23GSSIMK.cjs.map +1 -0
- package/dist/chunk-56NNBIAO.js +2446 -0
- package/dist/chunk-56NNBIAO.js.map +1 -0
- package/dist/chunk-6PFYGJWD.cjs +136 -0
- package/dist/chunk-6PFYGJWD.cjs.map +1 -0
- package/dist/chunk-7MEIXWPH.js +313 -0
- package/dist/chunk-7MEIXWPH.js.map +1 -0
- package/dist/chunk-7MYTSAPR.js +83 -0
- package/dist/chunk-7MYTSAPR.js.map +1 -0
- package/dist/chunk-BOQQHICI.js +1036 -0
- package/dist/chunk-BOQQHICI.js.map +1 -0
- package/dist/chunk-C6XPQO2O.js +1170 -0
- package/dist/chunk-C6XPQO2O.js.map +1 -0
- package/dist/chunk-DXJ63QAR.cjs +723 -0
- package/dist/chunk-DXJ63QAR.cjs.map +1 -0
- package/dist/chunk-FAVIEION.js +705 -0
- package/dist/chunk-FAVIEION.js.map +1 -0
- package/dist/chunk-FNR35HTL.cjs +107 -0
- package/dist/chunk-FNR35HTL.cjs.map +1 -0
- package/dist/chunk-GHBRGMSO.cjs +91 -0
- package/dist/chunk-GHBRGMSO.cjs.map +1 -0
- package/dist/chunk-GJRIHN76.cjs +359 -0
- package/dist/chunk-GJRIHN76.cjs.map +1 -0
- package/dist/chunk-ILKUL7GD.cjs +115 -0
- package/dist/chunk-ILKUL7GD.cjs.map +1 -0
- package/dist/chunk-KTUBCQC3.js +409 -0
- package/dist/chunk-KTUBCQC3.js.map +1 -0
- package/dist/chunk-KU2C6GEA.js +90 -0
- package/dist/chunk-KU2C6GEA.js.map +1 -0
- package/dist/chunk-LGA3N3YJ.cjs +413 -0
- package/dist/chunk-LGA3N3YJ.cjs.map +1 -0
- package/dist/chunk-MMO7KO53.cjs +1060 -0
- package/dist/chunk-MMO7KO53.cjs.map +1 -0
- package/dist/chunk-NSXKCJJ7.js +109 -0
- package/dist/chunk-NSXKCJJ7.js.map +1 -0
- package/dist/chunk-QALZKHWH.js +387 -0
- package/dist/chunk-QALZKHWH.js.map +1 -0
- package/dist/chunk-R7UJ7MWP.cjs +2479 -0
- package/dist/chunk-R7UJ7MWP.cjs.map +1 -0
- package/dist/chunk-UJBXY6QC.cjs +1186 -0
- package/dist/chunk-UJBXY6QC.cjs.map +1 -0
- package/dist/chunk-YFQXRC5R.js +99 -0
- package/dist/chunk-YFQXRC5R.js.map +1 -0
- package/dist/color.cjs +257 -0
- package/dist/color.cjs.map +1 -0
- package/dist/color.d.cts +303 -0
- package/dist/color.d.ts +303 -0
- package/dist/color.js +8 -0
- package/dist/color.js.map +1 -0
- package/dist/easing.cjs +189 -0
- package/dist/easing.cjs.map +1 -0
- package/dist/easing.d.cts +134 -0
- package/dist/easing.d.ts +134 -0
- package/dist/easing.js +4 -0
- package/dist/easing.js.map +1 -0
- package/dist/effects.cjs +99 -0
- package/dist/effects.cjs.map +1 -0
- package/dist/effects.d.cts +5 -0
- package/dist/effects.d.ts +5 -0
- package/dist/effects.js +10 -0
- package/dist/effects.js.map +1 -0
- package/dist/index-CCdpefMp.d.ts +967 -0
- package/dist/index-CQEEPu-D.d.ts +435 -0
- package/dist/index-DHOfsEIn.d.cts +967 -0
- package/dist/index-Dl8GCsya.d.cts +435 -0
- package/dist/index.cjs +2206 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1122 -0
- package/dist/index.d.ts +1122 -0
- package/dist/index.js +1182 -0
- package/dist/index.js.map +1 -0
- package/dist/math.cjs +238 -0
- package/dist/math.cjs.map +1 -0
- package/dist/math.d.cts +120 -0
- package/dist/math.d.ts +120 -0
- package/dist/math.js +5 -0
- package/dist/math.js.map +1 -0
- package/dist/noise.cjs +78 -0
- package/dist/noise.cjs.map +1 -0
- package/dist/noise.d.cts +190 -0
- package/dist/noise.d.ts +190 -0
- package/dist/noise.js +5 -0
- package/dist/noise.js.map +1 -0
- package/dist/palette-6HkVltYU.d.cts +219 -0
- package/dist/palette-6HkVltYU.d.ts +219 -0
- package/dist/random--4mSc5Lp.d.cts +75 -0
- package/dist/random--4mSc5Lp.d.ts +75 -0
- package/dist/reduced-motion-D0LUgZle.d.cts +120 -0
- package/dist/reduced-motion-D0LUgZle.d.ts +120 -0
- package/dist/types-B1FLLf3-.d.cts +21 -0
- package/dist/types-B1FLLf3-.d.ts +21 -0
- package/package.json +78 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/spring/solver.ts","../src/spring/presets.ts","../src/kernel/lifecycle.ts","../src/motion/motion-value.ts","../src/motion/interpolate.ts","../src/motion/sampler.ts","../src/motion/animate.ts","../src/motion/timeline.ts","../src/observers/scroll.ts","../src/index.ts"],"names":["power","solver","steps"],"mappings":";;;;;;;;;;;;;;;;;;;AAsFO,IAAM,eAAA,GAAkB;AAAA,EAC7B,SAAA,EAAW,GAAA;AAAA,EACX,OAAA,EAAS,EAAA;AAAA,EACT,IAAA,EAAM,CAAA;AAAA,EACN,QAAA,EAAU,GAAA;AAAA,EACV,MAAA,EAAQ,CAAA;AAAA,EACR,SAAA,EAAW,IAAA;AAAA,EACX,SAAA,EAAW,IAAA;AAAA,EACX,IAAA,EAAM,CAAA;AAAA,EACN,EAAA,EAAI,CAAA;AAAA,EACJ,QAAA,EAAU;AACZ;AAGA,IAAM,YAAA,GAAe,EAAA;AAkBrB,IAAM,iBAAA,GAAoB,EAAA;AAEnB,SAAS,oBAAA,CACd,QAAA,EACA,MAAA,EACA,IAAA,GAAO,CAAA,EAC0B;AACjC,EAAA,MAAM,YAAA,GAAe,IAAA,CAAK,GAAA,CAAI,IAAA,EA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AY;AAAA,EACd,CAAA;AACF;;;AC1NO,IAAM,OAAA,GAAU","file":"index.js","sourcesContent":["import { clamp } from '../math/scalar'\n\n/**\n * Spring physics, solved analytically.\n *\n * Most libraries integrate springs numerically, stepping the ODE once per frame. That is\n * simple but has two real drawbacks: the result depends on frame rate (a dropped frame\n * changes the motion), and you cannot *seek* — asking \"where is this spring at t = 0.4s?\"\n * requires replaying every frame up to that point.\n *\n * Ansh solves the damped harmonic oscillator in closed form instead:\n *\n * y'' + 2ζω₀y' + ω₀²y = 0\n *\n * where `y` is displacement from the target, `ω₀` is the undamped angular frequency and `ζ`\n * is the damping ratio. That gives an exact position and velocity for any `t`, which makes\n * springs frame-rate independent, seekable, reversible, and placeable on a timeline.\n */\n\n/** Physical parameterisation — think in terms of the mass-spring-damper system. */\nexport interface PhysicalSpringOptions {\n /** Spring constant. Higher is snappier. Default `170`. */\n stiffness?: number\n /** Damping coefficient. Higher settles sooner with less oscillation. Default `26`. */\n damping?: number\n /** Mass of the attached body. Higher is more sluggish. Default `1`. */\n mass?: number\n}\n\n/**\n * Perceptual parameterisation — think in terms of how the motion *reads*.\n *\n * This is almost always the better API for designers, and it is what Apple's\n * `spring(duration:bounce:)` exposes. We use the same mapping so values transfer between\n * SwiftUI and Ansh unchanged.\n */\nexport interface PerceptualSpringOptions {\n /** Approximate settling time in seconds. Default `0.6`. */\n duration?: number\n /**\n * Bounciness in `[-1, 1]`.\n *\n * - `0` — critically damped: reaches the target as fast as possible with no overshoot.\n * - `> 0` — underdamped: overshoots and oscillates. `0.3` is lively, `0.7` is springy.\n * - `< 0` — overdamped: creeps in slowly. Useful for heavy, weighty motion.\n *\n * Default `0`.\n */\n bounce?: number\n}\n\nexport interface SpringRestOptions {\n /** Distance from target below which the spring is considered settled. Default `0.01`. */\n restDelta?: number\n /** Speed below which the spring is considered settled. Default `0.01`. */\n restSpeed?: number\n}\n\nexport interface SpringOptions\n extends PhysicalSpringOptions, PerceptualSpringOptions, SpringRestOptions {\n /** Starting position. Default `0`. */\n from?: number\n /** Target position. Default `1`. */\n to?: number\n /** Initial velocity in units per second. Default `0`. */\n velocity?: number\n}\n\nexport interface SpringState {\n position: number\n velocity: number\n /** `true` once both displacement and speed are inside the rest thresholds. */\n done: boolean\n}\n\nexport interface SpringSolver {\n /** Exact state at time `t` (seconds since the spring started). */\n at(t: number): SpringState\n /** Estimated time in seconds until the spring settles. Capped at 10s. */\n readonly duration: number\n /** Resolved damping ratio ζ. `< 1` underdamped, `= 1` critical, `> 1` overdamped. */\n readonly dampingRatio: number\n /** Resolved undamped angular frequency ω₀ in radians per second. */\n readonly angularFrequency: number\n}\n\nexport const SPRING_DEFAULTS = {\n stiffness: 170,\n damping: 26,\n mass: 1,\n duration: 0.6,\n bounce: 0,\n restDelta: 0.01,\n restSpeed: 0.01,\n from: 0,\n to: 1,\n velocity: 0,\n} as const\n\n/** Hard cap on estimated duration, so a barely-damped spring can't stall a timeline forever. */\nconst MAX_DURATION = 10\n\n/**\n * Convert a perceptual `{ duration, bounce }` pair into physical constants.\n *\n * Mapping (matching Apple's):\n * ω₀ = 2π / duration\n * ζ = 1 - bounce for bounce ≥ 0 (bounce 0 → critical, 1 → undamped)\n * ζ = 1 / (1 + bounce) for bounce < 0 (bounce -0.5 → ζ = 2, heavily overdamped)\n * k = ω₀²m, c = 2ζω₀m\n */\n/**\n * Largest damping ratio the mapping will produce.\n *\n * `bounce = -1` maps to `ζ = 1/(1 + b)`, which is a division by zero — and any ζ beyond about 20 is\n * indistinguishable from \"does not move\" anyway. Capping keeps the whole documented `[-1, 1]` range\n * usable instead of leaving one endpoint that silently produces `NaN` positions.\n */\nconst MAX_DAMPING_RATIO = 20\n\nexport function perceptualToPhysical(\n duration: number,\n bounce: number,\n mass = 1,\n): Required<PhysicalSpringOptions> {\n const safeDuration = Math.max(0.01, duration)\n const b = clamp(bounce, -1, 1)\n const dampingRatio =\n b >= 0 ? 1 - b : Math.min(MAX_DAMPING_RATIO, 1 / Math.max(1 / MAX_DAMPING_RATIO, 1 + b))\n const omega = (2 * Math.PI) / safeDuration\n return {\n stiffness: omega * omega * mass,\n damping: 2 * dampingRatio * omega * mass,\n mass,\n }\n}\n\n/** The inverse of {@link perceptualToPhysical}. */\nexport function physicalToPerceptual(\n stiffness: number,\n damping: number,\n mass = 1,\n): Required<PerceptualSpringOptions> {\n const omega = Math.sqrt(stiffness / mass)\n const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass))\n return {\n duration: (2 * Math.PI) / omega,\n bounce: dampingRatio <= 1 ? 1 - dampingRatio : 1 / dampingRatio - 1,\n }\n}\n\n/**\n * Build a closed-form solver for the given spring.\n *\n * If `duration` or `bounce` is supplied, the perceptual parameterisation wins and\n * `stiffness`/`damping` are ignored — mixing the two is always a mistake, and silently\n * preferring one is friendlier than throwing at runtime inside a render.\n */\nexport function createSpring(options: SpringOptions = {}): SpringSolver {\n const mass = Math.max(0.01, options.mass ?? SPRING_DEFAULTS.mass)\n const usesPerceptual = options.duration !== undefined || options.bounce !== undefined\n\n const { stiffness, damping } = usesPerceptual\n ? perceptualToPhysical(\n options.duration ?? SPRING_DEFAULTS.duration,\n options.bounce ?? SPRING_DEFAULTS.bounce,\n mass,\n )\n : {\n stiffness: Math.max(0.01, options.stiffness ?? SPRING_DEFAULTS.stiffness),\n damping: Math.max(0, options.damping ?? SPRING_DEFAULTS.damping),\n }\n\n const from = options.from ?? SPRING_DEFAULTS.from\n const to = options.to ?? SPRING_DEFAULTS.to\n const v0 = options.velocity ?? SPRING_DEFAULTS.velocity\n const restDelta = Math.max(1e-9, options.restDelta ?? SPRING_DEFAULTS.restDelta)\n const restSpeed = Math.max(1e-9, options.restSpeed ?? SPRING_DEFAULTS.restSpeed)\n\n const omega0 = Math.sqrt(stiffness / mass)\n const zeta = damping / (2 * Math.sqrt(stiffness * mass))\n const delta = to - from\n\n // `y` is displacement from the target: y(0) = to - from, y'(0) = -v₀.\n // Position is therefore `to - y(t)` and velocity is `-y'(t)`.\n let evaluate: (t: number) => { y: number; dy: number }\n\n if (delta === 0 && v0 === 0) {\n // Already at rest at the target. Avoids dividing by a zero damped frequency below.\n evaluate = () => ({ y: 0, dy: 0 })\n } else if (zeta < 1 - 1e-9) {\n // --- Underdamped: oscillates within an exponential envelope. ---\n const omegaD = omega0 * Math.sqrt(1 - zeta * zeta)\n const c1 = delta\n const c2 = (-v0 + zeta * omega0 * delta) / omegaD\n evaluate = (t) => {\n const envelope = Math.exp(-zeta * omega0 * t)\n const cos = Math.cos(omegaD * t)\n const sin = Math.sin(omegaD * t)\n const y = envelope * (c1 * cos + c2 * sin)\n const dy =\n envelope * (-zeta * omega0 * (c1 * cos + c2 * sin) + omegaD * (c2 * cos - c1 * sin))\n return { y, dy }\n }\n } else if (zeta <= 1 + 1e-9) {\n // --- Critically damped: fastest approach with no overshoot. ---\n const c1 = delta\n const c2 = -v0 + omega0 * delta\n evaluate = (t) => {\n const envelope = Math.exp(-omega0 * t)\n const y = envelope * (c1 + c2 * t)\n const dy = envelope * (c2 - omega0 * (c1 + c2 * t))\n return { y, dy }\n }\n } else {\n // --- Overdamped: two distinct real roots, expressed with hyperbolics for stability. ---\n const s = omega0 * Math.sqrt(zeta * zeta - 1)\n const c1 = delta\n const c2 = (-v0 + zeta * omega0 * delta) / s\n evaluate = (t) => {\n const envelope = Math.exp(-zeta * omega0 * t)\n const cosh = Math.cosh(s * t)\n const sinh = Math.sinh(s * t)\n const y = envelope * (c1 * cosh + c2 * sinh)\n const dy = envelope * (-zeta * omega0 * (c1 * cosh + c2 * sinh) + s * (c1 * sinh + c2 * cosh))\n return { y, dy }\n }\n }\n\n const at = (t: number): SpringState => {\n if (t <= 0) return { position: from, velocity: v0, done: false }\n const { y, dy } = evaluate(t)\n const position = to - y\n const velocity = -dy\n const done = Math.abs(y) <= restDelta && Math.abs(velocity) <= restSpeed\n // Snap once settled so the value lands exactly on target rather than at 0.9999.\n return done ? { position: to, velocity: 0, done: true } : { position, velocity, done: false }\n }\n\n return {\n at,\n duration: estimateDuration(at),\n dampingRatio: zeta,\n angularFrequency: omega0,\n }\n}\n\n/**\n * Estimate settling time by sampling forward.\n *\n * We coarse-search at 1/60s to find the first settled frame, then binary-search the interval\n * before it to refine. That is far cheaper than sampling the whole range finely, and accurate\n * to within a millisecond — enough for timeline layout.\n */\nfunction estimateDuration(at: (t: number) => SpringState): number {\n const STEP = 1 / 60\n let t = 0\n let previous = 0\n\n while (t < MAX_DURATION) {\n previous = t\n t += STEP\n if (at(t).done) break\n }\n\n if (t >= MAX_DURATION) return MAX_DURATION\n\n let low = previous\n let high = t\n for (let i = 0; i < 12; i++) {\n const mid = (low + high) / 2\n if (at(mid).done) high = mid\n else low = mid\n }\n return high\n}\n\n/**\n * Momentum / inertial decay — the \"flick and let go\" motion behind momentum scrolling.\n *\n * Velocity decays exponentially with a time constant of `power * 1000 / decay`, and the\n * resting point is derived from the initial velocity, so a harder flick travels further.\n */\nexport interface DecayOptions {\n from?: number\n velocity?: number\n /** How far a given velocity carries. Default `0.8`. */\n power?: number\n /** Exponential decay rate. Higher stops sooner. Default `0.325`. */\n timeConstant?: number\n /** Stop when within this distance of the resting point. Default `0.5`. */\n restDelta?: number\n /** Optional clamp on the resting point, e.g. scroll bounds. */\n min?: number\n max?: number\n}\n\nexport function createDecay(options: DecayOptions = {}) {\n const from = options.from ?? 0\n const velocity = options.velocity ?? 0\n const power = options.power ?? 0.8\n const timeConstant = options.timeConstant ?? 0.325\n const restDelta = options.restDelta ?? 0.5\n\n const amplitude = power * velocity\n let target = from + amplitude\n if (options.min !== undefined) target = Math.max(options.min, target)\n if (options.max !== undefined) target = Math.min(options.max, target)\n const resolvedAmplitude = target - from\n\n const at = (t: number): SpringState => {\n if (t <= 0) return { position: from, velocity, done: false }\n const decayFactor = Math.exp(-t / timeConstant)\n const position = target - resolvedAmplitude * decayFactor\n const currentVelocity = (resolvedAmplitude / timeConstant) * decayFactor\n const done = Math.abs(target - position) <= restDelta\n return done\n ? { position: target, velocity: 0, done: true }\n : { position, velocity: currentVelocity, done: false }\n }\n\n return { at, duration: estimateDuration(at), target }\n}\n","import type { SpringOptions } from './solver'\n\n/**\n * Named spring presets.\n *\n * These exist so that a team can agree on \"use `snappy` for menus\" rather than negotiating\n * stiffness values in code review. They are expressed perceptually (`duration`/`bounce`)\n * because that is the vocabulary a designer can reason about.\n */\nexport const springs = {\n /** No overshoot, quick. The safe default for UI state changes. */\n default: { duration: 0.5, bounce: 0 },\n /** Fast and crisp. Menus, dropdowns, toggles. */\n snappy: { duration: 0.35, bounce: 0.15 },\n /** Lively overshoot. Playful confirmations, likes, badges. */\n bouncy: { duration: 0.6, bounce: 0.4 },\n /** Slow, deliberate, weighty. Large surfaces and sheets. */\n heavy: { duration: 0.9, bounce: -0.2 },\n /** Barely-there motion for micro-interactions. */\n subtle: { duration: 0.25, bounce: 0 },\n /** Long, luxurious settle. Hero content and page transitions. */\n cinematic: { duration: 1.2, bounce: 0.1 },\n /** Rubber-band feel for drag release. */\n elastic: { duration: 0.8, bounce: 0.65 },\n /** Molasses. Deliberately sluggish — use for depth cues, not for controls. */\n molasses: { duration: 1.6, bounce: -0.4 },\n} satisfies Record<string, SpringOptions>\n\nexport type SpringPresetName = keyof typeof springs\n\n/** Accept a preset name or an explicit options object anywhere a spring is configured. */\nexport type SpringInput = SpringPresetName | SpringOptions\n\nexport function resolveSpringOptions(input: SpringInput | undefined): SpringOptions {\n if (input === undefined) return springs.default\n if (typeof input === 'string') return springs[input] ?? springs.default\n return input\n}\n","import type { Ticker } from './ticker'\nimport type { Unsubscribe } from './types'\n\n/**\n * Environment-driven pausing.\n *\n * Animation that runs while nobody is looking is pure waste: it drains battery, heats the\n * device, and on a laptop spins the fan for a page in a background tab. This module wires the\n * ticker to the signals that tell us animation is pointless or unwelcome.\n *\n * Each signal holds a named pause on the ticker, so they compose — being both hidden and\n * battery-saving means two holds, and restoring one doesn't resume prematurely.\n */\n\nexport interface LifecycleOptions {\n /** Pause while the document is hidden. Default `true`. */\n pauseWhenHidden?: boolean\n /**\n * Pause while the window has no focus.\n *\n * Off by default: a user with the page visible in a split-screen alongside their editor\n * still expects to see the animation. Only worth enabling for genuinely heavy scenes.\n */\n pauseWhenBlurred?: boolean\n /**\n * Reduce quality when the device reports low battery while discharging. Default `true`.\n *\n * The Battery Status API is only exposed in Chromium; where unavailable this is a no-op\n * rather than an approximation, because guessing wrong either wastes power or degrades\n * quality for no reason.\n */\n respectBattery?: boolean\n /** Battery level below which quality is reduced, in `[0, 1]`. Default `0.2`. */\n batteryThreshold?: number\n /** Quality ceiling applied while on low battery. Default `0.5`. */\n batterySaveQuality?: number\n}\n\ninterface BatteryManagerLike {\n level: number\n charging: boolean\n addEventListener(type: string, listener: () => void): void\n removeEventListener(type: string, listener: () => void): void\n}\n\n/**\n * Attach environment listeners to a ticker.\n *\n * @returns A cleanup function that removes every listener. Safe to call during SSR, where it\n * is a no-op — nothing is attached in the first place.\n */\nexport function attachLifecycle(ticker: Ticker, options: LifecycleOptions = {}): Unsubscribe {\n if (typeof document === 'undefined' || typeof window === 'undefined') return () => {}\n\n const pauseWhenHidden = options.pauseWhenHidden ?? true\n const pauseWhenBlurred = options.pauseWhenBlurred ?? false\n const respectBattery = options.respectBattery ?? true\n const threshold = options.batteryThreshold ?? 0.2\n const saveQuality = options.batterySaveQuality ?? 0.5\n\n const cleanups: Array<() => void> = []\n\n if (pauseWhenHidden) {\n const onVisibility = () => {\n if (document.hidden) ticker.pause('document-hidden')\n else ticker.resume('document-hidden')\n }\n document.addEventListener('visibilitychange', onVisibility)\n cleanups.push(() => document.removeEventListener('visibilitychange', onVisibility))\n // Apply the current state immediately — the page may already be hidden at mount time,\n // for example when opened in a background tab.\n onVisibility()\n }\n\n if (pauseWhenBlurred) {\n const onBlur = () => ticker.pause('window-blurred')\n const onFocus = () => ticker.resume('window-blurred')\n window.addEventListener('blur', onBlur)\n window.addEventListener('focus', onFocus)\n cleanups.push(() => {\n window.removeEventListener('blur', onBlur)\n window.removeEventListener('focus', onFocus)\n })\n }\n\n if (respectBattery) {\n const getBattery = (navigator as Navigator & { getBattery?: () => Promise<BatteryManagerLike> })\n .getBattery\n\n if (typeof getBattery === 'function') {\n let battery: BatteryManagerLike | null = null\n let disposed = false\n\n const apply = () => {\n if (!battery) return\n const saving = !battery.charging && battery.level <= threshold\n if (saving) ticker.lockQuality(saveQuality)\n }\n\n getBattery\n .call(navigator)\n .then((manager) => {\n if (disposed) return\n battery = manager\n manager.addEventListener('levelchange', apply)\n manager.addEventListener('chargingchange', apply)\n cleanups.push(() => {\n manager.removeEventListener('levelchange', apply)\n manager.removeEventListener('chargingchange', apply)\n })\n apply()\n })\n .catch(() => {\n // Permission denied or the API is gated. Nothing to do — adaptive quality still\n // handles the actual symptom (slow frames) regardless of the cause.\n })\n\n cleanups.push(() => {\n disposed = true\n })\n }\n }\n\n return () => {\n for (const cleanup of cleanups) cleanup()\n cleanups.length = 0\n }\n}\n","import { now } from '../kernel/ticker'\nimport type { Unsubscribe } from '../kernel/types'\n\n/**\n * An observable animated value.\n *\n * `MotionValue` is the interop currency of Ansh. It deliberately sits *outside* any\n * framework's reactivity system, which is what lets one engine serve React, Vue and vanilla\n * JS without adapters in the middle:\n *\n * - React subscribes with `useSyncExternalStore` (or writes straight to the DOM, bypassing\n * re-renders entirely — the reason 60 FPS animation in React is possible at all).\n * - Vue wraps it in a `shallowRef`.\n * - Plain JS just calls `.on()`.\n *\n * Velocity tracking is built in because it is needed constantly (a spring that takes over from\n * a drag must inherit the drag's velocity) and reconstructing it after the fact is lossy.\n */\n\nexport type MotionValueListener<T> = (value: T, previous: T) => void\n\n/** Velocity is only meaningful for numbers; other types report 0. */\nconst VELOCITY_SAMPLE_WINDOW_MS = 100\n\nexport class MotionValue<T = number> {\n private current: T\n private previous: T\n private listeners = new Set<MotionValueListener<T>>()\n private renderListeners = new Set<(value: T) => void>()\n\n /** Timestamp and value of the last update, for velocity. */\n private lastUpdated = 0\n private lastValue: T\n private velocityValue = 0\n\n /** Set while an `animate()` drives this value, so a new animation can cancel the old one. */\n private stopAnimation: (() => void) | null = null\n\n constructor(initial: T) {\n this.current = initial\n this.previous = initial\n this.lastValue = initial\n this.lastUpdated = now()\n }\n\n get(): T {\n return this.current\n }\n\n getPrevious(): T {\n return this.previous\n }\n\n /**\n * Write a new value and notify subscribers.\n *\n * Notification is synchronous. That is a deliberate choice: this is called from inside the\n * ticker's `write` phase, and deferring would push DOM writes into the next frame, adding a\n * frame of latency to every animation.\n */\n set(value: T): void {\n if (value === this.current) return\n\n this.previous = this.current\n this.current = value\n\n this.updateVelocity(value)\n\n // Render listeners first — they do the visible work, and should not wait behind\n // application logic that may be doing something expensive.\n for (const listener of this.renderListeners) listener(value)\n for (const listener of this.listeners) listener(value, this.previous)\n }\n\n /**\n * Write without notifying, then notify once.\n * Used when several related values change together and should produce one visual update.\n */\n setSilent(value: T): void {\n this.previous = this.current\n this.current = value\n this.updateVelocity(value)\n }\n\n private updateVelocity(value: T): void {\n if (typeof value !== 'number' || typeof this.lastValue !== 'number') return\n\n const timestamp = now()\n const elapsed = timestamp - this.lastUpdated\n\n // Ignore samples closer together than a millisecond: the division amplifies timer noise\n // into absurd velocities, which then get handed to a spring.\n if (elapsed > 1) {\n this.velocityValue = ((value - (this.lastValue as number)) / elapsed) * 1000\n this.lastValue = value\n this.lastUpdated = timestamp\n } else if (elapsed > VELOCITY_SAMPLE_WINDOW_MS) {\n // The value has been idle; velocity is genuinely zero rather than stale.\n this.velocityValue = 0\n }\n }\n\n /**\n * Current velocity in units per second.\n *\n * Returns 0 if the value hasn't changed recently, so a spring picking up from rest doesn't\n * inherit a phantom velocity from an interaction that ended a second ago.\n */\n getVelocity(): number {\n if (now() - this.lastUpdated > VELOCITY_SAMPLE_WINDOW_MS) return 0\n return this.velocityValue\n }\n\n /** Directly set velocity — used when handing off from a gesture to a spring. */\n setVelocity(velocity: number): void {\n this.velocityValue = velocity\n this.lastUpdated = now()\n }\n\n /** Subscribe to changes. The listener is *not* called immediately. */\n on(listener: MotionValueListener<T>): Unsubscribe {\n this.listeners.add(listener)\n return () => this.listeners.delete(listener)\n }\n\n /**\n * Subscribe as a renderer — called before regular listeners.\n *\n * Framework bindings use this for the DOM write, so that visual output is never delayed by\n * application-level subscribers.\n */\n onRender(listener: (value: T) => void): Unsubscribe {\n this.renderListeners.add(listener)\n return () => this.renderListeners.delete(listener)\n }\n\n get listenerCount(): number {\n return this.listeners.size + this.renderListeners.size\n }\n\n /**\n * Register the currently-running animation so a subsequent one can interrupt it.\n * Called by `animate()`; not part of the public surface.\n */\n attachAnimation(stop: () => void): void {\n this.stopAnimation?.()\n this.stopAnimation = stop\n }\n\n /** Stop whatever is animating this value, leaving it wherever it is. */\n stop(): void {\n this.stopAnimation?.()\n this.stopAnimation = null\n }\n\n get isAnimating(): boolean {\n return this.stopAnimation !== null\n }\n\n /** Release listeners and stop any animation. */\n destroy(): void {\n this.stop()\n this.listeners.clear()\n this.renderListeners.clear()\n }\n}\n\nexport function motionValue<T>(initial: T): MotionValue<T> {\n return new MotionValue<T>(initial)\n}\n\n/** Maps a tuple of value types to a tuple of MotionValues holding them. */\nexport type MotionValueTuple<Values extends readonly unknown[]> = {\n [K in keyof Values]: MotionValue<Values[K]>\n}\n\n/**\n * A read-only value computed from one or more others.\n *\n * The derived value updates synchronously when any source changes, so a chain of transforms\n * settles within a single frame rather than propagating one link per frame.\n */\nexport function derived<Values extends readonly unknown[], Result>(\n sources: MotionValueTuple<Values>,\n compute: (...values: Values) => Result,\n): MotionValue<Result> & { destroy(): void } {\n const read = (): Values => sources.map((s) => s.get()) as unknown as Values\n const output = new MotionValue<Result>(compute(...read()))\n\n const unsubscribes = (sources as readonly MotionValue<unknown>[]).map((source) =>\n source.on(() => {\n output.set(compute(...read()))\n }),\n )\n\n const originalDestroy = output.destroy.bind(output)\n output.destroy = () => {\n for (const unsubscribe of unsubscribes) unsubscribe()\n originalDestroy()\n }\n\n return output as MotionValue<Result> & { destroy(): void }\n}\n\n/**\n * Map one motion value through a function.\n * Shorthand for the overwhelmingly common single-source case.\n */\nexport function mapValue<In, Out>(\n source: MotionValue<In>,\n transform: (value: In) => Out,\n): MotionValue<Out> & { destroy(): void } {\n const output = new MotionValue<Out>(transform(source.get()))\n const unsubscribe = source.on((value) => output.set(transform(value)))\n\n const originalDestroy = output.destroy.bind(output)\n output.destroy = () => {\n unsubscribe()\n originalDestroy()\n }\n return output as MotionValue<Out> & { destroy(): void }\n}\n","import { lerp } from '../math/scalar'\nimport { mixParsed } from '../color/interpolate'\nimport { parseColor, tryParseColor } from '../color/parse'\nimport { toRgbString } from '../color/format'\nimport type { ColorSpace } from '../color/types'\n\n/**\n * Generic value interpolation.\n *\n * `animate()` accepts numbers, colours, arrays, objects and unit strings, so it needs to pick\n * an interpolator at runtime. Resolution happens **once**, at animation setup, and returns a\n * closure — never per frame. A `typeof` check inside a frame loop that runs for every animated\n * property on the page is exactly the sort of cost that quietly adds up to a dropped frame.\n */\n\nexport type Interpolator<T> = (t: number) => T\n\nexport interface InterpolateOptions {\n /** Colour space for colour interpolation. Default `'oklab'`. */\n colorSpace?: ColorSpace\n}\n\n/** Numeric interpolation. The fast path, and by far the most common. */\nexport function interpolateNumber(from: number, to: number): Interpolator<number> {\n const delta = to - from\n return (t) => from + delta * t\n}\n\n/**\n * Colour interpolation, producing `rgb()`/`rgba()` strings ready for style assignment.\n *\n * Endpoints are parsed at setup, so per-frame cost is one mix plus one string build.\n */\nexport function interpolateColor(\n from: string,\n to: string,\n space: ColorSpace = 'oklab',\n): Interpolator<string> {\n const a = parseColor(from)\n const b = parseColor(to)\n const options = { space }\n return (t) => toRgbString(mixParsed(a, b, t, options))\n}\n\n/**\n * A CSS value that is a number with a unit — `\"12px\"`, `\"1.5rem\"`, `\"45deg\"`, `\"50%\"`.\n *\n * Mismatched units cannot be interpolated numerically (`0px → 100%` depends on layout), so we\n * snap at the midpoint rather than producing nonsense. Snapping is visible but honest; silently\n * treating `100%` as `100px` would be a subtle layout bug.\n */\nconst UNIT_PATTERN = /^(-?[\\d.]+)([a-z%]*)$/i\n\nexport function interpolateUnitValue(from: string, to: string): Interpolator<string> | null {\n const fromMatch = UNIT_PATTERN.exec(from.trim())\n const toMatch = UNIT_PATTERN.exec(to.trim())\n if (!fromMatch || !toMatch) return null\n\n const fromValue = Number.parseFloat(fromMatch[1])\n const toValue = Number.parseFloat(toMatch[1])\n if (!Number.isFinite(fromValue) || !Number.isFinite(toValue)) return null\n\n const fromUnit = fromMatch[2]\n const toUnit = toMatch[2]\n\n if (fromUnit !== toUnit) {\n // A zero value is unit-agnostic, so `0 → 100%` is unambiguous and safe to interpolate.\n if (fromValue === 0) return (t) => `${toValue * t}${toUnit}`\n if (toValue === 0) return (t) => `${fromValue * (1 - t)}${fromUnit}`\n return (t) => (t < 0.5 ? from : to)\n }\n\n const delta = toValue - fromValue\n return (t) => `${fromValue + delta * t}${fromUnit}`\n}\n\n/**\n * Interpolate strings containing any number of embedded numbers, preserving the surrounding\n * text — `\"blur(0px) brightness(1)\"` → `\"blur(8px) brightness(1.4)\"`.\n *\n * This is what makes `filter`, `box-shadow`, `transform` and SVG `path` data animatable without\n * a per-property parser. The structure must match: same non-numeric text, same count of numbers.\n * When it doesn't, we return `null` and the caller falls back to a discrete swap.\n */\nconst NUMBER_PATTERN = /-?\\d*\\.?\\d+(?:e[+-]?\\d+)?/gi\n\nexport function interpolateNumericString(from: string, to: string): Interpolator<string> | null {\n const fromNumbers = from.match(NUMBER_PATTERN)\n const toNumbers = to.match(NUMBER_PATTERN)\n\n if (!fromNumbers || !toNumbers || fromNumbers.length !== toNumbers.length) return null\n\n // The template is the source string with each number replaced by a placeholder.\n const template = from.split(NUMBER_PATTERN)\n if (template.length !== fromNumbers.length + 1) return null\n\n // Require identical surrounding text, otherwise we'd be blending `blur()` into `saturate()`.\n const toTemplate = to.split(NUMBER_PATTERN)\n for (let i = 0; i < template.length; i++) {\n if (template[i] !== toTemplate[i]) return null\n }\n\n const fromValues = fromNumbers.map(Number)\n const toValues = toNumbers.map(Number)\n if (fromValues.some(Number.isNaN) || toValues.some(Number.isNaN)) return null\n\n const count = fromValues.length\n\n return (t) => {\n let out = ''\n for (let i = 0; i < count; i++) {\n out += template[i]\n // Round to 4 decimals: more precision is invisible and bloats the style string, which\n // the browser has to re-parse on every assignment.\n out += round(lerp(fromValues[i], toValues[i], t))\n }\n return out + template[count]\n }\n}\n\nfunction round(value: number): number {\n return Math.round(value * 10000) / 10000\n}\n\n/** Element-wise array interpolation. Length is taken from `from`. */\nexport function interpolateArray<T>(\n from: readonly T[],\n to: readonly T[],\n options?: InterpolateOptions,\n): Interpolator<T[]> {\n const interpolators = from.map((value, i) =>\n resolveInterpolator(value, (to[i] ?? value) as T, options),\n )\n return (t) => interpolators.map((fn) => fn(t)) as T[]\n}\n\n/** Key-wise object interpolation. Keys absent from `to` hold their `from` value. */\nexport function interpolateObject<T extends Record<string, unknown>>(\n from: T,\n to: Partial<T>,\n options?: InterpolateOptions,\n): Interpolator<T> {\n const keys = Object.keys(from) as Array<keyof T>\n const interpolators = new Map<keyof T, Interpolator<unknown>>()\n\n for (const key of keys) {\n const target = to[key] ?? from[key]\n interpolators.set(key, resolveInterpolator(from[key], target, options))\n }\n\n return (t) => {\n const out = {} as T\n for (const key of keys) {\n out[key] = interpolators.get(key)!(t) as T[keyof T]\n }\n return out\n }\n}\n\n/**\n * Pick the right interpolator for a pair of values.\n *\n * Order matters. Colours are checked before generic unit/numeric strings because\n * `rgb(0, 0, 0)` would otherwise match the numeric-string path and get interpolated in sRGB,\n * silently losing the perceptual blending that is the whole point of the colour engine.\n */\nexport function resolveInterpolator<T>(\n from: T,\n to: T,\n options?: InterpolateOptions,\n): Interpolator<T> {\n if (typeof from === 'number' && typeof to === 'number') {\n return interpolateNumber(from, to) as Interpolator<T>\n }\n\n if (typeof from === 'string' && typeof to === 'string') {\n if (looksLikeColor(from) && looksLikeColor(to)) {\n return interpolateColor(from, to, options?.colorSpace) as Interpolator<T>\n }\n const unit = interpolateUnitValue(from, to)\n if (unit) return unit as Interpolator<T>\n\n const numeric = interpolateNumericString(from, to)\n if (numeric) return numeric as Interpolator<T>\n\n // Nothing structural in common — swap at the midpoint.\n return ((t: number) => (t < 0.5 ? from : to)) as Interpolator<T>\n }\n\n if (Array.isArray(from) && Array.isArray(to)) {\n return interpolateArray(from, to, options) as Interpolator<T>\n }\n\n if (isPlainObject(from) && isPlainObject(to)) {\n return interpolateObject(from, to, options) as unknown as Interpolator<T>\n }\n\n // Booleans, null, functions, mismatched types: discrete.\n return ((t: number) => (t < 0.5 ? from : to)) as Interpolator<T>\n}\n\n/**\n * Cheap pre-filter before attempting a full colour parse.\n *\n * Parsing throws on failure and building an exception per animated property at setup would be\n * slow and noisy in the debugger. This rules out the obvious non-colours first.\n */\nfunction looksLikeColor(value: string): boolean {\n const v = value.trim()\n if (v.startsWith('#')) return true\n if (/^(rgb|hsl|hsv|hsb|oklch|oklab|lab|lch|color)a?\\(/i.test(v)) return true\n if (v === 'transparent' || v === 'currentcolor') return true\n // A bare word could be a colour keyword; confirm against the table rather than guessing.\n if (/^[a-z]+$/i.test(v)) return tryParseColor(v) !== null\n return false\n}\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n\n/**\n * Interpolate through a series of keyframes.\n *\n * `offsets` default to even spacing. Segment interpolators are built once at setup, so a\n * 20-keyframe animation costs the same per frame as a 2-keyframe one plus a short scan.\n */\nexport function interpolateKeyframes<T>(\n values: readonly T[],\n offsets?: readonly number[],\n options?: InterpolateOptions,\n): Interpolator<T> {\n if (values.length === 0) throw new RangeError('[ansh] Keyframes require at least one value.')\n if (values.length === 1) return () => values[0]\n\n const positions =\n offsets && offsets.length === values.length\n ? offsets\n : values.map((_, i) => i / (values.length - 1))\n\n const segments = values\n .slice(0, -1)\n .map((value, i) => resolveInterpolator(value, values[i + 1], options))\n\n return (t) => {\n if (t <= positions[0]) return values[0]\n const last = values.length - 1\n if (t >= positions[last]) return values[last]\n\n let i = 0\n while (i < last - 1 && positions[i + 1] < t) i++\n\n const span = positions[i + 1] - positions[i]\n const local = span <= 0 ? 0 : (t - positions[i]) / span\n return segments[i](local)\n }\n}\n","import { clamp } from '../math/scalar'\nimport { type EasingInput, resolveEasing } from '../easing'\nimport { type SpringOptions, createDecay, createSpring } from '../spring/solver'\nimport { type SpringInput, resolveSpringOptions } from '../spring/presets'\nimport {\n type InterpolateOptions,\n type Interpolator,\n interpolateKeyframes,\n resolveInterpolator,\n} from './interpolate'\n\n/**\n * A pure, seekable function of time.\n *\n * This is the shared core beneath both `animate()` and `Timeline`. Separating it out matters\n * for more than DRY: because a sampler is a *pure function of elapsed time* with no internal\n * cursor, a timeline can evaluate it at any point, in any order, forwards or backwards. An\n * animation that advanced itself statefully could not be seeked or reversed at all.\n *\n * `animate()` adds a ticker subscription, delay and repeat handling on top. `Timeline` adds\n * positioning and orchestration. Neither re-implements spring maths or interpolator resolution.\n */\n\nexport type SamplerType = 'tween' | 'spring' | 'decay'\n\nexport interface SamplerOptions extends InterpolateOptions {\n type?: SamplerType\n duration?: number\n easing?: EasingInput\n\n spring?: SpringInput\n stiffness?: number\n damping?: number\n mass?: number\n bounce?: number\n velocity?: number\n\n power?: number\n timeConstant?: number\n\n /** Explicit keyframe offsets in `[0, 1]`. Defaults to even spacing. */\n offsets?: readonly number[]\n}\n\nexport interface Sampler<T> {\n /** Value at `elapsed` seconds. Clamped at both ends — sampling past the end holds the last value. */\n at(elapsed: number): T\n /** Natural duration in seconds. Tweens use the given duration; springs derive their own. */\n readonly duration: number\n /** Normalised progress at `elapsed`, before interpolation. Springs may exceed `[0, 1]`. */\n progressAt(elapsed: number): number\n}\n\nexport const DEFAULT_TWEEN_DURATION = 0.4\n\n/**\n * Build a sampler for a value transition.\n *\n * Springs on numeric values drive the number directly, so overshoot is physically correct.\n * Springs on anything else (colours, transform strings) drive *progress* through the\n * interpolator instead — the overshoot is preserved, but there is no meaningful way to\n * integrate a colour through a differential equation, and interpolating past 1 in OKLab is\n * exactly the right visual result.\n */\nexport function createSampler<T>(\n from: T,\n to: T | readonly T[],\n options: SamplerOptions = {},\n): Sampler<T> {\n const type = options.type ?? (hasSpringOptions(options) ? 'spring' : 'tween')\n\n const keyframes = Array.isArray(to) ? ([from, ...(to as readonly T[])] as T[]) : null\n\n const interpolator: Interpolator<T> = keyframes\n ? interpolateKeyframes(keyframes, options.offsets, options)\n : resolveInterpolator(from, to as T, options)\n\n if (type === 'spring') {\n const springOptions: SpringOptions = {\n ...resolveSpringOptions(options.spring),\n ...defined('stiffness', options.stiffness),\n ...defined('damping', options.damping),\n ...defined('mass', options.mass),\n ...defined('bounce', options.bounce),\n ...defined('duration', options.duration),\n velocity: options.velocity ?? 0,\n }\n\n // A numeric single-target spring is solved on the value itself.\n if (typeof from === 'number' && typeof to === 'number') {\n const solver = createSpring({ ...springOptions, from, to })\n return {\n at: (elapsed) => solver.at(Math.max(0, elapsed)).position as T,\n duration: solver.duration,\n progressAt: (elapsed) => clamp(elapsed / Math.max(1e-6, solver.duration), 0, 1),\n }\n }\n\n const solver = createSpring({ ...springOptions, from: 0, to: 1 })\n return {\n at: (elapsed) => interpolator(solver.at(Math.max(0, elapsed)).position),\n duration: solver.duration,\n progressAt: (elapsed) => solver.at(Math.max(0, elapsed)).position,\n }\n }\n\n if (type === 'decay') {\n const decay = createDecay({\n from: typeof from === 'number' ? from : 0,\n velocity: options.velocity ?? 0,\n power: options.power,\n timeConstant: options.timeConstant,\n })\n return {\n at: (elapsed) => decay.at(Math.max(0, elapsed)).position as T,\n duration: decay.duration,\n progressAt: (elapsed) => clamp(elapsed / Math.max(1e-6, decay.duration), 0, 1),\n }\n }\n\n const easing = resolveEasing(options.easing)\n const duration = Math.max(0, options.duration ?? DEFAULT_TWEEN_DURATION)\n const progressAt = (elapsed: number): number =>\n duration === 0 ? 1 : easing(clamp(elapsed / duration, 0, 1))\n\n return {\n at: (elapsed) => interpolator(progressAt(elapsed)),\n duration,\n progressAt,\n }\n}\n\nexport function hasSpringOptions(options: SamplerOptions): boolean {\n return (\n options.spring !== undefined ||\n options.stiffness !== undefined ||\n options.damping !== undefined ||\n options.bounce !== undefined ||\n options.mass !== undefined\n )\n}\n\n/** Spread-friendly conditional property — keeps `undefined` out of the options object. */\nfunction defined<K extends string, V>(key: K, value: V | undefined): Record<K, V> | object {\n return value === undefined ? {} : ({ [key]: value } as Record<K, V>)\n}\n","import { getTicker } from '../kernel/ticker'\nimport { prefersReducedMotion } from '../a11y/reduced-motion'\nimport type { Unsubscribe } from '../kernel/types'\nimport type { SpringOptions } from '../spring/solver'\nimport { MotionValue } from './motion-value'\nimport { type SamplerOptions, createSampler } from './sampler'\n\n/**\n * The imperative animation driver.\n *\n * One function covers tweens, springs and inertial decay, because from a caller's point of view\n * they differ only in how progress is generated — which is the {@link createSampler} concern.\n * `animate()` owns only the parts that are about *driving*: the ticker subscription, delay,\n * repeat handling and lifecycle callbacks.\n *\n * ```ts\n * animate(0, 100, { duration: 0.6, easing: 'easeOutCubic', onUpdate: (v) => … })\n * animate(x, 240, { type: 'spring', bounce: 0.3 })\n * animate('#0275f4', '#9f0550', { duration: 1, onUpdate: (c) => (el.style.color = c) })\n * ```\n */\n\nexport type RepeatMode = 'loop' | 'reverse' | 'mirror'\n\nexport interface AnimationOptions<T> extends SamplerOptions {\n /** Seconds to wait before starting. Default `0`. */\n delay?: number\n /** Times to repeat after the first pass. `Infinity` is allowed. Default `0`. */\n repeat?: number\n /** How to repeat. `'reverse'` plays backwards on alternate passes. Default `'loop'`. */\n repeatMode?: RepeatMode\n /** Seconds to wait between repeats. Default `0`. */\n repeatDelay?: number\n\n onUpdate?: (value: T) => void\n onComplete?: () => void\n onStart?: () => void\n /** Called on `stop()`, or when a new animation interrupts this one on the same MotionValue. */\n onStop?: () => void\n\n /**\n * How to behave under `prefers-reduced-motion`.\n *\n * `'jump'` (default) applies the final value immediately — the state change still happens, it\n * just isn't animated, which is nearly always right for UI. `'ignore'` animates anyway; only\n * correct when the motion itself carries information the user needs.\n */\n reducedMotion?: 'jump' | 'ignore'\n}\n\nexport interface AnimationControls {\n /** Stop and leave the value where it is. */\n stop(): void\n pause(): void\n play(): void\n /** Jump to a time in seconds, measured from the animation's start including its delay. */\n seek(time: number): void\n /** Apply the final value and fire `onComplete`. */\n finish(): void\n readonly isActive: boolean\n /** Total seconds including delay and repeats. `Infinity` when repeating forever. */\n readonly duration: number\n /** Resolves on completion *or* on stop — it never rejects. */\n readonly finished: Promise<void>\n}\n\nexport function animate<T>(\n from: T | MotionValue<T>,\n to: T | readonly T[],\n options: AnimationOptions<T> = {},\n): AnimationControls {\n const motion = from instanceof MotionValue ? from : null\n const startValue = motion ? motion.get() : (from as T)\n\n const delay = Math.max(0, options.delay ?? 0)\n const repeat = options.repeat ?? 0\n const repeatMode = options.repeatMode ?? 'loop'\n const repeatDelay = Math.max(0, options.repeatDelay ?? 0)\n\n let resolveFinished: () => void = () => {}\n const finished = new Promise<void>((resolve) => {\n resolveFinished = resolve\n })\n\n const emit = (value: T): void => {\n motion?.set(value)\n options.onUpdate?.(value)\n }\n\n // --- Reduced motion: apply the end state without animating. ---------------\n if (prefersReducedMotion() && (options.reducedMotion ?? 'jump') === 'jump') {\n const finalValue = Array.isArray(to) ? (to[to.length - 1] as T) : (to as T)\n options.onStart?.()\n emit(finalValue)\n options.onComplete?.()\n resolveFinished()\n return {\n stop: noop,\n pause: noop,\n play: noop,\n seek: noop,\n finish: noop,\n isActive: false,\n duration: 0,\n finished,\n }\n }\n\n // A spring taking over from an interaction should inherit its velocity, otherwise the\n // handoff has a visible discontinuity: the element stops dead, then starts again.\n const sampler = createSampler(startValue, to, {\n ...options,\n velocity: options.velocity ?? motion?.getVelocity() ?? 0,\n })\n\n const cycleDuration = sampler.duration\n const cycleLength = cycleDuration + repeatDelay\n\n /**\n * Total time spent animating, excluding the initial delay.\n *\n * This has to be compared against directly. Deriving completion from `cycleIndex >= repeat &&\n * withinCycle >= cycleDuration` is wrong: once `sinceStart` passes into the next cycle,\n * `withinCycle` wraps back to a small value, the second condition fails, and the animation loops\n * forever instead of finishing.\n */\n const activeDuration =\n repeat === Infinity ? Infinity : cycleDuration * (repeat + 1) + repeatDelay * repeat\n\n const totalDuration = repeat === Infinity ? Infinity : delay + activeDuration\n\n let elapsed = 0\n let paused = false\n let active = true\n let started = false\n\n const ticker = getTicker()\n\n /** Apply the value for a position within one cycle, honouring reverse. */\n const applyCycle = (withinCycle: number, reversed: boolean): void => {\n const local = reversed ? Math.max(0, cycleDuration - withinCycle) : withinCycle\n emit(sampler.at(local))\n }\n\n const complete = (): void => {\n if (!active) return\n active = false\n unsubscribe()\n options.onComplete?.()\n resolveFinished()\n }\n\n const frame = ({ delta }: { delta: number }): void => {\n if (paused || !active) return\n\n elapsed += delta\n if (elapsed < delay) return\n\n if (!started) {\n started = true\n options.onStart?.()\n }\n\n const sinceStart = elapsed - delay\n\n if (sinceStart >= activeDuration) {\n // Land exactly on the end state rather than wherever the last frame happened to fall.\n applyCycle(cycleDuration, shouldReverse(repeat, repeatMode))\n complete()\n return\n }\n\n const cycleIndex = cycleLength > 0 ? Math.floor(sinceStart / cycleLength) : 0\n const withinCycle = cycleLength > 0 ? sinceStart - cycleIndex * cycleLength : sinceStart\n\n // Inside the gap between repeats, hold the boundary value rather than freezing mid-motion.\n applyCycle(Math.min(withinCycle, cycleDuration), shouldReverse(cycleIndex, repeatMode))\n }\n\n const unsubscribe: Unsubscribe = ticker.add(frame, { phase: 'compute', name: 'animate' })\n\n const abort = (): void => {\n if (!active) return\n active = false\n unsubscribe()\n options.onStop?.()\n resolveFinished()\n }\n\n motion?.attachAnimation(abort)\n\n // Emit the start value immediately, so there is no one-frame flash of the previous state.\n if (delay === 0) applyCycle(0, false)\n\n return {\n stop: abort,\n pause() {\n paused = true\n },\n play() {\n paused = false\n },\n seek(time: number) {\n elapsed = Math.max(0, time)\n const sinceStart = Math.max(0, elapsed - delay)\n\n // Past the end, hold the final state — matching what `frame` would have applied.\n if (sinceStart >= activeDuration) {\n applyCycle(cycleDuration, shouldReverse(repeat, repeatMode))\n return\n }\n\n const cycleIndex = cycleLength > 0 ? Math.floor(sinceStart / cycleLength) : 0\n const withinCycle = cycleLength > 0 ? sinceStart - cycleIndex * cycleLength : sinceStart\n applyCycle(Math.min(withinCycle, cycleDuration), shouldReverse(cycleIndex, repeatMode))\n },\n finish() {\n if (!active) return\n applyCycle(cycleDuration, shouldReverse(repeat === Infinity ? 0 : repeat, repeatMode))\n complete()\n },\n get isActive() {\n return active\n },\n duration: totalDuration,\n finished,\n }\n}\n\n/**\n * Should cycle `index` play backwards?\n *\n * `'reverse'` and `'mirror'` both alternate. They are distinct names because `'mirror'` is\n * documented as also mirroring the easing curve — for an asymmetric curve like `easeOut`, a\n * mirrored return decelerates as well, whereas a plain reverse accelerates. Since a sampler\n * evaluated backwards already produces the mirrored curve, they coincide in implementation;\n * keeping both names means the distinction stays available if that ever changes.\n */\nfunction shouldReverse(index: number, mode: RepeatMode): boolean {\n return (mode === 'reverse' || mode === 'mirror') && index % 2 === 1\n}\n\nfunction noop(): void {}\n\n/**\n * Continuously track a moving target with a spring.\n *\n * Distinct from `animate(…, { type: 'spring' })`, which resolves its target once at setup.\n * Cursor followers, magnetic buttons and drag handles all need a target that moves *while* the\n * spring is still travelling toward it.\n *\n * Uses semi-implicit Euler rather than the analytic solver: with a target that changes every\n * frame, rebuilding the closed form each frame would cost more than integrating.\n */\nexport function springTo(\n value: MotionValue<number>,\n getTarget: () => number,\n options: SpringOptions & { name?: string } = {},\n): Unsubscribe {\n const stiffness = options.stiffness ?? 170\n const damping = options.damping ?? 26\n const mass = Math.max(0.01, options.mass ?? 1)\n const restDelta = options.restDelta ?? 0.01\n\n let velocity = options.velocity ?? 0\n const ticker = getTicker()\n\n return ticker.add(\n ({ delta }) => {\n const target = getTarget()\n const current = value.get()\n\n if (Math.abs(current - target) < restDelta && Math.abs(velocity) < restDelta) {\n if (current !== target) value.set(target)\n velocity = 0\n return\n }\n\n // Sub-step long frames. At 20 FPS a single 50 ms step with stiff constants diverges;\n // three 16 ms steps stay stable over the same wall-clock time.\n const steps = Math.min(4, Math.max(1, Math.ceil(delta / (1 / 60))))\n const dt = delta / steps\n let position = current\n\n for (let i = 0; i < steps; i++) {\n const acceleration = (-stiffness * (position - target) - damping * velocity) / mass\n velocity += acceleration * dt\n position += velocity * dt\n }\n\n value.set(position)\n value.setVelocity(velocity)\n },\n { phase: 'compute', name: options.name ?? 'springTo' },\n )\n}\n","import { clamp } from '../math/scalar'\nimport { getTicker } from '../kernel/ticker'\nimport { prefersReducedMotion } from '../a11y/reduced-motion'\nimport type { Unsubscribe } from '../kernel/types'\nimport { type MotionValue } from './motion-value'\nimport { type SamplerOptions, createSampler } from './sampler'\nimport { type StaggerOptions, stagger } from './stagger'\n\n/**\n * A seekable, composable animation timeline.\n *\n * The central design decision: a timeline is a **pure function of time**, not a queue that\n * advances itself. Every entry is a {@link import('./sampler').Sampler} placed at an absolute\n * offset, so evaluating the timeline at `t` means evaluating each overlapping entry at `t - start`.\n *\n * That single choice is what makes `seek`, `reverse`, `timeScale` and scroll-driving all fall out\n * for free. A queue-based timeline can only go forwards, one frame at a time, which is why\n * scrubbing is a hard retrofit in libraries built that way.\n *\n * ```ts\n * const tl = createTimeline()\n * .to(opacity, 1, { duration: 0.4 })\n * .to(y, 0, { duration: 0.6, easing: 'easeOutCubic' }, '<') // with the previous\n * .label('revealed')\n * .to(scale, 1.05, { duration: 0.2 }, '+=0.1') // 0.1s after the previous ends\n * .call(() => announce('ready'))\n * ```\n */\n\n/**\n * Where to place an entry.\n *\n * - `number` — absolute seconds from the timeline's start.\n * - `'>'` — after the previous entry ends. The default.\n * - `'<'` — at the same time the previous entry *started* (parallel).\n * - `'+=0.2'` — 0.2s after the previous entry ends.\n * - `'-=0.2'` — 0.2s before the previous entry ends (overlap).\n * - `'<+=0.1'` — 0.1s after the previous entry started.\n * - `'myLabel'` — at a label, optionally with `'myLabel+=0.3'`.\n */\nexport type TimelinePosition = number | string\n\ninterface TimelineEntry {\n start: number\n duration: number\n /** Apply this entry's state for a local time within `[0, duration]`. */\n apply(localTime: number): void\n /** One-shot callbacks fire on crossing rather than continuously. */\n readonly isCallback: boolean\n /** Tracks whether a callback has already fired in the current direction of travel. */\n fired: boolean\n readonly name: string\n}\n\nexport interface TimelineOptions {\n /** Start playing as soon as the first entry is added. Default `true`. */\n autoplay?: boolean\n /** Times to repeat after the first pass. `Infinity` allowed. Default `0`. */\n repeat?: number\n /** Alternate direction each repeat. Default `false`. */\n yoyo?: boolean\n /** Playback rate. Negative values play in reverse. Default `1`. */\n timeScale?: number\n onComplete?: () => void\n onUpdate?: (time: number, progress: number) => void\n onRepeat?: (iteration: number) => void\n /**\n * Under `prefers-reduced-motion`, jump straight to the end state. Default `true`.\n * Set `false` only for timelines whose motion conveys required information.\n */\n respectReducedMotion?: boolean\n}\n\nexport interface Timeline {\n /** Animate a MotionValue to a target. */\n to<T>(\n value: MotionValue<T>,\n to: T | readonly T[],\n options?: SamplerOptions & { duration?: number },\n position?: TimelinePosition,\n ): Timeline\n\n /** Animate a MotionValue *from* a value to its current one — the reveal-in pattern. */\n from<T>(\n value: MotionValue<T>,\n from: T,\n options?: SamplerOptions & { duration?: number },\n position?: TimelinePosition,\n ): Timeline\n\n /** Animate an arbitrary value, receiving updates through a callback. */\n tween<T>(\n from: T,\n to: T | readonly T[],\n options: SamplerOptions & { duration?: number; onUpdate: (value: T) => void },\n position?: TimelinePosition,\n ): Timeline\n\n /** Animate many MotionValues with a stagger between them. */\n stagger<T>(\n values: readonly MotionValue<T>[],\n to: T | readonly T[],\n options?: SamplerOptions & { duration?: number; stagger?: StaggerOptions },\n position?: TimelinePosition,\n ): Timeline\n\n /** Fire a callback at a point in time. Fires once per crossing. */\n call(fn: () => void, position?: TimelinePosition): Timeline\n\n /** Name a point so later entries can be positioned relative to it. */\n label(name: string, position?: TimelinePosition): Timeline\n\n /** Nest another timeline. Its entries are flattened in at the given offset. */\n add(child: Timeline, position?: TimelinePosition): Timeline\n\n play(): Timeline\n pause(): Timeline\n /** Play backwards from the current position. */\n reverse(): Timeline\n /** Jump to a time in seconds without playing. */\n seek(time: number): Timeline\n /** Jump to a normalised position in `[0, 1]`. */\n progress(value: number): Timeline\n restart(): Timeline\n /** Apply the final state and stop. */\n complete(): Timeline\n /** Stop and release the ticker subscription. */\n kill(): void\n\n readonly duration: number\n readonly time: number\n readonly isPlaying: boolean\n timeScale: number\n /** Resolves when playback completes. Also resolves on `kill()`. */\n readonly finished: Promise<void>\n /** Internal: used by `add()` to flatten a nested timeline. */\n readonly entries: readonly TimelineEntry[]\n readonly labels: ReadonlyMap<string, number>\n}\n\nexport function createTimeline(options: TimelineOptions = {}): Timeline {\n const entries: TimelineEntry[] = []\n const labels = new Map<string, number>()\n\n const repeat = options.repeat ?? 0\n const yoyo = options.yoyo ?? false\n const autoplay = options.autoplay ?? true\n const respectReducedMotion = options.respectReducedMotion ?? true\n\n let totalDuration = 0\n /** Start and end of the most recently added entry, for relative positioning. */\n let previousStart = 0\n let previousEnd = 0\n\n let currentTime = 0\n let playing = false\n let scale = options.timeScale ?? 1\n let iteration = 0\n let killed = false\n let subscription: Unsubscribe | null = null\n\n let resolveFinished: () => void = () => {}\n const finished = new Promise<void>((resolve) => {\n resolveFinished = resolve\n })\n\n // -------------------------------------------------------------------------\n // Position resolution\n // -------------------------------------------------------------------------\n\n const RELATIVE = /^([<>]?)(?:([+-]=)\\s*([\\d.]+))?$/\n const LABEL_RELATIVE = /^(.+?)(?:([+-]=)\\s*([\\d.]+))?$/\n\n function resolvePosition(position: TimelinePosition | undefined): number {\n if (position === undefined) return previousEnd\n if (typeof position === 'number') return Math.max(0, position)\n\n const trimmed = position.trim()\n\n const relative = RELATIVE.exec(trimmed)\n if (relative) {\n const anchor = relative[1] === '<' ? previousStart : previousEnd\n if (!relative[2]) return anchor\n const amount = Number.parseFloat(relative[3])\n return Math.max(0, relative[2] === '+=' ? anchor + amount : anchor - amount)\n }\n\n const labelMatch = LABEL_RELATIVE.exec(trimmed)\n if (labelMatch) {\n const base = labels.get(labelMatch[1])\n if (base !== undefined) {\n if (!labelMatch[2]) return base\n const amount = Number.parseFloat(labelMatch[3])\n return Math.max(0, labelMatch[2] === '+=' ? base + amount : base - amount)\n }\n }\n\n console.warn(\n `[ansh] Unknown timeline position \"${position}\". ` +\n `Placing at the end of the previous entry. ` +\n `Valid forms: a number, '<', '>', '+=0.2', '-=0.2', or a label name.`,\n )\n return previousEnd\n }\n\n function push(entry: TimelineEntry): void {\n entries.push(entry)\n previousStart = entry.start\n previousEnd = entry.start + entry.duration\n if (previousEnd > totalDuration) totalDuration = previousEnd\n if (autoplay && !playing && !killed) api.play()\n }\n\n // -------------------------------------------------------------------------\n // Evaluation\n // -------------------------------------------------------------------------\n\n /**\n * Apply the timeline's state at `time`.\n *\n * Every entry is visited each evaluation. That is deliberate: skipping entries that don't\n * overlap `time` would leave them holding a stale value after a seek, which is precisely the\n * bug that makes hand-rolled timelines drift out of sync. Entries are cheap to evaluate —\n * a sampler is a closure over precomputed constants — so correctness wins over the micro-optimisation.\n */\n function applyAt(time: number, previousTime: number): void {\n for (const entry of entries) {\n if (entry.isCallback) {\n // Fire when the playhead crosses the callback's position, in either direction.\n const crossedForward = previousTime < entry.start && time >= entry.start\n const crossedBackward = previousTime > entry.start && time <= entry.start\n if (crossedForward || crossedBackward) {\n if (!entry.fired) {\n entry.fired = true\n entry.apply(0)\n }\n } else if (Math.abs(time - entry.start) > 1e-6) {\n entry.fired = false\n }\n continue\n }\n\n const local = clamp(time - entry.start, 0, entry.duration)\n entry.apply(local)\n }\n\n options.onUpdate?.(time, totalDuration === 0 ? 1 : clamp(time / totalDuration, 0, 1))\n }\n\n function frame({ delta }: { delta: number }): void {\n if (!playing || killed) return\n\n const previousTime = currentTime\n currentTime += delta * scale\n\n // --- Reached the end (or the start, when reversing). ---\n if (scale >= 0 && currentTime >= totalDuration) {\n if (repeat === Infinity || iteration < repeat) {\n iteration++\n options.onRepeat?.(iteration)\n if (yoyo) {\n currentTime = totalDuration\n scale = -Math.abs(scale)\n } else {\n // Carry the overshoot into the next pass so repeats don't accumulate drift.\n currentTime = currentTime - totalDuration\n resetCallbacks()\n }\n applyAt(clamp(currentTime, 0, totalDuration), previousTime)\n return\n }\n currentTime = totalDuration\n applyAt(currentTime, previousTime)\n finish()\n return\n }\n\n if (scale < 0 && currentTime <= 0) {\n if (yoyo && (repeat === Infinity || iteration < repeat)) {\n iteration++\n options.onRepeat?.(iteration)\n currentTime = 0\n scale = Math.abs(scale)\n applyAt(currentTime, previousTime)\n return\n }\n currentTime = 0\n applyAt(currentTime, previousTime)\n finish()\n return\n }\n\n applyAt(currentTime, previousTime)\n }\n\n function resetCallbacks(): void {\n for (const entry of entries) if (entry.isCallback) entry.fired = false\n }\n\n function finish(): void {\n playing = false\n subscription?.()\n subscription = null\n options.onComplete?.()\n resolveFinished()\n }\n\n const ticker = getTicker()\n\n // -------------------------------------------------------------------------\n // Public API\n // -------------------------------------------------------------------------\n\n const api: Timeline = {\n to(value, to, sampleOptions = {}, position) {\n const start = resolvePosition(position)\n // Capture the value at *build* time, matching what an author reading the code expects:\n // `tl.to(x, 100)` animates from wherever `x` is when the timeline is constructed.\n const sampler = createSampler(value.get(), to, sampleOptions)\n push({\n start,\n duration: sampler.duration,\n apply: (local) => value.set(sampler.at(local)),\n isCallback: false,\n fired: false,\n name: 'to',\n })\n return api\n },\n\n from(value, from, sampleOptions = {}, position) {\n const start = resolvePosition(position)\n const target = value.get()\n const sampler = createSampler(from, target, sampleOptions)\n push({\n start,\n duration: sampler.duration,\n apply: (local) => value.set(sampler.at(local)),\n isCallback: false,\n fired: false,\n name: 'from',\n })\n return api\n },\n\n tween(from, to, tweenOptions, position) {\n const start = resolvePosition(position)\n const sampler = createSampler(from, to, tweenOptions)\n const { onUpdate } = tweenOptions\n push({\n start,\n duration: sampler.duration,\n apply: (local) => onUpdate(sampler.at(local)),\n isCallback: false,\n fired: false,\n name: 'tween',\n })\n return api\n },\n\n stagger(values, to, staggerOptions = {}, position) {\n const start = resolvePosition(position)\n const delayFor = stagger(values.length, staggerOptions.stagger)\n\n // Each element becomes its own entry at its own offset. Modelling stagger as N placed\n // entries rather than one entry with internal offsets means seeking works per-element,\n // and a nested timeline can position relative to the group's true end.\n let groupEnd = start\n values.forEach((value, index) => {\n const sampler = createSampler(value.get(), to, staggerOptions)\n const entryStart = start + delayFor(index)\n entries.push({\n start: entryStart,\n duration: sampler.duration,\n apply: (local) => value.set(sampler.at(local)),\n isCallback: false,\n fired: false,\n name: `stagger[${index}]`,\n })\n const end = entryStart + sampler.duration\n if (end > groupEnd) groupEnd = end\n })\n\n previousStart = start\n previousEnd = groupEnd\n if (groupEnd > totalDuration) totalDuration = groupEnd\n if (autoplay && !playing && !killed) api.play()\n return api\n },\n\n call(fn, position) {\n const start = resolvePosition(position)\n push({\n start,\n duration: 0,\n apply: fn,\n isCallback: true,\n fired: false,\n name: 'call',\n })\n return api\n },\n\n label(name, position) {\n labels.set(name, resolvePosition(position))\n return api\n },\n\n add(child, position) {\n const offset = resolvePosition(position)\n for (const entry of child.entries) {\n entries.push({ ...entry, start: entry.start + offset })\n }\n for (const [name, at] of child.labels) {\n labels.set(name, at + offset)\n }\n previousStart = offset\n previousEnd = offset + child.duration\n if (previousEnd > totalDuration) totalDuration = previousEnd\n return api\n },\n\n play() {\n if (killed || playing) return api\n\n // Reduced motion: apply the end state and report completion without ever animating.\n if (respectReducedMotion && prefersReducedMotion()) {\n currentTime = totalDuration\n applyAt(totalDuration, 0)\n options.onComplete?.()\n resolveFinished()\n return api\n }\n\n playing = true\n subscription = ticker.add(frame, { phase: 'compute', name: 'timeline' })\n return api\n },\n\n pause() {\n playing = false\n subscription?.()\n subscription = null\n return api\n },\n\n reverse() {\n scale = -Math.abs(scale || 1)\n if (!playing) api.play()\n return api\n },\n\n seek(time) {\n const previousTime = currentTime\n currentTime = clamp(time, 0, totalDuration)\n resetCallbacks()\n applyAt(currentTime, previousTime)\n return api\n },\n\n progress(value) {\n return api.seek(clamp(value, 0, 1) * totalDuration)\n },\n\n restart() {\n iteration = 0\n scale = Math.abs(scale || 1)\n resetCallbacks()\n api.seek(0)\n return api.play()\n },\n\n complete() {\n api.seek(totalDuration)\n finish()\n return api\n },\n\n kill() {\n killed = true\n playing = false\n subscription?.()\n subscription = null\n entries.length = 0\n labels.clear()\n resolveFinished()\n },\n\n get duration() {\n return totalDuration\n },\n get time() {\n return currentTime\n },\n get isPlaying() {\n return playing\n },\n get timeScale() {\n return scale\n },\n set timeScale(value: number) {\n scale = value\n },\n finished,\n get entries() {\n return entries\n },\n get labels() {\n return labels\n },\n }\n\n return api\n}\n","import { clamp } from '../math/scalar'\nimport { getTicker } from '../kernel/ticker'\nimport type { Unsubscribe } from '../kernel/types'\nimport { observeResize } from './pool'\n\n/**\n * Scroll progress tracking.\n *\n * Scroll-linked animation is where layout thrashing is most likely, because the natural\n * implementation — read `getBoundingClientRect()` in a `scroll` handler, then write a\n * transform — forces a synchronous layout on every event, and scroll events fire faster than\n * frames on many devices.\n *\n * Instead: the scroll handler only records that something changed, all measurement happens in\n * the ticker's `read` phase, and consumers receive progress values in `compute`/`write`. One\n * layout read per frame at most, no matter how many elements are tracked.\n */\n\nexport type ScrollAxis = 'y' | 'x'\n\n/**\n * Where an element's progress starts and ends, expressed as two alignment points.\n *\n * Read as \"`element` edge relative to `viewport` edge\", matching the mental model of GSAP\n * ScrollTrigger and CSS scroll-driven animations:\n *\n * - `['start', 'end']` — starts when the element's top reaches the viewport bottom.\n * - `['start', 'start']` — starts when the element's top reaches the viewport top.\n * - `['end', 'start']` — ends when the element's bottom reaches the viewport top.\n */\nexport type ScrollOffset = readonly [ScrollEdge, ScrollEdge]\nexport type ScrollEdge = 'start' | 'center' | 'end' | number\n\nexport interface ScrollProgress {\n /** Progress through the tracked range, `0` to `1`. */\n progress: number\n /** Signed scroll velocity in pixels per second. */\n velocity: number\n /** Scroll offset of the container, in pixels. */\n scroll: number\n /** `1` when scrolling toward the end, `-1` toward the start, `0` when still. */\n direction: -1 | 0 | 1\n /** Is any part of the element within the viewport range? */\n inView: boolean\n}\n\nexport interface ScrollTrackOptions {\n axis?: ScrollAxis\n /** Start and end alignment. Default `['start', 'end']` and `['end', 'start']` respectively. */\n offset?: { start: ScrollOffset; end: ScrollOffset }\n /** Scroll container. Defaults to the window. */\n container?: HTMLElement | null\n}\n\nconst DEFAULT_OFFSET = {\n start: ['start', 'end'] as ScrollOffset,\n end: ['end', 'start'] as ScrollOffset,\n}\n\nfunction edgeToFraction(edge: ScrollEdge): number {\n if (typeof edge === 'number') return edge\n switch (edge) {\n case 'start':\n return 0\n case 'center':\n return 0.5\n case 'end':\n return 1\n }\n}\n\n/**\n * Track an element's progress through the viewport.\n *\n * @returns An unsubscribe function. The callback runs in the `compute` phase, so it is safe to\n * write styles from it — though writing in `write` is tidier for anything expensive.\n */\nexport function trackScroll(\n element: HTMLElement,\n callback: (progress: ScrollProgress) => void,\n options: ScrollTrackOptions = {},\n): Unsubscribe {\n if (typeof window === 'undefined') return () => {}\n\n const axis = options.axis ?? 'y'\n const offset = options.offset ?? DEFAULT_OFFSET\n const container = options.container ?? null\n\n const state: ScrollProgress = {\n progress: 0,\n velocity: 0,\n scroll: 0,\n direction: 0,\n inView: false,\n }\n\n let lastScroll = 0\n let hasLastScroll = false\n let needsMeasure = true\n\n // Cached measurements, refreshed in the read phase.\n let startOffset = 0\n let endOffset = 0\n\n const readScroll = (): number => {\n if (container) return axis === 'y' ? container.scrollTop : container.scrollLeft\n return axis === 'y' ? window.scrollY : window.scrollX\n }\n\n const viewportSize = (): number => {\n if (container) return axis === 'y' ? container.clientHeight : container.clientWidth\n return axis === 'y' ? window.innerHeight : window.innerWidth\n }\n\n /**\n * Compute the scroll positions at which progress is 0 and 1.\n *\n * Done once per resize rather than per frame: the element's position in the *document* only\n * changes when layout changes, so per-frame we only need the scroll offset itself.\n */\n const measure = (): void => {\n const rect = element.getBoundingClientRect()\n const scroll = readScroll()\n const viewport = viewportSize()\n\n const elementStart = (axis === 'y' ? rect.top : rect.left) + scroll\n const elementSize = axis === 'y' ? rect.height : rect.width\n\n const [startElementEdge, startViewportEdge] = offset.start\n const [endElementEdge, endViewportEdge] = offset.end\n\n startOffset =\n elementStart +\n elementSize * edgeToFraction(startElementEdge) -\n viewport * edgeToFraction(startViewportEdge)\n\n endOffset =\n elementStart +\n elementSize * edgeToFraction(endElementEdge) -\n viewport * edgeToFraction(endViewportEdge)\n\n needsMeasure = false\n }\n\n const invalidate = () => {\n needsMeasure = true\n }\n\n // Note there is deliberately **no** `scroll` listener here. Scrolling does not change the\n // element's position within the document, so the cached start/end offsets stay valid; the\n // only per-frame input is the scroll value itself, which the read phase already collects.\n // Layout changes do invalidate them, so those are the events we listen for.\n window.addEventListener('resize', invalidate, { passive: true })\n const stopResizeObserver = observeLayoutChanges(element, invalidate)\n\n const ticker = getTicker()\n\n const stopRead = ticker.add(\n () => {\n if (needsMeasure) measure()\n state.scroll = readScroll()\n },\n { phase: 'read', name: 'scroll:measure' },\n )\n\n const stopCompute = ticker.add(\n ({ delta }) => {\n const span = endOffset - startOffset\n state.progress = span === 0 ? 0 : clamp((state.scroll - startOffset) / span, 0, 1)\n\n if (hasLastScroll && delta > 0) {\n const dv = (state.scroll - lastScroll) / delta\n state.velocity = dv\n state.direction = dv > 1 ? 1 : dv < -1 ? -1 : 0\n }\n lastScroll = state.scroll\n hasLastScroll = true\n\n state.inView = state.progress > 0 && state.progress < 1\n\n callback(state)\n },\n { phase: 'compute', name: 'scroll:progress' },\n )\n\n return () => {\n window.removeEventListener('resize', invalidate)\n stopResizeObserver()\n stopRead()\n stopCompute()\n }\n}\n\n/**\n * Invalidate cached offsets when the element or its ancestors change size.\n *\n * A `resize` listener on the window misses the common case of content above the element\n * growing — an image loading, an accordion opening — which shifts the element without any\n * window resize. Observing the element itself catches both.\n */\nfunction observeLayoutChanges(element: HTMLElement, onChange: () => void): Unsubscribe {\n return observeResize(element, onChange)\n}\n\n/**\n * Track raw container scroll without reference to an element.\n * Backs progress bars, \"scrolled\" header states, and scroll-velocity effects.\n */\nexport function trackContainerScroll(\n callback: (info: { progress: number; scroll: number; velocity: number; max: number }) => void,\n options: { axis?: ScrollAxis; container?: HTMLElement | null } = {},\n): Unsubscribe {\n if (typeof window === 'undefined') return () => {}\n\n const axis = options.axis ?? 'y'\n const container = options.container ?? null\n const ticker = getTicker()\n\n let scroll = 0\n let max = 1\n let lastScroll = 0\n let hasLast = false\n\n const stopRead = ticker.add(\n () => {\n if (container) {\n scroll = axis === 'y' ? container.scrollTop : container.scrollLeft\n max = Math.max(\n 1,\n axis === 'y'\n ? container.scrollHeight - container.clientHeight\n : container.scrollWidth - container.clientWidth,\n )\n } else {\n scroll = axis === 'y' ? window.scrollY : window.scrollX\n const doc = document.documentElement\n max = Math.max(\n 1,\n axis === 'y'\n ? doc.scrollHeight - window.innerHeight\n : doc.scrollWidth - window.innerWidth,\n )\n }\n },\n { phase: 'read', name: 'containerScroll:measure' },\n )\n\n const stopCompute = ticker.add(\n ({ delta }) => {\n const velocity = hasLast && delta > 0 ? (scroll - lastScroll) / delta : 0\n lastScroll = scroll\n hasLast = true\n callback({ progress: clamp(scroll / max, 0, 1), scroll, velocity, max })\n },\n { phase: 'compute', name: 'containerScroll:progress' },\n )\n\n return () => {\n stopRead()\n stopCompute()\n }\n}\n","/**\n * @ansh-ui/core — the Ansh animation engine.\n *\n * A zero-dependency, framework-agnostic kernel. Everything the React, Vue and Nuxt packages do\n * is a thin binding over what is exported here, and nothing in this package knows those\n * frameworks exist.\n *\n * ## Deep imports\n *\n * For the smallest possible bundles, import from a subpath rather than the root:\n *\n * ```ts\n * import { mixColors } from '@ansh-ui/core/color'\n * import { createNoise } from '@ansh-ui/core/noise'\n * import { easings } from '@ansh-ui/core/easing'\n * ```\n *\n * Root imports tree-shake correctly in any modern bundler, so this is an optimisation for\n * unusual setups rather than a requirement.\n */\n\n// --- L0 Primitives ---\nexport * from './math'\nexport * from './easing'\nexport * from './spring'\nexport * from './noise'\nexport * from './color'\n\n// --- L1 Kernel ---\nexport * from './kernel'\n\n// --- L2 Services ---\nexport * from './motion'\nexport * from './observers'\nexport * from './render'\nexport * from './plugins'\nexport * from './a11y'\n\n// --- L3 Effects & Behaviours ---\nexport * from './effects'\nexport * from './behaviours'\n\n/** The package version, injected at build time and useful in bug reports. */\nexport const VERSION = '0.1.0'\n"]}
|
package/dist/math.cjs
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk6PFYGJWD_cjs = require('./chunk-6PFYGJWD.cjs');
|
|
4
|
+
var chunkFNR35HTL_cjs = require('./chunk-FNR35HTL.cjs');
|
|
5
|
+
var chunkILKUL7GD_cjs = require('./chunk-ILKUL7GD.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "addScaledVec2", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunk6PFYGJWD_cjs.addScaledVec2; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "addVec2", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunk6PFYGJWD_cjs.addVec2; }
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "addVec2Into", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunk6PFYGJWD_cjs.addVec2Into; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "angleOfVec2", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunk6PFYGJWD_cjs.angleOfVec2; }
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "cloneVec2", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return chunk6PFYGJWD_cjs.cloneVec2; }
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "crossVec2", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return chunk6PFYGJWD_cjs.crossVec2; }
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "distanceSqVec2", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () { return chunk6PFYGJWD_cjs.distanceSqVec2; }
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "distanceVec2", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () { return chunk6PFYGJWD_cjs.distanceVec2; }
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(exports, "dotVec2", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () { return chunk6PFYGJWD_cjs.dotVec2; }
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(exports, "fromAngle", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function () { return chunk6PFYGJWD_cjs.fromAngle; }
|
|
48
|
+
});
|
|
49
|
+
Object.defineProperty(exports, "lengthSqVec2", {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () { return chunk6PFYGJWD_cjs.lengthSqVec2; }
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(exports, "lengthVec2", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function () { return chunk6PFYGJWD_cjs.lengthVec2; }
|
|
56
|
+
});
|
|
57
|
+
Object.defineProperty(exports, "lerpVec2", {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: function () { return chunk6PFYGJWD_cjs.lerpVec2; }
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(exports, "lerpVec2Into", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function () { return chunk6PFYGJWD_cjs.lerpVec2Into; }
|
|
64
|
+
});
|
|
65
|
+
Object.defineProperty(exports, "limitVec2", {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () { return chunk6PFYGJWD_cjs.limitVec2; }
|
|
68
|
+
});
|
|
69
|
+
Object.defineProperty(exports, "normalizeInRect", {
|
|
70
|
+
enumerable: true,
|
|
71
|
+
get: function () { return chunk6PFYGJWD_cjs.normalizeInRect; }
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(exports, "normalizeVec2", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function () { return chunk6PFYGJWD_cjs.normalizeVec2; }
|
|
76
|
+
});
|
|
77
|
+
Object.defineProperty(exports, "rectContains", {
|
|
78
|
+
enumerable: true,
|
|
79
|
+
get: function () { return chunk6PFYGJWD_cjs.rectContains; }
|
|
80
|
+
});
|
|
81
|
+
Object.defineProperty(exports, "reflectVec2", {
|
|
82
|
+
enumerable: true,
|
|
83
|
+
get: function () { return chunk6PFYGJWD_cjs.reflectVec2; }
|
|
84
|
+
});
|
|
85
|
+
Object.defineProperty(exports, "rotateVec2", {
|
|
86
|
+
enumerable: true,
|
|
87
|
+
get: function () { return chunk6PFYGJWD_cjs.rotateVec2; }
|
|
88
|
+
});
|
|
89
|
+
Object.defineProperty(exports, "scaleVec2", {
|
|
90
|
+
enumerable: true,
|
|
91
|
+
get: function () { return chunk6PFYGJWD_cjs.scaleVec2; }
|
|
92
|
+
});
|
|
93
|
+
Object.defineProperty(exports, "scaleVec2Into", {
|
|
94
|
+
enumerable: true,
|
|
95
|
+
get: function () { return chunk6PFYGJWD_cjs.scaleVec2Into; }
|
|
96
|
+
});
|
|
97
|
+
Object.defineProperty(exports, "setVec2", {
|
|
98
|
+
enumerable: true,
|
|
99
|
+
get: function () { return chunk6PFYGJWD_cjs.setVec2; }
|
|
100
|
+
});
|
|
101
|
+
Object.defineProperty(exports, "subVec2", {
|
|
102
|
+
enumerable: true,
|
|
103
|
+
get: function () { return chunk6PFYGJWD_cjs.subVec2; }
|
|
104
|
+
});
|
|
105
|
+
Object.defineProperty(exports, "subVec2Into", {
|
|
106
|
+
enumerable: true,
|
|
107
|
+
get: function () { return chunk6PFYGJWD_cjs.subVec2Into; }
|
|
108
|
+
});
|
|
109
|
+
Object.defineProperty(exports, "vec2", {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function () { return chunk6PFYGJWD_cjs.vec2; }
|
|
112
|
+
});
|
|
113
|
+
Object.defineProperty(exports, "createRng", {
|
|
114
|
+
enumerable: true,
|
|
115
|
+
get: function () { return chunkFNR35HTL_cjs.createRng; }
|
|
116
|
+
});
|
|
117
|
+
Object.defineProperty(exports, "deriveSeed", {
|
|
118
|
+
enumerable: true,
|
|
119
|
+
get: function () { return chunkFNR35HTL_cjs.deriveSeed; }
|
|
120
|
+
});
|
|
121
|
+
Object.defineProperty(exports, "goldenRatioSequence", {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
get: function () { return chunkFNR35HTL_cjs.goldenRatioSequence; }
|
|
124
|
+
});
|
|
125
|
+
Object.defineProperty(exports, "hashString", {
|
|
126
|
+
enumerable: true,
|
|
127
|
+
get: function () { return chunkFNR35HTL_cjs.hashString; }
|
|
128
|
+
});
|
|
129
|
+
Object.defineProperty(exports, "jitter", {
|
|
130
|
+
enumerable: true,
|
|
131
|
+
get: function () { return chunkFNR35HTL_cjs.jitter; }
|
|
132
|
+
});
|
|
133
|
+
Object.defineProperty(exports, "r2Sequence", {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
get: function () { return chunkFNR35HTL_cjs.r2Sequence; }
|
|
136
|
+
});
|
|
137
|
+
Object.defineProperty(exports, "weightedPick", {
|
|
138
|
+
enumerable: true,
|
|
139
|
+
get: function () { return chunkFNR35HTL_cjs.weightedPick; }
|
|
140
|
+
});
|
|
141
|
+
Object.defineProperty(exports, "EPSILON", {
|
|
142
|
+
enumerable: true,
|
|
143
|
+
get: function () { return chunkILKUL7GD_cjs.EPSILON; }
|
|
144
|
+
});
|
|
145
|
+
Object.defineProperty(exports, "HALF_PI", {
|
|
146
|
+
enumerable: true,
|
|
147
|
+
get: function () { return chunkILKUL7GD_cjs.HALF_PI; }
|
|
148
|
+
});
|
|
149
|
+
Object.defineProperty(exports, "PI", {
|
|
150
|
+
enumerable: true,
|
|
151
|
+
get: function () { return chunkILKUL7GD_cjs.PI; }
|
|
152
|
+
});
|
|
153
|
+
Object.defineProperty(exports, "TAU", {
|
|
154
|
+
enumerable: true,
|
|
155
|
+
get: function () { return chunkILKUL7GD_cjs.TAU; }
|
|
156
|
+
});
|
|
157
|
+
Object.defineProperty(exports, "angleDelta", {
|
|
158
|
+
enumerable: true,
|
|
159
|
+
get: function () { return chunkILKUL7GD_cjs.angleDelta; }
|
|
160
|
+
});
|
|
161
|
+
Object.defineProperty(exports, "approximately", {
|
|
162
|
+
enumerable: true,
|
|
163
|
+
get: function () { return chunkILKUL7GD_cjs.approximately; }
|
|
164
|
+
});
|
|
165
|
+
Object.defineProperty(exports, "clamp", {
|
|
166
|
+
enumerable: true,
|
|
167
|
+
get: function () { return chunkILKUL7GD_cjs.clamp; }
|
|
168
|
+
});
|
|
169
|
+
Object.defineProperty(exports, "damp", {
|
|
170
|
+
enumerable: true,
|
|
171
|
+
get: function () { return chunkILKUL7GD_cjs.damp; }
|
|
172
|
+
});
|
|
173
|
+
Object.defineProperty(exports, "degrees", {
|
|
174
|
+
enumerable: true,
|
|
175
|
+
get: function () { return chunkILKUL7GD_cjs.degrees; }
|
|
176
|
+
});
|
|
177
|
+
Object.defineProperty(exports, "finite", {
|
|
178
|
+
enumerable: true,
|
|
179
|
+
get: function () { return chunkILKUL7GD_cjs.finite; }
|
|
180
|
+
});
|
|
181
|
+
Object.defineProperty(exports, "inverseLerp", {
|
|
182
|
+
enumerable: true,
|
|
183
|
+
get: function () { return chunkILKUL7GD_cjs.inverseLerp; }
|
|
184
|
+
});
|
|
185
|
+
Object.defineProperty(exports, "lerp", {
|
|
186
|
+
enumerable: true,
|
|
187
|
+
get: function () { return chunkILKUL7GD_cjs.lerp; }
|
|
188
|
+
});
|
|
189
|
+
Object.defineProperty(exports, "lerpAngle", {
|
|
190
|
+
enumerable: true,
|
|
191
|
+
get: function () { return chunkILKUL7GD_cjs.lerpAngle; }
|
|
192
|
+
});
|
|
193
|
+
Object.defineProperty(exports, "mean", {
|
|
194
|
+
enumerable: true,
|
|
195
|
+
get: function () { return chunkILKUL7GD_cjs.mean; }
|
|
196
|
+
});
|
|
197
|
+
Object.defineProperty(exports, "moveTowards", {
|
|
198
|
+
enumerable: true,
|
|
199
|
+
get: function () { return chunkILKUL7GD_cjs.moveTowards; }
|
|
200
|
+
});
|
|
201
|
+
Object.defineProperty(exports, "percentileSorted", {
|
|
202
|
+
enumerable: true,
|
|
203
|
+
get: function () { return chunkILKUL7GD_cjs.percentileSorted; }
|
|
204
|
+
});
|
|
205
|
+
Object.defineProperty(exports, "pingPong", {
|
|
206
|
+
enumerable: true,
|
|
207
|
+
get: function () { return chunkILKUL7GD_cjs.pingPong; }
|
|
208
|
+
});
|
|
209
|
+
Object.defineProperty(exports, "radians", {
|
|
210
|
+
enumerable: true,
|
|
211
|
+
get: function () { return chunkILKUL7GD_cjs.radians; }
|
|
212
|
+
});
|
|
213
|
+
Object.defineProperty(exports, "remap", {
|
|
214
|
+
enumerable: true,
|
|
215
|
+
get: function () { return chunkILKUL7GD_cjs.remap; }
|
|
216
|
+
});
|
|
217
|
+
Object.defineProperty(exports, "roundTo", {
|
|
218
|
+
enumerable: true,
|
|
219
|
+
get: function () { return chunkILKUL7GD_cjs.roundTo; }
|
|
220
|
+
});
|
|
221
|
+
Object.defineProperty(exports, "smootherstep", {
|
|
222
|
+
enumerable: true,
|
|
223
|
+
get: function () { return chunkILKUL7GD_cjs.smootherstep; }
|
|
224
|
+
});
|
|
225
|
+
Object.defineProperty(exports, "smoothstep", {
|
|
226
|
+
enumerable: true,
|
|
227
|
+
get: function () { return chunkILKUL7GD_cjs.smoothstep; }
|
|
228
|
+
});
|
|
229
|
+
Object.defineProperty(exports, "snap", {
|
|
230
|
+
enumerable: true,
|
|
231
|
+
get: function () { return chunkILKUL7GD_cjs.snap; }
|
|
232
|
+
});
|
|
233
|
+
Object.defineProperty(exports, "wrap", {
|
|
234
|
+
enumerable: true,
|
|
235
|
+
get: function () { return chunkILKUL7GD_cjs.wrap; }
|
|
236
|
+
});
|
|
237
|
+
//# sourceMappingURL=math.cjs.map
|
|
238
|
+
//# sourceMappingURL=math.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"math.cjs"}
|