import React from 'react'; import type { EffectOptions } from '../canvas/index.js'; import type { TrackOptions } from '../core/driver.js'; import type { PointerOptions } from '../core/pointer.js'; import type { SliderHandle, SliderOptions } from '../core/slider.js'; export interface ScrollVarsBootProps { /** Disable document-wide variables when unused. Omit to keep the current global setting. */ pageOutputs?: boolean; /** CSP nonce, forwarded to the pre-paint script tag. Required under a * strict `script-src` that has no `'unsafe-inline'`. */ nonce?: string; } export declare const ScrollVarsBoot: React.FC; /** * Track an element with the scroll driver. * No React state is touched on scroll. Values land as CSS variables. */ export declare function useTrack(options?: TrackOptions): React.RefObject; /** * Animation knobs as component attributes. Sugar that compiles to the * corresponding CSS variables. The variables stay the real API; these * props just save the `style={{'--sv-…'}}` ceremony. */ export interface VarProps { /** Stagger position (`--sv-order`). */ order?: number; /** Travel distance, any CSS length (`--sv-distance`). */ distance?: string; /** Per-order delay in ms (`--sv-stagger`). */ stagger?: number; /** Transition duration in ms (`--sv-duration`). */ duration?: number; /** Timing function (`--sv-ease`). */ ease?: string; } export interface TrackProps extends React.HTMLAttributes, TrackOptions, VarProps { as?: React.ElementType; } /** The base building block: a tag tracked by the driver. */ export declare const Track: React.FC; export type ItemEffect = 'rise' | 'fade' | 'slide-l' | 'slide-r' | 'drift' | 'tilt'; export interface ItemProps extends React.HTMLAttributes, VarProps { as?: React.ElementType; /** Which preset animates this element (default 'rise'). */ effect?: ItemEffect; } /** * A child of a tracked section, fully configured by attributes: * ``. No classes, no * style-variable ceremony. Renders `sv-` + the vars. */ export declare const Item: React.FC; export interface RevealProps extends Omit { /** Animate every direct child with an automatic stagger. No classes needed. */ auto?: boolean; } /** * Entrance section: latches once, children rise in with a stagger. * With `auto`, direct children animate in DOM order (opt one out with * `sv-skip`); without it, mark children with `sv-rise` / `sv-fade` and * order them via `--sv-order`. */ export declare const Reveal: React.FC; export interface ParallaxProps extends Omit { } /** Continuous drift tied to the scroll position. No transition lag. */ export declare const Parallax: React.FC; export interface ScenesState { /** Current scene index (re-renders only on integer change). */ scene: number; goTo: (scene: number, smooth?: boolean) => void; /** True once reduced motion is confirmed (OS setting or the page's * data-sv-motion switch). Starts false so server and first client render * match. See `active` for the single condition that governs rendering * every scene at once. */ reduced: boolean; /** False whenever the scene index is not trustworthy on its own: before * the tracker's first successful frame (server render, no JS, not yet * attached), after a failed attach, after the pinned stage falls back to * document flow (driver.ts applyPinHelper, onFlow), or under reduced * motion. `` renders every scene stacked while this is false, so * content already in the pinned stretch stays reachable; a hand-rolled * `useScenes` consumer should do the same. Starts false so server and * first client render match. */ active: boolean; } export declare function useScenes(count: number, options?: Omit): { ref: React.RefObject; scene: number; goTo: (target: number, smooth?: boolean) => void; reduced: boolean; active: boolean; }; export interface ScenesProps extends Omit { count: number; /** Container height; defaults to one viewport per scene. */ height?: string; children: (state: ScenesState) => React.ReactNode; } /** * Pinned storytelling: the container is N screens tall, the content sticks * and the scroll drives the scene index. The continuous `--sv-scene` * variable stays on the element for pure-CSS effects (progress bars). */ export interface SplitProps extends React.HTMLAttributes, VarProps { children: string; /** 'word' (default) or 'char'. */ by?: 'word' | 'char'; as?: React.ElementType; } /** * SplitText-lite, server-rendered: the text arrives as word/char spans with * `--sv-order` already in the HTML. No client-side splitting, no layout * shift, no hydration flash. Pair with `sv-split-rise` (staggered entrance) * or `sv-reading` (scrubbed) on a tracked ancestor. */ export declare const Split: React.FC; export declare const Scenes: React.FC; /** * Mount a canvas effect (see `scrollvars/canvas`). Callbacks follow the * latest-ref pattern. Changing them never remounts the effect. */ export declare function useCanvasEffect(options: EffectOptions): React.RefObject; /** * Featherweight carousel on native scroll + snap (see `scrollvars/slider` * docs in the core module). Returns the container ref, the active index * (re-renders only when it changes) and next/prev/goTo controls. Slides get * `--sd` / `.sv-active` for pure-CSS animation. */ export declare function useSlider(options?: Omit): { ref: React.RefObject; active: number; next: (smooth?: boolean) => void | undefined; prev: (smooth?: boolean) => void | undefined; goTo: (index: number, smooth?: boolean) => void | undefined; handle: React.RefObject; }; export interface SliderComponentProps extends Omit, 'onScroll'> { /** Slides per view. A number, or a responsive map: `{ base: 1.2, md: 2.5, xl: 4 }` * (Tailwind breakpoint names or raw min-width numbers). Fractional = peek. */ perView?: number | Record; /** Gap between slides (px number or CSS length). */ gap?: number | string; snap?: 'mandatory' | 'proximity'; drag?: boolean; duration?: number; axis?: 'x' | 'y'; /** Publish animation CSS variables (default true); disable for plain carousels. */ cssVars?: boolean; arrows?: boolean; dots?: boolean; /** Auto-advance interval in ms (wraps to the start). Pauses on hover, * keyboard focus, offscreen and hidden tab; renders a visible pause/resume * control (APG carousel pattern). */ autoplay?: number; /** Accessible name for the carousel region. Default "carousel". */ label?: string; pauseIcon?: React.ReactNode; playIcon?: React.ReactNode; prevIcon?: React.ReactNode; nextIcon?: React.ReactNode; /** Full control over each dot's content; wiring/aria stay handled. */ renderDot?: (index: number, active: boolean) => React.ReactNode; onSlide?: (index: number) => void; children: React.ReactNode; } /** * The batteries-included carousel: `useSlider` + chrome. Everything visual * hangs off stable classes (`sv-slider-shell`, `sv-arrow`, `sv-dots`, * `sv-dot`) and var knobs (`--sv-arrow-*`, `--sv-dot-*`). Override them * globally for the project or per instance via className/style. A ref * exposes the full SliderHandle for external controls placed anywhere. */ export declare const Slider: React.ForwardRefExoticComponent>; export interface SlideProps extends React.HTMLAttributes { /** Columns this slide spans (per-slide override. Vars cascade). */ span?: number; } /** One slide. Per-slide knobs are just vars: `span`, or any `--sv-*` in style. */ export declare const Slide: React.FC; export interface MarqueeProps extends React.HTMLAttributes { /** Seconds for one full loop (default 30). */ speed?: number; children: React.ReactNode; } /** Infinite strip (logos, taglines): two copies of the children on a CSS * animation. Includes a keyboard pause toggle; pauses on hover/focus and * stops under prefers-reduced-motion. Static until its toggle driver attaches. */ export declare const Marquee: React.FC; export interface AccordionProps extends Omit, 'title'> { title: React.ReactNode; /** Same name = native exclusive group (one open at a time). */ group?: string; children: React.ReactNode; } /** Native
with animated height. Accessibility for free. */ export declare const Accordion: React.FC; export interface ModalProps extends React.DialogHTMLAttributes { open: boolean; onClose?: () => void; children: React.ReactNode; } /** Native + the sv-pop entry/exit preset. */ export declare const Modal: React.FC; /** Pointer tilt for every `.sv-tilt` descendant. One delegated listener. */ export declare function usePointer(options?: PointerOptions): React.RefObject;