export { C as ConductorConfig, a as ConductorLane, b as ConductorStats, F as FrameFn, S as SubscribeOptions, c as SubscriberPriority, d as SubscriberStat, g as getConductor } from './conductor-D83xroU5.cjs'; export { A as AdaptiveState, B as BudgetState, a as BudgetTier, D as DeviceSignals, P as PointerSensor, b as PressureSource, c as PressureState, R as RectLike, S as ScrollSensor, d as SensorBus, e as SensorState, V as ViewportSensor, f as clamp01, g as damp, h as getAdaptiveQuality, i as getAnimationBudget, j as getFramePressure, k as getSensorBus, r as rayRectIntersect } from './FramePressure-BI3t0lXG.cjs'; /** * RendererHealth — has the graphics context died, and how many times. * * A browser can take a WebGL context away at any moment: a GPU driver reset, a * tab backgrounded on a phone, too many live contexts on one page, the OS * reclaiming memory. When it happens the canvas fires `webglcontextlost`, three * passes the event along, and **React Three Fiber does nothing with it** — * verified against 9.6.1, there is no handler anywhere in the bundle. The * result is a permanently black canvas with no error in the console. * * ## Why this is a page-level singleton and not per-canvas * * A driver reset takes every context on the page at once, so a page-level * signal is the truthful one for the common case. It also has to be readable * from *outside* the canvas — R3F runs its own reconciler, so React context * does not cross the `` boundary, and the component that decides what * to render instead is on the other side of it. * * The cost is that a single lost context bumps the generation for every scene * on the page. Given a lost context is rare and a remount is cheap next to a * black canvas, that trade is deliberate. * * ## What recovery actually is * * Not `webglcontextrestored`. That event only helps if every buffer, texture, * program and render target is rebuilt by hand in the right order, which * almost nothing does correctly, and R3F does not do at all. * * The recovery here is a **generation counter**. It increments on loss, a * scene puts it on its ``, React unmounts the dead tree and mounts * a fresh one, and R3F builds a new context with every resource re-created * from the React tree it already has. The rebuild is something React is * already good at; the only missing piece was knowing when to ask for it. * * `preventDefault()` on the lost event still matters and the adapter calls it — * without it the browser will not even attempt a restore, and some drivers * refuse a new context on the same page afterwards. */ interface RendererHealthState { /** True between a context being lost and a replacement being mounted. */ lost: boolean; /** * Increments once per loss. Put it on a `` — changing it is what * makes React throw away the dead tree and build a working one. */ generation: number; /** When the most recent loss happened, or `null` if there has not been one. */ lastLostAt: number | null; } type HealthListener = (state: RendererHealthState) => void; declare class RendererHealth { #private; get state(): RendererHealthState; subscribe(fn: HealthListener): () => void; /** * Report a lost context. Called by the R3F adapter. * * Repeated calls while already lost do not stack. A driver reset fires the * event on every canvas on the page, and one reset should mean one rebuild, * not one rebuild per canvas. */ reportLost(): void; /** * Report a working context. Called when a renderer mounts successfully, * which after a loss means the replacement is up. */ reportHealthy(): void; } /** Lazy singleton. Client-only construction, SSR-import-safe. */ declare function getRendererHealth(): RendererHealth; /** * @vectorvesper/motion — core entry (".") * * Zero runtime dependencies. Framework-agnostic: usable from vanilla JS, Vue, * Svelte, or any renderer. React adapters live in "@vectorvesper/motion/react". * * ## What this entry exports * * The whole public core API. It is small on purpose: four singleton getters, * a few pure helpers, and the types you need to use them. * * The classes behind those singletons (PointerIntent, MagneticElement, * VideoScrubber, SensorBus, BudgetPolicy) are not exported. Use the React * hooks instead. They handle setup and teardown for you. Refresh-rate * detection and the device-tier heuristic are internal. * * This surface can still change while 2.0 is in progress. Once 2.0 ships, * removing anything from it is a breaking change. `scripts/check-api.mjs` * diffs the built output against api-surface.json so nothing moves by * accident. */ /** * The published package version. Support questions start with "which version?", * and until now there was no way for a consumer to answer that at runtime. * * Substituted at build time from package.json by tsup's `define`, so it cannot * drift from the actual version. * * It was added hoping it would also fix a structural problem — this file is * otherwise entirely `export … from`, which compiles to a root entry whose every * statement forwards to a hashed chunk, and Framer's resolver rejects that as * "not a valid npm package (f3)". **It did not fix it.** With splitting on, and * with "./react" now mirroring this surface, the constant is shared between both * entries, so tsup hoists it into the chunk and the root stays a pure barrel. * * The working fix is that "./react" re-exports everything here — see * entry.react.ts. Import from "@vectorvesper/motion/react" in Framer. */ declare const VERSION: string; export { type RendererHealthState, VERSION, getRendererHealth };