@ansh-ui/react 0.3.0 → 0.3.1
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/dist/{chunk-YACOHFYJ.cjs → chunk-2U7BHYIQ.cjs} +121 -121
- package/dist/chunk-2U7BHYIQ.cjs.map +1 -0
- package/dist/{chunk-WNWGYXJY.js → chunk-7QGB2X7R.js} +34 -26
- package/dist/chunk-7QGB2X7R.js.map +1 -0
- package/dist/{chunk-OLTS6G5M.js → chunk-GNA33V2J.js} +11 -6
- package/dist/chunk-GNA33V2J.js.map +1 -0
- package/dist/{chunk-IZ6T7LO3.cjs → chunk-MPX7QT4R.cjs} +2 -2
- package/dist/chunk-MPX7QT4R.cjs.map +1 -0
- package/dist/{chunk-PVDQPVYF.js → chunk-NJUVVMJV.js} +2 -2
- package/dist/chunk-NJUVVMJV.js.map +1 -0
- package/dist/{chunk-CWYBOVCZ.js → chunk-RGGNLAAA.js} +121 -121
- package/dist/chunk-RGGNLAAA.js.map +1 -0
- package/dist/{chunk-OJN5JBNP.cjs → chunk-VJI6V27F.cjs} +99 -99
- package/dist/chunk-VJI6V27F.cjs.map +1 -0
- package/dist/{chunk-HPGCILO4.js → chunk-XRKZPLUT.js} +99 -99
- package/dist/chunk-XRKZPLUT.js.map +1 -0
- package/dist/{chunk-DATBU46V.cjs → chunk-XYT6OXKP.cjs} +10 -4
- package/dist/chunk-XYT6OXKP.cjs.map +1 -0
- package/dist/{chunk-3SWO2M33.cjs → chunk-YVJB7AAZ.cjs} +34 -26
- package/dist/chunk-YVJB7AAZ.cjs.map +1 -0
- package/dist/data.cjs +16 -16
- package/dist/data.d.cts +23 -22
- package/dist/data.d.ts +23 -22
- package/dist/data.js +1 -1
- package/dist/form.cjs +36 -36
- package/dist/form.d.cts +2 -0
- package/dist/form.d.ts +2 -0
- package/dist/form.js +1 -1
- package/dist/index.cjs +99 -99
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -9
- package/dist/index.js.map +1 -1
- package/dist/{motion-DsQPOsTT.d.cts → motion-C6WfBFES.d.cts} +20 -17
- package/dist/{motion-DoT_sTl1.d.ts → motion-ugXmf505.d.ts} +20 -17
- package/dist/motion.cjs +17 -17
- package/dist/motion.d.cts +1 -1
- package/dist/motion.d.ts +1 -1
- package/dist/motion.js +1 -1
- package/dist/navigation.cjs +8 -8
- package/dist/navigation.js +1 -1
- package/dist/overlay.cjs +15 -15
- package/dist/overlay.d.cts +14 -12
- package/dist/overlay.d.ts +14 -12
- package/dist/overlay.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-3SWO2M33.cjs.map +0 -1
- package/dist/chunk-CWYBOVCZ.js.map +0 -1
- package/dist/chunk-DATBU46V.cjs.map +0 -1
- package/dist/chunk-HPGCILO4.js.map +0 -1
- package/dist/chunk-IZ6T7LO3.cjs.map +0 -1
- package/dist/chunk-OJN5JBNP.cjs.map +0 -1
- package/dist/chunk-OLTS6G5M.js.map +0 -1
- package/dist/chunk-PVDQPVYF.js.map +0 -1
- package/dist/chunk-WNWGYXJY.js.map +0 -1
- package/dist/chunk-YACOHFYJ.cjs.map +0 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/factory/create-effect-component.tsx","../src/components/backgrounds.tsx","../src/components/ui/buttons.tsx","../src/components/ui/cards.tsx","../src/components/ui/dock.tsx","../src/components/ui/text-effects.tsx","../src/components/ui/feedback.tsx","../src/components/ui/marketing.tsx","../src/components/ui/scramble-text.tsx","../src/components/ui/text-rotate.tsx","../src/components/ui/before-after.tsx","../src/components/ui/device-mockup.tsx","../src/components/ui/card-stack.tsx","../src/components/navigation/carousel.tsx","../src/components/feedback/alert.tsx","../src/index.ts"],"names":["Component","forwardRef","Button","ripple","useRef","rippleBehaviour","jsx","IconButton","SpotlightCard","useEffect","GlowCard","TiltCard3D","getTicker","jsxs","useState","useMemo","stagger","pr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A,IAAA,IAAQ,KAAA,CAAM,IAAI,CAAA,EACrB,CAAA;AAAA,oBACAO,IAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,oBAAA,EACZ,QAAA,EAAA;AAAA,MAAA,KAAA,mBAAQP,GAAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,qBAAA,EAAuB,iBAAM,CAAA,GAAO,IAAA;AAAA,sBAC1DA,GAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,yBAAyB,QAAA,EAAS;AAAA,KAAA,EACnD;AAAA,GAAA,EACF,CAAA;AAEJ;ACyCO,IAAM,OAAA,GAAU","file":"index.js","sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type CSSProperties,\n type ElementType,\n type ForwardRefExoticComponent,\n type ForwardedRef,\n type ReactNode,\n type RefAttributes,\n forwardRef,\n useEffect,\n useRef,\n} from 'react'\nimport {\n type BaseEffectOptions,\n type EffectDefinition,\n type EffectHandle,\n mountEffect,\n} from '@ansh-ui/core'\nimport { useMergedRef } from '../hooks/use-observers'\n\n/**\n * Turn an {@link EffectDefinition} into a React component.\n *\n * This factory is why the component count can scale without the maintenance cost scaling with it.\n * Every canvas-backed component in the library is one line:\n *\n * ```tsx\n * export const AuroraBackground = createEffectComponent(aurora, 'AuroraBackground')\n * ```\n *\n * and gets, for free:\n *\n * - **SSR safety.** The server renders only the host element and its children. The canvas is\n * created in an effect, so server and first-client markup are byte-identical and React never\n * reports a hydration mismatch.\n * - **Prop diffing that doesn't remount.** Options are compared shallowly and pushed through\n * `handle.update()`, which live-updates what it can and remounts only what it must.\n * - **A polymorphic `as` prop**, so a background can be a `<section>`, `<div>`, or `<aside>`\n * without a wrapper element.\n * - **Ref forwarding** to the host element.\n * - **Complete teardown**, verified by the leak harness in the test suite.\n */\n\n/** Props every effect component accepts on top of its own options. */\nexport interface EffectComponentBaseProps {\n /** Element to render as the host. Default `'div'`. */\n as?: ElementType\n className?: string\n style?: React.CSSProperties\n /** Content rendered above the canvas. Positioned automatically. */\n children?: ReactNode\n}\n\nexport type EffectComponentProps<Options extends BaseEffectOptions> = Options &\n EffectComponentBaseProps &\n Omit<ComponentPropsWithoutRef<'div'>, keyof Options | 'style' | 'className' | 'children'>\n\n/** The type of a component produced by {@link createEffectComponent}. */\nexport type EffectComponent<Options extends BaseEffectOptions> = ForwardRefExoticComponent<\n EffectComponentProps<Options> & RefAttributes<HTMLElement>\n>\n\n/**\n * The render function's own props type.\n *\n * Deliberately loose. The component genuinely accepts arbitrary props — it partitions them at\n * runtime into effect options and DOM attributes by consulting the definition's `defaults`. Typing\n * the render function with the precise generic instead makes `forwardRef` unable to relate\n * `PropsWithoutRef<P>` back to `P` for an unresolved `P`, which is a long-standing limitation\n * rather than a signal that anything is wrong.\n *\n * Precision is restored at the export boundary via {@link EffectComponent}, which is the type\n * consumers actually see.\n */\ntype LooseProps = Record<string, unknown> & {\n as?: ElementType\n className?: string\n style?: CSSProperties\n children?: ReactNode\n}\n\n/**\n * Host styles.\n *\n * `isolation: isolate` creates a new stacking context, which stops the canvas' blend modes from\n * compositing against the *page* behind the component. Without it, an effect using `lighter`\n * bleeds into whatever is underneath the section, which is almost never intended and is very\n * confusing to debug.\n */\nconst HOST_STYLE: React.CSSProperties = {\n position: 'relative',\n isolation: 'isolate',\n overflow: 'hidden',\n}\n\n/** Children sit above the canvas without needing the author to manage z-index. */\nconst CONTENT_STYLE: React.CSSProperties = {\n position: 'relative',\n zIndex: 1,\n}\n\nexport function createEffectComponent<Options extends BaseEffectOptions>(\n definition: EffectDefinition<Options>,\n displayName?: string,\n): EffectComponent<Options> {\n /** Keys the effect understands, so the rest can be forwarded to the DOM element. */\n const optionKeys = new Set(Object.keys(definition.defaults))\n\n function Render(props: LooseProps, forwardedRef: ForwardedRef<HTMLElement>) {\n const { as: Component = 'div', className, style, children, ...rest } = props\n\n const hostRef = useRef<HTMLElement | null>(null)\n const handleRef = useRef<EffectHandle | null>(null)\n const mergedRef = useMergedRef<HTMLElement>(hostRef, forwardedRef)\n\n // Split props into effect options and DOM attributes. Doing this every render is cheap\n // (a handful of key lookups) and means an author can put `aria-label` or `onClick` on the\n // component and have it land on the element rather than being swallowed.\n const options: Record<string, unknown> = {}\n const domProps: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(rest)) {\n if (optionKeys.has(key)) options[key] = value\n else domProps[key] = value\n }\n\n // Serialised options, used as the effect dependency. Comparing a serialisation rather than\n // referential identity is what lets an author pass an inline `colors={['#fff', '#000']}`\n // array without remounting the effect on every render.\n const optionsKey = stableKey(options)\n const optionsRef = useRef(options)\n optionsRef.current = options\n\n // Mount once. Options changes flow through the update effect below.\n useEffect(() => {\n const host = hostRef.current\n if (!host) return\n\n const handle = mountEffect(definition, host, optionsRef.current as Partial<Options>)\n handleRef.current = handle\n\n return () => {\n handle.destroy()\n handleRef.current = null\n }\n // Intentionally mount-only. `mountEffect` owns its own reconciliation, and remounting on\n // every option change would restart particle systems and lose all their state.\n }, [])\n\n useEffect(() => {\n handleRef.current?.update(optionsRef.current as Partial<BaseEffectOptions>)\n // Keyed on the serialisation so this fires exactly when an option actually changed.\n }, [optionsKey])\n\n return (\n <Component\n ref={mergedRef}\n className={className}\n style={{ ...HOST_STYLE, ...style }}\n {...domProps}\n >\n {children != null ? <div style={CONTENT_STYLE}>{children}</div> : null}\n </Component>\n )\n }\n\n const Component = forwardRef(Render)\n Component.displayName = displayName ?? `Ansh(${definition.name})`\n\n return Component as unknown as EffectComponent<Options>\n}\n\n/**\n * A stable string key for an options object.\n *\n * Not `JSON.stringify` directly: key order in a spread-built object is not guaranteed to match\n * between renders, and a reordered serialisation would look like a change and trigger a needless\n * update. Sorting the keys makes the key genuinely value-based.\n *\n * Functions are serialised by identity marker rather than by body — an inline callback changes\n * identity every render, and treating that as an option change would defeat the whole purpose.\n */\nfunction stableKey(options: Record<string, unknown>): string {\n const keys = Object.keys(options).sort()\n const parts: string[] = []\n for (const key of keys) {\n const value = options[key]\n if (typeof value === 'function') {\n parts.push(`${key}:fn`)\n } else if (value === undefined) {\n // Skipped entirely: `undefined` means \"not supplied\", and including it would make\n // `<X speed={undefined} />` differ from `<X />`.\n continue\n } else {\n parts.push(`${key}:${JSON.stringify(value)}`)\n }\n }\n return parts.join('|')\n}\n","import {\n animatedGradient,\n aurora,\n blob,\n constellation,\n fireflies,\n floatingGeometry,\n lightRays,\n meshGradient,\n meteors,\n noiseLayer,\n orbit,\n particleField,\n powderExplosion,\n rain,\n smoke,\n snow,\n spotlight,\n strangeAttractor,\n swarm,\n waves,\n} from '@ansh-ui/core'\nimport { createEffectComponent } from '../factory/create-effect-component'\n\n/**\n * Canvas-backed background components.\n *\n * Each is a single call to {@link createEffectComponent}, which supplies SSR safety, prop\n * diffing, ref forwarding, polymorphic `as`, and teardown. The visual behaviour lives entirely in\n * `@ansh-ui/core`, so these definitions are the complete React binding — there is no per-component\n * React logic to get wrong, and the Vue components are the same effects with a different factory.\n *\n * Every component accepts its effect's full option surface plus `as`, `className`, `style`,\n * `children`, and any DOM attribute.\n *\n * ```tsx\n * <AuroraBackground colors={['#0275f4', '#9f0550']} intensity={1.2} className=\"h-screen\">\n * <h1>Motion, refined.</h1>\n * </AuroraBackground>\n * ```\n */\n\n/** Vertical curtains of light with ridged filament structure. */\nexport const AuroraBackground = createEffectComponent(aurora, 'AuroraBackground')\n\n/** Soft overlapping colour fields that drift on non-repeating Lissajous paths. */\nexport const MeshGradient = createEffectComponent(meshGradient, 'MeshGradient')\n\n/** A rotating multi-stop linear gradient. One fill per frame — the cheap option. */\nexport const AnimatedGradient = createEffectComponent(animatedGradient, 'AnimatedGradient')\n\n/** Points advected by a divergence-free curl-noise flow field. */\nexport const ParticleField = createEffectComponent(particleField, 'ParticleField')\n\n/** Drifting nodes joined by lines, with the pointer as a live node. */\nexport const Constellation = createEffectComponent(constellation, 'Constellation')\n\n/** Streaks falling across the canvas, spawned as a Poisson process. */\nexport const MeteorShower = createEffectComponent(meteors, 'MeteorShower')\n\n/** Depth-parallaxed rain, optionally with splash rings. */\nexport const Rain = createEffectComponent(rain, 'Rain')\n\n/** Depth-parallaxed snow with independent per-flake sway. */\nexport const Snow = createEffectComponent(snow, 'Snow')\n\n/** Wandering points with asymmetric bioluminescent pulsing. */\nexport const Fireflies = createEffectComponent(fireflies, 'Fireflies')\n\n/** Layered undulating bands built from three incommensurable sines plus noise. */\nexport const Waves = createEffectComponent(waves, 'Waves')\n\n/** Organic shapes morphing via noise sampled on a closed circle. */\nexport const LiquidBlob = createEffectComponent(blob, 'LiquidBlob')\n\n/**\n * Film grain and dither overlay.\n *\n * Place this *above* a gradient to hide 8-bit banding and give flat colour a physical texture.\n * It is the cheapest single change that makes a gradient look deliberate.\n */\nexport const NoiseLayer = createEffectComponent(noiseLayer, 'NoiseLayer')\n\n/** A soft light that follows the pointer, easing in and out of existence. */\nexport const Spotlight = createEffectComponent(spotlight, 'Spotlight')\n\n/** Volumetric shafts fanning from a source point, with noise-driven per-shaft brightness. */\nexport const LightRays = createEffectComponent(lightRays, 'LightRays')\n\n/** A rising plume: curl-advected puffs that expand and dissipate over their life. */\nexport const Smoke = createEffectComponent(smoke, 'Smoke')\n\n/**\n * Bursts of fine particles that decelerate hard and settle.\n *\n * Bursts arrive on a Poisson schedule, and — with `burstOnPress` — on pointer press, which makes\n * this the one background here that doubles as a click affordance.\n */\nexport const PowderExplosion = createEffectComponent(powderExplosion, 'PowderExplosion')\n\n/** Polygons drifting in depth, projected through a real perspective divide. */\nexport const FloatingGeometry = createEffectComponent(floatingGeometry, 'FloatingGeometry')\n\n/** Nested rings of points circling a centre, depth-ordered so near points occlude far ones. */\nexport const Orbit = createEffectComponent(orbit, 'Orbit')\n\n/** A chaotic iterated map plotted as a drifting cloud — Clifford, de Jong or Svensson. */\nexport const StrangeAttractor = createEffectComponent(strangeAttractor, 'StrangeAttractor')\n\n/** Particles bound to moving attractors, orbiting rather than collapsing. Follows the pointer. */\nexport const Swarm = createEffectComponent(swarm, 'Swarm')\n","import {\n type ButtonHTMLAttributes,\n type ElementType,\n type ForwardedRef,\n type ReactNode,\n forwardRef,\n useRef,\n} from 'react'\nimport { magnetic, ripple as rippleBehaviour } from '@ansh-ui/core'\nimport { useBehaviour } from '../../factory/create-behaviour-component'\nimport { useMergedRef } from '../../hooks/use-observers'\n\n/**\n * Buttons.\n *\n * The visual treatments are CSS — a shimmer sweep, a rotating conic border, a fill that rises on\n * hover. None of them need JavaScript, and doing them in JS would mean tracking hover in React\n * state and re-rendering on every pointer event.\n *\n * What *does* need JavaScript is the physics: magnetic attraction and the ripple both read pointer\n * position every frame. Those come from the engine's behaviours, attached via `useBehaviour`, so\n * the button element itself carries them rather than being wrapped in another div.\n */\n\nexport type ButtonVariant = 'solid' | 'ghost' | 'shimmer' | 'glow' | 'liquid'\nexport type ButtonSize = 'sm' | 'md' | 'lg'\n\nexport interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'> {\n variant?: ButtonVariant\n size?: ButtonSize\n /** Render as a different element — `'a'` for links. Default `'button'`. */\n as?: ElementType\n /**\n * Pull toward the pointer, in pixels of maximum displacement. `0` disables.\n * Spring-driven, so it has weight rather than tracking the cursor rigidly. Default `0`.\n */\n magneticStrength?: number\n /** Emit a ripple from the point of contact. Default `false`. */\n ripple?: boolean\n /** Colours for the `glow` variant's rotating border. */\n glowColors?: readonly [string, string]\n /** Seconds per rotation or sweep, depending on variant. */\n duration?: number\n children?: ReactNode\n}\n\n/**\n * ```tsx\n * <Button variant=\"shimmer\" magneticStrength={14}>Get started</Button>\n * <Button variant=\"glow\" glowColors={['#0275f4', '#9f0550']}>Upgrade</Button>\n * <Button variant=\"liquid\" ripple>Deploy</Button>\n * ```\n */\nexport const Button = forwardRef(function Button(\n {\n variant = 'solid',\n size = 'md',\n as: Component = 'button',\n magneticStrength = 0,\n ripple = false,\n glowColors,\n duration,\n className,\n style,\n children,\n ...rest\n }: ButtonProps,\n forwardedRef: ForwardedRef<HTMLButtonElement>,\n) {\n const localRef = useRef<HTMLButtonElement | null>(null)\n const mergedRef = useMergedRef<HTMLButtonElement>(localRef, forwardedRef)\n\n // Both hooks are always called — React requires a stable hook order — and each no-ops when its\n // feature is off, rather than being conditionally invoked.\n useBehaviour(localRef, magnetic, {\n strength: magneticStrength,\n disabled: magneticStrength <= 0,\n scale: magneticStrength > 0 ? 1.03 : 1,\n })\n\n useBehaviour(localRef, rippleBehaviour, { disabled: !ripple })\n\n const classes = [\n 'ansh-btn',\n `ansh-btn--${variant}`,\n size !== 'md' && `ansh-btn--${size}`,\n 'ansh-focusable',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n // Variant knobs travel as custom properties so the stylesheet stays static and themeable.\n const cssVars: Record<string, string> = {}\n if (glowColors) {\n cssVars['--ansh-glow-from'] = glowColors[0]\n cssVars['--ansh-glow-via'] = glowColors[1]\n cssVars['--ansh-glow-to'] = glowColors[0]\n }\n if (duration !== undefined) {\n cssVars['--ansh-glow-duration'] = `${duration}s`\n cssVars['--ansh-shimmer-duration'] = `${duration}s`\n }\n\n return (\n <Component ref={mergedRef} className={classes} style={{ ...cssVars, ...style }} {...rest}>\n {children}\n </Component>\n )\n})\n\nexport interface IconButtonProps extends ButtonProps {\n /** Required: an icon-only control has no visible text, so it needs an accessible name. */\n label: string\n}\n\n/**\n * A square, icon-only button.\n *\n * `label` is required rather than optional. An icon-only control with no accessible name is\n * announced as just \"button\" by a screen reader, and making the prop optional guarantees some\n * consumers will omit it.\n */\nexport const IconButton = forwardRef(function IconButton(\n { label, className, ...rest }: IconButtonProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n return (\n <Button\n ref={ref}\n aria-label={label}\n className={['ansh-btn--icon', className].filter(Boolean).join(' ')}\n style={{ padding: 'var(--ansh-space-3)', aspectRatio: '1' }}\n {...rest}\n />\n )\n})\n","import {\n type ElementType,\n type ForwardedRef,\n type HTMLAttributes,\n type ReactNode,\n forwardRef,\n useEffect,\n useRef,\n} from 'react'\nimport { getTicker } from '@ansh-ui/core'\nimport { useMergedRef } from '../../hooks/use-observers'\n\n/**\n * Cards.\n *\n * `SpotlightCard` and `GlowCard` both need the pointer position, but neither needs the full\n * `trackPointer` machinery from the engine — they write two CSS custom properties and let the\n * stylesheet do the rest, which is cheaper and doesn't need a spring. Writing to\n * `style.setProperty` bypasses React's render cycle entirely, which is what keeps a 60 Hz pointer\n * handler from costing a re-render.\n */\n\nexport interface SpotlightCardProps extends HTMLAttributes<HTMLDivElement> {\n as?: ElementType\n /** Highlight colour. Any CSS colour. Default a soft brand blue. */\n color?: string\n /** Diameter of the highlight in pixels. Default `320`. */\n size?: number\n children?: ReactNode\n}\n\n/**\n * A card with a radial highlight that follows the pointer.\n *\n * ```tsx\n * <SpotlightCard color=\"rgb(2 117 244 / 0.25)\">\n * <h3>Fast by default</h3>\n * </SpotlightCard>\n * ```\n */\nexport const SpotlightCard = forwardRef(function SpotlightCard(\n { as: Component = 'div', color, size, className, children, ...rest }: SpotlightCardProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) {\n const localRef = useRef<HTMLDivElement | null>(null)\n const mergedRef = useMergedRef<HTMLDivElement>(localRef, forwardedRef)\n\n useEffect(() => {\n const node = localRef.current\n if (!node) return\n\n const onMove = (event: PointerEvent) => {\n const rect = node.getBoundingClientRect()\n node.style.setProperty('--ansh-spot-x', `${event.clientX - rect.left}px`)\n node.style.setProperty('--ansh-spot-y', `${event.clientY - rect.top}px`)\n }\n const onEnter = () => node.style.setProperty('--ansh-spot-opacity', '1')\n const onLeave = () => node.style.setProperty('--ansh-spot-opacity', '0')\n\n node.addEventListener('pointermove', onMove, { passive: true })\n node.addEventListener('pointerenter', onEnter, { passive: true })\n node.addEventListener('pointerleave', onLeave, { passive: true })\n return () => {\n node.removeEventListener('pointermove', onMove)\n node.removeEventListener('pointerenter', onEnter)\n node.removeEventListener('pointerleave', onLeave)\n }\n }, [])\n\n const cssVars: Record<string, string> = {}\n if (color) cssVars['--ansh-spot-color'] = color\n if (size) cssVars['--ansh-spot-size'] = `${size}px`\n\n return (\n <Component\n ref={mergedRef}\n className={['ansh-card', 'ansh-card--spotlight', className].filter(Boolean).join(' ')}\n style={cssVars}\n {...rest}\n >\n {children}\n </Component>\n )\n})\n\nexport interface GlowCardProps extends HTMLAttributes<HTMLDivElement> {\n as?: ElementType\n /** The rotating border's colour stops. Default the Ansh house gradient. */\n colors?: readonly [string, string]\n /** Seconds per full rotation. Default `6`. */\n duration?: number\n children?: ReactNode\n}\n\n/**\n * A card with a slowly rotating conic-gradient border.\n *\n * The rotation is driven by an `@property`-registered custom angle animated via CSS `@keyframes`\n * — no JavaScript runs per frame. `@property` is what makes a custom property animatable at all;\n * without it browsers cannot interpolate between angle values and the gradient would jump.\n */\nexport const GlowCard = forwardRef(function GlowCard(\n { as: Component = 'div', colors, duration, className, style, children, ...rest }: GlowCardProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const cssVars: Record<string, string> = {}\n if (colors) {\n cssVars['--ansh-glow-from'] = colors[0]\n cssVars['--ansh-glow-via'] = colors[1]\n cssVars['--ansh-glow-to'] = colors[0]\n }\n if (duration !== undefined) cssVars['--ansh-glow-duration'] = `${duration}s`\n\n return (\n <Component\n ref={ref}\n className={['ansh-card', 'ansh-card--glow', className].filter(Boolean).join(' ')}\n style={{ ...cssVars, ...style }}\n {...rest}\n >\n {children}\n </Component>\n )\n})\n\nexport interface TiltCard3DProps extends HTMLAttributes<HTMLDivElement> {\n as?: ElementType\n /** Maximum rotation in degrees. Default `12`. */\n max?: number\n children?: ReactNode\n}\n\n/**\n * A lightweight 3D tilt, independent of the full `TiltCard` behaviour.\n *\n * `@ansh-ui/react` already exports `TiltCard` (spring-driven, glare, the engine's `tilt`\n * behaviour) — reach for that when the interaction should feel weighted. This is the CSS-only\n * sibling for a bento tile or a small preview card where a spring is more machinery than the\n * moment calls for; it follows the pointer directly with a `transition` easing back to rest.\n */\nexport const TiltCard3D = forwardRef(function TiltCard3D(\n { as: Component = 'div', max = 12, className, style, children, ...rest }: TiltCard3DProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) {\n const localRef = useRef<HTMLDivElement | null>(null)\n const mergedRef = useMergedRef<HTMLDivElement>(localRef, forwardedRef)\n\n useEffect(() => {\n const node = localRef.current\n if (!node) return\n\n // Coalesce to the ticker's write phase rather than writing directly from the pointer event.\n // A card grid firing dozens of pointermove-driven style writes per frame is exactly the\n // per-component-rAF problem the engine's single ticker exists to avoid.\n let pending: { nx: number; ny: number } | null = null\n\n const onMove = (event: PointerEvent) => {\n const rect = node.getBoundingClientRect()\n pending = {\n nx: (event.clientX - rect.left) / rect.width - 0.5,\n ny: (event.clientY - rect.top) / rect.height - 0.5,\n }\n }\n const onLeave = () => {\n pending = { nx: 0, ny: 0 }\n }\n\n node.addEventListener('pointermove', onMove, { passive: true })\n node.addEventListener('pointerleave', onLeave, { passive: true })\n\n const stop = getTicker().add(\n () => {\n if (!pending) return\n const { nx, ny } = pending\n node.style.transform =\n `perspective(800px) rotateX(${(-ny * max).toFixed(2)}deg) ` +\n `rotateY(${(nx * max).toFixed(2)}deg)`\n },\n { phase: 'write', name: 'TiltCard3D' },\n )\n\n return () => {\n node.removeEventListener('pointermove', onMove)\n node.removeEventListener('pointerleave', onLeave)\n stop()\n }\n }, [max])\n\n return (\n <Component\n ref={mergedRef}\n className={['ansh-card', className].filter(Boolean).join(' ')}\n style={{ transition: 'transform 400ms ease-out', ...style }}\n {...rest}\n >\n {children}\n </Component>\n )\n})\n\n// ---------------------------------------------------------------------------\n// Bento grid\n// ---------------------------------------------------------------------------\n\nexport interface BentoGridProps extends HTMLAttributes<HTMLDivElement> {\n /** Number of columns at desktop width. Default `3`. */\n columns?: number\n children?: ReactNode\n}\n\n/** A responsive bento layout. Collapses to a single column below 768px. */\nexport function BentoGrid({ columns = 3, className, style, children, ...rest }: BentoGridProps) {\n return (\n <div\n className={['ansh-bento', className].filter(Boolean).join(' ')}\n style={{ ['--ansh-bento-cols' as string]: columns, ...style }}\n {...rest}\n >\n {children}\n </div>\n )\n}\n\nexport interface BentoItemProps extends HTMLAttributes<HTMLDivElement> {\n /** Columns this tile spans. Default `1`. */\n span?: number\n /** Rows this tile spans. Default `1`. */\n rowSpan?: number\n children?: ReactNode\n}\n\nexport function BentoItem({\n span = 1,\n rowSpan = 1,\n className,\n style,\n children,\n ...rest\n}: BentoItemProps) {\n return (\n <div\n className={['ansh-bento__item', 'ansh-card', className].filter(Boolean).join(' ')}\n style={{ ['--ansh-span' as string]: span, ['--ansh-row-span' as string]: rowSpan, ...style }}\n {...rest}\n >\n {children}\n </div>\n )\n}\n","import { type HTMLAttributes, type ReactNode, useEffect, useRef } from 'react'\nimport { getTicker } from '@ansh-ui/core'\n\n/**\n * A macOS-style dock with pointer magnification.\n *\n * Two details separate a dock that feels right from one that doesn't:\n *\n * **Magnification is a distance falloff, not a hover state.** Only scaling the hovered item makes\n * neighbours snap in and out abruptly. Real docks scale every item by its distance from the\n * pointer, so the bulge is continuous and the whole row responds as one surface.\n *\n * **Sizes are eased toward their target, not set directly.** Writing the computed size straight to\n * the node makes the dock track the cursor rigidly, which reads as weightless. A per-frame ease\n * gives it a small amount of lag — the thing that makes it feel physical.\n *\n * Both run in the ticker's write phase and mutate `style.width` directly. Doing this through React\n * state would re-render the whole dock on every pointer move.\n */\n\nexport interface DockItem {\n /** Icon or short label. Rendered inside the tile. */\n icon: ReactNode\n /** Tooltip text, and the accessible name for the control. */\n label: string\n onClick?: () => void\n href?: string\n}\n\nexport interface DockProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n items: readonly DockItem[]\n /** Resting tile size in pixels. Default `48`. */\n size?: number\n /** Size of a tile directly under the pointer. Default `80`. */\n magnification?: number\n /**\n * How far the magnification reaches, in pixels. Larger values bulge more neighbours.\n * Default `140`.\n */\n distance?: number\n}\n\nexport function Dock({\n items,\n size = 48,\n magnification = 80,\n distance = 140,\n className,\n ...rest\n}: DockProps) {\n const dockRef = useRef<HTMLDivElement | null>(null)\n const itemRefs = useRef<(HTMLElement | null)[]>([])\n\n useEffect(() => {\n const dock = dockRef.current\n if (!dock) return\n\n /** Pointer x in viewport coordinates, or null when the pointer has left. */\n let pointerX: number | null = null\n /** Current eased size per item, so magnification has a little inertia. */\n const sizes = items.map(() => size)\n\n const onMove = (event: PointerEvent) => {\n pointerX = event.clientX\n }\n const onLeave = () => {\n pointerX = null\n }\n\n dock.addEventListener('pointermove', onMove, { passive: true })\n dock.addEventListener('pointerleave', onLeave, { passive: true })\n\n const stop = getTicker().add(\n ({ delta }) => {\n // Frame-rate independent easing: the fraction remaining after one second, raised to dt.\n const retain = Math.pow(0.0001, delta)\n\n for (let i = 0; i < itemRefs.current.length; i++) {\n const node = itemRefs.current[i]\n if (!node) continue\n\n let target = size\n\n if (pointerX !== null) {\n const rect = node.getBoundingClientRect()\n const centre = rect.left + rect.width / 2\n const gap = Math.abs(pointerX - centre)\n\n if (gap < distance) {\n // Cosine falloff rather than linear: it has zero derivative at both ends, so the\n // bulge has no visible edge where the influence stops.\n const falloff = (Math.cos((gap / distance) * Math.PI) + 1) / 2\n target = size + (magnification - size) * falloff\n }\n }\n\n sizes[i] = target + (sizes[i] - target) * retain\n\n // Below a tenth of a pixel the change is invisible but still costs a style write and a\n // layout invalidation for the whole row.\n if (Math.abs(sizes[i] - target) < 0.1) sizes[i] = target\n\n node.style.width = `${sizes[i].toFixed(1)}px`\n node.style.height = `${sizes[i].toFixed(1)}px`\n }\n },\n { phase: 'write', name: 'Dock' },\n )\n\n return () => {\n dock.removeEventListener('pointermove', onMove)\n dock.removeEventListener('pointerleave', onLeave)\n stop()\n }\n }, [items, size, magnification, distance])\n\n return (\n <div\n ref={dockRef}\n className={['ansh-dock', className].filter(Boolean).join(' ')}\n role=\"toolbar\"\n aria-label=\"Dock\"\n {...rest}\n >\n {items.map((item, index) => {\n const Tag = item.href ? 'a' : 'button'\n return (\n <Tag\n key={item.label}\n ref={(node: HTMLElement | null) => {\n itemRefs.current[index] = node\n }}\n className=\"ansh-dock__item ansh-focusable\"\n style={{ ['--ansh-dock-size' as string]: `${size}px` }}\n // The label is the accessible name; the visible tooltip is decorative and hidden,\n // so a screen reader announces the item once rather than twice.\n aria-label={item.label}\n onClick={item.onClick}\n {...(item.href ? { href: item.href } : { type: 'button' as const })}\n >\n {item.icon}\n <span className=\"ansh-dock__label\" aria-hidden=\"true\">\n {item.label}\n </span>\n </Tag>\n )\n })}\n </div>\n )\n}\n","import { type HTMLAttributes, useEffect, useMemo, useRef, useState } from 'react'\nimport { getTicker, prefersReducedMotion } from '@ansh-ui/core'\nimport { useInView } from '../../hooks/use-observers'\n\n/**\n * Text effects.\n *\n * All three share one accessibility rule: the *complete* text is always present for assistive\n * technology, even when only part of it is visible. A typewriter that renders one character at a\n * time into the DOM would have a screen reader announce a partial word, then re-announce the\n * string on every keystroke.\n */\n\nexport interface TypewriterProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {\n /** Strings to type in sequence. A single string types once and stops. */\n words: string | readonly string[]\n /** Characters typed per second. Default `24`. */\n speed?: number\n /** Characters deleted per second. Default `40` — deleting reads as faster than typing. */\n deleteSpeed?: number\n /** Seconds to hold a completed word before deleting. Default `1.6`. */\n pause?: number\n /** Loop through the list. Default `true` when given several words. */\n loop?: boolean\n /** Show a blinking caret. Default `true`. */\n caret?: boolean\n}\n\n/**\n * A typewriter that cycles through phrases.\n *\n * ```tsx\n * <Typewriter words={['ship faster', 'sleep better', 'stay sane']} />\n * ```\n *\n * Under reduced motion it renders the first phrase statically — a caret blinking indefinitely is a\n * photosensitivity concern, and the content is the point rather than the typing.\n */\nexport function Typewriter({\n words,\n speed = 24,\n deleteSpeed = 40,\n pause = 1.6,\n loop,\n caret = true,\n className,\n ...rest\n}: TypewriterProps) {\n // Memoised: a bare conditional would produce a new array identity on every render when `words`\n // is a string, restarting the typing effect each time the parent re-renders.\n const list = useMemo(() => (typeof words === 'string' ? [words] : words), [words])\n const shouldLoop = loop ?? list.length > 1\n\n const [visible, setVisible] = useState('')\n const reduced = prefersReducedMotion()\n\n useEffect(() => {\n if (reduced || list.length === 0) return\n\n let wordIndex = 0\n let charCount = 0\n let phase: 'typing' | 'holding' | 'deleting' = 'typing'\n let timer = 0\n\n const stop = getTicker().add(\n ({ delta }) => {\n timer += delta\n const current = list[wordIndex] ?? ''\n\n switch (phase) {\n case 'typing': {\n const target = Math.min(current.length, Math.floor(timer * speed))\n if (target !== charCount) {\n charCount = target\n setVisible(current.slice(0, charCount))\n }\n if (charCount >= current.length) {\n phase = 'holding'\n timer = 0\n }\n break\n }\n case 'holding': {\n if (timer >= pause) {\n // A single non-looping word stays on screen rather than deleting into nothing.\n if (!shouldLoop && list.length === 1) {\n stop()\n return\n }\n phase = 'deleting'\n timer = 0\n }\n break\n }\n case 'deleting': {\n const target = Math.max(0, current.length - Math.floor(timer * deleteSpeed))\n if (target !== charCount) {\n charCount = target\n setVisible(current.slice(0, charCount))\n }\n if (charCount === 0) {\n wordIndex = (wordIndex + 1) % list.length\n if (wordIndex === 0 && !shouldLoop) {\n stop()\n return\n }\n phase = 'typing'\n timer = 0\n }\n break\n }\n }\n },\n { phase: 'compute', name: 'Typewriter' },\n )\n\n return stop\n }, [list, speed, deleteSpeed, pause, shouldLoop, reduced])\n\n return (\n <span className={className} {...rest}>\n {/*\n The full text, for assistive technology. Without this a screen reader announces partial\n words on every keystroke — `aria-live` would make it worse, not better.\n */}\n <span\n style={{\n position: 'absolute',\n width: 1,\n height: 1,\n overflow: 'hidden',\n clipPath: 'inset(50%)',\n whiteSpace: 'nowrap',\n }}\n >\n {list.join(', ')}\n </span>\n\n <span aria-hidden=\"true\">\n {reduced ? list[0] : visible}\n {caret && !reduced ? <span className=\"ansh-caret\" /> : null}\n </span>\n </span>\n )\n}\n\nexport interface ShinyTextProps extends HTMLAttributes<HTMLSpanElement> {\n /** Seconds per sweep. Default `3`. */\n duration?: number\n children: React.ReactNode\n}\n\n/**\n * Text with a highlight sweeping across it.\n *\n * Pure CSS — a moving `background-position` on a gradient clipped to the glyphs. Nothing runs per\n * frame on the main thread, so this is effectively free even repeated across a page.\n */\nexport function ShinyText({ duration, className, style, children, ...rest }: ShinyTextProps) {\n return (\n <span\n className={['ansh-shiny', className].filter(Boolean).join(' ')}\n style={{\n ...(duration !== undefined ? { ['--ansh-shiny-duration' as string]: `${duration}s` } : {}),\n ...style,\n }}\n {...rest}\n >\n {children}\n </span>\n )\n}\n\nexport interface NumberTickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {\n value: number\n /** Seconds to count up. Default `1.4`. */\n duration?: number\n /** Decimal places. Default `0`. */\n decimals?: number\n prefix?: string\n suffix?: string\n /** Start counting when scrolled into view. Default `true`. */\n whenInView?: boolean\n}\n\n/**\n * A number that counts up to its value.\n *\n * Counts on the shared ticker with an ease-out curve, so it decelerates into the final figure\n * rather than stopping dead. Formatting goes through `Intl.NumberFormat`, which means thousands\n * separators follow the user's locale instead of being hardcoded to commas.\n */\nexport function NumberTicker({\n value,\n duration = 1.4,\n decimals = 0,\n prefix = '',\n suffix = '',\n whenInView = true,\n className,\n ...rest\n}: NumberTickerProps) {\n const [ref, inView] = useInView<HTMLSpanElement>({ threshold: 0.3, once: true })\n const displayRef = useRef<HTMLSpanElement | null>(null)\n\n const formatter = useRef(\n new Intl.NumberFormat(undefined, {\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n }),\n )\n\n useEffect(() => {\n formatter.current = new Intl.NumberFormat(undefined, {\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n })\n }, [decimals])\n\n useEffect(() => {\n const node = displayRef.current\n if (!node) return\n\n const write = (n: number) => {\n node.textContent = `${prefix}${formatter.current.format(n)}${suffix}`\n }\n\n if (prefersReducedMotion()) {\n write(value)\n return\n }\n\n if (whenInView && !inView) {\n write(0)\n return\n }\n\n let elapsed = 0\n const stop = getTicker().add(\n ({ delta }) => {\n elapsed += delta\n const t = duration <= 0 ? 1 : Math.min(1, elapsed / duration)\n // easeOutExpo: fast start, long settle — the shape that makes a counter feel decisive.\n const eased = t >= 1 ? 1 : 1 - Math.pow(2, -10 * t)\n write(value * eased)\n if (t >= 1) {\n write(value)\n stop()\n }\n },\n { phase: 'write', name: 'NumberTicker' },\n )\n\n return stop\n }, [value, duration, prefix, suffix, whenInView, inView])\n\n return (\n <span ref={ref} className={className} {...rest}>\n {/* The final value is in the DOM for assistive technology and for crawlers. */}\n <span\n style={{\n position: 'absolute',\n width: 1,\n height: 1,\n overflow: 'hidden',\n clipPath: 'inset(50%)',\n }}\n >\n {prefix}\n {value}\n {suffix}\n </span>\n <span ref={displayRef} aria-hidden=\"true\" />\n </span>\n )\n}\n","import {\n type HTMLAttributes,\n type ReactNode,\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react'\n\n/**\n * Loaders and feedback.\n *\n * The recurring theme: a loading or status indicator must be announced, not just drawn. A spinner\n * with no accessible name is invisible to a screen reader, and a toast that appears silently is a\n * message the user never receives.\n */\n\n// ---------------------------------------------------------------------------\n// Loaders\n// ---------------------------------------------------------------------------\n\nexport interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {\n /** Diameter in pixels. Default `24`. */\n size?: number\n /** Ring thickness in pixels. Default `3`. */\n thickness?: number\n /** Accessible label. Default `'Loading'`. Pass `null` if a sibling already announces it. */\n label?: string | null\n}\n\n/**\n * A ring spinner.\n *\n * One element: a conic gradient masked to a ring. No SVG, and it inherits `currentColor`, so it\n * takes the colour of whatever it sits inside without configuration.\n */\nexport function Spinner({\n size = 24,\n thickness = 3,\n label = 'Loading',\n className,\n style,\n ...rest\n}: SpinnerProps) {\n return (\n <span\n className={['ansh-spinner', className].filter(Boolean).join(' ')}\n style={{\n ['--ansh-size' as string]: `${size}px`,\n ['--ansh-thickness' as string]: `${thickness}px`,\n ...style,\n }}\n // `role=\"status\"` announces politely; without it the spinner is silent to a screen reader.\n {...(label ? { role: 'status', 'aria-label': label } : { 'aria-hidden': 'true' })}\n {...rest}\n />\n )\n}\n\nexport interface DotsProps extends HTMLAttributes<HTMLSpanElement> {\n size?: number\n label?: string | null\n}\n\n/** Three bouncing dots. Reads as \"thinking\" where a spinner reads as \"fetching\". */\nexport function LoadingDots({ size = 8, label = 'Loading', className, style, ...rest }: DotsProps) {\n return (\n <span\n className={['ansh-dots', className].filter(Boolean).join(' ')}\n style={{ ['--ansh-size' as string]: `${size}px`, ...style }}\n {...(label ? { role: 'status', 'aria-label': label } : { 'aria-hidden': 'true' })}\n {...rest}\n >\n <span />\n <span />\n <span />\n </span>\n )\n}\n\nexport interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {\n width?: number | string\n height?: number | string\n /** Fully rounded, for avatars. Default `false`. */\n circle?: boolean\n}\n\n/**\n * A loading placeholder with a moving sheen.\n *\n * Marked `aria-hidden` deliberately: a skeleton is a visual stand-in with no content to announce.\n * The container should carry `aria-busy=\"true\"` so assistive technology knows something is loading.\n */\nexport function Skeleton({\n width = '100%',\n height = '1em',\n circle = false,\n className,\n style,\n ...rest\n}: SkeletonProps) {\n return (\n <div\n className={['ansh-skeleton', className].filter(Boolean).join(' ')}\n aria-hidden=\"true\"\n style={{\n width,\n height,\n ...(circle ? { borderRadius: '50%', aspectRatio: '1' } : {}),\n ...style,\n }}\n {...rest}\n />\n )\n}\n\n// ---------------------------------------------------------------------------\n// Toasts\n// ---------------------------------------------------------------------------\n\nexport type ToastVariant = 'info' | 'success' | 'error'\n\nexport interface Toast {\n id: string\n title?: string\n message: ReactNode\n variant?: ToastVariant\n /** Milliseconds before auto-dismiss. `0` keeps it until dismissed. Default `4500`. */\n duration?: number\n}\n\ninterface ToastContextValue {\n toast: (toast: Omit<Toast, 'id'>) => string\n dismiss: (id: string) => void\n}\n\nconst ToastContext = createContext<ToastContextValue | null>(null)\n\n/**\n * Provider for the toast system.\n *\n * ```tsx\n * <ToastProvider><App /></ToastProvider>\n *\n * const { toast } = useToast()\n * toast({ title: 'Deployed', message: 'Live in 1.2s', variant: 'success' })\n * ```\n */\nexport function ToastProvider({ children }: { children?: ReactNode }) {\n const [toasts, setToasts] = useState<Toast[]>([])\n const [closing, setClosing] = useState<Set<string>>(new Set())\n const timers = useRef(new Map<string, ReturnType<typeof setTimeout>>())\n\n const dismiss = useCallback((id: string) => {\n // Mark as closing first so the exit animation can play, then remove. Removing immediately\n // would make toasts vanish rather than leave.\n setClosing((prev) => new Set(prev).add(id))\n const timer = setTimeout(() => {\n setToasts((prev) => prev.filter((t) => t.id !== id))\n setClosing((prev) => {\n const next = new Set(prev)\n next.delete(id)\n return next\n })\n }, 200)\n timers.current.set(`${id}-exit`, timer)\n }, [])\n\n const toast = useCallback(\n (input: Omit<Toast, 'id'>) => {\n const id = `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`\n const next: Toast = { id, duration: 4500, variant: 'info', ...input }\n setToasts((prev) => [...prev, next])\n\n if (next.duration && next.duration > 0) {\n timers.current.set(\n id,\n setTimeout(() => dismiss(id), next.duration),\n )\n }\n return id\n },\n [dismiss],\n )\n\n // Clear every pending timer on unmount, or a dismissed provider still fires setState later.\n useEffect(() => {\n const map = timers.current\n return () => {\n for (const timer of map.values()) clearTimeout(timer)\n map.clear()\n }\n }, [])\n\n const value = useMemo(() => ({ toast, dismiss }), [toast, dismiss])\n\n return (\n <ToastContext.Provider value={value}>\n {children}\n <div\n className=\"ansh-toaster\"\n // `polite` rather than `assertive`: a toast should not interrupt what the user is\n // currently reading. Errors that genuinely must interrupt belong in a dialog.\n role=\"region\"\n aria-live=\"polite\"\n aria-label=\"Notifications\"\n >\n {toasts.map((t) => (\n <div\n key={t.id}\n className={`ansh-toast ansh-toast--${t.variant ?? 'info'}`}\n data-state={closing.has(t.id) ? 'closing' : 'open'}\n >\n <span className=\"ansh-toast__dot\" aria-hidden=\"true\" />\n <div style={{ display: 'grid', gap: 2 }}>\n {t.title ? <div className=\"ansh-toast__title\">{t.title}</div> : null}\n <div className=\"ansh-toast__body\">{t.message}</div>\n </div>\n <button\n type=\"button\"\n onClick={() => dismiss(t.id)}\n aria-label=\"Dismiss notification\"\n className=\"ansh-focusable\"\n style={{\n marginLeft: 'auto',\n background: 'none',\n border: 0,\n color: 'inherit',\n cursor: 'pointer',\n opacity: 0.6,\n padding: 4,\n }}\n >\n ✕\n </button>\n </div>\n ))}\n </div>\n </ToastContext.Provider>\n )\n}\n\nexport function useToast(): ToastContextValue {\n const context = useContext(ToastContext)\n if (!context) {\n throw new Error('[ansh] useToast() must be used inside a <ToastProvider>.')\n }\n return context\n}\n","import { type ReactNode, useId, useState } from 'react'\nimport { Button, type ButtonVariant } from './buttons'\n\n/**\n * Marketing components.\n *\n * These are the ones a landing page actually needs, and the two places they usually go wrong are\n * both handled here: an accordion that animates to intrinsic content height without JavaScript\n * measurement, and a pricing table whose \"recommended\" plan is conveyed by more than colour.\n */\n\n// ---------------------------------------------------------------------------\n// Pricing\n// ---------------------------------------------------------------------------\n\nexport interface PricingPlan {\n name: string\n price: string\n /** Billing period, e.g. `'/month'`. */\n period?: string\n description?: string\n features: readonly string[]\n /** Highlight this plan. Renders elevated with a badge. */\n featured?: boolean\n badge?: string\n cta?: {\n label: string\n href?: string\n onClick?: () => void\n variant?: ButtonVariant\n }\n}\n\nexport interface PricingTableProps {\n plans: readonly PricingPlan[]\n className?: string\n}\n\n/**\n * A responsive pricing table.\n *\n * The featured plan is distinguished three ways — elevation, a text badge, and a filled CTA —\n * rather than by colour alone. Colour-only emphasis fails WCAG 1.4.1 and is invisible to a\n * colour-blind user, which for a pricing page means the recommended plan simply isn't recommended.\n */\nexport function PricingTable({ plans, className }: PricingTableProps) {\n return (\n <div className={['ansh-pricing', className].filter(Boolean).join(' ')}>\n {plans.map((plan) => (\n <div\n key={plan.name}\n className={[\n 'ansh-card',\n 'ansh-plan',\n plan.featured && 'ansh-plan--featured',\n plan.featured && 'ansh-card--glow',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n {plan.featured ? (\n <span className=\"ansh-plan__badge\">{plan.badge ?? 'Most popular'}</span>\n ) : null}\n\n <div>\n <div className=\"ansh-plan__name\">{plan.name}</div>\n <div className=\"ansh-plan__price\">\n <span>{plan.price}</span>\n {plan.period ? <span className=\"ansh-plan__period\">{plan.period}</span> : null}\n </div>\n </div>\n\n {plan.description ? (\n <p\n style={{\n margin: 0,\n fontSize: 'var(--ansh-text-sm)',\n color: 'var(--ansh-content-secondary)',\n }}\n >\n {plan.description}\n </p>\n ) : null}\n\n <ul className=\"ansh-plan__features\">\n {plan.features.map((feature) => (\n <li key={feature}>\n {/* Decorative: the feature text carries the meaning, so the tick is hidden. */}\n <span aria-hidden=\"true\" style={{ color: 'var(--ansh-state-success)' }}>\n ✓\n </span>\n <span>{feature}</span>\n </li>\n ))}\n </ul>\n\n {plan.cta ? (\n <Button\n as={plan.cta.href ? 'a' : 'button'}\n {...(plan.cta.href ? { href: plan.cta.href } : {})}\n onClick={plan.cta.onClick}\n variant={plan.cta.variant ?? (plan.featured ? 'shimmer' : 'ghost')}\n style={{ marginTop: 'auto', width: '100%' }}\n >\n {plan.cta.label}\n </Button>\n ) : null}\n </div>\n ))}\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// Accordion\n// ---------------------------------------------------------------------------\n\n/**\n * A single question/answer pair.\n *\n * Named `FaqItem` rather than `AccordionItem` because the general-purpose `Accordion` owns that\n * name. The two are genuinely different shapes: this one is question/answer, the general one is\n * title/content with icons, subtitles and per-item disabled state.\n */\nexport interface FaqItem {\n question: string\n answer: ReactNode\n}\n\nexport interface FAQAccordionProps {\n items: readonly FaqItem[]\n /** Allow several panels open at once. Default `false`. */\n multiple?: boolean\n /** Index open on first render. Omit for all closed. */\n defaultOpen?: number\n className?: string\n}\n\n/**\n * An accordion.\n *\n * The height transition uses `grid-template-rows: 0fr → 1fr`, which is the only way to animate to\n * *intrinsic* content height in pure CSS. The usual alternatives both fail: a fixed `max-height`\n * either clips long answers or eases at the wrong rate, and measuring `scrollHeight` in JavaScript\n * means a layout read per toggle and a stale value whenever the content reflows.\n *\n * Uses native `<button>` triggers with `aria-expanded` and `aria-controls`, so keyboard and screen\n * reader behaviour is correct without a roving tabindex.\n */\nexport function FAQAccordion({\n items,\n multiple = false,\n defaultOpen,\n className,\n}: FAQAccordionProps) {\n const [open, setOpen] = useState<Set<number>>(\n () => new Set(defaultOpen === undefined ? [] : [defaultOpen]),\n )\n const baseId = useId()\n\n const toggle = (index: number) => {\n setOpen((prev) => {\n const next = new Set(multiple ? prev : [])\n if (prev.has(index)) next.delete(index)\n else next.add(index)\n return next\n })\n }\n\n return (\n <div className={['ansh-accordion', className].filter(Boolean).join(' ')}>\n {items.map((item, index) => {\n const isOpen = open.has(index)\n const triggerId = `${baseId}-trigger-${index}`\n const panelId = `${baseId}-panel-${index}`\n\n return (\n <div key={item.question} className=\"ansh-accordion__item\">\n <h3 style={{ margin: 0 }}>\n <button\n id={triggerId}\n type=\"button\"\n className=\"ansh-accordion__trigger ansh-focusable\"\n aria-expanded={isOpen}\n aria-controls={panelId}\n onClick={() => toggle(index)}\n >\n <span>{item.question}</span>\n {/* A plus rotating 45° into a cross — one glyph, no icon dependency. */}\n <span className=\"ansh-accordion__icon\" aria-hidden=\"true\">\n +\n </span>\n </button>\n </h3>\n\n <div\n id={panelId}\n role=\"region\"\n aria-labelledby={triggerId}\n className=\"ansh-accordion__panel\"\n data-open={isOpen}\n // `inert` when collapsed removes the panel from the accessibility tree *and* from the\n // tab order, so a screen reader doesn't read every answer while the user scans the\n // questions, and Tab doesn't land on links inside a closed panel. React 19 types this\n // as a boolean; older React expects the empty-string attribute form.\n {...(isOpen ? {} : { inert: true })}\n >\n <div>\n <div className=\"ansh-accordion__body\">{item.answer}</div>\n </div>\n </div>\n </div>\n )\n })}\n </div>\n )\n}\n","import { type CSSProperties, type ElementType, useEffect, useRef } from 'react'\nimport { type TextScrambleOptions, mountBehaviour, textScramble } from '@ansh-ui/core'\n\n/**\n * Text that resolves out of noise.\n *\n * The visual work is entirely `textScramble` in `@ansh-ui/core`; this is the React binding plus\n * the one thing the behaviour cannot do on its own — **keep the accessible text stable**.\n *\n * The behaviour rewrites `textContent` every frame while it runs. Applied directly to a heading\n * that would mean assistive technology reads whatever glyph soup happens to be in the node when it\n * reaches it. So the real string is rendered once into a visually-hidden span that carries the\n * accessible name, and the scrambling span is `aria-hidden`. This is the same split\n * `AnimatedText` uses in `components/text.tsx`, and for the same reason.\n *\n * ```tsx\n * <ScrambleText as=\"h2\" trigger=\"view\">Motion, refined.</ScrambleText>\n * ```\n */\n\nconst VISUALLY_HIDDEN: CSSProperties = {\n position: 'absolute',\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n whiteSpace: 'nowrap',\n border: 0,\n}\n\nexport interface ScrambleTextProps extends TextScrambleOptions {\n /** The finished text. Must be a plain string — the behaviour owns this node's text content. */\n children: string\n /** Element to render. Default `'span'`. */\n as?: ElementType\n className?: string\n style?: CSSProperties\n}\n\nexport function ScrambleText({ children, as, className, style, ...options }: ScrambleTextProps) {\n const Tag = (as ?? 'span') as ElementType\n const ref = useRef<HTMLSpanElement | null>(null)\n\n // `children` is a dependency because the behaviour captures the finished text at setup. When the\n // string changes the old capture is stale, so the behaviour is remounted rather than updated.\n const {\n chars,\n duration,\n stagger,\n cycleSpeed,\n trigger,\n repeat,\n threshold,\n seed,\n intensity,\n reducedMotion,\n disabled,\n } = options\n\n useEffect(() => {\n const node = ref.current\n if (!node) return\n\n const handle = mountBehaviour(textScramble, node, {\n chars,\n duration,\n stagger,\n cycleSpeed,\n trigger,\n repeat,\n threshold,\n seed,\n intensity,\n reducedMotion,\n disabled,\n })\n return () => handle.destroy()\n }, [\n children,\n chars,\n duration,\n stagger,\n cycleSpeed,\n trigger,\n repeat,\n threshold,\n seed,\n intensity,\n reducedMotion,\n disabled,\n ])\n\n return (\n <Tag className={className} style={style}>\n <span style={VISUALLY_HIDDEN}>{children}</span>\n {/*\n Rendered with the real text, not empty. The server output and the first client render both\n contain the finished string, so there is no hydration mismatch and no flash of emptiness if\n the behaviour never runs.\n */}\n <span aria-hidden=\"true\" ref={ref}>\n {children}\n </span>\n </Tag>\n )\n}\n","import { type CSSProperties, useEffect, useRef, useState } from 'react'\nimport { prefersReducedMotion } from '@ansh-ui/core'\n\n/**\n * A headline word that cycles through alternatives.\n *\n * ```tsx\n * <h1>Built for <TextRotate words={['designers', 'engineers', 'teams']} /></h1>\n * ```\n *\n * **The box is sized to the longest word, up front.** The naive version sizes to the current word,\n * so the surrounding sentence reflows on every rotation — the text after it visibly jumps, and on\n * a two-line headline the whole layout shifts. Every candidate is rendered once, hidden and\n * unmeasured by the reader, purely to hold the width open. This is a layout-stability fix, not a\n * visual one: it is the difference between a device that feels designed and one that feels broken.\n *\n * **It is not a live region.** Rotating text is decorative emphasis, not new information. Marking\n * it `aria-live` would make a screen reader interrupt itself every two seconds, forever. The\n * current word is in the accessible tree and read normally when traversed; changes are silent.\n *\n * **Reduced motion stops the rotation entirely**, rather than swapping instantly. A word that\n * changes with no transition is more jarring than one that does not change at all, and the\n * sentence still reads correctly with a single word in place.\n */\n\nexport type TextRotateAnimation = 'slide' | 'fade' | 'flip'\n\nexport interface TextRotateProps {\n /** The alternatives to cycle. The first is shown initially and under reduced motion. */\n words: readonly string[]\n /** Seconds each word is held. Default `2.2`. */\n interval?: number\n /** How a word leaves and the next arrives. Default `'slide'`. */\n animation?: TextRotateAnimation\n className?: string\n style?: CSSProperties\n}\n\nexport function TextRotate({\n words,\n interval = 2.2,\n animation = 'slide',\n className,\n style,\n}: TextRotateProps) {\n const [index, setIndex] = useState(0)\n // Resolved once on mount rather than read per render: this decides whether to schedule at all,\n // and re-reading it mid-cycle would leave a timer running with nothing driving it.\n const reduced = useRef(false)\n const [ready, setReady] = useState(false)\n\n useEffect(() => {\n reduced.current = prefersReducedMotion()\n setReady(true)\n }, [])\n\n const safeWords = words.length > 0 ? words : ['']\n const count = safeWords.length\n\n /*\n * Keyed on `count`, deliberately not on the array.\n *\n * `words={['a','b']}` — the documented usage — is a new array identity on every render of the\n * caller. Depending on it would tear down and reschedule this timer on each of those renders,\n * so in any app whose parent re-renders faster than `interval` the word would never rotate at\n * all. Only the number of candidates actually affects the schedule; their text does not.\n */\n useEffect(() => {\n if (!ready || reduced.current) return\n if (count < 2) return\n\n const ms = Math.max(200, interval * 1000)\n const timer = window.setInterval(() => {\n setIndex((previous) => (previous + 1) % count)\n }, ms)\n return () => window.clearInterval(timer)\n }, [ready, interval, count])\n\n // Modulo again at read time: `count` can shrink between the timer firing and this render.\n const current = safeWords[index % count]\n\n return (\n <span\n className={['ansh-rotate', className].filter(Boolean).join(' ')}\n style={style}\n data-animation={animation}\n >\n {/*\n The width holder, and — just as importantly — the *baseline* holder. It stays in normal\n flow so the surrounding sentence aligns to its text baseline; the visible word is overlaid\n on top of it. Clipping the element that participates in the baseline instead would make\n the browser align the sentence to its bottom margin edge, which drops the rotating word\n below the line. `visibility: hidden` rather than `display: none` so it still has a size.\n */}\n <span className=\"ansh-rotate__sizer\" aria-hidden=\"true\">\n {safeWords.map((word, i) => (\n <span key={`${word}-${i}`} className=\"ansh-rotate__ghost\">\n {word}\n </span>\n ))}\n </span>\n\n {/* Overlaid and clipped, so the slide travel is hidden without affecting the baseline. */}\n <span className=\"ansh-rotate__clip\">\n {/*\n Keyed by index so React replaces the node on every change, which is what restarts the CSS\n entry animation. Mutating the text of a persistent node would not re-trigger it.\n */}\n <span key={index} className=\"ansh-rotate__word\">\n {current}\n </span>\n </span>\n </span>\n )\n}\n","import {\n type CSSProperties,\n type PointerEvent as ReactPointerEvent,\n type ReactNode,\n useCallback,\n useRef,\n useState,\n} from 'react'\nimport { clamp } from '@ansh-ui/core'\nimport { useControllableState } from '../../primitives/use-controllable-state'\n\n/**\n * A before/after comparison with a draggable divider.\n *\n * **The clip is on the top layer, not a width change.** Both layers are absolutely positioned at\n * full size and the top one is revealed with `clip-path: inset(...)`. Resizing it instead would\n * re-lay-out its contents as the handle moves, so an image would squash rather than be uncovered —\n * which defeats the entire purpose of the control.\n *\n * **It is a real slider.** `role=\"slider\"` with `aria-valuenow` and arrow-key handling, so it is\n * operable without a pointer. Comparison sliders are very often built as a bare div with a\n * `pointermove` listener, which makes them completely unusable by keyboard and invisible to\n * assistive technology.\n *\n * **Pointer capture, not window listeners.** `setPointerCapture` keeps the drag attached to the\n * handle even when the pointer leaves the element, and releases automatically if the gesture is\n * cancelled — no global `pointermove`/`pointerup` pair to leak on unmount.\n */\n\nexport interface BeforeAfterProps {\n /** Content revealed on the left of the divider. */\n before: ReactNode\n /** Content revealed on the right of the divider. */\n after: ReactNode\n /** Divider position as a percentage, `0`–`100`. Controlled. */\n value?: number\n /** Initial position when uncontrolled. Default `50`. */\n defaultValue?: number\n onValueChange?: (value: number) => void\n /** Percentage points moved per arrow key press. Default `4`. */\n step?: number\n /** Accessible name for the divider. Default `'Comparison position'`. */\n label?: string\n className?: string\n style?: CSSProperties\n}\n\nexport function BeforeAfter({\n before,\n after,\n value,\n defaultValue = 50,\n onValueChange,\n step = 4,\n label = 'Comparison position',\n className,\n style,\n}: BeforeAfterProps) {\n const [position, setPosition] = useControllableState({\n value,\n defaultValue,\n onChange: onValueChange,\n })\n\n const rootRef = useRef<HTMLDivElement | null>(null)\n const [dragging, setDragging] = useState(false)\n\n const positionFromClientX = useCallback((clientX: number): number => {\n const node = rootRef.current\n if (!node) return 50\n const rect = node.getBoundingClientRect()\n if (rect.width <= 0) return 50\n return clamp(((clientX - rect.left) / rect.width) * 100, 0, 100)\n }, [])\n\n const onPointerDown = (event: ReactPointerEvent<HTMLDivElement>) => {\n // Capture on the handle itself so the drag survives the pointer leaving the component.\n event.currentTarget.setPointerCapture(event.pointerId)\n setDragging(true)\n setPosition(positionFromClientX(event.clientX))\n }\n\n const onPointerMove = (event: ReactPointerEvent<HTMLDivElement>) => {\n if (!dragging) return\n setPosition(positionFromClientX(event.clientX))\n }\n\n const endDrag = (event: ReactPointerEvent<HTMLDivElement>) => {\n if (event.currentTarget.hasPointerCapture(event.pointerId)) {\n event.currentTarget.releasePointerCapture(event.pointerId)\n }\n setDragging(false)\n }\n\n const onKeyDown = (event: React.KeyboardEvent) => {\n const jump =\n event.key === 'ArrowLeft' || event.key === 'ArrowDown'\n ? -step\n : event.key === 'ArrowRight' || event.key === 'ArrowUp'\n ? step\n : event.key === 'Home'\n ? -100\n : event.key === 'End'\n ? 100\n : 0\n if (jump === 0) return\n event.preventDefault()\n setPosition((current) => clamp(current + jump, 0, 100))\n }\n\n const clipped = clamp(position, 0, 100)\n\n return (\n <div\n ref={rootRef}\n className={['ansh-compare', className].filter(Boolean).join(' ')}\n style={style}\n data-dragging={dragging || undefined}\n // Clicking anywhere on the surface jumps the divider there, which is what people try first.\n onPointerDown={(event) => {\n if (event.target === event.currentTarget || !dragging) {\n setPosition(positionFromClientX(event.clientX))\n }\n }}\n >\n <div className=\"ansh-compare__layer\">{after}</div>\n\n <div\n className=\"ansh-compare__layer ansh-compare__layer--before\"\n style={{ clipPath: `inset(0 ${100 - clipped}% 0 0)` }}\n >\n {before}\n </div>\n\n <div\n className=\"ansh-compare__handle\"\n style={{ left: `${clipped}%` }}\n role=\"slider\"\n tabIndex={0}\n aria-label={label}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={Math.round(clipped)}\n aria-orientation=\"horizontal\"\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={endDrag}\n onPointerCancel={endDrag}\n onKeyDown={onKeyDown}\n >\n <span className=\"ansh-compare__grip\" aria-hidden=\"true\" />\n </div>\n </div>\n )\n}\n","import { type CSSProperties, type ReactNode } from 'react'\n\n/**\n * A device or browser frame to present a screenshot, a demo, or a live component in.\n *\n * Purely presentational, and deliberately so — it exists because \"here is the thing I built\" is a\n * layout problem, not an animation one. Anything placed inside keeps working: this renders a frame\n * around real DOM, not a picture of one, so a live interactive demo can sit in it.\n *\n * **The chrome is `aria-hidden`.** Traffic-light dots, a notch and a fake URL are decoration; they\n * carry no information a screen reader user needs, and announcing \"three circles\" before every\n * demo is noise. Only the content inside the screen is in the accessible tree.\n *\n * **The URL is not a link and not an input.** It is a static label. Making it either would invite\n * clicks that go nowhere, which is worse than obviously-inert chrome.\n */\n\nexport type MockupVariant = 'browser' | 'window' | 'phone'\n\nexport interface DeviceMockupProps {\n /** Frame style. Default `'browser'`. */\n variant?: MockupVariant\n /** Address shown in the browser chrome. Ignored by the other variants. */\n url?: string\n /** Title shown in the window chrome. Ignored by the other variants. */\n title?: string\n /** Accessible name for the framed region, e.g. `'Dashboard preview'`. */\n label?: string\n className?: string\n style?: CSSProperties\n children?: ReactNode\n}\n\nexport function DeviceMockup({\n variant = 'browser',\n url,\n title,\n label,\n className,\n style,\n children,\n}: DeviceMockupProps) {\n return (\n <div\n className={['ansh-mock', `ansh-mock--${variant}`, className].filter(Boolean).join(' ')}\n style={style}\n role={label ? 'group' : undefined}\n aria-label={label}\n >\n {variant === 'phone' ? (\n <span className=\"ansh-mock__notch\" aria-hidden=\"true\" />\n ) : (\n <div className=\"ansh-mock__chrome\" aria-hidden=\"true\">\n <span className=\"ansh-mock__dots\">\n <i />\n <i />\n <i />\n </span>\n {variant === 'browser' && url ? (\n <span className=\"ansh-mock__url\">{url}</span>\n ) : title ? (\n <span className=\"ansh-mock__title\">{title}</span>\n ) : null}\n </div>\n )}\n\n <div className=\"ansh-mock__screen\">{children}</div>\n </div>\n )\n}\n","import { type CSSProperties, type ReactNode, useEffect, useRef, useState } from 'react'\nimport { prefersReducedMotion } from '@ansh-ui/core'\n\n/**\n * A deck of cards with the next few peeking out behind the top one.\n *\n * **Depth is a fixed ladder, not per-card state.** A card's offset, scale and rotation are derived\n * from its distance from the top of the deck, so advancing only changes one number and every card\n * transitions to its new rung. Animating each card's transform imperatively would mean tracking\n * n transforms and reconciling them on every change — this way the CSS transition does it.\n *\n * **Only the top card is reachable, by any route.** The cards behind it get both `aria-hidden` and\n * `inert`. Either alone is a trap: `aria-hidden` on its own leaves a buried button still reachable\n * by Tab, so keyboard focus lands on a control the screen reader will not announce. A reader\n * should encounter one card, not four overlapping ones, three of them 80% hidden.\n *\n * **Auto-play stops under reduced motion and while hovered or focused.** Content that moves itself\n * away from a reader mid-sentence is a WCAG 2.2 pause/stop concern, not a preference — hovering or\n * tabbing into the deck is a strong signal that someone is reading it.\n */\n\nexport interface CardStackProps {\n /** Cards, front to back. */\n items: readonly ReactNode[]\n /** Advance on a timer. Default `true`. */\n autoPlay?: boolean\n /** Seconds each card is held when auto-playing. Default `3.5`. */\n interval?: number\n /** How many cards behind the top one are visible. Default `2`. */\n peek?: number\n /** Render previous/next buttons. Default `true`. */\n controls?: boolean\n /** Accessible name for the deck. Default `'Card stack'`. */\n label?: string\n className?: string\n style?: CSSProperties\n}\n\n/** Per-rung visual ladder. Index 0 is the top card. */\nconst OFFSET_Y = 14\nconst SCALE_STEP = 0.05\nconst ROTATE_STEP = 1.6\n\nexport function CardStack({\n items,\n autoPlay = true,\n interval = 3.5,\n peek = 2,\n controls = true,\n label = 'Card stack',\n className,\n style,\n}: CardStackProps) {\n const [top, setTop] = useState(0)\n const [paused, setPaused] = useState(false)\n const reduced = useRef(false)\n const [ready, setReady] = useState(false)\n\n useEffect(() => {\n reduced.current = prefersReducedMotion()\n setReady(true)\n }, [])\n\n const count = items.length\n\n useEffect(() => {\n if (!ready || reduced.current || !autoPlay || paused) return\n if (count < 2) return\n const ms = Math.max(600, interval * 1000)\n const timer = window.setInterval(() => setTop((current) => (current + 1) % count), ms)\n return () => window.clearInterval(timer)\n }, [ready, autoPlay, paused, interval, count])\n\n if (count === 0) return null\n\n /*\n * `top` is state and survives a change to `items`, so after the list shrinks it can point past\n * the end. That is not merely a stale index: `(i - top + count) % count` then goes **negative**,\n * because JavaScript's `%` keeps the sign of the dividend, and a negative rung yields\n * `zIndex: count - rung` — the highest of the deck. The card painted on top would be one marked\n * `inert` and `aria-hidden`, i.e. visible but unreachable. Folding it back into range here fixes\n * that at every read site at once, and needs no effect to resynchronise.\n */\n const current = top % count\n\n const advance = (direction: 1 | -1) =>\n setTop((previous) => (previous + direction + count) % count)\n\n return (\n <div\n className={['ansh-stack', className].filter(Boolean).join(' ')}\n style={style}\n role=\"group\"\n aria-label={label}\n aria-roledescription=\"card stack\"\n onPointerEnter={() => setPaused(true)}\n onPointerLeave={() => setPaused(false)}\n onFocusCapture={() => setPaused(true)}\n onBlurCapture={() => setPaused(false)}\n >\n <div className=\"ansh-stack__deck\">\n {items.map((item, i) => {\n // Distance from the top of the deck, wrapping — so the card just advanced past goes to\n // the back rather than sliding through every rung in between.\n const rung = (i - current + count) % count\n const hidden = rung > peek\n\n return (\n <div\n key={i}\n className=\"ansh-stack__card\"\n data-rung={rung}\n aria-hidden={rung === 0 ? undefined : 'true'}\n // `aria-hidden` alone is not enough. A focusable descendant inside an aria-hidden\n // subtree is still reachable by Tab, so a keyboard user would land on a button the\n // screen reader refuses to announce — a worse failure than either alone. `inert`\n // removes it from the tab order and from hit-testing together.\n inert={rung === 0 ? undefined : true}\n style={{\n transform: `translateY(${rung * OFFSET_Y}px) scale(${1 - rung * SCALE_STEP}) rotate(${\n rung === 0 ? 0 : (rung % 2 === 0 ? 1 : -1) * ROTATE_STEP\n }deg)`,\n opacity: hidden ? 0 : 1,\n zIndex: count - rung,\n pointerEvents: rung === 0 ? undefined : 'none',\n }}\n >\n {item}\n </div>\n )\n })}\n </div>\n\n {controls && count > 1 ? (\n <div className=\"ansh-stack__controls\">\n <button\n type=\"button\"\n className=\"ansh-stack__button\"\n onClick={() => advance(-1)}\n aria-label=\"Previous card\"\n >\n ‹\n </button>\n <span className=\"ansh-stack__count\" aria-hidden=\"true\">\n {current + 1} / {count}\n </span>\n <button\n type=\"button\"\n className=\"ansh-stack__button\"\n onClick={() => advance(1)}\n aria-label=\"Next card\"\n >\n ›\n </button>\n </div>\n ) : null}\n </div>\n )\n}\n","import {\n type CSSProperties,\n type PointerEvent as ReactPointerEvent,\n type ReactNode,\n useEffect,\n useId,\n useRef,\n useState,\n} from 'react'\nimport { clamp } from '@ansh-ui/core'\nimport { cx } from '../../primitives/compose'\nimport { useControllableState } from '../../primitives/use-controllable-state'\n\nexport interface CarouselProps {\n /** Slides, in order. */\n items: readonly ReactNode[]\n /** Active slide index. Controlled. */\n value?: number\n /** Initial slide when uncontrolled. Default `0`. */\n defaultValue?: number\n onChange?: (index: number) => void\n /** Wrap past the ends. Default `true`. */\n loop?: boolean\n /** Advance on a timer. Default `false`. */\n autoPlay?: boolean\n /** Seconds each slide is held when auto-playing. Default `5`. */\n interval?: number\n /** Render the dot indicators. Default `true`. */\n showDots?: boolean\n /** Render the previous/next arrows. Default `true`. */\n showArrows?: boolean\n /** Allow dragging the track to change slides. Default `true`. */\n draggable?: boolean\n /** Accessible name for the carousel region. */\n label: string\n className?: string\n style?: CSSProperties\n}\n\n/**\n * A carousel.\n *\n * **Transform, not scroll.** The track is translated by `index × 100%`. A scroll-snap carousel gets\n * native touch feel for free but makes the *scroll position* the source of truth, so the active\n * index has to be inferred back out of it with an observer — and that inference disagrees with the\n * controlled `value` prop the moment both try to drive at once. One transform keeps the index\n * authoritative, which is what a controlled component requires.\n *\n * **`aria-live` is tied to intent, not to movement.** The live region is `polite` only while the\n * carousel is idle, and `off` while it is auto-playing. Announcing every automatic change would\n * make a screen reader talk over the user indefinitely; announcing a change the user *asked* for\n * is exactly what they need.\n *\n * **Auto-play ships with a real pause control**, not just pause-on-hover. WCAG 2.2.2 requires a\n * mechanism to stop content that moves automatically for more than five seconds, and hover is not\n * one — it is unavailable to keyboard and touch users, and vanishes the moment the pointer moves.\n *\n * **Off-screen slides are `inert`.** They are laid out beside the visible one, so without it every\n * link and button in all of them sits in the tab order, and Tab appears to focus nothing.\n */\nexport function Carousel({\n items,\n value,\n defaultValue = 0,\n onChange,\n loop = true,\n autoPlay = false,\n interval = 5,\n showDots = true,\n showArrows = true,\n draggable = true,\n label,\n className,\n style,\n}: CarouselProps) {\n const count = items.length\n const [index, setIndex] = useControllableState<number>({\n value,\n defaultValue: clamp(defaultValue, 0, Math.max(0, count - 1)),\n onChange,\n })\n const [paused, setPaused] = useState(false)\n const [playing, setPlaying] = useState(autoPlay)\n const [drag, setDrag] = useState(0)\n\n const baseId = useId()\n const viewportRef = useRef<HTMLDivElement | null>(null)\n const dragStart = useRef<number | null>(null)\n\n // Same reasoning as `CardStack`: `index` is state and survives a change to `items`, so fold it\n // back into range rather than letting it address a slide that no longer exists.\n const active = count > 0 ? clamp(index, 0, count - 1) : 0\n\n const goTo = (next: number) => {\n if (count === 0) return\n const wrapped = loop ? (next + count) % count : clamp(next, 0, count - 1)\n setIndex(wrapped)\n }\n\n useEffect(() => {\n if (!playing || paused || count < 2) return\n const ms = Math.max(1000, interval * 1000)\n const timer = window.setInterval(() => {\n setIndex((previous) => {\n const next = previous + 1\n return loop ? next % count : Math.min(next, count - 1)\n })\n }, ms)\n return () => window.clearInterval(timer)\n }, [playing, paused, interval, count, loop, setIndex])\n\n if (count === 0) return null\n\n const atStart = !loop && active === 0\n const atEnd = !loop && active === count - 1\n\n const onKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n goTo(active - 1)\n } else if (event.key === 'ArrowRight') {\n event.preventDefault()\n goTo(active + 1)\n } else if (event.key === 'Home') {\n event.preventDefault()\n goTo(0)\n } else if (event.key === 'End') {\n event.preventDefault()\n goTo(count - 1)\n }\n }\n\n const onPointerDown = (event: ReactPointerEvent<HTMLDivElement>) => {\n if (!draggable || count < 2) return\n dragStart.current = event.clientX\n event.currentTarget.setPointerCapture(event.pointerId)\n }\n\n const onPointerMove = (event: ReactPointerEvent<HTMLDivElement>) => {\n if (dragStart.current === null) return\n setDrag(event.clientX - dragStart.current)\n }\n\n const endDrag = (event: ReactPointerEvent<HTMLDivElement>) => {\n if (dragStart.current === null) return\n if (event.currentTarget.hasPointerCapture(event.pointerId)) {\n event.currentTarget.releasePointerCapture(event.pointerId)\n }\n const width = viewportRef.current?.clientWidth ?? 1\n // A quarter of the viewport is the commit threshold. Lower and an accidental brush of the\n // surface changes slide; higher and a deliberate swipe snaps back, which reads as broken.\n const travelled = drag\n dragStart.current = null\n setDrag(0)\n if (Math.abs(travelled) > width * 0.25) goTo(active + (travelled < 0 ? 1 : -1))\n }\n\n const dragPercent = drag !== 0 ? (drag / (viewportRef.current?.clientWidth || 1)) * 100 : 0\n\n return (\n <section\n className={cx('ansh-carousel', className)}\n style={style}\n aria-roledescription=\"carousel\"\n aria-label={label}\n onKeyDown={onKeyDown}\n onPointerEnter={() => setPaused(true)}\n onPointerLeave={() => setPaused(false)}\n onFocusCapture={() => setPaused(true)}\n onBlurCapture={() => setPaused(false)}\n >\n <div\n className=\"ansh-carousel__viewport\"\n ref={viewportRef}\n // `polite` only when idle — see the note at the top of this file.\n aria-live={playing ? 'off' : 'polite'}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={endDrag}\n onPointerCancel={endDrag}\n data-dragging={dragStart.current !== null || undefined}\n >\n <div\n className=\"ansh-carousel__track\"\n style={{\n transform: `translate3d(${-active * 100 + dragPercent}%, 0, 0)`,\n // Suppress the transition mid-drag so the track tracks the finger exactly.\n transition: dragStart.current !== null ? 'none' : undefined,\n }}\n >\n {items.map((item, i) => (\n <div\n key={i}\n className=\"ansh-carousel__slide\"\n id={`${baseId}-slide-${i}`}\n role=\"group\"\n aria-roledescription=\"slide\"\n aria-label={`${i + 1} of ${count}`}\n aria-hidden={i === active ? undefined : 'true'}\n inert={i === active ? undefined : true}\n >\n {item}\n </div>\n ))}\n </div>\n </div>\n\n {showArrows && count > 1 ? (\n <>\n <button\n type=\"button\"\n className=\"ansh-carousel__arrow ansh-carousel__arrow--prev\"\n onClick={() => goTo(active - 1)}\n disabled={atStart}\n aria-label=\"Previous slide\"\n >\n ‹\n </button>\n <button\n type=\"button\"\n className=\"ansh-carousel__arrow ansh-carousel__arrow--next\"\n onClick={() => goTo(active + 1)}\n disabled={atEnd}\n aria-label=\"Next slide\"\n >\n ›\n </button>\n </>\n ) : null}\n\n {(showDots && count > 1) || autoPlay ? (\n <div className=\"ansh-carousel__controls\">\n {autoPlay ? (\n <button\n type=\"button\"\n className=\"ansh-carousel__pause\"\n onClick={() => setPlaying((on) => !on)}\n aria-label={playing ? 'Pause carousel' : 'Play carousel'}\n >\n {playing ? '❚❚' : '▶'}\n </button>\n ) : null}\n\n {showDots && count > 1 ? (\n <div className=\"ansh-carousel__dots\">\n {items.map((_, i) => (\n <button\n key={i}\n type=\"button\"\n className=\"ansh-carousel__dot\"\n aria-label={`Go to slide ${i + 1}`}\n aria-current={i === active ? 'true' : undefined}\n onClick={() => goTo(i)}\n />\n ))}\n </div>\n ) : null}\n </div>\n ) : null}\n </section>\n )\n}\n","import { type ReactNode, useState } from 'react'\nimport { cx } from '../../primitives/compose'\n\nexport type AlertTone = 'info' | 'success' | 'warning' | 'danger' | 'neutral'\n\nconst ICONS: Record<AlertTone, ReactNode> = {\n info: (\n <svg\n viewBox=\"0 0 20 20\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.6\"\n >\n <circle cx=\"10\" cy=\"10\" r=\"7.5\" />\n <path d=\"M10 9v4.5\" strokeLinecap=\"round\" />\n <circle cx=\"10\" cy=\"6.5\" r=\"0.9\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n ),\n success: (\n <svg\n viewBox=\"0 0 20 20\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.6\"\n >\n <circle cx=\"10\" cy=\"10\" r=\"7.5\" />\n <path d=\"M6.5 10.3l2.4 2.4 4.6-5.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n ),\n warning: (\n <svg\n viewBox=\"0 0 20 20\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.6\"\n >\n <path\n d=\"M8.6 3.2L1.9 14.6a1.6 1.6 0 001.4 2.4h13.4a1.6 1.6 0 001.4-2.4L11.4 3.2a1.6 1.6 0 00-2.8 0z\"\n strokeLinejoin=\"round\"\n />\n <path d=\"M10 7.5v3.5\" strokeLinecap=\"round\" />\n <circle cx=\"10\" cy=\"13.6\" r=\"0.9\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n ),\n danger: (\n <svg\n viewBox=\"0 0 20 20\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.6\"\n >\n <circle cx=\"10\" cy=\"10\" r=\"7.5\" />\n <path d=\"M7.5 7.5l5 5M12.5 7.5l-5 5\" strokeLinecap=\"round\" />\n </svg>\n ),\n neutral: null,\n}\n\nexport interface AlertProps {\n tone?: AlertTone\n title?: ReactNode\n children?: ReactNode\n /** Replace the default icon, or pass `null` to omit it. */\n icon?: ReactNode | null\n /** Show a dismiss button. */\n dismissible?: boolean\n onDismiss?: () => void\n /** Buttons or links under the message. */\n actions?: ReactNode\n variant?: 'soft' | 'outline' | 'solid'\n className?: string\n}\n\n/**\n * An inline message.\n *\n * The `role` follows the tone, because it decides whether a screen reader interrupts:\n * `role=\"alert\"` (assertive) for errors and warnings, which the user needs to know about *now*;\n * `role=\"status\"` (polite) for information and success, which can wait for a pause.\n *\n * Using `alert` for everything is the common mistake, and it makes a screen reader cut off whatever\n * it was saying to announce that a draft was saved.\n *\n * The tone is always carried by the icon and the text, never by colour alone.\n */\nexport function Alert({\n tone = 'info',\n title,\n children,\n icon,\n dismissible = false,\n onDismiss,\n actions,\n variant = 'soft',\n className,\n}: AlertProps) {\n const [visible, setVisible] = useState(true)\n if (!visible) return null\n\n const urgent = tone === 'danger' || tone === 'warning'\n const resolvedIcon = icon === undefined ? ICONS[tone] : icon\n\n return (\n <div\n className={cx('ansh-alert', `ansh-alert--${tone}`, `ansh-alert--${variant}`, className)}\n role={urgent ? 'alert' : 'status'}\n // Errors are assertive; everything else waits for a natural pause.\n aria-live={urgent ? 'assertive' : 'polite'}\n >\n {resolvedIcon ? (\n <span className=\"ansh-alert__icon\" aria-hidden=\"true\">\n {resolvedIcon}\n </span>\n ) : null}\n\n <div className=\"ansh-alert__body\">\n {title ? <p className=\"ansh-alert__title\">{title}</p> : null}\n {children ? <div className=\"ansh-alert__message\">{children}</div> : null}\n {actions ? <div className=\"ansh-alert__actions\">{actions}</div> : null}\n </div>\n\n {dismissible ? (\n <button\n type=\"button\"\n className=\"ansh-alert__close ansh-focusable\"\n aria-label=\"Dismiss message\"\n onClick={() => {\n setVisible(false)\n onDismiss?.()\n }}\n >\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\">\n <path\n d=\"M4 4l8 8M12 4l-8 8\"\n stroke=\"currentColor\"\n strokeWidth=\"1.75\"\n strokeLinecap=\"round\"\n fill=\"none\"\n />\n </svg>\n </button>\n ) : null}\n </div>\n )\n}\n\nexport interface BannerProps extends Omit<AlertProps, 'variant'> {\n /** Pin to the top of the viewport. */\n sticky?: boolean\n}\n\n/**\n * A full-width page-level message — maintenance windows, trial expiry, a failed payment.\n *\n * Distinct from `Alert` in placement and weight rather than in mechanics: a banner concerns the\n * whole application, an alert concerns the thing next to it.\n */\nexport function Banner({ sticky = false, className, ...rest }: BannerProps) {\n return (\n <Alert\n variant=\"solid\"\n className={cx('ansh-banner', sticky && 'ansh-banner--sticky', className)}\n {...rest}\n />\n )\n}\n\nexport interface CalloutProps {\n /** Short label — \"Note\", \"Tip\", \"Warning\". */\n label?: string\n tone?: AlertTone\n icon?: ReactNode\n className?: string\n children: ReactNode\n}\n\n/**\n * A documentation callout.\n *\n * Deliberately **not** a live region. Prose asides are part of the page's content and are read in\n * document order; announcing them out of sequence would be disruptive rather than helpful, which is\n * the opposite of what `Alert` is for.\n */\nexport function Callout({ label, tone = 'info', icon, className, children }: CalloutProps) {\n return (\n <aside className={cx('ansh-callout', `ansh-callout--${tone}`, className)}>\n <span className=\"ansh-callout__icon\" aria-hidden=\"true\">\n {icon ?? ICONS[tone]}\n </span>\n <div className=\"ansh-callout__body\">\n {label ? <p className=\"ansh-callout__label\">{label}</p> : null}\n <div className=\"ansh-callout__content\">{children}</div>\n </div>\n </aside>\n )\n}\n","/**\n * @ansh-ui/react — Ansh for React 18/19 and Next.js.\n *\n * Every component here is a thin binding over `@ansh-ui/core`. The engine owns all behaviour; this\n * package owns the React lifecycle, prop diffing, and SSR correctness.\n *\n * ```tsx\n * import '@ansh-ui/tokens/ansh.css'\n * import { AuroraBackground, AnimatedText, MagneticButton } from '@ansh-ui/react'\n *\n * export default function Hero() {\n * return (\n * <AuroraBackground className=\"min-h-screen grid place-items-center\">\n * <AnimatedText by=\"chars\" from=\"center\">Motion, refined.</AnimatedText>\n * <MagneticButton strength={16}>Get started</MagneticButton>\n * </AuroraBackground>\n * )\n * }\n * ```\n *\n * ## Next.js App Router\n *\n * The package ships a `'use client'` banner, so these components work in server components without\n * you wrapping them in your own client boundary.\n */\n\n// --- Hooks ---\nexport * from './hooks/use-motion-value'\nexport * from './hooks/use-observers'\n\n// --- Factories ---\n// Exported so consumers can wrap their own effects and behaviours with the same guarantees the\n// built-in components get. This is the supported extension path.\nexport {\n createEffectComponent,\n type EffectComponent,\n type EffectComponentProps,\n type EffectComponentBaseProps,\n} from './factory/create-effect-component'\nexport {\n createBehaviourComponent,\n useBehaviour,\n type BehaviourComponent,\n type BehaviourComponentProps,\n type BehaviourComponentBaseProps,\n} from './factory/create-behaviour-component'\n\n// --- Effect & behaviour components ---\nexport * from './components/backgrounds'\nexport * from './components/interaction'\nexport * from './components/text'\nexport * from './components/providers'\n\n/**\n * --- Headless primitives ---\n *\n * The pieces every component here is built from. Exported because an application that needs a\n * component this library doesn't have should be able to build it with the same guarantees rather\n * than starting from scratch — that is the difference between a component library and a closed set.\n */\nexport { useControllableState } from './primitives/use-controllable-state'\nexport { composeEventHandlers, mergeProps, mergeRefs, cx } from './primitives/compose'\nexport { Slot, slotted, type SlotProps } from './primitives/slot'\nexport { Portal, type PortalProps } from './primitives/portal'\nexport {\n getTabbable,\n useAutoFocus,\n useFocusRestore,\n useFocusTrap,\n useRovingFocus,\n} from './primitives/focus'\nexport { useDismiss, useScrollLock, type DismissOptions } from './primitives/use-dismiss'\nexport { Presence, usePresence, type PresenceProps } from './primitives/presence'\nexport {\n computePosition,\n type Align,\n type Placement,\n type PositionOptions,\n type PositionResult,\n type Rect,\n type Side,\n} from './primitives/position'\nexport {\n useAnchoredPosition,\n type AnchoredPosition,\n type AnchoredPositionOptions,\n} from './primitives/use-anchored-position'\n\n/**\n * --- Designed UI components ---\n *\n * These need the stylesheet:\n *\n * ```ts\n * import '@ansh-ui/tokens/ansh.css'\n * import '@ansh-ui/react/styles.css'\n * ```\n *\n * Everything in it resolves from `@ansh-ui/tokens`, so overriding a token restyles the whole set.\n */\n\n// Buttons, cards, showcase pieces\nexport * from './components/ui/buttons'\nexport * from './components/ui/cards'\nexport * from './components/ui/dock'\nexport * from './components/ui/command-palette'\nexport * from './components/ui/text-effects'\nexport * from './components/ui/feedback'\nexport * from './components/ui/marketing'\nexport * from './components/ui/scramble-text'\nexport * from './components/ui/text-rotate'\nexport * from './components/ui/before-after'\nexport * from './components/ui/device-mockup'\nexport * from './components/ui/card-stack'\n\n// Layout\nexport * from './components/layout'\nexport * from './components/layout/resizable'\n\n// Forms\nexport * from './components/form/field'\nexport * from './components/form/input'\nexport * from './components/form/toggles'\nexport * from './components/form/listbox'\nexport * from './components/form/select'\nexport * from './components/form/combobox'\nexport * from './components/form/slider'\nexport * from './components/form/pin-input'\nexport * from './components/form/tags-input'\nexport * from './components/form/rating'\nexport * from './components/form/dropzone'\nexport * from './components/form/color-picker'\nexport * from './components/form/calendar'\nexport * from './components/form/date-picker'\n\n// Overlays\nexport * from './components/overlay/popover'\nexport * from './components/overlay/tooltip'\nexport * from './components/overlay/dialog'\nexport * from './components/overlay/drawer'\nexport * from './components/overlay/menu'\n\n// Data display\nexport * from './components/data/table'\nexport * from './components/data/display'\nexport * from './components/data/progress'\n\n// Navigation\nexport * from './components/navigation/tabs'\nexport * from './components/navigation/carousel'\nexport * from './components/navigation/breadcrumbs'\nexport * from './components/navigation/sidebar'\nexport * from './components/navigation/nav-menu'\n\n// Feedback\nexport * from './components/feedback/alert'\n\n// Disclosure\nexport * from './components/disclosure'\n\n// Declarative motion\nexport {\n AnimatePresence,\n Draggable,\n Motion,\n type AnimatePresenceProps,\n type DraggableProps,\n type MotionTransition,\n type MotionValues,\n} from './components/motion'\n\n/**\n * Re-exported engine surface.\n *\n * A narrow, curated set — the pieces a React author reaches for directly. Deliberately not\n * `export * from '@ansh-ui/core'`: that would put 200 symbols into this package's autocomplete and\n * make it unclear which layer a given import belongs to. For anything else, import from\n * `@ansh-ui/core` directly.\n */\nexport {\n // Motion\n animate,\n createTimeline,\n motionValue,\n MotionValue,\n stagger,\n springs,\n // Colour\n createGradient,\n createScale,\n generatePalette,\n mixColors,\n palettes,\n parseColor,\n toHex,\n toOklchString,\n checkContrast,\n ensureContrast,\n pickReadable,\n // Easing\n easings,\n cubicBezier,\n registerEasing,\n signature as signatureEasings,\n // Noise\n createNoise,\n // Kernel\n getTicker,\n // Accessibility\n prefersReducedMotion,\n setReducedMotionMode,\n // Registry — the seam for Pro-tier and plugin registration\n getRegistry,\n} from '@ansh-ui/core'\n\n/**\n * `Timeline` is re-exported as `MotionTimeline`.\n *\n * The engine's `Timeline` (the animation sequencer) and this package's `Timeline` (the activity\n * feed component) are unrelated things that happen to share a word. Exporting both unaliased makes\n * the name ambiguous, and `export *` resolves that by silently dropping it — which is how the\n * component disappeared from the public API without any build error at all.\n */\nexport type { Timeline as MotionTimeline } from '@ansh-ui/core'\n\nexport type {\n AnimationControls,\n AnimationOptions,\n BaseEffectOptions,\n ColorInput,\n ColorSpace,\n EasingInput,\n EffectDefinition,\n FrameState,\n Gradient,\n PaletteName,\n PointerState,\n ReducedMotionStrategy,\n Rgb,\n SpringOptions,\n StaggerFrom,\n StaggerOptions,\n} from '@ansh-ui/core'\n\nexport const VERSION = '0.1.0'\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/factory/create-effect-component.tsx","../src/components/backgrounds.tsx","../src/components/ui/buttons.tsx","../src/components/ui/cards.tsx","../src/components/ui/dock.tsx","../src/components/ui/text-effects.tsx","../src/components/ui/feedback.tsx","../src/components/ui/marketing.tsx","../src/components/ui/scramble-text.tsx","../src/components/ui/text-rotate.tsx","../src/components/ui/before-after.tsx","../src/components/ui/device-mockup.tsx","../src/components/ui/card-stack.tsx","../src/components/navigation/carousel.tsx","../src/components/feedback/alert.tsx","../src/index.ts"],"names":["Component","forwardRef","Button","ripple","useRef","rippleBehaviour","jsx","IconButton","SpotlightCard","useEffect","GlowCard","TiltCard3D","getTicker","jsxs","useState","useMemo","stagger","prefersReducedMotion","useCallback","current","clamp","useId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyFA,IAAM,UAAA,GAAkC;AAAA,EACtC,QAAA,EAAU,UAAA;AAAA,EACV,SAAA,EAAW,SAAA;AAAA,EACX,QAAA,EAAU;AACZ,CAAA;AAGA,IAAM,aAAA,GAAqC;AAAA,EACzC,QAAA,EAAU,UAAA;AAAA,EACV,MAAA,EAAQ;AACV,CAAA;AAEO,SAAS,qBAAA,CACd,YACA,WAAA,EAC0B;AAE1B,EAAA,MAAM,aAAa,IAAI,GAAA,CAAI,OAAO,IAAA,CAAK,UAAA,CAAW,QAAQ,CAAC,CAAA;AAE3D,EAAA,SAAS,MAAA,CAAO,OAAmB,YAAA,EAAyC;AAC1E,IAAA,MAAM,EAAE,IAAIA,UAAAA,GAAY,KAAA,EAAO,WAAW,KAAA,EAAO,QAAA,EAAU,GAAG,IAAA,EAAK,GAAI,KAAA;AAEvE,IAAA,MAAM,OAAA,GAAU,OAA2B,IAAI,CAAA;AAC/C,IAAA,MAAM,SAAA,GAAY,OAA4B,IAAI,CAAA;AAClD,IAAA,MAAM,SAAA,GAAY,YAAA,CAA0B,OAAA,EAAS,YAAY,CAAA;AAKjE,IAAA,MAAM,UAAmC,EAAC;AAC1C,IAAA,MAAM,WAAoC,EAAC;AAC3C,IAAA,KAAA,MAAW,CAAC,GAAA,EAAK,KAAK,KAAK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CAAQ,EAAE,KAAA,EAAO,IAAA,GAAO,QAAQ,IAAA,EAAM,SAAA,EAAW,UAAS,EAAiB;AACzF,EAAA,uBACEO,IAAAA,CAAC,OAAA,EAAA,EAAM,SAAA,EAAW,EAAA,CAAG,gBAAgB,CAAA,cAAA,EAAiB,IAAI,CAAA,CAAA,EAAI,SAAS,CAAA,EACrE,QAAA,EAAA;AAAA,oBAAAP,GAAAA,CAAC,UAAK,SAAA,EAAU,oBAAA,EAAqB,eAAY,MAAA,EAC9C,QAAA,EAAA,IAAA,IAAQ,KAAA,CAAM,IAAI,CAAA,EACrB,CAAA;AAAA,oBACAO,IAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,oBAAA,EACZ,QAAA,EAAA;AAAA,MAAA,KAAA,mBAAQP,GAAAA,CAAC,GAAA,EAAA,EAAE,SAAA,EAAU,qBAAA,EAAuB,iBAAM,CAAA,GAAO,IAAA;AAAA,sBAC1DA,GAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,yBAAyB,QAAA,EAAS;AAAA,KAAA,EACnD;AAAA,GAAA,EACF,CAAA;AAEJ;ACyCO,IAAM,OAAA,GAAU","file":"index.js","sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type CSSProperties,\n type ElementType,\n type ForwardRefExoticComponent,\n type ForwardedRef,\n type ReactNode,\n type RefAttributes,\n forwardRef,\n useEffect,\n useRef,\n} from 'react'\nimport {\n type BaseEffectOptions,\n type EffectDefinition,\n type EffectHandle,\n mountEffect,\n} from '@ansh-ui/core'\nimport { useMergedRef } from '../hooks/use-observers'\n\n/**\n * Turn an {@link EffectDefinition} into a React component.\n *\n * This factory is why the component count can scale without the maintenance cost scaling with it.\n * Every canvas-backed component in the library is one line:\n *\n * ```tsx\n * export const AuroraBackground = createEffectComponent(aurora, 'AuroraBackground')\n * ```\n *\n * and gets, for free:\n *\n * - **SSR safety.** The server renders only the host element and its children. The canvas is\n * created in an effect, so server and first-client markup are byte-identical and React never\n * reports a hydration mismatch.\n * - **Prop diffing that doesn't remount.** Options are compared shallowly and pushed through\n * `handle.update()`, which live-updates what it can and remounts only what it must.\n * - **A polymorphic `as` prop**, so a background can be a `<section>`, `<div>`, or `<aside>`\n * without a wrapper element.\n * - **Ref forwarding** to the host element.\n * - **Complete teardown**, verified by the leak harness in the test suite.\n */\n\n/** Props every effect component accepts on top of its own options. */\nexport interface EffectComponentBaseProps {\n /** Element to render as the host. Default `'div'`. */\n as?: ElementType\n className?: string\n style?: React.CSSProperties\n /** Content rendered above the canvas. Positioned automatically. */\n children?: ReactNode\n}\n\nexport type EffectComponentProps<Options extends BaseEffectOptions> = Options &\n EffectComponentBaseProps &\n Omit<ComponentPropsWithoutRef<'div'>, keyof Options | 'style' | 'className' | 'children'>\n\n/** The type of a component produced by {@link createEffectComponent}. */\nexport type EffectComponent<Options extends BaseEffectOptions> = ForwardRefExoticComponent<\n EffectComponentProps<Options> & RefAttributes<HTMLElement>\n>\n\n/**\n * The render function's own props type.\n *\n * Deliberately loose. The component genuinely accepts arbitrary props — it partitions them at\n * runtime into effect options and DOM attributes by consulting the definition's `defaults`. Typing\n * the render function with the precise generic instead makes `forwardRef` unable to relate\n * `PropsWithoutRef<P>` back to `P` for an unresolved `P`, which is a long-standing limitation\n * rather than a signal that anything is wrong.\n *\n * Precision is restored at the export boundary via {@link EffectComponent}, which is the type\n * consumers actually see.\n */\ntype LooseProps = Record<string, unknown> & {\n as?: ElementType\n className?: string\n style?: CSSProperties\n children?: ReactNode\n}\n\n/**\n * Host styles.\n *\n * `isolation: isolate` creates a new stacking context, which stops the canvas' blend modes from\n * compositing against the *page* behind the component. Without it, an effect using `lighter`\n * bleeds into whatever is underneath the section, which is almost never intended and is very\n * confusing to debug.\n */\nconst HOST_STYLE: React.CSSProperties = {\n position: 'relative',\n isolation: 'isolate',\n overflow: 'hidden',\n}\n\n/** Children sit above the canvas without needing the author to manage z-index. */\nconst CONTENT_STYLE: React.CSSProperties = {\n position: 'relative',\n zIndex: 1,\n}\n\nexport function createEffectComponent<Options extends BaseEffectOptions>(\n definition: EffectDefinition<Options>,\n displayName?: string,\n): EffectComponent<Options> {\n /** Keys the effect understands, so the rest can be forwarded to the DOM element. */\n const optionKeys = new Set(Object.keys(definition.defaults))\n\n function Render(props: LooseProps, forwardedRef: ForwardedRef<HTMLElement>) {\n const { as: Component = 'div', className, style, children, ...rest } = props\n\n const hostRef = useRef<HTMLElement | null>(null)\n const handleRef = useRef<EffectHandle | null>(null)\n const mergedRef = useMergedRef<HTMLElement>(hostRef, forwardedRef)\n\n // Split props into effect options and DOM attributes. Doing this every render is cheap\n // (a handful of key lookups) and means an author can put `aria-label` or `onClick` on the\n // component and have it land on the element rather than being swallowed.\n const options: Record<string, unknown> = {}\n const domProps: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(rest)) {\n if (optionKeys.has(key)) options[key] = value\n else domProps[key] = value\n }\n\n // Serialised options, used as the effect dependency. Comparing a serialisation rather than\n // referential identity is what lets an author pass an inline `colors={['#fff', '#000']}`\n // array without remounting the effect on every render.\n const optionsKey = stableKey(options)\n const optionsRef = useRef(options)\n optionsRef.current = options\n\n // Mount once. Options changes flow through the update effect below.\n useEffect(() => {\n const host = hostRef.current\n if (!host) return\n\n const handle = mountEffect(definition, host, optionsRef.current as Partial<Options>)\n handleRef.current = handle\n\n return () => {\n handle.destroy()\n handleRef.current = null\n }\n // Intentionally mount-only. `mountEffect` owns its own reconciliation, and remounting on\n // every option change would restart particle systems and lose all their state.\n }, [])\n\n useEffect(() => {\n handleRef.current?.update(optionsRef.current as Partial<BaseEffectOptions>)\n // Keyed on the serialisation so this fires exactly when an option actually changed.\n }, [optionsKey])\n\n return (\n <Component\n ref={mergedRef}\n className={className}\n style={{ ...HOST_STYLE, ...style }}\n {...domProps}\n >\n {children != null ? <div style={CONTENT_STYLE}>{children}</div> : null}\n </Component>\n )\n }\n\n const Component = forwardRef(Render)\n Component.displayName = displayName ?? `Ansh(${definition.name})`\n\n return Component as unknown as EffectComponent<Options>\n}\n\n/**\n * A stable string key for an options object.\n *\n * Not `JSON.stringify` directly: key order in a spread-built object is not guaranteed to match\n * between renders, and a reordered serialisation would look like a change and trigger a needless\n * update. Sorting the keys makes the key genuinely value-based.\n *\n * Functions are serialised by identity marker rather than by body — an inline callback changes\n * identity every render, and treating that as an option change would defeat the whole purpose.\n */\nfunction stableKey(options: Record<string, unknown>): string {\n const keys = Object.keys(options).sort()\n const parts: string[] = []\n for (const key of keys) {\n const value = options[key]\n if (typeof value === 'function') {\n parts.push(`${key}:fn`)\n } else if (value === undefined) {\n // Skipped entirely: `undefined` means \"not supplied\", and including it would make\n // `<X speed={undefined} />` differ from `<X />`.\n continue\n } else {\n parts.push(`${key}:${JSON.stringify(value)}`)\n }\n }\n return parts.join('|')\n}\n","import {\n animatedGradient,\n aurora,\n blob,\n constellation,\n fireflies,\n floatingGeometry,\n lightRays,\n meshGradient,\n meteors,\n noiseLayer,\n orbit,\n particleField,\n powderExplosion,\n rain,\n smoke,\n snow,\n spotlight,\n strangeAttractor,\n swarm,\n waves,\n} from '@ansh-ui/core'\nimport { createEffectComponent } from '../factory/create-effect-component'\n\n/**\n * Canvas-backed background components.\n *\n * Each is a single call to {@link createEffectComponent}, which supplies SSR safety, prop\n * diffing, ref forwarding, polymorphic `as`, and teardown. The visual behaviour lives entirely in\n * `@ansh-ui/core`, so these definitions are the complete React binding — there is no per-component\n * React logic to get wrong, and the Vue components are the same effects with a different factory.\n *\n * Every component accepts its effect's full option surface plus `as`, `className`, `style`,\n * `children`, and any DOM attribute.\n *\n * ```tsx\n * <AuroraBackground colors={['#0275f4', '#9f0550']} intensity={1.2} className=\"h-screen\">\n * <h1>Motion, refined.</h1>\n * </AuroraBackground>\n * ```\n */\n\n/** Vertical curtains of light with ridged filament structure. */\nexport const AuroraBackground = createEffectComponent(aurora, 'AuroraBackground')\n\n/** Soft overlapping colour fields that drift on non-repeating Lissajous paths. */\nexport const MeshGradient = createEffectComponent(meshGradient, 'MeshGradient')\n\n/** A rotating multi-stop linear gradient. One fill per frame — the cheap option. */\nexport const AnimatedGradient = createEffectComponent(animatedGradient, 'AnimatedGradient')\n\n/** Points advected by a divergence-free curl-noise flow field. */\nexport const ParticleField = createEffectComponent(particleField, 'ParticleField')\n\n/** Drifting nodes joined by lines, with the pointer as a live node. */\nexport const Constellation = createEffectComponent(constellation, 'Constellation')\n\n/** Streaks falling across the canvas, spawned as a Poisson process. */\nexport const MeteorShower = createEffectComponent(meteors, 'MeteorShower')\n\n/** Depth-parallaxed rain, optionally with splash rings. */\nexport const Rain = createEffectComponent(rain, 'Rain')\n\n/** Depth-parallaxed snow with independent per-flake sway. */\nexport const Snow = createEffectComponent(snow, 'Snow')\n\n/** Wandering points with asymmetric bioluminescent pulsing. */\nexport const Fireflies = createEffectComponent(fireflies, 'Fireflies')\n\n/** Layered undulating bands built from three incommensurable sines plus noise. */\nexport const Waves = createEffectComponent(waves, 'Waves')\n\n/** Organic shapes morphing via noise sampled on a closed circle. */\nexport const LiquidBlob = createEffectComponent(blob, 'LiquidBlob')\n\n/**\n * Film grain and dither overlay.\n *\n * Place this *above* a gradient to hide 8-bit banding and give flat colour a physical texture.\n * It is the cheapest single change that makes a gradient look deliberate.\n */\nexport const NoiseLayer = createEffectComponent(noiseLayer, 'NoiseLayer')\n\n/** A soft light that follows the pointer, easing in and out of existence. */\nexport const Spotlight = createEffectComponent(spotlight, 'Spotlight')\n\n/** Volumetric shafts fanning from a source point, with noise-driven per-shaft brightness. */\nexport const LightRays = createEffectComponent(lightRays, 'LightRays')\n\n/** A rising plume: curl-advected puffs that expand and dissipate over their life. */\nexport const Smoke = createEffectComponent(smoke, 'Smoke')\n\n/**\n * Bursts of fine particles that decelerate hard and settle.\n *\n * Bursts arrive on a Poisson schedule, and — with `burstOnPress` — on pointer press, which makes\n * this the one background here that doubles as a click affordance.\n */\nexport const PowderExplosion = createEffectComponent(powderExplosion, 'PowderExplosion')\n\n/** Polygons drifting in depth, projected through a real perspective divide. */\nexport const FloatingGeometry = createEffectComponent(floatingGeometry, 'FloatingGeometry')\n\n/** Nested rings of points circling a centre, depth-ordered so near points occlude far ones. */\nexport const Orbit = createEffectComponent(orbit, 'Orbit')\n\n/** A chaotic iterated map plotted as a drifting cloud — Clifford, de Jong or Svensson. */\nexport const StrangeAttractor = createEffectComponent(strangeAttractor, 'StrangeAttractor')\n\n/** Particles bound to moving attractors, orbiting rather than collapsing. Follows the pointer. */\nexport const Swarm = createEffectComponent(swarm, 'Swarm')\n","import {\n type ButtonHTMLAttributes,\n type ElementType,\n type ForwardedRef,\n type ReactNode,\n forwardRef,\n useRef,\n} from 'react'\nimport { magnetic, ripple as rippleBehaviour } from '@ansh-ui/core'\nimport { useBehaviour } from '../../factory/create-behaviour-component'\nimport { useMergedRef } from '../../hooks/use-observers'\n\n/**\n * Buttons.\n *\n * The visual treatments are CSS — a shimmer sweep, a rotating conic border, a fill that rises on\n * hover. None of them need JavaScript, and doing them in JS would mean tracking hover in React\n * state and re-rendering on every pointer event.\n *\n * What *does* need JavaScript is the physics: magnetic attraction and the ripple both read pointer\n * position every frame. Those come from the engine's behaviours, attached via `useBehaviour`, so\n * the button element itself carries them rather than being wrapped in another div.\n */\n\nexport type ButtonVariant = 'solid' | 'ghost' | 'shimmer' | 'glow' | 'liquid'\nexport type ButtonSize = 'sm' | 'md' | 'lg'\n\nexport interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'> {\n variant?: ButtonVariant\n size?: ButtonSize\n /** Render as a different element — `'a'` for links. Default `'button'`. */\n as?: ElementType\n /**\n * Pull toward the pointer, in pixels of maximum displacement. `0` disables.\n * Spring-driven, so it has weight rather than tracking the cursor rigidly. Default `0`.\n */\n magneticStrength?: number\n /** Emit a ripple from the point of contact. Default `false`. */\n ripple?: boolean\n /** Colours for the `glow` variant's rotating border. */\n glowColors?: readonly [string, string]\n /** Seconds per rotation or sweep, depending on variant. */\n duration?: number\n children?: ReactNode\n}\n\n/**\n * ```tsx\n * <Button variant=\"shimmer\" magneticStrength={14}>Get started</Button>\n * <Button variant=\"glow\" glowColors={['#0275f4', '#9f0550']}>Upgrade</Button>\n * <Button variant=\"liquid\" ripple>Deploy</Button>\n * ```\n */\nexport const Button = forwardRef(function Button(\n {\n variant = 'solid',\n size = 'md',\n as: Component = 'button',\n magneticStrength = 0,\n ripple = false,\n glowColors,\n duration,\n className,\n style,\n children,\n ...rest\n }: ButtonProps,\n forwardedRef: ForwardedRef<HTMLButtonElement>,\n) {\n const localRef = useRef<HTMLButtonElement | null>(null)\n const mergedRef = useMergedRef<HTMLButtonElement>(localRef, forwardedRef)\n\n // Both hooks are always called — React requires a stable hook order — and each no-ops when its\n // feature is off, rather than being conditionally invoked.\n useBehaviour(localRef, magnetic, {\n strength: magneticStrength,\n disabled: magneticStrength <= 0,\n scale: magneticStrength > 0 ? 1.03 : 1,\n })\n\n useBehaviour(localRef, rippleBehaviour, { disabled: !ripple })\n\n const classes = [\n 'ansh-btn',\n `ansh-btn--${variant}`,\n size !== 'md' && `ansh-btn--${size}`,\n 'ansh-focusable',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n // Variant knobs travel as custom properties so the stylesheet stays static and themeable.\n const cssVars: Record<string, string> = {}\n if (glowColors) {\n cssVars['--ansh-glow-from'] = glowColors[0]\n cssVars['--ansh-glow-via'] = glowColors[1]\n cssVars['--ansh-glow-to'] = glowColors[0]\n }\n if (duration !== undefined) {\n cssVars['--ansh-glow-duration'] = `${duration}s`\n cssVars['--ansh-shimmer-duration'] = `${duration}s`\n }\n\n return (\n <Component ref={mergedRef} className={classes} style={{ ...cssVars, ...style }} {...rest}>\n {children}\n </Component>\n )\n})\n\nexport interface IconButtonProps extends ButtonProps {\n /** Required: an icon-only control has no visible text, so it needs an accessible name. */\n label: string\n}\n\n/**\n * A square, icon-only button.\n *\n * `label` is required rather than optional. An icon-only control with no accessible name is\n * announced as just \"button\" by a screen reader, and making the prop optional guarantees some\n * consumers will omit it.\n */\nexport const IconButton = forwardRef(function IconButton(\n { label, className, ...rest }: IconButtonProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n return (\n <Button\n ref={ref}\n aria-label={label}\n className={['ansh-btn--icon', className].filter(Boolean).join(' ')}\n style={{ padding: 'var(--ansh-space-3)', aspectRatio: '1' }}\n {...rest}\n />\n )\n})\n","import {\n type ElementType,\n type ForwardedRef,\n type HTMLAttributes,\n type ReactNode,\n forwardRef,\n useEffect,\n useRef,\n} from 'react'\nimport { getTicker } from '@ansh-ui/core'\nimport { useMergedRef } from '../../hooks/use-observers'\n\n/**\n * Cards.\n *\n * `SpotlightCard` and `GlowCard` both need the pointer position, but neither needs the full\n * `trackPointer` machinery from the engine — they write two CSS custom properties and let the\n * stylesheet do the rest, which is cheaper and doesn't need a spring. Writing to\n * `style.setProperty` bypasses React's render cycle entirely, which is what keeps a 60 Hz pointer\n * handler from costing a re-render.\n */\n\nexport interface SpotlightCardProps extends HTMLAttributes<HTMLDivElement> {\n as?: ElementType\n /** Highlight colour. Any CSS colour. Default a soft brand blue. */\n color?: string\n /** Diameter of the highlight in pixels. Default `320`. */\n size?: number\n children?: ReactNode\n}\n\n/**\n * A card with a radial highlight that follows the pointer.\n *\n * ```tsx\n * <SpotlightCard color=\"rgb(2 117 244 / 0.25)\">\n * <h3>Fast by default</h3>\n * </SpotlightCard>\n * ```\n */\nexport const SpotlightCard = forwardRef(function SpotlightCard(\n { as: Component = 'div', color, size, className, children, ...rest }: SpotlightCardProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) {\n const localRef = useRef<HTMLDivElement | null>(null)\n const mergedRef = useMergedRef<HTMLDivElement>(localRef, forwardedRef)\n\n useEffect(() => {\n const node = localRef.current\n if (!node) return\n\n const onMove = (event: PointerEvent) => {\n const rect = node.getBoundingClientRect()\n node.style.setProperty('--ansh-spot-x', `${event.clientX - rect.left}px`)\n node.style.setProperty('--ansh-spot-y', `${event.clientY - rect.top}px`)\n }\n const onEnter = () => node.style.setProperty('--ansh-spot-opacity', '1')\n const onLeave = () => node.style.setProperty('--ansh-spot-opacity', '0')\n\n node.addEventListener('pointermove', onMove, { passive: true })\n node.addEventListener('pointerenter', onEnter, { passive: true })\n node.addEventListener('pointerleave', onLeave, { passive: true })\n return () => {\n node.removeEventListener('pointermove', onMove)\n node.removeEventListener('pointerenter', onEnter)\n node.removeEventListener('pointerleave', onLeave)\n }\n }, [])\n\n const cssVars: Record<string, string> = {}\n if (color) cssVars['--ansh-spot-color'] = color\n if (size) cssVars['--ansh-spot-size'] = `${size}px`\n\n return (\n <Component\n ref={mergedRef}\n className={['ansh-card', 'ansh-card--spotlight', className].filter(Boolean).join(' ')}\n style={cssVars}\n {...rest}\n >\n {children}\n </Component>\n )\n})\n\nexport interface GlowCardProps extends HTMLAttributes<HTMLDivElement> {\n as?: ElementType\n /** The rotating border's colour stops. Default the Ansh house gradient. */\n colors?: readonly [string, string]\n /** Seconds per full rotation. Default `6`. */\n duration?: number\n children?: ReactNode\n}\n\n/**\n * A card with a slowly rotating conic-gradient border.\n *\n * The rotation is driven by an `@property`-registered custom angle animated via CSS `@keyframes`\n * — no JavaScript runs per frame. `@property` is what makes a custom property animatable at all;\n * without it browsers cannot interpolate between angle values and the gradient would jump.\n */\nexport const GlowCard = forwardRef(function GlowCard(\n { as: Component = 'div', colors, duration, className, style, children, ...rest }: GlowCardProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const cssVars: Record<string, string> = {}\n if (colors) {\n cssVars['--ansh-glow-from'] = colors[0]\n cssVars['--ansh-glow-via'] = colors[1]\n cssVars['--ansh-glow-to'] = colors[0]\n }\n if (duration !== undefined) cssVars['--ansh-glow-duration'] = `${duration}s`\n\n return (\n <Component\n ref={ref}\n className={['ansh-card', 'ansh-card--glow', className].filter(Boolean).join(' ')}\n style={{ ...cssVars, ...style }}\n {...rest}\n >\n {children}\n </Component>\n )\n})\n\nexport interface TiltCard3DProps extends HTMLAttributes<HTMLDivElement> {\n as?: ElementType\n /** Maximum rotation in degrees. Default `12`. */\n max?: number\n children?: ReactNode\n}\n\n/**\n * A lightweight 3D tilt, independent of the full `TiltCard` behaviour.\n *\n * `@ansh-ui/react` already exports `TiltCard` (spring-driven, glare, the engine's `tilt`\n * behaviour) — reach for that when the interaction should feel weighted. This is the CSS-only\n * sibling for a bento tile or a small preview card where a spring is more machinery than the\n * moment calls for; it follows the pointer directly with a `transition` easing back to rest.\n */\nexport const TiltCard3D = forwardRef(function TiltCard3D(\n { as: Component = 'div', max = 12, className, style, children, ...rest }: TiltCard3DProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) {\n const localRef = useRef<HTMLDivElement | null>(null)\n const mergedRef = useMergedRef<HTMLDivElement>(localRef, forwardedRef)\n\n useEffect(() => {\n const node = localRef.current\n if (!node) return\n\n // Coalesce to the ticker's write phase rather than writing directly from the pointer event.\n // A card grid firing dozens of pointermove-driven style writes per frame is exactly the\n // per-component-rAF problem the engine's single ticker exists to avoid.\n let pending: { nx: number; ny: number } | null = null\n\n const onMove = (event: PointerEvent) => {\n const rect = node.getBoundingClientRect()\n pending = {\n nx: (event.clientX - rect.left) / rect.width - 0.5,\n ny: (event.clientY - rect.top) / rect.height - 0.5,\n }\n }\n const onLeave = () => {\n pending = { nx: 0, ny: 0 }\n }\n\n node.addEventListener('pointermove', onMove, { passive: true })\n node.addEventListener('pointerleave', onLeave, { passive: true })\n\n const stop = getTicker().add(\n () => {\n if (!pending) return\n const { nx, ny } = pending\n node.style.transform =\n `perspective(800px) rotateX(${(-ny * max).toFixed(2)}deg) ` +\n `rotateY(${(nx * max).toFixed(2)}deg)`\n },\n { phase: 'write', name: 'TiltCard3D' },\n )\n\n return () => {\n node.removeEventListener('pointermove', onMove)\n node.removeEventListener('pointerleave', onLeave)\n stop()\n }\n }, [max])\n\n return (\n <Component\n ref={mergedRef}\n className={['ansh-card', className].filter(Boolean).join(' ')}\n style={{ transition: 'transform 400ms ease-out', ...style }}\n {...rest}\n >\n {children}\n </Component>\n )\n})\n\n// ---------------------------------------------------------------------------\n// Bento grid\n// ---------------------------------------------------------------------------\n\nexport interface BentoGridProps extends HTMLAttributes<HTMLDivElement> {\n /** Number of columns at desktop width. Default `3`. */\n columns?: number\n children?: ReactNode\n}\n\n/** A responsive bento layout. Collapses to a single column below 768px. */\nexport function BentoGrid({ columns = 3, className, style, children, ...rest }: BentoGridProps) {\n return (\n <div\n className={['ansh-bento', className].filter(Boolean).join(' ')}\n style={{ ['--ansh-bento-cols' as string]: columns, ...style }}\n {...rest}\n >\n {children}\n </div>\n )\n}\n\nexport interface BentoItemProps extends HTMLAttributes<HTMLDivElement> {\n /** Columns this tile spans. Default `1`. */\n span?: number\n /** Rows this tile spans. Default `1`. */\n rowSpan?: number\n children?: ReactNode\n}\n\nexport function BentoItem({\n span = 1,\n rowSpan = 1,\n className,\n style,\n children,\n ...rest\n}: BentoItemProps) {\n return (\n <div\n className={['ansh-bento__item', 'ansh-card', className].filter(Boolean).join(' ')}\n style={{ ['--ansh-span' as string]: span, ['--ansh-row-span' as string]: rowSpan, ...style }}\n {...rest}\n >\n {children}\n </div>\n )\n}\n","import { type HTMLAttributes, type ReactNode, useEffect, useRef } from 'react'\nimport { getTicker } from '@ansh-ui/core'\n\n/**\n * A macOS-style dock with pointer magnification.\n *\n * Two details separate a dock that feels right from one that doesn't:\n *\n * **Magnification is a distance falloff, not a hover state.** Only scaling the hovered item makes\n * neighbours snap in and out abruptly. Real docks scale every item by its distance from the\n * pointer, so the bulge is continuous and the whole row responds as one surface.\n *\n * **Sizes are eased toward their target, not set directly.** Writing the computed size straight to\n * the node makes the dock track the cursor rigidly, which reads as weightless. A per-frame ease\n * gives it a small amount of lag — the thing that makes it feel physical.\n *\n * Both run in the ticker's write phase and mutate `style.width` directly. Doing this through React\n * state would re-render the whole dock on every pointer move.\n */\n\nexport interface DockItem {\n /** Icon or short label. Rendered inside the tile. */\n icon: ReactNode\n /** Tooltip text, and the accessible name for the control. */\n label: string\n onClick?: () => void\n href?: string\n}\n\nexport interface DockProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {\n items: readonly DockItem[]\n /** Resting tile size in pixels. Default `48`. */\n size?: number\n /** Size of a tile directly under the pointer. Default `80`. */\n magnification?: number\n /**\n * How far the magnification reaches, in pixels. Larger values bulge more neighbours.\n * Default `140`.\n */\n distance?: number\n}\n\nexport function Dock({\n items,\n size = 48,\n magnification = 80,\n distance = 140,\n className,\n ...rest\n}: DockProps) {\n const dockRef = useRef<HTMLDivElement | null>(null)\n const itemRefs = useRef<(HTMLElement | null)[]>([])\n\n useEffect(() => {\n const dock = dockRef.current\n if (!dock) return\n\n /** Pointer x in viewport coordinates, or null when the pointer has left. */\n let pointerX: number | null = null\n /** Current eased size per item, so magnification has a little inertia. */\n const sizes = items.map(() => size)\n\n const onMove = (event: PointerEvent) => {\n pointerX = event.clientX\n }\n const onLeave = () => {\n pointerX = null\n }\n\n dock.addEventListener('pointermove', onMove, { passive: true })\n dock.addEventListener('pointerleave', onLeave, { passive: true })\n\n const stop = getTicker().add(\n ({ delta }) => {\n // Frame-rate independent easing: the fraction remaining after one second, raised to dt.\n const retain = Math.pow(0.0001, delta)\n\n for (let i = 0; i < itemRefs.current.length; i++) {\n const node = itemRefs.current[i]\n if (!node) continue\n\n let target = size\n\n if (pointerX !== null) {\n const rect = node.getBoundingClientRect()\n const centre = rect.left + rect.width / 2\n const gap = Math.abs(pointerX - centre)\n\n if (gap < distance) {\n // Cosine falloff rather than linear: it has zero derivative at both ends, so the\n // bulge has no visible edge where the influence stops.\n const falloff = (Math.cos((gap / distance) * Math.PI) + 1) / 2\n target = size + (magnification - size) * falloff\n }\n }\n\n sizes[i] = target + (sizes[i] - target) * retain\n\n // Below a tenth of a pixel the change is invisible but still costs a style write and a\n // layout invalidation for the whole row.\n if (Math.abs(sizes[i] - target) < 0.1) sizes[i] = target\n\n node.style.width = `${sizes[i].toFixed(1)}px`\n node.style.height = `${sizes[i].toFixed(1)}px`\n }\n },\n { phase: 'write', name: 'Dock' },\n )\n\n return () => {\n dock.removeEventListener('pointermove', onMove)\n dock.removeEventListener('pointerleave', onLeave)\n stop()\n }\n }, [items, size, magnification, distance])\n\n return (\n <div\n ref={dockRef}\n className={['ansh-dock', className].filter(Boolean).join(' ')}\n role=\"toolbar\"\n aria-label=\"Dock\"\n {...rest}\n >\n {items.map((item, index) => {\n const Tag = item.href ? 'a' : 'button'\n return (\n <Tag\n key={item.label}\n ref={(node: HTMLElement | null) => {\n itemRefs.current[index] = node\n }}\n className=\"ansh-dock__item ansh-focusable\"\n style={{ ['--ansh-dock-size' as string]: `${size}px` }}\n // The label is the accessible name; the visible tooltip is decorative and hidden,\n // so a screen reader announces the item once rather than twice.\n aria-label={item.label}\n onClick={item.onClick}\n {...(item.href ? { href: item.href } : { type: 'button' as const })}\n >\n {item.icon}\n <span className=\"ansh-dock__label\" aria-hidden=\"true\">\n {item.label}\n </span>\n </Tag>\n )\n })}\n </div>\n )\n}\n","import { type HTMLAttributes, useEffect, useMemo, useRef, useState } from 'react'\nimport { getTicker, prefersReducedMotion } from '@ansh-ui/core'\nimport { useInView } from '../../hooks/use-observers'\n\n/**\n * Text effects.\n *\n * All three share one accessibility rule: the *complete* text is always present for assistive\n * technology, even when only part of it is visible. A typewriter that renders one character at a\n * time into the DOM would have a screen reader announce a partial word, then re-announce the\n * string on every keystroke.\n */\n\nexport interface TypewriterProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {\n /** Strings to type in sequence. A single string types once and stops. */\n words: string | readonly string[]\n /** Characters typed per second. Default `24`. */\n speed?: number\n /** Characters deleted per second. Default `40` — deleting reads as faster than typing. */\n deleteSpeed?: number\n /** Seconds to hold a completed word before deleting. Default `1.6`. */\n pause?: number\n /** Loop through the list. Default `true` when given several words. */\n loop?: boolean\n /** Show a blinking caret. Default `true`. */\n caret?: boolean\n}\n\n/**\n * A typewriter that cycles through phrases.\n *\n * ```tsx\n * <Typewriter words={['ship faster', 'sleep better', 'stay sane']} />\n * ```\n *\n * Under reduced motion it renders the first phrase statically — a caret blinking indefinitely is a\n * photosensitivity concern, and the content is the point rather than the typing.\n */\nexport function Typewriter({\n words,\n speed = 24,\n deleteSpeed = 40,\n pause = 1.6,\n loop,\n caret = true,\n className,\n ...rest\n}: TypewriterProps) {\n // Memoised: a bare conditional would produce a new array identity on every render when `words`\n // is a string, restarting the typing effect each time the parent re-renders.\n const list = useMemo(() => (typeof words === 'string' ? [words] : words), [words])\n const shouldLoop = loop ?? list.length > 1\n\n const [visible, setVisible] = useState('')\n const reduced = prefersReducedMotion()\n\n useEffect(() => {\n if (reduced || list.length === 0) return\n\n let wordIndex = 0\n let charCount = 0\n let phase: 'typing' | 'holding' | 'deleting' = 'typing'\n let timer = 0\n\n const stop = getTicker().add(\n ({ delta }) => {\n timer += delta\n const current = list[wordIndex] ?? ''\n\n switch (phase) {\n case 'typing': {\n const target = Math.min(current.length, Math.floor(timer * speed))\n if (target !== charCount) {\n charCount = target\n setVisible(current.slice(0, charCount))\n }\n if (charCount >= current.length) {\n phase = 'holding'\n timer = 0\n }\n break\n }\n case 'holding': {\n if (timer >= pause) {\n // A single non-looping word stays on screen rather than deleting into nothing.\n if (!shouldLoop && list.length === 1) {\n stop()\n return\n }\n phase = 'deleting'\n timer = 0\n }\n break\n }\n case 'deleting': {\n const target = Math.max(0, current.length - Math.floor(timer * deleteSpeed))\n if (target !== charCount) {\n charCount = target\n setVisible(current.slice(0, charCount))\n }\n if (charCount === 0) {\n wordIndex = (wordIndex + 1) % list.length\n if (wordIndex === 0 && !shouldLoop) {\n stop()\n return\n }\n phase = 'typing'\n timer = 0\n }\n break\n }\n }\n },\n { phase: 'compute', name: 'Typewriter' },\n )\n\n return stop\n }, [list, speed, deleteSpeed, pause, shouldLoop, reduced])\n\n return (\n <span className={className} {...rest}>\n {/*\n The full text, for assistive technology. Without this a screen reader announces partial\n words on every keystroke — `aria-live` would make it worse, not better.\n */}\n <span\n style={{\n position: 'absolute',\n width: 1,\n height: 1,\n overflow: 'hidden',\n clipPath: 'inset(50%)',\n whiteSpace: 'nowrap',\n }}\n >\n {list.join(', ')}\n </span>\n\n <span aria-hidden=\"true\">\n {reduced ? list[0] : visible}\n {caret && !reduced ? <span className=\"ansh-caret\" /> : null}\n </span>\n </span>\n )\n}\n\nexport interface ShinyTextProps extends HTMLAttributes<HTMLSpanElement> {\n /** Seconds per sweep. Default `3`. */\n duration?: number\n children: React.ReactNode\n}\n\n/**\n * Text with a highlight sweeping across it.\n *\n * Pure CSS — a moving `background-position` on a gradient clipped to the glyphs. Nothing runs per\n * frame on the main thread, so this is effectively free even repeated across a page.\n */\nexport function ShinyText({ duration, className, style, children, ...rest }: ShinyTextProps) {\n return (\n <span\n className={['ansh-shiny', className].filter(Boolean).join(' ')}\n style={{\n ...(duration !== undefined ? { ['--ansh-shiny-duration' as string]: `${duration}s` } : {}),\n ...style,\n }}\n {...rest}\n >\n {children}\n </span>\n )\n}\n\nexport interface NumberTickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {\n value: number\n /** Seconds to count up. Default `1.4`. */\n duration?: number\n /** Decimal places. Default `0`. */\n decimals?: number\n prefix?: string\n suffix?: string\n /** Start counting when scrolled into view. Default `true`. */\n whenInView?: boolean\n}\n\n/**\n * A number that counts up to its value.\n *\n * Counts on the shared ticker with an ease-out curve, so it decelerates into the final figure\n * rather than stopping dead. Formatting goes through `Intl.NumberFormat`, which means thousands\n * separators follow the user's locale instead of being hardcoded to commas.\n */\nexport function NumberTicker({\n value,\n duration = 1.4,\n decimals = 0,\n prefix = '',\n suffix = '',\n whenInView = true,\n className,\n ...rest\n}: NumberTickerProps) {\n const [ref, inView] = useInView<HTMLSpanElement>({ threshold: 0.3, once: true })\n const displayRef = useRef<HTMLSpanElement | null>(null)\n\n const formatter = useRef(\n new Intl.NumberFormat(undefined, {\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n }),\n )\n\n useEffect(() => {\n formatter.current = new Intl.NumberFormat(undefined, {\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n })\n }, [decimals])\n\n useEffect(() => {\n const node = displayRef.current\n if (!node) return\n\n const write = (n: number) => {\n node.textContent = `${prefix}${formatter.current.format(n)}${suffix}`\n }\n\n if (prefersReducedMotion()) {\n write(value)\n return\n }\n\n if (whenInView && !inView) {\n write(0)\n return\n }\n\n let elapsed = 0\n const stop = getTicker().add(\n ({ delta }) => {\n elapsed += delta\n const t = duration <= 0 ? 1 : Math.min(1, elapsed / duration)\n // easeOutExpo: fast start, long settle — the shape that makes a counter feel decisive.\n const eased = t >= 1 ? 1 : 1 - Math.pow(2, -10 * t)\n write(value * eased)\n if (t >= 1) {\n write(value)\n stop()\n }\n },\n { phase: 'write', name: 'NumberTicker' },\n )\n\n return stop\n }, [value, duration, prefix, suffix, whenInView, inView])\n\n return (\n <span ref={ref} className={className} {...rest}>\n {/* The final value is in the DOM for assistive technology and for crawlers. */}\n <span\n style={{\n position: 'absolute',\n width: 1,\n height: 1,\n overflow: 'hidden',\n clipPath: 'inset(50%)',\n }}\n >\n {prefix}\n {value}\n {suffix}\n </span>\n <span ref={displayRef} aria-hidden=\"true\" />\n </span>\n )\n}\n","import {\n type HTMLAttributes,\n type ReactNode,\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react'\n\n/**\n * Loaders and feedback.\n *\n * The recurring theme: a loading or status indicator must be announced, not just drawn. A spinner\n * with no accessible name is invisible to a screen reader, and a toast that appears silently is a\n * message the user never receives.\n */\n\n// ---------------------------------------------------------------------------\n// Loaders\n// ---------------------------------------------------------------------------\n\nexport interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {\n /** Diameter in pixels. Default `24`. */\n size?: number\n /** Ring thickness in pixels. Default `3`. */\n thickness?: number\n /** Accessible label. Default `'Loading'`. Pass `null` if a sibling already announces it. */\n label?: string | null\n}\n\n/**\n * A ring spinner.\n *\n * One element: a conic gradient masked to a ring. No SVG, and it inherits `currentColor`, so it\n * takes the colour of whatever it sits inside without configuration.\n */\nexport function Spinner({\n size = 24,\n thickness = 3,\n label = 'Loading',\n className,\n style,\n ...rest\n}: SpinnerProps) {\n return (\n <span\n className={['ansh-spinner', className].filter(Boolean).join(' ')}\n style={{\n ['--ansh-size' as string]: `${size}px`,\n ['--ansh-thickness' as string]: `${thickness}px`,\n ...style,\n }}\n // `role=\"status\"` announces politely; without it the spinner is silent to a screen reader.\n {...(label ? { role: 'status', 'aria-label': label } : { 'aria-hidden': 'true' })}\n {...rest}\n />\n )\n}\n\nexport interface DotsProps extends HTMLAttributes<HTMLSpanElement> {\n size?: number\n label?: string | null\n}\n\n/** Three bouncing dots. Reads as \"thinking\" where a spinner reads as \"fetching\". */\nexport function LoadingDots({ size = 8, label = 'Loading', className, style, ...rest }: DotsProps) {\n return (\n <span\n className={['ansh-dots', className].filter(Boolean).join(' ')}\n style={{ ['--ansh-size' as string]: `${size}px`, ...style }}\n {...(label ? { role: 'status', 'aria-label': label } : { 'aria-hidden': 'true' })}\n {...rest}\n >\n <span />\n <span />\n <span />\n </span>\n )\n}\n\nexport interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {\n width?: number | string\n height?: number | string\n /** Fully rounded, for avatars. Default `false`. */\n circle?: boolean\n}\n\n/**\n * A loading placeholder with a moving sheen.\n *\n * Marked `aria-hidden` deliberately: a skeleton is a visual stand-in with no content to announce.\n * The container should carry `aria-busy=\"true\"` so assistive technology knows something is loading.\n */\nexport function Skeleton({\n width = '100%',\n height = '1em',\n circle = false,\n className,\n style,\n ...rest\n}: SkeletonProps) {\n return (\n <div\n className={['ansh-skeleton', className].filter(Boolean).join(' ')}\n aria-hidden=\"true\"\n style={{\n width,\n height,\n ...(circle ? { borderRadius: '50%', aspectRatio: '1' } : {}),\n ...style,\n }}\n {...rest}\n />\n )\n}\n\n// ---------------------------------------------------------------------------\n// Toasts\n// ---------------------------------------------------------------------------\n\nexport type ToastVariant = 'info' | 'success' | 'error'\n\nexport interface Toast {\n id: string\n title?: string\n message: ReactNode\n variant?: ToastVariant\n /** Milliseconds before auto-dismiss. `0` keeps it until dismissed. Default `4500`. */\n duration?: number\n}\n\ninterface ToastContextValue {\n toast: (toast: Omit<Toast, 'id'>) => string\n dismiss: (id: string) => void\n}\n\nconst ToastContext = createContext<ToastContextValue | null>(null)\n\n/**\n * Provider for the toast system.\n *\n * ```tsx\n * <ToastProvider><App /></ToastProvider>\n *\n * const { toast } = useToast()\n * toast({ title: 'Deployed', message: 'Live in 1.2s', variant: 'success' })\n * ```\n */\nexport function ToastProvider({ children }: { children?: ReactNode }) {\n const [toasts, setToasts] = useState<Toast[]>([])\n const [closing, setClosing] = useState<Set<string>>(new Set())\n const timers = useRef(new Map<string, ReturnType<typeof setTimeout>>())\n\n const dismiss = useCallback((id: string) => {\n // Mark as closing first so the exit animation can play, then remove. Removing immediately\n // would make toasts vanish rather than leave.\n setClosing((prev) => new Set(prev).add(id))\n const timer = setTimeout(() => {\n setToasts((prev) => prev.filter((t) => t.id !== id))\n setClosing((prev) => {\n const next = new Set(prev)\n next.delete(id)\n return next\n })\n }, 200)\n timers.current.set(`${id}-exit`, timer)\n }, [])\n\n const toast = useCallback(\n (input: Omit<Toast, 'id'>) => {\n const id = `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`\n const next: Toast = { id, duration: 4500, variant: 'info', ...input }\n setToasts((prev) => [...prev, next])\n\n if (next.duration && next.duration > 0) {\n timers.current.set(\n id,\n setTimeout(() => dismiss(id), next.duration),\n )\n }\n return id\n },\n [dismiss],\n )\n\n // Clear every pending timer on unmount, or a dismissed provider still fires setState later.\n useEffect(() => {\n const map = timers.current\n return () => {\n for (const timer of map.values()) clearTimeout(timer)\n map.clear()\n }\n }, [])\n\n const value = useMemo(() => ({ toast, dismiss }), [toast, dismiss])\n\n return (\n <ToastContext.Provider value={value}>\n {children}\n <div\n className=\"ansh-toaster\"\n // `polite` rather than `assertive`: a toast should not interrupt what the user is\n // currently reading. Errors that genuinely must interrupt belong in a dialog.\n role=\"region\"\n aria-live=\"polite\"\n aria-label=\"Notifications\"\n >\n {toasts.map((t) => (\n <div\n key={t.id}\n className={`ansh-toast ansh-toast--${t.variant ?? 'info'}`}\n data-state={closing.has(t.id) ? 'closing' : 'open'}\n >\n <span className=\"ansh-toast__dot\" aria-hidden=\"true\" />\n <div style={{ display: 'grid', gap: 2 }}>\n {t.title ? <div className=\"ansh-toast__title\">{t.title}</div> : null}\n <div className=\"ansh-toast__body\">{t.message}</div>\n </div>\n <button\n type=\"button\"\n onClick={() => dismiss(t.id)}\n aria-label=\"Dismiss notification\"\n className=\"ansh-focusable\"\n style={{\n marginLeft: 'auto',\n background: 'none',\n border: 0,\n color: 'inherit',\n cursor: 'pointer',\n opacity: 0.6,\n padding: 4,\n }}\n >\n ✕\n </button>\n </div>\n ))}\n </div>\n </ToastContext.Provider>\n )\n}\n\nexport function useToast(): ToastContextValue {\n const context = useContext(ToastContext)\n if (!context) {\n throw new Error('[ansh] useToast() must be used inside a <ToastProvider>.')\n }\n return context\n}\n","import { type ReactNode, useId, useState } from 'react'\nimport { Button, type ButtonVariant } from './buttons'\nimport { inertProps } from '../../primitives/inert'\n\n/**\n * Marketing components.\n *\n * These are the ones a landing page actually needs, and the two places they usually go wrong are\n * both handled here: an accordion that animates to intrinsic content height without JavaScript\n * measurement, and a pricing table whose \"recommended\" plan is conveyed by more than colour.\n */\n\n// ---------------------------------------------------------------------------\n// Pricing\n// ---------------------------------------------------------------------------\n\nexport interface PricingPlan {\n name: string\n price: string\n /** Billing period, e.g. `'/month'`. */\n period?: string\n description?: string\n features: readonly string[]\n /** Highlight this plan. Renders elevated with a badge. */\n featured?: boolean\n badge?: string\n cta?: {\n label: string\n href?: string\n onClick?: () => void\n variant?: ButtonVariant\n }\n}\n\nexport interface PricingTableProps {\n plans: readonly PricingPlan[]\n className?: string\n}\n\n/**\n * A responsive pricing table.\n *\n * The featured plan is distinguished three ways — elevation, a text badge, and a filled CTA —\n * rather than by colour alone. Colour-only emphasis fails WCAG 1.4.1 and is invisible to a\n * colour-blind user, which for a pricing page means the recommended plan simply isn't recommended.\n */\nexport function PricingTable({ plans, className }: PricingTableProps) {\n return (\n <div className={['ansh-pricing', className].filter(Boolean).join(' ')}>\n {plans.map((plan) => (\n <div\n key={plan.name}\n className={[\n 'ansh-card',\n 'ansh-plan',\n plan.featured && 'ansh-plan--featured',\n plan.featured && 'ansh-card--glow',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n {plan.featured ? (\n <span className=\"ansh-plan__badge\">{plan.badge ?? 'Most popular'}</span>\n ) : null}\n\n <div>\n <div className=\"ansh-plan__name\">{plan.name}</div>\n <div className=\"ansh-plan__price\">\n <span>{plan.price}</span>\n {plan.period ? <span className=\"ansh-plan__period\">{plan.period}</span> : null}\n </div>\n </div>\n\n {plan.description ? (\n <p\n style={{\n margin: 0,\n fontSize: 'var(--ansh-text-sm)',\n color: 'var(--ansh-content-secondary)',\n }}\n >\n {plan.description}\n </p>\n ) : null}\n\n <ul className=\"ansh-plan__features\">\n {plan.features.map((feature) => (\n <li key={feature}>\n {/* Decorative: the feature text carries the meaning, so the tick is hidden. */}\n <span aria-hidden=\"true\" style={{ color: 'var(--ansh-state-success)' }}>\n ✓\n </span>\n <span>{feature}</span>\n </li>\n ))}\n </ul>\n\n {plan.cta ? (\n <Button\n as={plan.cta.href ? 'a' : 'button'}\n {...(plan.cta.href ? { href: plan.cta.href } : {})}\n onClick={plan.cta.onClick}\n variant={plan.cta.variant ?? (plan.featured ? 'shimmer' : 'ghost')}\n style={{ marginTop: 'auto', width: '100%' }}\n >\n {plan.cta.label}\n </Button>\n ) : null}\n </div>\n ))}\n </div>\n )\n}\n\n// ---------------------------------------------------------------------------\n// Accordion\n// ---------------------------------------------------------------------------\n\n/**\n * A single question/answer pair.\n *\n * Named `FaqItem` rather than `AccordionItem` because the general-purpose `Accordion` owns that\n * name. The two are genuinely different shapes: this one is question/answer, the general one is\n * title/content with icons, subtitles and per-item disabled state.\n */\nexport interface FaqItem {\n question: string\n answer: ReactNode\n}\n\nexport interface FAQAccordionProps {\n items: readonly FaqItem[]\n /** Allow several panels open at once. Default `false`. */\n multiple?: boolean\n /** Index open on first render. Omit for all closed. */\n defaultOpen?: number\n className?: string\n}\n\n/**\n * An accordion.\n *\n * The height transition uses `grid-template-rows: 0fr → 1fr`, which is the only way to animate to\n * *intrinsic* content height in pure CSS. The usual alternatives both fail: a fixed `max-height`\n * either clips long answers or eases at the wrong rate, and measuring `scrollHeight` in JavaScript\n * means a layout read per toggle and a stale value whenever the content reflows.\n *\n * Uses native `<button>` triggers with `aria-expanded` and `aria-controls`, so keyboard and screen\n * reader behaviour is correct without a roving tabindex.\n */\nexport function FAQAccordion({\n items,\n multiple = false,\n defaultOpen,\n className,\n}: FAQAccordionProps) {\n const [open, setOpen] = useState<Set<number>>(\n () => new Set(defaultOpen === undefined ? [] : [defaultOpen]),\n )\n const baseId = useId()\n\n const toggle = (index: number) => {\n setOpen((prev) => {\n const next = new Set(multiple ? prev : [])\n if (prev.has(index)) next.delete(index)\n else next.add(index)\n return next\n })\n }\n\n return (\n <div className={['ansh-accordion', className].filter(Boolean).join(' ')}>\n {items.map((item, index) => {\n const isOpen = open.has(index)\n const triggerId = `${baseId}-trigger-${index}`\n const panelId = `${baseId}-panel-${index}`\n\n return (\n <div key={item.question} className=\"ansh-accordion__item\">\n <h3 style={{ margin: 0 }}>\n <button\n id={triggerId}\n type=\"button\"\n className=\"ansh-accordion__trigger ansh-focusable\"\n aria-expanded={isOpen}\n aria-controls={panelId}\n onClick={() => toggle(index)}\n >\n <span>{item.question}</span>\n {/* A plus rotating 45° into a cross — one glyph, no icon dependency. */}\n <span className=\"ansh-accordion__icon\" aria-hidden=\"true\">\n +\n </span>\n </button>\n </h3>\n\n <div\n id={panelId}\n role=\"region\"\n aria-labelledby={triggerId}\n className=\"ansh-accordion__panel\"\n data-open={isOpen}\n // `inert` when collapsed removes the panel from the accessibility tree *and* from the\n // tab order, so a screen reader doesn't read every answer while the user scans the\n // questions, and Tab doesn't land on links inside a closed panel.\n {...inertProps(!isOpen)}\n >\n <div>\n <div className=\"ansh-accordion__body\">{item.answer}</div>\n </div>\n </div>\n </div>\n )\n })}\n </div>\n )\n}\n","import { type CSSProperties, type ElementType, useEffect, useRef } from 'react'\nimport { type TextScrambleOptions, mountBehaviour, textScramble } from '@ansh-ui/core'\n\n/**\n * Text that resolves out of noise.\n *\n * The visual work is entirely `textScramble` in `@ansh-ui/core`; this is the React binding plus\n * the one thing the behaviour cannot do on its own — **keep the accessible text stable**.\n *\n * The behaviour rewrites `textContent` every frame while it runs. Applied directly to a heading\n * that would mean assistive technology reads whatever glyph soup happens to be in the node when it\n * reaches it. So the real string is rendered once into a visually-hidden span that carries the\n * accessible name, and the scrambling span is `aria-hidden`. This is the same split\n * `AnimatedText` uses in `components/text.tsx`, and for the same reason.\n *\n * ```tsx\n * <ScrambleText as=\"h2\" trigger=\"view\">Motion, refined.</ScrambleText>\n * ```\n */\n\nconst VISUALLY_HIDDEN: CSSProperties = {\n position: 'absolute',\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n whiteSpace: 'nowrap',\n border: 0,\n}\n\nexport interface ScrambleTextProps extends TextScrambleOptions {\n /** The finished text. Must be a plain string — the behaviour owns this node's text content. */\n children: string\n /** Element to render. Default `'span'`. */\n as?: ElementType\n className?: string\n style?: CSSProperties\n}\n\nexport function ScrambleText({ children, as, className, style, ...options }: ScrambleTextProps) {\n const Tag = (as ?? 'span') as ElementType\n const ref = useRef<HTMLSpanElement | null>(null)\n\n // `children` is a dependency because the behaviour captures the finished text at setup. When the\n // string changes the old capture is stale, so the behaviour is remounted rather than updated.\n const {\n chars,\n duration,\n stagger,\n cycleSpeed,\n trigger,\n repeat,\n threshold,\n seed,\n intensity,\n reducedMotion,\n disabled,\n } = options\n\n useEffect(() => {\n const node = ref.current\n if (!node) return\n\n const handle = mountBehaviour(textScramble, node, {\n chars,\n duration,\n stagger,\n cycleSpeed,\n trigger,\n repeat,\n threshold,\n seed,\n intensity,\n reducedMotion,\n disabled,\n })\n return () => handle.destroy()\n }, [\n children,\n chars,\n duration,\n stagger,\n cycleSpeed,\n trigger,\n repeat,\n threshold,\n seed,\n intensity,\n reducedMotion,\n disabled,\n ])\n\n return (\n <Tag className={className} style={style}>\n <span style={VISUALLY_HIDDEN}>{children}</span>\n {/*\n Rendered with the real text, not empty. The server output and the first client render both\n contain the finished string, so there is no hydration mismatch and no flash of emptiness if\n the behaviour never runs.\n */}\n <span aria-hidden=\"true\" ref={ref}>\n {children}\n </span>\n </Tag>\n )\n}\n","import { type CSSProperties, useEffect, useRef, useState } from 'react'\nimport { prefersReducedMotion } from '@ansh-ui/core'\n\n/**\n * A headline word that cycles through alternatives.\n *\n * ```tsx\n * <h1>Built for <TextRotate words={['designers', 'engineers', 'teams']} /></h1>\n * ```\n *\n * **The box is sized to the longest word, up front.** The naive version sizes to the current word,\n * so the surrounding sentence reflows on every rotation — the text after it visibly jumps, and on\n * a two-line headline the whole layout shifts. Every candidate is rendered once, hidden and\n * unmeasured by the reader, purely to hold the width open. This is a layout-stability fix, not a\n * visual one: it is the difference between a device that feels designed and one that feels broken.\n *\n * **It is not a live region.** Rotating text is decorative emphasis, not new information. Marking\n * it `aria-live` would make a screen reader interrupt itself every two seconds, forever. The\n * current word is in the accessible tree and read normally when traversed; changes are silent.\n *\n * **Reduced motion stops the rotation entirely**, rather than swapping instantly. A word that\n * changes with no transition is more jarring than one that does not change at all, and the\n * sentence still reads correctly with a single word in place.\n */\n\nexport type TextRotateAnimation = 'slide' | 'fade' | 'flip'\n\nexport interface TextRotateProps {\n /** The alternatives to cycle. The first is shown initially and under reduced motion. */\n words: readonly string[]\n /** Seconds each word is held. Default `2.2`. */\n interval?: number\n /** How a word leaves and the next arrives. Default `'slide'`. */\n animation?: TextRotateAnimation\n className?: string\n style?: CSSProperties\n}\n\nexport function TextRotate({\n words,\n interval = 2.2,\n animation = 'slide',\n className,\n style,\n}: TextRotateProps) {\n const [index, setIndex] = useState(0)\n // Resolved once on mount rather than read per render: this decides whether to schedule at all,\n // and re-reading it mid-cycle would leave a timer running with nothing driving it.\n const reduced = useRef(false)\n const [ready, setReady] = useState(false)\n\n useEffect(() => {\n reduced.current = prefersReducedMotion()\n setReady(true)\n }, [])\n\n const safeWords = words.length > 0 ? words : ['']\n const count = safeWords.length\n\n /*\n * Keyed on `count`, deliberately not on the array.\n *\n * `words={['a','b']}` — the documented usage — is a new array identity on every render of the\n * caller. Depending on it would tear down and reschedule this timer on each of those renders,\n * so in any app whose parent re-renders faster than `interval` the word would never rotate at\n * all. Only the number of candidates actually affects the schedule; their text does not.\n */\n useEffect(() => {\n if (!ready || reduced.current) return\n if (count < 2) return\n\n const ms = Math.max(200, interval * 1000)\n const timer = window.setInterval(() => {\n setIndex((previous) => (previous + 1) % count)\n }, ms)\n return () => window.clearInterval(timer)\n }, [ready, interval, count])\n\n // Modulo again at read time: `count` can shrink between the timer firing and this render.\n const current = safeWords[index % count]\n\n return (\n <span\n className={['ansh-rotate', className].filter(Boolean).join(' ')}\n style={style}\n data-animation={animation}\n >\n {/*\n The width holder, and — just as importantly — the *baseline* holder. It stays in normal\n flow so the surrounding sentence aligns to its text baseline; the visible word is overlaid\n on top of it. Clipping the element that participates in the baseline instead would make\n the browser align the sentence to its bottom margin edge, which drops the rotating word\n below the line. `visibility: hidden` rather than `display: none` so it still has a size.\n */}\n <span className=\"ansh-rotate__sizer\" aria-hidden=\"true\">\n {safeWords.map((word, i) => (\n <span key={`${word}-${i}`} className=\"ansh-rotate__ghost\">\n {word}\n </span>\n ))}\n </span>\n\n {/* Overlaid and clipped, so the slide travel is hidden without affecting the baseline. */}\n <span className=\"ansh-rotate__clip\">\n {/*\n Keyed by index so React replaces the node on every change, which is what restarts the CSS\n entry animation. Mutating the text of a persistent node would not re-trigger it.\n */}\n <span key={index} className=\"ansh-rotate__word\">\n {current}\n </span>\n </span>\n </span>\n )\n}\n","import {\n type CSSProperties,\n type PointerEvent as ReactPointerEvent,\n type ReactNode,\n useCallback,\n useRef,\n useState,\n} from 'react'\nimport { clamp } from '@ansh-ui/core'\nimport { useControllableState } from '../../primitives/use-controllable-state'\n\n/**\n * A before/after comparison with a draggable divider.\n *\n * **The clip is on the top layer, not a width change.** Both layers are absolutely positioned at\n * full size and the top one is revealed with `clip-path: inset(...)`. Resizing it instead would\n * re-lay-out its contents as the handle moves, so an image would squash rather than be uncovered —\n * which defeats the entire purpose of the control.\n *\n * **It is a real slider.** `role=\"slider\"` with `aria-valuenow` and arrow-key handling, so it is\n * operable without a pointer. Comparison sliders are very often built as a bare div with a\n * `pointermove` listener, which makes them completely unusable by keyboard and invisible to\n * assistive technology.\n *\n * **Pointer capture, not window listeners.** `setPointerCapture` keeps the drag attached to the\n * handle even when the pointer leaves the element, and releases automatically if the gesture is\n * cancelled — no global `pointermove`/`pointerup` pair to leak on unmount.\n */\n\nexport interface BeforeAfterProps {\n /** Content revealed on the left of the divider. */\n before: ReactNode\n /** Content revealed on the right of the divider. */\n after: ReactNode\n /** Divider position as a percentage, `0`–`100`. Controlled. */\n value?: number\n /** Initial position when uncontrolled. Default `50`. */\n defaultValue?: number\n onValueChange?: (value: number) => void\n /** Percentage points moved per arrow key press. Default `4`. */\n step?: number\n /** Accessible name for the divider. Default `'Comparison position'`. */\n label?: string\n className?: string\n style?: CSSProperties\n}\n\nexport function BeforeAfter({\n before,\n after,\n value,\n defaultValue = 50,\n onValueChange,\n step = 4,\n label = 'Comparison position',\n className,\n style,\n}: BeforeAfterProps) {\n const [position, setPosition] = useControllableState({\n value,\n defaultValue,\n onChange: onValueChange,\n })\n\n const rootRef = useRef<HTMLDivElement | null>(null)\n const [dragging, setDragging] = useState(false)\n\n const positionFromClientX = useCallback((clientX: number): number => {\n const node = rootRef.current\n if (!node) return 50\n const rect = node.getBoundingClientRect()\n if (rect.width <= 0) return 50\n return clamp(((clientX - rect.left) / rect.width) * 100, 0, 100)\n }, [])\n\n const onPointerDown = (event: ReactPointerEvent<HTMLDivElement>) => {\n // Capture on the handle itself so the drag survives the pointer leaving the component.\n event.currentTarget.setPointerCapture(event.pointerId)\n setDragging(true)\n setPosition(positionFromClientX(event.clientX))\n }\n\n const onPointerMove = (event: ReactPointerEvent<HTMLDivElement>) => {\n if (!dragging) return\n setPosition(positionFromClientX(event.clientX))\n }\n\n const endDrag = (event: ReactPointerEvent<HTMLDivElement>) => {\n if (event.currentTarget.hasPointerCapture(event.pointerId)) {\n event.currentTarget.releasePointerCapture(event.pointerId)\n }\n setDragging(false)\n }\n\n const onKeyDown = (event: React.KeyboardEvent) => {\n const jump =\n event.key === 'ArrowLeft' || event.key === 'ArrowDown'\n ? -step\n : event.key === 'ArrowRight' || event.key === 'ArrowUp'\n ? step\n : event.key === 'Home'\n ? -100\n : event.key === 'End'\n ? 100\n : 0\n if (jump === 0) return\n event.preventDefault()\n setPosition((current) => clamp(current + jump, 0, 100))\n }\n\n const clipped = clamp(position, 0, 100)\n\n return (\n <div\n ref={rootRef}\n className={['ansh-compare', className].filter(Boolean).join(' ')}\n style={style}\n data-dragging={dragging || undefined}\n // Clicking anywhere on the surface jumps the divider there, which is what people try first.\n onPointerDown={(event) => {\n if (event.target === event.currentTarget || !dragging) {\n setPosition(positionFromClientX(event.clientX))\n }\n }}\n >\n <div className=\"ansh-compare__layer\">{after}</div>\n\n <div\n className=\"ansh-compare__layer ansh-compare__layer--before\"\n style={{ clipPath: `inset(0 ${100 - clipped}% 0 0)` }}\n >\n {before}\n </div>\n\n <div\n className=\"ansh-compare__handle\"\n style={{ left: `${clipped}%` }}\n role=\"slider\"\n tabIndex={0}\n aria-label={label}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={Math.round(clipped)}\n aria-orientation=\"horizontal\"\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={endDrag}\n onPointerCancel={endDrag}\n onKeyDown={onKeyDown}\n >\n <span className=\"ansh-compare__grip\" aria-hidden=\"true\" />\n </div>\n </div>\n )\n}\n","import { type CSSProperties, type ReactNode } from 'react'\n\n/**\n * A device or browser frame to present a screenshot, a demo, or a live component in.\n *\n * Purely presentational, and deliberately so — it exists because \"here is the thing I built\" is a\n * layout problem, not an animation one. Anything placed inside keeps working: this renders a frame\n * around real DOM, not a picture of one, so a live interactive demo can sit in it.\n *\n * **The chrome is `aria-hidden`.** Traffic-light dots, a notch and a fake URL are decoration; they\n * carry no information a screen reader user needs, and announcing \"three circles\" before every\n * demo is noise. Only the content inside the screen is in the accessible tree.\n *\n * **The URL is not a link and not an input.** It is a static label. Making it either would invite\n * clicks that go nowhere, which is worse than obviously-inert chrome.\n */\n\nexport type MockupVariant = 'browser' | 'window' | 'phone'\n\nexport interface DeviceMockupProps {\n /** Frame style. Default `'browser'`. */\n variant?: MockupVariant\n /** Address shown in the browser chrome. Ignored by the other variants. */\n url?: string\n /** Title shown in the window chrome. Ignored by the other variants. */\n title?: string\n /** Accessible name for the framed region, e.g. `'Dashboard preview'`. */\n label?: string\n className?: string\n style?: CSSProperties\n children?: ReactNode\n}\n\nexport function DeviceMockup({\n variant = 'browser',\n url,\n title,\n label,\n className,\n style,\n children,\n}: DeviceMockupProps) {\n return (\n <div\n className={['ansh-mock', `ansh-mock--${variant}`, className].filter(Boolean).join(' ')}\n style={style}\n role={label ? 'group' : undefined}\n aria-label={label}\n >\n {variant === 'phone' ? (\n <span className=\"ansh-mock__notch\" aria-hidden=\"true\" />\n ) : (\n <div className=\"ansh-mock__chrome\" aria-hidden=\"true\">\n <span className=\"ansh-mock__dots\">\n <i />\n <i />\n <i />\n </span>\n {variant === 'browser' && url ? (\n <span className=\"ansh-mock__url\">{url}</span>\n ) : title ? (\n <span className=\"ansh-mock__title\">{title}</span>\n ) : null}\n </div>\n )}\n\n <div className=\"ansh-mock__screen\">{children}</div>\n </div>\n )\n}\n","import { type CSSProperties, type ReactNode, useEffect, useRef, useState } from 'react'\nimport { prefersReducedMotion } from '@ansh-ui/core'\nimport { inertProps } from '../../primitives/inert'\n\n/**\n * A deck of cards with the next few peeking out behind the top one.\n *\n * **Depth is a fixed ladder, not per-card state.** A card's offset, scale and rotation are derived\n * from its distance from the top of the deck, so advancing only changes one number and every card\n * transitions to its new rung. Animating each card's transform imperatively would mean tracking\n * n transforms and reconciling them on every change — this way the CSS transition does it.\n *\n * **Only the top card is reachable, by any route.** The cards behind it get both `aria-hidden` and\n * `inert`. Either alone is a trap: `aria-hidden` on its own leaves a buried button still reachable\n * by Tab, so keyboard focus lands on a control the screen reader will not announce. A reader\n * should encounter one card, not four overlapping ones, three of them 80% hidden.\n *\n * **Auto-play stops under reduced motion and while hovered or focused.** Content that moves itself\n * away from a reader mid-sentence is a WCAG 2.2 pause/stop concern, not a preference — hovering or\n * tabbing into the deck is a strong signal that someone is reading it.\n */\n\nexport interface CardStackProps {\n /** Cards, front to back. */\n items: readonly ReactNode[]\n /** Advance on a timer. Default `true`. */\n autoPlay?: boolean\n /** Seconds each card is held when auto-playing. Default `3.5`. */\n interval?: number\n /** How many cards behind the top one are visible. Default `2`. */\n peek?: number\n /** Render previous/next buttons. Default `true`. */\n controls?: boolean\n /** Accessible name for the deck. Default `'Card stack'`. */\n label?: string\n className?: string\n style?: CSSProperties\n}\n\n/** Per-rung visual ladder. Index 0 is the top card. */\nconst OFFSET_Y = 14\nconst SCALE_STEP = 0.05\nconst ROTATE_STEP = 1.6\n\nexport function CardStack({\n items,\n autoPlay = true,\n interval = 3.5,\n peek = 2,\n controls = true,\n label = 'Card stack',\n className,\n style,\n}: CardStackProps) {\n const [top, setTop] = useState(0)\n const [paused, setPaused] = useState(false)\n const reduced = useRef(false)\n const [ready, setReady] = useState(false)\n\n useEffect(() => {\n reduced.current = prefersReducedMotion()\n setReady(true)\n }, [])\n\n const count = items.length\n\n useEffect(() => {\n if (!ready || reduced.current || !autoPlay || paused) return\n if (count < 2) return\n const ms = Math.max(600, interval * 1000)\n const timer = window.setInterval(() => setTop((current) => (current + 1) % count), ms)\n return () => window.clearInterval(timer)\n }, [ready, autoPlay, paused, interval, count])\n\n if (count === 0) return null\n\n /*\n * `top` is state and survives a change to `items`, so after the list shrinks it can point past\n * the end. That is not merely a stale index: `(i - top + count) % count` then goes **negative**,\n * because JavaScript's `%` keeps the sign of the dividend, and a negative rung yields\n * `zIndex: count - rung` — the highest of the deck. The card painted on top would be one marked\n * `inert` and `aria-hidden`, i.e. visible but unreachable. Folding it back into range here fixes\n * that at every read site at once, and needs no effect to resynchronise.\n */\n const current = top % count\n\n const advance = (direction: 1 | -1) =>\n setTop((previous) => (previous + direction + count) % count)\n\n return (\n <div\n className={['ansh-stack', className].filter(Boolean).join(' ')}\n style={style}\n role=\"group\"\n aria-label={label}\n aria-roledescription=\"card stack\"\n onPointerEnter={() => setPaused(true)}\n onPointerLeave={() => setPaused(false)}\n onFocusCapture={() => setPaused(true)}\n onBlurCapture={() => setPaused(false)}\n >\n <div className=\"ansh-stack__deck\">\n {items.map((item, i) => {\n // Distance from the top of the deck, wrapping — so the card just advanced past goes to\n // the back rather than sliding through every rung in between.\n const rung = (i - current + count) % count\n const hidden = rung > peek\n\n return (\n <div\n key={i}\n className=\"ansh-stack__card\"\n data-rung={rung}\n aria-hidden={rung === 0 ? undefined : 'true'}\n // `aria-hidden` alone is not enough. A focusable descendant inside an aria-hidden\n // subtree is still reachable by Tab, so a keyboard user would land on a button the\n // screen reader refuses to announce — a worse failure than either alone. `inert`\n // removes it from the tab order and from hit-testing together.\n {...inertProps(rung !== 0)}\n style={{\n transform: `translateY(${rung * OFFSET_Y}px) scale(${1 - rung * SCALE_STEP}) rotate(${\n rung === 0 ? 0 : (rung % 2 === 0 ? 1 : -1) * ROTATE_STEP\n }deg)`,\n opacity: hidden ? 0 : 1,\n zIndex: count - rung,\n pointerEvents: rung === 0 ? undefined : 'none',\n }}\n >\n {item}\n </div>\n )\n })}\n </div>\n\n {controls && count > 1 ? (\n <div className=\"ansh-stack__controls\">\n <button\n type=\"button\"\n className=\"ansh-stack__button\"\n onClick={() => advance(-1)}\n aria-label=\"Previous card\"\n >\n ‹\n </button>\n <span className=\"ansh-stack__count\" aria-hidden=\"true\">\n {current + 1} / {count}\n </span>\n <button\n type=\"button\"\n className=\"ansh-stack__button\"\n onClick={() => advance(1)}\n aria-label=\"Next card\"\n >\n ›\n </button>\n </div>\n ) : null}\n </div>\n )\n}\n","import {\n type CSSProperties,\n type PointerEvent as ReactPointerEvent,\n type ReactNode,\n useEffect,\n useId,\n useRef,\n useState,\n} from 'react'\nimport { clamp } from '@ansh-ui/core'\nimport { cx } from '../../primitives/compose'\nimport { useControllableState } from '../../primitives/use-controllable-state'\nimport { inertProps } from '../../primitives/inert'\n\nexport interface CarouselProps {\n /** Slides, in order. */\n items: readonly ReactNode[]\n /** Active slide index. Controlled. */\n value?: number\n /** Initial slide when uncontrolled. Default `0`. */\n defaultValue?: number\n onChange?: (index: number) => void\n /** Wrap past the ends. Default `true`. */\n loop?: boolean\n /** Advance on a timer. Default `false`. */\n autoPlay?: boolean\n /** Seconds each slide is held when auto-playing. Default `5`. */\n interval?: number\n /** Render the dot indicators. Default `true`. */\n showDots?: boolean\n /** Render the previous/next arrows. Default `true`. */\n showArrows?: boolean\n /** Allow dragging the track to change slides. Default `true`. */\n draggable?: boolean\n /** Accessible name for the carousel region. */\n label: string\n className?: string\n style?: CSSProperties\n}\n\n/**\n * A carousel.\n *\n * **Transform, not scroll.** The track is translated by `index × 100%`. A scroll-snap carousel gets\n * native touch feel for free but makes the *scroll position* the source of truth, so the active\n * index has to be inferred back out of it with an observer — and that inference disagrees with the\n * controlled `value` prop the moment both try to drive at once. One transform keeps the index\n * authoritative, which is what a controlled component requires.\n *\n * **`aria-live` is tied to intent, not to movement.** The live region is `polite` only while the\n * carousel is idle, and `off` while it is auto-playing. Announcing every automatic change would\n * make a screen reader talk over the user indefinitely; announcing a change the user *asked* for\n * is exactly what they need.\n *\n * **Auto-play ships with a real pause control**, not just pause-on-hover. WCAG 2.2.2 requires a\n * mechanism to stop content that moves automatically for more than five seconds, and hover is not\n * one — it is unavailable to keyboard and touch users, and vanishes the moment the pointer moves.\n *\n * **Off-screen slides are `inert`.** They are laid out beside the visible one, so without it every\n * link and button in all of them sits in the tab order, and Tab appears to focus nothing.\n */\nexport function Carousel({\n items,\n value,\n defaultValue = 0,\n onChange,\n loop = true,\n autoPlay = false,\n interval = 5,\n showDots = true,\n showArrows = true,\n draggable = true,\n label,\n className,\n style,\n}: CarouselProps) {\n const count = items.length\n const [index, setIndex] = useControllableState<number>({\n value,\n defaultValue: clamp(defaultValue, 0, Math.max(0, count - 1)),\n onChange,\n })\n const [paused, setPaused] = useState(false)\n const [playing, setPlaying] = useState(autoPlay)\n const [drag, setDrag] = useState(0)\n\n const baseId = useId()\n const viewportRef = useRef<HTMLDivElement | null>(null)\n const dragStart = useRef<number | null>(null)\n\n // Same reasoning as `CardStack`: `index` is state and survives a change to `items`, so fold it\n // back into range rather than letting it address a slide that no longer exists.\n const active = count > 0 ? clamp(index, 0, count - 1) : 0\n\n const goTo = (next: number) => {\n if (count === 0) return\n const wrapped = loop ? (next + count) % count : clamp(next, 0, count - 1)\n setIndex(wrapped)\n }\n\n useEffect(() => {\n if (!playing || paused || count < 2) return\n const ms = Math.max(1000, interval * 1000)\n const timer = window.setInterval(() => {\n setIndex((previous) => {\n const next = previous + 1\n return loop ? next % count : Math.min(next, count - 1)\n })\n }, ms)\n return () => window.clearInterval(timer)\n }, [playing, paused, interval, count, loop, setIndex])\n\n if (count === 0) return null\n\n const atStart = !loop && active === 0\n const atEnd = !loop && active === count - 1\n\n const onKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault()\n goTo(active - 1)\n } else if (event.key === 'ArrowRight') {\n event.preventDefault()\n goTo(active + 1)\n } else if (event.key === 'Home') {\n event.preventDefault()\n goTo(0)\n } else if (event.key === 'End') {\n event.preventDefault()\n goTo(count - 1)\n }\n }\n\n const onPointerDown = (event: ReactPointerEvent<HTMLDivElement>) => {\n if (!draggable || count < 2) return\n dragStart.current = event.clientX\n event.currentTarget.setPointerCapture(event.pointerId)\n }\n\n const onPointerMove = (event: ReactPointerEvent<HTMLDivElement>) => {\n if (dragStart.current === null) return\n setDrag(event.clientX - dragStart.current)\n }\n\n const endDrag = (event: ReactPointerEvent<HTMLDivElement>) => {\n if (dragStart.current === null) return\n if (event.currentTarget.hasPointerCapture(event.pointerId)) {\n event.currentTarget.releasePointerCapture(event.pointerId)\n }\n const width = viewportRef.current?.clientWidth ?? 1\n // A quarter of the viewport is the commit threshold. Lower and an accidental brush of the\n // surface changes slide; higher and a deliberate swipe snaps back, which reads as broken.\n const travelled = drag\n dragStart.current = null\n setDrag(0)\n if (Math.abs(travelled) > width * 0.25) goTo(active + (travelled < 0 ? 1 : -1))\n }\n\n const dragPercent = drag !== 0 ? (drag / (viewportRef.current?.clientWidth || 1)) * 100 : 0\n\n return (\n <section\n className={cx('ansh-carousel', className)}\n style={style}\n aria-roledescription=\"carousel\"\n aria-label={label}\n onKeyDown={onKeyDown}\n onPointerEnter={() => setPaused(true)}\n onPointerLeave={() => setPaused(false)}\n onFocusCapture={() => setPaused(true)}\n onBlurCapture={() => setPaused(false)}\n >\n <div\n className=\"ansh-carousel__viewport\"\n ref={viewportRef}\n // `polite` only when idle — see the note at the top of this file.\n aria-live={playing ? 'off' : 'polite'}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={endDrag}\n onPointerCancel={endDrag}\n data-dragging={dragStart.current !== null || undefined}\n >\n <div\n className=\"ansh-carousel__track\"\n style={{\n transform: `translate3d(${-active * 100 + dragPercent}%, 0, 0)`,\n // Suppress the transition mid-drag so the track tracks the finger exactly.\n transition: dragStart.current !== null ? 'none' : undefined,\n }}\n >\n {items.map((item, i) => (\n <div\n key={i}\n className=\"ansh-carousel__slide\"\n id={`${baseId}-slide-${i}`}\n role=\"group\"\n aria-roledescription=\"slide\"\n aria-label={`${i + 1} of ${count}`}\n aria-hidden={i === active ? undefined : 'true'}\n {...inertProps(i !== active)}\n >\n {item}\n </div>\n ))}\n </div>\n </div>\n\n {showArrows && count > 1 ? (\n <>\n <button\n type=\"button\"\n className=\"ansh-carousel__arrow ansh-carousel__arrow--prev\"\n onClick={() => goTo(active - 1)}\n disabled={atStart}\n aria-label=\"Previous slide\"\n >\n ‹\n </button>\n <button\n type=\"button\"\n className=\"ansh-carousel__arrow ansh-carousel__arrow--next\"\n onClick={() => goTo(active + 1)}\n disabled={atEnd}\n aria-label=\"Next slide\"\n >\n ›\n </button>\n </>\n ) : null}\n\n {(showDots && count > 1) || autoPlay ? (\n <div className=\"ansh-carousel__controls\">\n {autoPlay ? (\n <button\n type=\"button\"\n className=\"ansh-carousel__pause\"\n onClick={() => setPlaying((on) => !on)}\n aria-label={playing ? 'Pause carousel' : 'Play carousel'}\n >\n {playing ? '❚❚' : '▶'}\n </button>\n ) : null}\n\n {showDots && count > 1 ? (\n <div className=\"ansh-carousel__dots\">\n {items.map((_, i) => (\n <button\n key={i}\n type=\"button\"\n className=\"ansh-carousel__dot\"\n aria-label={`Go to slide ${i + 1}`}\n aria-current={i === active ? 'true' : undefined}\n onClick={() => goTo(i)}\n />\n ))}\n </div>\n ) : null}\n </div>\n ) : null}\n </section>\n )\n}\n","import { type ReactNode, useState } from 'react'\nimport { cx } from '../../primitives/compose'\n\nexport type AlertTone = 'info' | 'success' | 'warning' | 'danger' | 'neutral'\n\nconst ICONS: Record<AlertTone, ReactNode> = {\n info: (\n <svg\n viewBox=\"0 0 20 20\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.6\"\n >\n <circle cx=\"10\" cy=\"10\" r=\"7.5\" />\n <path d=\"M10 9v4.5\" strokeLinecap=\"round\" />\n <circle cx=\"10\" cy=\"6.5\" r=\"0.9\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n ),\n success: (\n <svg\n viewBox=\"0 0 20 20\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.6\"\n >\n <circle cx=\"10\" cy=\"10\" r=\"7.5\" />\n <path d=\"M6.5 10.3l2.4 2.4 4.6-5.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n ),\n warning: (\n <svg\n viewBox=\"0 0 20 20\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.6\"\n >\n <path\n d=\"M8.6 3.2L1.9 14.6a1.6 1.6 0 001.4 2.4h13.4a1.6 1.6 0 001.4-2.4L11.4 3.2a1.6 1.6 0 00-2.8 0z\"\n strokeLinejoin=\"round\"\n />\n <path d=\"M10 7.5v3.5\" strokeLinecap=\"round\" />\n <circle cx=\"10\" cy=\"13.6\" r=\"0.9\" fill=\"currentColor\" stroke=\"none\" />\n </svg>\n ),\n danger: (\n <svg\n viewBox=\"0 0 20 20\"\n width=\"18\"\n height=\"18\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.6\"\n >\n <circle cx=\"10\" cy=\"10\" r=\"7.5\" />\n <path d=\"M7.5 7.5l5 5M12.5 7.5l-5 5\" strokeLinecap=\"round\" />\n </svg>\n ),\n neutral: null,\n}\n\nexport interface AlertProps {\n tone?: AlertTone\n title?: ReactNode\n children?: ReactNode\n /** Replace the default icon, or pass `null` to omit it. */\n icon?: ReactNode | null\n /** Show a dismiss button. */\n dismissible?: boolean\n onDismiss?: () => void\n /** Buttons or links under the message. */\n actions?: ReactNode\n variant?: 'soft' | 'outline' | 'solid'\n className?: string\n}\n\n/**\n * An inline message.\n *\n * The `role` follows the tone, because it decides whether a screen reader interrupts:\n * `role=\"alert\"` (assertive) for errors and warnings, which the user needs to know about *now*;\n * `role=\"status\"` (polite) for information and success, which can wait for a pause.\n *\n * Using `alert` for everything is the common mistake, and it makes a screen reader cut off whatever\n * it was saying to announce that a draft was saved.\n *\n * The tone is always carried by the icon and the text, never by colour alone.\n */\nexport function Alert({\n tone = 'info',\n title,\n children,\n icon,\n dismissible = false,\n onDismiss,\n actions,\n variant = 'soft',\n className,\n}: AlertProps) {\n const [visible, setVisible] = useState(true)\n if (!visible) return null\n\n const urgent = tone === 'danger' || tone === 'warning'\n const resolvedIcon = icon === undefined ? ICONS[tone] : icon\n\n return (\n <div\n className={cx('ansh-alert', `ansh-alert--${tone}`, `ansh-alert--${variant}`, className)}\n role={urgent ? 'alert' : 'status'}\n // Errors are assertive; everything else waits for a natural pause.\n aria-live={urgent ? 'assertive' : 'polite'}\n >\n {resolvedIcon ? (\n <span className=\"ansh-alert__icon\" aria-hidden=\"true\">\n {resolvedIcon}\n </span>\n ) : null}\n\n <div className=\"ansh-alert__body\">\n {title ? <p className=\"ansh-alert__title\">{title}</p> : null}\n {children ? <div className=\"ansh-alert__message\">{children}</div> : null}\n {actions ? <div className=\"ansh-alert__actions\">{actions}</div> : null}\n </div>\n\n {dismissible ? (\n <button\n type=\"button\"\n className=\"ansh-alert__close ansh-focusable\"\n aria-label=\"Dismiss message\"\n onClick={() => {\n setVisible(false)\n onDismiss?.()\n }}\n >\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" aria-hidden=\"true\">\n <path\n d=\"M4 4l8 8M12 4l-8 8\"\n stroke=\"currentColor\"\n strokeWidth=\"1.75\"\n strokeLinecap=\"round\"\n fill=\"none\"\n />\n </svg>\n </button>\n ) : null}\n </div>\n )\n}\n\nexport interface BannerProps extends Omit<AlertProps, 'variant'> {\n /** Pin to the top of the viewport. */\n sticky?: boolean\n}\n\n/**\n * A full-width page-level message — maintenance windows, trial expiry, a failed payment.\n *\n * Distinct from `Alert` in placement and weight rather than in mechanics: a banner concerns the\n * whole application, an alert concerns the thing next to it.\n */\nexport function Banner({ sticky = false, className, ...rest }: BannerProps) {\n return (\n <Alert\n variant=\"solid\"\n className={cx('ansh-banner', sticky && 'ansh-banner--sticky', className)}\n {...rest}\n />\n )\n}\n\nexport interface CalloutProps {\n /** Short label — \"Note\", \"Tip\", \"Warning\". */\n label?: string\n tone?: AlertTone\n icon?: ReactNode\n className?: string\n children: ReactNode\n}\n\n/**\n * A documentation callout.\n *\n * Deliberately **not** a live region. Prose asides are part of the page's content and are read in\n * document order; announcing them out of sequence would be disruptive rather than helpful, which is\n * the opposite of what `Alert` is for.\n */\nexport function Callout({ label, tone = 'info', icon, className, children }: CalloutProps) {\n return (\n <aside className={cx('ansh-callout', `ansh-callout--${tone}`, className)}>\n <span className=\"ansh-callout__icon\" aria-hidden=\"true\">\n {icon ?? ICONS[tone]}\n </span>\n <div className=\"ansh-callout__body\">\n {label ? <p className=\"ansh-callout__label\">{label}</p> : null}\n <div className=\"ansh-callout__content\">{children}</div>\n </div>\n </aside>\n )\n}\n","/**\n * @ansh-ui/react — Ansh for React 18/19 and Next.js.\n *\n * Every component here is a thin binding over `@ansh-ui/core`. The engine owns all behaviour; this\n * package owns the React lifecycle, prop diffing, and SSR correctness.\n *\n * ```tsx\n * import '@ansh-ui/tokens/ansh.css'\n * import { AuroraBackground, AnimatedText, MagneticButton } from '@ansh-ui/react'\n *\n * export default function Hero() {\n * return (\n * <AuroraBackground className=\"min-h-screen grid place-items-center\">\n * <AnimatedText by=\"chars\" from=\"center\">Motion, refined.</AnimatedText>\n * <MagneticButton strength={16}>Get started</MagneticButton>\n * </AuroraBackground>\n * )\n * }\n * ```\n *\n * ## Next.js App Router\n *\n * The package ships a `'use client'` banner, so these components work in server components without\n * you wrapping them in your own client boundary.\n */\n\n// --- Hooks ---\nexport * from './hooks/use-motion-value'\nexport * from './hooks/use-observers'\n\n// --- Factories ---\n// Exported so consumers can wrap their own effects and behaviours with the same guarantees the\n// built-in components get. This is the supported extension path.\nexport {\n createEffectComponent,\n type EffectComponent,\n type EffectComponentProps,\n type EffectComponentBaseProps,\n} from './factory/create-effect-component'\nexport {\n createBehaviourComponent,\n useBehaviour,\n type BehaviourComponent,\n type BehaviourComponentProps,\n type BehaviourComponentBaseProps,\n} from './factory/create-behaviour-component'\n\n// --- Effect & behaviour components ---\nexport * from './components/backgrounds'\nexport * from './components/interaction'\nexport * from './components/text'\nexport * from './components/providers'\n\n/**\n * --- Headless primitives ---\n *\n * The pieces every component here is built from. Exported because an application that needs a\n * component this library doesn't have should be able to build it with the same guarantees rather\n * than starting from scratch — that is the difference between a component library and a closed set.\n */\nexport { useControllableState } from './primitives/use-controllable-state'\nexport { composeEventHandlers, mergeProps, mergeRefs, cx } from './primitives/compose'\nexport { Slot, slotted, type SlotProps } from './primitives/slot'\nexport { Portal, type PortalProps } from './primitives/portal'\nexport {\n getTabbable,\n useAutoFocus,\n useFocusRestore,\n useFocusTrap,\n useRovingFocus,\n} from './primitives/focus'\nexport { useDismiss, useScrollLock, type DismissOptions } from './primitives/use-dismiss'\nexport { Presence, usePresence, type PresenceProps } from './primitives/presence'\nexport {\n computePosition,\n type Align,\n type Placement,\n type PositionOptions,\n type PositionResult,\n type Rect,\n type Side,\n} from './primitives/position'\nexport {\n useAnchoredPosition,\n type AnchoredPosition,\n type AnchoredPositionOptions,\n} from './primitives/use-anchored-position'\n\n/**\n * --- Designed UI components ---\n *\n * These need the stylesheet:\n *\n * ```ts\n * import '@ansh-ui/tokens/ansh.css'\n * import '@ansh-ui/react/styles.css'\n * ```\n *\n * Everything in it resolves from `@ansh-ui/tokens`, so overriding a token restyles the whole set.\n */\n\n// Buttons, cards, showcase pieces\nexport * from './components/ui/buttons'\nexport * from './components/ui/cards'\nexport * from './components/ui/dock'\nexport * from './components/ui/command-palette'\nexport * from './components/ui/text-effects'\nexport * from './components/ui/feedback'\nexport * from './components/ui/marketing'\nexport * from './components/ui/scramble-text'\nexport * from './components/ui/text-rotate'\nexport * from './components/ui/before-after'\nexport * from './components/ui/device-mockup'\nexport * from './components/ui/card-stack'\n\n// Layout\nexport * from './components/layout'\nexport * from './components/layout/resizable'\n\n// Forms\nexport * from './components/form/field'\nexport * from './components/form/input'\nexport * from './components/form/toggles'\nexport * from './components/form/listbox'\nexport * from './components/form/select'\nexport * from './components/form/combobox'\nexport * from './components/form/slider'\nexport * from './components/form/pin-input'\nexport * from './components/form/tags-input'\nexport * from './components/form/rating'\nexport * from './components/form/dropzone'\nexport * from './components/form/color-picker'\nexport * from './components/form/calendar'\nexport * from './components/form/date-picker'\n\n// Overlays\nexport * from './components/overlay/popover'\nexport * from './components/overlay/tooltip'\nexport * from './components/overlay/dialog'\nexport * from './components/overlay/drawer'\nexport * from './components/overlay/menu'\n\n// Data display\nexport * from './components/data/table'\nexport * from './components/data/display'\nexport * from './components/data/progress'\n\n// Navigation\nexport * from './components/navigation/tabs'\nexport * from './components/navigation/carousel'\nexport * from './components/navigation/breadcrumbs'\nexport * from './components/navigation/sidebar'\nexport * from './components/navigation/nav-menu'\n\n// Feedback\nexport * from './components/feedback/alert'\n\n// Disclosure\nexport * from './components/disclosure'\n\n// Declarative motion\nexport {\n AnimatePresence,\n Draggable,\n Motion,\n type AnimatePresenceProps,\n type DraggableProps,\n type MotionTransition,\n type MotionValues,\n} from './components/motion'\n\n/**\n * Re-exported engine surface.\n *\n * A narrow, curated set — the pieces a React author reaches for directly. Deliberately not\n * `export * from '@ansh-ui/core'`: that would put 200 symbols into this package's autocomplete and\n * make it unclear which layer a given import belongs to. For anything else, import from\n * `@ansh-ui/core` directly.\n */\nexport {\n // Motion\n animate,\n createTimeline,\n motionValue,\n MotionValue,\n stagger,\n springs,\n // Colour\n createGradient,\n createScale,\n generatePalette,\n mixColors,\n palettes,\n parseColor,\n toHex,\n toOklchString,\n checkContrast,\n ensureContrast,\n pickReadable,\n // Easing\n easings,\n cubicBezier,\n registerEasing,\n signature as signatureEasings,\n // Noise\n createNoise,\n // Kernel\n getTicker,\n // Accessibility\n prefersReducedMotion,\n setReducedMotionMode,\n // Registry — the seam for Pro-tier and plugin registration\n getRegistry,\n} from '@ansh-ui/core'\n\n/**\n * `Timeline` is re-exported as `MotionTimeline`.\n *\n * The engine's `Timeline` (the animation sequencer) and this package's `Timeline` (the activity\n * feed component) are unrelated things that happen to share a word. Exporting both unaliased makes\n * the name ambiguous, and `export *` resolves that by silently dropping it — which is how the\n * component disappeared from the public API without any build error at all.\n */\nexport type { Timeline as MotionTimeline } from '@ansh-ui/core'\n\nexport type {\n AnimationControls,\n AnimationOptions,\n BaseEffectOptions,\n ColorInput,\n ColorSpace,\n EasingInput,\n EffectDefinition,\n FrameState,\n Gradient,\n PaletteName,\n PointerState,\n ReducedMotionStrategy,\n Rgb,\n SpringOptions,\n StaggerFrom,\n StaggerOptions,\n} from '@ansh-ui/core'\n\nexport const VERSION = '0.1.0'\n"]}
|