@alea-design/cli 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/registry.json ADDED
@@ -0,0 +1 @@
1
+ {"version":"0.1.0","base":[{"path":"utils/Blueprint.tsx","content":"import { useEffect, useLayoutEffect, useRef, useState, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react';\nimport { cx } from './cx';\nimport { useStrings } from '../i18n/strings';\nimport { buildScene, paint, type Scene, type Shape, type Style } from './blueprintScene';\n\n\nconst MAX_SHAPES = 80;\nconst PAD = 32; // the canvas reaches this far past the block: guide lines and the size label sit outside it\n\nconst dims = (w: number, h: number) => `${Math.round(w)} × ${Math.round(h)}`;\nconst reducedMotion = () => (typeof window !== 'undefined' && window.matchMedia?.('(prefers-reduced-motion: reduce)').matches && document.documentElement.getAttribute('data-alea-reduced') !== 'never') || (typeof document !== 'undefined' && (['off', 'reduced'].includes(document.documentElement.getAttribute('data-alea-motion') || '') || document.documentElement.getAttribute('data-alea-reduced') === 'always'));\nconst px = (v: string) => parseFloat(v) || 0;\n\n/** Walks the real content and lists what to draw: text lines, round media, boxes with a background or a border, controls, small icons. Runs once per size change. */\nfunction measure(root: HTMLElement, content: HTMLElement): Shape[] {\n const base = root.getBoundingClientRect();\n const out: Shape[] = [];\n const rel = (r: DOMRect) => ({ x: r.left - base.left, y: r.top - base.top, w: r.width, h: r.height });\n const visit = (el: Element, depth: number) => {\n if (out.length >= MAX_SHAPES * 2) return;\n const cs = getComputedStyle(el);\n if (cs.display === 'none') return;\n const r = el.getBoundingClientRect();\n const tag = el.tagName.toLowerCase();\n const media = tag === 'img' || tag === 'video' || tag === 'canvas' || tag === 'picture' || el.getAttribute('role') === 'img';\n const control = tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea' || el.getAttribute('role') === 'button';\n if (r.width >= 2 && r.height >= 2) {\n const b = rel(r);\n const radius = px(cs.borderTopLeftRadius);\n const round = radius >= Math.min(b.w, b.h) / 2 - 1 && Math.abs(b.w - b.h) < 2;\n if (tag === 'svg') { out.push({ k: 'mark', ...b, label: `SVG ${Math.round(b.w)} × ${Math.round(b.h)}` }); return; }\n if (media || (control && depth > 0) || round) {\n out.push(round ? { k: 'ring', ...b, label: dims(b.w, b.h) } : { k: 'box', ...b, r: Math.min(radius, b.h / 2), label: dims(b.w, b.h) });\n if (media || round) return;\n } else if (depth > 0) {\n const painted = (cs.backgroundColor !== 'rgba(0, 0, 0, 0)' && cs.backgroundColor !== 'transparent') || px(cs.borderTopWidth) > 0 || cs.backgroundImage !== 'none';\n if (painted) out.push({ k: 'box', ...b, r: Math.min(radius, b.h / 2) });\n }\n }\n for (const n of Array.from(el.childNodes)) {\n if (n.nodeType === 1) visit(n as Element, depth + 1);\n else if (n.nodeType === 3 && n.textContent && n.textContent.trim()) {\n const range = document.createRange();\n range.selectNodeContents(n);\n const seen = new Set<number>();\n for (const q of Array.from(range.getClientRects())) {\n if (q.width < 4 || q.height < 4) continue;\n const key = Math.round(q.top / 2);\n if (seen.has(key)) continue;\n seen.add(key);\n const b = rel(q);\n out.push({ k: 'line', x: b.x, y: b.y + b.h / 2, w: b.w });\n }\n }\n }\n };\n for (const c of Array.from(content.children)) visit(c, 0);\n // too many: keep the big shapes and every line, drop the smallest boxes\n if (out.length > MAX_SHAPES) {\n const keep = out.filter(s => s.k === 'line').slice(0, MAX_SHAPES / 2);\n const rest = out.filter(s => s.k !== 'line').sort((a, b) => ('w' in b ? b.w * (('h' in b && b.h) || 1) : 0) - ('w' in a ? a.w * (('h' in a && a.h) || 1) : 0)).slice(0, MAX_SHAPES - keep.length);\n return [...rest, ...keep];\n }\n return out;\n}\n\n/** With no children there is nothing to measure: draw a generic layout from the block's own size, rows and shape. */\nfunction generic(w: number, h: number, shape: 'text' | 'rect' | 'circle', rows?: number): Shape[] {\n if (shape === 'circle') return [{ k: 'ring', x: 0, y: 0, w, h, label: dims(w, h) }];\n const pad = Math.min(24, Math.max(12, w * 0.06)), n = rows ?? (shape === 'text' ? 1 : Math.max(2, Math.min(6, Math.floor((h - pad * 2) / 28))));\n const out: Shape[] = [];\n const widths = [0.78, 0.5, 0.64, 0.4, 0.7, 0.55];\n const top = shape === 'rect' && !rows ? Math.min(h * 0.4, 96) : 0;\n if (top) out.push({ k: 'box', x: pad, y: pad, w: w - pad * 2, h: top, r: 12, label: dims(w - pad * 2, top) });\n const start = top ? pad * 2 + top : shape === 'text' ? h / 2 : pad + 8;\n for (let i = 0; i < n; i++) out.push({ k: 'line', x: pad, y: start + i * 24, w: (w - pad * 2) * widths[i % widths.length] });\n return out;\n}\n\nexport interface SkeletonBlueprintProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {\n shape: 'text' | 'rect' | 'circle';\n width?: number | string;\n height?: number | string;\n rows?: number;\n isLoaded?: boolean;\n children?: ReactNode;\n}\n\n/** The blueprint skeleton: the real content is laid out but hidden; its shapes are measured and drawn, dot by dot, as dotted outlines over a faint grid that sparks;\n * it stays alive while it loads, and when isLoaded turns true the content is revealed by a soft edge that sweeps down the block. */\nexport function SkeletonBlueprint({ shape, width, height, rows, isLoaded, children, className, style, 'aria-label': label, ...rest }: SkeletonBlueprintProps) {\n const t = useStrings();\n const hasContent = children != null && children !== false;\n const root = useRef<HTMLSpanElement>(null), content = useRef<HTMLSpanElement>(null), sheet = useRef<HTMLSpanElement>(null), canvas = useRef<HTMLCanvasElement>(null);\n const [size, setSize] = useState<{ w: number; h: number } | null>(null);\n const live = useRef({ scene: null as Scene | null, style: null as Style | null, loaded: !!isLoaded, loadedAt: 0, acc: 0, kick: () => {} });\n live.current.loaded = !!isLoaded;\n // loading again after a reveal draws the blueprint again from the start\n const was = useRef(isLoaded);\n if (was.current && !isLoaded) { was.current = false; live.current.acc = 0; } else if (isLoaded) { if (!was.current) live.current.loadedAt = 0; was.current = true; }\n\n // measure the content (once, and when the block changes size) and build the scene\n useLayoutEffect(() => {\n const el = root.current, sh = sheet.current;\n if (!el || !sh) return;\n const run = () => {\n const r = el.getBoundingClientRect();\n if (r.width < 1 || r.height < 1) return;\n const cs = getComputedStyle(sh);\n const style: Style = { color: cs.color, font: cs.font || `${cs.fontSize} ${cs.fontFamily}`, gap: parseFloat(cs.paddingLeft) || 4, pitch: parseFloat(cs.paddingTop) || 24, stroke: parseFloat(cs.borderTopWidth) || 1.5 };\n const shapes = hasContent && content.current ? measure(el, content.current) : generic(r.width, r.height, shape, rows);\n shapes.sort((a, b) => a.y - b.y);\n live.current.style = style;\n live.current.scene = buildScene(shapes, r.width, r.height, style);\n setSize(s => (s && s.w === r.width && s.h === r.height ? s : { w: r.width, h: r.height }));\n live.current.kick();\n };\n run();\n let last = el.getBoundingClientRect().width + 'x' + el.getBoundingClientRect().height;\n const ro = new ResizeObserver(() => { const r = el.getBoundingClientRect(), k = r.width + 'x' + r.height; if (k !== last) { last = k; run(); } });\n ro.observe(el);\n document.fonts?.ready.then(run).catch(() => {});\n return () => ro.disconnect();\n }, [hasContent, shape, rows]);\n\n // paint: one canvas, one rAF loop while loading (and while the reveal edge sweeps), paused when off screen; a still frame for reduced motion\n useEffect(() => {\n const cv = canvas.current, sh = sheet.current;\n if (!cv || !sh || !size) return;\n let ctx: CanvasRenderingContext2D | null = null;\n try { ctx = cv.getContext('2d'); } catch { ctx = null; }\n if (!ctx) return;\n const dpr = Math.min(2, window.devicePixelRatio || 1);\n cv.width = Math.round((size.w + PAD * 2) * dpr); cv.height = Math.round((size.h + PAD * 2) * dpr);\n ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n const L = live.current;\n let raf = 0, last = 0, visible = true, frames = 0, still = reducedMotion();\n const frame = (now: number) => {\n raf = 0;\n const sc = L.scene, st = L.style;\n if (!sc || !st || !ctx) return;\n const dt = last ? Math.min(0.1, (now - last) / 1000) : 0; last = now;\n if (++frames % 30 === 0) { const cs = getComputedStyle(sh); st.color = cs.color; }\n const speed = parseFloat(getComputedStyle(root.current!).getPropertyValue('--alea-bp-speed')) || 1;\n L.acc += dt * speed;\n ctx.clearRect(0, 0, size.w + PAD * 2, size.h + PAD * 2);\n paint(sc, { ctx, pad: PAD, st, t: L.acc, elapsed: L.acc, still, seed: 0 });\n if (L.loaded && !L.loadedAt) L.loadedAt = now;\n const sweeping = L.loaded && now - L.loadedAt < 1800;\n if (!still && visible && (!L.loaded || sweeping)) raf = requestAnimationFrame(frame);\n };\n L.kick = () => { still = reducedMotion(); if (!raf) { last = 0; raf = requestAnimationFrame(frame); } };\n const io = typeof IntersectionObserver !== 'undefined' ? new IntersectionObserver(es => { visible = es[0]?.isIntersecting ?? true; if (visible) L.kick(); }, { rootMargin: '80px' }) : null;\n io?.observe(root.current!);\n L.kick();\n return () => { cancelAnimationFrame(raf); io?.disconnect(); L.kick = () => {}; };\n }, [size, isLoaded]);\n\n const edgeEnd = size ? `${Math.round(size.h + 56)}px` : undefined;\n const rootStyle: CSSProperties = { width, ...(hasContent ? { minHeight: height } : { height: height ?? (shape === 'circle' ? width : undefined) }), ['--alea-bp-end' as string]: edgeEnd, ...style };\n return (\n <span {...rest} ref={root} className={cx('alea-skeleton-blueprint', className)} data-shape={shape} data-state={isLoaded ? 'loaded' : 'loading'} data-content={hasContent || undefined} aria-busy={!isLoaded} style={rootStyle}>\n <span ref={sheet} className=\"alea-blueprint-sheet\" aria-hidden=\"true\"><canvas ref={canvas} className=\"alea-blueprint-canvas\" style={size ? { width: size.w + PAD * 2, height: size.h + PAD * 2 } : undefined} /></span>\n {hasContent && <span ref={content} className=\"alea-skeleton-blueprint-content\" inert={!isLoaded}>{children}</span>}\n <span role=\"status\" className=\"alea-visually-hidden\">{isLoaded ? '' : label ?? t.loading}</span>\n </span>\n );\n}\n"},{"path":"utils/DotField.tsx","content":"import { useLayoutEffect, useRef, useState, type CSSProperties } from 'react';\n\nconst MAX_DOTS = 600;\n// only about a third of the dots twinkle at a time (the rest rest faintly): it reads as sparkle and keeps the animated count low\nconst TWINKLING = 0.34;\n\n// a small seeded generator: the same dots every time, so the field never reshuffles on re-render\nfunction rand(seed: number) {\n let t = seed + 0x6d2b79f5;\n t = Math.imul(t ^ (t >>> 15), t | 1);\n t ^= t + Math.imul(t ^ (t >>> 7), t | 61);\n return ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n}\n\n/** The field of twinkling dots behind a loading state (Skeleton matrix, Image generating): a grid that fills its box edge to edge, each dot with its own speed and phase.\n * It measures the box once per size change to know how many dots fit (at most 600: the pitch grows when the box is huge). Decorative: hidden from screen readers. Styled by feedback.css. */\nexport function DotField({ rows, cols }: { rows?: number; cols?: number }) {\n const ref = useRef<HTMLSpanElement>(null);\n const [grid, setGrid] = useState<{ c: number; r: number } | null>(null);\n useLayoutEffect(() => {\n const el = ref.current;\n if (!el) return;\n const measure = () => {\n const pitch = parseFloat(getComputedStyle(el).rowGap) || 16;\n let c = cols ?? Math.max(1, Math.floor(el.clientWidth / pitch)), r = rows ?? Math.max(1, Math.floor(el.clientHeight / pitch));\n if (cols == null && rows == null && c * r > MAX_DOTS) { const k = Math.sqrt(MAX_DOTS / (c * r)); c = Math.max(1, Math.floor(c * k)); r = Math.max(1, Math.floor(r * k)); }\n setGrid(g => (g && g.c === c && g.r === r ? g : { c, r }));\n };\n measure();\n if (cols != null && rows != null) return;\n const ro = new ResizeObserver(measure);\n ro.observe(el);\n return () => ro.disconnect();\n }, [rows, cols]);\n const style = grid ? ({ gridTemplateColumns: `repeat(${grid.c}, 1fr)`, gridTemplateRows: `repeat(${grid.r}, 1fr)` } as CSSProperties) : undefined;\n return (\n <span ref={ref} className=\"alea-skeleton-matrix-field\" aria-hidden=\"true\" style={style}>\n {grid && Array.from({ length: grid.c * grid.r }, (_, i) => <i key={i} data-t={rand(i * 3 + 3) < TWINKLING || undefined} style={{ ['--k' as string]: (0.85 + rand(i * 3 + 1) * 0.3).toFixed(3), ['--d' as string]: `${-Math.round(rand(i * 3 + 2) * 6000)}ms` }} />)}\n </span>\n );\n}\n"},{"path":"utils/attr.ts","content":"import { useCallback, useEffect, useRef } from 'react';\n\n/** Sets an attribute React Aria does not pass through (aria-busy, aria-keyshortcuts) on the element a ref points at, or on the control `pick` finds inside it. It is a callback ref because collections (Menu, Tree) mount their items in two passes, so the element can arrive after the first effect. A value of undefined removes the attribute. */\nexport function useAttrRef<T extends HTMLElement>(name: string, value: string | undefined, pick?: (root: T) => HTMLElement | null) {\n const root = useRef<T | null>(null);\n const current = useRef(value); current.current = value;\n const pickRef = useRef(pick); pickRef.current = pick;\n const apply = useCallback(() => {\n const r = root.current;\n const el = r && (pickRef.current ? pickRef.current(r) : r);\n if (!el) return;\n if (current.current !== undefined) el.setAttribute(name, current.current); else el.removeAttribute(name);\n }, [name]);\n useEffect(apply, [value, apply]);\n return useCallback((node: T | null) => { root.current = node; apply(); }, [apply]);\n}\n"},{"path":"utils/blueprintScene.ts","content":"// The blueprint's scene and its painter. The scene turns measured shapes into dotted paths (points spaced along each outline), gives every path a seeded start and\n// duration, and the painter draws one frame of it on a canvas: dots appear along each path from one end behind a bright pen dot, outlines are drawn along their\n// perimeter, handles and brackets pop in when the pen reaches them, grid dots spark in clusters, size labels count up. After the first pass it keeps a second, quieter one.\n\nexport type Shape =\n | { k: 'box'; x: number; y: number; w: number; h: number; r: number; label?: string }\n | { k: 'ring'; x: number; y: number; w: number; h: number; label?: string }\n | { k: 'line'; x: number; y: number; w: number }\n | { k: 'mark'; x: number; y: number; w: number; h: number; label?: string };\n\nexport interface Style { color: string; font: string; gap: number; pitch: number; stroke: number }\n\ninterface Item {\n pts: Float32Array; n: number;\n start: number; dur: number;\n handles: Array<[number, number, number]>; // x, y, the fraction of the path at which it pops in\n label?: { text: string; w: number; h: number; x: number; y: number };\n pen: { period: number; off: number } | null;\n popAt?: number; // marks: they snap in whole\n}\nexport interface Scene { items: Item[]; w: number; h: number; sparks: Array<{ x: number; y: number; period: number; off: number; r: number }>; end: number; frame: Item }\n\nfunction rng(seed: number) {\n let t = seed >>> 0;\n return () => { t = (t + 0x6d2b79f5) >>> 0; let x = Math.imul(t ^ (t >>> 15), t | 1); x ^= x + Math.imul(x ^ (x >>> 7), x | 61); return ((x ^ (x >>> 14)) >>> 0) / 4294967296; };\n}\n\nconst dist = (a: number[], b: number[]) => Math.hypot(a[0] - b[0], a[1] - b[1]);\n\n/** Points every `gap` px along a polyline. */\nfunction along(poly: number[][], gap: number): number[] {\n const out: number[] = [];\n let carry = 0;\n out.push(poly[0][0], poly[0][1]);\n for (let i = 1; i < poly.length; i++) {\n const a = poly[i - 1], b = poly[i], len = dist(a, b);\n let d = gap - carry;\n while (d <= len) { const u = d / len; out.push(a[0] + (b[0] - a[0]) * u, a[1] + (b[1] - a[1]) * u); d += gap; }\n carry = len - (d - gap);\n }\n return out;\n}\n\n/** A rounded rectangle, clockwise from the top left corner (after its radius). */\nfunction boxPoly(x: number, y: number, w: number, h: number, r: number): number[][] {\n r = Math.max(0, Math.min(r, w / 2, h / 2));\n const poly: number[][] = [];\n const arc = (cx: number, cy: number, a0: number) => { for (let i = 0; i <= 6; i++) { const a = a0 + (i / 6) * (Math.PI / 2); poly.push([cx + Math.cos(a) * r, cy + Math.sin(a) * r]); } };\n poly.push([x + r, y]);\n poly.push([x + w - r, y]); if (r) arc(x + w - r, y + r, -Math.PI / 2);\n poly.push([x + w, y + h - r]); if (r) arc(x + w - r, y + h - r, 0);\n poly.push([x + r, y + h]); if (r) arc(x + r, y + h - r, Math.PI / 2);\n poly.push([x, y + r]); if (r) arc(x + r, y + r, Math.PI);\n poly.push([x + r, y]);\n return poly;\n}\n\nfunction ringPoly(x: number, y: number, w: number, h: number): number[][] {\n const cx = x + w / 2, cy = y + h / 2, rx = w / 2, ry = h / 2, n = Math.max(24, Math.ceil(Math.PI * (rx + ry)));\n const poly: number[][] = [];\n for (let i = 0; i <= n; i++) { const a = -Math.PI / 2 + (i / n) * Math.PI * 2; poly.push([cx + Math.cos(a) * rx, cy + Math.sin(a) * ry]); }\n return poly;\n}\n\nconst dims = (w: number, h: number) => `${Math.round(w)} × ${Math.round(h)}`;\n\nexport function buildScene(shapes: Shape[], w: number, h: number, st: Style): Scene {\n const rand = rng(Math.round(w * 7 + h * 13 + shapes.length));\n const items: Item[] = [];\n const mk = (poly: number[][], at: number, speed: number, extra?: Partial<Item>): Item => {\n const pts = new Float32Array(along(poly, st.gap));\n let len = 0; for (let i = 1; i < poly.length; i++) len += dist(poly[i - 1], poly[i]);\n // seeded stagger: shapes lower on the sheet start later, with a random spread, so many are mid-draw at once\n const start = 0.12 + at * 1.15 + rand() * 0.5;\n const dur = Math.min(1.6, Math.max(0.4, len / speed)) * (0.85 + rand() * 0.4);\n return { pts, n: pts.length / 2, start, dur, handles: [], pen: rand() < 0.4 ? { period: 3 + rand() * 3.5, off: rand() * 6 } : null, ...extra };\n };\n const frame = mk(boxPoly(0, 0, w, h, Math.min(16, w / 2, h / 2)), 0, 420, { label: { text: '', w, h, x: 0, y: -10 }, pen: { period: 5, off: 0 } });\n frame.start = 0; frame.dur = 1.5;\n frame.handles = [[0, 0, 0], [w, 0, 0.25], [w, h, 0.5], [0, h, 0.75]];\n for (const s of shapes) {\n const at = Math.min(1, s.y / Math.max(1, h));\n if (s.k === 'line') items.push(mk([[s.x, s.y], [s.x + s.w, s.y]], at, 160));\n else if (s.k === 'box') {\n const it = mk(boxPoly(s.x, s.y, s.w, s.h, s.r), at, 320, { label: s.label ? { text: '', w: s.w, h: s.h, x: s.x, y: s.y - 5 } : undefined });\n if (s.w > 48 && s.h > 24) it.handles = [[s.x, s.y, 0], [s.x + s.w, s.y, 0.25], [s.x + s.w, s.y + s.h, 0.5], [s.x, s.y + s.h, 0.75]];\n items.push(it);\n } else if (s.k === 'ring') {\n const it = mk(ringPoly(s.x, s.y, s.w, s.h), at, 220, { label: s.label ? { text: '', w: s.w, h: s.h, x: s.x, y: s.y - 5 } : undefined });\n it.handles = [[s.x, s.y, 0.875], [s.x + s.w, s.y, 0.125], [s.x + s.w, s.y + s.h, 0.375], [s.x, s.y + s.h, 0.625]];\n items.push(it);\n } else {\n const c = 5, poly: number[][] = [];\n // the four corners as small L shapes, one path\n for (const [cx, cy, dx, dy] of [[s.x, s.y, 1, 1], [s.x + s.w, s.y, -1, 1], [s.x + s.w, s.y + s.h, -1, -1], [s.x, s.y + s.h, 1, -1]] as const) { poly.push([cx + dx * c, cy], [cx, cy], [cx, cy + dy * c]); }\n const it = mk(poly, at, 200, { popAt: 0, label: s.label ? { text: s.label, w: s.w, h: s.h, x: s.x, y: s.y - 4 } : undefined });\n items.push(it);\n }\n }\n // the grid: a few dozen sparks, each a small cluster of grid dots that brightens and dims on its own beat\n const cols = Math.max(1, Math.floor(w / st.pitch)), rows = Math.max(1, Math.floor(h / st.pitch));\n const count = Math.min(40, Math.max(6, Math.round(cols * rows * 0.1)));\n const sparks: Scene['sparks'] = [];\n for (let i = 0; i < count; i++) sparks.push({ x: Math.floor(rand() * cols), y: Math.floor(rand() * rows), period: 1.3 + rand() * 1.6, off: rand() * 3, r: rand() < 0.4 ? 1 : 0 });\n const end = Math.max(frame.start + frame.dur, ...items.map(i => i.start + i.dur));\n return { items, w, h, sparks, end, frame };\n}\n\nconst ease = (u: number) => (u < 0.5 ? 4 * u * u * u : 1 - Math.pow(-2 * u + 2, 3) / 2);\nconst clamp = (v: number) => Math.max(0, Math.min(1, v));\n\nexport interface Paint { ctx: CanvasRenderingContext2D; pad: number; st: Style; t: number; elapsed: number; still: boolean; seed: number }\n\n/** One frame. `t` is the scene time in seconds (already scaled by the speed). `still` paints the finished blueprint with nothing moving. */\nexport function paint(sc: Scene, p: Paint) {\n const { ctx, pad, st, still } = p;\n const t = still ? sc.end + 100 : p.t;\n ctx.save();\n ctx.translate(pad, pad);\n ctx.fillStyle = st.color; ctx.strokeStyle = st.color;\n const r0 = st.stroke * 0.72;\n // 1. the grid, with its sparks\n const cols = Math.max(1, Math.floor(sc.w / st.pitch)), rows = Math.max(1, Math.floor(sc.h / st.pitch));\n const ox = (sc.w - (cols - 1) * st.pitch) / 2, oy = (sc.h - (rows - 1) * st.pitch) / 2;\n ctx.globalAlpha = 0.28;\n ctx.beginPath();\n for (let j = 0; j < rows; j++) for (let i = 0; i < cols; i++) { const x = ox + i * st.pitch, y = oy + j * st.pitch; ctx.moveTo(x + 1, y); ctx.arc(x, y, 1, 0, 6.2832); }\n ctx.fill();\n if (!still) {\n ctx.globalAlpha = 0.9; ctx.beginPath();\n for (const s of sc.sparks) {\n const u = ((t + s.off) % s.period) / s.period, a = u < 0.35 ? Math.sin((u / 0.35) * Math.PI) : 0; // lit for a third of its beat\n if (a < 0.15) continue;\n for (let dj = -s.r; dj <= s.r; dj++) for (let di = -s.r; di <= s.r; di++) {\n if (s.r && Math.abs(di) + Math.abs(dj) > 1 && ((di * 7 + dj * 3 + s.x) & 1)) continue;\n const gx = s.x + di, gy = s.y + dj; if (gx < 0 || gy < 0 || gx >= cols || gy >= rows) continue;\n const x = ox + gx * st.pitch, y = oy + gy * st.pitch, rr = 1 + 1.2 * a; ctx.moveTo(x + rr, y); ctx.arc(x, y, rr, 0, 6.2832);\n }\n }\n ctx.fill();\n }\n // guide lines through the frame's corners, dotted, faint\n ctx.globalAlpha = 0.3; ctx.beginPath();\n for (const [x0, y0, x1, y1] of [[-24, 0, sc.w + 24, 0], [-24, sc.h, sc.w + 24, sc.h], [0, -24, 0, sc.h + 24], [sc.w, -24, sc.w, sc.h + 24]]) {\n const len = Math.hypot(x1 - x0, y1 - y0), n = Math.floor(len / (st.gap * 2));\n for (let i = 0; i <= n; i++) { const u = i / n, x = x0 + (x1 - x0) * u, y = y0 + (y1 - y0) * u; ctx.moveTo(x + r0, y); ctx.arc(x, y, r0, 0, 6.2832); }\n }\n ctx.fill();\n // 2. the shapes\n ctx.font = st.font; ctx.textBaseline = 'alphabetic';\n const all = [sc.frame, ...sc.items];\n const base: number[] = [], thick: number[] = [], heads: number[] = [], pens: number[] = [];\n for (const it of all) {\n const local = (t - it.start) / it.dur;\n if (local <= 0 && !still) continue;\n const prog = still ? 1 : ease(clamp(local));\n const k = it.popAt != null ? (local >= 0 ? it.n : 0) : Math.floor(prog * it.n);\n const pts = it.pts;\n for (let i = 0; i < k; i++) {\n const x = pts[i * 2], y = pts[i * 2 + 1];\n const lead = it.popAt == null && prog < 1 ? k - 1 - i : 99; // distance behind the pen\n if (lead === 0) heads.push(x, y, 1); else if (lead < 3) heads.push(x, y, 0.6 - lead * 0.12);\n else if (i % 7 === 3) thick.push(x, y); else base.push(x, y);\n }\n // the second pass: a pen dot travelling again along a finished path\n if (!still && it.pen && prog >= 1) {\n const u = (((t + it.pen.off) % it.pen.period) / 1.4);\n if (u >= 0 && u < 1) { const hi = Math.floor(ease(u) * (it.n - 1)); for (let d = 0; d < 4 && hi - d >= 0; d++) pens.push(pts[(hi - d) * 2], pts[(hi - d) * 2 + 1], d); }\n }\n // handles pop in when the pen reaches their corner (scale .6 to 1)\n ctx.globalAlpha = 0.7;\n for (const [hx, hy, at] of it.handles) {\n const q = still ? 1 : clamp((prog - at) / 0.06 + (at === 0 && local > 0 ? 0.4 : 0));\n if (q <= 0) continue;\n const sz = 6 * (0.6 + 0.4 * ease(q)); ctx.globalAlpha = 0.7 * q; ctx.lineWidth = st.stroke; ctx.strokeRect(hx - sz / 2, hy - sz / 2, sz, sz);\n }\n // the label counts up while the shape is drawn\n if (it.label && local > 0) {\n const lb = it.label, q = still ? 1 : ease(clamp(local * 1.1)), flick = !still && q < 1 && ((Math.floor(t * 14) + it.n) % 5 === 0);\n const text = lb.text ? lb.text : dims(lb.w * q, lb.h * q) + (it === sc.frame ? ` t+${p.elapsed.toFixed(2)}s` : '');\n ctx.globalAlpha = flick ? 0.35 : 0.7; ctx.fillText(text, lb.x, lb.y);\n }\n }\n const dot = (arr: number[], r: number, a: number, step = 2) => { if (!arr.length) return; ctx.globalAlpha = a; ctx.beginPath(); for (let i = 0; i < arr.length; i += step) { ctx.moveTo(arr[i] + r, arr[i + 1]); ctx.arc(arr[i], arr[i + 1], r, 0, 6.2832); } ctx.fill(); };\n dot(base, r0, 0.85); dot(thick, r0 * 1.6, 0.9);\n // heads: brightest and largest at the pen, a short fading trail behind it\n if (heads.length) for (let i = 0; i < heads.length; i += 3) { ctx.globalAlpha = Math.min(1, 0.45 + heads[i + 2] * 0.55); ctx.beginPath(); const r = r0 * (1.4 + heads[i + 2] * 1.4); ctx.moveTo(heads[i] + r, heads[i + 1]); ctx.arc(heads[i], heads[i + 1], r, 0, 6.2832); ctx.fill(); }\n if (pens.length) for (let i = 0; i < pens.length; i += 3) { ctx.globalAlpha = 1 - pens[i + 2] * 0.24; ctx.beginPath(); const r = r0 * (2.4 - pens[i + 2] * 0.35); ctx.moveTo(pens[i] + r, pens[i + 1]); ctx.arc(pens[i], pens[i + 1], r, 0, 6.2832); ctx.fill(); }\n ctx.restore();\n}\n"},{"path":"utils/controlled.ts","content":"import { useCallback, useRef, useState } from 'react';\n\n/** A value that can be controlled (value + onChange) or kept inside (defaultValue). */\nexport function useControlled<T>(value: T | undefined, defaultValue: T, onChange?: (v: T) => void): [T, (v: T) => void] {\n const [own, setOwn] = useState<T>(defaultValue);\n const controlled = useRef(value !== undefined).current;\n const current = controlled ? (value as T) : own;\n const set = useCallback((v: T) => { if (!controlled) setOwn(v); onChange?.(v); }, [controlled, onChange]);\n return [current, set];\n}\n"},{"path":"utils/cx.ts","content":"// Joins class names, skipping falsy ones.\nexport function cx(...parts: Array<string | false | null | undefined>): string {\n return parts.filter(Boolean).join(' ');\n}\n\n// React Aria's className can be a string or a function of the render state;\n// this adds our base class either way.\nexport function withBase<T>(base: string, className?: string | ((state: T) => string)) {\n if (typeof className === 'function') return (state: T) => cx(base, className(state));\n return cx(base, className);\n}\n"},{"path":"utils/responsive.ts","content":"/** Breakpoints (min-width): sm 640, md 768, lg 1024, xl 1280, as --alea-breakpoint-*. */\nexport type Breakpoint = 'base' | 'sm' | 'md' | 'lg' | 'xl';\n/** A value, or one per breakpoint: { base: 1, md: 2, lg: 4 }. Unset breakpoints use the one below. */\nexport type Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\nconst BPS: Breakpoint[] = ['sm', 'md', 'lg', 'xl'];\n\n/** Data attributes for a responsive prop: data-{name} for the base value and data-{name}-{bp} for each breakpoint that changes it.\n * The component CSS repeats its rules inside min-width media queries for those attributes. */\nexport function responsiveAttrs<T extends string | boolean>(name: string, value: Responsive<T> | undefined, fallback?: T): Record<string, string | undefined> {\n const str = (v: T | undefined): string | undefined => (v === undefined ? undefined : typeof v === \"boolean\" ? (v ? \"true\" : undefined) : String(v));\n if (value === undefined || typeof value !== 'object') return { [`data-${name}`]: str((value as T | undefined) ?? fallback) };\n const map = value as Partial<Record<Breakpoint, T>>;\n const out: Record<string, string | undefined> = { [`data-${name}`]: str(map.base ?? fallback) };\n for (const bp of BPS) if (map[bp] !== undefined) out[`data-${name}-${bp}`] = typeof map[bp] === 'boolean' ? String(map[bp]) : (map[bp] as string);\n return out;\n}\n\n/** The base value of a responsive prop. */\nexport const baseOf = <T,>(value: Responsive<T> | undefined, fallback: T): T =>\n value === undefined ? fallback : typeof value === 'object' && value !== null ? ((value as Partial<Record<Breakpoint, T>>).base ?? fallback) : (value as T);\n"},{"path":"utils/scrollEdges.ts","content":"import { useEffect, useState, type RefObject } from 'react';\n\n/** Whether a horizontal scroller (found inside box by selector) has hidden content at its start and end, and a function to page it. */\nexport function useScrollEdges(box: RefObject<HTMLElement | null>, selector: string, enabled = true) {\n const [edges, setEdges] = useState({ start: false, end: false });\n useEffect(() => {\n const list = enabled ? box.current?.querySelector<HTMLElement>(selector) : null;\n if (!list) { setEdges({ start: false, end: false }); return; }\n const read = () => setEdges({ start: list.scrollLeft > 2, end: list.scrollLeft + list.clientWidth < list.scrollWidth - 2 });\n read();\n list.addEventListener('scroll', read, { passive: true });\n const ro = typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(read);\n ro?.observe(list);\n // items can arrive after mount (collections render in a second pass) and never resize the list itself\n const mo = typeof MutationObserver === 'undefined' ? null : new MutationObserver(read);\n mo?.observe(list, { childList: true });\n return () => { list.removeEventListener('scroll', read); ro?.disconnect(); mo?.disconnect(); };\n }, [box, selector, enabled]);\n const scroll = (dir: 1 | -1) => { const list = box.current?.querySelector<HTMLElement>(selector); list?.scrollBy({ left: dir * list.clientWidth * 0.8, behavior: 'smooth' }); };\n return { edges, scroll };\n}\n"},{"path":"utils/space.ts","content":"// Props that take a length in px (Form gap, Masonry gap) land on the space scale, so Comfy / Compact density reaches them too.\nconst STEPS: Array<[number, string]> = [[0, '0'], [1, '0-25'], [2, '0-5'], [4, '1'], [6, '1-5'], [8, '2'], [10, '2-5'], [12, '3'], [14, '3-5'], [16, '4'], [20, '5'], [24, '6'], [28, '7'], [32, '8'], [40, '10'], [48, '12'], [64, '16'], [80, '20'], [88, '22'], [96, '24']];\n\n/** A px length as the nearest space token (ties round up): 20 -> var(--alea-space-5), 18 -> var(--alea-space-5). */\nexport function spaceFromPx(px: number): string {\n let best = STEPS[0];\n for (const s of STEPS) if (Math.abs(s[0] - px) < Math.abs(best[0] - px) || (Math.abs(s[0] - px) === Math.abs(best[0] - px) && s[0] > best[0])) best = s;\n return `var(--alea-space-${best[1]})`;\n}\n"},{"path":"i18n/strings.ts","content":"import { createContext, useContext } from 'react';\nimport { useLocale } from 'react-aria-components';\n\n/** Every piece of text the kit writes itself (built-in accessibility labels are already translated). Change any of them with ThemeProvider strings. */\nexport interface AleaStrings {\n loading: string; close: string; cancel: string; confirm: string; yes: string; save: string; done: string; next: string; back: string; skip: string; today: string;\n remove: string; removeItem: (name: string) => string; reorderHint: string; movedTo: (name: string, pos: number, total: number) => string; clear: string; search: string; selectPlaceholder: string; options: string; noMatches: string; noResults: string;\n dismiss: string; notifications: string; closeNotification: string; skipToContent: string; menu: string; mainNav: string; navigation: string; openNavigation: string;\n copy: string; copied: string; copyCode: string; theme: string; themeDark: string; themeLight: string; themeSystem: string; switchTheme: (name: string) => string;\n password: string; showPassword: string; hidePassword: string; clearSearch: string; showMore: string; showLess: string; pressAndHold: string; moreOptions: string; moreActions: string;\n previousPage: string; nextPage: string; pageN: (n: number) => string; pagination: string; progress: string; contextMenu: string; onThisPage: string; backToTop: string; resize: string;\n slides: string; previousSlide: string; nextSlide: string; playSlides: string; stopSlides: string; chooseSlide: string; slideN: (n: number) => string; nOfTotal: (n: number, total: number) => string;\n image: string; imagePreview: string; viewLarger: (alt: string) => string; zoomIn: string; zoomOut: string; qrCode: (value: string) => string;\n stepNOfTotal: (n: number, total: number) => string; stepN: (n: number) => string; stepDone: string; stepDoneBack: string;\n openCalendar: string; previousMonth: string; nextMonth: string;\n dropFiles: string; browseFiles: string; files: string; uploading: (name: string) => string; typeNotAccepted: string; largerThan: (size: string) => string;\n fixToContinue: string; verificationCode: string; characterNOfTotal: (n: number, total: number) => string;\n available: string; chosen: string; nothingHere: string; moveTo: (n: number, list: string) => string; searchIn: (list: string) => string; suggestions: string;\n typeToAdd: string; limitReached: string; selected: string; showSuggestions: string; filterOptions: string; recent: string; loadingSuggestions: string; searching: string; nothingFor: (q: string) => string; startTyping: string;\n commandPalette: string; searchCommands: string; commandPlaceholder: string; esc: string;\n andMore: (n: number) => string; people: (n: number) => string; ratingLabel: string; outOf: (value: string, max: number) => string;\n hue: string; hex: string; contrastFail: string; contrastSummary: (ratio: string, verdict: string) => string;\n ended: string; announcement: string; dismissAnnouncement: string;\n starsN: (n: number) => string; imageFailed: (alt: string) => string; selectAll: string; selectAllShown: string; wcagPass: (level: string) => string; wcagFail: string;\n // Alea Pro\n noData: string; stage: string; ofFirst: string; ofPrevious: string; item: string; ofMax: string; step: string; change: string; runningTotal: string; measure: string; target: string; day: string; showChart: string; showTable: string; legend: string; total: string; slice: string; value: string; share: string; group: string; point: string; size: string;\n selectedN: (n: number) => string; toolsFor: (label: string) => string; pagesFor: (label: string) => string; expandRow: (name: string) => string; collapseRow: (name: string) => string; detailsCol: string; filterBy: (label: string) => string; clearFilters: string; summary: string; loadingRows: string;\n editCell: (label: string) => string; nothingToShow: string; searchTable: (label: string) => string; rowDensity: string; compact: string; comfortable: string; columns: string; exportCsv: string; exportSelected: string;\n nothingMatches: (q: string) => string; rowsOf: (n: number, total: number) => string; moveItem: (name: string) => string; dropCardsHere: string;\n eventsN: (n: number) => string; moreN: (n: number) => string;\n firstPage: string; lastPage: string; itemRange: (from: number, to: number, total: number) => string; perPage: string; goToPage: string; stepError: string; stepWarning: string; clearRating: string;\n dragToMove: string; pages: string; filters: string; views: string; activeFilters: string; noValue: string; on: string; off: string; newTab: string; retry: string; uploaded: string; tooManyFiles: (n: number) => string; underline: string; strikethrough: string; paragraph: string; alignLeft: string; alignCenter: string; alignRight: string; undo: string; redo: string; clearFormatting: string; linkUrl: string; apply: string; removeLink: string; editorLabel: string; langCode: string; searchEmoji: string; recentEmoji: string; noEmoji: string; emojiCategories: Record<string, string>; pickEmoji: string; addReaction: string; reactions: string; minimize: string; restore: string; maximize: string; exitMaximize: string; clearSelection: string; selection: string; keyboardShortcuts: string; searchShortcuts: string; noShortcuts: string; apps: string; moreApps: string; thenKey: string; textColor: string; highlight: string; superscript: string; subscript: string; indent: string; outdent: string; justify: string; horizontalRule: string; insertTable: string; rowsLabel: string; columnsLabel: string; insert: string; imageTool: string; imageUrl: string; altText: string; altHint: string; specialCharacters: string; fullscreen: string; exitFullscreen: string; htmlSource: string; blockFormat: string; codeBlock: string; wordCount: (w: number, c: number) => string; removeColor: string; colorNames: Record<string, string>; schedulerViews: Record<string, string>; newEvent: string; allDay: string; previousPeriod: string; nextPeriod: string; nowLabel: string; eventRange: (title: string, from: string, to: string) => string; timeRange: (from: string, to: string) => string; textSize: string; sizeNames: Record<'small' | 'normal' | 'large' | 'huge', string>; changeCase: string; upperCase: string; lowerCase: string; titleCase: string; checklist: string; markedDone: string; markedNotDone: string; textDirection: string; leftToRight: string; rightToLeft: string; findReplace: string; findLabel: string; replaceLabel: string; replace: string; replaceAll: string; previousMatch: string; nextMatch: string; matchCount: (current: number, total: number) => string; replacedCount: (n: number) => string; tableTools: string; rowAbove: string; rowBelow: string; columnBefore: string; columnAfter: string; deleteRow: string; deleteColumn: string; deleteTable: string; moreTools: string; fewerTools: string; uploadImage: string; orImageUrl: string; selectionTools: string; imageTooLarge: (mb: number) => string; aiMessage: string; aiSend: string; aiStop: string; aiAttach: string; aiHint: string; aiSuggestions: string; aiResponseActions: string; aiCopy: string; aiCopied: string; aiRegenerate: string; aiGood: string; aiBad: string; aiThanks: string; aiThinking: string; aiThoughtFor: (seconds: number) => string; aiReasoning: string; aiTool: Record<'running' | 'done' | 'error', string>; aiToolInput: string; aiToolOutput: string; aiSources: string; aiSource: (n: number, title: string) => string; aiOrb: Record<'idle' | 'listening' | 'thinking' | 'speaking', string>; aiGenerating: string; workStatus: Record<'backlog' | 'todo' | 'progress' | 'review' | 'done' | 'canceled', string>; workPriority: Record<'none' | 'urgent' | 'high' | 'medium' | 'low', string>; issues: string; agent: string; workedFor: (s: string) => string; diffStat: (files: number, add: number, del: number) => string; activity: string; properties: string; due: string; assignee: string; unassigned: string; progressOf: (pct: number) => string; inbox: string; unread: string; unreadCount: (n: number) => string; inboxKind: Record<'mention' | 'assigned' | 'comment' | 'status' | 'review' | 'agent', string>; projectHealth: Record<'onTrack' | 'atRisk' | 'offTrack' | 'none', string>; projectUpdate: string; noEvents: string; play: string; pause: string; mute: string; unmute: string; volume: string; seek: string; playbackSpeed: string; captionsOn: string; captionsOff: string; pictureInPicture: string; timeOf: (a: string, b: string) => string; mediaPlayer: string; skipBack: string; skipForward: string; reactionCount: (emoji: string, n: number, mine: boolean) => string; typing: (names: string[]) => string; messageStatus: Record<string, string>; replies: (n: number) => string; thread: string; closeThread: string; openThread: string; showReplies: (n: number) => string; hideReplies: string; lastReply: (when: string) => string; newReplies: (n: number) => string; noReplies: string; threadReplies: string; reactWith: (emoji: string) => string; reactionsGroup: string; replyingIn: (author: string) => string; newMessages: string; yesterday: string; you: string; messages: string; edited2: string; edit: string; addFilter: string; clearAll: string; diffAdded: string; diffRemoved: string; uptime: (label: string, pct: number | undefined, n: number, unit: string, down: number, slow: number) => string; paymentCard: (kind: string | undefined, holder: string, last4: string, frozen: boolean) => string; paymentCardParts: { card: string; ending: string; frozen: string }; paneArea: string; paneLabels: { start: string; main: string; end: string }; period: string; periods: Record<'24h' | '7d' | '30d' | '90d' | '6m' | '12m' | 'ytd' | 'all', string>;\n pickTime: string; hours: string; minutes: string; hourN: (n: number) => string; minuteN: (n: number) => string;\n moreInfo: string; unsavedChanges: string; discard: string; edited: string; comment: string; addComment: string;\n optional: string; passwordStrength: string; strengthLevels: [string, string, string, string]; overLimit: (n: number) => string;\n writeMarkdown: string; charactersLeft: (n: number) => string; rowsN: (n: number) => string; cellOf: (column: string, row: string) => string;\n bold: string; italic: string; heading: string; link: string; quote: string; code: string; bulletedList: string; numberedList: string; editorMode: string; write: string; preview: string; formatting: string; nothingToPreview: string;\n}\n\nexport const en: AleaStrings = {\n loading: 'Loading', close: 'Close', cancel: 'Cancel', confirm: 'Confirm', yes: 'Yes', save: 'Save', done: 'Done', next: 'Next', back: 'Back', skip: 'Skip', today: 'Today',\n remove: 'Remove', removeItem: n => `Remove ${n}`, reorderHint: 'Alt + Shift + arrows to move', movedTo: (n, p, t) => `${n} moved to position ${p} of ${t}`, clear: 'Clear', search: 'Search', selectPlaceholder: 'Select…', options: 'Options', noMatches: 'No matches', noResults: 'No results',\n dismiss: 'Dismiss', notifications: 'Notifications', closeNotification: 'Close notification', skipToContent: 'Skip to content', menu: 'Menu', mainNav: 'Main', navigation: 'Navigation', openNavigation: 'Open navigation',\n copy: 'Copy', copied: 'Copied', copyCode: 'Copy code', theme: 'Theme', themeDark: 'Dark', themeLight: 'Light', themeSystem: 'System', switchTheme: n => `Switch to ${n.toLowerCase()} theme`,\n password: 'Password', showPassword: 'Show password', hidePassword: 'Hide password', clearSearch: 'Clear search', showMore: 'Show more', showLess: 'Show less', pressAndHold: 'Press and hold to confirm', moreOptions: 'More options', moreActions: 'More actions',\n previousPage: 'Previous page', nextPage: 'Next page', pageN: n => `Page ${n}`, pagination: 'Pagination', progress: 'Progress', contextMenu: 'Context menu', onThisPage: 'On this page', backToTop: 'Back to top', resize: 'Resize',\n slides: 'Slides', previousSlide: 'Previous slide', nextSlide: 'Next slide', playSlides: 'Play the slides', stopSlides: 'Stop the slides', chooseSlide: 'Choose a slide', slideN: n => `Slide ${n}`, nOfTotal: (n, t) => `${n} of ${t}`,\n image: 'Image', imagePreview: 'Image preview', viewLarger: a => `View larger: ${a}`, zoomIn: 'Zoom in', zoomOut: 'Zoom out', qrCode: v => `QR code: ${v}`,\n stepNOfTotal: (n, t) => `Step ${n} of ${t}`, stepN: n => `Step ${n}`, stepDone: '(done)', stepDoneBack: '(done, go back)',\n openCalendar: 'Open calendar', previousMonth: 'Previous month', nextMonth: 'Next month',\n dropFiles: 'Drop files here', browseFiles: 'Browse files', files: 'Files', uploading: n => `Uploading ${n}`, typeNotAccepted: 'This type is not accepted', largerThan: s => `Larger than ${s}`,\n fixToContinue: 'Fix these to continue', verificationCode: 'Verification code', characterNOfTotal: (n, t) => `Character ${n} of ${t}`,\n available: 'Available', chosen: 'Chosen', nothingHere: 'Nothing here', moveTo: (n, l) => `Move ${n || ''} to ${l}`.replace(' ', ' '), searchIn: l => `Search ${l}`, suggestions: 'Suggestions',\n typeToAdd: 'Type to add…', limitReached: 'Limit reached', selected: 'Selected', showSuggestions: 'Show suggestions', filterOptions: 'Filter options', recent: 'Recent', loadingSuggestions: 'Loading suggestions', searching: 'Searching…', nothingFor: q => `Nothing for “${q}”`, startTyping: 'Start typing to search',\n commandPalette: 'Command palette', searchCommands: 'Search commands', commandPlaceholder: 'Type a command or search…', esc: 'Esc',\n andMore: n => `and ${n} more`, people: n => `${n} people`, ratingLabel: 'Rating', outOf: (v, m) => `${v} out of ${m}`,\n hue: 'Hue', hex: 'Hex', contrastFail: 'Fail', contrastSummary: (r, v) => `Contrast ${r} to 1, ${v}`,\n ended: 'Ended', announcement: 'Announcement', dismissAnnouncement: 'Dismiss announcement',\n starsN: n => `${n} star${n === 1 ? '' : 's'}`, imageFailed: a => `${a || 'Image'} couldn’t load`, selectAll: 'Select all', selectAllShown: 'Select all shown', wcagPass: l => `passes WCAG ${l}`, wcagFail: 'fails WCAG',\n noData: 'No data yet', stage: 'Stage', ofFirst: 'Of first', ofPrevious: 'Of previous', item: 'Item', ofMax: 'Of max', step: 'Step', change: 'Change', runningTotal: 'Running total', measure: 'Measure', target: 'Target', day: 'Day', showChart: 'Show the chart', showTable: 'Show the data as a table', legend: 'Legend', total: 'Total', slice: 'Slice', value: 'Value', share: 'Share', group: 'Group', point: 'Point', size: 'Size',\n selectedN: n => `${n} selected`, toolsFor: l => `${l} tools`, pagesFor: l => `${l} pages`, expandRow: n => `Show details of ${n}`, collapseRow: n => `Hide details of ${n}`, detailsCol: 'Details', filterBy: l => `Filter ${l}`, clearFilters: 'Clear filters', summary: 'Summary', loadingRows: 'Loading rows',\n editCell: l => `Edit ${l}`, nothingToShow: 'Nothing to show', searchTable: l => `Search ${l}`, rowDensity: 'Row density', compact: 'Compact', comfortable: 'Comfortable', columns: 'Columns', exportCsv: 'Export', exportSelected: 'Export selected',\n nothingMatches: q => `Nothing matches “${q}”`, rowsOf: (n, t) => `${n} of ${t} rows`, moveItem: n => `Move ${n}`, dropCardsHere: 'Drop cards here',\n eventsN: n => `${n} event${n === 1 ? '' : 's'}`, moreN: n => `+${n} more`,\n firstPage: 'First page', lastPage: 'Last page', itemRange: (a, b, n) => `${a}-${b} of ${n}`, perPage: 'Per page', goToPage: 'Go to page', stepError: '(has an error)', stepWarning: '(needs attention)', clearRating: 'Clear rating',\n dragToMove: 'Drag to move', pages: 'Pages', filters: 'Filters', views: 'Views', activeFilters: 'Active filters', noValue: 'no value', on: 'on', off: 'off', newTab: '(opens in a new tab)', retry: 'Retry', uploaded: 'Uploaded', tooManyFiles: n => `Only ${n} file${n === 1 ? '' : 's'} allowed`, underline: 'Underline', strikethrough: 'Strikethrough', paragraph: 'Paragraph', alignLeft: 'Align left', alignCenter: 'Align center', alignRight: 'Align right', undo: 'Undo', redo: 'Redo', clearFormatting: 'Clear formatting', linkUrl: 'Link address', apply: 'Apply', removeLink: 'Remove link', editorLabel: 'Text editor', langCode: 'en', searchEmoji: 'Search emoji', recentEmoji: 'Recent', noEmoji: 'No emoji found', emojiCategories: { recent: 'Recent', smileys: 'Smileys', people: 'People and hands', nature: 'Animals and nature', food: 'Food and drink', activities: 'Activities', travel: 'Travel and places', objects: 'Objects', symbols: 'Symbols' }, pickEmoji: 'Emoji', addReaction: 'Add reaction', reactions: 'Reactions', minimize: 'Minimize', restore: 'Restore', maximize: 'Maximize', exitMaximize: 'Exit full size', clearSelection: 'Clear selection', selection: 'Selection', keyboardShortcuts: 'Keyboard shortcuts', searchShortcuts: 'Search shortcuts', noShortcuts: 'No shortcuts match', apps: 'Apps', moreApps: 'More apps', thenKey: 'then', textColor: 'Text color', highlight: 'Highlight', superscript: 'Superscript', subscript: 'Subscript', indent: 'Indent', outdent: 'Outdent', justify: 'Justify', horizontalRule: 'Divider line', insertTable: 'Table', rowsLabel: 'Rows', columnsLabel: 'Columns', insert: 'Insert', imageTool: 'Image', imageUrl: 'Image address', altText: 'Alternative text', altHint: 'What the image shows, for people who can\\'t see it. Leave empty only for decoration.', specialCharacters: 'Special characters', fullscreen: 'Full screen', exitFullscreen: 'Exit full screen', htmlSource: 'HTML', blockFormat: 'Text style', codeBlock: 'Code block', wordCount: (w, c) => `${w} ${w === 1 ? 'word' : 'words'}, ${c} ${c === 1 ? 'character' : 'characters'}`, removeColor: 'Remove color', schedulerViews: { day: 'Day', week: 'Week', workweek: 'Work week' }, newEvent: 'New event', allDay: 'All day', previousPeriod: 'Previous', nextPeriod: 'Next', nowLabel: 'Now', eventRange: (title, from, to) => `${title}, ${from} to ${to}`, timeRange: (from, to) => `${from} to ${to}`, textSize: 'Text size', sizeNames: { small: 'Small', normal: 'Normal', large: 'Large', huge: 'Huge' }, changeCase: 'Change case', upperCase: 'UPPERCASE', lowerCase: 'lowercase', titleCase: 'Title Case', checklist: 'Checklist', markedDone: 'Marked done', markedNotDone: 'Marked not done', textDirection: 'Text direction', leftToRight: 'Left to right', rightToLeft: 'Right to left', findReplace: 'Find and replace', findLabel: 'Find', replaceLabel: 'Replace with', replace: 'Replace', replaceAll: 'Replace all', previousMatch: 'Previous match', nextMatch: 'Next match', matchCount: (c, n) => (n ? `${c} of ${n}` : 'No matches'), replacedCount: n => `Replaced ${n}`, tableTools: 'Table', rowAbove: 'Row above', rowBelow: 'Row below', columnBefore: 'Column before', columnAfter: 'Column after', deleteRow: 'Delete row', deleteColumn: 'Delete column', deleteTable: 'Delete table', moreTools: 'More tools', fewerTools: 'Fewer tools', uploadImage: 'Upload an image', orImageUrl: 'or paste an address', selectionTools: 'Selection formatting', imageTooLarge: mb => `Images up to ${mb} MB`, aiMessage: 'Message', aiSend: 'Send', aiStop: 'Stop generating', aiAttach: 'Attach files', aiHint: 'Enter to send, Shift+Enter for a new line', aiSuggestions: 'Suggestions', aiResponseActions: 'Response actions', aiCopy: 'Copy', aiCopied: 'Copied', aiRegenerate: 'Regenerate', aiGood: 'Good response', aiBad: 'Bad response', aiThanks: 'Thanks for the feedback', aiThinking: 'Thinking', aiThoughtFor: s => `Thought for ${s} s`, aiReasoning: 'Reasoning', aiTool: { running: 'Running', done: 'Done', error: 'Failed' }, aiToolInput: 'Input', aiToolOutput: 'Output', aiSources: 'Sources', aiSource: (n, title) => `Source ${n}: ${title}`, aiOrb: { idle: 'Assistant ready', listening: 'Assistant listening', thinking: 'Assistant thinking', speaking: 'Assistant speaking' }, aiGenerating: 'Generating a response', workStatus: { backlog: 'Backlog', todo: 'Todo', progress: 'In progress', review: 'In review', done: 'Done', canceled: 'Canceled' }, workPriority: { none: 'No priority', urgent: 'Urgent', high: 'High', medium: 'Medium', low: 'Low' }, issues: 'Issues', agent: 'Agent', workedFor: s => `Worked for ${s}`, diffStat: (f, a, d) => `${f} ${f === 1 ? 'file' : 'files'} changed, ${a} additions, ${d} deletions`, activity: 'Activity', properties: 'Properties', due: 'Due', assignee: 'Assignee', unassigned: 'Unassigned', progressOf: p => `${p}% done`, inbox: 'Inbox', unread: 'Unread', unreadCount: n => `${n} unread`, inboxKind: { mention: 'mentioned you', assigned: 'assigned you', comment: 'commented', status: 'changed the status', review: 'asked for your review', agent: 'finished a task' }, projectHealth: { onTrack: 'On track', atRisk: 'At risk', offTrack: 'Off track', none: 'No update' }, projectUpdate: 'Project update', noEvents: 'No events', play: 'Play', pause: 'Pause', mute: 'Mute', unmute: 'Unmute', volume: 'Volume', seek: 'Seek', playbackSpeed: 'Playback speed', captionsOn: 'Turn captions on', captionsOff: 'Turn captions off', pictureInPicture: 'Picture in picture', timeOf: (a, b) => `${a} of ${b}`, mediaPlayer: 'Media player', skipBack: 'Back 10 seconds', skipForward: 'Forward 10 seconds', colorNames: { text: 'Default', accent: 'Purple', second: 'Yellow', success: 'Green', warning: 'Amber', danger: 'Red', info: 'Blue', muted: 'Gray' }, reactionCount: (e, n, mine) => `${e} ${n} ${n === 1 ? 'reaction' : 'reactions'}${mine ? ', including yours' : ''}`, typing: names => names.length === 1 ? `${names[0]} is typing` : names.length === 2 ? `${names[0]} and ${names[1]} are typing` : `${names.length} people are typing`, messageStatus: { sending: 'Sending', sent: 'Sent', delivered: 'Delivered', read: 'Read', failed: 'Not sent' }, replies: n => `${n} ${n === 1 ? 'reply' : 'replies'}`, thread: 'Thread', closeThread: 'Close thread', openThread: 'Open thread', showReplies: n => `Show ${n} ${n === 1 ? 'reply' : 'replies'}`, hideReplies: 'Hide replies', lastReply: when => `Last reply ${when}`, newReplies: n => `${n} new`, noReplies: 'No replies yet', threadReplies: 'Replies', reactWith: e => `React with ${e}`, reactionsGroup: 'Quick reactions', replyingIn: a => `Thread from ${a}`,\n newMessages: 'New messages', yesterday: 'Yesterday', you: 'You', messages: 'Messages', edited2: 'edited', edit: 'Edit', addFilter: 'Add filter', clearAll: 'Clear all', diffAdded: 'Added: ', diffRemoved: 'Removed: ', uptime: (l, p, n, u, d, sl) => `${l}: ${p != null ? `${p}% uptime` : 'uptime'} over the last ${n} ${u}s${d ? `, ${d} down` : ''}${sl ? `, ${sl} degraded` : ''}`, paymentCard: (k, h, l4, f) => `${k ? `${k} card` : 'Card'} for ${h}, ending ${l4}${f ? ', frozen' : ''}`, paymentCardParts: { card: 'card', ending: 'ending', frozen: 'Frozen' }, paneArea: 'Area', paneLabels: { start: 'Layers', main: 'Canvas', end: 'Inspector' }, period: 'Period', periods: { '24h': 'Last 24 hours', '7d': 'Last 7 days', '30d': 'Last 30 days', '90d': 'Last 90 days', '6m': 'Last 6 months', '12m': 'Last 12 months', ytd: 'Year to date', all: 'All time' },\n pickTime: 'Pick a time', hours: 'Hours', minutes: 'Minutes', hourN: n => `${n} hours`, minuteN: n => `${n} minutes`,\n moreInfo: 'More information', unsavedChanges: 'Unsaved changes', discard: 'Discard', edited: 'edited', comment: 'Comment', addComment: 'Add a comment…',\n optional: 'optional', passwordStrength: 'Password strength', strengthLevels: ['Weak', 'Fair', 'Good', 'Strong'], overLimit: n => `${n} character${n === 1 ? '' : 's'} over the limit`,\n writeMarkdown: 'Write in Markdown…', charactersLeft: n => `${n} character${n === 1 ? '' : 's'} left`, rowsN: n => `${n} row${n === 1 ? '' : 's'}`, cellOf: (c, r) => `${c} of ${r}`,\n bold: 'Bold', italic: 'Italic', heading: 'Heading', link: 'Link', quote: 'Quote', code: 'Code', bulletedList: 'Bulleted list', numberedList: 'Numbered list', editorMode: 'Editor mode', write: 'Write', preview: 'Preview', formatting: 'Formatting', nothingToPreview: 'Nothing to preview yet.',\n};\n\nexport const es: AleaStrings = {\n loading: 'Cargando', close: 'Cerrar', cancel: 'Cancelar', confirm: 'Confirmar', yes: 'Sí', save: 'Guardar', done: 'Listo', next: 'Siguiente', back: 'Atrás', skip: 'Omitir', today: 'Hoy',\n remove: 'Quitar', removeItem: n => `Quitar ${n}`, reorderHint: 'Alt + Mayús + flechas para mover', movedTo: (n, p, t) => `${n} movida a la posición ${p} de ${t}`, clear: 'Borrar', search: 'Buscar', selectPlaceholder: 'Elegir…', options: 'Opciones', noMatches: 'Sin coincidencias', noResults: 'Sin resultados',\n dismiss: 'Descartar', notifications: 'Notificaciones', closeNotification: 'Cerrar notificación', skipToContent: 'Saltar al contenido', menu: 'Menú', mainNav: 'Principal', navigation: 'Navegación', openNavigation: 'Abrir la navegación',\n copy: 'Copiar', copied: 'Copiado', copyCode: 'Copiar el código', theme: 'Tema', themeDark: 'Oscuro', themeLight: 'Claro', themeSystem: 'Sistema', switchTheme: n => `Cambiar al tema ${n.toLowerCase()}`,\n password: 'Contraseña', showPassword: 'Mostrar la contraseña', hidePassword: 'Ocultar la contraseña', clearSearch: 'Borrar la búsqueda', showMore: 'Ver más', showLess: 'Ver menos', pressAndHold: 'Mantén presionado para confirmar', moreOptions: 'Más opciones', moreActions: 'Más acciones',\n previousPage: 'Página anterior', nextPage: 'Página siguiente', pageN: n => `Página ${n}`, pagination: 'Paginación', progress: 'Progreso', contextMenu: 'Menú contextual', onThisPage: 'En esta página', backToTop: 'Volver arriba', resize: 'Cambiar el tamaño',\n slides: 'Diapositivas', previousSlide: 'Diapositiva anterior', nextSlide: 'Diapositiva siguiente', playSlides: 'Reproducir las diapositivas', stopSlides: 'Detener las diapositivas', chooseSlide: 'Elegir una diapositiva', slideN: n => `Diapositiva ${n}`, nOfTotal: (n, t) => `${n} de ${t}`,\n image: 'Imagen', imagePreview: 'Vista previa de la imagen', viewLarger: a => `Ver más grande: ${a}`, zoomIn: 'Acercar', zoomOut: 'Alejar', qrCode: v => `Código QR: ${v}`,\n stepNOfTotal: (n, t) => `Paso ${n} de ${t}`, stepN: n => `Paso ${n}`, stepDone: '(completado)', stepDoneBack: '(completado, volver)',\n openCalendar: 'Abrir el calendario', previousMonth: 'Mes anterior', nextMonth: 'Mes siguiente',\n dropFiles: 'Suelta los archivos aquí', browseFiles: 'Buscar archivos', files: 'Archivos', uploading: n => `Subiendo ${n}`, typeNotAccepted: 'Este tipo no se acepta', largerThan: s => `Pesa más de ${s}`,\n fixToContinue: 'Corrige esto para continuar', verificationCode: 'Código de verificación', characterNOfTotal: (n, t) => `Carácter ${n} de ${t}`,\n available: 'Disponibles', chosen: 'Elegidos', nothingHere: 'Nada aquí', moveTo: (n, l) => `Mover ${n || ''} a ${l}`.replace(' ', ' '), searchIn: l => `Buscar en ${l}`, suggestions: 'Sugerencias',\n typeToAdd: 'Escribe para añadir…', limitReached: 'Llegaste al límite', selected: 'Elegidos', showSuggestions: 'Mostrar sugerencias', filterOptions: 'Filtrar opciones', recent: 'Recientes', loadingSuggestions: 'Cargando sugerencias', searching: 'Buscando…', nothingFor: q => `Nada para “${q}”`, startTyping: 'Escribe para buscar',\n commandPalette: 'Paleta de comandos', searchCommands: 'Buscar comandos', commandPlaceholder: 'Escribe un comando o busca…', esc: 'Esc',\n andMore: n => `y ${n} más`, people: n => `${n} personas`, ratingLabel: 'Calificación', outOf: (v, m) => `${v} de ${m}`,\n hue: 'Tono', hex: 'Hex', contrastFail: 'No pasa', contrastSummary: (r, v) => `Contraste de ${r} a 1, ${v}`,\n ended: 'Terminó', announcement: 'Anuncio', dismissAnnouncement: 'Descartar el anuncio',\n starsN: n => `${n} estrella${n === 1 ? '' : 's'}`, imageFailed: a => `${a || 'La imagen'} no se pudo cargar`, selectAll: 'Elegir todo', selectAllShown: 'Elegir lo visible', wcagPass: l => `cumple WCAG ${l}`, wcagFail: 'no cumple WCAG',\n noData: 'Aún no hay datos', stage: 'Etapa', ofFirst: 'Del inicio', ofPrevious: 'De la anterior', item: 'Elemento', ofMax: 'Del máximo', step: 'Paso', change: 'Cambio', runningTotal: 'Acumulado', measure: 'Medida', target: 'Meta', day: 'Día', showChart: 'Mostrar el gráfico', showTable: 'Mostrar los datos como tabla', legend: 'Leyenda', total: 'Total', slice: 'Porción', value: 'Valor', share: 'Porcentaje', group: 'Grupo', point: 'Punto', size: 'Tamaño',\n selectedN: n => `${n} elegido${n === 1 ? '' : 's'}`, toolsFor: l => `Herramientas de ${l}`, pagesFor: l => `Páginas de ${l}`, expandRow: n => `Ver los detalles de ${n}`, collapseRow: n => `Ocultar los detalles de ${n}`, detailsCol: 'Detalles', filterBy: l => `Filtrar ${l}`, clearFilters: 'Quitar los filtros', summary: 'Resumen', loadingRows: 'Cargando filas',\n editCell: l => `Editar ${l}`, nothingToShow: 'Nada que mostrar', searchTable: l => `Buscar en ${l}`, rowDensity: 'Densidad de filas', compact: 'Compacta', comfortable: 'Cómoda', columns: 'Columnas', exportCsv: 'Exportar', exportSelected: 'Exportar lo elegido',\n nothingMatches: q => `Nada coincide con “${q}”`, rowsOf: (n, t) => `${n} de ${t} filas`, moveItem: n => `Mover ${n}`, dropCardsHere: 'Suelta las tarjetas aquí',\n eventsN: n => `${n} evento${n === 1 ? '' : 's'}`, moreN: n => `+${n} más`,\n firstPage: 'Primera página', lastPage: 'Última página', itemRange: (a, b, n) => `${a}-${b} de ${n}`, perPage: 'Por página', goToPage: 'Ir a la página', stepError: '(tiene un error)', stepWarning: '(requiere atención)', clearRating: 'Quitar calificación',\n dragToMove: 'Arrastrar para mover', pages: 'Páginas', filters: 'Filtros', views: 'Vistas', activeFilters: 'Filtros activos', noValue: 'sin valor', on: 'activado', off: 'desactivado', newTab: '(se abre en una pestaña nueva)', retry: 'Reintentar', uploaded: 'Subido', tooManyFiles: n => `Solo se permite${n === 1 ? '' : 'n'} ${n} archivo${n === 1 ? '' : 's'}`, underline: 'Subrayado', strikethrough: 'Tachado', paragraph: 'Párrafo', alignLeft: 'Alinear a la izquierda', alignCenter: 'Centrar', alignRight: 'Alinear a la derecha', undo: 'Deshacer', redo: 'Rehacer', clearFormatting: 'Quitar formato', linkUrl: 'Dirección del enlace', apply: 'Aplicar', removeLink: 'Quitar enlace', editorLabel: 'Editor de texto', langCode: 'es', searchEmoji: 'Buscar emoji', recentEmoji: 'Recientes', noEmoji: 'No se encontró ningún emoji', emojiCategories: { recent: 'Recientes', smileys: 'Caras', people: 'Personas y manos', nature: 'Animales y naturaleza', food: 'Comida y bebida', activities: 'Actividades', travel: 'Viajes y lugares', objects: 'Objetos', symbols: 'Símbolos' }, pickEmoji: 'Emoji', addReaction: 'Agregar reacción', reactions: 'Reacciones', minimize: 'Minimizar', restore: 'Restaurar', maximize: 'Maximizar', exitMaximize: 'Salir de tamaño completo', clearSelection: 'Quitar selección', selection: 'Selección', keyboardShortcuts: 'Atajos de teclado', searchShortcuts: 'Buscar atajos', noShortcuts: 'Ningún atajo coincide', apps: 'Apps', moreApps: 'Más apps', thenKey: 'luego', textColor: 'Color del texto', highlight: 'Resaltado', superscript: 'Superíndice', subscript: 'Subíndice', indent: 'Aumentar sangría', outdent: 'Reducir sangría', justify: 'Justificar', horizontalRule: 'Línea divisoria', insertTable: 'Tabla', rowsLabel: 'Filas', columnsLabel: 'Columnas', insert: 'Insertar', imageTool: 'Imagen', imageUrl: 'Dirección de la imagen', altText: 'Texto alternativo', altHint: 'Lo que muestra la imagen, para quien no puede verla. Déjalo vacío solo si es decorativa.', specialCharacters: 'Caracteres especiales', fullscreen: 'Pantalla completa', exitFullscreen: 'Salir de pantalla completa', htmlSource: 'HTML', blockFormat: 'Estilo de texto', codeBlock: 'Bloque de código', wordCount: (w, c) => `${w} ${w === 1 ? 'palabra' : 'palabras'}, ${c} ${c === 1 ? 'carácter' : 'caracteres'}`, removeColor: 'Quitar color', schedulerViews: { day: 'Día', week: 'Semana', workweek: 'Semana laboral' }, newEvent: 'Nuevo evento', allDay: 'Todo el día', previousPeriod: 'Anterior', nextPeriod: 'Siguiente', nowLabel: 'Ahora', eventRange: (title, from, to) => `${title}, de ${from} a ${to}`, timeRange: (from, to) => `de ${from} a ${to}`, textSize: 'Tamaño del texto', sizeNames: { small: 'Pequeño', normal: 'Normal', large: 'Grande', huge: 'Enorme' }, changeCase: 'Mayúsculas y minúsculas', upperCase: 'MAYÚSCULAS', lowerCase: 'minúsculas', titleCase: 'Tipo Título', checklist: 'Lista de tareas', markedDone: 'Marcada como hecha', markedNotDone: 'Marcada como pendiente', textDirection: 'Dirección del texto', leftToRight: 'De izquierda a derecha', rightToLeft: 'De derecha a izquierda', findReplace: 'Buscar y reemplazar', findLabel: 'Buscar', replaceLabel: 'Reemplazar con', replace: 'Reemplazar', replaceAll: 'Reemplazar todo', previousMatch: 'Coincidencia anterior', nextMatch: 'Coincidencia siguiente', matchCount: (c, n) => (n ? `${c} de ${n}` : 'Sin coincidencias'), replacedCount: n => (n === 1 ? `1 reemplazada` : `${n} reemplazadas`), tableTools: 'Tabla', rowAbove: 'Fila arriba', rowBelow: 'Fila abajo', columnBefore: 'Columna antes', columnAfter: 'Columna después', deleteRow: 'Borrar fila', deleteColumn: 'Borrar columna', deleteTable: 'Borrar tabla', moreTools: 'Más herramientas', fewerTools: 'Menos herramientas', uploadImage: 'Subir una imagen', orImageUrl: 'o pega una dirección', selectionTools: 'Formato de la selección', imageTooLarge: mb => `Imágenes de hasta ${mb} MB`, aiMessage: 'Mensaje', aiSend: 'Enviar', aiStop: 'Detener', aiAttach: 'Adjuntar archivos', aiHint: 'Enter para enviar, Shift+Enter para una línea nueva', aiSuggestions: 'Sugerencias', aiResponseActions: 'Acciones de la respuesta', aiCopy: 'Copiar', aiCopied: 'Copiado', aiRegenerate: 'Regenerar', aiGood: 'Buena respuesta', aiBad: 'Mala respuesta', aiThanks: 'Gracias por tu opinión', aiThinking: 'Pensando', aiThoughtFor: s => `Pensó durante ${s} s`, aiReasoning: 'Razonamiento', aiTool: { running: 'En curso', done: 'Listo', error: 'Falló' }, aiToolInput: 'Entrada', aiToolOutput: 'Salida', aiSources: 'Fuentes', aiSource: (n, title) => `Fuente ${n}: ${title}`, aiOrb: { idle: 'Asistente listo', listening: 'Asistente escuchando', thinking: 'Asistente pensando', speaking: 'Asistente hablando' }, aiGenerating: 'Generando una respuesta', workStatus: { backlog: 'Pendientes', todo: 'Por hacer', progress: 'En curso', review: 'En revisión', done: 'Hecho', canceled: 'Cancelado' }, workPriority: { none: 'Sin prioridad', urgent: 'Urgente', high: 'Alta', medium: 'Media', low: 'Baja' }, issues: 'Tareas', agent: 'Agente', workedFor: s => `Trabajó durante ${s}`, diffStat: (f, a, d) => `${f} ${f === 1 ? 'archivo cambiado' : 'archivos cambiados'}, ${a} líneas agregadas, ${d} eliminadas`, activity: 'Actividad', properties: 'Propiedades', due: 'Vence', assignee: 'Responsable', unassigned: 'Sin asignar', progressOf: p => `${p}% hecho`, inbox: 'Bandeja de entrada', unread: 'Sin leer', unreadCount: n => `${n} sin leer`, inboxKind: { mention: 'te mencionó', assigned: 'te asignó', comment: 'comentó', status: 'cambió el estado', review: 'pidió tu revisión', agent: 'terminó una tarea' }, projectHealth: { onTrack: 'En buen camino', atRisk: 'En riesgo', offTrack: 'Atrasado', none: 'Sin actualización' }, projectUpdate: 'Actualización del proyecto', noEvents: 'Sin eventos', play: 'Reproducir', pause: 'Pausar', mute: 'Silenciar', unmute: 'Activar sonido', volume: 'Volumen', seek: 'Posición', playbackSpeed: 'Velocidad', captionsOn: 'Activar subtítulos', captionsOff: 'Desactivar subtítulos', pictureInPicture: 'Imagen en imagen', timeOf: (a, b) => `${a} de ${b}`, mediaPlayer: 'Reproductor', skipBack: 'Retroceder 10 segundos', skipForward: 'Adelantar 10 segundos', colorNames: { text: 'Por defecto', accent: 'Morado', second: 'Amarillo', success: 'Verde', warning: 'Ámbar', danger: 'Rojo', info: 'Azul', muted: 'Gris' }, reactionCount: (e, n, mine) => `${e} ${n} ${n === 1 ? 'reacción' : 'reacciones'}${mine ? ', incluida la tuya' : ''}`, typing: names => names.length === 1 ? `${names[0]} está escribiendo` : names.length === 2 ? `${names[0]} y ${names[1]} están escribiendo` : `${names.length} personas están escribiendo`, messageStatus: { sending: 'Enviando', sent: 'Enviado', delivered: 'Entregado', read: 'Leído', failed: 'No enviado' }, replies: n => `${n} ${n === 1 ? 'respuesta' : 'respuestas'}`, thread: 'Hilo', closeThread: 'Cerrar hilo', openThread: 'Abrir hilo', showReplies: n => `Mostrar ${n} ${n === 1 ? 'respuesta' : 'respuestas'}`, hideReplies: 'Ocultar respuestas', lastReply: when => `Última respuesta ${when}`, newReplies: n => `${n} ${n === 1 ? 'nueva' : 'nuevas'}`, noReplies: 'Aún no hay respuestas', threadReplies: 'Respuestas', reactWith: e => `Reaccionar con ${e}`, reactionsGroup: 'Reacciones rápidas', replyingIn: a => `Hilo de ${a}`,\n newMessages: 'Mensajes nuevos', yesterday: 'Ayer', you: 'Tú', messages: 'Mensajes', edited2: 'editado', edit: 'Editar', addFilter: 'Agregar filtro', clearAll: 'Quitar todo', diffAdded: 'Agregado: ', diffRemoved: 'Quitado: ', uptime: (l, p, n, u, d, sl) => `${l}: ${p != null ? `${p}% de disponibilidad` : 'disponibilidad'} en ${u === 'day' ? 'los últimos' : 'las últimas'} ${n} ${u === 'day' ? 'días' : 'horas'}${d ? `, ${d} sin servicio` : ''}${sl ? `, ${sl} con degradación` : ''}`, paymentCard: (k, h, l4, f) => `${k ? `Tarjeta ${k.toLowerCase()}` : 'Tarjeta'} de ${h}, terminada en ${l4}${f ? ', congelada' : ''}`, paymentCardParts: { card: 'tarjeta', ending: 'terminada en', frozen: 'Congelada' }, paneArea: 'Área', paneLabels: { start: 'Capas', main: 'Lienzo', end: 'Inspector' }, period: 'Periodo', periods: { '24h': 'Últimas 24 horas', '7d': 'Últimos 7 días', '30d': 'Últimos 30 días', '90d': 'Últimos 90 días', '6m': 'Últimos 6 meses', '12m': 'Últimos 12 meses', ytd: 'En lo que va del año', all: 'Todo el tiempo' },\n pickTime: 'Elige una hora', hours: 'Horas', minutes: 'Minutos', hourN: n => `${n} horas`, minuteN: n => `${n} minutos`,\n moreInfo: 'Más información', unsavedChanges: 'Cambios sin guardar', discard: 'Descartar', edited: 'editado', comment: 'Comentar', addComment: 'Escribe un comentario…',\n optional: 'opcional', passwordStrength: 'Seguridad de la contraseña', strengthLevels: ['Débil', 'Aceptable', 'Buena', 'Fuerte'], overLimit: n => `${n} carácter${n === 1 ? '' : 'es'} de más`,\n writeMarkdown: 'Escribe en Markdown…', charactersLeft: n => `Queda${n === 1 ? '' : 'n'} ${n} carácter${n === 1 ? '' : 'es'}`, rowsN: n => `${n} fila${n === 1 ? '' : 's'}`, cellOf: (c, r) => `${c} de ${r}`,\n bold: 'Negrita', italic: 'Cursiva', heading: 'Título', link: 'Enlace', quote: 'Cita', code: 'Código', bulletedList: 'Lista con viñetas', numberedList: 'Lista numerada', editorMode: 'Modo del editor', write: 'Escribir', preview: 'Vista previa', formatting: 'Formato', nothingToPreview: 'Aún no hay nada que mostrar.',\n};\n\n// English and Spanish ship complete; add others with registerStrings (half-translated packs would mix languages).\nconst PACKS: Record<string, AleaStrings> = { en, es };\nexport const StringsContext = createContext<Partial<AleaStrings> | null>(null);\n\n/** The kit's text in the current locale (ThemeProvider locale, else the browser's), with ThemeProvider strings on top. */\nexport function useStrings(): AleaStrings {\n const { locale } = useLocale();\n const override = useContext(StringsContext);\n const pack = PACKS[(locale || 'en').split('-')[0]] || en;\n return override ? { ...pack, ...override } : pack;\n}\n/** Add or replace a language pack (e.g. registerStrings('it', { ...en, close: 'Chiudi' })). */\nexport function registerStrings(lang: string, pack: AleaStrings) { PACKS[lang] = pack; }\n"},{"path":"base.css","content":"/* Alea base: tokens, the root look, focus and motion. */\n@import './tokens.css';\n\n.alea-root {\n font-family: var(--alea-font-family-body);\n font-size: var(--alea-font-size-base);\n line-height: var(--alea-font-leading-normal);\n color: var(--alea-text);\n background: var(--alea-bg);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n transition: background-color var(--alea-motion-duration-slow) var(--alea-motion-ease-standard), color var(--alea-motion-duration-slow) var(--alea-motion-ease-standard);\n}\n.alea-root *, .alea-root *::before, .alea-root *::after { box-sizing: border-box; }\n\n/* One focus ring for every control, only for keyboard focus */\n.alea-focus-ring[data-focus-visible], .alea-focus-ring:focus-visible {\n outline: 2px solid var(--alea-focus);\n outline-offset: var(--alea-space-0-5);\n}\n/* the same ring for any focusable element inside the kit that has no ring of its own (zero specificity: components still win) */\n:where(.alea-root) :where(a[href], button, input, textarea, select, summary, [tabindex]:not([tabindex='-1'])):focus-visible {\n outline: 2px solid var(--alea-focus);\n outline-offset: var(--alea-space-0-5);\n}\n\n.alea-visually-hidden {\n position: absolute; width: 1px; height: 1px; padding: 0; margin: calc(var(--alea-space-0-25) * -1);\n overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;\n}\n\n@keyframes alea-spin { to { transform: rotate(360deg); } }\n@keyframes alea-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }\n\n/* Reduced motion is handled in motion.css: distances and scales go to zero, fades stay. */\n\n/* Scrollbars: thin, themed, the same everywhere (page, sidebars, code, tables, overlays).\n scrollbar-color for Chrome, Edge and Firefox; ::-webkit-scrollbar for Safari. */\n.alea-root {\n --alea-scrollbar-thumb: color-mix(in srgb, var(--alea-text) 22%, transparent);\n --alea-scrollbar-thumb-hover: color-mix(in srgb, var(--alea-text) 38%, transparent);\n scrollbar-width: thin;\n scrollbar-color: var(--alea-scrollbar-thumb) transparent;\n}\n.alea-root * { scrollbar-width: thin; scrollbar-color: var(--alea-scrollbar-thumb) transparent; }\n.alea-root *:hover { scrollbar-color: var(--alea-scrollbar-thumb-hover) transparent; }\n.alea-root ::-webkit-scrollbar, .alea-root::-webkit-scrollbar { width: 12px; height: 12px; background: transparent; }\n.alea-root ::-webkit-scrollbar-thumb, .alea-root::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: var(--alea-radius-full); background: var(--alea-scrollbar-thumb) padding-box; }\n.alea-root ::-webkit-scrollbar-thumb:hover { background: var(--alea-scrollbar-thumb-hover) padding-box; }\n.alea-root ::-webkit-scrollbar-track, .alea-root ::-webkit-scrollbar-corner { background: transparent; }\n\n/* More contrast: when the system asks for it (Increase contrast) or with contrast=\"more\" on ThemeProvider.\n Every text and border token reaches WCAG AAA (7:1 for text). contrast=\"normal\" opts out. */\n[data-contrast='more'][data-theme='dark'], [data-contrast='more'] [data-theme='dark'] { --alea-text: var(--alea-white); --alea-bg: var(--alea-gray-1000); --alea-text-muted: #f0f0f0; --alea-text-faint: #e0e0e0; --alea-border: color-mix(in srgb, var(--alea-white) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 80%, transparent); --alea-accent-strong: var(--alea-purple-200); --alea-status-danger: var(--alea-red-200); --alea-status-danger-solid: var(--alea-red-800); --alea-status-danger-solid-hover: var(--alea-red-900); --alea-status-info-solid: var(--alea-blue-800); --alea-accent-solid: var(--alea-purple-300); --alea-status-success: var(--alea-green-200); --alea-status-warning: var(--alea-amber-200); --alea-status-info: var(--alea-blue-200); }\n[data-contrast='more'][data-theme='light'], [data-contrast='more'] [data-theme='light'] { --alea-text: var(--alea-gray-1000); --alea-bg: var(--alea-white); --alea-text-muted: var(--alea-black); --alea-text-faint: #2a292a; --alea-border: color-mix(in srgb, var(--alea-black) 40%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-black) 60%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-black) 90.2%, transparent); --alea-accent-strong: var(--alea-purple-900); --alea-status-danger: var(--alea-red-900); --alea-status-success: color-mix(in oklab, var(--alea-green-900) 80%, #000); --alea-status-warning: var(--alea-amber-900); --alea-status-info: var(--alea-blue-900); --alea-status-danger-solid: var(--alea-red-800); --alea-status-danger-solid-hover: var(--alea-red-900); --alea-status-info-solid: var(--alea-blue-800); --alea-accent-solid: var(--alea-purple-300); }\n@media (prefers-contrast: more) {\n [data-theme='dark']:not([data-contrast='normal']) { --alea-text: var(--alea-white); --alea-bg: var(--alea-gray-1000); --alea-text-muted: #f0f0f0; --alea-text-faint: #e0e0e0; --alea-border: color-mix(in srgb, var(--alea-white) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 80%, transparent); --alea-accent-strong: var(--alea-purple-200); --alea-status-danger: var(--alea-red-200); --alea-status-danger-solid: var(--alea-red-800); --alea-status-danger-solid-hover: var(--alea-red-900); --alea-status-info-solid: var(--alea-blue-800); --alea-accent-solid: var(--alea-purple-300); --alea-status-success: var(--alea-green-200); --alea-status-warning: var(--alea-amber-200); --alea-status-info: var(--alea-blue-200); }\n [data-theme='light']:not([data-contrast='normal']) { --alea-text: var(--alea-gray-1000); --alea-bg: var(--alea-white); --alea-text-muted: var(--alea-black); --alea-text-faint: #2a292a; --alea-border: color-mix(in srgb, var(--alea-black) 40%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-black) 60%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-black) 90.2%, transparent); --alea-accent-strong: var(--alea-purple-900); --alea-status-danger: var(--alea-red-900); --alea-status-success: color-mix(in oklab, var(--alea-green-900) 80%, #000); --alea-status-warning: var(--alea-amber-900); --alea-status-info: var(--alea-blue-900); --alea-status-danger-solid: var(--alea-red-800); --alea-status-danger-solid-hover: var(--alea-red-900); --alea-status-info-solid: var(--alea-blue-800); --alea-accent-solid: var(--alea-purple-300); }\n}\n"},{"path":"presets.css","content":"/* Alea presets and surfaces (free). Both are attributes, on <html> through\n ThemeProvider (preset, surface) or on any wrapper:\n data-preset=\"graphite\" a monochrome look: near-black and white, gray surfaces, sans titles; made for bento layouts\n data-surface=\"glass\" frosted glass on floating surfaces: navbar, popovers, menus, dialogs, toasts, drawers\n Glass falls back to solid surfaces where backdrop-filter is missing, and to\n more opaque ones with prefers-reduced-transparency. Liquid glass (refraction)\n is in Alea Pro. */\n\n/* ------------------------------------------------------------------ glass */\n:root, [data-theme], [data-preset], .alea-root {\n --alea-glass-blur: 18px;\n --alea-glass-saturate: 170%;\n --alea-glass-tint: color-mix(in srgb, var(--alea-surface) 62%, transparent);\n --alea-glass-rim: inset 0 1px 0 color-mix(in srgb, #ffffff 22%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--alea-text) 10%, transparent);\n}\n[data-theme='light'] { --alea-glass-tint: color-mix(in srgb, var(--alea-surface) 58%, transparent); --alea-glass-rim: inset 0 1px 0 #ffffffb3, inset 0 0 0 1px color-mix(in srgb, var(--alea-text) 9%, transparent); }\n.alea-glass,\n[data-surface='glass'] :is(.alea-popover, .alea-modal, .alea-drawer, .alea-toast, .alea-navbar, .alea-command, .alea-hovercard, .alea-bottomnav) {\n background-color: var(--alea-glass-tint);\n -webkit-backdrop-filter: blur(var(--alea-glass-blur)) saturate(var(--alea-glass-saturate));\n backdrop-filter: blur(var(--alea-glass-blur)) saturate(var(--alea-glass-saturate));\n}\n.alea-glass, .alea-card[data-variant='glass'] { box-shadow: var(--alea-glass-rim), var(--alea-shadow-pop); }\n[data-surface='glass'] :is(.alea-popover, .alea-modal, .alea-drawer, .alea-toast, .alea-command, .alea-hovercard) { box-shadow: var(--alea-glass-rim), var(--alea-shadow-pop); }\n.alea-card[data-variant='glass'] {\n background-color: var(--alea-glass-tint);\n -webkit-backdrop-filter: blur(var(--alea-glass-blur)) saturate(var(--alea-glass-saturate));\n backdrop-filter: blur(var(--alea-glass-blur)) saturate(var(--alea-glass-saturate));\n}\n@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {\n :root { --alea-glass-tint: var(--alea-surface-raised); }\n}\n@media (prefers-reduced-transparency: reduce) {\n :root { --alea-glass-tint: color-mix(in srgb, var(--alea-surface) 94%, transparent); --alea-glass-blur: 24px; }\n}\n\n/* ------------------------------------------------------------------ look primitives\n The colors a look needs that the shared palette (tokens.css) does not have: one name for each hex, the same in every look that uses it.\n GENERATED from packages/tokens/src/look-primitives.json by scripts/primitives-apply.mjs. Same names and values as the Primitives collection of that look in Figma. */\n[data-preset='graphite'] {\n --alea-gray-0: #fafafa;\n --alea-gray-200: #f5f5f5;\n --alea-gray-350: #ededed;\n --alea-gray-450: #a3a3a3;\n --alea-gray-500: #525252;\n --alea-gray-850: #0b0b0b;\n --alea-gray-900: #0a0a0a;\n}\n[data-preset='midnight'] {\n --alea-blue-gray-0: #f5f7fb;\n --alea-blue-gray-300: #e2e8f0;\n --alea-blue-gray-700: #111a2e;\n --alea-blue-gray-850: #0c1427;\n --alea-blue-gray-1000: #0b1220;\n --alea-blue-350: #9fb0c8;\n --alea-blue-650: #2563eb;\n --alea-blue-750: #1d4ed8;\n --alea-blue-850: #3a45ad;\n --alea-midnight-0: #7cb0ff;\n --alea-midnight-1000: #2c3696;\n --alea-violet-250: #b3baff;\n}\n[data-preset='glass'] {\n --alea-blue-gray-150: #f2f2f7;\n --alea-blue-gray-450: #3c3c43;\n --alea-blue-250: #9ccfff;\n --alea-blue-450: #0a84ff;\n --alea-glass-0: #64b5ff;\n --alea-glass-150: #0071e3;\n --alea-glass-300: #0a6fe0;\n --alea-glass-450: #0066cc;\n --alea-glass-550: #0058c2;\n --alea-glass-700: #0050b3;\n --alea-glass-850: #004a9e;\n --alea-glass-1000: #003f87;\n --alea-gray-150: #f5f5f7;\n --alea-gray-550: #2c2c2e;\n --alea-gray-600: #1d1d1f;\n --alea-gray-650: #1c1c1e;\n}\n[data-preset='ember'] {\n --alea-ember-0: #d93b2b;\n --alea-ember-1000: #b42c1f;\n --alea-red-350: #ff7d72;\n --alea-red-450: #f0564a;\n --alea-red-550: #dc3b2f;\n --alea-warm-gray-150: #fbf6f3;\n --alea-warm-gray-200: #faf5f2;\n --alea-warm-gray-250: #b9a9a3;\n --alea-warm-gray-450: #2a140f;\n --alea-warm-gray-600: #1f1716;\n --alea-warm-gray-750: #1d1210;\n --alea-warm-gray-800: #171110;\n --alea-warm-gray-950: #15100f;\n}\n[data-preset='solar'] {\n --alea-amber-350: #b8b196;\n --alea-amber-650: #8f6300;\n --alea-solar-0: #f5b800;\n --alea-solar-1000: #8a6000;\n --alea-warm-gray-0: #fffcf2;\n --alea-warm-gray-50: #fbf8ec;\n --alea-warm-gray-400: #2b2305;\n --alea-warm-gray-550: #1c1a0c;\n --alea-warm-gray-650: #1c1806;\n --alea-warm-gray-850: #141208;\n --alea-warm-gray-1000: #121107;\n --alea-yellow-150: #ffd23f;\n --alea-yellow-250: #ffcc33;\n}\n[data-preset='moss'] {\n --alea-green-gray-0: #f4f9f6;\n --alea-green-gray-150: #f0f7f2;\n --alea-green-gray-350: #13201a;\n --alea-green-gray-500: #0d2016;\n --alea-green-gray-650: #0f1f17;\n --alea-green-gray-850: #0f1813;\n --alea-green-gray-1000: #0d1410;\n --alea-green-250: #4ade80;\n --alea-green-350: #9fb6a8;\n --alea-green-450: #10b981;\n --alea-green-550: #059669;\n --alea-green-650: #047857;\n --alea-green-850: #065f46;\n}\n\n/* ------------------------------------------------------------------ graphite */\n[data-preset='graphite'][data-theme='dark'], [data-preset='graphite'] [data-theme='dark'], [data-theme='dark'] [data-preset='graphite']:not([data-theme]) {\n --alea-bg: var(--alea-gray-900); --alea-bg-deep: #050505;\n --alea-surface: var(--alea-gray-800); --alea-surface-deep: var(--alea-gray-850); --alea-surface-raised: #1a1a1a; --alea-surface-hover: #1c1c1c;\n --alea-border: color-mix(in srgb, var(--alea-white) 7.06%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 14.12%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 30.2%, transparent);\n --alea-text: var(--alea-gray-350); --alea-text-soft: var(--alea-gray-200); --alea-text-muted: var(--alea-gray-450); --alea-text-faint: #949494;\n --alea-accent: var(--alea-gray-350); --alea-accent-strong: var(--alea-white); --alea-accent-second: var(--alea-gray-450); --alea-accent-third: #737373;\n --alea-accent-subtle: color-mix(in srgb, var(--alea-white) 7.84%, transparent); --alea-accent-on: var(--alea-gray-900); --alea-accent-solid: var(--alea-gray-350);\n --alea-focus: var(--alea-gray-350); --alea-focus-halo: color-mix(in srgb, var(--alea-white) 14.9%, transparent);\n --alea-chip-bg: var(--alea-gray-350); --alea-chip-text: var(--alea-gray-900);\n --alea-button-ring: color-mix(in srgb, var(--alea-white) 18.04%, transparent); --alea-button-top: var(--alea-white); --alea-button-bottom: #b9b9c0; --alea-button-text: var(--alea-gray-900);\n --alea-field-bg: var(--alea-gray-850);\n --alea-gradient-accent: radial-gradient(100% 100% at 25% 100%, #fafafa 0%, #737373 100%);\n --alea-gradient-accent-linear: linear-gradient(120deg, #fafafa 0%, #8a8a8a 100%);\n --alea-gradient-text: var(--alea-gradient-accent); --alea-gradient-text-linear: var(--alea-gradient-accent-linear);\n --alea-gradient-button: linear-gradient(180deg, #ffffff 0%, #b9b9c0 100%);\n --alea-shadow-card: inset 0 0 0 1px color-mix(in srgb, var(--alea-white) 7.06%, transparent), 0 1px 0 0 color-mix(in srgb, var(--alea-white) 3.14%, transparent) inset, 0 16px 40px -24px color-mix(in srgb, var(--alea-gray-1000) 80%, transparent);\n --alea-shadow-pop: 0 24px 60px -24px color-mix(in srgb, var(--alea-gray-1000) 90.2%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--alea-white) 7.84%, transparent);\n}\n[data-preset='graphite'][data-theme='light'], [data-preset='graphite'] [data-theme='light'], [data-theme='light'] [data-preset='graphite']:not([data-theme]) {\n --alea-bg: var(--alea-gray-0); --alea-bg-deep: #f2f2f2;\n --alea-surface: var(--alea-white); --alea-surface-deep: var(--alea-gray-200); --alea-surface-raised: var(--alea-gray-350); --alea-surface-hover: var(--alea-gray-100);\n --alea-border: color-mix(in srgb, var(--alea-gray-900) 7.84%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-gray-900) 14.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-gray-900) 40%, transparent);\n --alea-text: var(--alea-gray-900); --alea-text-soft: #171717; --alea-text-muted: var(--alea-gray-500); --alea-text-faint: #6b6b6b;\n --alea-accent: var(--alea-gray-900); --alea-accent-strong: var(--alea-gray-900); --alea-accent-second: var(--alea-gray-500); --alea-accent-third: var(--alea-gray-450);\n --alea-accent-subtle: color-mix(in srgb, var(--alea-gray-900) 5.88%, transparent); --alea-accent-on: var(--alea-gray-0); --alea-accent-solid: var(--alea-gray-900);\n --alea-focus: var(--alea-gray-900); --alea-focus-halo: color-mix(in srgb, var(--alea-gray-900) 12.16%, transparent);\n --alea-chip-bg: var(--alea-gray-900); --alea-chip-text: var(--alea-gray-0);\n --alea-button-ring: color-mix(in srgb, var(--alea-gray-900) 20%, transparent); --alea-button-top: var(--alea-gray-0); --alea-button-bottom: #c4c4cb; --alea-button-text: var(--alea-gray-900);\n --alea-field-bg: var(--alea-gray-0);\n --alea-gradient-accent: radial-gradient(100% 100% at 25% 100%, #0a0a0a 0%, #737373 100%);\n --alea-gradient-accent-linear: linear-gradient(120deg, #0a0a0a 0%, #737373 100%);\n --alea-gradient-text: var(--alea-gradient-accent); --alea-gradient-text-linear: var(--alea-gradient-accent-linear);\n --alea-gradient-button: linear-gradient(180deg, #fafafa 0%, #c4c4cb 100%);\n --alea-shadow-card: inset 0 0 0 1px color-mix(in srgb, var(--alea-gray-900) 7.06%, transparent), 0 12px 32px -24px color-mix(in srgb, var(--alea-gray-900) 20%, transparent);\n --alea-shadow-pop: 0 24px 60px -24px color-mix(in srgb, var(--alea-gray-900) 25.1%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--alea-gray-900) 7.06%, transparent);\n}\n/* sans titles, tight and heavier, like most monochrome bento sites */\n[data-preset='graphite'] {\n --alea-font-family-display: var(--alea-font-family-body);\n}\n/* monochrome: a white thumb would vanish on the near-white track (dark) and the reverse in light; use the color made for the accent */\n[data-preset='graphite'] .alea-switch:not([data-selected]) .alea-switch-thumb { background: var(--alea-text-muted); color: var(--alea-surface); }\n[data-preset='graphite'] .alea-switch[data-selected] .alea-switch-thumb { background: var(--alea-accent-on); color: var(--alea-accent-solid); }\n[data-preset='graphite'] .alea-heading[data-family='serif'] { font-weight: var(--alea-font-weight-medium); letter-spacing: -0.025em; }\n[data-preset='graphite'] .alea-heading[data-family='serif'][data-size='display'] { letter-spacing: -0.045em; }\n\n/* ------------------------------------------------------------------ midnight\n Serious and precise: near-black with a blue cast, white and gray text, hairline borders, an indigo accent,\n sans titles with tight tracking. Same motion and components; only the tokens change. */\n[data-preset='midnight'][data-theme='dark'], [data-preset='midnight'] [data-theme='dark'], [data-theme='dark'] [data-preset='midnight']:not([data-theme]) {\n --alea-bg: var(--alea-blue-gray-1000); --alea-bg-deep: #070d19;\n --alea-surface: var(--alea-blue-gray-700); --alea-surface-deep: var(--alea-blue-gray-850); --alea-surface-raised: #182440; --alea-surface-hover: #1b2947;\n --alea-border: color-mix(in srgb, var(--alea-white) 7.84%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 14.12%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 25.1%, transparent);\n --alea-text: #f1f5f9; --alea-text-soft: var(--alea-blue-gray-300); --alea-text-muted: var(--alea-blue-350); --alea-text-faint: #93a4bd;\n --alea-accent: var(--alea-blue-500); --alea-accent-strong: var(--alea-midnight-0); --alea-accent-second: #22d3ee; --alea-accent-third: var(--alea-blue-350);\n --alea-accent-subtle: color-mix(in srgb, var(--alea-blue-500) 18.82%, transparent); --alea-accent-on: var(--alea-white); --alea-accent-solid: var(--alea-blue-650);\n --alea-focus: var(--alea-midnight-0); --alea-focus-halo: color-mix(in srgb, var(--alea-blue-500) 27.84%, transparent);\n --alea-chip-bg: var(--alea-blue-gray-300); --alea-chip-text: var(--alea-blue-gray-1000);\n --alea-button-ring: color-mix(in srgb, var(--alea-blue-650) 25.1%, transparent); --alea-button-top: var(--alea-blue-500); --alea-button-bottom: var(--alea-blue-750); --alea-button-text: var(--alea-white);\n --alea-field-bg: var(--alea-blue-gray-850);\n --alea-gradient-accent: radial-gradient(100% 100% at 25% 100%, #2563eb 0%, #60a5fa 100%);\n --alea-gradient-accent-linear: linear-gradient(120deg, #2563eb 0%, #22d3ee 100%);\n --alea-gradient-text: var(--alea-gradient-accent); --alea-gradient-text-linear: var(--alea-gradient-accent-linear);\n --alea-gradient-button: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);\n --alea-shadow-card: inset 0 0 0 1px color-mix(in srgb, var(--alea-white) 5.88%, transparent), 0 1px 0 0 color-mix(in srgb, var(--alea-white) 3.14%, transparent) inset, 0 12px 32px -20px color-mix(in srgb, var(--alea-gray-1000) 80%, transparent);\n --alea-shadow-pop: 0 20px 48px -16px color-mix(in srgb, var(--alea-gray-1000) 90.2%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--alea-white) 9.02%, transparent);\n}\n[data-preset='midnight'][data-theme='light'], [data-preset='midnight'] [data-theme='light'], [data-theme='light'] [data-preset='midnight']:not([data-theme]) {\n --alea-bg: var(--alea-blue-gray-0); --alea-bg-deep: #e8edf5;\n --alea-surface: var(--alea-white); --alea-surface-deep: #eef2f8; --alea-surface-raised: #e3e9f3; --alea-surface-hover: #f2f5fa;\n --alea-border: color-mix(in srgb, var(--alea-blue-gray-1000) 7.84%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-blue-gray-1000) 14.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-blue-gray-1000) 32.16%, transparent);\n --alea-text: var(--alea-blue-gray-1000); --alea-text-soft: #1e293b; --alea-text-muted: #4b5a70; --alea-text-faint: #526077;\n --alea-accent: var(--alea-blue-650); --alea-accent-strong: var(--alea-blue-750); --alea-accent-second: #0891b2; --alea-accent-third: #64748b;\n --alea-accent-subtle: color-mix(in srgb, var(--alea-blue-650) 12.16%, transparent); --alea-accent-on: var(--alea-white); --alea-accent-solid: var(--alea-blue-650);\n --alea-focus: var(--alea-blue-650); --alea-focus-halo: color-mix(in srgb, var(--alea-blue-650) 20%, transparent);\n --alea-chip-bg: var(--alea-blue-gray-1000); --alea-chip-text: var(--alea-blue-gray-0);\n --alea-button-ring: color-mix(in srgb, var(--alea-blue-650) 20%, transparent); --alea-button-top: var(--alea-blue-500); --alea-button-bottom: var(--alea-blue-750); --alea-button-text: var(--alea-white);\n --alea-field-bg: var(--alea-white);\n --alea-gradient-accent: radial-gradient(100% 100% at 25% 100%, #2563eb 0%, #60a5fa 100%);\n --alea-gradient-accent-linear: linear-gradient(120deg, #2563eb 0%, #0891b2 100%);\n --alea-gradient-text: radial-gradient(100% 100% at 25% 100%, #2563eb 0%, #3b82f6 100%); --alea-gradient-text-linear: var(--alea-gradient-accent-linear);\n --alea-gradient-button: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);\n --alea-shadow-card: inset 0 0 0 1px color-mix(in srgb, var(--alea-blue-gray-1000) 7.84%, transparent), 0 8px 24px -18px color-mix(in srgb, var(--alea-blue-gray-1000) 20%, transparent);\n --alea-shadow-pop: 0 20px 48px -20px color-mix(in srgb, var(--alea-blue-gray-1000) 25.1%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--alea-blue-gray-1000) 7.84%, transparent);\n}\n[data-preset='midnight'] {\n --alea-font-family-body: 'Inter', system-ui, sans-serif;\n --alea-font-family-display: var(--alea-font-family-body);\n}\n[data-preset='midnight'] .alea-heading[data-family='serif'] { font-weight: var(--alea-font-weight-medium); letter-spacing: -0.022em; }\n[data-preset='midnight'] .alea-heading[data-family='serif'][data-size='display'] { letter-spacing: -0.03em; }\n\n/* ------------------------------------------------------------------ glass\n Light and air: translucent materials over vivid backgrounds, Inter, a bright blue\n accent. Every floating and container surface turns into frosted glass (see data-surface=\"glass\" above). */\n[data-preset='glass'][data-theme='dark'], [data-preset='glass'] [data-theme='dark'], [data-theme='dark'] [data-preset='glass']:not([data-theme]) {\n --alea-bg: var(--alea-gray-1000); --alea-bg-deep: var(--alea-gray-1000);\n --alea-surface: var(--alea-gray-650); --alea-surface-deep: #111113; --alea-surface-raised: var(--alea-gray-550); --alea-surface-hover: #262628;\n --alea-border: color-mix(in srgb, var(--alea-white) 10.2%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 18.04%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 27.84%, transparent);\n --alea-text: var(--alea-gray-150); --alea-text-soft: #e8e8ed; --alea-text-muted: #aeaeb2; --alea-text-faint: #9c9ca2;\n --alea-accent: var(--alea-blue-450); --alea-accent-strong: var(--alea-glass-0); --alea-accent-second: #bf5af2; --alea-accent-third: #30d158;\n --alea-accent-subtle: color-mix(in srgb, var(--alea-blue-450) 18.04%, transparent); --alea-accent-on: var(--alea-white); --alea-accent-solid: var(--alea-glass-300);\n --alea-focus: var(--alea-glass-0); --alea-focus-halo: color-mix(in srgb, var(--alea-blue-450) 30.2%, transparent);\n --alea-chip-bg: var(--alea-gray-150); --alea-chip-text: var(--alea-gray-1000);\n --alea-button-ring: color-mix(in srgb, var(--alea-white) 14.9%, transparent); --alea-button-top: #2f86ff; --alea-button-bottom: var(--alea-glass-300); --alea-button-text: var(--alea-white);\n --alea-field-bg: color-mix(in srgb, var(--alea-white) 5.88%, transparent);\n --alea-gradient-accent: radial-gradient(100% 100% at 25% 100%, #0a84ff 0%, #bf5af2 100%);\n --alea-gradient-accent-linear: linear-gradient(120deg, #0a84ff 0%, #bf5af2 100%);\n --alea-gradient-text: var(--alea-gradient-accent); --alea-gradient-text-linear: var(--alea-gradient-accent-linear);\n --alea-gradient-button: linear-gradient(180deg, #2f86ff 0%, #0a6fe0 100%);\n --alea-glass-tint: color-mix(in srgb, #1c1c1e 44%, transparent);\n --alea-glass-blur: 36px; --alea-glass-saturate: 210%;\n --alea-glass-rim: inset 0 1px 0 color-mix(in srgb, #ffffff 34%, transparent), inset 0 0 0 1px color-mix(in srgb, #ffffff 14%, transparent);\n --alea-glass-sheen: linear-gradient(135deg, color-mix(in srgb, #ffffff 12%, transparent), transparent 42%);\n}\n[data-preset='glass'][data-theme='light'], [data-preset='glass'] [data-theme='light'], [data-theme='light'] [data-preset='glass']:not([data-theme]) {\n --alea-bg: var(--alea-blue-gray-150); --alea-bg-deep: #e5e5ea;\n --alea-surface: var(--alea-white); --alea-surface-deep: var(--alea-blue-gray-150); --alea-surface-raised: #e9e9ee; --alea-surface-hover: #f7f7fa;\n --alea-border: color-mix(in srgb, var(--alea-blue-gray-450) 7.84%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-blue-gray-450) 16.08%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-blue-gray-450) 38.04%, transparent);\n --alea-text: var(--alea-gray-600); --alea-text-soft: var(--alea-gray-550); --alea-text-muted: #5f5f64; --alea-text-faint: #636368;\n --alea-accent: var(--alea-glass-150); --alea-accent-strong: #0062c4; --alea-accent-second: #8e44c9; --alea-accent-third: #248a3d;\n --alea-accent-subtle: color-mix(in srgb, var(--alea-glass-150) 12.16%, transparent); --alea-accent-on: var(--alea-white); --alea-accent-solid: var(--alea-glass-450);\n --alea-focus: var(--alea-glass-150); --alea-focus-halo: color-mix(in srgb, var(--alea-glass-150) 20%, transparent);\n --alea-chip-bg: var(--alea-gray-600); --alea-chip-text: var(--alea-white);\n --alea-button-ring: color-mix(in srgb, var(--alea-glass-450) 20%, transparent); --alea-button-top: #1a85ff; --alea-button-bottom: var(--alea-glass-450); --alea-button-text: var(--alea-white);\n --alea-field-bg: color-mix(in srgb, var(--alea-white) 54.9%, transparent);\n --alea-gradient-accent: radial-gradient(100% 100% at 25% 100%, #0071e3 0%, #a855f7 100%);\n --alea-gradient-accent-linear: linear-gradient(120deg, #0071e3 0%, #a855f7 100%);\n --alea-gradient-text: var(--alea-gradient-accent); --alea-gradient-text-linear: var(--alea-gradient-accent-linear);\n --alea-gradient-button: linear-gradient(180deg, #1a85ff 0%, #0066cc 100%);\n --alea-glass-tint: color-mix(in srgb, #ffffff 52%, transparent);\n --alea-glass-blur: 36px; --alea-glass-saturate: 210%;\n --alea-glass-rim: inset 0 1px 0 #ffffffe6, inset 0 0 0 1px color-mix(in srgb, #ffffff 55%, transparent), inset 0 -1px 0 color-mix(in srgb, #000000 6%, transparent);\n --alea-glass-sheen: linear-gradient(135deg, color-mix(in srgb, #ffffff 26%, transparent), transparent 46%);\n --alea-status-danger: #b71c1c;\n}\n[data-preset='glass'] {\n --alea-font-family-body: 'Inter', system-ui, sans-serif;\n --alea-font-family-display: var(--alea-font-family-body);\n /* the one look with its own radius ladder: exactly twice Graphite from xs to 4xl (the hairlines 3xs and 2xs and the pill stay) */\n --alea-radius-xs: 8px;\n --alea-radius-sm: 12px;\n --alea-radius-field: 16px;\n --alea-radius-md: 20px;\n --alea-radius-lg: 24px;\n --alea-radius-xl: 32px;\n --alea-radius-2xl: 40px;\n --alea-radius-3xl: 48px;\n --alea-radius-4xl: 64px;\n}\n[data-preset='glass'] .alea-heading[data-family='serif'] { font-weight: var(--alea-font-weight-semibold); letter-spacing: -0.025em; }\n/* everything that holds content is frosted glass in this preset */\n:is([data-preset='glass'], [data-surface='glass']) :is(.alea-card, .alea-popover, .alea-modal, .alea-drawer, .alea-toast, .alea-navbar, .alea-command, .alea-hovercard, .alea-bottomnav, .alea-codeblock, .alea-table-wrap, .alea-menu, .alea-listbox) {\n background-color: var(--alea-glass-tint);\n background-image: var(--alea-glass-sheen, none);\n -webkit-backdrop-filter: blur(var(--alea-lens-blur, var(--alea-glass-blur))) var(--alea-lens, ) saturate(var(--alea-glass-saturate));\n backdrop-filter: blur(var(--alea-lens-blur, var(--alea-glass-blur))) var(--alea-lens, ) saturate(var(--alea-glass-saturate));\n}\n[data-preset='glass'] :is(.alea-card, .alea-popover, .alea-modal, .alea-drawer, .alea-toast, .alea-command, .alea-hovercard) { box-shadow: var(--alea-glass-rim), var(--alea-shadow-card); }\n@media (prefers-reduced-transparency: reduce) { [data-preset='glass'] { --alea-glass-tint: color-mix(in srgb, var(--alea-surface) 94%, transparent); } }\n/* the lens belongs to the surface it was made for: children do not inherit it (a nested panel would bend its\n parent's sheen and rim with the wrong size) */\n@property --alea-lens { syntax: '*'; inherits: false; }\n@property --alea-lens-blur { syntax: '*'; inherits: false; }\n@property --alea-lens-def { syntax: '*'; inherits: false; }\n/* the lens manager sets --alea-lens-def and --alea-lens-blur-def on each lensed surface; while the page scrolls it sets\n html[data-alea-scrolling] and both drop to their initial (unset) value, so the frost alone is painted */\n@property --alea-lens-blur-def { syntax: '*'; inherits: false; }\n[data-alea-lensed] { --alea-lens: var(--alea-lens-def); --alea-lens-blur: var(--alea-lens-blur-def); }\nhtml[data-alea-scrolling] [data-alea-lensed] { --alea-lens: initial; --alea-lens-blur: initial; }\n/* Chromium bends the backdrop at the edge of each glass surface: the ThemeProvider's lens manager sets --alea-lens\n (an SVG lens for that surface's size) and a lighter blur; elsewhere the variables are unset and the frost stays. */\n[data-preset='glass'], [data-preset='glass'] [data-theme='dark'] { --alea-glass-tint-dense: color-mix(in srgb, #1c1c1e 74%, transparent); }\n[data-preset='glass'][data-theme='light'], [data-preset='glass'] [data-theme='light'] { --alea-glass-tint-dense: color-mix(in srgb, #ffffff 84%, transparent); --alea-glass-tint: color-mix(in srgb, #ffffff 54%, transparent); --alea-glass-rim: inset 0 1px 0 #ffffffe6, inset 0 0 0 1px color-mix(in srgb, #1d1d1f 12%, transparent), inset 0 -1px 0 color-mix(in srgb, #000000 6%, transparent); }\n/* overlays sit on top of content (text, other panels), so their glass is dense enough to read through */\n:is([data-preset='glass'], [data-surface='glass']) :is(.alea-popover, .alea-modal, .alea-command, .alea-hovercard, .alea-menu, .alea-toast, .alea-drawer) { background-color: var(--alea-glass-tint-dense, var(--alea-glass-tint)); }\n/* long bars and wide surfaces keep the frost without the lens (it scales with width and would smear) */\n[data-preset='glass'] :is(.alea-navbar, .alea-bottomnav, .alea-drawer, .alea-table-wrap) { -webkit-backdrop-filter: blur(var(--alea-glass-blur)) saturate(var(--alea-glass-saturate)); backdrop-filter: blur(var(--alea-glass-blur)) saturate(var(--alea-glass-saturate)); }\n/* Liquid glass: in the glass look the controls are glass too, not flat fills. A see-through fill with blur,\n light catching the top left edge, a softer lower edge and a faint inner glow; the primary action is tinted glass. */\n[data-preset='glass'] {\n --alea-lg-fill: color-mix(in srgb, #ffffff 9%, transparent);\n --alea-lg-fill-hover: color-mix(in srgb, #ffffff 15%, transparent);\n --alea-lg-rim: inset 1px 1px 0 color-mix(in srgb, #ffffff 42%, transparent), inset -1px -1px 0 color-mix(in srgb, #ffffff 10%, transparent), inset 0 0 0 1px color-mix(in srgb, #ffffff 10%, transparent), inset 0 0 14px color-mix(in srgb, #ffffff 6%, transparent);\n --alea-lg-drop: 0 8px 22px -12px rgb(0 0 0 / 0.5);\n --alea-lg-tint: 74%;\n}\n/* a dark area inside a light page (a dark preview on the docs, a dark card) keeps the dark glass: the light values below are for light areas only */\n[data-preset='glass'] [data-theme='dark'] {\n --alea-lg-fill: color-mix(in srgb, #ffffff 9%, transparent);\n --alea-lg-fill-hover: color-mix(in srgb, #ffffff 15%, transparent);\n --alea-lg-rim: inset 1px 1px 0 color-mix(in srgb, #ffffff 42%, transparent), inset -1px -1px 0 color-mix(in srgb, #ffffff 10%, transparent), inset 0 0 0 1px color-mix(in srgb, #ffffff 10%, transparent), inset 0 0 14px color-mix(in srgb, #ffffff 6%, transparent);\n --alea-lg-drop: 0 8px 22px -12px rgb(0 0 0 / 0.5);\n --alea-lg-tint: 74%;\n}\n[data-preset='glass'][data-theme='light'], [data-preset='glass'] [data-theme='light'] {\n /* light glass needs an edge: a denser fill, a 3:1 hairline (1.4.11) and a real shadow, or controls vanish on a white page */\n --alea-lg-fill: color-mix(in srgb, #ffffff 50%, transparent);\n --alea-lg-fill-hover: color-mix(in srgb, #ffffff 66%, transparent);\n --alea-lg-rim: inset 1px 1px 0 #ffffff, inset -1px -1px 0 color-mix(in srgb, #ffffff 70%, transparent), inset 0 0 0 1px var(--alea-border-control), inset 0 -10px 18px color-mix(in srgb, #ffffff 40%, transparent);\n --alea-lg-drop: 0 6px 18px -10px rgb(0 0 0 / 0.28), 0 1px 2px rgb(0 0 0 / 0.08);\n --alea-lg-tint: 80%;\n}\n[data-preset='glass'] :is(.alea-button[data-variant='secondary'], .alea-icon-button[data-variant='secondary'], .alea-input-wrap, .alea-select-trigger, .alea-segmented, .alea-tag, .alea-switch-track, .alea-toggle-button, .alea-bottomnav, .alea-tab-list[data-variant='pills']) {\n background-color: var(--alea-lg-fill);\n -webkit-backdrop-filter: blur(var(--alea-lens-blur, 18px)) var(--alea-lens, ) saturate(180%);\n backdrop-filter: blur(var(--alea-lens-blur, 18px)) var(--alea-lens, ) saturate(180%);\n box-shadow: var(--alea-lg-rim), var(--alea-lg-drop);\n}\n[data-preset='glass'] :is(.alea-button[data-variant='secondary'], .alea-icon-button[data-variant='secondary'], .alea-select-trigger, .alea-tag, .alea-toggle-button)[data-hovered] { background-color: var(--alea-lg-fill-hover); }\n/* glass hover: brighter glass, a light rim and the accent's glow under it */\n[data-preset='glass'] :is(.alea-button[data-variant='secondary'], .alea-icon-button[data-variant='secondary'])[data-hovered] { box-shadow: var(--alea-lg-rim), inset 0 0 0 1px color-mix(in srgb, #ffffff 22%, transparent), 0 12px 28px -12px color-mix(in srgb, var(--alea-accent) 60%, transparent); }\n[data-preset='glass'] .alea-button[data-variant='primary']:not([data-tone='danger'])[data-hovered] { background: linear-gradient(160deg, color-mix(in srgb, #ffffff 30%, transparent), transparent 55%), color-mix(in srgb, var(--alea-accent-solid, var(--alea-accent)) calc(var(--alea-lg-tint) + 8%), transparent); box-shadow: inset 1px 1px 0 color-mix(in srgb, #ffffff 60%, transparent), inset -1px -1px 0 color-mix(in srgb, #ffffff 18%, transparent), 0 16px 34px -12px color-mix(in srgb, var(--alea-accent) 85%, transparent); }\n/* text on clear glass is the theme's text, not the chip's (the chip was a solid light pill) */\n[data-preset='glass'] :is(.alea-button[data-variant='secondary'], .alea-icon-button[data-variant='secondary']) { color: var(--alea-text); }\n[data-preset='glass'] .alea-input-wrap:focus-within { box-shadow: var(--alea-lg-rim), inset 0 0 0 1px var(--alea-focus), 0 0 0 4px var(--alea-focus-halo); }\n[data-preset='glass'] .alea-button[data-variant='primary']:not([data-tone='danger']) {\n background: linear-gradient(160deg, color-mix(in srgb, #ffffff 22%, transparent), transparent 55%), color-mix(in srgb, var(--alea-accent-solid, var(--alea-accent)) var(--alea-lg-tint), transparent);\n -webkit-backdrop-filter: blur(var(--alea-lens-blur, 18px)) var(--alea-lens, ) saturate(200%);\n backdrop-filter: blur(var(--alea-lens-blur, 18px)) var(--alea-lens, ) saturate(200%);\n box-shadow: inset 1px 1px 0 color-mix(in srgb, #ffffff 50%, transparent), inset -1px -1px 0 color-mix(in srgb, #ffffff 14%, transparent), 0 10px 26px -12px color-mix(in srgb, var(--alea-accent) 70%, transparent);\n}\n/* every current or selected surface is glass as well: the sidebar's current link, a nav item, a tab bar, an accordion\n panel, a collapsible, a tag; nothing stays a flat or solid block inside a glass page */\n[data-preset='glass'] :is(.alea-sidenav-link[aria-current='page'], .alea-navitem[aria-current='page'], .alea-vnav-item[data-current], .alea-navmenu-item[data-current], .alea-navmenu-item[aria-current='page'], .alea-accordion-item, .alea-accordion[data-variant='filled'] .alea-accordion-item, .alea-tab-list[data-variant='segment'], .alea-badge[data-appearance='soft'], .alea-chip) {\n background-color: var(--alea-lg-fill);\n -webkit-backdrop-filter: blur(var(--alea-lens-blur, 18px)) saturate(180%);\n backdrop-filter: blur(var(--alea-lens-blur, 18px)) saturate(180%);\n box-shadow: var(--alea-lg-rim);\n}\n[data-preset='glass'] :is(.alea-sidenav-link[aria-current='page'], .alea-navitem[aria-current='page']) { color: var(--alea-text); }\n[data-preset='glass'] .alea-accordion[data-variant='joined'] .alea-accordion-item, [data-preset='glass'] .alea-accordion[data-variant='ghost'] .alea-accordion-item { background-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }\n/* controls that are known by their outline keep it (3:1 against what is behind): an off switch, a field, a select */\n[data-preset='glass'] :is(.alea-switch:not([data-selected]) .alea-switch-track, .alea-input-wrap, .alea-select-trigger) { box-shadow: var(--alea-lg-rim), inset 0 0 0 1px var(--alea-border-control), var(--alea-lg-drop); }\n[data-preset='glass'] .alea-switch[data-selected] .alea-switch-track { background-color: color-mix(in srgb, var(--alea-accent) var(--alea-lg-tint), transparent); }\n@media (prefers-reduced-transparency: reduce) {\n [data-preset='glass'] { --alea-lg-fill: var(--alea-surface-raised); --alea-lg-fill-hover: var(--alea-surface-hover); --alea-lg-tint: 100%; }\n}\n:is([data-contrast='more']:is([data-preset='glass']), [data-contrast='more'] [data-preset='glass']) { --alea-lg-fill: var(--alea-surface-raised); --alea-lg-fill-hover: var(--alea-surface-hover); --alea-lg-tint: 100%; }\n\n/* the hover glow follows each look's accent (the token is Fun Lab's purple) */\n/* every look and every brand accent: declared wherever an accent can be set (the root, a look, a themed area) */\n:root, [data-preset], [data-theme] { --alea-shadow-glow: 0 10px 30px -10px color-mix(in srgb, var(--alea-accent) 55%, transparent); }\n[data-preset='graphite'] { --alea-shadow-glow: 0 10px 30px -12px color-mix(in srgb, var(--alea-text) 22%, transparent); }\n\n/* the background orbs take each preset's colors: vivid blue and violet for glass (stronger, so the glass has something to blur) */\n[data-preset='glass'] .alea-orbs { --alea-orb-1: rgba(10, 132, 255, 0.34); --alea-orb-2: rgba(48, 209, 88, 0.12); --alea-orb-3: rgba(191, 90, 242, 0.28); }\n[data-preset='glass'][data-theme='light'] .alea-orbs, [data-preset='glass'] [data-theme='light'] .alea-orbs { --alea-orb-1: rgba(0, 113, 227, 0.24); --alea-orb-2: rgba(48, 209, 88, 0.1); --alea-orb-3: rgba(168, 85, 247, 0.2); }\n/* glass background: light through a curtain. Two wide, soft diagonal bands (blue, violet) and a faint third on an almost plain\n ground: color for the glass to bend, no lines to compete with the content */\n[data-preset='glass'] .alea-orbs { --alea-glass-scene: linear-gradient(118deg, transparent 8%, color-mix(in srgb, #3b82f6 34%, transparent) 22%, transparent 38%), linear-gradient(118deg, transparent 46%, color-mix(in srgb, #8b5cf6 30%, transparent) 60%, transparent 76%), linear-gradient(62deg, transparent 70%, color-mix(in srgb, #22d3ee 16%, transparent) 84%, transparent 96%); }\n[data-preset='glass'][data-theme='light'] .alea-orbs, [data-preset='glass'] [data-theme='light'] .alea-orbs { --alea-glass-scene: linear-gradient(118deg, transparent 8%, color-mix(in srgb, #60a5fa 30%, transparent) 22%, transparent 38%), linear-gradient(118deg, transparent 46%, color-mix(in srgb, #a78bfa 26%, transparent) 60%, transparent 76%), linear-gradient(62deg, transparent 70%, color-mix(in srgb, #67e8f9 18%, transparent) 84%, transparent 96%); }\n[data-preset='glass'] .alea-orb { display: none; }\n[data-preset='glass'] .alea-orbs::before { content: ''; position: absolute; inset: -6%; background: var(--alea-glass-scene); opacity: var(--alea-glass-scene-opacity, 1); will-change: transform; animation: alea-glass-drift 18s var(--alea-motion-ease-in-out) infinite alternate; }\n[data-preset='glass'][data-theme='light'] .alea-orbs::before, [data-preset='glass'] [data-theme='light'] .alea-orbs::before { opacity: var(--alea-glass-scene-opacity, 1); }\n/* the bands drift slowly sideways, so the glass above has light moving through it (transform only) */\n@keyframes alea-glass-drift { from { transform: translate3d(-3%, 0, 0); } to { transform: translate3d(3%, -1.5%, 0); } }\n[data-preset='glass'] .alea-orbs-grid { display: none; }\n@media (prefers-reduced-motion: reduce) { [data-preset='glass'] .alea-orbs::before { animation: none; } }\n/* graphite: no color in the background either, just silver light */\n[data-preset='graphite'] .alea-orbs { --alea-orb-1: rgba(255, 255, 255, 0.07); --alea-orb-2: rgba(210, 212, 220, 0.05); --alea-orb-3: rgba(170, 172, 180, 0.06); }\n[data-preset='graphite'][data-theme='light'] .alea-orbs, [data-preset='graphite'] [data-theme='light'] .alea-orbs { --alea-orb-1: rgba(17, 16, 17, 0.06); --alea-orb-2: rgba(120, 124, 135, 0.07); --alea-orb-3: rgba(60, 62, 70, 0.05); }\n[data-preset='midnight'] .alea-orbs { --alea-orb-1: rgba(94, 106, 210, 0.16); --alea-orb-2: rgba(78, 167, 252, 0.06); --alea-orb-3: rgba(94, 106, 210, 0.1); }\n\n/* ------------------------------------------------------------------ high contrast for the presets\n The base high contrast rules come before the presets, which would undo them: they are repeated here, with each preset's accent. */\n[data-contrast='more']:is([data-preset='midnight'][data-theme='dark'], [data-preset='midnight'] [data-theme='dark'], [data-theme='dark'] [data-preset='midnight']:not([data-theme])), [data-contrast='more'] :is([data-preset='midnight'][data-theme='dark'], [data-preset='midnight'] [data-theme='dark'], [data-theme='dark'] [data-preset='midnight']:not([data-theme])) { --alea-text: var(--alea-white); --alea-bg: var(--alea-gray-1000); --alea-text-muted: #f0f0f0; --alea-text-faint: #e0e0e0; --alea-border: color-mix(in srgb, var(--alea-white) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 80%, transparent); --alea-accent-strong: var(--alea-violet-250); --alea-accent-solid: var(--alea-blue-850); --alea-focus: var(--alea-violet-250); }\n@media (prefers-contrast: more) { :is([data-preset='midnight'][data-theme='dark'], [data-preset='midnight'] [data-theme='dark'], [data-theme='dark'] [data-preset='midnight']:not([data-theme])):not([data-contrast='normal']) { --alea-text: var(--alea-white); --alea-bg: var(--alea-gray-1000); --alea-text-muted: #f0f0f0; --alea-text-faint: #e0e0e0; --alea-border: color-mix(in srgb, var(--alea-white) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 80%, transparent); --alea-accent-strong: var(--alea-violet-250); --alea-accent-solid: var(--alea-blue-850); --alea-focus: var(--alea-violet-250); } }\n[data-contrast='more']:is([data-preset='midnight'][data-theme='light'], [data-preset='midnight'] [data-theme='light'], [data-theme='light'] [data-preset='midnight']:not([data-theme])), [data-contrast='more'] :is([data-preset='midnight'][data-theme='light'], [data-preset='midnight'] [data-theme='light'], [data-theme='light'] [data-preset='midnight']:not([data-theme])) { --alea-text: var(--alea-gray-1000); --alea-bg: var(--alea-white); --alea-text-muted: var(--alea-black); --alea-text-faint: #2a292a; --alea-border: color-mix(in srgb, var(--alea-black) 40%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-black) 60%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-black) 90.2%, transparent); --alea-accent-strong: var(--alea-midnight-1000); --alea-accent-solid: var(--alea-blue-850); --alea-focus: var(--alea-midnight-1000); }\n@media (prefers-contrast: more) { :is([data-preset='midnight'][data-theme='light'], [data-preset='midnight'] [data-theme='light'], [data-theme='light'] [data-preset='midnight']:not([data-theme])):not([data-contrast='normal']) { --alea-text: var(--alea-gray-1000); --alea-bg: var(--alea-white); --alea-text-muted: var(--alea-black); --alea-text-faint: #2a292a; --alea-border: color-mix(in srgb, var(--alea-black) 40%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-black) 60%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-black) 90.2%, transparent); --alea-accent-strong: var(--alea-midnight-1000); --alea-accent-solid: var(--alea-blue-850); --alea-focus: var(--alea-midnight-1000); } }\n[data-contrast='more']:is([data-preset='glass'][data-theme='dark'], [data-preset='glass'] [data-theme='dark'], [data-theme='dark'] [data-preset='glass']:not([data-theme])), [data-contrast='more'] :is([data-preset='glass'][data-theme='dark'], [data-preset='glass'] [data-theme='dark'], [data-theme='dark'] [data-preset='glass']:not([data-theme])) { --alea-text: var(--alea-white); --alea-bg: var(--alea-gray-1000); --alea-text-muted: #f0f0f0; --alea-text-faint: #e0e0e0; --alea-border: color-mix(in srgb, var(--alea-white) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 80%, transparent); --alea-accent-strong: var(--alea-blue-250); --alea-accent-solid: var(--alea-glass-700); --alea-focus: var(--alea-blue-250); --alea-button-top: var(--alea-glass-550); --alea-button-bottom: var(--alea-glass-850); --alea-gradient-button: linear-gradient(180deg, #0058c2 0%, #004a9e 100%); }\n@media (prefers-contrast: more) { :is([data-preset='glass'][data-theme='dark'], [data-preset='glass'] [data-theme='dark'], [data-theme='dark'] [data-preset='glass']:not([data-theme])):not([data-contrast='normal']) { --alea-text: var(--alea-white); --alea-bg: var(--alea-gray-1000); --alea-text-muted: #f0f0f0; --alea-text-faint: #e0e0e0; --alea-border: color-mix(in srgb, var(--alea-white) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 80%, transparent); --alea-accent-strong: var(--alea-blue-250); --alea-accent-solid: var(--alea-glass-700); --alea-focus: var(--alea-blue-250); --alea-button-top: var(--alea-glass-550); --alea-button-bottom: var(--alea-glass-850); --alea-gradient-button: linear-gradient(180deg, #0058c2 0%, #004a9e 100%); } }\n[data-contrast='more']:is([data-preset='glass'][data-theme='light'], [data-preset='glass'] [data-theme='light'], [data-theme='light'] [data-preset='glass']:not([data-theme])), [data-contrast='more'] :is([data-preset='glass'][data-theme='light'], [data-preset='glass'] [data-theme='light'], [data-theme='light'] [data-preset='glass']:not([data-theme])) { --alea-text: var(--alea-gray-1000); --alea-bg: var(--alea-white); --alea-text-muted: var(--alea-black); --alea-text-faint: #2a292a; --alea-border: color-mix(in srgb, var(--alea-black) 40%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-black) 60%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-black) 90.2%, transparent); --alea-accent-strong: var(--alea-glass-1000); --alea-accent-solid: var(--alea-glass-700); --alea-focus: var(--alea-glass-1000); --alea-status-danger: var(--alea-red-900); --alea-button-top: var(--alea-glass-550); --alea-button-bottom: var(--alea-glass-850); --alea-gradient-button: linear-gradient(180deg, #0058c2 0%, #004a9e 100%); }\n@media (prefers-contrast: more) { :is([data-preset='glass'][data-theme='light'], [data-preset='glass'] [data-theme='light'], [data-theme='light'] [data-preset='glass']:not([data-theme])):not([data-contrast='normal']) { --alea-text: var(--alea-gray-1000); --alea-bg: var(--alea-white); --alea-text-muted: var(--alea-black); --alea-text-faint: #2a292a; --alea-border: color-mix(in srgb, var(--alea-black) 40%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-black) 60%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-black) 90.2%, transparent); --alea-accent-strong: var(--alea-glass-1000); --alea-accent-solid: var(--alea-glass-700); --alea-focus: var(--alea-glass-1000); --alea-status-danger: var(--alea-red-900); --alea-button-top: var(--alea-glass-550); --alea-button-bottom: var(--alea-glass-850); --alea-gradient-button: linear-gradient(180deg, #0058c2 0%, #004a9e 100%); } }\n[data-contrast='more']:is([data-preset='graphite'][data-theme='dark'], [data-preset='graphite'] [data-theme='dark'], [data-theme='dark'] [data-preset='graphite']:not([data-theme])), [data-contrast='more'] :is([data-preset='graphite'][data-theme='dark'], [data-preset='graphite'] [data-theme='dark'], [data-theme='dark'] [data-preset='graphite']:not([data-theme])) { --alea-text: var(--alea-white); --alea-bg: var(--alea-gray-1000); --alea-text-muted: #f0f0f0; --alea-text-faint: #e0e0e0; --alea-border: color-mix(in srgb, var(--alea-white) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 80%, transparent); --alea-accent-solid: var(--alea-gray-350); }\n@media (prefers-contrast: more) { :is([data-preset='graphite'][data-theme='dark'], [data-preset='graphite'] [data-theme='dark'], [data-theme='dark'] [data-preset='graphite']:not([data-theme])):not([data-contrast='normal']) { --alea-text: var(--alea-white); --alea-bg: var(--alea-gray-1000); --alea-text-muted: #f0f0f0; --alea-text-faint: #e0e0e0; --alea-border: color-mix(in srgb, var(--alea-white) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 80%, transparent); --alea-accent-solid: var(--alea-gray-350); } }\n[data-contrast='more']:is([data-preset='graphite'][data-theme='light'], [data-preset='graphite'] [data-theme='light'], [data-theme='light'] [data-preset='graphite']:not([data-theme])), [data-contrast='more'] :is([data-preset='graphite'][data-theme='light'], [data-preset='graphite'] [data-theme='light'], [data-theme='light'] [data-preset='graphite']:not([data-theme])) { --alea-text: var(--alea-gray-1000); --alea-bg: var(--alea-white); --alea-text-muted: var(--alea-black); --alea-text-faint: #2a292a; --alea-border: color-mix(in srgb, var(--alea-black) 40%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-black) 60%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-black) 90.2%, transparent); --alea-accent-solid: var(--alea-gray-900); }\n@media (prefers-contrast: more) { :is([data-preset='graphite'][data-theme='light'], [data-preset='graphite'] [data-theme='light'], [data-theme='light'] [data-preset='graphite']:not([data-theme])):not([data-contrast='normal']) { --alea-text: var(--alea-gray-1000); --alea-bg: var(--alea-white); --alea-text-muted: var(--alea-black); --alea-text-faint: #2a292a; --alea-border: color-mix(in srgb, var(--alea-black) 40%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-black) 60%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-black) 90.2%, transparent); --alea-accent-solid: var(--alea-gray-900); } }\n\n/* A plain background (background=\"plain\" or data-background=\"plain\"): no orbs or aurora, in any look */\n[data-background='plain'] :is(.alea-orbs, .alea-aurora), :is(.alea-orbs, .alea-aurora)[data-background='plain'] { display: none; }\n/* High contrast, in every look: opaque glass */\n:is([data-contrast='more']:is([data-preset='glass'], [data-surface='glass']), [data-contrast='more'] :is([data-preset='glass'], [data-surface='glass'])) :is(.alea-card, .alea-popover, .alea-modal, .alea-drawer, .alea-toast, .alea-navbar, .alea-command, .alea-hovercard, .alea-bottomnav) {\n background-color: var(--alea-surface); -webkit-backdrop-filter: none; backdrop-filter: none;\n}\n@media (prefers-contrast: more) {\n :root:not([data-contrast='normal']):is([data-preset='glass']) :is(.alea-card, .alea-popover, .alea-modal, .alea-drawer, .alea-toast, .alea-navbar, .alea-command, .alea-hovercard, .alea-bottomnav),\n :root:not([data-contrast='normal']) [data-preset='glass'] :is(.alea-card, .alea-popover, .alea-modal, .alea-drawer, .alea-toast, .alea-navbar, .alea-command, .alea-hovercard, .alea-bottomnav) { background-color: var(--alea-surface); -webkit-backdrop-filter: none; backdrop-filter: none; }\n}\n/* no liquid edge when the device asks for less transparency or more contrast (the inline lens variables lose to these) */\n@media (prefers-reduced-transparency: reduce) { [data-preset='glass'] *, [data-surface='glass'] * { --alea-lens: initial !important; --alea-lens-blur: initial !important; } }\n@media (prefers-contrast: more) { :root:not([data-contrast='normal']) :is([data-preset='glass'], [data-surface='glass']) * { --alea-lens: initial !important; --alea-lens-blur: initial !important; } }\n:is([data-contrast='more']:is([data-preset='glass'], [data-surface='glass']), [data-contrast='more'] :is([data-preset='glass'], [data-surface='glass'])) * { --alea-lens: initial !important; --alea-lens-blur: initial !important; }\n\n/* Glass only reads as glass with something behind it. Pages that have no orbs (templates, previews, apps) get a soft\n colour scene on the body, fixed, so every frosted surface shows a hint of it instead of flat white or flat black. */\n[data-preset='glass'][data-theme='light'] body { background-image: radial-gradient(55% 45% at 12% 8%, color-mix(in srgb, #60a5fa 26%, transparent), transparent 70%), radial-gradient(45% 40% at 88% 92%, color-mix(in srgb, #a78bfa 22%, transparent), transparent 70%), radial-gradient(35% 30% at 70% 20%, color-mix(in srgb, #34d399 14%, transparent), transparent 70%); background-attachment: fixed; }\n[data-preset='glass'][data-theme='dark'] body { background-image: radial-gradient(55% 45% at 12% 8%, color-mix(in srgb, #3b82f6 18%, transparent), transparent 70%), radial-gradient(45% 40% at 88% 92%, color-mix(in srgb, #8b5cf6 16%, transparent), transparent 70%); background-attachment: fixed; }\n/* Surfaces that were still solid in the glass look: separated and grid list items, the calendar grid, native selects */\n[data-preset='glass'] :is(.alea-list[data-variant='joined'], .alea-list[data-variant='separated'] .alea-list-item, .alea-list[data-layout='grid'] .alea-list-item, .alea-calview-grid, .alea-native-select) { background-color: var(--alea-glass-tint); }\n/* Page wrappers paint the page colour in the other looks; in glass they stay clear so the scene behind shows through every surface */\n[data-preset='glass'] :is(.alea-shell, .alea-b-page, .alea-b-auth-page) { background-color: transparent; }\n\n/* ------------------------------------------------------------------ ember, solar, moss: one hue each (red, yellow, green), the same tokens */\n/* Ember */\n[data-preset='ember'][data-theme='dark'], [data-preset='ember'] [data-theme='dark'], [data-theme='dark'] [data-preset='ember']:not([data-theme]) {\n --alea-bg: var(--alea-warm-gray-800); --alea-bg-deep: #100c0b;\n --alea-surface: var(--alea-warm-gray-600); --alea-surface-deep: var(--alea-warm-gray-950); --alea-surface-raised: #2a1f1d; --alea-surface-hover: #2d2120;\n --alea-border: color-mix(in srgb, var(--alea-white) 7.84%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 14.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 30.2%, transparent);\n --alea-text: var(--alea-warm-gray-200); --alea-text-soft: #f3ebe7; --alea-text-muted: var(--alea-warm-gray-250); --alea-text-faint: #a89892;\n --alea-accent: var(--alea-red-450); --alea-accent-strong: var(--alea-red-350); --alea-accent-second: #f59e0b; --alea-accent-third: var(--alea-warm-gray-250);\n --alea-accent-subtle: color-mix(in srgb, var(--alea-red-450) 18.04%, transparent); --alea-accent-on: var(--alea-white); --alea-accent-solid: var(--alea-red-550);\n --alea-focus: var(--alea-red-350); --alea-focus-halo: color-mix(in srgb, var(--alea-red-450) 27.84%, transparent);\n --alea-chip-bg: var(--alea-warm-gray-200); --alea-chip-text: var(--alea-warm-gray-800);\n --alea-button-ring: color-mix(in srgb, var(--alea-red-550) 25.1%, transparent); --alea-button-top: #f4654f; --alea-button-bottom: #c62d22; --alea-button-text: var(--alea-white);\n --alea-field-bg: var(--alea-warm-gray-950);\n --alea-gradient-accent: radial-gradient(100% 100% at 25% 100%, #dc3b2f 0%, #ff9b6a 100%);\n --alea-gradient-accent-linear: linear-gradient(120deg, #dc3b2f 0%, #f59e0b 100%);\n --alea-gradient-text: var(--alea-gradient-accent); --alea-gradient-text-linear: var(--alea-gradient-accent-linear);\n --alea-gradient-button: linear-gradient(180deg, #f4654f 0%, #c62d22 100%);\n --alea-shadow-card: inset 0 0 0 1px color-mix(in srgb, var(--alea-white) 5.88%, transparent), 0 1px 0 0 color-mix(in srgb, var(--alea-white) 3.14%, transparent) inset, 0 12px 32px -20px color-mix(in srgb, var(--alea-gray-1000) 80%, transparent);\n --alea-shadow-pop: 0 20px 48px -16px color-mix(in srgb, var(--alea-gray-1000) 90.2%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--alea-white) 9.02%, transparent);\n}\n[data-preset='ember'][data-theme='light'], [data-preset='ember'] [data-theme='light'], [data-theme='light'] [data-preset='ember']:not([data-theme]) {\n --alea-bg: var(--alea-warm-gray-150); --alea-bg-deep: #f3ebe6;\n --alea-surface: var(--alea-white); --alea-surface-deep: #f7efea; --alea-surface-raised: #f0e4de; --alea-surface-hover: #faf3ef;\n --alea-border: color-mix(in srgb, var(--alea-warm-gray-450) 7.84%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-warm-gray-450) 14.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-warm-gray-450) 32.16%, transparent);\n --alea-text: var(--alea-warm-gray-750); --alea-text-soft: #2e1d19; --alea-text-muted: #6b5750; --alea-text-faint: #74605a;\n --alea-accent: var(--alea-ember-0); --alea-accent-strong: var(--alea-ember-1000); --alea-accent-second: #d97706; --alea-accent-third: #8c7a74;\n --alea-accent-subtle: color-mix(in srgb, var(--alea-ember-0) 12.16%, transparent); --alea-accent-on: var(--alea-white); --alea-accent-solid: var(--alea-ember-0);\n --alea-focus: var(--alea-ember-0); --alea-focus-halo: color-mix(in srgb, var(--alea-ember-0) 20%, transparent);\n --alea-chip-bg: var(--alea-warm-gray-750); --alea-chip-text: var(--alea-warm-gray-150);\n --alea-button-ring: color-mix(in srgb, var(--alea-ember-0) 20%, transparent); --alea-button-top: #ea5a46; --alea-button-bottom: #c22f21; --alea-button-text: var(--alea-white);\n --alea-field-bg: var(--alea-white);\n --alea-gradient-accent: radial-gradient(100% 100% at 25% 100%, #d93b2b 0%, #f59e0b 100%);\n --alea-gradient-accent-linear: linear-gradient(120deg, #d93b2b 0%, #d97706 100%);\n --alea-gradient-text: radial-gradient(100% 100% at 25% 100%, #d93b2b 0%, #cc6a05 100%); --alea-gradient-text-linear: linear-gradient(120deg, #d93b2b 0%, #cc6a05 100%);\n --alea-gradient-button: linear-gradient(180deg, #ea5a46 0%, #c22f21 100%);\n --alea-shadow-card: inset 0 0 0 1px color-mix(in srgb, var(--alea-warm-gray-450) 7.84%, transparent), 0 8px 24px -18px color-mix(in srgb, var(--alea-warm-gray-450) 20%, transparent);\n --alea-shadow-pop: 0 20px 48px -20px color-mix(in srgb, var(--alea-warm-gray-450) 25.1%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--alea-warm-gray-450) 7.84%, transparent);\n}\n[data-preset='ember'] .alea-orbs { --alea-orb-1: rgba(240, 86, 74, 0.2); --alea-orb-2: rgba(245, 158, 11, 0.12); --alea-orb-3: rgba(255, 125, 114, 0.1); }\n[data-preset='ember'][data-theme='light'] .alea-orbs, [data-preset='ember'] [data-theme='light'] .alea-orbs { --alea-orb-1: rgba(217, 59, 43, 0.14); --alea-orb-2: rgba(217, 119, 6, 0.1); --alea-orb-3: rgba(240, 86, 74, 0.08); }\n[data-contrast='more']:is([data-preset='ember'][data-theme='dark'], [data-preset='ember'] [data-theme='dark'], [data-theme='dark'] [data-preset='ember']:not([data-theme])), [data-contrast='more'] :is([data-preset='ember'][data-theme='dark'], [data-preset='ember'] [data-theme='dark'], [data-theme='dark'] [data-preset='ember']:not([data-theme])) { --alea-text: var(--alea-white); --alea-bg: var(--alea-gray-1000); --alea-text-muted: #f0f0f0; --alea-text-faint: #e0e0e0; --alea-border: color-mix(in srgb, var(--alea-white) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 80%, transparent); --alea-accent-solid: var(--alea-red-350); --alea-accent-strong: #ffa59c; --alea-accent-subtle: #ff7d7217; }\n@media (prefers-contrast: more) { :is([data-preset='ember'][data-theme='dark'], [data-preset='ember'] [data-theme='dark'], [data-theme='dark'] [data-preset='ember']:not([data-theme])):not([data-contrast='normal']) { --alea-text: var(--alea-white); --alea-bg: var(--alea-gray-1000); --alea-text-muted: #f0f0f0; --alea-text-faint: #e0e0e0; --alea-border: color-mix(in srgb, var(--alea-white) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 80%, transparent); --alea-accent-solid: var(--alea-red-350); --alea-accent-strong: #ffa59c; --alea-accent-subtle: #ff7d7217; } }\n[data-contrast='more']:is([data-preset='ember'][data-theme='light'], [data-preset='ember'] [data-theme='light'], [data-theme='light'] [data-preset='ember']:not([data-theme])), [data-contrast='more'] :is([data-preset='ember'][data-theme='light'], [data-preset='ember'] [data-theme='light'], [data-theme='light'] [data-preset='ember']:not([data-theme])) { --alea-text: var(--alea-gray-1000); --alea-bg: var(--alea-white); --alea-text-muted: var(--alea-black); --alea-text-faint: #222222; --alea-border: color-mix(in srgb, var(--alea-gray-1000) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-gray-1000) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-gray-1000) 80%, transparent); --alea-accent-solid: #8f2015; --alea-accent: #8f2015; --alea-accent-strong: #8f2015; }\n@media (prefers-contrast: more) { :is([data-preset='ember'][data-theme='light'], [data-preset='ember'] [data-theme='light'], [data-theme='light'] [data-preset='ember']:not([data-theme])):not([data-contrast='normal']) { --alea-text: var(--alea-gray-1000); --alea-bg: var(--alea-white); --alea-text-muted: var(--alea-black); --alea-text-faint: #222222; --alea-border: color-mix(in srgb, var(--alea-gray-1000) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-gray-1000) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-gray-1000) 80%, transparent); --alea-accent-solid: #8f2015; --alea-accent: #8f2015; --alea-accent-strong: #8f2015; } }\n/* Solar */\n[data-preset='solar'][data-theme='dark'], [data-preset='solar'] [data-theme='dark'], [data-theme='dark'] [data-preset='solar']:not([data-theme]) {\n --alea-bg: var(--alea-warm-gray-850); --alea-bg-deep: #0e0d05;\n --alea-surface: var(--alea-warm-gray-550); --alea-surface-deep: var(--alea-warm-gray-1000); --alea-surface-raised: #27240f; --alea-surface-hover: #2b2811;\n --alea-border: color-mix(in srgb, var(--alea-white) 7.84%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 14.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 30.2%, transparent);\n --alea-text: var(--alea-warm-gray-50); --alea-text-soft: #f3efdd; --alea-text-muted: var(--alea-amber-350); --alea-text-faint: #a8a189;\n --alea-accent: var(--alea-solar-0); --alea-accent-strong: var(--alea-yellow-150); --alea-accent-second: #fb923c; --alea-accent-third: var(--alea-amber-350);\n --alea-accent-subtle: color-mix(in srgb, var(--alea-solar-0) 16.08%, transparent); --alea-accent-on: var(--alea-warm-gray-850); --alea-accent-solid: var(--alea-solar-0);\n --alea-focus: var(--alea-yellow-150); --alea-focus-halo: color-mix(in srgb, var(--alea-solar-0) 27.84%, transparent);\n --alea-chip-bg: var(--alea-warm-gray-50); --alea-chip-text: var(--alea-warm-gray-850);\n --alea-button-ring: color-mix(in srgb, var(--alea-solar-0) 25.1%, transparent); --alea-button-top: var(--alea-yellow-250); --alea-button-bottom: #e0a800; --alea-button-text: var(--alea-warm-gray-850);\n --alea-field-bg: var(--alea-warm-gray-1000);\n --alea-gradient-accent: radial-gradient(100% 100% at 25% 100%, #f5b800 0%, #ff8a3d 100%);\n --alea-gradient-accent-linear: linear-gradient(120deg, #f5b800 0%, #fb923c 100%);\n --alea-gradient-text: var(--alea-gradient-accent); --alea-gradient-text-linear: var(--alea-gradient-accent-linear);\n --alea-gradient-button: linear-gradient(180deg, #ffcc33 0%, #e0a800 100%);\n --alea-shadow-card: inset 0 0 0 1px color-mix(in srgb, var(--alea-white) 5.88%, transparent), 0 1px 0 0 color-mix(in srgb, var(--alea-white) 3.14%, transparent) inset, 0 12px 32px -20px color-mix(in srgb, var(--alea-gray-1000) 80%, transparent);\n --alea-shadow-pop: 0 20px 48px -16px color-mix(in srgb, var(--alea-gray-1000) 90.2%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--alea-white) 9.02%, transparent);\n}\n[data-preset='solar'][data-theme='light'], [data-preset='solar'] [data-theme='light'], [data-theme='light'] [data-preset='solar']:not([data-theme]) {\n --alea-bg: var(--alea-warm-gray-0); --alea-bg-deep: #f8f2dc;\n --alea-surface: var(--alea-white); --alea-surface-deep: #fbf6e4; --alea-surface-raised: #f3ecd3; --alea-surface-hover: #fdf9ea;\n --alea-border: color-mix(in srgb, var(--alea-warm-gray-400) 7.84%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-warm-gray-400) 14.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-warm-gray-400) 32.16%, transparent);\n --alea-text: var(--alea-warm-gray-650); --alea-text-soft: #2b2509; --alea-text-muted: #6b6238; --alea-text-faint: #756c45;\n --alea-accent: var(--alea-amber-650); --alea-accent-strong: #6f4d00; --alea-accent-second: #b45309; --alea-accent-third: #7a7152;\n --alea-accent-subtle: color-mix(in srgb, var(--alea-solar-0) 16.86%, transparent); --alea-accent-on: var(--alea-warm-gray-650); --alea-accent-solid: var(--alea-solar-0);\n --alea-focus: var(--alea-amber-650); --alea-focus-halo: color-mix(in srgb, var(--alea-amber-650) 20%, transparent);\n --alea-chip-bg: var(--alea-warm-gray-650); --alea-chip-text: var(--alea-warm-gray-0);\n --alea-button-ring: color-mix(in srgb, var(--alea-amber-650) 20%, transparent); --alea-button-top: var(--alea-yellow-250); --alea-button-bottom: #e6a700; --alea-button-text: var(--alea-warm-gray-650);\n --alea-field-bg: var(--alea-white);\n --alea-gradient-accent: radial-gradient(100% 100% at 25% 100%, #f5b800 0%, #ff8a3d 100%);\n --alea-gradient-accent-linear: linear-gradient(120deg, #8f6300 0%, #b45309 100%);\n --alea-gradient-text: radial-gradient(100% 100% at 25% 100%, #8f6300 0%, #b45309 100%); --alea-gradient-text-linear: var(--alea-gradient-accent-linear);\n --alea-gradient-button: linear-gradient(180deg, #ffcc33 0%, #e6a700 100%);\n --alea-shadow-card: inset 0 0 0 1px color-mix(in srgb, var(--alea-warm-gray-400) 7.84%, transparent), 0 8px 24px -18px color-mix(in srgb, var(--alea-warm-gray-400) 20%, transparent);\n --alea-shadow-pop: 0 20px 48px -20px color-mix(in srgb, var(--alea-warm-gray-400) 25.1%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--alea-warm-gray-400) 7.84%, transparent);\n}\n[data-preset='solar'] { --alea-font-family-display: var(--alea-font-family-body); }\n[data-preset='solar'] .alea-heading[data-family='serif'] { font-weight: var(--alea-font-weight-semibold); letter-spacing: -0.02em; }\n[data-preset='solar'] .alea-orbs { --alea-orb-1: rgba(245, 184, 0, 0.2); --alea-orb-2: rgba(251, 146, 60, 0.1); --alea-orb-3: rgba(255, 210, 63, 0.08); }\n[data-preset='solar'][data-theme='light'] .alea-orbs, [data-preset='solar'] [data-theme='light'] .alea-orbs { --alea-orb-1: rgba(245, 184, 0, 0.18); --alea-orb-2: rgba(217, 119, 6, 0.1); --alea-orb-3: rgba(255, 204, 51, 0.1); }\n[data-contrast='more']:is([data-preset='solar'][data-theme='dark'], [data-preset='solar'] [data-theme='dark'], [data-theme='dark'] [data-preset='solar']:not([data-theme])), [data-contrast='more'] :is([data-preset='solar'][data-theme='dark'], [data-preset='solar'] [data-theme='dark'], [data-theme='dark'] [data-preset='solar']:not([data-theme])) { --alea-text: var(--alea-white); --alea-bg: var(--alea-gray-1000); --alea-text-muted: #f0f0f0; --alea-text-faint: #e0e0e0; --alea-border: color-mix(in srgb, var(--alea-white) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 80%, transparent); --alea-accent-solid: var(--alea-yellow-150); --alea-accent-strong: var(--alea-yellow-150); }\n@media (prefers-contrast: more) { :is([data-preset='solar'][data-theme='dark'], [data-preset='solar'] [data-theme='dark'], [data-theme='dark'] [data-preset='solar']:not([data-theme])):not([data-contrast='normal']) { --alea-text: var(--alea-white); --alea-bg: var(--alea-gray-1000); --alea-text-muted: #f0f0f0; --alea-text-faint: #e0e0e0; --alea-border: color-mix(in srgb, var(--alea-white) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 80%, transparent); --alea-accent-solid: var(--alea-yellow-150); --alea-accent-strong: var(--alea-yellow-150); } }\n[data-contrast='more']:is([data-preset='solar'][data-theme='light'], [data-preset='solar'] [data-theme='light'], [data-theme='light'] [data-preset='solar']:not([data-theme])), [data-contrast='more'] :is([data-preset='solar'][data-theme='light'], [data-preset='solar'] [data-theme='light'], [data-theme='light'] [data-preset='solar']:not([data-theme])) { --alea-text: var(--alea-gray-1000); --alea-bg: var(--alea-white); --alea-text-muted: var(--alea-black); --alea-text-faint: #222222; --alea-border: color-mix(in srgb, var(--alea-gray-1000) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-gray-1000) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-gray-1000) 80%, transparent); --alea-accent-solid: #6b4a00; --alea-accent: #6b4a00; --alea-accent-strong: #6b4a00; }\n@media (prefers-contrast: more) { :is([data-preset='solar'][data-theme='light'], [data-preset='solar'] [data-theme='light'], [data-theme='light'] [data-preset='solar']:not([data-theme])):not([data-contrast='normal']) { --alea-text: var(--alea-gray-1000); --alea-bg: var(--alea-white); --alea-text-muted: var(--alea-black); --alea-text-faint: #222222; --alea-border: color-mix(in srgb, var(--alea-gray-1000) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-gray-1000) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-gray-1000) 80%, transparent); --alea-accent-solid: #6b4a00; --alea-accent: #6b4a00; --alea-accent-strong: #6b4a00; } }\n/* Moss */\n[data-preset='moss'][data-theme='dark'], [data-preset='moss'] [data-theme='dark'], [data-theme='dark'] [data-preset='moss']:not([data-theme]) {\n --alea-bg: var(--alea-green-gray-1000); --alea-bg-deep: #090e0b;\n --alea-surface: var(--alea-green-gray-350); --alea-surface-deep: var(--alea-green-gray-850); --alea-surface-raised: #1a2b22; --alea-surface-hover: #1d3026;\n --alea-border: color-mix(in srgb, var(--alea-white) 7.84%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 14.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 30.2%, transparent);\n --alea-text: var(--alea-green-gray-150); --alea-text-soft: #e2eee6; --alea-text-muted: var(--alea-green-350); --alea-text-faint: #92a99b;\n --alea-accent: var(--alea-green-450); --alea-accent-strong: var(--alea-green-250); --alea-accent-second: #22d3ee; --alea-accent-third: var(--alea-green-350);\n --alea-accent-subtle: color-mix(in srgb, var(--alea-green-450) 18.82%, transparent); --alea-accent-on: #06251a; --alea-accent-solid: var(--alea-green-550);\n --alea-focus: var(--alea-green-250); --alea-focus-halo: color-mix(in srgb, var(--alea-green-450) 27.84%, transparent);\n --alea-chip-bg: var(--alea-green-gray-150); --alea-chip-text: var(--alea-green-gray-1000);\n --alea-button-ring: color-mix(in srgb, var(--alea-green-550) 25.1%, transparent); --alea-button-top: #22c58a; --alea-button-bottom: var(--alea-green-650); --alea-button-text: var(--alea-white);\n --alea-field-bg: var(--alea-green-gray-850);\n --alea-gradient-accent: radial-gradient(100% 100% at 25% 100%, #059669 0%, #6ee7b7 100%);\n --alea-gradient-accent-linear: linear-gradient(120deg, #059669 0%, #22d3ee 100%);\n --alea-gradient-text: var(--alea-gradient-accent); --alea-gradient-text-linear: var(--alea-gradient-accent-linear);\n --alea-gradient-button: linear-gradient(180deg, #22c58a 0%, #047857 100%);\n --alea-shadow-card: inset 0 0 0 1px color-mix(in srgb, var(--alea-white) 5.88%, transparent), 0 1px 0 0 color-mix(in srgb, var(--alea-white) 3.14%, transparent) inset, 0 12px 32px -20px color-mix(in srgb, var(--alea-gray-1000) 80%, transparent);\n --alea-shadow-pop: 0 20px 48px -16px color-mix(in srgb, var(--alea-gray-1000) 90.2%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--alea-white) 9.02%, transparent);\n}\n[data-preset='moss'][data-theme='light'], [data-preset='moss'] [data-theme='light'], [data-theme='light'] [data-preset='moss']:not([data-theme]) {\n --alea-bg: var(--alea-green-gray-0); --alea-bg-deep: #e9f2ec;\n --alea-surface: var(--alea-white); --alea-surface-deep: #eef5f1; --alea-surface-raised: #e2ede6; --alea-surface-hover: #f1f7f3;\n --alea-border: color-mix(in srgb, var(--alea-green-gray-500) 7.84%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-green-gray-500) 14.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-green-gray-500) 32.16%, transparent);\n --alea-text: var(--alea-green-gray-650); --alea-text-soft: #1f3328; --alea-text-muted: #4d6457; --alea-text-faint: #58705f;\n --alea-accent: var(--alea-green-650); --alea-accent-strong: var(--alea-green-850); --alea-accent-second: #0e7490; --alea-accent-third: #6b8277;\n --alea-accent-subtle: color-mix(in srgb, var(--alea-green-650) 12.16%, transparent); --alea-accent-on: var(--alea-white); --alea-accent-solid: var(--alea-green-650);\n --alea-focus: var(--alea-green-650); --alea-focus-halo: color-mix(in srgb, var(--alea-green-650) 20%, transparent);\n --alea-chip-bg: var(--alea-green-gray-650); --alea-chip-text: var(--alea-green-gray-0);\n --alea-button-ring: color-mix(in srgb, var(--alea-green-650) 20%, transparent); --alea-button-top: var(--alea-green-450); --alea-button-bottom: var(--alea-green-650); --alea-button-text: var(--alea-white);\n --alea-field-bg: var(--alea-white);\n --alea-gradient-accent: radial-gradient(100% 100% at 25% 100%, #047857 0%, #34d399 100%);\n --alea-gradient-accent-linear: linear-gradient(120deg, #047857 0%, #0e7490 100%);\n --alea-gradient-text: radial-gradient(100% 100% at 25% 100%, #047857 0%, #0e7490 100%); --alea-gradient-text-linear: var(--alea-gradient-accent-linear);\n --alea-gradient-button: linear-gradient(180deg, #10b981 0%, #047857 100%);\n --alea-shadow-card: inset 0 0 0 1px color-mix(in srgb, var(--alea-green-gray-500) 7.84%, transparent), 0 8px 24px -18px color-mix(in srgb, var(--alea-green-gray-500) 20%, transparent);\n --alea-shadow-pop: 0 20px 48px -20px color-mix(in srgb, var(--alea-green-gray-500) 25.1%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--alea-green-gray-500) 7.84%, transparent);\n}\n[data-preset='moss'] .alea-orbs { --alea-orb-1: rgba(16, 185, 129, 0.18); --alea-orb-2: rgba(34, 211, 238, 0.08); --alea-orb-3: rgba(74, 222, 128, 0.08); }\n[data-preset='moss'][data-theme='light'] .alea-orbs, [data-preset='moss'] [data-theme='light'] .alea-orbs { --alea-orb-1: rgba(4, 120, 87, 0.14); --alea-orb-2: rgba(14, 116, 144, 0.08); --alea-orb-3: rgba(16, 185, 129, 0.08); }\n[data-contrast='more']:is([data-preset='moss'][data-theme='dark'], [data-preset='moss'] [data-theme='dark'], [data-theme='dark'] [data-preset='moss']:not([data-theme])), [data-contrast='more'] :is([data-preset='moss'][data-theme='dark'], [data-preset='moss'] [data-theme='dark'], [data-theme='dark'] [data-preset='moss']:not([data-theme])) { --alea-text: var(--alea-white); --alea-bg: var(--alea-gray-1000); --alea-text-muted: #f0f0f0; --alea-text-faint: #e0e0e0; --alea-border: color-mix(in srgb, var(--alea-white) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 80%, transparent); --alea-accent-solid: var(--alea-green-250); --alea-accent-strong: var(--alea-green-250); --alea-accent-subtle: #4ade8024; }\n@media (prefers-contrast: more) { :is([data-preset='moss'][data-theme='dark'], [data-preset='moss'] [data-theme='dark'], [data-theme='dark'] [data-preset='moss']:not([data-theme])):not([data-contrast='normal']) { --alea-text: var(--alea-white); --alea-bg: var(--alea-gray-1000); --alea-text-muted: #f0f0f0; --alea-text-faint: #e0e0e0; --alea-border: color-mix(in srgb, var(--alea-white) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-white) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-white) 80%, transparent); --alea-accent-solid: var(--alea-green-250); --alea-accent-strong: var(--alea-green-250); --alea-accent-subtle: #4ade8024; } }\n[data-contrast='more']:is([data-preset='moss'][data-theme='light'], [data-preset='moss'] [data-theme='light'], [data-theme='light'] [data-preset='moss']:not([data-theme])), [data-contrast='more'] :is([data-preset='moss'][data-theme='light'], [data-preset='moss'] [data-theme='light'], [data-theme='light'] [data-preset='moss']:not([data-theme])) { --alea-text: var(--alea-gray-1000); --alea-bg: var(--alea-white); --alea-text-muted: var(--alea-black); --alea-text-faint: #222222; --alea-border: color-mix(in srgb, var(--alea-gray-1000) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-gray-1000) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-gray-1000) 80%, transparent); --alea-accent-solid: var(--alea-green-850); --alea-accent: var(--alea-green-850); --alea-accent-strong: #054a38; }\n@media (prefers-contrast: more) { :is([data-preset='moss'][data-theme='light'], [data-preset='moss'] [data-theme='light'], [data-theme='light'] [data-preset='moss']:not([data-theme])):not([data-contrast='normal']) { --alea-text: var(--alea-gray-1000); --alea-bg: var(--alea-white); --alea-text-muted: var(--alea-black); --alea-text-faint: #222222; --alea-border: color-mix(in srgb, var(--alea-gray-1000) 36.08%, transparent); --alea-border-strong: color-mix(in srgb, var(--alea-gray-1000) 54.9%, transparent); --alea-border-control: color-mix(in srgb, var(--alea-gray-1000) 80%, transparent); --alea-accent-solid: var(--alea-green-850); --alea-accent: var(--alea-green-850); --alea-accent-strong: #054a38; } }\n"},{"path":"tokens.css","content":"/* Alea tokens. GENERATED by packages/tokens/scripts/build.mjs from src/*.json. */\n:root {\n color-scheme: dark;\n --alea-purple-50: #faf2ff;\n --alea-purple-100: #f5e2ff;\n --alea-purple-200: #edcaff;\n --alea-purple-300: #e1a4ff;\n --alea-purple-400: #cd57ff;\n --alea-purple-500: #c144f4;\n --alea-purple-600: #ae2ae0;\n --alea-purple-650: #8b2fd6;\n --alea-purple-700: #940dc2;\n --alea-purple-800: #7d01a5;\n --alea-purple-900: #6a068b;\n --alea-purple-950: #2f183b;\n --alea-yellow-50: #fff5d9;\n --alea-yellow-100: #ffe8a9;\n --alea-yellow-200: #ffce1f;\n --alea-yellow-300: #e9ba00;\n --alea-yellow-400: #c29b00;\n --alea-yellow-500: #a98700;\n --alea-yellow-600: #947600;\n --alea-yellow-700: #7b6100;\n --alea-yellow-800: #675100;\n --alea-yellow-900: #574400;\n --alea-yellow-950: #2d2200;\n --alea-violet-50: #f5f4ff;\n --alea-violet-100: #e9e7ff;\n --alea-violet-200: #d8d3ff;\n --alea-violet-300: #c0b5ff;\n --alea-violet-400: #a189ff;\n --alea-violet-500: #8b6cf0;\n --alea-violet-600: #7d5cdf;\n --alea-violet-700: #6848c2;\n --alea-violet-800: #573ba4;\n --alea-violet-900: #49328b;\n --alea-violet-950: #241f3a;\n --alea-neutral-50: #f6f5f4;\n --alea-neutral-100: #ebe9e7;\n --alea-neutral-200: #dbd9d5;\n --alea-neutral-300: #c3c0ba;\n --alea-neutral-400: #a49f98;\n --alea-neutral-500: #8c8780;\n --alea-neutral-600: #7e7972;\n --alea-neutral-700: #68645e;\n --alea-neutral-800: #57534d;\n --alea-neutral-900: #494641;\n --alea-neutral-950: #242322;\n --alea-green-50: #e5fcec;\n --alea-green-100: #c7f8d5;\n --alea-green-200: #9af0b6;\n --alea-green-300: #3ddc84;\n --alea-green-400: #00be6a;\n --alea-green-500: #00a65c;\n --alea-green-600: #00914f;\n --alea-green-700: #007941;\n --alea-green-800: #006535;\n --alea-green-900: #00552c;\n --alea-green-950: #022c15;\n --alea-red-50: #fff2f1;\n --alea-red-100: #ffe2e0;\n --alea-red-200: #ffcac7;\n --alea-red-300: #ffa49f;\n --alea-red-400: #fc6968;\n --alea-red-500: #e5484d;\n --alea-red-600: #d4363f;\n --alea-red-650: #c62828;\n --alea-red-700: #b6212e;\n --alea-red-800: #9a1624;\n --alea-red-900: #83151e;\n --alea-red-950: #391817;\n --alea-amber-50: #fff4e6;\n --alea-amber-100: #ffe5c6;\n --alea-amber-200: #ffd095;\n --alea-amber-300: #f5a524;\n --alea-amber-400: #d88e00;\n --alea-amber-500: #bd7b00;\n --alea-amber-600: #a56b00;\n --alea-amber-700: #8a5900;\n --alea-amber-800: #734900;\n --alea-amber-900: #623e00;\n --alea-amber-950: #331f01;\n --alea-blue-50: #f0f6ff;\n --alea-blue-100: #deebff;\n --alea-blue-200: #c4dbff;\n --alea-blue-300: #9cc2ff;\n --alea-blue-400: #639eff;\n --alea-blue-500: #3b82f6;\n --alea-blue-600: #2c73e6;\n --alea-blue-700: #1b5ec8;\n --alea-blue-800: #124daa;\n --alea-blue-900: #104290;\n --alea-blue-950: #14233c;\n --alea-white: #ffffff;\n --alea-black: #111011;\n --alea-blue-gray-550: #33363f;\n --alea-gray-50: #f9f8f5;\n --alea-gray-100: #f7f7f7;\n --alea-gray-300: #f7f4f2;\n --alea-gray-400: #dbdbdb;\n --alea-gray-700: #1d1c1b;\n --alea-gray-800: #121212;\n --alea-gray-950: #020202;\n --alea-gray-1000: #000000;\n --alea-transparent: #00000000;\n --alea-warm-gray-350: #3c2814;\n --alea-spacing-base: 0.25rem;\n --alea-space-0: 0rem;\n --alea-space-1: 0.25rem;\n --alea-space-2: 0.5rem;\n --alea-space-3: 0.75rem;\n --alea-space-4: 1rem;\n --alea-space-5: 1.25rem;\n --alea-space-6: 1.5rem;\n --alea-space-7: 1.75rem;\n --alea-space-8: 2rem;\n --alea-space-10: 2.5rem;\n --alea-space-12: 3rem;\n --alea-space-16: 4rem;\n --alea-space-20: 5rem;\n --alea-space-22: 5.5rem;\n --alea-space-24: 6rem;\n --alea-space-0-25: 0.0625rem;\n --alea-space-0-5: 0.125rem;\n --alea-space-1-5: 0.375rem;\n --alea-space-2-5: 0.625rem;\n --alea-space-3-5: 0.875rem;\n --alea-radius-3xs: 0.0625rem;\n --alea-radius-2xs: 0.125rem;\n --alea-radius-xs: 4px;\n --alea-radius-sm: 6px;\n --alea-radius-field: 8px;\n --alea-radius-md: 10px;\n --alea-radius-lg: 12px;\n --alea-radius-xl: 16px;\n --alea-radius-2xl: 1.25rem;\n --alea-radius-3xl: 1.5rem;\n --alea-radius-4xl: 2rem;\n --alea-radius-full: 9999px;\n --alea-font-family-display: 'Crimson Pro', Georgia, 'Times New Roman', serif;\n --alea-font-family-body: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n --alea-font-family-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;\n --alea-font-size-2xs: 11px;\n --alea-font-size-xs: 12px;\n --alea-font-size-sm: 13px;\n --alea-font-size-md: 14px;\n --alea-font-size-base: 16px;\n --alea-font-size-lg: 18px;\n --alea-font-size-xl: 20px;\n --alea-font-size-2xl: 24px;\n --alea-font-size-3xl: 28px;\n --alea-font-size-4xl: 36px;\n --alea-font-size-5xl: 48px;\n --alea-font-size-6xl: 64px;\n --alea-font-size-7xl: 80px;\n --alea-font-weight-light: 300;\n --alea-font-weight-regular: 400;\n --alea-font-weight-medium: 500;\n --alea-font-weight-semibold: 600;\n --alea-font-leading-tight: 1.1;\n --alea-font-leading-snug: 1.3;\n --alea-font-leading-normal: 1.5;\n --alea-font-leading-relaxed: 1.6;\n --alea-font-tracking-display: -0.02em;\n --alea-font-tracking-tight: -0.01em;\n --alea-font-tracking-normal: 0em;\n --alea-font-tracking-eyebrow: 0.08em;\n --alea-motion-ease-out: cubic-bezier(0.16, 1, 0.3, 1);\n --alea-motion-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);\n --alea-motion-ease-standard: cubic-bezier(0.2, 0, 0, 1);\n --alea-motion-ease-emphasized: var(--alea-motion-ease-spring);\n --alea-motion-ease-spring: cubic-bezier(0.22, 1.2, 0.36, 1);\n --alea-motion-ease-in: cubic-bezier(0.4, 0, 1, 1);\n --alea-motion-duration-instant: 120ms;\n --alea-motion-duration-fast: 200ms;\n --alea-motion-duration-base: 320ms;\n --alea-motion-duration-slow: 480ms;\n --alea-motion-duration-slower: 720ms;\n --alea-motion-distance-sm: 8px;\n --alea-motion-distance-md: 12px;\n --alea-motion-distance-lg: 24px;\n --alea-motion-scale-from: 0.92;\n --alea-motion-scale-press: 0.96;\n --alea-motion-stagger: 40ms;\n --alea-motion-lift: -4px;\n --alea-motion-spring: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);\n --alea-motion-blur-sm: 4px;\n --alea-motion-blur-md: 8px;\n --alea-motion-blur-lg: 16px;\n --alea-z-dropdown: 1000;\n --alea-z-sticky: 1100;\n --alea-z-overlay: 1200;\n --alea-z-modal: 1300;\n --alea-z-toast: 1400;\n --alea-z-tooltip: 1500;\n --alea-breakpoint-sm: 640px;\n --alea-breakpoint-md: 768px;\n --alea-breakpoint-lg: 1024px;\n --alea-breakpoint-xl: 1280px;\n --alea-size-control-sm: 32px;\n --alea-size-control-md: 40px;\n --alea-size-control-lg: 48px;\n --alea-size-field: 44px;\n --alea-size-icon-sm: 16px;\n --alea-size-icon-md: 20px;\n --alea-size-icon-lg: 24px;\n --alea-shadow-glow: 0px 10px 30px -10px #cd57ff8c;\n --alea-gradient-accent: radial-gradient(100% 100% at 25% 100%, #cd57ff 0%, #ffce1f 100%);\n --alea-gradient-accent-linear: linear-gradient(120deg, #cd57ff 0%, #ffce1f 100%);\n --alea-gradient-button: linear-gradient(180deg, #33363f 0%, #020202 100%);\n --alea-bg: #272625;\n --alea-bg-deep: #1f1e1d;\n --alea-surface: var(--alea-gray-700);\n --alea-surface-deep: var(--alea-gray-800);\n --alea-surface-raised: #262829;\n --alea-surface-hover: var(--alea-neutral-950);\n --alea-surface-overlay: color-mix(in srgb, var(--alea-gray-1000) 72.16%, transparent);\n --alea-border: color-mix(in srgb, var(--alea-white) 7.84%, transparent);\n --alea-border-strong: color-mix(in srgb, var(--alea-white) 18.04%, transparent);\n --alea-border-control: color-mix(in srgb, var(--alea-white) 36.08%, transparent);\n --alea-text: var(--alea-gray-100);\n --alea-text-soft: var(--alea-gray-50);\n --alea-text-muted: color-mix(in srgb, var(--alea-gray-400) 81.96%, transparent);\n --alea-text-faint: color-mix(in srgb, var(--alea-gray-400) 60%, transparent);\n --alea-accent: var(--alea-purple-400);\n --alea-accent-strong: var(--alea-purple-300);\n --alea-accent-second: var(--alea-yellow-200);\n --alea-accent-third: var(--alea-violet-500);\n --alea-accent-subtle: color-mix(in srgb, var(--alea-purple-400) 14.12%, transparent);\n --alea-accent-on: var(--alea-black);\n --alea-accent-solid: var(--alea-accent);\n --alea-focus: var(--alea-purple-400);\n --alea-focus-halo: color-mix(in srgb, var(--alea-purple-400) 20%, transparent);\n --alea-chip-bg: var(--alea-white);\n --alea-chip-text: var(--alea-black);\n --alea-button-ring: #242628;\n --alea-button-top: var(--alea-blue-gray-550);\n --alea-button-bottom: var(--alea-gray-950);\n --alea-button-text: var(--alea-gray-100);\n --alea-effect-top-light: rgb(255 255 255 / 0.18);\n --alea-effect-glow: color-mix(in srgb, var(--alea-accent) 55%, transparent);\n --alea-effect-glow-soft: color-mix(in srgb, var(--alea-accent) 70%, transparent);\n --alea-field-bg: var(--alea-gray-800);\n --alea-status-success: var(--alea-green-300);\n --alea-status-success-bg: color-mix(in srgb, var(--alea-green-300) 12.16%, transparent);\n --alea-status-danger: #ff8a8a;\n --alea-status-danger-bg: #ff7a7a1f;\n --alea-status-warning: var(--alea-amber-300);\n --alea-status-warning-bg: color-mix(in srgb, var(--alea-amber-300) 12.16%, transparent);\n --alea-status-info: var(--alea-blue-300);\n --alea-status-info-bg: color-mix(in srgb, var(--alea-blue-500) 12.16%, transparent);\n --alea-status-on: var(--alea-black);\n --alea-status-success-solid: var(--alea-green-300);\n --alea-status-success-on-solid: var(--alea-black);\n --alea-status-warning-solid: var(--alea-amber-300);\n --alea-status-warning-on-solid: var(--alea-black);\n --alea-status-danger-solid: var(--alea-red-600);\n --alea-status-danger-solid-hover: var(--alea-red-700);\n --alea-status-danger-on-solid: var(--alea-white);\n --alea-status-info-solid: var(--alea-blue-700);\n --alea-status-info-on-solid: var(--alea-white);\n --alea-shadow-card: inset 0px 0.5px 0px 1px #c6c6c62e, 0px 18px 40px -18px color-mix(in srgb, var(--alea-gray-1000) 25.1%, transparent);\n --alea-shadow-pop: 0px 24px 60px -24px color-mix(in srgb, var(--alea-gray-1000) 70.2%, transparent);\n --alea-gradient-text: radial-gradient(100% 100% at 25% 100%, #cd57ff 0%, #ffce1f 100%);\n --alea-gradient-text-linear: linear-gradient(120deg, #cd57ff 0%, #ffce1f 100%);\n --alea-presence-online: var(--alea-green-300);\n --alea-presence-away: var(--alea-amber-300);\n --alea-presence-busy: var(--alea-red-500);\n --alea-presence-offline: var(--alea-neutral-500);\n --alea-rating-fill: var(--alea-yellow-200);\n --alea-control-thumb: var(--alea-white);\n --alea-on-media: var(--alea-white);\n --alea-media-backdrop: var(--alea-gray-1000);\n --alea-media-scrim: color-mix(in srgb, var(--alea-gray-1000) 74.9%, transparent);\n --alea-chart-2: var(--alea-yellow-200);\n --alea-chart-3: var(--alea-violet-500);\n --alea-chart-4: var(--alea-green-300);\n --alea-chart-5: var(--alea-blue-400);\n --alea-chart-6: var(--alea-red-400);\n --alea-chart-7: var(--alea-amber-300);\n --alea-chart-8: var(--alea-neutral-500);\n --alea-reaction-like: #f43f5e;\n --alea-icon: var(--alea-text);\n --alea-icon-muted: var(--alea-text-muted);\n --alea-icon-soft: var(--alea-text-soft);\n --alea-icon-faint: var(--alea-text-faint);\n --alea-icon-accent: var(--alea-accent-strong);\n --alea-icon-brand: var(--alea-accent);\n --alea-icon-on-accent: var(--alea-accent-on);\n --alea-icon-button: var(--alea-button-text);\n --alea-icon-chip: var(--alea-chip-text);\n --alea-icon-danger: var(--alea-status-danger);\n --alea-icon-success: var(--alea-status-success);\n --alea-icon-warning: var(--alea-status-warning);\n --alea-icon-info: var(--alea-status-info);\n --alea-icon-on-danger: var(--alea-status-danger-on-solid);\n --alea-icon-on-success: var(--alea-status-success-on-solid);\n --alea-icon-on-warning: var(--alea-status-warning-on-solid);\n --alea-icon-on-info: var(--alea-status-info-on-solid);\n --alea-icon-on-status: var(--alea-status-on);\n --alea-icon-rating: var(--alea-rating-fill);\n --alea-icon-control: var(--alea-border-control);\n --alea-icon-like: var(--alea-reaction-like);\n}\n\n/* Compact density: half the base, written out per step (a whole step is rounded up to an even number of px; the half steps 0-5, 1-5, 2-5 and 3-5 are literal: 1, 3, 5 and 7 px).\n Not on tables: <Table density=\"compact\"> uses the same attribute for its rows. */\n[data-density=\"compact\"]:not(.alea-table) {\n --alea-spacing-base: 0.125rem;\n --alea-space-0: 0rem;\n --alea-space-1: 0.125rem;\n --alea-space-2: 0.25rem;\n --alea-space-3: 0.375rem;\n --alea-space-4: 0.5rem;\n --alea-space-5: 0.625rem;\n --alea-space-6: 0.75rem;\n --alea-space-7: 0.875rem;\n --alea-space-8: 1rem;\n --alea-space-10: 1.25rem;\n --alea-space-12: 1.5rem;\n --alea-space-16: 2rem;\n --alea-space-20: 2.5rem;\n --alea-space-22: 2.75rem;\n --alea-space-24: 3rem;\n --alea-space-0-25: 0.0625rem;\n --alea-space-0-5: 0.0625rem;\n --alea-space-1-5: 0.1875rem;\n --alea-space-2-5: 0.3125rem;\n --alea-space-3-5: 0.4375rem;\n}\n\n/* Mixes of the accent (effect glows) are resolved where they are declared, so they are written again on every element that can set the accent: a theme, a look or a brand wrapper */\n:root, [data-theme], [data-preset], .alea-root {\n --alea-effect-glow: color-mix(in srgb, var(--alea-accent) 55%, transparent);\n --alea-effect-glow-soft: color-mix(in srgb, var(--alea-accent) 70%, transparent);\n}\n\n/* Explicit dark, so a dark area inside a light page gets the dark values too */\n[data-theme=\"dark\"] {\n color-scheme: dark;\n --alea-bg: #272625;\n --alea-bg-deep: #1f1e1d;\n --alea-surface: var(--alea-gray-700);\n --alea-surface-deep: var(--alea-gray-800);\n --alea-surface-raised: #262829;\n --alea-surface-hover: var(--alea-neutral-950);\n --alea-surface-overlay: color-mix(in srgb, var(--alea-gray-1000) 72.16%, transparent);\n --alea-border: color-mix(in srgb, var(--alea-white) 7.84%, transparent);\n --alea-border-strong: color-mix(in srgb, var(--alea-white) 18.04%, transparent);\n --alea-border-control: color-mix(in srgb, var(--alea-white) 36.08%, transparent);\n --alea-text: var(--alea-gray-100);\n --alea-text-soft: var(--alea-gray-50);\n --alea-text-muted: color-mix(in srgb, var(--alea-gray-400) 81.96%, transparent);\n --alea-text-faint: color-mix(in srgb, var(--alea-gray-400) 60%, transparent);\n --alea-accent: var(--alea-purple-400);\n --alea-accent-strong: var(--alea-purple-300);\n --alea-accent-second: var(--alea-yellow-200);\n --alea-accent-third: var(--alea-violet-500);\n --alea-accent-subtle: color-mix(in srgb, var(--alea-purple-400) 14.12%, transparent);\n --alea-accent-on: var(--alea-black);\n --alea-accent-solid: var(--alea-accent);\n --alea-focus: var(--alea-purple-400);\n --alea-focus-halo: color-mix(in srgb, var(--alea-purple-400) 20%, transparent);\n --alea-chip-bg: var(--alea-white);\n --alea-chip-text: var(--alea-black);\n --alea-button-ring: #242628;\n --alea-button-top: var(--alea-blue-gray-550);\n --alea-button-bottom: var(--alea-gray-950);\n --alea-button-text: var(--alea-gray-100);\n --alea-effect-top-light: rgb(255 255 255 / 0.18);\n --alea-effect-glow: color-mix(in srgb, var(--alea-accent) 55%, transparent);\n --alea-effect-glow-soft: color-mix(in srgb, var(--alea-accent) 70%, transparent);\n --alea-field-bg: var(--alea-gray-800);\n --alea-status-success: var(--alea-green-300);\n --alea-status-success-bg: color-mix(in srgb, var(--alea-green-300) 12.16%, transparent);\n --alea-status-danger: #ff8a8a;\n --alea-status-danger-bg: #ff7a7a1f;\n --alea-status-warning: var(--alea-amber-300);\n --alea-status-warning-bg: color-mix(in srgb, var(--alea-amber-300) 12.16%, transparent);\n --alea-status-info: var(--alea-blue-300);\n --alea-status-info-bg: color-mix(in srgb, var(--alea-blue-500) 12.16%, transparent);\n --alea-status-on: var(--alea-black);\n --alea-status-success-solid: var(--alea-green-300);\n --alea-status-success-on-solid: var(--alea-black);\n --alea-status-warning-solid: var(--alea-amber-300);\n --alea-status-warning-on-solid: var(--alea-black);\n --alea-status-danger-solid: var(--alea-red-600);\n --alea-status-danger-solid-hover: var(--alea-red-700);\n --alea-status-danger-on-solid: var(--alea-white);\n --alea-status-info-solid: var(--alea-blue-700);\n --alea-status-info-on-solid: var(--alea-white);\n --alea-shadow-card: inset 0px 0.5px 0px 1px #c6c6c62e, 0px 18px 40px -18px color-mix(in srgb, var(--alea-gray-1000) 25.1%, transparent);\n --alea-shadow-pop: 0px 24px 60px -24px color-mix(in srgb, var(--alea-gray-1000) 70.2%, transparent);\n --alea-gradient-text: radial-gradient(100% 100% at 25% 100%, #cd57ff 0%, #ffce1f 100%);\n --alea-gradient-text-linear: linear-gradient(120deg, #cd57ff 0%, #ffce1f 100%);\n --alea-presence-online: var(--alea-green-300);\n --alea-presence-away: var(--alea-amber-300);\n --alea-presence-busy: var(--alea-red-500);\n --alea-presence-offline: var(--alea-neutral-500);\n --alea-rating-fill: var(--alea-yellow-200);\n --alea-control-thumb: var(--alea-white);\n --alea-on-media: var(--alea-white);\n --alea-media-backdrop: var(--alea-gray-1000);\n --alea-media-scrim: color-mix(in srgb, var(--alea-gray-1000) 74.9%, transparent);\n --alea-chart-2: var(--alea-yellow-200);\n --alea-chart-3: var(--alea-violet-500);\n --alea-chart-4: var(--alea-green-300);\n --alea-chart-5: var(--alea-blue-400);\n --alea-chart-6: var(--alea-red-400);\n --alea-chart-7: var(--alea-amber-300);\n --alea-chart-8: var(--alea-neutral-500);\n --alea-reaction-like: #f43f5e;\n --alea-icon: var(--alea-text);\n --alea-icon-muted: var(--alea-text-muted);\n --alea-icon-soft: var(--alea-text-soft);\n --alea-icon-faint: var(--alea-text-faint);\n --alea-icon-accent: var(--alea-accent-strong);\n --alea-icon-brand: var(--alea-accent);\n --alea-icon-on-accent: var(--alea-accent-on);\n --alea-icon-button: var(--alea-button-text);\n --alea-icon-chip: var(--alea-chip-text);\n --alea-icon-danger: var(--alea-status-danger);\n --alea-icon-success: var(--alea-status-success);\n --alea-icon-warning: var(--alea-status-warning);\n --alea-icon-info: var(--alea-status-info);\n --alea-icon-on-danger: var(--alea-status-danger-on-solid);\n --alea-icon-on-success: var(--alea-status-success-on-solid);\n --alea-icon-on-warning: var(--alea-status-warning-on-solid);\n --alea-icon-on-info: var(--alea-status-info-on-solid);\n --alea-icon-on-status: var(--alea-status-on);\n --alea-icon-rating: var(--alea-rating-fill);\n --alea-icon-control: var(--alea-border-control);\n --alea-icon-like: var(--alea-reaction-like);\n}\n\n[data-theme=\"light\"] {\n color-scheme: light;\n --alea-bg: var(--alea-gray-300);\n --alea-bg-deep: #efebe7;\n --alea-surface: var(--alea-white);\n --alea-surface-deep: #f3f0ec;\n --alea-surface-raised: #ebe7e2;\n --alea-surface-hover: #faf8f6;\n --alea-surface-overlay: color-mix(in srgb, var(--alea-black) 36.08%, transparent);\n --alea-border: color-mix(in srgb, var(--alea-black) 9.02%, transparent);\n --alea-border-strong: color-mix(in srgb, var(--alea-black) 20%, transparent);\n --alea-border-control: color-mix(in srgb, var(--alea-black) 50.2%, transparent);\n --alea-text: var(--alea-black);\n --alea-text-soft: var(--alea-gray-700);\n --alea-text-muted: color-mix(in srgb, var(--alea-black) 74.12%, transparent);\n --alea-text-faint: color-mix(in srgb, var(--alea-black) 61.96%, transparent);\n --alea-accent: var(--alea-purple-400);\n --alea-accent-strong: var(--alea-purple-700);\n --alea-accent-second: var(--alea-yellow-200);\n --alea-accent-third: var(--alea-violet-500);\n --alea-accent-subtle: color-mix(in srgb, var(--alea-purple-400) 12.16%, transparent);\n --alea-accent-on: var(--alea-black);\n --alea-accent-solid: var(--alea-accent);\n --alea-focus: var(--alea-purple-650);\n --alea-focus-halo: color-mix(in srgb, var(--alea-purple-650) 18.04%, transparent);\n --alea-chip-bg: var(--alea-black);\n --alea-chip-text: var(--alea-gray-50);\n --alea-button-ring: #e3dfda;\n --alea-button-top: var(--alea-blue-gray-550);\n --alea-button-bottom: var(--alea-gray-950);\n --alea-button-text: var(--alea-gray-100);\n --alea-effect-top-light: rgb(255 255 255 / 0.18);\n --alea-effect-glow: color-mix(in srgb, var(--alea-accent) 55%, transparent);\n --alea-effect-glow-soft: color-mix(in srgb, var(--alea-accent) 70%, transparent);\n --alea-field-bg: var(--alea-gray-300);\n --alea-status-success: var(--alea-green-800);\n --alea-status-success-bg: #11804a1a;\n --alea-status-danger: var(--alea-red-650);\n --alea-status-danger-bg: color-mix(in srgb, var(--alea-red-650) 7.84%, transparent);\n --alea-status-warning: var(--alea-amber-700);\n --alea-status-warning-bg: color-mix(in srgb, var(--alea-amber-300) 12.16%, transparent);\n --alea-status-info: var(--alea-blue-700);\n --alea-status-info-bg: color-mix(in srgb, var(--alea-blue-500) 10.2%, transparent);\n --alea-status-on: var(--alea-white);\n --alea-status-success-solid: var(--alea-green-300);\n --alea-status-success-on-solid: var(--alea-black);\n --alea-status-warning-solid: var(--alea-amber-300);\n --alea-status-warning-on-solid: var(--alea-black);\n --alea-status-danger-solid: var(--alea-red-600);\n --alea-status-danger-solid-hover: var(--alea-red-700);\n --alea-status-danger-on-solid: var(--alea-white);\n --alea-status-info-solid: var(--alea-blue-700);\n --alea-status-info-on-solid: var(--alea-white);\n --alea-shadow-card: inset 0px 0px 0px 1px color-mix(in srgb, var(--alea-black) 5.88%, transparent), 0px 18px 40px -20px color-mix(in srgb, var(--alea-warm-gray-350) 7.84%, transparent);\n --alea-shadow-pop: 0px 24px 60px -24px color-mix(in srgb, var(--alea-warm-gray-350) 25.1%, transparent);\n --alea-gradient-text: radial-gradient(100% 100% at 25% 100%, #b83fe6 0%, #b45309 100%);\n --alea-gradient-text-linear: linear-gradient(120deg, #b83fe6 0%, #b45309 100%);\n --alea-presence-online: var(--alea-green-600);\n --alea-presence-away: var(--alea-amber-500);\n --alea-presence-busy: var(--alea-red-600);\n --alea-presence-offline: var(--alea-neutral-500);\n --alea-rating-fill: var(--alea-amber-500);\n --alea-control-thumb: var(--alea-white);\n --alea-on-media: var(--alea-white);\n --alea-media-backdrop: var(--alea-gray-1000);\n --alea-media-scrim: color-mix(in srgb, var(--alea-gray-1000) 74.9%, transparent);\n --alea-chart-2: var(--alea-amber-500);\n --alea-chart-3: var(--alea-violet-600);\n --alea-chart-4: var(--alea-green-600);\n --alea-chart-5: var(--alea-blue-600);\n --alea-chart-6: var(--alea-red-600);\n --alea-chart-7: var(--alea-amber-700);\n --alea-chart-8: var(--alea-neutral-600);\n --alea-reaction-like: #e11d48;\n --alea-icon: var(--alea-text);\n --alea-icon-muted: var(--alea-text-muted);\n --alea-icon-soft: var(--alea-text-soft);\n --alea-icon-faint: var(--alea-text-faint);\n --alea-icon-accent: var(--alea-accent-strong);\n --alea-icon-brand: var(--alea-accent);\n --alea-icon-on-accent: var(--alea-accent-on);\n --alea-icon-button: var(--alea-button-text);\n --alea-icon-chip: var(--alea-chip-text);\n --alea-icon-danger: var(--alea-status-danger);\n --alea-icon-success: var(--alea-status-success);\n --alea-icon-warning: var(--alea-status-warning);\n --alea-icon-info: var(--alea-status-info);\n --alea-icon-on-danger: var(--alea-status-danger-on-solid);\n --alea-icon-on-success: var(--alea-status-success-on-solid);\n --alea-icon-on-warning: var(--alea-status-warning-on-solid);\n --alea-icon-on-info: var(--alea-status-info-on-solid);\n --alea-icon-on-status: var(--alea-status-on);\n --alea-icon-rating: var(--alea-rating-fill);\n --alea-icon-control: var(--alea-border-control);\n --alea-icon-like: var(--alea-reaction-like);\n}\n\n@media (prefers-color-scheme: light) {\n [data-theme=\"system\"] {\n color-scheme: light;\n --alea-bg: var(--alea-gray-300);\n --alea-bg-deep: #efebe7;\n --alea-surface: var(--alea-white);\n --alea-surface-deep: #f3f0ec;\n --alea-surface-raised: #ebe7e2;\n --alea-surface-hover: #faf8f6;\n --alea-surface-overlay: color-mix(in srgb, var(--alea-black) 36.08%, transparent);\n --alea-border: color-mix(in srgb, var(--alea-black) 9.02%, transparent);\n --alea-border-strong: color-mix(in srgb, var(--alea-black) 20%, transparent);\n --alea-border-control: color-mix(in srgb, var(--alea-black) 50.2%, transparent);\n --alea-text: var(--alea-black);\n --alea-text-soft: var(--alea-gray-700);\n --alea-text-muted: color-mix(in srgb, var(--alea-black) 74.12%, transparent);\n --alea-text-faint: color-mix(in srgb, var(--alea-black) 61.96%, transparent);\n --alea-accent: var(--alea-purple-400);\n --alea-accent-strong: var(--alea-purple-700);\n --alea-accent-second: var(--alea-yellow-200);\n --alea-accent-third: var(--alea-violet-500);\n --alea-accent-subtle: color-mix(in srgb, var(--alea-purple-400) 12.16%, transparent);\n --alea-accent-on: var(--alea-black);\n --alea-accent-solid: var(--alea-accent);\n --alea-focus: var(--alea-purple-650);\n --alea-focus-halo: color-mix(in srgb, var(--alea-purple-650) 18.04%, transparent);\n --alea-chip-bg: var(--alea-black);\n --alea-chip-text: var(--alea-gray-50);\n --alea-button-ring: #e3dfda;\n --alea-button-top: var(--alea-blue-gray-550);\n --alea-button-bottom: var(--alea-gray-950);\n --alea-button-text: var(--alea-gray-100);\n --alea-effect-top-light: rgb(255 255 255 / 0.18);\n --alea-effect-glow: color-mix(in srgb, var(--alea-accent) 55%, transparent);\n --alea-effect-glow-soft: color-mix(in srgb, var(--alea-accent) 70%, transparent);\n --alea-field-bg: var(--alea-gray-300);\n --alea-status-success: var(--alea-green-800);\n --alea-status-success-bg: #11804a1a;\n --alea-status-danger: var(--alea-red-650);\n --alea-status-danger-bg: color-mix(in srgb, var(--alea-red-650) 7.84%, transparent);\n --alea-status-warning: var(--alea-amber-700);\n --alea-status-warning-bg: color-mix(in srgb, var(--alea-amber-300) 12.16%, transparent);\n --alea-status-info: var(--alea-blue-700);\n --alea-status-info-bg: color-mix(in srgb, var(--alea-blue-500) 10.2%, transparent);\n --alea-status-on: var(--alea-white);\n --alea-status-success-solid: var(--alea-green-300);\n --alea-status-success-on-solid: var(--alea-black);\n --alea-status-warning-solid: var(--alea-amber-300);\n --alea-status-warning-on-solid: var(--alea-black);\n --alea-status-danger-solid: var(--alea-red-600);\n --alea-status-danger-solid-hover: var(--alea-red-700);\n --alea-status-danger-on-solid: var(--alea-white);\n --alea-status-info-solid: var(--alea-blue-700);\n --alea-status-info-on-solid: var(--alea-white);\n --alea-shadow-card: inset 0px 0px 0px 1px color-mix(in srgb, var(--alea-black) 5.88%, transparent), 0px 18px 40px -20px color-mix(in srgb, var(--alea-warm-gray-350) 7.84%, transparent);\n --alea-shadow-pop: 0px 24px 60px -24px color-mix(in srgb, var(--alea-warm-gray-350) 25.1%, transparent);\n --alea-gradient-text: radial-gradient(100% 100% at 25% 100%, #b83fe6 0%, #b45309 100%);\n --alea-gradient-text-linear: linear-gradient(120deg, #b83fe6 0%, #b45309 100%);\n --alea-presence-online: var(--alea-green-600);\n --alea-presence-away: var(--alea-amber-500);\n --alea-presence-busy: var(--alea-red-600);\n --alea-presence-offline: var(--alea-neutral-500);\n --alea-rating-fill: var(--alea-amber-500);\n --alea-control-thumb: var(--alea-white);\n --alea-on-media: var(--alea-white);\n --alea-media-backdrop: var(--alea-gray-1000);\n --alea-media-scrim: color-mix(in srgb, var(--alea-gray-1000) 74.9%, transparent);\n --alea-chart-2: var(--alea-amber-500);\n --alea-chart-3: var(--alea-violet-600);\n --alea-chart-4: var(--alea-green-600);\n --alea-chart-5: var(--alea-blue-600);\n --alea-chart-6: var(--alea-red-600);\n --alea-chart-7: var(--alea-amber-700);\n --alea-chart-8: var(--alea-neutral-600);\n --alea-reaction-like: #e11d48;\n --alea-icon: var(--alea-text);\n --alea-icon-muted: var(--alea-text-muted);\n --alea-icon-soft: var(--alea-text-soft);\n --alea-icon-faint: var(--alea-text-faint);\n --alea-icon-accent: var(--alea-accent-strong);\n --alea-icon-brand: var(--alea-accent);\n --alea-icon-on-accent: var(--alea-accent-on);\n --alea-icon-button: var(--alea-button-text);\n --alea-icon-chip: var(--alea-chip-text);\n --alea-icon-danger: var(--alea-status-danger);\n --alea-icon-success: var(--alea-status-success);\n --alea-icon-warning: var(--alea-status-warning);\n --alea-icon-info: var(--alea-status-info);\n --alea-icon-on-danger: var(--alea-status-danger-on-solid);\n --alea-icon-on-success: var(--alea-status-success-on-solid);\n --alea-icon-on-warning: var(--alea-status-warning-on-solid);\n --alea-icon-on-info: var(--alea-status-info-on-solid);\n --alea-icon-on-status: var(--alea-status-on);\n --alea-icon-rating: var(--alea-rating-fill);\n --alea-icon-control: var(--alea-border-control);\n --alea-icon-like: var(--alea-reaction-like);\n }\n}\n"}],"groups":{"accordion":{"files":[{"path":"components/accordion/Accordion.tsx","content":"import type { ReactNode } from 'react';\nimport { Disclosure, DisclosureGroup, DisclosurePanel, Button as RACButton, Heading as RACHeading, type DisclosureProps, type DisclosureGroupProps } from 'react-aria-components';\nimport { ChevronDown, Plus } from 'lucide-react';\nimport { withBase } from '../../utils/cx';\n\nexport interface AccordionProps extends DisclosureGroupProps {\n /** separated cards (default), joined (one card with dividers), ghost (no card, dividers only) or filled (tinted sections). */\n variant?: 'separated' | 'joined' | 'ghost' | 'filled';\n /** sm (44 px headers), md (56 px, default) or lg (64 px). */\n size?: 'sm' | 'md' | 'lg';\n /** Where the indicator sits: end (default) or start. */\n indicatorPosition?: 'start' | 'end';\n /** chevron (default, turns over) or plus (turns into a cross). */\n indicator?: 'chevron' | 'plus';\n}\n\n/** A list of sections that expand and collapse: four looks, three sizes, the indicator on either side, icons, subtitles and extra content in each header. allowsMultipleExpanded keeps several open. */\nexport function Accordion({ variant = 'separated', size, indicatorPosition, indicator, className, ...props }: AccordionProps) {\n return <DisclosureGroup {...props} data-variant={variant} data-size={size} data-indicator-position={indicatorPosition} data-indicator={indicator} className={withBase('alea-accordion', className as any)} />;\n}\n\nexport interface AccordionItemProps extends Omit<DisclosureProps, 'children'> {\n /** The always-visible header. */\n title: ReactNode;\n /** A second, muted line under the title. */\n subtitle?: ReactNode;\n /** An icon before the title. */\n icon?: ReactNode;\n /** Content at the end of the header, before the indicator: a badge, a count, a status. Keep it non-interactive: the whole header is one button. */\n extra?: ReactNode;\n children: ReactNode;\n /** Heading level for the header button. Default 3. */\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n}\n\n/** One expandable section. Works alone too (a single disclosure). */\nexport function AccordionItem({ title, subtitle, icon, extra, children, headingLevel = 3, className, ...props }: AccordionItemProps) {\n return (\n <Disclosure {...props} className={withBase('alea-accordion-item', className as any)}>\n <RACHeading level={headingLevel} className=\"alea-accordion-heading\">\n <RACButton slot=\"trigger\" className=\"alea-accordion-trigger alea-focus-ring\">\n {icon && <span className=\"alea-accordion-icon\" aria-hidden=\"true\">{icon}</span>}\n <span className=\"alea-accordion-titles\"><span className=\"alea-accordion-title\">{title}</span>{subtitle && <span className=\"alea-accordion-subtitle\">{subtitle}</span>}</span>\n {extra && <span className=\"alea-accordion-extra\">{extra}</span>}\n <span className=\"alea-accordion-indicator\" aria-hidden=\"true\"><ChevronDown size={18} className=\"alea-accordion-chevron\" /><Plus size={18} className=\"alea-accordion-plus\" /></span>\n </RACButton>\n </RACHeading>\n <DisclosurePanel className=\"alea-accordion-panel\"><div className=\"alea-accordion-content\">{children}</div></DisclosurePanel>\n </Disclosure>\n );\n}\n"},{"path":"components/accordion/accordion.css","content":".alea-accordion { display: flex; flex-direction: column; gap: var(--alea-space-2); }\n.alea-accordion[data-variant='joined'] { gap: 0; border-radius: var(--alea-radius-lg); background: var(--alea-surface); box-shadow: var(--alea-shadow-card); overflow: hidden; }\n.alea-accordion-item { border-radius: var(--alea-radius-md); background: var(--alea-surface); box-shadow: var(--alea-shadow-card); }\n.alea-accordion[data-variant='joined'] .alea-accordion-item { border-radius: 0; background: transparent; box-shadow: none; }\n.alea-accordion[data-variant='joined'] .alea-accordion-item + .alea-accordion-item { border-top: 1px solid var(--alea-border); }\n.alea-accordion-heading { margin: 0; }\n.alea-accordion-trigger {\n display: flex; align-items: center; justify-content: space-between; gap: var(--alea-space-4);\n width: 100%; min-height: 56px; padding: var(--alea-space-3) var(--alea-space-5);\n border: 0; border-radius: inherit; background: transparent; color: var(--alea-text);\n font: var(--alea-font-weight-semibold) var(--alea-font-size-base) / 1.35 var(--alea-font-family-body);\n text-align: left; cursor: pointer; position: relative; isolation: isolate;\n}\n/* Hover is an inset highlight: it never paints over the card's border or splits an open item */\n.alea-accordion-trigger::before {\n content: ''; position: absolute; inset: var(--alea-space-1); z-index: -1; border-radius: var(--alea-radius-md);\n background: var(--alea-surface-hover); opacity: 0; transition: opacity var(--alea-motion-duration-fast) var(--alea-motion-ease-standard);\n}\n.alea-accordion-trigger[data-hovered]::before { opacity: 1; }\n.alea-accordion-trigger[data-hovered] .alea-accordion-chevron { color: var(--alea-icon); }\n.alea-accordion-indicator { display: grid; flex: none; margin-left: auto; color: var(--alea-text-muted); }\n.alea-accordion-indicator > svg { grid-area: 1 / 1; transition: transform var(--alea-motion-duration-base) var(--alea-motion-ease-spring, var(--alea-motion-ease-out)); }\n.alea-accordion-plus { display: none; }\n.alea-accordion[data-indicator='plus'] .alea-accordion-chevron { display: none; }\n.alea-accordion[data-indicator='plus'] .alea-accordion-plus { display: block; }\n.alea-accordion-item[data-expanded] .alea-accordion-chevron { transform: rotate(180deg); }\n.alea-accordion-item[data-expanded] .alea-accordion-plus { transform: rotate(135deg); }\n.alea-accordion-trigger[data-hovered] .alea-accordion-indicator { color: var(--alea-text); }\n.alea-accordion[data-indicator-position='start'] .alea-accordion-indicator { order: -1; margin-left: 0; }\n.alea-accordion[data-indicator-position='start'] .alea-accordion-extra { margin-left: auto; }\n.alea-accordion-icon { display: inline-flex; flex: none; color: var(--alea-icon-muted); }\n.alea-accordion-icon svg { width: 20px; height: 20px; }\n.alea-accordion-titles { display: flex; flex-direction: column; gap: var(--alea-space-0-5); min-width: 0; }\n.alea-accordion-subtitle { color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); font-weight: var(--alea-font-weight-regular); }\n.alea-accordion-extra { display: inline-flex; align-items: center; gap: var(--alea-space-2); margin-left: auto; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); font-weight: var(--alea-font-weight-regular); }\n.alea-accordion-extra + .alea-accordion-indicator { margin-left: 0; }\n/* sizes */\n.alea-accordion[data-size='sm'] .alea-accordion-trigger { min-height: 44px; padding: var(--alea-space-2) var(--alea-space-4); font-size: var(--alea-font-size-md); }\n.alea-accordion[data-size='sm'] .alea-accordion-content { padding: 0 var(--alea-space-4) var(--alea-space-4); font-size: var(--alea-font-size-sm); }\n.alea-accordion[data-size='lg'] .alea-accordion-trigger { min-height: 64px; padding: var(--alea-space-4) var(--alea-space-6); font-size: var(--alea-font-size-lg); }\n.alea-accordion[data-size='lg'] .alea-accordion-content { padding: 0 var(--alea-space-6) var(--alea-space-6); font-size: var(--alea-font-size-base); }\n/* ghost: no card, a line between sections */\n.alea-accordion[data-variant='ghost'] { gap: 0; }\n.alea-accordion[data-variant='ghost'] .alea-accordion-item { border-radius: 0; background: none; box-shadow: none; border-bottom: 1px solid var(--alea-border); }\n.alea-accordion[data-variant='ghost'] .alea-accordion-trigger, .alea-accordion[data-variant='ghost'] .alea-accordion-content { padding-left: 0; padding-right: 0; }\n.alea-accordion[data-variant='ghost'] .alea-accordion-trigger::before { inset: var(--alea-space-1) calc(var(--alea-space-2) * -1); }\n/* filled: tinted sections, the open one lighter */\n.alea-accordion[data-variant='filled'] .alea-accordion-item { background: var(--alea-surface-deep); box-shadow: none; }\n.alea-accordion[data-variant='filled'] .alea-accordion-item[data-expanded] { background: var(--alea-surface-raised); }\n.alea-accordion-item[data-disabled] { opacity: 0.5; }\n.alea-accordion-panel { height: var(--disclosure-panel-height); overflow: clip; transition: height var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-accordion-content { padding: 0 var(--alea-space-5) var(--alea-space-5); color: var(--alea-text-muted); font-size: var(--alea-font-size-md); line-height: var(--alea-font-leading-relaxed); }\n"}],"deps":[],"npm":["react-aria-components","lucide-react"],"exports":["Accordion","AccordionItem"],"descriptions":{"Accordion":"A list of sections that expand and collapse: four looks, three sizes, the indicator on either side, icons, subtitles and extra content in each header. allowsMultipleExpanded keeps several open.","AccordionItem":"One expandable section. Works alone too (a single disclosure)."}},"ai":{"files":[{"path":"components/ai/AI.tsx","content":"import { useEffect, useId, useLayoutEffect, useRef, useState, type FormEvent, type KeyboardEvent, type ReactNode } from 'react';\nimport { ArrowUp, Square, Paperclip, Copy, Check, RefreshCw, ThumbsUp, ThumbsDown, ChevronRight, Loader2, CircleCheck, CircleAlert, Wrench, Sparkles } from 'lucide-react';\nimport { TextSwap } from '@alea-design/motion';\nimport { cx } from '../../utils/cx';\nimport { useStrings } from '../../i18n/strings';\n\n// ---------------------------------------------------------------- PromptInput\n\nexport interface PromptInputProps {\n /** The text (controlled). */\n value?: string;\n /** The text at first. */\n defaultValue?: string;\n /** Called on every change. */\n onChange?: (value: string) => void;\n /** Called with the text on Enter or the send button. Empty text never sends. */\n onSubmit?: (value: string) => void;\n /** A response is being generated: the send button becomes Stop, and the border glows. */\n isGenerating?: boolean;\n /** Called by the Stop button. */\n onStop?: () => void;\n /** Shows a paperclip button; called when it is pressed (open your file picker there). */\n onAttach?: () => void;\n /** Content above the text: attached files, a quoted message. */\n header?: ReactNode;\n /** Content at the start of the bottom row: a model select, tool toggles. */\n tools?: ReactNode;\n /** Shown while empty. */\n placeholder?: string;\n /** Visible label; without one the field is named \"Message\". */\n label?: ReactNode;\n /** Lines before it scrolls. Default 8. */\n maxRows?: number;\n /** Clears the text after sending. Default true. */\n clearOnSubmit?: boolean;\n /** Disables typing and sending. */\n isDisabled?: boolean;\n /** Shows the Enter and Shift+Enter hint under the field. Default false. */\n showHint?: boolean;\n /** Extra class names. */\n className?: string;\n}\n\n/** The message box of an assistant: grows with the text, Enter sends and Shift+Enter adds a line, a Send button that turns into Stop while a response is generated, a slot for files above and tools below. The border glows while it works. */\nexport function PromptInput({ value, defaultValue = '', onChange, onSubmit, isGenerating, onStop, onAttach, header, tools, placeholder, label, maxRows = 8, clearOnSubmit = true, isDisabled, showHint, className }: PromptInputProps) {\n const t = useStrings();\n const id = useId();\n const [own, setOwn] = useState(defaultValue);\n const text = value ?? own;\n const set = (v: string) => { if (value === undefined) setOwn(v); onChange?.(v); };\n const area = useRef<HTMLTextAreaElement>(null);\n // grow with the text up to maxRows, then scroll\n useLayoutEffect(() => {\n const el = area.current; if (!el) return;\n el.style.height = 'auto';\n const line = parseFloat(getComputedStyle(el).lineHeight) || 24;\n el.style.height = `${Math.min(el.scrollHeight, line * maxRows + 16)}px`;\n }, [text, maxRows]);\n const send = (e?: FormEvent) => {\n e?.preventDefault();\n if (isGenerating || isDisabled || !text.trim()) return;\n onSubmit?.(text.trim());\n if (clearOnSubmit) set('');\n };\n const onKey = (e: KeyboardEvent<HTMLTextAreaElement>) => {\n if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) { e.preventDefault(); send(); }\n };\n return (\n <form className={cx('alea-prompt', className)} data-generating={isGenerating || undefined} data-disabled={isDisabled || undefined} onSubmit={send}>\n {label && <label className=\"alea-label\" htmlFor={`${id}-input`}>{label}</label>}\n <div className=\"alea-prompt-box\">\n {header && <div className=\"alea-prompt-header\">{header}</div>}\n <textarea ref={area} id={`${id}-input`} className=\"alea-prompt-input\" rows={1} value={text} placeholder={placeholder} disabled={isDisabled}\n aria-label={label ? undefined : t.aiMessage} aria-describedby={showHint ? `${id}-hint` : undefined} aria-keyshortcuts=\"Enter\"\n onChange={e => set(e.target.value)} onKeyDown={onKey} />\n <div className=\"alea-prompt-row\">\n {onAttach && <button type=\"button\" className=\"alea-prompt-btn alea-focus-ring\" aria-label={t.aiAttach} title={t.aiAttach} onClick={onAttach} disabled={isDisabled}><Paperclip aria-hidden=\"true\" /></button>}\n <div className=\"alea-prompt-tools\">{tools}</div>\n {isGenerating\n ? <button type=\"button\" className=\"alea-prompt-send alea-focus-ring\" data-stop aria-label={t.aiStop} title={t.aiStop} onClick={onStop}><Square aria-hidden=\"true\" /></button>\n : <button type=\"submit\" className=\"alea-prompt-send alea-focus-ring\" aria-label={t.aiSend} title={t.aiSend} disabled={isDisabled || !text.trim()}><ArrowUp aria-hidden=\"true\" /></button>}\n </div>\n </div>\n {showHint && <p className=\"alea-prompt-hint\" id={`${id}-hint`}>{t.aiHint}</p>}\n <span className=\"alea-visually-hidden\" role=\"status\">{isGenerating ? t.aiGenerating : ''}</span>\n </form>\n );\n}\n\n// ---------------------------------------------------------------- PromptSuggestions\n\nexport interface PromptSuggestion {\n id: string;\n /** What is shown. */\n label: string;\n /** What is sent, when different from the label. */\n prompt?: string;\n /** An icon before the label. */\n icon?: ReactNode;\n /** A second line, for the card look. */\n description?: string;\n}\n\nexport interface PromptSuggestionsProps {\n /** The suggestions, each with its label and the prompt it sends. */\n items: PromptSuggestion[];\n /** Called with the prompt to send. */\n onSelect: (prompt: string, item: PromptSuggestion) => void;\n /** chips (default) for a row under the box, or cards for an empty conversation. */\n variant?: 'chips' | 'cards';\n /** Extra class names. */\n className?: string;\n}\n\n/** Starting points for a conversation, as chips or cards. Each is a button; they enter one after another. */\nexport function PromptSuggestions({ items, onSelect, variant = 'chips', className }: PromptSuggestionsProps) {\n const t = useStrings();\n return (\n <ul className={cx('alea-suggestions', className)} data-variant={variant} aria-label={t.aiSuggestions}>\n {items.map((it, i) => (\n <li key={it.id} style={{ ['--i' as string]: i }}>\n <button type=\"button\" className=\"alea-suggestion alea-focus-ring\" onClick={() => onSelect(it.prompt ?? it.label, it)}>\n {it.icon && <span className=\"alea-suggestion-icon\" aria-hidden=\"true\">{it.icon}</span>}\n <span className=\"alea-suggestion-text\"><span className=\"alea-suggestion-label\">{it.label}</span>{variant === 'cards' && it.description && <span className=\"alea-suggestion-desc\">{it.description}</span>}</span>\n </button>\n </li>\n ))}\n </ul>\n );\n}\n\n// ---------------------------------------------------------------- ResponseActions\n\nexport interface ResponseActionsProps {\n /** The text Copy puts on the clipboard. Leave out to hide Copy. */\n copyText?: string;\n /** Shows Regenerate. */\n onRegenerate?: () => void;\n /** Shows the thumbs; called with the choice (null when taken back). */\n onFeedback?: (value: 'good' | 'bad' | null) => void;\n /** The current feedback (controlled). */\n feedback?: 'good' | 'bad' | null;\n /** More buttons at the end: share, read aloud. */\n extra?: ReactNode;\n /** Extra class names. */\n className?: string;\n}\n\n/** The row under an answer: copy (it confirms), regenerate, and good or bad feedback as toggle buttons. */\nexport function ResponseActions({ copyText, onRegenerate, onFeedback, feedback, extra, className }: ResponseActionsProps) {\n const t = useStrings();\n const [copied, setCopied] = useState(false);\n const [own, setOwn] = useState<'good' | 'bad' | null>(null);\n const fb = feedback !== undefined ? feedback : own;\n const [said, setSaid] = useState('');\n const vote = (v: 'good' | 'bad') => { const next = fb === v ? null : v; setOwn(next); onFeedback?.(next); setSaid(next ? t.aiThanks : ''); };\n const copy = async () => { try { await navigator.clipboard.writeText(copyText ?? ''); } catch { /* blocked */ } setCopied(true); setSaid(t.aiCopied); setTimeout(() => setCopied(false), 1500); };\n return (\n <div className={cx('alea-response-actions', className)} role=\"group\" aria-label={t.aiResponseActions}>\n {copyText !== undefined && <button type=\"button\" className=\"alea-prompt-btn alea-focus-ring\" aria-label={copied ? t.aiCopied : t.aiCopy} title={t.aiCopy} onClick={copy} data-done={copied || undefined}>{copied ? <Check aria-hidden=\"true\" /> : <Copy aria-hidden=\"true\" />}</button>}\n {onRegenerate && <button type=\"button\" className=\"alea-prompt-btn alea-focus-ring\" aria-label={t.aiRegenerate} title={t.aiRegenerate} onClick={onRegenerate}><RefreshCw aria-hidden=\"true\" /></button>}\n {onFeedback && <>\n <button type=\"button\" className=\"alea-prompt-btn alea-focus-ring\" aria-label={t.aiGood} title={t.aiGood} aria-pressed={fb === 'good'} onClick={() => vote('good')}><ThumbsUp aria-hidden=\"true\" /></button>\n <button type=\"button\" className=\"alea-prompt-btn alea-focus-ring\" aria-label={t.aiBad} title={t.aiBad} aria-pressed={fb === 'bad'} onClick={() => vote('bad')}><ThumbsDown aria-hidden=\"true\" /></button>\n </>}\n {extra}\n <span className=\"alea-visually-hidden\" role=\"status\">{said}</span>\n </div>\n );\n}\n\n// ---------------------------------------------------------------- Reasoning\n\nexport interface ReasoningProps {\n /** The model's reasoning, as text or nodes. */\n children: ReactNode;\n /** Still thinking: the label shimmers and the panel stays open. */\n isThinking?: boolean;\n /** How long it thought, in seconds, shown when done. */\n seconds?: number;\n /** Open at first. Default: open while thinking, closed after. */\n defaultOpen?: boolean;\n /** While it thinks and the panel is closed, show the latest lines of the reasoning as they stream in, scrolling up under a soft fade. How many lines (1 to 4). Off by default. */\n previewLines?: 1 | 2 | 3 | 4;\n /** Extra class names. */\n className?: string;\n}\n\n/** The model's thinking, behind a disclosure: \"Thinking…\" shimmers while it works, then \"Thought for 4 s\" and it folds away. */\nexport function Reasoning({ children, isThinking, seconds, defaultOpen, previewLines, className }: ReasoningProps) {\n const t = useStrings();\n const id = useId();\n const [open, setOpen] = useState(defaultOpen ?? !!isThinking);\n const was = useRef(isThinking);\n // folds when thinking ends (unless someone opened it on purpose)\n useEffect(() => { if (was.current && !isThinking && defaultOpen === undefined) setOpen(false); was.current = isThinking; }, [isThinking, defaultOpen]);\n // the preview: a window of N lines over the streaming text; as the text grows it slides up by the overflow (a transform, so it stays smooth)\n const win = useRef<HTMLDivElement>(null), inner = useRef<HTMLDivElement>(null);\n const previewing = !!previewLines && !!isThinking && !open;\n useLayoutEffect(() => {\n if (!previewing || !win.current || !inner.current) return;\n const lh = parseFloat(getComputedStyle(win.current).lineHeight) || 1, over = Math.max(0, inner.current.scrollHeight - win.current.clientHeight);\n win.current.style.setProperty('--alea-preview-shift', `${-Math.ceil(over / lh - 0.01) * lh}px`); // whole lines, so a line is never cut in half at rest\n }, [children, previewing]);\n return (\n <div className={cx('alea-reasoning', className)} data-thinking={isThinking || undefined} data-open={open || undefined}>\n <button type=\"button\" className=\"alea-reasoning-toggle alea-focus-ring\" aria-expanded={open} aria-controls={`${id}-panel`} onClick={() => setOpen(o => !o)}>\n <Sparkles className=\"alea-reasoning-icon\" aria-hidden=\"true\" />\n <span className={isThinking ? 'alea-text-shimmer' : undefined}>{isThinking ? `${t.aiThinking}…` : seconds !== undefined ? t.aiThoughtFor(seconds) : t.aiReasoning}</span>\n <ChevronRight className=\"alea-reasoning-chevron\" aria-hidden=\"true\" />\n </button>\n {previewing && <div ref={win} className=\"alea-reasoning-preview\" data-lines={previewLines} aria-hidden=\"true\"><div ref={inner} className=\"alea-reasoning-preview-text\">{children}</div></div>}\n <div className=\"alea-reasoning-panel\" id={`${id}-panel`} role=\"region\" aria-label={t.aiReasoning} hidden={!open}>\n <div className=\"alea-reasoning-body\">{children}</div>\n </div>\n </div>\n );\n}\n\n// ---------------------------------------------------------------- ThinkingStatus\n\nexport interface ThinkingStatusProps {\n /** What it is doing right now: \"Searching the web\". Each change swaps with a soft blur crossfade. */\n children: string;\n /** Still working: the line shimmers. When false it holds still, with a check. Default true. */\n isActive?: boolean;\n /** Extra class names. */\n className?: string;\n}\n\n/** A one line status for an assistant that works in steps (\"Searching\", \"Reading 4 sources\", \"Writing\"): it shimmers while it works and swaps to the next step. Announced politely. */\nexport function ThinkingStatus({ children, isActive = true, className }: ThinkingStatusProps) {\n return (\n <span className={cx('alea-thinking-status', className)} data-active={isActive || undefined} role=\"status\">\n {isActive ? <Sparkles className=\"alea-thinking-status-icon\" aria-hidden=\"true\" /> : <Check className=\"alea-thinking-status-icon\" aria-hidden=\"true\" />}\n <TextSwap className={isActive ? 'alea-text-shimmer' : undefined}>{children}</TextSwap>\n </span>\n );\n}\n\n// ---------------------------------------------------------------- ToolCall\n\nexport interface ToolCallProps {\n /** The tool's name: \"Search the web\". */\n name: string;\n /** running, done or error. */\n status: 'running' | 'done' | 'error';\n /** A short line: the query, the file. */\n summary?: ReactNode;\n /** What was sent to the tool, shown when expanded. */\n input?: ReactNode;\n /** What came back, shown when expanded. */\n output?: ReactNode;\n /** An icon for the tool. */\n icon?: ReactNode;\n /** Extra class names. */\n className?: string;\n}\n\n/** One step of an agent: the tool, its status (running spins, done checks, error warns) and, on demand, what went in and what came back. Status changes are announced. */\nexport function ToolCall({ name, status, summary, input, output, icon, className }: ToolCallProps) {\n const t = useStrings();\n const id = useId();\n const [open, setOpen] = useState(false);\n const more = input !== undefined || output !== undefined;\n const Status = status === 'running' ? Loader2 : status === 'done' ? CircleCheck : CircleAlert;\n const head = (\n <>\n <span className=\"alea-tool-icon\" aria-hidden=\"true\">{icon ?? <Wrench />}</span>\n <span className=\"alea-tool-text\"><span className=\"alea-tool-name\">{name}</span>{summary && <span className=\"alea-tool-summary\">{summary}</span>}</span>\n <span className=\"alea-tool-status\" data-status={status}><Status aria-hidden=\"true\" /><span>{t.aiTool[status]}</span></span>\n {more && <ChevronRight className=\"alea-reasoning-chevron\" aria-hidden=\"true\" />}\n </>\n );\n return (\n <div className={cx('alea-tool', className)} data-status={status} data-open={open || undefined}>\n {more\n ? <button type=\"button\" className=\"alea-tool-head alea-focus-ring\" aria-expanded={open} aria-controls={`${id}-panel`} onClick={() => setOpen(o => !o)}>{head}</button>\n : <div className=\"alea-tool-head\">{head}</div>}\n <span className=\"alea-visually-hidden\" role=\"status\">{`${name}: ${t.aiTool[status]}`}</span>\n {more && (\n <div className=\"alea-tool-panel\" id={`${id}-panel`} hidden={!open}>\n {input !== undefined && <div><p className=\"alea-tool-label\">{t.aiToolInput}</p><div className=\"alea-tool-code\">{input}</div></div>}\n {output !== undefined && <div><p className=\"alea-tool-label\">{t.aiToolOutput}</p><div className=\"alea-tool-code\">{output}</div></div>}\n </div>\n )}\n </div>\n );\n}\n\n// ---------------------------------------------------------------- Sources and Citation\n\nexport interface Source {\n id: string;\n title: string;\n href: string;\n /** A short quote or description. */\n snippet?: string;\n}\n\nexport interface SourcesProps {\n /** The sources in citation order, each with its title, link and an optional snippet. */\n sources: Source[];\n /** Extra class names. */\n className?: string;\n}\n\nconst host = (u: string) => { try { return new URL(u).hostname.replace(/^www\\./, ''); } catch { return u; } };\n\n/** The sources behind an answer, numbered to match the citations in the text, each a link with its site. */\nexport function Sources({ sources, className }: SourcesProps) {\n const t = useStrings();\n const id = useId();\n return (\n <section className={cx('alea-sources', className)} aria-labelledby={`${id}-title`}>\n <h3 className=\"alea-sources-title\" id={`${id}-title`}>{t.aiSources}</h3>\n <ol className=\"alea-sources-list\">\n {sources.map((s, i) => (\n <li key={s.id} id={`alea-source-${s.id}`} style={{ ['--i' as string]: i }}>\n <a className=\"alea-source alea-focus-ring\" href={s.href} target=\"_blank\" rel=\"noopener noreferrer\">\n <span className=\"alea-source-n\" aria-hidden=\"true\">{i + 1}</span>\n <span className=\"alea-source-text\"><span className=\"alea-source-title\">{s.title}</span><span className=\"alea-source-host\">{host(s.href)}</span>{s.snippet && <span className=\"alea-source-snippet\">{s.snippet}</span>}</span>\n </a>\n </li>\n ))}\n </ol>\n </section>\n );\n}\n\nexport interface CitationProps {\n /** The number shown, matching Sources. */\n n: number;\n /** The source it points to. */\n source: Source;\n /** Extra class names. */\n className?: string;\n}\n\n/** An inline citation: a small number that links to its source and is named with the source's title. */\nexport function Citation({ n, source, className }: CitationProps) {\n const t = useStrings();\n return <a className={cx('alea-citation alea-focus-ring', className)} href={source.href} target=\"_blank\" rel=\"noopener noreferrer\" aria-label={t.aiSource(n, source.title)} title={`${source.title} · ${host(source.href)}`}>{n}</a>;\n}\n\n// ---------------------------------------------------------------- AIOrb\n\nexport interface AIOrbProps {\n /** idle (a slow drift), listening (it breathes), thinking (it swirls) or speaking (it pulses). */\n state?: 'idle' | 'listening' | 'thinking' | 'speaking';\n /** Size in px. Default 48. */\n size?: number;\n /** Announces state changes (for a voice assistant). Default false: decorative. */\n announce?: boolean;\n /** Extra class names. */\n className?: string;\n}\n\n/** A living gradient orb for an assistant: its motion shows what it is doing. Decorative unless announce is on; with reduced motion it holds still. */\nexport function AIOrb({ state = 'idle', size = 48, announce, className }: AIOrbProps) {\n const t = useStrings();\n return (\n <span className={cx('alea-orb-ai', className)} data-state={state} style={{ ['--orb' as string]: `${size}px` }} {...(announce ? { role: 'img', 'aria-label': t.aiOrb[state] } : { 'aria-hidden': true })}>\n <span className=\"alea-orb-ai-glow\" /><span className=\"alea-orb-ai-core\" /><span className=\"alea-orb-ai-shine\" />\n </span>\n );\n}\n"},{"path":"components/ai/ai.css","content":"/* AI: prompt box, suggestions, response actions, reasoning, tool calls, sources and the orb */\n@property --alea-prompt-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }\n\n.alea-prompt { display: flex; flex-direction: column; gap: var(--alea-space-2); min-width: 0; }\n.alea-prompt-box { position: relative; display: flex; flex-direction: column; gap: var(--alea-space-1); padding: var(--alea-space-2); border-radius: var(--alea-radius-lg); background: var(--alea-field-bg); box-shadow: inset 0 0 0 1px var(--alea-border-control); transition: box-shadow var(--alea-motion-duration-fast) var(--alea-motion-ease-out); }\n.alea-prompt-box:focus-within { box-shadow: inset 0 0 0 1px var(--alea-accent), 0 0 0 3px var(--alea-focus-halo); }\n/* while generating: a light runs around the border */\n.alea-prompt[data-generating] .alea-prompt-box::before { content: ''; position: absolute; inset: calc(var(--alea-space-0-25) * -1); border-radius: inherit; padding: var(--alea-space-0-5); pointer-events: none;\n background: conic-gradient(from var(--alea-prompt-angle), transparent 0 60%, var(--alea-chart-2) 75%, var(--alea-accent) 90%, transparent);\n -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;\n animation: alea-prompt-spin 2.4s linear infinite; }\n@keyframes alea-prompt-spin { to { --alea-prompt-angle: 360deg; } }\n.alea-prompt-header { display: flex; flex-wrap: wrap; gap: var(--alea-space-2); padding: var(--alea-space-1); }\n.alea-prompt-input { width: 100%; min-height: 40px; padding: var(--alea-space-2); border: 0; background: transparent; color: var(--alea-text); font: var(--alea-font-size-md) / 1.5 var(--alea-font-family-body); resize: none; outline: none; }\n.alea-prompt-input::placeholder { color: var(--alea-text-faint); }\n.alea-prompt-row { display: flex; align-items: center; gap: var(--alea-space-1); }\n.alea-prompt-tools { display: flex; flex: 1; align-items: center; gap: var(--alea-space-1); min-width: 0; }\n.alea-prompt-btn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--alea-radius-sm); background: none; color: var(--alea-text-muted); cursor: pointer; transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-out), color var(--alea-motion-duration-fast) var(--alea-motion-ease-out); }\n.alea-prompt-btn svg { width: 16px; height: 16px; }\n.alea-prompt-btn:hover { color: var(--alea-text); background: var(--alea-surface-hover); }\n.alea-prompt-btn:active { transform: scale(var(--alea-motion-scale-press)); }\n.alea-prompt-btn[aria-pressed='true'] { color: var(--alea-accent-strong); background: var(--alea-accent-subtle); }\n.alea-prompt-btn[data-done] { color: var(--alea-status-success); }\n.alea-prompt-btn:disabled { opacity: 0.45; cursor: not-allowed; }\n.alea-prompt-send { display: grid; place-items: center; width: 32px; height: 32px; flex: none; padding: 0; border: 0; border-radius: var(--alea-radius-full); background: var(--alea-accent-solid); color: var(--alea-accent-on); cursor: pointer; transition: transform var(--alea-motion-duration-fast) var(--alea-motion-ease-emphasized), opacity var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-prompt-send svg { width: 16px; height: 16px; }\n.alea-prompt-send[data-stop] svg { width: 12px; height: 12px; fill: currentColor; }\n.alea-prompt-send:hover:not(:disabled) { transform: scale(calc(1 + (1 - var(--alea-motion-scale-press)) * 1.5)); }\n.alea-prompt-send:disabled { background: var(--alea-surface-raised); color: var(--alea-text-faint); cursor: not-allowed; }\n.alea-prompt-hint { margin: 0; color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); }\n.alea-prompt[data-disabled] .alea-prompt-box { opacity: 0.6; }\n@media (pointer: coarse) { .alea-prompt-btn, .alea-prompt-send { width: 44px; height: 44px; } }\n\n.alea-suggestions { display: flex; flex-wrap: wrap; gap: var(--alea-space-2); margin: 0; padding: 0; list-style: none; }\n.alea-suggestions[data-variant='cards'] { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }\n.alea-suggestions > li { animation: alea-ai-rise var(--alea-motion-duration-base) var(--alea-motion-ease-out) both; animation-delay: calc(var(--i) * var(--alea-motion-stagger)); }\n@keyframes alea-ai-rise { from { opacity: 0.01; transform: translateY(var(--alea-motion-distance-sm)); } }\n.alea-suggestion { display: flex; align-items: center; gap: var(--alea-space-2); width: 100%; min-height: 36px; padding: var(--alea-space-2) var(--alea-space-3); border: 0; border-radius: var(--alea-radius-full); background: var(--alea-surface-raised); box-shadow: inset 0 0 0 1px var(--alea-border); color: var(--alea-text); font: var(--alea-font-size-sm) / 1.4 var(--alea-font-family-body); text-align: start; cursor: pointer; transition: box-shadow var(--alea-motion-duration-fast) var(--alea-motion-ease-out), transform var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-suggestion:hover { box-shadow: inset 0 0 0 1px var(--alea-accent); }\n.alea-suggestion:active { transform: scale(var(--alea-motion-scale-press)); }\n.alea-suggestions[data-variant='cards'] .alea-suggestion { align-items: flex-start; height: 100%; padding: var(--alea-space-4); border-radius: var(--alea-radius-lg); }\n.alea-suggestions[data-variant='cards'] .alea-suggestion:hover { transform: translateY(var(--alea-motion-lift)); }\n.alea-suggestion-icon { display: grid; color: var(--alea-icon-accent); }\n.alea-suggestion-icon svg { width: 16px; height: 16px; }\n.alea-suggestion-text { display: flex; flex-direction: column; gap: var(--alea-space-1); }\n.alea-suggestion-label { font-weight: var(--alea-font-weight-medium); }\n.alea-suggestion-desc { color: var(--alea-text-muted); }\n\n.alea-response-actions { display: flex; flex-wrap: wrap; gap: var(--alea-space-0-5); }\n\n.alea-reasoning { display: flex; flex-direction: column; gap: var(--alea-space-2); }\n.alea-reasoning-toggle { display: inline-flex; align-self: flex-start; align-items: center; gap: var(--alea-space-2); padding: var(--alea-space-1) var(--alea-space-2); margin-inline-start: calc(var(--alea-space-2) * -1); border: 0; border-radius: var(--alea-radius-sm); background: none; color: var(--alea-text-muted); font: var(--alea-font-weight-medium) var(--alea-font-size-sm) / 1.4 var(--alea-font-family-body); cursor: pointer; }\n.alea-reasoning-toggle:hover { color: var(--alea-text); background: var(--alea-surface-hover); }\n.alea-reasoning-icon { width: 16px; height: 16px; color: var(--alea-icon-accent); }\n.alea-reasoning[data-thinking] .alea-reasoning-icon { animation: alea-ai-twinkle 1.6s var(--alea-motion-ease-in-out) infinite; }\n@keyframes alea-ai-twinkle { 50% { transform: rotate(20deg) scale(0.85); opacity: 0.6; } }\n.alea-reasoning-chevron { width: 16px; height: 16px; transition: transform var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n[data-open] > .alea-reasoning-toggle .alea-reasoning-chevron, [data-open] > .alea-tool-head .alea-reasoning-chevron { transform: rotate(90deg); }\n.alea-reasoning-panel { animation: alea-ai-rise var(--alea-motion-duration-base) var(--alea-motion-ease-out) both; }\n.alea-reasoning-body { padding-inline-start: var(--alea-space-4); border-inline-start: 2px solid var(--alea-border-strong); color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); line-height: 1.6; }\n\n.alea-tool { border-radius: var(--alea-radius-md); background: var(--alea-surface); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-tool-head { display: flex; align-items: center; gap: var(--alea-space-3); width: 100%; padding: var(--alea-space-2) var(--alea-space-3); border: 0; border-radius: inherit; background: none; color: var(--alea-text); font: inherit; text-align: start; }\nbutton.alea-tool-head { cursor: pointer; }\nbutton.alea-tool-head:hover { background: var(--alea-surface-hover); }\n.alea-tool-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: var(--alea-radius-sm); background: var(--alea-surface-raised); color: var(--alea-icon-muted); }\n.alea-tool-icon svg { width: 16px; height: 16px; }\n.alea-tool-text { display: flex; flex: 1; flex-direction: column; min-width: 0; }\n.alea-tool-name { font-size: var(--alea-font-size-sm); font-weight: var(--alea-font-weight-semibold); }\n.alea-tool-summary { overflow: hidden; color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); text-overflow: ellipsis; white-space: nowrap; }\n.alea-tool-status { display: inline-flex; align-items: center; gap: var(--alea-space-1); color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); }\n.alea-tool-status svg { width: 16px; height: 16px; }\n.alea-tool-status[data-status='running'] svg { animation: alea-ai-spin 0.8s linear infinite; }\n.alea-tool-status[data-status='done'] { color: var(--alea-status-success); }\n.alea-tool-status[data-status='error'] { color: var(--alea-status-danger); }\n@keyframes alea-ai-spin { to { transform: rotate(360deg); } }\n.alea-tool-panel { display: grid; gap: var(--alea-space-3); padding: 0 var(--alea-space-3) var(--alea-space-3); animation: alea-ai-rise var(--alea-motion-duration-base) var(--alea-motion-ease-out) both; }\n.alea-tool-label { margin: 0 0 var(--alea-space-1); color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); font-weight: var(--alea-font-weight-semibold); text-transform: uppercase; letter-spacing: 0.04em; }\n.alea-tool-code { overflow: auto; padding: var(--alea-space-2) var(--alea-space-3); border-radius: var(--alea-radius-sm); background: var(--alea-surface-deep); font: var(--alea-font-size-xs) / 1.6 var(--alea-font-family-mono); white-space: pre-wrap; }\n\n.alea-sources { display: flex; flex-direction: column; gap: var(--alea-space-2); }\n.alea-sources-title { margin: 0; color: var(--alea-text-muted); font: var(--alea-font-weight-semibold) var(--alea-font-size-xs) / 1.4 var(--alea-font-family-body); text-transform: uppercase; letter-spacing: 0.04em; }\n.alea-sources-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: var(--alea-space-2); margin: 0; padding: 0; list-style: none; }\n.alea-sources-list > li { animation: alea-ai-rise var(--alea-motion-duration-base) var(--alea-motion-ease-out) both; animation-delay: calc(var(--i) * var(--alea-motion-stagger)); }\n.alea-source { display: flex; gap: var(--alea-space-2); height: 100%; padding: var(--alea-space-2) var(--alea-space-3); border-radius: var(--alea-radius-md); background: var(--alea-surface); box-shadow: inset 0 0 0 1px var(--alea-border); color: var(--alea-text); text-decoration: none; transition: box-shadow var(--alea-motion-duration-fast) var(--alea-motion-ease-out); }\n.alea-source:hover { box-shadow: inset 0 0 0 1px var(--alea-accent); }\n.alea-source-n { display: grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: var(--alea-radius-full); background: var(--alea-accent-subtle); color: var(--alea-accent-strong); font-size: var(--alea-font-size-xs); font-weight: var(--alea-font-weight-semibold); }\n.alea-source-text { display: flex; flex-direction: column; gap: var(--alea-space-0-5); min-width: 0; }\n.alea-source-title { overflow: hidden; font-size: var(--alea-font-size-sm); font-weight: var(--alea-font-weight-medium); text-overflow: ellipsis; white-space: nowrap; }\n.alea-source-host { color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); }\n.alea-source-snippet { display: -webkit-box; overflow: hidden; color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }\n.alea-citation { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 var(--alea-space-1); margin-inline: var(--alea-space-0-5); border-radius: var(--alea-radius-full); background: var(--alea-accent-subtle); color: var(--alea-accent-strong); font: var(--alea-font-weight-semibold) 11px / 1 var(--alea-font-family-body); text-decoration: none; vertical-align: 0.15em; transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-citation:hover { background: var(--alea-accent-solid); color: var(--alea-accent-on); }\n\n.alea-orb-ai { position: relative; display: inline-grid; width: var(--orb); height: var(--orb); flex: none; isolation: isolate; }\n.alea-orb-ai-core, .alea-orb-ai-glow { grid-area: 1 / 1; border-radius: 50%; background: conic-gradient(from 0deg, var(--alea-accent), var(--alea-chart-2), var(--alea-chart-3, var(--alea-accent)), var(--alea-accent)); }\n/* the core is softened so the gradient's seam disappears; the shine on top gives it volume */\n.alea-orb-ai-core { filter: blur(calc(var(--orb) / 20)) saturate(1.2); }\n.alea-orb-ai-shine { grid-area: 1 / 1; border-radius: 50%; pointer-events: none;\n background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--alea-on-media) 55%, transparent), transparent 42%), radial-gradient(circle at 70% 80%, color-mix(in srgb, var(--alea-media-backdrop) 28%, transparent), transparent 55%); }\n.alea-orb-ai-core { animation: alea-orb-turn 8s linear infinite, alea-orb-shape 6s var(--alea-motion-ease-in-out) infinite; }\n.alea-orb-ai-glow { z-index: -1; filter: blur(calc(var(--orb) / 4)); opacity: 0.55; animation: alea-orb-turn 8s linear infinite reverse; }\n.alea-orb-ai[data-state='listening'] .alea-orb-ai-core { animation: alea-orb-turn 6s linear infinite, alea-orb-breathe 1.8s var(--alea-motion-ease-in-out) infinite; }\n.alea-orb-ai[data-state='thinking'] .alea-orb-ai-core { animation: alea-orb-turn 1.6s linear infinite, alea-orb-shape 1.8s var(--alea-motion-ease-in-out) infinite; }\n.alea-orb-ai[data-state='speaking'] .alea-orb-ai-core { animation: alea-orb-turn 4s linear infinite, alea-orb-pulse 0.6s var(--alea-motion-ease-in-out) infinite alternate; }\n.alea-orb-ai[data-state='speaking'] .alea-orb-ai-glow { opacity: 0.8; }\n@keyframes alea-orb-turn { to { rotate: 360deg; } }\n@keyframes alea-orb-shape { 33% { border-radius: 44% 56% 52% 48%; } 66% { border-radius: 56% 44% 46% 54%; } }\n@keyframes alea-orb-breathe { 50% { transform: scale(0.9); } }\n@keyframes alea-orb-pulse { from { transform: scale(0.94); } to { transform: scale(1.06); } }\n\n/* reduced motion: nothing spins or swirls; the generating border stays as a still glow, spinners slow down */\n@media (prefers-reduced-motion: reduce) {\n :root:not([data-alea-reduced='never']) :is(.alea-orb-ai-core, .alea-orb-ai-glow, .alea-reasoning-icon, .alea-suggestions > li, .alea-sources-list > li) { animation: none !important; }\n :root:not([data-alea-reduced='never']) .alea-prompt[data-generating] .alea-prompt-box::before { animation: none; }\n :root:not([data-alea-reduced='never']) .alea-tool-status[data-status='running'] svg { animation-duration: 2.4s; }\n}\n:is([data-alea-motion='reduced'], [data-alea-reduced='always']) :is(.alea-orb-ai-core, .alea-orb-ai-glow, .alea-reasoning-icon) { animation: none !important; }\n:is([data-alea-motion='reduced'], [data-alea-reduced='always']) .alea-prompt-box::before { animation: none !important; }\n\n/* Reasoning preview: the latest lines of the thought, sliding up as it streams */\n.alea-reasoning-preview { --alea-preview-lh: 1.5em; position: relative; overflow: hidden; height: calc(var(--alea-preview-lh) * var(--alea-preview-n, 2)); padding-inline-start: var(--alea-space-4); border-inline-start: 2px solid var(--alea-border-strong); color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); line-height: var(--alea-preview-lh); -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--alea-preview-lh)); mask-image: linear-gradient(to bottom, transparent 0, #000 var(--alea-preview-lh)); }\n.alea-reasoning-preview[data-lines='1'] { --alea-preview-n: 1; mask-image: none; -webkit-mask-image: none; }\n.alea-reasoning-preview[data-lines='2'] { --alea-preview-n: 2; } .alea-reasoning-preview[data-lines='3'] { --alea-preview-n: 3; } .alea-reasoning-preview[data-lines='4'] { --alea-preview-n: 4; }\n.alea-reasoning-preview-text { transform: translateY(var(--alea-preview-shift, 0px)); transition: transform var(--alea-motion-duration-slow) var(--alea-motion-ease-out); }\n@media (prefers-reduced-motion: reduce) { :root:not([data-alea-reduced='never']) .alea-reasoning-preview-text { transition: none; } }\n:is([data-alea-motion='reduced'], [data-alea-reduced='always']) .alea-reasoning-preview-text { transition: none; }\n\n/* ThinkingStatus: one status line, a small icon, the text swaps */\n.alea-thinking-status { display: inline-flex; align-items: center; gap: var(--alea-space-2); color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n.alea-thinking-status-icon { width: 16px; height: 16px; flex: none; color: var(--alea-icon-accent); }\n.alea-thinking-status[data-active] .alea-thinking-status-icon { animation: alea-ai-twinkle 1.6s var(--alea-motion-ease-in-out) infinite; }\n@media (prefers-reduced-motion: reduce) { :root:not([data-alea-reduced='never']) .alea-thinking-status-icon { animation: none !important; } }\n:is([data-alea-motion='reduced'], [data-alea-reduced='always']) .alea-thinking-status-icon { animation: none !important; }\n"}],"deps":[],"npm":["lucide-react","@alea-design/motion"],"exports":["PromptInput","PromptSuggestions","ResponseActions","Reasoning","ThinkingStatus","ToolCall","Sources","Citation","AIOrb"],"descriptions":{"PromptInput":"The message box of an assistant: grows with the text, Enter sends and Shift+Enter adds a line, a Send button that turns into Stop while a response is generated, a slot for files above and tools below. The border glows while it works.","PromptSuggestions":"Starting points for a conversation, as chips or cards. Each is a button; they enter one after another.","ResponseActions":"The row under an answer: copy (it confirms), regenerate, and good or bad feedback as toggle buttons.","Reasoning":"The model's thinking, behind a disclosure: \"Thinking…\" shimmers while it works, then \"Thought for 4 s\" and it folds away.","ThinkingStatus":"A one line status for an assistant that works in steps (\"Searching\", \"Reading 4 sources\", \"Writing\"): it shimmers while it works and swaps to the next step. Announced politely.","ToolCall":"One step of an agent: the tool, its status (running spins, done checks, error warns) and, on demand, what went in and what came back. Status changes are announced.","Sources":"The sources behind an answer, numbered to match the citations in the text, each a link with its site.","Citation":"An inline citation: a small number that links to its source and is named with the source's title.","AIOrb":"A living gradient orb for an assistant: its motion shows what it is doing. Decorative unless announce is on; with reduced motion it holds still."}},"app":{"files":[{"path":"components/app/AppParts.tsx","content":"import { useEffect, useId, useMemo, useRef, useState, type KeyboardEvent as ReactKeyboardEvent, type ReactNode } from 'react';\nimport { DialogTrigger } from 'react-aria-components';\nimport { Minus, Maximize2, Minimize2, X, LayoutGrid } from 'lucide-react';\nimport { cx } from '../../utils/cx';\nimport { useControlled } from '../../utils/controlled';\nimport { IconButton } from '../button/Button';\nimport { Popover, PopoverDialog } from '../overlay/Overlay';\nimport { Modal } from '../overlay/Modal';\nimport { SearchField } from '../field/Field';\nimport { useStrings } from '../../i18n/strings';\n\n// ---------------------------------------------------------------- DockedWindow\n\nexport interface DockedWindowProps {\n /** The title in the bar; it names the window. */\n title: ReactNode;\n /** The content: a form (compose a message), a list (uploads), a chat. */\n children: ReactNode;\n /** Content pinned at the bottom: Send, Discard. */\n footer?: ReactNode;\n /** Shows a close button and calls this. */\n onClose?: () => void;\n /** Minimized to its title bar (controlled). */\n isMinimized?: boolean;\n /** Minimized at first. */\n defaultMinimized?: boolean;\n /** Called when it is minimized or restored. */\n onMinimizedChange?: (minimized: boolean) => void;\n /** Shows a button that grows it to most of the screen. */\n allowMaximize?: boolean;\n /** Width when docked, in px. Default 480. */\n width?: number;\n /** Height of the content when open, in px. Default 420. */\n height?: number;\n /** Something next to the title: a count, a status. */\n meta?: ReactNode;\n /** Extra class names. */\n className?: string;\n}\n\n/** A window docked at the bottom of the screen that people keep open while they work: a message being written, uploads in progress, a chat. It minimizes to its bar, can grow to most of the screen, and several sit side by side in a DockedWindowStack. Not modal: the page stays usable. */\nexport function DockedWindow({ title, children, footer, onClose, isMinimized, defaultMinimized = false, onMinimizedChange, allowMaximize, width = 480, height = 420, meta, className }: DockedWindowProps) {\n const t = useStrings();\n const id = useId();\n const [min, setMin] = useControlled(isMinimized, defaultMinimized, onMinimizedChange);\n const [max, setMax] = useState(false);\n return (\n <section className={cx('alea-dock-win', className)} role=\"dialog\" aria-modal=\"false\" aria-labelledby={`${id}-t`} data-minimized={min || undefined} data-maximized={max || undefined}\n style={{ ['--dock-w' as string]: `${width}px`, ['--dock-h' as string]: `${height}px` }}\n onKeyDown={e => { if (e.key === 'Escape' && max) { e.stopPropagation(); setMax(false); } }}>\n <header className=\"alea-dock-bar\">\n <button type=\"button\" className=\"alea-dock-title alea-focus-ring\" id={`${id}-t`} aria-expanded={!min} aria-controls={`${id}-c`} onClick={() => { setMin(!min); if (!min) setMax(false); }}>\n <span className=\"alea-dock-title-text\">{title}</span>{meta && <span className=\"alea-dock-meta\">{meta}</span>}\n </button>\n <div className=\"alea-dock-tools\">\n <IconButton size=\"sm\" variant=\"ghost\" aria-label={min ? t.restore : t.minimize} onPress={() => { setMin(!min); setMax(false); }}><Minus /></IconButton>\n {allowMaximize && <IconButton size=\"sm\" variant=\"ghost\" aria-label={max ? t.exitMaximize : t.maximize} onPress={() => { setMax(!max); setMin(false); }}>{max ? <Minimize2 /> : <Maximize2 />}</IconButton>}\n {onClose && <IconButton size=\"sm\" variant=\"ghost\" aria-label={t.close} onPress={onClose}><X /></IconButton>}\n </div>\n </header>\n <div className=\"alea-dock-content\" id={`${id}-c`} hidden={min}>\n <div className=\"alea-dock-body\">{children}</div>\n {footer && <div className=\"alea-dock-footer\">{footer}</div>}\n </div>\n </section>\n );\n}\n\nexport interface DockedWindowStackProps {\n /** DockedWindow elements, newest last. */\n children: ReactNode;\n /** Where the stack sits: end (default) or start. */\n placement?: 'start' | 'end';\n /** fixed to the viewport (default) or inline, for demos and previews. */\n position?: 'fixed' | 'inline';\n /** Extra class names. */\n className?: string;\n}\n\n/** Holds docked windows side by side along the bottom of the screen; on phones they stack full width. */\nexport function DockedWindowStack({ children, placement = 'end', position = 'fixed', className }: DockedWindowStackProps) {\n return <div className={cx('alea-dock-stack', className)} data-placement={placement} data-position={position}>{children}</div>;\n}\n\n// ---------------------------------------------------------------- SelectionBar\n\nexport interface SelectionBarProps {\n /** How many items are selected; at 0 the bar hides. */\n count: number;\n /** Clears the selection (the X button and Escape). */\n onClear: () => void;\n /** Actions on the selection: Archive, Delete, Move (small Buttons or IconButtons). */\n children: ReactNode;\n /** The text with the count. Default \"3 selected\". */\n label?: (count: number) => ReactNode;\n /** floating (centered at the bottom of the screen, default) or inline (where you put it, like a toolbar over a table). */\n variant?: 'floating' | 'inline';\n /** Extra class names. */\n className?: string;\n}\n\n/** A bar that appears while items are selected, with the count, actions on them and a way to clear the selection. A toolbar (one Tab stop group of actions); the count is announced as it changes; Escape clears. */\nexport function SelectionBar({ count, onClear, children, label, variant = 'floating', className }: SelectionBarProps) {\n const t = useStrings();\n return (\n <div className={cx('alea-selbar', className)} data-variant={variant} data-visible={count > 0 || undefined} inert={count === 0 || undefined} aria-hidden={count === 0 || undefined}>\n <div className=\"alea-selbar-inner\" role=\"toolbar\" aria-label={t.selection} onKeyDown={e => { if (e.key === 'Escape') onClear(); }}>\n <IconButton size=\"sm\" variant=\"ghost\" aria-label={t.clearSelection} onPress={onClear}><X /></IconButton>\n <span className=\"alea-selbar-count\" role=\"status\">{count > 0 ? (label ? label(count) : t.selectedN(count)) : ''}</span>\n <span className=\"alea-selbar-sep\" aria-hidden=\"true\" />\n <div className=\"alea-selbar-actions\">{children}</div>\n </div>\n </div>\n );\n}\n\n// ---------------------------------------------------------------- KeyboardShortcuts\n\nexport interface Shortcut {\n /** The keys, pressed together: ['mod', 'K'] (\"mod\" is each system's main modifier: ⌘ or Ctrl). For a sequence, pass several combos: [['G'], ['I']]. */\n keys: string[] | string[][];\n /** What it does. */\n label: string;\n}\n\nexport interface KeyboardShortcutsProps {\n /** The shortcuts in groups: Navigation, Actions, Editing. */\n groups: Array<{ title: string; shortcuts: Shortcut[] }>;\n /** Open (controlled). Leave out and pass openKey to open it from the keyboard. */\n isOpen?: boolean;\n /** Called when it opens or closes. */\n onOpenChange?: (open: boolean) => void;\n /** A key that opens it from anywhere (outside text fields). Default \"?\". */\n openKey?: string | false;\n /** A button that opens it. */\n trigger?: ReactNode;\n /** The title. Default \"Keyboard shortcuts\". */\n title?: ReactNode;\n}\n\nconst isMac = () => typeof navigator !== 'undefined' && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent);\nconst KEY_NAMES: Record<string, [string, string]> = { mod: ['⌘', 'Ctrl'], alt: ['⌥', 'Alt'], shift: ['⇧', 'Shift'], enter: ['↵', 'Enter'], up: ['↑', '↑'], down: ['↓', '↓'], left: ['←', '←'], right: ['→', '→'], esc: ['Esc', 'Esc'] };\n\n/** Every keyboard shortcut of an app in one searchable dialog, opened with \"?\" from anywhere. The main modifier shows as each system's own key (⌘ or Ctrl); sequences (\"G then I\") read as such. */\nexport function KeyboardShortcuts({ groups, isOpen, onOpenChange, openKey = '?', trigger, title }: KeyboardShortcutsProps) {\n const t = useStrings();\n const [open, setOpen] = useControlled(isOpen, false, onOpenChange);\n const [q, setQ] = useState('');\n const mac = useMemo(isMac, []);\n useEffect(() => {\n if (!openKey) return;\n const on = (e: KeyboardEvent) => {\n const el = e.target as HTMLElement;\n const hit = e.key === openKey || (openKey === '?' && e.shiftKey && e.code === 'Slash');\n if (!hit || e.metaKey || e.ctrlKey || el.closest('input, textarea, select, [contenteditable=\"true\"]')) return;\n e.preventDefault(); setOpen(true);\n };\n window.addEventListener('keydown', on);\n return () => window.removeEventListener('keydown', on);\n }, [openKey]); // eslint-disable-line react-hooks/exhaustive-deps\n const name = (k: string) => KEY_NAMES[k.toLowerCase()]?.[mac ? 0 : 1] ?? k;\n const combos = (s: Shortcut) => (Array.isArray(s.keys[0]) ? (s.keys as string[][]) : [s.keys as string[]]);\n const query = q.trim().toLowerCase();\n const shown = groups.map(g => ({ ...g, shortcuts: g.shortcuts.filter(s => !query || s.label.toLowerCase().includes(query) || combos(s).flat().some(k => name(k).toLowerCase() === query)) })).filter(g => g.shortcuts.length);\n return (\n <Modal isOpen={open} onOpenChange={o => { setOpen(o); if (!o) setQ(''); }} trigger={trigger} title={title ?? t.keyboardShortcuts} size=\"lg\" placement=\"top\" fullscreenBelow=\"sm\">\n <SearchField aria-label={t.searchShortcuts} placeholder={t.searchShortcuts} value={q} onChange={setQ} autoFocus />\n {shown.length === 0 ? <p className=\"alea-kbs-empty\" role=\"status\">{t.noShortcuts}</p> : (\n <div className=\"alea-kbs\">\n {shown.map(g => (\n <section key={g.title} className=\"alea-kbs-group\" aria-label={g.title}>\n <h3 className=\"alea-kbs-title\">{g.title}</h3>\n <dl className=\"alea-kbs-list\">\n {g.shortcuts.map(s => (\n <div key={s.label} className=\"alea-kbs-row\">\n <dt>{s.label}</dt>\n <dd>{combos(s).map((c, i) => (\n <span key={i} className=\"alea-kbs-combo\">\n {i > 0 && <span className=\"alea-kbs-then\">{t.thenKey}</span>}\n {c.map(k => <kbd key={k} className=\"alea-kbd\">{name(k)}</kbd>)}\n </span>\n ))}</dd>\n </div>\n ))}\n </dl>\n </section>\n ))}\n </div>\n )}\n </Modal>\n );\n}\n\n// ---------------------------------------------------------------- AppLauncher\n\nexport interface AppLauncherItem {\n id: string;\n label: string;\n /** An icon or logo. */\n icon: ReactNode;\n href: string;\n /** Tile color behind the icon (a token or any CSS color). */\n color?: string;\n}\n\nexport interface AppLauncherProps {\n /** The apps, in order. */\n apps: AppLauncherItem[];\n /** Columns in the grid. Default 3. */\n columns?: number;\n /** A link at the bottom: \"More apps\". */\n moreHref?: string;\n /** Name of the button. Default \"Apps\". */\n 'aria-label'?: string;\n /** Where the grid opens. Default bottom end. */\n placement?: 'bottom end' | 'bottom start' | 'bottom';\n}\n\n/** The grid of apps behind a button in the header, to jump between the products of a suite. A navigation of links: arrows move in the grid, Tab leaves it. */\nexport function AppLauncher({ apps, columns = 3, moreHref, 'aria-label': label, placement = 'bottom end' }: AppLauncherProps) {\n const t = useStrings();\n const grid = useRef<HTMLUListElement>(null);\n // the dialog focuses itself once it has opened; hand that focus to the first app, so the arrows work right away\n const focusFirst = (el: HTMLUListElement | null) => {\n grid.current = el;\n const dialog = el?.closest<HTMLElement>('[role=\"dialog\"]');\n if (!el || !dialog) return;\n const toFirst = (e: FocusEvent) => { if (e.target === dialog) el.querySelector<HTMLAnchorElement>('a')?.focus(); };\n dialog.addEventListener('focus', toFirst);\n if (document.activeElement === dialog) el.querySelector<HTMLAnchorElement>('a')?.focus();\n };\n const move = (e: ReactKeyboardEvent) => {\n const links = Array.from(grid.current?.querySelectorAll<HTMLAnchorElement>('a') ?? []);\n const i = links.indexOf(document.activeElement as HTMLAnchorElement);\n if (i < 0) return;\n const step = { ArrowRight: 1, ArrowLeft: -1, ArrowDown: columns, ArrowUp: -columns }[e.key];\n const next = e.key === 'Home' ? 0 : e.key === 'End' ? links.length - 1 : step !== undefined ? i + step : -1;\n if (next >= 0 && next < links.length) { e.preventDefault(); links[next].focus(); }\n };\n return (\n <DialogTrigger>\n <IconButton aria-label={label ?? t.apps} variant=\"ghost\"><LayoutGrid /></IconButton>\n <Popover placement={placement} className=\"alea-popover alea-apps-popover\">\n <PopoverDialog aria-label={label ?? t.apps}>\n <nav aria-label={label ?? t.apps}>\n <ul ref={focusFirst} className=\"alea-apps\" style={{ gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` }} onKeyDown={move}>\n {apps.map(a => (\n <li key={a.id}>\n <a href={a.href} className=\"alea-app alea-focus-ring\">\n <span className=\"alea-app-icon\" aria-hidden=\"true\" style={a.color ? { background: a.color } : undefined}>{a.icon}</span>\n <span className=\"alea-app-label\">{a.label}</span>\n </a>\n </li>\n ))}\n </ul>\n {moreHref && <a href={moreHref} className=\"alea-apps-more alea-focus-ring\">{t.moreApps}</a>}\n </nav>\n </PopoverDialog>\n </Popover>\n </DialogTrigger>\n );\n}\n"},{"path":"components/app/app.css","content":"/* DockedWindow */\n.alea-dock-stack { display: flex; align-items: flex-end; gap: var(--alea-space-3); pointer-events: none; }\n.alea-dock-stack[data-position='fixed'] { position: fixed; bottom: 0; z-index: var(--alea-z-sticky); padding: 0 var(--alea-space-4); max-width: 100vw; }\n.alea-dock-stack[data-position='fixed'][data-placement='end'] { right: 0; flex-direction: row-reverse; }\n.alea-dock-stack[data-position='fixed'][data-placement='start'] { left: 0; }\n.alea-dock-stack[data-position='inline'][data-placement='end'] { justify-content: flex-start; flex-direction: row-reverse; }\n.alea-dock-stack > * { pointer-events: auto; }\n.alea-dock-win { display: flex; flex-direction: column; width: min(var(--dock-w, 480px), calc(100vw - 32px)); border-radius: var(--alea-radius-md) var(--alea-radius-md) 0 0; background: var(--alea-surface); box-shadow: var(--alea-shadow-card), var(--alea-shadow-pop); overflow: hidden; transition: width var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-dock-win[data-minimized] { width: min(280px, calc(100vw - 32px)); }\n.alea-dock-win[data-maximized] { position: fixed; inset: 5vh 5vw; z-index: var(--alea-z-modal); width: auto; border-radius: var(--alea-radius-lg); }\n.alea-dock-bar { display: flex; align-items: center; gap: var(--alea-space-2); padding: var(--alea-space-1) var(--alea-space-1) var(--alea-space-1) 0; background: var(--alea-surface-raised); }\n.alea-dock-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--alea-space-2); height: 36px; padding: 0 var(--alea-space-3); border: 0; background: none; color: var(--alea-text); font: var(--alea-font-weight-semibold) var(--alea-font-size-sm) / 1 var(--alea-font-family-body); text-align: start; cursor: pointer; }\n.alea-dock-title-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.alea-dock-meta { color: var(--alea-text-muted); font-weight: var(--alea-font-weight-regular); }\n.alea-dock-tools { display: flex; gap: var(--alea-space-0-5); }\n.alea-dock-content { display: flex; flex-direction: column; height: var(--dock-h, 420px); max-height: calc(100dvh - 120px); }\n.alea-dock-content[hidden] { display: none; }\n.alea-dock-win[data-maximized] .alea-dock-content { height: auto; flex: 1; max-height: none; }\n.alea-dock-body { flex: 1; min-height: 0; overflow: auto; padding: var(--alea-space-4); display: flex; flex-direction: column; gap: var(--alea-space-3); }\n.alea-dock-footer { display: flex; align-items: center; gap: var(--alea-space-2); padding: var(--alea-space-3) var(--alea-space-4); border-top: 1px solid var(--alea-border); }\n@media (max-width: 640px) { .alea-dock-stack[data-position='fixed'] { left: 0; right: 0; padding: 0; flex-direction: column-reverse; align-items: stretch; gap: var(--alea-space-0-25); } .alea-dock-win, .alea-dock-win[data-minimized] { width: 100%; } }\n\n/* SelectionBar */\n.alea-selbar[data-variant='floating'] { position: fixed; left: 50%; bottom: var(--alea-space-6); z-index: var(--alea-z-sticky); translate: -50% 0; max-width: calc(100vw - 32px); }\n.alea-selbar-inner { display: flex; align-items: center; gap: var(--alea-space-2); padding: var(--alea-space-2) var(--alea-space-2); border-radius: var(--alea-radius-full); background: var(--alea-chip-bg); color: var(--alea-chip-text); box-shadow: var(--alea-shadow-pop); }\n.alea-selbar[data-variant='inline'] .alea-selbar-inner { border-radius: var(--alea-radius-md); background: var(--alea-accent-subtle); color: var(--alea-text); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--alea-accent) 35%, transparent); }\n.alea-selbar[data-variant='floating'] .alea-selbar-inner .alea-icon-button, .alea-selbar[data-variant='floating'] .alea-selbar-actions .alea-button { color: inherit; }\n.alea-selbar-count { padding-right: var(--alea-space-2); font: var(--alea-font-weight-semibold) var(--alea-font-size-sm) / 1 var(--alea-font-family-body); white-space: nowrap; font-variant-numeric: tabular-nums; }\n.alea-selbar-sep { width: 1px; height: 20px; background: currentColor; opacity: 0.25; }\n.alea-selbar-actions { display: flex; gap: var(--alea-space-0-5); min-width: 0; }\n/* narrow screens: inline bars wrap their actions; the floating pill scrolls them (room for the focus ring kept) */\n.alea-selbar[data-variant='inline'] .alea-selbar-inner { flex-wrap: wrap; }\n.alea-selbar[data-variant='inline'] .alea-selbar-actions { flex-wrap: wrap; }\n.alea-selbar[data-variant='floating'] .alea-selbar-actions { overflow-x: auto; scrollbar-width: none; padding: var(--alea-space-1); margin: calc(var(--alea-space-1) * -1); }\n.alea-selbar { opacity: 0.01; transform: translateY(var(--alea-motion-distance-md)); visibility: hidden; transition: opacity var(--alea-motion-duration-base) var(--alea-motion-ease-out), transform var(--alea-motion-duration-base) var(--alea-motion-ease-out), visibility 0s linear var(--alea-motion-duration-base); }\n.alea-selbar[data-visible] { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }\n.alea-selbar[data-variant='inline']:not([data-visible]) { display: none; }\n@media (prefers-reduced-motion: reduce) { .alea-selbar { transform: none; } }\n\n/* KeyboardShortcuts */\n.alea-kbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--alea-space-6) var(--alea-space-8); }\n.alea-kbs-title { margin: 0 0 var(--alea-space-2); color: var(--alea-text-muted); font: var(--alea-font-weight-semibold) var(--alea-font-size-xs) / 1.4 var(--alea-font-family-body); text-transform: uppercase; letter-spacing: 0.06em; }\n.alea-kbs-list { display: flex; flex-direction: column; margin: 0; }\n.alea-kbs-row { display: flex; align-items: center; justify-content: space-between; gap: var(--alea-space-3); min-height: 36px; border-bottom: 1px solid var(--alea-border); }\n.alea-kbs-row dt { font-size: var(--alea-font-size-sm); }\n.alea-kbs-row dd { display: flex; gap: var(--alea-space-2); margin: 0; flex: none; }\n.alea-kbs-combo { display: inline-flex; align-items: center; gap: var(--alea-space-1); }\n.alea-kbs-then { color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); }\n.alea-kbs-empty { margin: var(--alea-space-6) 0; text-align: center; color: var(--alea-text-muted); }\n\n/* AppLauncher */\n.alea-apps-popover .alea-popover-dialog { padding: var(--alea-space-3); }\n.alea-apps { display: grid; gap: var(--alea-space-1); margin: 0; padding: 0; list-style: none; width: max-content; max-width: calc(100vw - 48px); }\n.alea-app { display: flex; flex-direction: column; align-items: center; gap: var(--alea-space-2); width: 92px; padding: var(--alea-space-3) var(--alea-space-2); border-radius: var(--alea-radius-md); color: var(--alea-text); text-decoration: none; transition: background var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-app:hover { background: var(--alea-surface-hover); }\n.alea-app-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--alea-radius-xl); background: var(--alea-surface-raised); color: var(--alea-icon); transition: transform var(--alea-motion-duration-base) var(--alea-motion-ease-emphasized); }\n.alea-app:hover .alea-app-icon { transform: translateY(calc(var(--alea-motion-lift) * 0.5)); }\n.alea-app-icon svg { width: 24px; height: 24px; }\n.alea-app-label { font-size: var(--alea-font-size-xs); text-align: center; line-height: 1.3; }\n.alea-apps-more { display: block; margin-top: var(--alea-space-2); padding: var(--alea-space-2); border-radius: var(--alea-radius-sm); text-align: center; color: var(--alea-accent-strong); font-size: var(--alea-font-size-sm); font-weight: var(--alea-font-weight-semibold); text-decoration: none; }\n.alea-apps-more:hover { background: var(--alea-accent-subtle); }\n@media (prefers-reduced-motion: reduce) { .alea-app:hover .alea-app-icon { transform: none; } }\n"}],"deps":["button","overlay","field"],"npm":["react-aria-components","lucide-react"],"exports":["DockedWindow","DockedWindowStack","SelectionBar","KeyboardShortcuts","AppLauncher"],"descriptions":{"DockedWindow":"A window docked at the bottom of the screen that people keep open while they work: a message being written, uploads in progress, a chat. It minimizes to its bar, can grow to most of the screen, and several sit side by side in a DockedWindowStack. Not modal: the page stays usable.","DockedWindowStack":"Holds docked windows side by side along the bottom of the screen; on phones they stack full width.","SelectionBar":"A bar that appears while items are selected, with the count, actions on them and a way to clear the selection. A toolbar (one Tab stop group of actions); the count is announced as it changes; Escape clears.","KeyboardShortcuts":"Every keyboard shortcut of an app in one searchable dialog, opened with \"?\" from anywhere. The main modifier shows as each system's own key (⌘ or Ctrl); sequences (\"G then I\") read as such.","AppLauncher":"The grid of apps behind a button in the header, to jump between the products of a suite. A navigation of links: arrows move in the grid, Tab leaves it."}},"button":{"files":[{"path":"components/button/Button.tsx","content":"import { forwardRef, useCallback, useEffect, useRef, useState, type ReactNode, type Ref } from 'react';\nimport { useRipple } from '@alea-design/motion';\nimport { Button as RACButton, Link as RACLink, ToggleButton as RACToggleButton, ToggleButtonGroup, composeRenderProps, type ButtonProps as RACButtonProps, type ToggleButtonProps as RACToggleButtonProps, type ToggleButtonGroupProps, type Key, SelectionIndicator } from 'react-aria-components';\nimport { withBase } from '../../utils/cx';\nimport { Spinner } from '../feedback/Spinner';\nimport { useStrings } from '../../i18n/strings';\nimport { responsiveAttrs } from '../../utils/responsive';\nimport type { Responsive } from '../../utils/responsive';\nimport { Tooltip, TooltipTrigger } from '../overlay/Overlay';\nimport { buttonIcon } from '../icon/icon-contexts';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'soft' | 'ghost' | 'text' | 'dashed' | 'danger' | 'link';\nexport type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\nexport type ButtonTone = 'neutral' | 'accent' | 'success' | 'warning' | 'danger' | 'info';\nexport type ButtonShape = 'pill' | 'rounded' | 'square';\n\nexport interface ButtonProps extends Omit<RACButtonProps, 'isPending'> {\n /** primary: the dark gradient button (solid in its tone when tone is set); secondary: the chip (white on dark, black on light); soft: tinted; ghost: outlined; text: no border until hover; dashed: dashed outline; danger: destructive; link: text only. */\n variant?: ButtonVariant;\n /** The color of soft, ghost, text, dashed and link buttons, and of a solid primary: neutral (default), accent, success, warning, danger or info. */\n tone?: ButtonTone;\n /** xs 28 px, sm 32 px, md 40 px (default), lg 48 px, xl 56 px. Can change per breakpoint: { base: 'lg', md: 'md' }. */\n size?: Responsive<ButtonSize>;\n /** pill (default), rounded (8 px) or square (4 px corners). */\n shape?: ButtonShape;\n /** Icon before the label. */\n iconStart?: ReactNode;\n /** Icon after the label. */\n iconEnd?: ReactNode;\n /** Shows a spinner, keeps the width and tells screen readers it is busy. */\n isLoading?: boolean;\n /** Text to show next to the spinner while loading. Without it the spinner covers the label. */\n loadingLabel?: ReactNode;\n /** Where the spinner goes while loading: center (covers the label, default), start or end (takes the icon's place). */\n loadingPosition?: 'center' | 'start' | 'end';\n /** Stretches to the width of its container. Can change per breakpoint: { base: true, md: false } is full width on phones only. */\n fullWidth?: Responsive<boolean>;\n /** How the content sits in a wide button: center (default), start, or between (label left, end icon right). */\n justify?: 'center' | 'start' | 'between';\n /** A keyboard shortcut shown at the end, like ⌘S (also set as aria-keyshortcuts when it is text). */\n shortcut?: ReactNode;\n /** Turns the button into a link that looks like a button. */\n href?: string;\n /** With href: where to open it. */\n target?: string;\n /** With href: the link relationship. */\n rel?: string;\n /** Shows a check that draws itself and successLabel (the success pattern); set it for a moment after the action worked. */\n isSuccess?: boolean;\n /** The label while isSuccess. Default \"Done\". */\n successLabel?: ReactNode;\n /** A ripple grows from the pointer on press (the ripple pattern). */\n ripple?: boolean;\n}\n\nfunction useMergedRef<T>(...refs: Array<Ref<T> | undefined>) {\n return useCallback((el: T | null) => { for (const r of refs) { if (typeof r === 'function') r(el); else if (r) (r as { current: T | null }).current = el; } }, refs); // eslint-disable-line react-hooks/exhaustive-deps\n}\n\n/** The action button: eight looks, six tones, five sizes, three shapes, icons, a shortcut, loading and success states, and links that look like buttons. */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button({ variant = 'primary', tone, size, shape, iconStart, iconEnd, isLoading, loadingLabel, loadingPosition = 'center', fullWidth, justify, shortcut, href, target, rel, isSuccess, successLabel, ripple, className, children, ...props }, ref) {\n const t = useStrings(); successLabel ??= t.done;\n const own = useRef<HTMLButtonElement>(null);\n const merged = useMergedRef(ref, own);\n const { onPointerDown } = useRipple<HTMLButtonElement>();\n useEffect(() => {\n const el = own.current;\n if (!ripple || !el) return;\n const on = (e: PointerEvent) => onPointerDown({ currentTarget: el, clientX: e.clientX, clientY: e.clientY } as never);\n el.addEventListener('pointerdown', on);\n return () => el.removeEventListener('pointerdown', on);\n }, [ripple, onPointerDown]);\n const inline = isLoading && (loadingLabel != null || loadingPosition !== 'center');\n const spinner = <span className=\"alea-button-icon alea-button-inline-spinner\"><Spinner size=\"sm\" aria-label={t.loading} /></span>;\n const body = (kids: ReactNode, isPending: boolean) => (\n <>\n {isPending && !inline && <span className=\"alea-button-spinner\"><Spinner size=\"sm\" aria-label={t.loading} /></span>}\n {isSuccess && !isPending ? (\n <span className=\"alea-button-content alea-success-in\" aria-live=\"polite\">\n <span className=\"alea-button-icon\" aria-hidden=\"true\"><svg className=\"alea-success-check\" viewBox=\"0 0 24 24\" width=\"1em\" height=\"1em\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2.5} strokeLinecap=\"round\" strokeLinejoin=\"round\"><path d=\"M5 12.5l4.5 4.5L19 7.5\" /></svg></span>\n {successLabel != null && successLabel !== false && <span className=\"alea-button-label\">{successLabel}</span>}\n </span>\n ) : (\n <span className=\"alea-button-content\" data-hidden={(isPending && !inline) || undefined}>\n {inline && loadingPosition !== 'end' ? spinner : iconStart && <span className=\"alea-button-icon\" aria-hidden=\"true\" {...buttonIcon(variant, tone)}>{iconStart}</span>}\n {(inline && loadingLabel != null ? loadingLabel : kids) != null && kids !== false && <span className=\"alea-button-label\">{inline && loadingLabel != null ? loadingLabel : kids}</span>}\n {inline && loadingPosition === 'end' ? spinner : iconEnd && <span className=\"alea-button-icon\" aria-hidden=\"true\" {...buttonIcon(variant, tone)}>{iconEnd}</span>}\n {shortcut && <kbd className=\"alea-button-kbd\" aria-hidden=\"true\">{shortcut}</kbd>}\n </span>\n )}\n </>\n );\n const shared = {\n 'data-success': isSuccess || undefined, 'data-ripple': ripple || undefined, 'data-variant': variant, 'data-tone': tone,\n ...responsiveAttrs('size', size, 'md'), ...responsiveAttrs('full-width', fullWidth), 'data-shape': shape, 'data-justify': justify,\n };\n // React Aria does not pass aria-keyshortcuts through, so set it on the element\n const keys = typeof shortcut === 'string' ? shortcut.replace('⌘', 'Meta+').replace('⇧', 'Shift+').replace('⌥', 'Alt+').replace('⌃', 'Control+') : undefined;\n useEffect(() => { const el = own.current; if (!el) return; if (keys) el.setAttribute('aria-keyshortcuts', keys); else el.removeAttribute('aria-keyshortcuts'); }, [keys]);\n if (href) {\n const { onPress, isDisabled, autoFocus, id, style } = props as RACButtonProps;\n return (\n <RACLink href={href} target={target} rel={rel} onPress={onPress} isDisabled={isDisabled} autoFocus={autoFocus} id={id} style={style as any} ref={merged as any}\n {...shared} aria-label={props['aria-label']} className={withBase('alea-button alea-focus-ring', className as any)}>\n {body(children as ReactNode, false)}\n </RACLink>\n );\n }\n return (\n <RACButton {...props} {...shared} ref={merged} isPending={isLoading} className={withBase('alea-button alea-focus-ring', className as any)}>\n {composeRenderProps(children, (kids, { isPending }) => body(kids, isPending))}\n </RACButton>\n );\n});\n\nexport interface IconButtonProps extends Omit<ButtonProps, 'iconStart' | 'iconEnd' | 'children' | 'fullWidth' | 'shape' | 'loadingLabel' | 'loadingPosition' | 'justify' | 'shortcut'> {\n /** What the button does, for screen readers (the icon has no text). */\n 'aria-label': string;\n /** The icon. */\n children: ReactNode;\n /** circle (default), rounded (8 px) or square (4 px corners). */\n shape?: 'circle' | 'rounded' | 'square';\n /** Shows aria-label in a tooltip on hover and focus. */\n tooltip?: boolean;\n}\n\n/** A button with only an icon. aria-label is required; tooltip shows it to sighted people too. */\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton({ shape = 'circle', variant = 'ghost', tooltip, children, className, ...props }, ref) {\n const button = (\n <Button {...props} ref={ref} variant={variant} data-icon-shape={shape} data-icon-only className={withBase('alea-icon-button', className as any)}>\n <span className=\"alea-button-icon\" aria-hidden=\"true\" {...buttonIcon(variant, props.tone)}>{children}</span>\n </Button>\n );\n if (!tooltip) return button;\n return <TooltipTrigger delay={400}>{button}<Tooltip>{props['aria-label']}</Tooltip></TooltipTrigger>;\n});\n\nexport interface SegmentedControlProps extends Omit<ToggleButtonGroupProps, 'selectionMode' | 'selectedKeys' | 'defaultSelectedKeys' | 'onSelectionChange' | 'children'> {\n /** The options: id and label. */\n items: Array<{ id: Key; label: ReactNode; isDisabled?: boolean }>;\n /** Selected id (controlled). */\n value?: Key;\n /** Selected id to start with. */\n defaultValue?: Key;\n /** Called with the id of the option picked. */\n onChange?: (value: Key) => void;\n /** sm (28 px) or md (34 px, default). */\n size?: 'sm' | 'md';\n /** Label for screen readers. */\n 'aria-label'?: string;\n}\n\n/** One choice among a few, as a row of pills. */\nexport function SegmentedControl({ items, value, defaultValue, onChange, size = 'md', className, ...props }: SegmentedControlProps) {\n return (\n <ToggleButtonGroup\n {...props}\n selectionMode=\"single\"\n disallowEmptySelection\n selectedKeys={value !== undefined ? [value] : undefined}\n defaultSelectedKeys={defaultValue !== undefined ? [defaultValue] : value === undefined && items[0] ? [items[0].id] : undefined}\n onSelectionChange={keys => { const k = [...keys][0]; if (k !== undefined) onChange?.(k); }}\n data-size={size}\n className={withBase('alea-segmented', className as any)}\n >\n {items.map(it => <RACToggleButton key={String(it.id)} id={it.id} isDisabled={it.isDisabled} className=\"alea-segmented-item alea-focus-ring\"><span className=\"alea-segmented-label\">{it.label}</span><SelectionIndicator className=\"alea-sel-indicator\" /></RACToggleButton>)}\n </ToggleButtonGroup>\n );\n}\n\nexport interface ToggleButtonProps extends RACToggleButtonProps {\n /** sm (32 px) or md (40 px, default). */\n size?: 'sm' | 'md';\n}\n\n/** A button that stays pressed (bold, mute, pin). */\nexport function ToggleButton({ size = 'md', className, ...props }: ToggleButtonProps) {\n return <RACToggleButton {...props} data-size={size} className={withBase('alea-toggle-button alea-focus-ring', className as any)} />;\n}\n\nexport interface HoldButtonProps extends Omit<ButtonProps, 'onPress' | 'isLoading' | 'isSuccess'> {\n /** Runs when the button has been held the whole time. */\n onConfirm: () => void;\n /** How long to hold, in ms. Default 1200. */\n duration?: number;\n /** Read by screen readers after the label. Default \"Press and hold to confirm\". */\n hint?: string;\n}\n\n/** Hold to confirm (the hold pattern): a fill grows while it is pressed, with pointer, Space or Enter, and the action runs when it is full. For destructive actions without a dialog. */\nexport function HoldButton({ onConfirm, duration = 1200, hint, variant = 'danger', className, children, ...props }: HoldButtonProps) {\n const t = useStrings(); hint ??= t.pressAndHold;\n const [holding, setHolding] = useState(false);\n const ref = useRef<HTMLButtonElement>(null);\n const hintId = useRef(`alea-hold-${Math.random().toString(36).slice(2, 8)}`).current;\n useEffect(() => {\n const el = ref.current;\n if (!el) return;\n const done = (e: AnimationEvent) => { if (e.animationName === 'alea-hold') { setHolding(false); onConfirm(); } };\n el.addEventListener('animationend', done);\n return () => el.removeEventListener('animationend', done);\n }, [onConfirm]);\n return (\n <>\n <Button {...props} ref={ref} variant={variant} data-holding={holding || undefined} aria-describedby={hintId}\n onPressStart={() => setHolding(true)} onPressEnd={() => setHolding(false)}\n className={withBase('alea-hold', className as any)} style={{ ['--alea-hold-duration' as string]: `${duration}ms` }}>\n {children}\n </Button>\n <span id={hintId} className=\"alea-visually-hidden\">{hint}</span>\n </>\n );\n}\n"},{"path":"components/button/Groups.tsx","content":"import { Fragment, useLayoutEffect, useEffect, useRef, useState, type ReactNode } from 'react';\n\nconst useLayoutEffectSafe = typeof document !== 'undefined' ? useLayoutEffect : useEffect;\nimport { Toolbar as RACToolbar, SelectionIndicator, ToggleButtonGroup, ToggleButton as RACToggleButton, Group, type ToolbarProps as RACToolbarProps, type Key, type Selection } from 'react-aria-components';\nimport { ChevronDown, MoreHorizontal } from 'lucide-react';\nimport { cx, withBase } from '../../utils/cx';\nimport { Button, IconButton, type ButtonProps } from './Button';\nimport { DropdownMenu, MenuItem } from '../menu/Menu';\nimport { useStrings } from '../../i18n/strings';\n\nexport interface ButtonGroupProps {\n /** What the buttons do together, for screen readers (\"Text alignment\"). */\n 'aria-label'?: string;\n children: ReactNode;\n /** Joins the buttons into one shape. Default true; false only spaces them. */\n attached?: boolean;\n /** horizontal (default) or vertical. */\n orientation?: 'horizontal' | 'vertical';\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** Related buttons side by side, joined into one control. */\nexport function ButtonGroup({ children, attached = true, orientation = 'horizontal', className, 'aria-label': label }: ButtonGroupProps) {\n return <Group aria-label={label} className={cx('alea-btn-group', className)} data-attached={attached || undefined} data-orientation={orientation}>{children}</Group>;\n}\n\nexport interface SplitButtonProps extends Omit<ButtonProps, 'children' | 'className'> {\n /** Extra class names for the root element. */\n className?: string;\n /** The main action's label. */\n children: ReactNode;\n /** The other actions in the menu: id, label (and an optional icon or description). */\n actions: Array<{ id: Key; label: string; icon?: ReactNode; description?: string }>;\n /** Called with the id of the menu action picked. */\n onAction?: (id: Key) => void;\n /** Name of the menu button. Default \"More options\". */\n menuLabel?: string;\n}\n\n/** A main action plus a menu of related ones. */\nexport function SplitButton({ children, actions, onAction, menuLabel, variant = 'primary', size = 'md', className, ...props }: SplitButtonProps) {\n const t = useStrings(); menuLabel ??= t.moreOptions;\n return (\n <ButtonGroup className={cx('alea-split-btn', className)}>\n <Button variant={variant} size={size} {...props}>{children}</Button>\n <DropdownMenu trigger={<IconButton variant={variant} size={size} shape=\"square\" aria-label={menuLabel} isDisabled={props.isDisabled}><ChevronDown /></IconButton>} placement=\"bottom end\" menuProps={{ onAction: k => onAction?.(k) }} aria-label={menuLabel}>\n {actions.map(a => <MenuItem key={String(a.id)} id={a.id} icon={a.icon} description={a.description}>{a.label}</MenuItem>)}\n </DropdownMenu>\n </ButtonGroup>\n );\n}\n\nexport interface ToggleGroupProps {\n /** What the group controls, for screen readers (\"Text style\"). */\n 'aria-label': string;\n /** Buttons: id, label, and an icon. With iconOnly the label becomes the accessible name. */\n items: Array<{ id: Key; label: string; icon?: ReactNode; isDisabled?: boolean }>;\n /** single (like radio buttons) or multiple (like checkboxes). Default single. */\n selectionMode?: 'single' | 'multiple';\n /** The pressed ids (controlled). */\n value?: Key[];\n /** The pressed ids to start with. */\n defaultValue?: Key[];\n /** Called with the pressed ids. */\n onChange?: (keys: Key[]) => void;\n /** Show only the icons. */\n iconOnly?: boolean;\n /** sm (26 px) or md (32 px, default). */\n size?: 'sm' | 'md';\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** A set of toggle buttons, one or several on: bold/italic, view modes, filters. */\nexport function ToggleGroup({ items, selectionMode = 'single', value, defaultValue, onChange, iconOnly, size = 'md', className, 'aria-label': label }: ToggleGroupProps) {\n const [own, setOwn] = useState<Key[]>(defaultValue ?? []);\n const keys = value ?? own;\n const button = (it: ToggleGroupProps['items'][number], extra?: { isSelected: boolean; onChange: (on: boolean) => void }) => (\n <RACToggleButton key={String(it.id)} id={it.id} isDisabled={it.isDisabled} aria-label={iconOnly ? it.label : undefined} className=\"alea-toggle-item alea-focus-ring\" data-icon-only={iconOnly || undefined} {...extra}>\n {it.icon && <span className=\"alea-toggle-icon\" aria-hidden=\"true\">{it.icon}</span>}\n {!iconOnly && <span className=\"alea-toggle-label\">{it.label}</span>}\n {!extra && <SelectionIndicator className=\"alea-sel-indicator\" />}\n </RACToggleButton>\n );\n if (selectionMode === 'multiple') {\n // A named group of independent toggle buttons: valid on its own and inside a Toolbar (which adds arrow keys).\n const toggle = (id: Key, on: boolean) => { const next = on ? [...keys, id] : keys.filter(k => k !== id); if (value === undefined) setOwn(next); onChange?.(next); };\n return <div role=\"group\" aria-label={label} className={cx('alea-toggle-group', className)} data-size={size} data-multiple>{items.map(it => button(it, { isSelected: keys.includes(it.id), onChange: on => toggle(it.id, on) }))}</div>;\n }\n return (\n <ToggleButtonGroup aria-label={label} selectionMode=\"single\" selectedKeys={value} defaultSelectedKeys={defaultValue}\n onSelectionChange={(s: Selection) => onChange?.(s === 'all' ? items.map(i => i.id) : [...s])}\n className={withBase('alea-toggle-group', className)} data-size={size}>\n {items.map(it => button(it))}\n </ToggleButtonGroup>\n );\n}\n\n/** An action in a Toolbar built from items. */\nexport interface ToolbarItem { id: Key; label: string; icon?: ReactNode; onAction?: () => void; isDisabled?: boolean; isSelected?: boolean; separatorBefore?: boolean }\n\nexport interface ToolbarProps extends Omit<RACToolbarProps, 'children'> {\n children?: RACToolbarProps['children'];\n /** The actions as data. Those that do not fit move into a More menu at the end, last first (priority overflow). */\n items?: ToolbarItem[];\n /** With items: icon buttons with tooltips (default), or buttons with labels. */\n itemStyle?: 'icon' | 'label';\n}\n\n/** A row of controls that is one Tab stop; arrow keys move inside it (editor toolbars, table tools). Pass items and it folds what does not fit into a More menu. */\nexport function Toolbar({ className, items, itemStyle = 'icon', children, ...props }: ToolbarProps) {\n const t = useStrings();\n const box = useRef<HTMLDivElement>(null);\n const [visible, setVisible] = useState(items?.length ?? 0);\n useLayoutEffectSafe(() => {\n const el = box.current;\n if (!items || !el) return;\n // measure every item once in a hidden copy, then show as many as fit beside the More button\n const measure = () => {\n const probe = el.querySelector<HTMLElement>('.alea-toolbar-probe');\n if (!probe) return;\n const widths = Array.from(probe.children).map(c => (c as HTMLElement).getBoundingClientRect().width + 4);\n const total = widths.reduce((x, y) => x + y, 0);\n if (total <= el.clientWidth) { setVisible(widths.length); return; }\n let used = 0, n = 0;\n for (const w of widths) { if (used + w > el.clientWidth - 44) break; used += w; n++; }\n setVisible(n);\n };\n measure();\n const ro = new ResizeObserver(measure); ro.observe(el);\n return () => ro.disconnect();\n }, [items]);\n if (!items) return <RACToolbar {...props} className={withBase('alea-toolbar', className as any)}>{children}</RACToolbar>;\n const render = (it: ToolbarItem, probe = false) => {\n const btn = itemStyle === 'label'\n ? <Button key={String(it.id)} size=\"sm\" variant={it.isSelected ? 'soft' : 'text'} iconStart={it.icon} isDisabled={it.isDisabled} onPress={it.onAction} aria-pressed={it.isSelected} excludeFromTabOrder={probe}>{it.label}</Button>\n : <IconButton key={String(it.id)} size=\"sm\" variant={it.isSelected ? 'soft' : 'text'} aria-label={it.label} tooltip={!probe} isDisabled={it.isDisabled} onPress={it.onAction} aria-pressed={it.isSelected} excludeFromTabOrder={probe}>{it.icon}</IconButton>;\n return it.separatorBefore ? <Fragment key={String(it.id)}><span className=\"alea-toolbar-sep\" aria-hidden=\"true\" />{btn}</Fragment> : btn;\n };\n const shown = items.slice(0, visible), hidden = items.slice(visible);\n return (\n <div ref={box} className=\"alea-toolbar-fit\">\n <div className=\"alea-toolbar-probe\" aria-hidden=\"true\" inert>{items.map(it => render(it, true))}</div>\n <RACToolbar {...props} className={withBase('alea-toolbar', className as any)}>\n {shown.map(it => render(it))}\n {hidden.length > 0 && (\n <DropdownMenu aria-label={t.moreActions} placement=\"bottom end\" trigger={<IconButton size=\"sm\" variant=\"text\" aria-label={t.moreActions}><MoreHorizontal /></IconButton>}\n menuProps={{ onAction: (k: Key) => hidden.find(h => h.id === k)?.onAction?.(), disabledKeys: hidden.filter(h => h.isDisabled).map(h => h.id) }}>\n {hidden.map(h => <MenuItem key={String(h.id)} id={h.id} icon={h.icon}>{h.label}</MenuItem>)}\n </DropdownMenu>\n )}\n </RACToolbar>\n </div>\n );\n}\n\nexport interface CompoundButtonProps extends Omit<ButtonProps, 'children' | 'iconEnd' | 'loadingLabel'> {\n /** The main text. */\n children: ReactNode;\n /** A second, smaller line under it. */\n description?: ReactNode;\n /** An icon on the left, larger than in a Button. */\n icon?: ReactNode;\n}\n\n/** A tall button with a title and a second line: choices on an empty state, \"Create from template\", start screens. */\nexport function CompoundButton({ children, description, icon, className, size = 'lg', variant = 'ghost', ...props }: CompoundButtonProps) {\n return (\n <Button {...props} size={size} variant={variant} className={cx('alea-compound-button', className as string)} iconStart={icon}>\n <span className=\"alea-compound-text\"><span className=\"alea-compound-title\">{children}</span>{description && <span className=\"alea-compound-desc\">{description}</span>}</span>\n </Button>\n );\n}\n"},{"path":"components/button/button.css","content":".alea-button {\n --alea-button-h: var(--alea-size-control-md);\n --alea-button-pad-x: var(--alea-space-5);\n --alea-button-font: var(--alea-font-size-md);\n --alea-button-icon: 16px;\n --alea-button-gap: var(--alea-space-2);\n --alea-button-radius: var(--alea-radius-full);\n --alea-button-pad: 0 var(--alea-button-pad-x);\n /* the tone used by soft, ghost, text, dashed, link and a toned primary */\n --tone: var(--alea-text); --tone-text: var(--alea-text); --tone-on: var(--alea-accent-on);\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: var(--alea-button-h);\n padding: var(--alea-button-pad);\n border: 0;\n border-radius: var(--alea-button-radius);\n font: var(--alea-font-weight-semibold) var(--alea-button-font) / 1 var(--alea-font-family-body);\n letter-spacing: var(--alea-font-tracking-tight);\n white-space: nowrap;\n text-decoration: none;\n cursor: pointer;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n transition: box-shadow var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), opacity var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), transform var(--alea-motion-duration-fast) var(--alea-motion-ease-out);\n}\n.alea-button[data-size='xs'] { --alea-button-h: 28px; --alea-button-pad-x: var(--alea-space-3); --alea-button-font: var(--alea-font-size-xs); --alea-button-icon: 16px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 16px; }\n.alea-button[data-size='sm'] { --alea-button-h: var(--alea-size-control-sm); --alea-button-pad-x: var(--alea-space-3); --alea-button-font: var(--alea-font-size-sm); --alea-button-icon: 16px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 16px; }\n.alea-button[data-size='md'] { --alea-button-h: var(--alea-size-control-md); --alea-button-pad-x: var(--alea-space-5); --alea-button-font: var(--alea-font-size-md); --alea-button-icon: 16px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 20px; }\n.alea-button[data-size='lg'] { --alea-button-h: var(--alea-size-control-lg); --alea-button-pad-x: var(--alea-space-6); --alea-button-font: var(--alea-font-size-base); --alea-button-icon: 20px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 24px; }\n.alea-button[data-size='xl'] { --alea-button-h: 56px; --alea-button-pad-x: var(--alea-space-8); --alea-button-font: var(--alea-font-size-lg); --alea-button-icon: 24px; --alea-button-gap: var(--alea-space-3); --alea-icon-button-icon: 24px; }\n.alea-button[data-shape='rounded'] { --alea-button-radius: var(--alea-radius-sm); }\n.alea-button[data-shape='square'] { --alea-button-radius: var(--alea-radius-xs); }\n.alea-button[data-full-width] { display: flex; width: 100%; }\n.alea-button[data-justify='start'] { justify-content: flex-start; }\n.alea-button[data-justify='between'] .alea-button-content { flex: 1; }\n.alea-button[data-justify='between'] .alea-button-label { flex: 1; text-align: start; }\n.alea-button[data-pressed] { transform: scale(calc(1 - (1 - var(--alea-motion-scale-press)) * 0.75)); }\n/* (a plain link styled as a button, without React Aria, hovers with :hover) */\n/* hover, for the raised buttons: a one pixel lift on a soft spring, more light; pressing settles it back */\n.alea-button:is([data-variant='primary'], [data-variant='secondary'], [data-variant='danger']) { transition-property: box-shadow, background-color, color, opacity, transform; transition-duration: var(--alea-motion-duration-fast), var(--alea-motion-duration-fast), var(--alea-motion-duration-fast), var(--alea-motion-duration-fast), var(--alea-motion-duration-base); transition-timing-function: var(--alea-motion-ease-standard), var(--alea-motion-ease-standard), var(--alea-motion-ease-standard), var(--alea-motion-ease-standard), var(--alea-motion-ease-emphasized); }\n.alea-button:is([data-variant='primary'], [data-variant='secondary'], [data-variant='danger']):is([data-hovered], a:not([data-rac]):hover):not([data-pressed], [data-disabled]) { transform: translateY(calc(var(--alea-motion-lift) * 0.25)); }\n.alea-button:is([data-variant='primary'], [data-variant='secondary'], [data-variant='danger'])[data-pressed] { transform: translateY(0) scale(calc(1 - (1 - var(--alea-motion-scale-press)) * 0.75)); }\n/* the primary catches light along its top edge, brighter on hover */\n.alea-button[data-variant='primary']::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, var(--alea-effect-top-light), transparent 48%); opacity: 0.55; transition: opacity var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-button[data-variant='primary']:is([data-hovered], a:not([data-rac]):hover)::after { opacity: 1; }\n@media (prefers-reduced-motion: reduce) { .alea-button[data-hovered] { transform: none !important; } }\n:is([data-alea-motion='reduced'], [data-alea-motion='off']) .alea-button[data-hovered] { transform: none !important; }\n.alea-button[data-disabled] { opacity: 0.45; cursor: not-allowed; }\n.alea-button-content { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: var(--alea-button-gap); min-width: 0; } /* above the light (::after) and any overlay: nothing paints over the label or the icons */\n.alea-button-content[data-hidden] { visibility: hidden; }\n.alea-button-label { overflow: hidden; text-overflow: ellipsis; }\n.alea-button-spinner { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; }\n.alea-button-icon { display: inline-flex; flex: none; color: inherit; } /* the icon takes the text color of the variant (currentColor), like the Figma icon bound to the label's variable */\n.alea-button-icon svg { width: var(--alea-button-icon); height: var(--alea-button-icon); }\n.alea-button-kbd { margin-inline-start: var(--alea-space-1); padding: var(--alea-space-0-5) var(--alea-space-2); border-radius: var(--alea-radius-xs); background: color-mix(in oklab, currentColor 14%, transparent); font: var(--alea-font-weight-medium) var(--alea-font-size-xs) / 1.2 var(--alea-font-family-mono); opacity: 0.8; }\n\n/* tones */\n.alea-button[data-tone='accent'] { --tone: var(--alea-accent-solid); --tone-text: var(--alea-accent-strong); }\n.alea-button[data-tone='success'] { --tone: var(--alea-status-success); --tone-text: var(--alea-status-success); --tone-on: var(--alea-status-on); }\n.alea-button[data-tone='warning'] { --tone: var(--alea-status-warning); --tone-text: var(--alea-status-warning); --tone-on: var(--alea-status-on); }\n.alea-button[data-tone='danger'] { --tone: var(--alea-status-danger); --tone-text: var(--alea-status-danger); }\n.alea-button[data-tone='info'] { --tone: var(--alea-status-info); --tone-text: var(--alea-status-info); --tone-on: var(--alea-status-on); }\n\n.alea-button[data-variant='primary'] {\n background: linear-gradient(180deg, var(--alea-button-top) 0%, var(--alea-button-bottom) 100%);\n color: var(--alea-button-text);\n box-shadow: var(--alea-button-ring) 0 0 0 1px, rgba(27, 28, 29, 0.48) 0 1px 2px 0;\n}\n.alea-button[data-variant='primary']:is([data-hovered], a:not([data-rac]):hover) { box-shadow: var(--alea-button-ring) 0 0 0 1px, 0 10px 30px -10px var(--alea-effect-glow); }\n/* a toned primary is solid in its tone */\n.alea-button[data-variant='primary']:is([data-tone='accent'], [data-tone='success'], [data-tone='warning'], [data-tone='info']) { background: var(--tone); color: var(--tone-on); box-shadow: none; }\n.alea-button[data-variant='primary']:is([data-tone='accent'], [data-tone='success'], [data-tone='warning'], [data-tone='info']):is([data-hovered], a:not([data-rac]):hover) { background: color-mix(in oklab, var(--tone) 86%, var(--alea-text)); box-shadow: 0 10px 26px -12px var(--tone); }\n.alea-button[data-variant='primary'][data-tone='danger'], .alea-button[data-variant='danger'] { background: var(--alea-status-danger-solid); color: var(--alea-status-danger-on-solid); box-shadow: none; }\n.alea-button[data-variant='primary'][data-tone='danger']:is([data-hovered], a:not([data-rac]):hover), .alea-button[data-variant='danger']:is([data-hovered], a:not([data-rac]):hover) { background: var(--alea-status-danger-solid-hover); box-shadow: 0 10px 26px -12px color-mix(in oklab, var(--alea-status-danger-solid) 70%, transparent); }\n.alea-button[data-variant='secondary'] { background: var(--alea-chip-bg); color: var(--alea-chip-text); }\n.alea-button[data-variant='secondary']:is([data-hovered], a:not([data-rac]):hover) { box-shadow: 0 10px 26px -12px var(--alea-effect-glow-soft); }\n.alea-button[data-variant='soft'] { background: color-mix(in oklab, var(--tone) 14%, transparent); color: var(--tone-text); }\n.alea-button[data-variant='soft']:is([data-hovered], a:not([data-rac]):hover) { background: color-mix(in oklab, var(--tone) 22%, transparent); }\n.alea-button[data-variant='ghost'] { background: transparent; color: var(--tone-text); box-shadow: inset 0 0 0 1px var(--alea-border-strong); }\n.alea-button[data-variant='ghost'][data-tone]:not([data-tone='neutral']) { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--tone) 55%, transparent); }\n.alea-button[data-variant='ghost']:is([data-hovered], a:not([data-rac]):hover) { background: var(--alea-surface-hover); box-shadow: inset 0 0 0 1px var(--alea-border-control); }\n.alea-button[data-variant='text'] { --alea-button-pad-x: var(--alea-space-3); background: transparent; color: var(--tone-text); }\n.alea-button[data-variant='text']:is([data-hovered], a:not([data-rac]):hover) { background: color-mix(in oklab, var(--tone) 10%, transparent); }\n.alea-button[data-variant='dashed'] { background: transparent; color: var(--tone-text); box-shadow: none; outline: 1px dashed color-mix(in oklab, var(--tone) 45%, transparent); outline-offset: calc(var(--alea-space-0-25) * -1); }\n.alea-button[data-variant='dashed']:is([data-hovered], a:not([data-rac]):hover) { background: color-mix(in oklab, var(--tone) 8%, transparent); outline-color: color-mix(in oklab, var(--tone) 75%, transparent); }\n.alea-button[data-variant='dashed'][data-focus-visible] { outline: 2px solid var(--alea-focus); outline-offset: var(--alea-space-0-5); }\n.alea-button[data-variant='link'] {\n --alea-button-pad: 0; height: auto; background: none; border-radius: var(--alea-radius-xs);\n color: var(--alea-accent-strong); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;\n}\n.alea-button[data-variant='link'][data-tone] { color: var(--tone-text); }\n.alea-button[data-variant='link']:is([data-hovered], a:not([data-rac]):hover) { text-decoration-thickness: 2px; }\n\n.alea-icon-button { --alea-button-pad: 0; width: var(--alea-button-h); }\n.alea-icon-button[data-icon-shape='rounded'] { --alea-button-radius: var(--alea-radius-sm); }\n.alea-icon-button[data-icon-shape='square'] { --alea-button-radius: var(--alea-radius-xs); }\n/* the icon keeps the same share of the button at every size: 16 in 28 and 32, 20 in 40, 24 in 48 and 56 */\n.alea-icon-button .alea-button-icon svg { width: var(--alea-icon-button-icon); height: var(--alea-icon-button-icon); }\n\n/* responsive size and full width: the same rules inside each breakpoint */\n@media (min-width: 640px) {\n .alea-button[data-size-sm='xs'] { --alea-button-h: 28px; --alea-button-pad-x: var(--alea-space-3); --alea-button-font: var(--alea-font-size-xs); --alea-button-icon: 16px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 16px; }\n .alea-button[data-size-sm='sm'] { --alea-button-h: var(--alea-size-control-sm); --alea-button-pad-x: var(--alea-space-3); --alea-button-font: var(--alea-font-size-sm); --alea-button-icon: 16px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 16px; }\n .alea-button[data-size-sm='md'] { --alea-button-h: var(--alea-size-control-md); --alea-button-pad-x: var(--alea-space-5); --alea-button-font: var(--alea-font-size-md); --alea-button-icon: 16px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 20px; }\n .alea-button[data-size-sm='lg'] { --alea-button-h: var(--alea-size-control-lg); --alea-button-pad-x: var(--alea-space-6); --alea-button-font: var(--alea-font-size-base); --alea-button-icon: 20px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 24px; }\n .alea-button[data-size-sm='xl'] { --alea-button-h: 56px; --alea-button-pad-x: var(--alea-space-8); --alea-button-font: var(--alea-font-size-lg); --alea-button-icon: 24px; --alea-button-gap: var(--alea-space-3); --alea-icon-button-icon: 24px; }\n .alea-button[data-full-width-sm='true'] { display: flex; width: 100%; }\n .alea-button[data-full-width-sm='false'] { display: inline-flex; width: auto; }\n}\n@media (min-width: 768px) {\n .alea-button[data-size-md='xs'] { --alea-button-h: 28px; --alea-button-pad-x: var(--alea-space-3); --alea-button-font: var(--alea-font-size-xs); --alea-button-icon: 16px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 16px; }\n .alea-button[data-size-md='sm'] { --alea-button-h: var(--alea-size-control-sm); --alea-button-pad-x: var(--alea-space-3); --alea-button-font: var(--alea-font-size-sm); --alea-button-icon: 16px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 16px; }\n .alea-button[data-size-md='md'] { --alea-button-h: var(--alea-size-control-md); --alea-button-pad-x: var(--alea-space-5); --alea-button-font: var(--alea-font-size-md); --alea-button-icon: 16px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 20px; }\n .alea-button[data-size-md='lg'] { --alea-button-h: var(--alea-size-control-lg); --alea-button-pad-x: var(--alea-space-6); --alea-button-font: var(--alea-font-size-base); --alea-button-icon: 20px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 24px; }\n .alea-button[data-size-md='xl'] { --alea-button-h: 56px; --alea-button-pad-x: var(--alea-space-8); --alea-button-font: var(--alea-font-size-lg); --alea-button-icon: 24px; --alea-button-gap: var(--alea-space-3); --alea-icon-button-icon: 24px; }\n .alea-button[data-full-width-md='true'] { display: flex; width: 100%; }\n .alea-button[data-full-width-md='false'] { display: inline-flex; width: auto; }\n}\n@media (min-width: 1024px) {\n .alea-button[data-size-lg='xs'] { --alea-button-h: 28px; --alea-button-pad-x: var(--alea-space-3); --alea-button-font: var(--alea-font-size-xs); --alea-button-icon: 16px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 16px; }\n .alea-button[data-size-lg='sm'] { --alea-button-h: var(--alea-size-control-sm); --alea-button-pad-x: var(--alea-space-3); --alea-button-font: var(--alea-font-size-sm); --alea-button-icon: 16px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 16px; }\n .alea-button[data-size-lg='md'] { --alea-button-h: var(--alea-size-control-md); --alea-button-pad-x: var(--alea-space-5); --alea-button-font: var(--alea-font-size-md); --alea-button-icon: 16px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 20px; }\n .alea-button[data-size-lg='lg'] { --alea-button-h: var(--alea-size-control-lg); --alea-button-pad-x: var(--alea-space-6); --alea-button-font: var(--alea-font-size-base); --alea-button-icon: 20px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 24px; }\n .alea-button[data-size-lg='xl'] { --alea-button-h: 56px; --alea-button-pad-x: var(--alea-space-8); --alea-button-font: var(--alea-font-size-lg); --alea-button-icon: 24px; --alea-button-gap: var(--alea-space-3); --alea-icon-button-icon: 24px; }\n .alea-button[data-full-width-lg='true'] { display: flex; width: 100%; }\n .alea-button[data-full-width-lg='false'] { display: inline-flex; width: auto; }\n}\n@media (min-width: 1280px) {\n .alea-button[data-size-xl='xs'] { --alea-button-h: 28px; --alea-button-pad-x: var(--alea-space-3); --alea-button-font: var(--alea-font-size-xs); --alea-button-icon: 16px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 16px; }\n .alea-button[data-size-xl='sm'] { --alea-button-h: var(--alea-size-control-sm); --alea-button-pad-x: var(--alea-space-3); --alea-button-font: var(--alea-font-size-sm); --alea-button-icon: 16px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 16px; }\n .alea-button[data-size-xl='md'] { --alea-button-h: var(--alea-size-control-md); --alea-button-pad-x: var(--alea-space-5); --alea-button-font: var(--alea-font-size-md); --alea-button-icon: 16px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 20px; }\n .alea-button[data-size-xl='lg'] { --alea-button-h: var(--alea-size-control-lg); --alea-button-pad-x: var(--alea-space-6); --alea-button-font: var(--alea-font-size-base); --alea-button-icon: 20px; --alea-button-gap: var(--alea-space-2); --alea-icon-button-icon: 24px; }\n .alea-button[data-size-xl='xl'] { --alea-button-h: 56px; --alea-button-pad-x: var(--alea-space-8); --alea-button-font: var(--alea-font-size-lg); --alea-button-icon: 24px; --alea-button-gap: var(--alea-space-3); --alea-icon-button-icon: 24px; }\n .alea-button[data-full-width-xl='true'] { display: flex; width: 100%; }\n .alea-button[data-full-width-xl='false'] { display: inline-flex; width: auto; }\n}\n\n.alea-segmented {\n display: inline-flex;\n gap: var(--alea-space-0-5);\n padding: var(--alea-space-1);\n /* never wider than its container: with many options it scrolls sideways inside itself (no page scroll) */\n max-width: 100%;\n overflow-x: auto;\n scrollbar-width: none;\n overscroll-behavior-x: contain;\n border-radius: var(--alea-radius-full);\n background: var(--alea-surface-deep);\n box-shadow: inset 0 0 0 1px var(--alea-border);\n}\n.alea-segmented::-webkit-scrollbar { display: none; }\n.alea-segmented-item {\n flex: none;\n white-space: nowrap;\n height: 36px;\n padding: 0 var(--alea-space-4);\n border: 0;\n border-radius: var(--alea-radius-full);\n background: transparent;\n color: var(--alea-text-muted);\n font: var(--alea-font-weight-medium) var(--alea-font-size-sm) / 1 var(--alea-font-family-body);\n cursor: pointer;\n transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-out), color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard);\n}\n.alea-segmented[data-size='sm'] .alea-segmented-item { height: 28px; padding: 0 var(--alea-space-3); font-size: var(--alea-font-size-xs); }\n.alea-segmented-item[data-hovered] { color: var(--alea-text); }\n.alea-segmented-item[data-selected] { color: var(--alea-chip-text); }\n.alea-segmented-item[data-disabled] { opacity: 0.4; cursor: not-allowed; }\n\n.alea-toggle-button {\n display: inline-flex; align-items: center; justify-content: center; gap: var(--alea-space-2);\n height: var(--alea-size-control-md); min-width: var(--alea-size-control-md); padding: 0 var(--alea-space-3);\n border: 0; border-radius: var(--alea-radius-sm);\n background: transparent; color: var(--alea-text-muted);\n box-shadow: inset 0 0 0 1px var(--alea-border-strong);\n font: var(--alea-font-weight-medium) var(--alea-font-size-md) / 1 var(--alea-font-family-body);\n cursor: pointer;\n transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard);\n}\n.alea-toggle-button[data-size='sm'] { height: var(--alea-size-control-sm); min-width: var(--alea-size-control-sm); font-size: var(--alea-font-size-sm); }\n.alea-toggle-button[data-hovered] { background: var(--alea-surface-hover); color: var(--alea-text); }\n.alea-toggle-button[data-selected] { background: var(--alea-accent-subtle); color: var(--alea-text); box-shadow: inset 0 0 0 1px var(--alea-accent); }\n.alea-toggle-button[data-disabled] { opacity: 0.45; cursor: not-allowed; }\n.alea-toggle-button svg { width: 20px; height: 20px; }\n.alea-segmented-item[data-selected]:not(:has(> .alea-sel-indicator)) { background: var(--alea-chip-bg); }\n\n/* ripple and success (Alea Motion patterns) */\n.alea-button[data-ripple] { overflow: hidden; isolation: isolate; }\n\n/* hover light: a soft glow from the upper left, the same as the Hover variant in the Figma kit */\n.alea-button:is([data-variant='primary'], [data-variant='secondary'], [data-variant='danger'])::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(80px circle at 30% 0%, rgb(255 255 255 / 0.22), transparent 70%); opacity: 0; transition: opacity var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-button:is([data-variant='primary'], [data-variant='secondary'], [data-variant='danger']):is([data-hovered], a:not([data-rac]):hover)::before { opacity: 1; }\n[data-theme='light'] .alea-button[data-variant='secondary']::before, .alea-button[data-variant='secondary']:where([data-theme='light'] *)::before { background: radial-gradient(80px circle at 30% 0%, color-mix(in srgb, var(--alea-accent) 14%, transparent), transparent 70%); }\n"},{"path":"components/button/groups.css","content":"/* ButtonGroup, SplitButton, ToggleGroup, Toolbar */\n.alea-btn-group { display: inline-flex; align-items: stretch; gap: var(--alea-space-2); }\n.alea-btn-group[data-orientation='vertical'] { flex-direction: column; }\n.alea-btn-group[data-attached] { gap: var(--alea-space-0-25); }\n.alea-btn-group[data-attached] > .alea-button:not(:first-child), .alea-btn-group[data-attached] > .alea-icon-button:not(:first-child) { border-top-left-radius: var(--alea-radius-xs); border-bottom-left-radius: var(--alea-radius-xs); }\n.alea-btn-group[data-attached] > .alea-button:not(:last-child), .alea-btn-group[data-attached] > .alea-icon-button:not(:last-child) { border-top-right-radius: var(--alea-radius-xs); border-bottom-right-radius: var(--alea-radius-xs); }\n.alea-btn-group[data-attached][data-orientation='vertical'] > * { border-radius: var(--alea-radius-xs) !important; }\n.alea-btn-group[data-attached][data-orientation='vertical'] > :first-child { border-top-left-radius: var(--alea-radius-md) !important; border-top-right-radius: var(--alea-radius-md) !important; }\n.alea-btn-group[data-attached][data-orientation='vertical'] > :last-child { border-bottom-left-radius: var(--alea-radius-md) !important; border-bottom-right-radius: var(--alea-radius-md) !important; }\n.alea-split-btn > .alea-icon-button { padding-inline: var(--alea-space-3) var(--alea-space-3); width: auto; }\n.alea-btn-group[data-attached] > [data-focus-visible] { z-index: 1; }\n\n.alea-toggle-group { display: inline-flex; gap: var(--alea-space-0-5); padding: var(--alea-space-1); border-radius: var(--alea-radius-md); background: var(--alea-surface-deep); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-toggle-item { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: var(--alea-space-2); height: 32px; min-width: 32px; padding: 0 var(--alea-space-3); border: 0; border-radius: calc(var(--alea-radius-md) - var(--alea-space-1)); background: none; color: var(--alea-text-muted); font: var(--alea-font-weight-medium) var(--alea-font-size-sm) / 1 var(--alea-font-family-body); cursor: pointer; transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-toggle-group[data-size='sm'] .alea-toggle-item { height: 28px; min-width: 28px; padding: 0 var(--alea-space-2); font-size: var(--alea-font-size-xs); }\n.alea-toggle-item[data-icon-only] { padding: 0; }\n.alea-toggle-item[data-hovered] { color: var(--alea-text); background: var(--alea-surface-hover); }\n.alea-toggle-item[data-selected] { color: var(--alea-text); }\n.alea-toggle-item[data-disabled] { opacity: 0.45; cursor: not-allowed; }\n.alea-toggle-icon { display: inline-flex; }\n.alea-toggle-icon svg { width: 16px; height: 16px; }\n\n.alea-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--alea-space-1); }\n.alea-toolbar[data-orientation='vertical'] { flex-direction: column; align-items: stretch; }\n.alea-toolbar .alea-divider[aria-orientation='vertical'], .alea-toolbar [role='separator'] { align-self: stretch; width: 1px; margin: var(--alea-space-1) var(--alea-space-0-5); background: var(--alea-border); }\n.alea-toggle-group[data-multiple] .alea-toggle-item[data-selected] { background: var(--alea-surface-raised); box-shadow: var(--alea-shadow-card), inset 0 0 0 1px var(--alea-border-strong); }\n\n/* Toolbar with items: what does not fit moves into More */\n.alea-toolbar-fit { position: relative; width: 100%; min-width: 0; flex: 1 1 0; } /* in a flex row it takes the space left, not the whole row */\n.alea-toolbar-probe { position: absolute; top: 0; left: 0; display: flex; gap: var(--alea-space-1); visibility: hidden; pointer-events: none; white-space: nowrap; }\n.alea-toolbar-fit > .alea-toolbar { flex-wrap: nowrap; overflow: hidden; }\n.alea-toolbar-sep { flex: none; width: 1px; height: 20px; margin: 0 var(--alea-space-1); background: var(--alea-border-strong); align-self: center; }\n\n/* CompoundButton: a title and a second line */\n.alea-compound-button.alea-button { height: auto; min-height: 64px; padding: var(--alea-space-3) var(--alea-space-5) var(--alea-space-3) var(--alea-space-4); border-radius: var(--alea-radius-md); justify-content: flex-start; text-align: start; white-space: normal; }\n.alea-compound-button .alea-button-content { align-items: center; gap: var(--alea-space-3); }\n.alea-compound-button .alea-button-icon svg { width: 24px; height: 24px; }\n.alea-compound-text { display: flex; flex-direction: column; gap: var(--alea-space-0-5); min-width: 0; }\n.alea-compound-title { font-weight: var(--alea-font-weight-semibold); }\n.alea-compound-desc { color: var(--alea-text-muted); font-weight: var(--alea-font-weight-regular); font-size: var(--alea-font-size-sm); line-height: 1.35; }\n.alea-compound-button[data-variant='primary'] .alea-compound-desc, .alea-compound-button[data-variant='secondary'] .alea-compound-desc { color: inherit; opacity: 0.75; }\n"}],"deps":["feedback","overlay","icon","menu"],"npm":["react-aria-components","@alea-design/motion","lucide-react"],"exports":["Button","IconButton","SegmentedControl","ToggleButton","HoldButton","ButtonGroup","SplitButton","ToggleGroup","Toolbar","CompoundButton"],"descriptions":{"Button":"The action button: eight looks, six tones, five sizes, three shapes, icons, a shortcut, loading and success states, and links that look like buttons.","IconButton":"A button with only an icon. aria-label is required; tooltip shows it to sighted people too.","SegmentedControl":"One choice among a few, as a row of pills.","ToggleButton":"A button that stays pressed (bold, mute, pin).","HoldButton":"Hold to confirm (the hold pattern): a fill grows while it is pressed, with pointer, Space or Enter, and the action runs when it is full. For destructive actions without a dialog.","ButtonGroup":"Related buttons side by side, joined into one control.","SplitButton":"A main action plus a menu of related ones.","ToggleGroup":"A set of toggle buttons, one or several on: bold/italic, view modes, filters.","Toolbar":"A row of controls that is one Tab stop; arrow keys move inside it (editor toolbars, table tools). Pass items and it folds what does not fit into a More menu.","CompoundButton":"A tall button with a title and a second line: choices on an empty state, \"Create from template\", start screens."}},"card":{"files":[{"path":"components/card/Card.tsx","content":"import { createElement, type ElementType, type HTMLAttributes, type ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\n\nexport interface CardProps extends HTMLAttributes<HTMLElement> {\n /** default: the surface with the soft ring; deep: a darker inset panel; outline: border only; glass: frosted glass over what is behind it. */\n variant?: 'default' | 'deep' | 'outline' | 'glass';\n /** tight uses less padding and a smaller radius. */\n padding?: 'none' | 'tight' | 'normal' | 'loose';\n /** Lifts and glows on hover; use when the whole card is a link (put the link inside with CardLink). */\n interactive?: boolean;\n /** The element to render. Default div; use article or section when it fits. */\n as?: ElementType;\n /** vertical (default) or horizontal: CardMedia on the left, the rest on the right (stacks on narrow cards). */\n orientation?: 'vertical' | 'horizontal';\n /** Shows a skeleton of a card while its content loads. */\n isLoading?: boolean;\n children?: ReactNode;\n}\n\n/** The Alea panel: rounded surface with the soft inner ring. Header, media and footer parts, side by side or stacked, and a loading state. */\nexport function Card({ variant = 'default', padding = 'normal', interactive, as = 'div', orientation, isLoading, className, children, ...props }: CardProps) {\n const body = isLoading ? <div className=\"alea-card-loading\" aria-hidden=\"true\"><span className=\"alea-skeleton\" data-shape=\"rect\" style={{ height: 120 }} /><span className=\"alea-skeleton\" data-shape=\"text\" style={{ width: '70%' }} /><span className=\"alea-skeleton\" data-shape=\"text\" style={{ width: '45%' }} /></div> : children;\n return createElement(as, { ...props, 'aria-busy': isLoading || undefined, className: cx('alea-card', className), 'data-variant': variant, 'data-padding': padding, 'data-interactive': interactive || undefined, 'data-orientation': orientation }, body);\n}\n\nexport interface CardTitleProps extends HTMLAttributes<HTMLHeadingElement> {\n /** The heading element. Default h3; match the page outline. */\n as?: ElementType;\n}\n\n/** Card title in Crimson Pro. */\nexport function CardTitle({ as = 'h3', className, ...props }: CardTitleProps) {\n return createElement(as, { ...props, className: cx('alea-card-title', className) });\n}\n\n/** Card body text, muted. */\nexport function CardDescription({ className, ...props }: HTMLAttributes<HTMLParagraphElement>) {\n return <p {...props} className={cx('alea-card-description', className)} />;\n}\n\n/** Makes the whole card clickable through one real link (keeps one tab stop and the link text as the name). */\nexport function CardLink({ className, ...props }: React.AnchorHTMLAttributes<HTMLAnchorElement>) {\n return <a {...props} className={cx('alea-card-link alea-focus-ring', className)} />;\n}\n\nexport interface CardHeaderProps {\n /** The title. */\n title: ReactNode;\n /** A line under the title. */\n subtitle?: ReactNode;\n /** An avatar, icon or logo before the title. */\n media?: ReactNode;\n /** Actions or a menu on the right. */\n actions?: ReactNode;\n /** Heading level of the title. Default 3. */\n headingLevel?: 2 | 3 | 4 | 5;\n className?: string;\n}\n\n/** The top of a card: media, title, subtitle and actions. */\nexport function CardHeader({ title, subtitle, media, actions, headingLevel = 3, className }: CardHeaderProps) {\n return (\n <div className={cx('alea-card-header', className)}>\n {media && <span className=\"alea-card-header-media\">{media}</span>}\n <div className=\"alea-card-header-text\">{createElement(`h${headingLevel}`, { className: 'alea-card-title' }, title)}{subtitle && <p className=\"alea-card-description\">{subtitle}</p>}</div>\n {actions && <div className=\"alea-card-header-actions\">{actions}</div>}\n </div>\n );\n}\n\nexport interface CardMediaProps {\n /** The image URL, or your own media as children. */\n src?: string;\n /** The image's text; leave empty for decorative images. */\n alt?: string;\n /** Width to height ratio. Default 16 / 9. */\n ratio?: number;\n children?: ReactNode;\n className?: string;\n}\n\n/** A cover image or video that reaches the card's edges. Put it first or last in the card. */\nexport function CardMedia({ src, alt = '', ratio = 16 / 9, children, className }: CardMediaProps) {\n return <div className={cx('alea-card-media', className)} style={{ aspectRatio: String(ratio) }}>{children ?? <img src={src} alt={alt} loading=\"lazy\" />}</div>;\n}\n\n/** The bottom of a card: actions, with a line above. */\nexport function CardFooter({ children, className, divider = true }: { children: ReactNode; className?: string; /** A line above. Default true. */ divider?: boolean }) {\n return <div className={cx('alea-card-footer', className)} data-divider={divider || undefined}>{children}</div>;\n}\n"},{"path":"components/card/card.css","content":".alea-card {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: var(--alea-space-2);\n border-radius: var(--alea-radius-lg);\n background: var(--alea-surface);\n box-shadow: var(--alea-shadow-card);\n color: var(--alea-text);\n transition: background-color var(--alea-motion-duration-slow) var(--alea-motion-ease-standard), box-shadow var(--alea-motion-duration-base) var(--alea-motion-ease-standard), transform var(--alea-motion-duration-base) var(--alea-motion-ease-out);\n}\n.alea-card[data-variant='deep'] { background: var(--alea-surface-deep); }\n.alea-card[data-variant='outline'] { background: transparent; box-shadow: inset 0 0 0 1px var(--alea-border-strong); }\n.alea-card[data-padding='none'] { --alea-card-pad: var(--alea-space-0); padding: 0; overflow: hidden; }\n/* no padding is for content that runs to the edge (a table, a photo); a header or footer still keeps its own */\n.alea-card[data-padding='none'] > :is(.alea-card-header, .alea-card-footer) { padding: clamp(var(--alea-space-5), 2.2vw, var(--alea-space-7)) clamp(var(--alea-space-5), 2.2vw, var(--alea-space-7)) var(--alea-space-4); }\n.alea-card[data-padding='none'] > .alea-card-footer { padding-top: var(--alea-space-4); padding-bottom: clamp(var(--alea-space-5), 2.2vw, var(--alea-space-7)); }\n.alea-card[data-padding='none'] > .alea-table-wrap { border-radius: 0; box-shadow: none; background: transparent; }\n.alea-card[data-padding='none'] > .alea-card-header + .alea-table-wrap { border-top: 1px solid var(--alea-border); }\n.alea-card[data-padding='tight'] { --alea-card-pad: clamp(var(--alea-space-4), 1.6vw, var(--alea-space-5)); padding: var(--alea-card-pad); border-radius: var(--alea-radius-md); }\n.alea-card[data-padding='normal'] { --alea-card-pad: clamp(var(--alea-space-5), 2.2vw, var(--alea-space-7)); padding: var(--alea-card-pad); }\n.alea-card[data-padding='loose'] { --alea-card-pad: clamp(var(--alea-space-7), 3.2vw, var(--alea-space-10)); padding: var(--alea-card-pad); border-radius: var(--alea-radius-xl); }\n.alea-card[data-interactive]:hover { box-shadow: var(--alea-shadow-card), var(--alea-shadow-glow); }\n.alea-card:has(.alea-card-link:focus-visible) { outline: 2px solid var(--alea-focus); outline-offset: var(--alea-space-0-5); }\n.alea-card-title { margin: 0; font: var(--alea-font-weight-light) clamp(22px, 2.2vw, var(--alea-font-size-3xl)) / var(--alea-font-leading-tight) var(--alea-font-family-display); letter-spacing: var(--alea-font-tracking-display); }\n.alea-card-description { margin: 0; color: var(--alea-text-muted); font-size: var(--alea-font-size-md); line-height: var(--alea-font-leading-normal); }\n.alea-card-link { color: inherit; text-decoration: none; }\n.alea-card-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }\n.alea-card-link:focus-visible { outline: none; }\n\n/* Card parts: header, media, footer; side by side; loading */\n.alea-card-header { display: flex; align-items: flex-start; gap: var(--alea-space-3); }\n.alea-card-header-media { flex: none; display: inline-flex; }\n.alea-card-header-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--alea-space-0-5); }\n.alea-card-header-actions { flex: none; display: flex; gap: var(--alea-space-1); margin: calc(var(--alea-space-1) * -1) calc(var(--alea-space-1) * -1) 0 0; }\n.alea-card-media { overflow: hidden; margin: calc(-1 * var(--alea-card-pad, var(--alea-space-5))) calc(-1 * var(--alea-card-pad, var(--alea-space-5))) 0; border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }\n.alea-card-media:last-child { margin: 0 calc(-1 * var(--alea-card-pad, var(--alea-space-5))) calc(-1 * var(--alea-card-pad, var(--alea-space-5))); border-radius: 0; }\n.alea-card-media > :is(img, video) { display: block; width: 100%; height: 100%; object-fit: cover; }\n.alea-card-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--alea-space-2); margin-top: auto; }\n.alea-card-footer[data-divider] { padding-top: var(--alea-space-4); border-top: 1px solid var(--alea-border); }\n.alea-card[data-orientation='horizontal'] { flex-direction: row; container-type: inline-size; }\n.alea-card[data-orientation='horizontal'] > .alea-card-media { flex: 0 0 40%; margin: calc(-1 * var(--alea-card-pad, var(--alea-space-5))) 0 calc(-1 * var(--alea-card-pad, var(--alea-space-5))) calc(-1 * var(--alea-card-pad, var(--alea-space-5))); aspect-ratio: auto !important; border-radius: inherit; border-top-right-radius: 0; border-bottom-right-radius: 0; }\n.alea-card-loading { display: flex; flex-direction: column; gap: var(--alea-space-3); }\n.alea-card-header .alea-card-title { margin: 0; font: var(--alea-font-weight-semibold) var(--alea-font-size-base) / 1.35 var(--alea-font-family-body); letter-spacing: 0; }\n.alea-card-header .alea-card-description { margin: 0; font-size: var(--alea-font-size-sm); }\n/* an interactive card catches a soft light from the upper left on hover (as in the Figma kit) */\n.alea-card[data-interactive]::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(320px circle at 30% 0%, color-mix(in srgb, var(--alea-accent) 12%, transparent), transparent 70%); opacity: 0; transition: opacity var(--alea-motion-duration-base) var(--alea-motion-ease-standard); }\n.alea-card[data-interactive]:hover::before { opacity: 1; }\n"}],"deps":[],"npm":[],"exports":["Card","CardTitle","CardDescription","CardLink","CardHeader","CardMedia","CardFooter"],"descriptions":{"Card":"The Alea panel: rounded surface with the soft inner ring. Header, media and footer parts, side by side or stacked, and a loading state.","CardTitle":"Card title in Crimson Pro.","CardDescription":"Card body text, muted.","CardLink":"Makes the whole card clickable through one real link (keeps one tab stop and the link text as the name).","CardHeader":"The top of a card: media, title, subtitle and actions.","CardMedia":"A cover image or video that reaches the card's edges. Put it first or last in the card.","CardFooter":"The bottom of a card: actions, with a line above."}},"chat":{"files":[{"path":"components/chat/Chat.tsx","content":"import { Fragment, useEffect, useId, useRef, useState, type KeyboardEvent, type ReactNode } from 'react';\nimport { Button as RACButton, DialogTrigger, useLocale } from 'react-aria-components';\nimport { Check, CheckCheck, Clock, AlertCircle, SmilePlus, MessageSquare, ChevronRight, X } from 'lucide-react';\nimport { cx } from '../../utils/cx';\nimport { Avatar, AvatarGroup } from '../display/Display';\nimport { IconButton } from '../button/Button';\nimport { Popover, PopoverDialog } from '../overlay/Overlay';\nimport { EmojiPicker } from '../emoji/EmojiPicker';\nimport { useStrings } from '../../i18n/strings';\n\n// ---------------------------------------------------------------- TypingIndicator\n\nexport interface TypingIndicatorProps {\n /** Who is typing. Empty hides it. */\n names: string[];\n /** Extra class names. */\n className?: string;\n}\n\n/** \"Ana is typing\" with three bouncing dots. Announced politely once when it appears; the dots are decoration and stop with reduced motion. */\nexport function TypingIndicator({ names, className }: TypingIndicatorProps) {\n const t = useStrings();\n return (\n <div className={cx('alea-typing', className)} role=\"status\" aria-live=\"polite\">\n {names.length > 0 && (\n <>\n <span className=\"alea-typing-dots\" aria-hidden=\"true\"><span /><span /><span /></span>\n <span className=\"alea-typing-text\">{t.typing(names)}</span>\n </>\n )}\n </div>\n );\n}\n\n// ---------------------------------------------------------------- ReactionBar\n\nexport interface Reaction {\n emoji: string;\n count: number;\n /** The current person reacted with this one. */\n mine?: boolean;\n}\n\nexport interface ReactionBarProps {\n /** The reactions so far. */\n reactions: Reaction[];\n /** Called when someone toggles a reaction (an existing one, or a new one from the picker or the quick list). */\n onToggle: (emoji: string) => void;\n /** Shows the add button that opens the emoji picker. Default true. */\n allowAdd?: boolean;\n /** Emoji offered as one-press reactions before the add button, like ['👍', '❤️', '😂']. The ones already used show as reactions instead. */\n quick?: string[];\n /** sm (24 px) or md (28 px, default). */\n size?: 'sm' | 'md';\n /** Extra class names. */\n className?: string;\n}\n\n/** Emoji reactions under a message or a comment: each is a toggle with its count (it pops when the count changes), quick reactions are one press away, and the add button opens an EmojiPicker. Arrow keys, Home and End move between the buttons. */\nexport function ReactionBar({ reactions, onToggle, allowAdd = true, quick, size = 'md', className }: ReactionBarProps) {\n const t = useStrings();\n const { direction } = useLocale();\n // the count of a reaction pops when it changes, not when the bar first shows\n const seen = useRef(new Map<string, number>());\n const popped = new Set(reactions.filter(r => seen.current.has(r.emoji) && seen.current.get(r.emoji) !== r.count).map(r => r.emoji));\n useEffect(() => { seen.current = new Map(reactions.map(r => [r.emoji, r.count])); });\n const move = (e: KeyboardEvent<HTMLDivElement>) => {\n const next = direction === 'rtl' ? 'ArrowLeft' : 'ArrowRight', prev = direction === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n if (![next, prev, 'Home', 'End'].includes(e.key)) return;\n const buttons = [...e.currentTarget.querySelectorAll<HTMLButtonElement>('button:not(:disabled)')];\n const at = buttons.indexOf(document.activeElement as HTMLButtonElement);\n if (at < 0) return;\n e.preventDefault();\n buttons[e.key === 'Home' ? 0 : e.key === 'End' ? buttons.length - 1 : (at + (e.key === next ? 1 : -1) + buttons.length) % buttons.length].focus();\n };\n const used = new Set(reactions.filter(r => r.count > 0).map(r => r.emoji));\n return (\n <div className={cx('alea-reactions', className)} data-size={size} role=\"group\" aria-label={t.reactions} onKeyDown={move}>\n {reactions.filter(r => r.count > 0).map(r => (\n <button key={r.emoji} type=\"button\" className=\"alea-reaction alea-focus-ring\" aria-pressed={!!r.mine} aria-label={t.reactionCount(r.emoji, r.count, !!r.mine)} onClick={() => onToggle(r.emoji)}>\n <span aria-hidden=\"true\">{r.emoji}</span><span className=\"alea-reaction-count\" data-pop={popped.has(r.emoji) || undefined} aria-hidden=\"true\">{r.count}</span>\n </button>\n ))}\n {quick?.filter(e => !used.has(e)).map(e => (\n <button key={e} type=\"button\" className=\"alea-reaction alea-reaction-quick alea-focus-ring\" aria-label={t.reactWith(e)} onClick={() => onToggle(e)}>\n <span aria-hidden=\"true\">{e}</span>\n </button>\n ))}\n {allowAdd && (\n <DialogTrigger>\n <RACButton className=\"alea-reaction alea-reaction-add alea-focus-ring\" aria-label={t.addReaction}><SmilePlus size={16} aria-hidden=\"true\" /></RACButton>\n <Popover placement=\"top start\" className=\"alea-popover alea-emoji-popover\">\n <PopoverDialog aria-label={t.addReaction}>\n {({ close }) => <EmojiPicker onSelect={e => { onToggle(e); close(); }} />}\n </PopoverDialog>\n </Popover>\n </DialogTrigger>\n )}\n </div>\n );\n}\n\n// ---------------------------------------------------------------- ThreadPreview\n\n/** What a thread knows about itself, for the link and the preview. */\nexport interface ThreadInfo {\n /** Number of replies. */\n replyCount?: number;\n /** The people who replied: their avatars show in the preview. */\n participants?: Array<{ name: string; src?: string }>;\n /** When the last reply came: \"Last reply 2 hours ago\". */\n lastReplyAt?: Date;\n /** The last reply, as a one line snippet in the collapsed preview. */\n lastReply?: { author: string; text: string };\n /** Replies you have not read yet: \"2 new\". */\n unread?: number;\n}\n\nexport interface ThreadPreviewProps extends ThreadInfo {\n /** Opens the thread in its own view. Without replies to expand, the whole preview is this button. */\n onOpen?: () => void;\n /** The replies, shown under the preview when it expands. With them the preview is a disclosure: a button with aria-expanded. */\n children?: ReactNode;\n /** Expanded (controlled). */\n isExpanded?: boolean;\n /** Expanded at first. */\n defaultExpanded?: boolean;\n /** Called when the preview expands or collapses. */\n onExpandedChange?: (isExpanded: boolean) => void;\n /** Extra class names. */\n className?: string;\n}\n\n// \"2 hours ago\", \"yesterday\", \"now\": in the person's language\nfunction ago(date: Date, locale: string) {\n const rtf = new Intl.RelativeTimeFormat(locale, { numeric: 'auto' });\n const s = Math.round((Date.now() - date.getTime()) / 1000);\n if (s < 45) return rtf.format(0, 'second');\n if (s < 3600) return rtf.format(-Math.round(s / 60), 'minute');\n if (s < 86400) return rtf.format(-Math.round(s / 3600), 'hour');\n if (s < 86400 * 30) return rtf.format(-Math.round(s / 86400), 'day');\n return new Intl.DateTimeFormat(locale, { day: 'numeric', month: 'short', year: 'numeric' }).format(date);\n}\n\n/** A collapsed thread under a message: the people who replied, the count, when the last reply came and a one line snippet of it. A button that opens the thread, or, when you pass the replies as children, a disclosure that expands them in place. */\nexport function ThreadPreview({ replyCount = 0, participants, lastReplyAt, lastReply, unread, onOpen, children, isExpanded, defaultExpanded, onExpandedChange, className }: ThreadPreviewProps) {\n const t = useStrings();\n const { locale } = useLocale();\n const id = useId();\n const [own, setOwn] = useState(!!defaultExpanded);\n const disclosure = children != null && children !== false;\n const expanded = disclosure && (isExpanded ?? own);\n const toggle = () => { const next = !expanded; if (isExpanded === undefined) setOwn(next); onExpandedChange?.(next); };\n return (\n <div className={cx('alea-thread', className)} data-expanded={expanded || undefined} data-unread={unread ? true : undefined}>\n <button type=\"button\" className=\"alea-thread-head alea-focus-ring\" onClick={disclosure ? toggle : onOpen}\n aria-expanded={disclosure ? expanded : undefined} aria-controls={disclosure ? `${id}-replies` : undefined} aria-describedby={lastReply && !expanded ? `${id}-last` : undefined}>\n {participants?.length ? <AvatarGroup people={participants} size=\"xs\" max={3} aria-hidden=\"true\" /> : <MessageSquare size={16} aria-hidden=\"true\" />}\n <span className=\"alea-thread-count\">{t.replies(replyCount)}</span>\n {unread ? <span className=\"alea-thread-unread\">{t.newReplies(unread)}</span> : null}\n {lastReplyAt && <span className=\"alea-thread-time\">{t.lastReply(ago(lastReplyAt, locale))}</span>}\n <ChevronRight size={16} className=\"alea-thread-chevron\" aria-hidden=\"true\" />\n </button>\n {lastReply && !expanded && <p className=\"alea-thread-last\" id={`${id}-last`}><strong>{lastReply.author}</strong> {lastReply.text}</p>}\n {disclosure && (\n <div className=\"alea-thread-body\" data-expanded={expanded || undefined}>\n <div className=\"alea-thread-body-inner\" id={`${id}-replies`} role=\"region\" aria-label={t.threadReplies}>\n {children}\n {onOpen && <button type=\"button\" className=\"alea-thread-open alea-focus-ring\" onClick={onOpen}>{t.openThread}</button>}\n </div>\n </div>\n )}\n </div>\n );\n}\n\n// ---------------------------------------------------------------- ChatMessage\n\nexport type MessageStatus = 'sending' | 'sent' | 'delivered' | 'read' | 'failed';\n\nexport interface ChatMessageProps {\n /** Who wrote it. */\n author: string;\n /** Their photo. */\n avatarSrc?: string;\n /** The message: text, or anything (images, files, cards). */\n children: ReactNode;\n /** When it was sent: shown as a short time, with the full date on hover. */\n time?: Date;\n /** Written by the current person: on the end side, in the accent bubble. */\n isOwn?: boolean;\n /** Part of a run from the same author: hides the avatar and the name. */\n isGrouped?: boolean;\n /** Delivery state for own messages: sending, sent, delivered, read or failed. */\n status?: MessageStatus;\n /** Marks it as edited. */\n isEdited?: boolean;\n /** Reactions under the bubble. */\n reactions?: Reaction[];\n /** Called when a reaction is toggled; with it, the reactions get an add button. */\n onReact?: (emoji: string) => void;\n /** With onReact: emoji offered as one-press reactions in the hover actions, like ['👍', '❤️', '😂']. */\n quickReactions?: string[];\n /** Number of replies in its thread, shown as a link. */\n replyCount?: number;\n /** More about the thread: who replied, when, the last reply. It sets the count too. */\n thread?: ThreadInfo;\n /** link (default): a link with the count; preview: a collapsed thread with avatars, the last reply and a way to expand it. */\n threadVariant?: 'link' | 'preview';\n /** With threadVariant preview: the replies, shown when the preview expands. */\n threadReplies?: ReactNode;\n /** The expanded preview (controlled). */\n isThreadExpanded?: boolean;\n /** Called when the preview expands or collapses. */\n onThreadExpandedChange?: (isExpanded: boolean) => void;\n /** Opens the thread. */\n onOpenThread?: () => void;\n /** Actions that show on hover and focus: reply, react, more (small IconButtons). */\n actions?: ReactNode;\n /** bubble (default) or plain (no bubble, full width, like a channel). */\n variant?: 'bubble' | 'plain';\n /** Extra class names. */\n className?: string;\n}\n\nconst STATUS_ICON = { sending: Clock, sent: Check, delivered: CheckCheck, read: CheckCheck, failed: AlertCircle } as const;\n\n/** One message in a conversation: avatar and name (hidden inside a run), a bubble or plain text, time, delivery state, edited, reactions with quick ones, a thread as a link or a collapsed preview, and hover actions. */\nexport function ChatMessage({ author, avatarSrc, children, time, isOwn, isGrouped, status, isEdited, reactions, onReact, quickReactions, replyCount, thread, threadVariant = 'link', threadReplies, isThreadExpanded, onThreadExpandedChange, onOpenThread, actions, variant = 'bubble', className }: ChatMessageProps) {\n const t = useStrings();\n const { locale } = useLocale();\n const S = status ? STATUS_ICON[status] : null;\n const hhmm = time ? new Intl.DateTimeFormat(locale, { hour: 'numeric', minute: '2-digit' }).format(time) : null;\n const replies = thread?.replyCount ?? replyCount;\n return (\n <article className={cx('alea-msg', className)} data-own={isOwn || undefined} data-grouped={isGrouped || undefined} data-variant={variant} data-status={status}\n aria-label={`${isOwn ? t.you : author}${hhmm ? `, ${hhmm}` : ''}`}>\n <div className=\"alea-msg-avatar\">{!isGrouped && <Avatar name={author} src={avatarSrc} size=\"sm\" />}</div>\n <div className=\"alea-msg-main\">\n {!isGrouped && (\n <header className=\"alea-msg-head\">\n <span className=\"alea-msg-author\">{isOwn ? t.you : author}</span>\n {time && <time className=\"alea-msg-time\" dateTime={time.toISOString()} title={time.toLocaleString(locale)}>{hhmm}</time>}\n </header>\n )}\n <div className=\"alea-msg-body\">\n <div className=\"alea-msg-bubble\">{children}</div>\n {(actions || (onReact && (quickReactions?.length || !reactions?.length))) && (\n <div className=\"alea-msg-actions\">\n {onReact && (quickReactions?.length || !reactions?.length) ? <ReactionBar reactions={[]} quick={quickReactions} onToggle={onReact} size=\"sm\" /> : null}\n {actions}\n </div>\n )}\n </div>\n {(isEdited || S || (isGrouped && hhmm)) && (\n <div className=\"alea-msg-meta\">\n {isGrouped && hhmm && <time dateTime={time!.toISOString()}>{hhmm}</time>}\n {isEdited && <span>{t.edited2}</span>}\n {S && status && <span className=\"alea-msg-status\" data-status={status}><S size={14} aria-hidden=\"true\" />{t.messageStatus[status]}</span>}\n </div>\n )}\n {reactions?.length ? <ReactionBar reactions={reactions} onToggle={e => onReact?.(e)} allowAdd={!!onReact} size=\"sm\" /> : null}\n {replies ? (\n threadVariant === 'preview'\n ? <ThreadPreview {...thread} replyCount={replies} onOpen={onOpenThread} isExpanded={isThreadExpanded} onExpandedChange={onThreadExpandedChange}>{threadReplies}</ThreadPreview>\n : <button type=\"button\" className=\"alea-msg-thread alea-focus-ring\" onClick={onOpenThread}><MessageSquare size={14} aria-hidden=\"true\" />{t.replies(replies)}{thread?.unread ? <span className=\"alea-thread-unread\">{t.newReplies(thread.unread)}</span> : null}</button>\n ) : null}\n </div>\n </article>\n );\n}\n\n// ---------------------------------------------------------------- MessageList\n\nexport interface ChatItem {\n id: string;\n author: string;\n avatarSrc?: string;\n time: Date;\n text: ReactNode;\n isOwn?: boolean;\n status?: MessageStatus;\n isEdited?: boolean;\n reactions?: Reaction[];\n replyCount?: number;\n /** More about its thread: who replied, when, the last reply. */\n thread?: ThreadInfo;\n /** Its replies, for the expanding preview (threadVariant=\"preview\") and for ThreadView. */\n replies?: ChatItem[];\n}\n\nexport interface MessageListProps {\n /** The messages, oldest first. */\n messages: ChatItem[];\n /** Messages from the same author within this many minutes form a run (no repeated avatar and name). Default 5. */\n groupMinutes?: number;\n /** Id of the first unread message: a \"New messages\" line shows above it. */\n firstUnreadId?: string;\n /** Called when a reaction is toggled on a message. */\n onReact?: (messageId: string, emoji: string) => void;\n /** Emoji offered as one-press reactions on hover and focus, with onReact. */\n quickReactions?: string[];\n /** Called when a thread link is pressed, or Open thread in a preview. */\n onOpenThread?: (messageId: string) => void;\n /** How a message's thread shows: link (default) or preview (avatars, the last reply, and its replies expand in place). */\n threadVariant?: 'link' | 'preview';\n /** Extra actions per message, shown on hover and focus. */\n renderActions?: (m: ChatItem) => ReactNode;\n /** Who is typing, shown at the end. */\n typing?: string[];\n /** bubble (default) or plain. */\n variant?: 'bubble' | 'plain';\n /** Content at the top of the scrolling list, before the first message: the parent of a thread. */\n header?: ReactNode;\n /** Height of the scrolling list; it starts at the newest message and follows new ones while you are at the bottom. */\n height?: number | string;\n /** Name for screen readers. Default \"Messages\". */\n 'aria-label'?: string;\n /** Extra class names. */\n className?: string;\n}\n\nconst sameDay = (a: Date, b: Date) => a.toDateString() === b.toDateString();\n\n/** A conversation: day separators (Today, Yesterday, a date), runs from the same author, a New messages line, a typing indicator, threads as links or expanding previews, and scrolling that follows new messages. A log region, so screen readers hear new messages as they arrive. */\nexport function MessageList({ messages, groupMinutes = 5, firstUnreadId, onReact, quickReactions, onOpenThread, threadVariant = 'link', renderActions, typing = [], variant = 'bubble', header, height = 420, className, 'aria-label': label }: MessageListProps) {\n const t = useStrings();\n const { locale } = useLocale();\n const box = useRef<HTMLDivElement>(null);\n const atEnd = useRef(true);\n const [open, setOpen] = useState<Set<string>>(new Set());\n useEffect(() => { const el = box.current; if (el && atEnd.current) el.scrollTop = el.scrollHeight; }, [messages.length, typing.length]);\n const dayLabel = (d: Date) => {\n const now = new Date(); const y = new Date(now); y.setDate(now.getDate() - 1);\n return sameDay(d, now) ? t.today : sameDay(d, y) ? t.yesterday : new Intl.DateTimeFormat(locale, { weekday: 'long', day: 'numeric', month: 'long' }).format(d);\n };\n const toggleThread = (id: string, on: boolean) => setOpen(s => { const n = new Set(s); if (on) n.add(id); else n.delete(id); return n; });\n return (\n <div ref={box} className={cx('alea-msglist', className)} style={{ height }} tabIndex={0} role=\"log\" aria-label={label ?? t.messages}\n onScroll={e => { const el = e.currentTarget; atEnd.current = el.scrollHeight - el.scrollTop - el.clientHeight < 48; }}>\n {header}\n {messages.map((m, i) => {\n const prev = messages[i - 1];\n const newDay = !prev || !sameDay(prev.time, m.time);\n const grouped = !!prev && !newDay && prev.author === m.author && m.id !== firstUnreadId && (m.time.getTime() - prev.time.getTime()) / 60000 <= groupMinutes;\n return (\n <Fragment key={m.id}>\n {newDay && <div className=\"alea-msglist-day\" role=\"separator\" aria-label={dayLabel(m.time)}><span aria-hidden=\"true\">{dayLabel(m.time)}</span></div>}\n {m.id === firstUnreadId && <div className=\"alea-msglist-new\" role=\"separator\" aria-label={t.newMessages}><span aria-hidden=\"true\">{t.newMessages}</span></div>}\n <ChatMessage author={m.author} avatarSrc={m.avatarSrc} time={m.time} isOwn={m.isOwn} isGrouped={grouped} status={m.status} isEdited={m.isEdited} variant={variant}\n reactions={m.reactions} onReact={onReact ? e => onReact(m.id, e) : undefined} quickReactions={quickReactions}\n replyCount={m.replyCount ?? m.replies?.length} thread={m.thread} threadVariant={threadVariant} onOpenThread={() => onOpenThread?.(m.id)}\n threadReplies={threadVariant === 'preview' && m.replies?.length ? m.replies.map(r => (\n <ChatMessage key={r.id} author={r.author} avatarSrc={r.avatarSrc} time={r.time} isOwn={r.isOwn} isEdited={r.isEdited} variant=\"plain\" reactions={r.reactions} onReact={onReact ? e => onReact(r.id, e) : undefined}>{r.text}</ChatMessage>\n )) : undefined}\n isThreadExpanded={threadVariant === 'preview' ? open.has(m.id) : undefined} onThreadExpandedChange={on => toggleThread(m.id, on)}\n actions={renderActions?.(m)}>\n {m.text}\n </ChatMessage>\n </Fragment>\n );\n })}\n <TypingIndicator names={typing} />\n </div>\n );\n}\n\n// ---------------------------------------------------------------- ThreadView\n\nexport interface ThreadViewProps {\n /** The message the thread hangs from. */\n parent: ChatItem;\n /** The replies, oldest first. */\n replies: ChatItem[];\n /** Called when the thread is closed: the close button or Escape. */\n onClose: () => void;\n /** Called when a reaction is toggled on the parent or a reply. */\n onReact?: (messageId: string, emoji: string) => void;\n /** Emoji offered as one-press reactions on hover and focus, with onReact. */\n quickReactions?: string[];\n /** Extra actions per reply, shown on hover and focus. */\n renderActions?: (m: ChatItem) => ReactNode;\n /** Who is typing a reply. */\n typing?: string[];\n /** The reply box under the replies: a PromptInput, a TextArea and a button. */\n children?: ReactNode;\n /** bubble or plain (default): how the messages look. */\n variant?: 'bubble' | 'plain';\n /** Height of the whole view. Default 520. */\n height?: number | string;\n /** Level of the title heading, 2 to 6. Default 2. */\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n /** Moves focus to the thread title when it opens, and back to what opened it when it closes. Default true. */\n autoFocus?: boolean;\n /** Extra class names. */\n className?: string;\n}\n\n/** A thread on its own: the parent message, the replies in a log, a reply box, and a close button. When it opens focus moves to its title and Escape closes it, returning focus to the message link that opened it. */\nexport function ThreadView({ parent, replies, onClose, onReact, quickReactions, renderActions, typing, children, variant = 'plain', height = 520, headingLevel = 2, autoFocus = true, className }: ThreadViewProps) {\n const t = useStrings();\n const title = useRef<HTMLHeadingElement>(null);\n const keepClose = useRef(onClose); keepClose.current = onClose;\n useEffect(() => {\n const opener = document.activeElement as HTMLElement | null;\n if (autoFocus) title.current?.focus();\n return () => { if (autoFocus && opener && opener !== document.body && opener.isConnected) opener.focus(); };\n }, [autoFocus]);\n const count = replies.length;\n const Heading = `h${headingLevel}` as 'h2';\n return (\n <section className={cx('alea-thread-view', className)} style={{ height }} aria-label={t.replyingIn(parent.author)}\n onKeyDown={e => { if (e.key === 'Escape' && !e.defaultPrevented) { e.stopPropagation(); keepClose.current(); } }}>\n <header className=\"alea-thread-view-head\">\n <div className=\"alea-thread-view-titles\">\n <Heading className=\"alea-thread-view-title\" ref={title} tabIndex={-1}>{t.thread}</Heading>\n <p className=\"alea-thread-view-sub\">{t.replyingIn(parent.author)}{count ? ` · ${t.replies(count)}` : ''}</p>\n </div>\n <IconButton aria-label={t.closeThread} size=\"sm\" onPress={onClose}><X /></IconButton>\n </header>\n <MessageList\n className=\"alea-thread-view-list\" height=\"auto\" aria-label={t.threadReplies} variant={variant} messages={replies} typing={typing}\n onReact={onReact} quickReactions={quickReactions} renderActions={renderActions}\n header={\n <>\n <ChatMessage author={parent.author} avatarSrc={parent.avatarSrc} time={parent.time} isOwn={parent.isOwn} isEdited={parent.isEdited} variant={variant}\n reactions={parent.reactions} onReact={onReact ? e => onReact(parent.id, e) : undefined} quickReactions={quickReactions}>{parent.text}</ChatMessage>\n <div className=\"alea-thread-view-divider\" role=\"separator\" aria-label={count ? t.replies(count) : t.noReplies}><span aria-hidden=\"true\">{count ? t.replies(count) : t.noReplies}</span></div>\n </>\n }\n />\n {children && <div className=\"alea-thread-view-reply\">{children}</div>}\n </section>\n );\n}\n"},{"path":"components/chat/chat.css","content":"/* TypingIndicator */\n.alea-typing { display: flex; align-items: center; gap: var(--alea-space-2); min-height: 24px; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n.alea-typing-dots { display: inline-flex; gap: var(--alea-space-1); padding: var(--alea-space-2) var(--alea-space-2); border-radius: var(--alea-radius-full); background: var(--alea-surface-raised); }\n.alea-typing-dots span { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: alea-typing 1.2s var(--alea-motion-ease-out) infinite; }\n.alea-typing-dots span:nth-child(2) { animation-delay: 0.15s; }\n.alea-typing-dots span:nth-child(3) { animation-delay: 0.3s; }\n@keyframes alea-typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-3px); opacity: 1; } }\n@media (prefers-reduced-motion: reduce) { .alea-typing-dots span { animation: none; opacity: 0.7; } }\n\n/* ReactionBar */\n.alea-reactions { display: flex; flex-wrap: wrap; gap: var(--alea-space-1); }\n.alea-reaction { display: inline-flex; align-items: center; gap: var(--alea-space-1); height: 28px; padding: 0 var(--alea-space-2); border: 0; border-radius: var(--alea-radius-full); background: var(--alea-surface-raised); color: var(--alea-text); box-shadow: inset 0 0 0 1px var(--alea-border); font: var(--alea-font-weight-medium) var(--alea-font-size-sm) / 1 var(--alea-font-family-body); cursor: pointer; transition: background var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), box-shadow var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), transform var(--alea-motion-duration-fast) var(--alea-motion-ease-emphasized); }\n.alea-reactions[data-size='sm'] .alea-reaction { height: 24px; padding: 0 var(--alea-space-2); font-size: var(--alea-font-size-xs); }\n.alea-reaction:hover { box-shadow: inset 0 0 0 1px var(--alea-border-strong); }\n.alea-reaction:active { transform: scale(calc(1 - (1 - var(--alea-motion-scale-press)) * 1.5)); }\n.alea-reaction[aria-pressed='true'] { background: var(--alea-accent-subtle); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--alea-accent) 55%, transparent); }\n.alea-reaction-count { font-variant-numeric: tabular-nums; }\n.alea-reaction-add { color: var(--alea-text-muted); }\n@media (pointer: coarse) { .alea-reaction { height: 36px; } }\n\n/* ChatMessage */\n.alea-msg { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--alea-space-3); padding: var(--alea-space-0-5) var(--alea-space-2); }\n.alea-msg:not([data-grouped]) { margin-top: var(--alea-space-3); }\n.alea-msg-avatar { padding-top: var(--alea-space-0-5); }\n.alea-msg-main { display: flex; flex-direction: column; align-items: flex-start; gap: var(--alea-space-1); min-width: 0; }\n.alea-msg-head { display: flex; align-items: baseline; gap: var(--alea-space-2); }\n.alea-msg-author { font: var(--alea-font-weight-semibold) var(--alea-font-size-sm) / 1.3 var(--alea-font-family-body); }\n.alea-msg-time, .alea-msg-meta { color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); }\n.alea-msg-body { position: relative; display: flex; align-items: flex-start; gap: var(--alea-space-2); max-width: min(560px, 100%); }\n.alea-msg[data-variant='bubble'] .alea-msg-bubble { padding: var(--alea-space-2) var(--alea-space-3); border-radius: var(--alea-radius-xs) var(--alea-radius-2xl) var(--alea-radius-2xl) var(--alea-radius-2xl); background: var(--alea-surface-raised); color: var(--alea-text); font-size: var(--alea-font-size-md); line-height: 1.5; overflow-wrap: anywhere; }\n.alea-msg[data-variant='bubble'][data-grouped] .alea-msg-bubble { border-radius: var(--alea-radius-2xl); }\n.alea-msg[data-variant='plain'] .alea-msg-bubble { font-size: var(--alea-font-size-md); line-height: 1.5; }\n.alea-msg[data-variant='plain'] .alea-msg-body { max-width: 100%; }\n.alea-msg-meta { display: flex; align-items: center; gap: var(--alea-space-2); }\n.alea-msg-status { display: inline-flex; align-items: center; gap: var(--alea-space-1); }\n.alea-msg-status[data-status='read'] { color: var(--alea-accent-strong); }\n.alea-msg-status[data-status='failed'] { color: var(--alea-status-danger); }\n.alea-msg[data-status='sending'] .alea-msg-bubble { opacity: 0.7; }\n/* own messages sit on the end side in the accent bubble */\n.alea-msg[data-own][data-variant='bubble'] { grid-template-columns: minmax(0, 1fr); }\n.alea-msg[data-own][data-variant='bubble'] .alea-msg-avatar { display: none; }\n.alea-msg[data-own][data-variant='bubble'] .alea-msg-main { align-items: flex-end; }\n.alea-msg[data-own][data-variant='bubble'] .alea-msg-body { flex-direction: row-reverse; }\n.alea-msg[data-own][data-variant='bubble'] .alea-msg-bubble { border-radius: var(--alea-radius-2xl) var(--alea-radius-xs) var(--alea-radius-2xl) var(--alea-radius-2xl); background: var(--alea-accent-solid); color: var(--alea-accent-on); }\n.alea-msg[data-own][data-variant='bubble'][data-grouped] .alea-msg-bubble { border-radius: var(--alea-radius-2xl); }\n.alea-msg[data-own][data-variant='bubble'] .alea-msg-bubble a { color: inherit; }\n/* actions appear on hover and focus, and stay reachable by keyboard */\n.alea-msg-actions { display: flex; gap: var(--alea-space-0-5); opacity: 0; transition: opacity var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-msg:hover .alea-msg-actions, .alea-msg:focus-within .alea-msg-actions { opacity: 1; }\n@media (hover: none) { .alea-msg-actions { opacity: 1; } }\n.alea-msg-thread { display: inline-flex; align-items: center; gap: var(--alea-space-2); padding: var(--alea-space-0-5) var(--alea-space-2); margin-left: calc(var(--alea-space-2) * -1); border: 0; border-radius: var(--alea-radius-sm); background: none; color: var(--alea-accent-strong); font: var(--alea-font-weight-semibold) var(--alea-font-size-xs) / 1.6 var(--alea-font-family-body); cursor: pointer; }\n.alea-msg-thread:hover { background: var(--alea-accent-subtle); }\n\n/* MessageList */\n.alea-msglist { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; padding: var(--alea-space-2) var(--alea-space-2) var(--alea-space-3); outline: none; scrollbar-width: thin; }\n.alea-msglist:focus-visible { box-shadow: inset 0 0 0 2px var(--alea-focus); border-radius: var(--alea-radius-md); }\n.alea-msglist-day, .alea-msglist-new { display: flex; align-items: center; gap: var(--alea-space-3); margin: var(--alea-space-4) 0 var(--alea-space-1); color: var(--alea-text-muted); font: var(--alea-font-weight-semibold) var(--alea-font-size-xs) / 1 var(--alea-font-family-body); }\n.alea-msglist-day::before, .alea-msglist-day::after, .alea-msglist-new::after { content: ''; flex: 1; height: 1px; background: var(--alea-border); }\n.alea-msglist-new { color: var(--alea-status-danger); }\n.alea-msglist-new::after { background: color-mix(in oklab, var(--alea-status-danger) 50%, transparent); }\n.alea-msglist .alea-typing { padding: var(--alea-space-2) var(--alea-space-2) 0 calc(var(--alea-space-8) + var(--alea-space-5)); }\n\n/* reactions: the count pops when it changes, quick reactions are one press away */\n.alea-reaction-count[data-pop] { animation: alea-reaction-pop var(--alea-motion-duration-base) var(--alea-motion-ease-emphasized); }\n@keyframes alea-reaction-pop { from { transform: scale(1.6); } }\n.alea-reaction-quick { justify-content: center; width: var(--alea-space-7); padding: 0; color: var(--alea-text-muted); filter: grayscale(0.6); transition: filter var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), transform var(--alea-motion-duration-fast) var(--alea-motion-ease-emphasized); }\n.alea-reaction-quick:hover, .alea-reaction-quick:focus-visible { filter: none; transform: scale(calc(1 + (1 - var(--alea-motion-scale-press)) * 3)); }\n.alea-reactions[data-size='sm'] .alea-reaction-quick { width: var(--alea-space-6); }\n@media (pointer: coarse) { .alea-reaction-quick { width: 36px; } }\n.alea-msg-actions .alea-reactions { flex-wrap: nowrap; }\n@media (prefers-reduced-motion: reduce) { .alea-reaction-count[data-pop] { animation: none; } .alea-reaction-quick { transition: none; } .alea-reaction-quick:hover, .alea-reaction-quick:focus-visible { transform: none; } }\n\n/* thread: the link, the collapsed preview and its replies */\n.alea-thread-unread { padding: 0 var(--alea-space-2); border-radius: var(--alea-radius-full); background: var(--alea-accent-solid); color: var(--alea-accent-on); font: var(--alea-font-weight-semibold) var(--alea-font-size-xs) / var(--alea-space-5) var(--alea-font-family-body); }\n.alea-thread { display: flex; flex-direction: column; gap: var(--alea-space-1); width: 100%; max-width: min(560px, 100%); margin-left: calc(-1 * var(--alea-space-2)); }\n.alea-thread-head { display: flex; align-items: center; gap: var(--alea-space-2); width: 100%; min-height: var(--alea-space-8); padding: var(--alea-space-1) var(--alea-space-2); border: 0; border-radius: var(--alea-radius-sm); background: none; color: var(--alea-accent-strong); font: var(--alea-font-weight-semibold) var(--alea-font-size-sm) / 1.3 var(--alea-font-family-body); text-align: start; cursor: pointer; transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-thread-head:hover { background: var(--alea-accent-subtle); }\n.alea-thread-time { color: var(--alea-text-muted); font-weight: var(--alea-font-weight-regular); font-size: var(--alea-font-size-xs); }\n.alea-thread-chevron { flex: none; margin-inline-start: auto; color: var(--alea-icon-muted); transition: transform var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-thread-head:hover .alea-thread-chevron { transform: translateX(var(--alea-space-1)); }\n.alea-thread[data-expanded] .alea-thread-chevron, .alea-thread[data-expanded] .alea-thread-head:hover .alea-thread-chevron { transform: rotate(90deg); }\n.alea-thread-last { margin: 0; padding: 0 var(--alea-space-2) var(--alea-space-1); overflow: hidden; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); text-overflow: ellipsis; white-space: nowrap; }\n.alea-thread-last strong { color: var(--alea-text); font-weight: var(--alea-font-weight-medium); }\n.alea-thread-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-thread-body[data-expanded] { grid-template-rows: 1fr; }\n.alea-thread-body-inner { min-height: 0; margin-inline-start: var(--alea-space-4); padding-inline-start: var(--alea-space-3); overflow: hidden; border-inline-start: 2px solid var(--alea-border); visibility: hidden; transition: visibility 0s linear var(--alea-motion-duration-base); }\n.alea-thread-body[data-expanded] .alea-thread-body-inner { visibility: visible; transition-delay: 0s; }\n.alea-thread-open { align-self: flex-start; margin: var(--alea-space-1) 0 var(--alea-space-2); padding: var(--alea-space-1) var(--alea-space-2); border: 0; border-radius: var(--alea-radius-sm); background: none; color: var(--alea-accent-strong); font: var(--alea-font-weight-semibold) var(--alea-font-size-sm) / 1.3 var(--alea-font-family-body); cursor: pointer; }\n.alea-thread-open:hover { background: var(--alea-accent-subtle); }\n@media (pointer: coarse) { .alea-thread-head, .alea-thread-open { min-height: var(--alea-space-12); } }\n@media (prefers-reduced-motion: reduce) { .alea-thread-body, .alea-thread-chevron, .alea-thread-head { transition: none; } }\n\n/* ThreadView: parent message, replies, reply box */\n.alea-thread-view { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border-radius: var(--alea-radius-md); background: var(--alea-surface); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-thread-view-head { display: flex; align-items: center; justify-content: space-between; gap: var(--alea-space-3); padding: var(--alea-space-3) var(--alea-space-4); border-bottom: 1px solid var(--alea-border); }\n.alea-thread-view-titles { min-width: 0; }\n.alea-thread-view-title { margin: 0; border-radius: var(--alea-radius-xs); font: var(--alea-font-weight-semibold) var(--alea-font-size-md) / 1.3 var(--alea-font-family-body); outline: none; }\n.alea-thread-view-title:focus-visible { box-shadow: 0 0 0 2px var(--alea-focus); }\n.alea-thread-view-sub { margin: 0; overflow: hidden; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); text-overflow: ellipsis; white-space: nowrap; }\n.alea-thread-view .alea-thread-view-list { flex: 1; min-height: 0; }\n.alea-thread-view-divider { display: flex; align-items: center; gap: var(--alea-space-3); margin: var(--alea-space-3) 0 var(--alea-space-1); color: var(--alea-text-muted); font: var(--alea-font-weight-semibold) var(--alea-font-size-xs) / 1 var(--alea-font-family-body); }\n.alea-thread-view-divider::after { content: ''; flex: 1; height: 1px; background: var(--alea-border); }\n.alea-thread-view-reply { padding: var(--alea-space-3) var(--alea-space-4); border-top: 1px solid var(--alea-border); }\n"}],"deps":["display","button","overlay","emoji"],"npm":["react-aria-components","lucide-react"],"exports":["TypingIndicator","ReactionBar","ThreadPreview","ChatMessage","MessageList","ThreadView"],"descriptions":{"TypingIndicator":"\"Ana is typing\" with three bouncing dots. Announced politely once when it appears; the dots are decoration and stop with reduced motion.","ReactionBar":"Emoji reactions under a message or a comment: each is a toggle with its count (it pops when the count changes), quick reactions are one press away, and the add button opens an EmojiPicker. Arrow keys, Home and End move between the buttons.","ThreadPreview":"A collapsed thread under a message: the people who replied, the count, when the last reply came and a one line snippet of it. A button that opens the thread, or, when you pass the replies as children, a disclosure that expands them in place.","ChatMessage":"One message in a conversation: avatar and name (hidden inside a run), a bubble or plain text, time, delivery state, edited, reactions with quick ones, a thread as a link or a collapsed preview, and hover actions.","MessageList":"A conversation: day separators (Today, Yesterday, a date), runs from the same author, a New messages line, a typing indicator, threads as links or expanding previews, and scrolling that follows new messages. A log region, so screen readers hear new messages as they arrive.","ThreadView":"A thread on its own: the parent message, the replies in a log, a reply box, and a close button. When it opens focus moves to its title and Escape closes it, returning focus to the message link that opened it."}},"choice":{"files":[{"path":"components/choice/Choice.tsx","content":"import type { ReactNode } from 'react';\nimport { Check, X } from 'lucide-react';\nimport { useControlled } from '../../utils/controlled';\nimport { Spinner } from '../feedback/Spinner';\nimport {\n Checkbox as RACCheckbox, CheckboxGroup as RACCheckboxGroup, CheckboxGroupStateContext, Radio as RACRadio, RadioGroup as RACRadioGroup, Switch as RACSwitch,\n type CheckboxProps as RACCheckboxProps, type CheckboxGroupProps as RACCheckboxGroupProps, type RadioProps as RACRadioProps,\n type RadioGroupProps as RACRadioGroupProps, type SwitchProps as RACSwitchProps, type ValidationResult,\n} from 'react-aria-components';\nimport { withBase } from '../../utils/cx';\nimport { Label, Description, FieldError } from '../field/Field';\nimport { useBusy } from '../field/FieldLoading';\n\nexport type ChoiceSize = 'sm' | 'md' | 'lg';\n\nexport interface CheckboxProps extends Omit<RACCheckboxProps, 'children'> {\n /** The label next to the box. */\n children?: ReactNode;\n /** Help text under the label. */\n description?: ReactNode;\n /** sm (16 px box), md (20 px, default) or lg (24 px). In a group, set it on the group. */\n size?: ChoiceSize;\n /** filled (default: an accent box when checked) or outline (an accent border and check). */\n variant?: 'filled' | 'outline';\n /** Label on the right (default) or on the left. */\n labelPosition?: 'start' | 'end';\n}\n\n/** A checkbox with checked, indeterminate, invalid, read only and disabled states, three sizes and two looks. */\nexport function Checkbox({ children, description, size, variant, labelPosition, className, ...props }: CheckboxProps) {\n return (\n <RACCheckbox {...props} className={withBase('alea-check', className as any)} data-size={size} data-variant={variant !== 'filled' ? variant : undefined} data-label-position={labelPosition !== 'end' ? labelPosition : undefined}>\n {({ isIndeterminate }) => (\n <>\n <span className=\"alea-check-box\" aria-hidden=\"true\">\n <svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n {isIndeterminate ? <path d=\"M4 8h8\" pathLength={1} /> : <path d=\"M3.5 8.5l3 3 6-7\" pathLength={1} />}\n </svg>\n </span>\n {(children || description) && <span className=\"alea-check-text\">{children}{description && <span className=\"alea-check-desc\">{description}</span>}</span>}\n </>\n )}\n </RACCheckbox>\n );\n}\n\nexport interface ChoiceOption { value: string; label: ReactNode; description?: ReactNode; isDisabled?: boolean }\n\ninterface GroupBits {\n /** The visible label for the group. */\n label?: ReactNode;\n /** The options as data, instead of Checkbox or Radio children. */\n items?: ChoiceOption[];\n /** sm, md (default) or lg for every option. */\n size?: ChoiceSize;\n /** filled (default) or outline for every option. */\n variant?: 'filled' | 'outline';\n /** Help text under the group. */\n description?: ReactNode;\n /** Error text, shown when the group is invalid. */\n errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);\n /** vertical (default) or horizontal. */\n orientation?: 'vertical' | 'horizontal';\n children?: ReactNode;\n}\n\nexport interface CheckboxGroupProps extends Omit<RACCheckboxGroupProps, 'children'>, GroupBits {\n /** default (a list) or cards (bordered tiles, for plans or features). */\n appearance?: 'default' | 'cards';\n /** With items: a parent checkbox that checks or clears them all, and shows a dash when only some are checked. */\n selectAllLabel?: ReactNode;\n}\n\n/** A labeled set of checkboxes; value is the list of checked values. Pass items and selectAllLabel for a \"Select all\" parent. */\nexport function CheckboxGroup({ label, description, errorMessage, orientation = 'vertical', appearance = 'default', items, size, variant, selectAllLabel, children, className, value, defaultValue, onChange, ...props }: CheckboxGroupProps) {\n const [val, setVal] = useControlled<string[]>(value, defaultValue ?? [], onChange);\n const enabled = (items || []).filter(i => !i.isDisabled).map(i => i.value);\n const all = enabled.length > 0 && enabled.every(v => val.includes(v));\n const some = !all && enabled.some(v => val.includes(v));\n return (\n <RACCheckboxGroup {...props} value={val} onChange={setVal} className={withBase('alea-field alea-choice-group', className as any)} data-orientation={orientation} data-appearance={appearance} data-size={size} data-variant={variant}>\n {label && <Label>{label}</Label>}\n {items && selectAllLabel && (\n // outside the group's value: it only sets the others\n <CheckboxGroupStateContext.Provider value={null}><RACCheckbox slot={null} className=\"alea-check alea-check-all\" isSelected={all} isIndeterminate={some} isDisabled={props.isDisabled} onChange={on => setVal(on ? [...new Set([...val, ...enabled])] : val.filter(v => !enabled.includes(v)))}>\n {({ isIndeterminate }) => <><span className=\"alea-check-box\" aria-hidden=\"true\"><svg viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\">{isIndeterminate ? <path d=\"M4 8h8\" pathLength={1} /> : <path d=\"M3.5 8.5l3 3 6-7\" pathLength={1} />}</svg></span><span className=\"alea-check-text\">{selectAllLabel}</span></>}\n </RACCheckbox></CheckboxGroupStateContext.Provider>\n )}\n <div className=\"alea-choice-items\" data-nested={items && selectAllLabel ? true : undefined}>{items ? items.map(i => <Checkbox key={i.value} value={i.value} description={i.description} isDisabled={i.isDisabled}>{i.label}</Checkbox>) : children}</div>\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n </RACCheckboxGroup>\n );\n}\n\nexport interface RadioProps extends Omit<RACRadioProps, 'children'> {\n children?: ReactNode;\n /** Help text under the option label. */\n description?: ReactNode;\n /** sm, md (default) or lg. Usually set on the RadioGroup. */\n size?: ChoiceSize;\n /** filled (default) or outline (an accent ring and dot, no fill). */\n variant?: 'filled' | 'outline';\n /** Label on the right (default) or on the left. */\n labelPosition?: 'start' | 'end';\n}\n\n/** One option of a RadioGroup. */\nexport function Radio({ children, description, size, variant, labelPosition, className, ...props }: RadioProps) {\n return (\n <RACRadio {...props} className={withBase('alea-check alea-radio', className as any)} data-size={size} data-variant={variant !== 'filled' ? variant : undefined} data-label-position={labelPosition !== 'end' ? labelPosition : undefined}>\n <span className=\"alea-check-box\" aria-hidden=\"true\"><span className=\"alea-radio-dot\" /></span>\n {(children || description) && <span className=\"alea-check-text\">{children}{description && <span className=\"alea-check-desc\">{description}</span>}</span>}\n </RACRadio>\n );\n}\n\nexport interface RadioGroupProps extends Omit<RACRadioGroupProps, 'children' | 'orientation'>, GroupBits {\n /** default (dots), cards (bordered tiles, good for plans or modes) or buttons (a joined row of buttons). */\n appearance?: 'default' | 'cards' | 'buttons';\n}\n\n/** One choice from a short list; arrow keys move between options. */\nexport function RadioGroup({ label, description, errorMessage, orientation = 'vertical', appearance = 'default', items, size, variant, children, className, ...props }: RadioGroupProps) {\n return (\n <RACRadioGroup {...props} orientation={appearance === 'buttons' ? 'horizontal' : orientation} className={withBase('alea-field alea-choice-group', className as any)} data-appearance={appearance} data-size={size} data-variant={variant}>\n {label && <Label>{label}</Label>}\n <div className=\"alea-choice-items\">{items ? items.map(i => <Radio key={i.value} value={i.value} description={appearance === 'buttons' ? undefined : i.description} isDisabled={i.isDisabled}>{i.label}</Radio>) : children}</div>\n {description && <Description>{description}</Description>}\n <FieldError>{errorMessage}</FieldError>\n </RACRadioGroup>\n );\n}\n\nexport interface SwitchProps extends Omit<RACSwitchProps, 'children'> {\n children?: ReactNode;\n /** Help text under the label. */\n description?: ReactNode;\n /** sm (36 × 20), md (44 × 24, default) or lg (52 × 28). */\n size?: ChoiceSize;\n /** Label on the left (settings rows) or the right (default). */\n labelPosition?: 'start' | 'end';\n /** Short text inside the track when on, like ON or I. The track grows to fit. */\n onLabel?: ReactNode;\n /** Short text inside the track when off. */\n offLabel?: ReactNode;\n /** An icon in the thumb: true for a check and a cross, or your own icon. */\n thumbIcon?: boolean | ReactNode;\n /** Shows a spinner in the thumb while the change is saved; presses are ignored. */\n isLoading?: boolean;\n}\n\n/** An on/off setting that applies right away: three sizes, labels in the track, icons in the thumb, and a loading state. */\nexport function Switch({ children, description, size = 'md', labelPosition = 'end', onLabel, offLabel, thumbIcon, isLoading, className, ...props }: SwitchProps) {\n const busy = useBusy<HTMLLabelElement>(isLoading, root => root.querySelector('input'));\n return (\n <RACSwitch {...props} ref={busy} isReadOnly={props.isReadOnly || isLoading} className={withBase('alea-check alea-switch', className as any)} data-size={size} data-label-position={labelPosition} data-labels={onLabel || offLabel ? true : undefined} data-loading={isLoading || undefined}>\n {({ isSelected }) => (\n <>\n <span className=\"alea-switch-track\" aria-hidden=\"true\">\n {(onLabel || offLabel) && <span className=\"alea-switch-label\">{isSelected ? onLabel : offLabel}</span>}\n <span className=\"alea-switch-thumb\">{isLoading ? <Spinner size=\"sm\" aria-label=\"\" /> : thumbIcon === true ? (isSelected ? <Check strokeWidth={3} /> : <X strokeWidth={3} />) : thumbIcon || null}</span>\n </span>\n {(children || description) && <span className=\"alea-check-text\">{children}{description && <span className=\"alea-check-desc\">{description}</span>}</span>}\n </>\n )}\n </RACSwitch>\n );\n}\n"},{"path":"components/choice/choice.css","content":".alea-check {\n --alea-check-size: 20px; --alea-check-radius: var(--alea-radius-sm); --alea-check-icon: 16px;\n display: inline-flex;\n align-items: flex-start;\n gap: var(--alea-space-3);\n color: var(--alea-text);\n font-size: var(--alea-font-size-md);\n line-height: 1.4;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n}\n.alea-check[data-disabled] { opacity: 0.45; cursor: not-allowed; }\n.alea-check-text { display: flex; flex-direction: column; gap: var(--alea-space-0-5); padding-top: var(--alea-space-0-25); }\n.alea-check-desc { color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); }\n.alea-check-box {\n display: grid; place-items: center; flex: none;\n width: var(--alea-check-size); height: var(--alea-check-size);\n border-radius: var(--alea-check-radius);\n background: var(--alea-field-bg);\n box-shadow: inset 0 0 0 1.5px var(--alea-border-control);\n color: var(--alea-accent-on);\n transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), box-shadow var(--alea-motion-duration-fast) var(--alea-motion-ease-standard);\n}\n.alea-check-box svg { width: var(--alea-check-icon); height: var(--alea-check-icon); opacity: 0; transform: scale(0.6); transition: opacity var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), transform var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-check[data-hovered] .alea-check-box { box-shadow: inset 0 0 0 1.5px var(--alea-text-muted); }\n.alea-check[data-selected] .alea-check-box, .alea-check[data-indeterminate] .alea-check-box { background: var(--alea-accent); box-shadow: none; }\n.alea-check[data-selected] .alea-check-box svg, .alea-check[data-indeterminate] .alea-check-box svg { opacity: 1; transform: none; }\n.alea-check[data-focus-visible] .alea-check-box { outline: 2px solid var(--alea-focus); outline-offset: var(--alea-space-0-5); }\n.alea-check[data-invalid] .alea-check-box { box-shadow: inset 0 0 0 1.5px var(--alea-status-danger); }\n\n.alea-radio .alea-check-box { border-radius: 50%; }\n.alea-radio-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--alea-accent-on); transform: scale(0); transition: transform var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-radio[data-selected] .alea-radio-dot { transform: scale(1); }\n\n.alea-choice-items { display: flex; flex-direction: column; gap: var(--alea-space-3); }\n.alea-choice-group[data-orientation='horizontal'] .alea-choice-items { flex-direction: row; flex-wrap: wrap; gap: var(--alea-space-3) var(--alea-space-6); }\n.alea-choice-group[data-appearance='cards'] .alea-choice-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: var(--alea-space-3); }\n.alea-choice-group[data-appearance='cards'] :is(.alea-radio, .alea-check) {\n padding: var(--alea-space-4);\n border-radius: var(--alea-radius-md);\n background: var(--alea-surface);\n box-shadow: inset 0 0 0 1px var(--alea-border);\n transition: box-shadow var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard);\n}\n.alea-choice-group[data-appearance='cards'] :is(.alea-radio, .alea-check)[data-hovered] { box-shadow: inset 0 0 0 1px var(--alea-border-strong); }\n.alea-choice-group[data-appearance='cards'] :is(.alea-radio, .alea-check)[data-selected] { background: var(--alea-accent-subtle); box-shadow: inset 0 0 0 1.5px var(--alea-accent); }\n\n.alea-switch[data-label-position='start'] { flex-direction: row-reverse; justify-content: space-between; }\n.alea-switch { --sw-w: 44px; --sw-h: 24px; --sw-t: 16px; }\n.alea-switch[data-size='sm'] { --sw-w: 36px; --sw-h: 20px; --sw-t: 12px; }\n.alea-switch[data-size='lg'] { --sw-w: 52px; --sw-h: 28px; --sw-t: 20px; font-size: var(--alea-font-size-base); }\n.alea-switch-track {\n position: relative; flex: none; display: inline-flex; align-items: center;\n width: var(--sw-w); min-width: var(--sw-w); height: var(--sw-h); /* thumb + 4 + 4; travel = width - height */\n border-radius: var(--alea-radius-full);\n background: var(--alea-surface-raised);\n box-shadow: inset 0 0 0 1px var(--alea-border-control);\n transition: background-color var(--alea-motion-duration-base) var(--alea-motion-ease-standard);\n}\n.alea-switch-thumb {\n position: absolute; top: calc((var(--sw-h) - var(--sw-t)) / 2); left: calc((var(--sw-h) - var(--sw-t)) / 2);\n display: grid; place-items: center;\n width: var(--sw-t); height: var(--sw-t); border-radius: var(--alea-radius-full);\n background: var(--alea-text); color: var(--alea-surface-deep);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);\n transition: transform var(--alea-motion-duration-base) var(--alea-motion-spring), width var(--alea-motion-duration-fast) var(--alea-motion-ease-out), background-color var(--alea-motion-duration-base) var(--alea-motion-ease-standard);\n}\n.alea-switch-thumb svg { width: calc(var(--sw-t) - 6px); height: calc(var(--sw-t) - 6px); }\n.alea-switch-thumb .alea-spinner { width: calc(var(--sw-t) - 4px); height: calc(var(--sw-t) - 4px); }\n.alea-switch[data-selected] .alea-switch-track { background: var(--alea-accent-solid); box-shadow: none; }\n.alea-switch[data-selected] .alea-switch-thumb { transform: translateX(calc(var(--sw-w) - var(--sw-h))); background: var(--alea-control-thumb); color: var(--alea-accent-on); }\n/* the thumb stretches while pressed */\n.alea-switch[data-pressed] .alea-switch-thumb { width: calc(var(--sw-t) + 4px); }\n.alea-switch[data-selected][data-pressed] .alea-switch-thumb { transform: translateX(calc(var(--sw-w) - var(--sw-h) - 4px)); }\n.alea-switch[data-focus-visible] .alea-switch-track { outline: 2px solid var(--alea-focus); outline-offset: var(--alea-space-0-5); }\n.alea-switch[data-loading] { cursor: progress; }\n/* labels inside the track: it grows to fit, and the thumb slides to the far end */\n.alea-switch[data-labels] .alea-switch-track { width: auto; padding: 0 var(--alea-space-2) 0 calc(var(--sw-h) + var(--alea-space-0-5)); }\n.alea-switch[data-labels][data-selected] .alea-switch-track { padding: 0 calc(var(--sw-h) + var(--alea-space-0-5)) 0 var(--alea-space-2); }\n.alea-switch[data-labels][data-selected] .alea-switch-thumb { transform: none; left: calc(100% - var(--sw-t) - (var(--sw-h) - var(--sw-t)) / 2); }\n.alea-switch-label { font: var(--alea-font-weight-semibold) 10px / 1 var(--alea-font-family-body); letter-spacing: 0.04em; text-transform: uppercase; color: var(--alea-text-muted); white-space: nowrap; }\n.alea-switch[data-selected] .alea-switch-label { color: var(--alea-accent-on); }\n.alea-switch[data-size='lg'] .alea-switch-label { font-size: 11px; }\n\n/* sizes, on a control or a whole group */\n:is(.alea-check[data-size='sm'], .alea-choice-group[data-size='sm'] .alea-check) { --alea-check-size: 16px; --alea-check-radius: var(--alea-radius-xs); --alea-check-icon: 12px; font-size: var(--alea-font-size-sm); gap: var(--alea-space-2); }\n:is(.alea-check[data-size='lg'], .alea-choice-group[data-size='lg'] .alea-check) { --alea-check-size: 24px; --alea-check-radius: var(--alea-radius-field); --alea-check-icon: 20px; font-size: var(--alea-font-size-base); }\n.alea-radio .alea-radio-dot { width: calc(var(--alea-check-size) * 0.4); height: calc(var(--alea-check-size) * 0.4); }\n.alea-check[data-label-position='start']:not(.alea-switch) { flex-direction: row-reverse; justify-content: flex-end; }\n/* outline look: an accent ring and check, no fill */\n:is(.alea-check[data-variant='outline'], .alea-choice-group[data-variant='outline'] .alea-check):is([data-selected], [data-indeterminate]) .alea-check-box { background: transparent; box-shadow: inset 0 0 0 1.5px var(--alea-accent); color: var(--alea-accent-strong); }\n:is(.alea-radio[data-variant='outline'], .alea-choice-group[data-variant='outline'] .alea-radio)[data-selected] .alea-radio-dot { background: var(--alea-accent); }\n/* select all: the options sit under it */\n.alea-check-all { margin-bottom: calc(-1 * var(--alea-space-1)); }\n.alea-choice-items[data-nested] { padding-left: calc(var(--alea-check-size, var(--alea-space-5)) + var(--alea-space-3)); }\n\n/* radio buttons */\n.alea-choice-group[data-appearance='buttons'] .alea-choice-items { display: inline-flex; flex-direction: row; gap: 0; align-self: flex-start; max-width: 100%; overflow-x: auto; border-radius: var(--alea-radius-sm); box-shadow: inset 0 0 0 1px var(--alea-border-strong); }\n.alea-choice-group[data-appearance='buttons'] .alea-radio { align-items: center; height: 40px; padding: 0 var(--alea-space-4); gap: 0; font-weight: var(--alea-font-weight-medium); color: var(--alea-text-muted); white-space: nowrap; transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), box-shadow var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-choice-group[data-appearance='buttons'] .alea-radio + .alea-radio { box-shadow: inset 1px 0 0 var(--alea-border-strong); }\n.alea-choice-group[data-appearance='buttons'] .alea-radio:first-child { border-radius: var(--alea-radius-sm) 0 0 var(--alea-radius-sm); }\n.alea-choice-group[data-appearance='buttons'] .alea-radio:last-child { border-radius: 0 var(--alea-radius-sm) var(--alea-radius-sm) 0; }\n.alea-choice-group[data-appearance='buttons'] .alea-radio .alea-check-box { display: none; }\n.alea-choice-group[data-appearance='buttons'] .alea-radio .alea-check-text { padding: 0; }\n.alea-choice-group[data-appearance='buttons'] .alea-radio[data-hovered] { background: var(--alea-surface-hover); color: var(--alea-text); }\n.alea-choice-group[data-appearance='buttons'] .alea-radio[data-selected] { background: var(--alea-accent-subtle); color: var(--alea-text); box-shadow: inset 0 0 0 1.5px var(--alea-accent); position: relative; z-index: 1; }\n.alea-choice-group[data-appearance='buttons'] .alea-radio[data-focus-visible] { outline: 2px solid var(--alea-focus); outline-offset: calc(var(--alea-space-0-5) * -1); z-index: 2; }\n.alea-choice-group[data-appearance='buttons'][data-size='sm'] .alea-radio { height: 32px; padding: 0 var(--alea-space-3); }\n.alea-choice-group[data-appearance='buttons'][data-size='lg'] .alea-radio { height: 48px; padding: 0 var(--alea-space-5); }\n"}],"deps":["feedback","field"],"npm":["react-aria-components","lucide-react"],"exports":["Checkbox","CheckboxGroup","Radio","RadioGroup","Switch"],"descriptions":{"Checkbox":"A checkbox with checked, indeterminate, invalid, read only and disabled states, three sizes and two looks.","CheckboxGroup":"A labeled set of checkboxes; value is the list of checked values. Pass items and selectAllLabel for a \"Select all\" parent.","Radio":"One option of a RadioGroup.","RadioGroup":"One choice from a short list; arrow keys move between options.","Switch":"An on/off setting that applies right away: three sizes, labels in the track, icons in the thumb, and a loading state."}},"color":{"files":[{"path":"components/color/Color.tsx","content":"import type { ReactNode } from 'react';\nimport {\n ColorPicker as RACColorPicker, ColorArea as RACColorArea, ColorThumb, ColorSlider as RACColorSlider, SliderTrack, SliderOutput, ColorField as RACColorField, Input, Label, ColorSwatch as RACColorSwatch,\n ColorSwatchPicker as RACColorSwatchPicker, ColorSwatchPickerItem, ColorWheel as RACColorWheel, ColorWheelTrack, FieldError, Text, parseColor,\n type ColorPickerProps as RACColorPickerProps, type ColorAreaProps as RACColorAreaProps, type ColorSliderProps as RACColorSliderProps, type ColorWheelProps as RACColorWheelProps,\n type ColorFieldProps as RACColorFieldProps, type ColorSwatchPickerProps as RACColorSwatchPickerProps, type Color, type ValidationResult,\n} from 'react-aria-components';\nimport { cx } from '../../utils/cx';\nimport { useControlled } from '../../utils/controlled';\nimport { Badge } from '../display/Display';\nimport { useStrings } from '../../i18n/strings';\n\nexport interface ColorPickerProps extends Omit<RACColorPickerProps, 'children'> {\n /** The visible label above the picker. */\n label?: ReactNode;\n /** Preset colors to pick from (hex). */\n swatches?: string[];\n /** Show the hex field. Default true. */\n showField?: boolean;\n /** Check this color against a background and show the WCAG ratio. */\n contrastWith?: string;\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** Pick a color by area, hue, hex or presets, with a live contrast check (plus WCAG). */\nexport function ColorPicker({ label, swatches, showField = true, contrastWith, className, ...props }: ColorPickerProps) {\n const t = useStrings();\n return (\n <RACColorPicker {...props}>\n {({ color }) => (\n <div className={cx('alea-color-picker', className)}>\n {label && <span className=\"alea-label\">{label}</span>}\n <RACColorArea colorSpace=\"hsb\" xChannel=\"saturation\" yChannel=\"brightness\" className=\"alea-color-area\">\n <ColorThumb className=\"alea-color-thumb\" />\n </RACColorArea>\n <RACColorSlider colorSpace=\"hsb\" channel=\"hue\" className=\"alea-color-slider\">\n <Label className=\"alea-visually-hidden\">{t.hue}</Label>\n <SliderTrack className=\"alea-color-track\"><ColorThumb className=\"alea-color-thumb\" /></SliderTrack>\n </RACColorSlider>\n <div className=\"alea-color-row\">\n <RACColorSwatch className=\"alea-color-swatch\" />\n {showField && <RACColorField className=\"alea-color-field\" aria-label={t.hex}><Input className=\"alea-input\" /></RACColorField>}\n {contrastWith && <ContrastBadge foreground={color.toString('hex')} background={contrastWith} />}\n </div>\n {swatches?.length ? (\n <RACColorSwatchPicker className=\"alea-swatch-picker\">\n {swatches.map(s => <ColorSwatchPickerItem key={s} color={s} className=\"alea-swatch-item\"><RACColorSwatch className=\"alea-color-swatch\" /></ColorSwatchPickerItem>)}\n </RACColorSwatchPicker>\n ) : null}\n </div>\n )}\n </RACColorPicker>\n );\n}\n\nfunction luminance(c: Color) {\n const rgb = c.toFormat('rgb');\n const ch = (v: number) => { const s = v / 255; return s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4); };\n return 0.2126 * ch(rgb.getChannelValue('red')) + 0.7152 * ch(rgb.getChannelValue('green')) + 0.0722 * ch(rgb.getChannelValue('blue'));\n}\n/** The WCAG 2 contrast ratio between two colors (1 to 21). */\nexport function contrastRatio(a: string, b: string): number {\n const la = luminance(parseColor(a)), lb = luminance(parseColor(b));\n return (Math.max(la, lb) + 0.05) / (Math.min(la, lb) + 0.05);\n}\n\nexport interface ContrastBadgeProps {\n /** The text color (any CSS color). */\n foreground: string;\n /** The background color (any CSS color). */\n background: string;\n /** Large text (24 px, or 18.66 px bold) needs 3:1 instead of 4.5:1. */\n large?: boolean;\n /** Show the colors as a sample. Default true. */\n showSample?: boolean;\n}\n\n/** The contrast of a color pair with its WCAG verdict: AAA, AA, AA large or fail. */\nexport function ContrastBadge({ foreground, background, large, showSample = true }: ContrastBadgeProps) {\n const t = useStrings();\n const r = contrastRatio(foreground, background);\n const verdict = r >= (large ? 4.5 : 7) ? 'AAA' : r >= (large ? 3 : 4.5) ? 'AA' : !large && r >= 3 ? 'AA large' : 'Fail';\n const tone = verdict === 'Fail' ? 'danger' : verdict === 'AA large' ? 'warning' : 'success';\n const ratio = (Math.floor(r * 100) / 100).toFixed(2);\n return (\n <span className=\"alea-contrast\" role=\"img\" aria-label={t.contrastSummary(String(ratio), verdict === 'Fail' ? t.wcagFail : t.wcagPass(verdict))}>\n {/* the sample is drawn by CSS: it shows the pair being judged, which may fail on purpose */}\n {showSample && <span className=\"alea-contrast-sample\" aria-hidden=\"true\" data-sample=\"Aa\" style={{ color: foreground, background }} />}\n <span className=\"alea-contrast-ratio\" aria-hidden=\"true\">{ratio}:1</span>\n <Badge size=\"sm\" tone={tone} aria-hidden=\"true\">{verdict === 'Fail' ? t.contrastFail : verdict}</Badge>\n </span>\n );\n}\n\n// ---------------------------------------------------------------- the parts on their own\n\nexport interface ColorAreaProps extends Omit<RACColorAreaProps, 'children'> {\n /** Width and height in px. Default 240 × 180; set the width with style for a fluid area. */\n size?: number;\n}\n\n/** A two-dimensional color area: saturation and brightness by default, or any two channels. Arrows move the thumb, Shift moves faster. */\nexport function ColorArea({ size, className, style, colorSpace = 'hsb', xChannel = 'saturation', yChannel = 'brightness', ...props }: ColorAreaProps) {\n return (\n <RACColorArea {...props} colorSpace={colorSpace} xChannel={xChannel} yChannel={yChannel} className={cx('alea-color-area', className as string)} style={{ ...(size ? { width: size, height: size * 0.75 } : {}), ...(style as object) }}>\n <ColorThumb className=\"alea-color-thumb\" />\n </RACColorArea>\n );\n}\n\nexport interface ColorSliderProps extends Omit<RACColorSliderProps, 'children'> {\n /** The visible label; the channel name when left out. */\n label?: ReactNode;\n /** Shows the value next to the label. */\n showValue?: boolean;\n}\n\n/** A slider for one color channel: hue, saturation, lightness, alpha, red, green or blue. Horizontal or vertical. */\nexport function ColorSlider({ label, showValue, className, orientation, ...props }: ColorSliderProps) {\n return (\n <RACColorSlider {...props} orientation={orientation} className={cx('alea-color-slider', className as string)} data-orientation={orientation}>\n {(label || showValue) && <div className=\"alea-color-slider-head\">{label ? <Label className=\"alea-label\">{label}</Label> : <span />}{showValue && <SliderOutput className=\"alea-color-slider-value\" />}</div>}\n <SliderTrack className=\"alea-color-track\"><ColorThumb className=\"alea-color-thumb\" /></SliderTrack>\n </RACColorSlider>\n );\n}\n\nexport interface ColorWheelProps extends Omit<RACColorWheelProps, 'children' | 'outerRadius' | 'innerRadius'> {\n /** Diameter in px. Default 200. */\n size?: number;\n /** Ring thickness in px. Default 24. */\n thickness?: number;\n}\n\n/** A hue wheel: drag around the ring, or use the arrow keys. */\nexport function ColorWheel({ size = 200, thickness = 24, className, ...props }: ColorWheelProps) {\n return (\n <RACColorWheel {...props} outerRadius={size / 2} innerRadius={size / 2 - thickness} className={cx('alea-color-wheel', className as string)}>\n <ColorWheelTrack className=\"alea-color-wheel-track\" />\n <ColorThumb className=\"alea-color-thumb\" />\n </RACColorWheel>\n );\n}\n\nexport interface ColorFieldProps extends Omit<RACColorFieldProps, 'children'> {\n /** The visible label. */\n label?: ReactNode;\n /** Help text under the field. */\n description?: ReactNode;\n /** Error text when the color cannot be read. */\n errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);\n /** Shows a swatch of the color before the value. Default true. */\n showSwatch?: boolean;\n /** Placeholder, like #C084FC. */\n placeholder?: string;\n}\n\n/** Type a color: hex by default, or one channel (hue, red, alpha...) as a number. */\nexport function ColorField({ label, description, errorMessage, showSwatch = true, placeholder, className, value, defaultValue, onChange, ...props }: ColorFieldProps) {\n const [val, setVal] = useControlled<any>(value, defaultValue ?? null, onChange as any);\n const color = typeof val === 'string' ? (() => { try { return parseColor(val); } catch { return null; } })() : (val as Color | null);\n return (\n <RACColorField {...props} value={val} onChange={setVal} className={cx('alea-field alea-color-input', className as string)}>\n {() => (\n <>\n {label && <Label className=\"alea-label\">{label}</Label>}\n <div className=\"alea-input-wrap\">\n {showSwatch && !props.channel && <span className=\"alea-input-affix\" data-side=\"start\" aria-hidden=\"true\"><span className=\"alea-color-chip\" style={{ background: color ? color.toString('css') : 'transparent' }} /></span>}\n <Input className=\"alea-input\" placeholder={placeholder} />\n </div>\n {description && <Text slot=\"description\" className=\"alea-description\">{description}</Text>}\n <FieldError className=\"alea-field-error\">{errorMessage}</FieldError>\n </>\n )}\n </RACColorField>\n );\n}\n\nexport interface ColorSwatchPickerProps extends Omit<RACColorSwatchPickerProps, 'children'> {\n /** The colors to choose from (any CSS color). */\n colors: string[];\n /** sm 24, md 32 (default), lg 40 px. */\n size?: 'sm' | 'md' | 'lg';\n /** rounded (default), circle or square. */\n shape?: 'rounded' | 'circle' | 'square';\n}\n\n/** Pick one of a set of colors; arrow keys move between them. */\nexport function ColorSwatchPicker({ colors, size = 'md', shape = 'rounded', className, ...props }: ColorSwatchPickerProps) {\n return (\n <RACColorSwatchPicker {...props} className={cx('alea-swatch-picker', className as string)} data-size={size} data-shape={shape}>\n {colors.map(c => <ColorSwatchPickerItem key={c} color={c} className=\"alea-swatch-item\"><RACColorSwatch className=\"alea-color-swatch\" /></ColorSwatchPickerItem>)}\n </RACColorSwatchPicker>\n );\n}\nexport { parseColor } from 'react-aria-components';\n"},{"path":"components/color/color.css","content":".alea-color-picker { display: flex; flex-direction: column; gap: var(--alea-space-3); width: 240px; }\n.alea-color-area { width: 100%; aspect-ratio: 1.4; border-radius: var(--alea-radius-md); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-color-thumb { width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 2px var(--alea-control-thumb), 0 0 0 3px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(0, 0, 0, 0.2); }\n.alea-color-thumb[data-focus-visible] { width: 24px; height: 24px; box-shadow: 0 0 0 2px var(--alea-control-thumb), 0 0 0 4px var(--alea-focus); }\n.alea-color-thumb[data-dragging] { width: 24px; height: 24px; }\n.alea-color-slider { width: 100%; }\n.alea-color-track { height: 16px; border-radius: var(--alea-radius-full); }\n.alea-color-track .alea-color-thumb { top: 50%; }\n.alea-color-row { display: flex; align-items: center; gap: var(--alea-space-2); }\n.alea-color-swatch { width: 32px; height: 32px; flex: none; border-radius: var(--alea-radius-md); box-shadow: inset 0 0 0 1px var(--alea-border-strong); }\n.alea-color-field { flex: 1; min-width: 0; }\n.alea-color-field .alea-input { height: 36px; padding: 0 var(--alea-space-3); border-radius: var(--alea-radius-sm); background: var(--alea-field-bg); box-shadow: inset 0 0 0 1px var(--alea-border); font-family: var(--alea-font-family-mono); font-size: var(--alea-font-size-sm); text-transform: uppercase; }\n.alea-color-field .alea-input[data-focused] { box-shadow: inset 0 0 0 1px var(--alea-focus), 0 0 0 3px var(--alea-focus-halo); }\n.alea-swatch-picker { display: flex; flex-wrap: wrap; gap: var(--alea-space-2); }\n.alea-swatch-item { border-radius: var(--alea-radius-md); cursor: pointer; outline: none; }\n.alea-swatch-item .alea-color-swatch { width: 28px; height: 28px; border-radius: var(--alea-radius-field); }\n.alea-swatch-item[data-selected] .alea-color-swatch { box-shadow: 0 0 0 2px var(--alea-bg), 0 0 0 4px var(--alea-text); }\n.alea-swatch-item[data-focus-visible] .alea-color-swatch { box-shadow: 0 0 0 2px var(--alea-bg), 0 0 0 4px var(--alea-focus); }\n.alea-contrast { display: inline-flex; align-items: center; gap: var(--alea-space-2); font-variant-numeric: tabular-nums; }\n.alea-contrast-sample::before { content: attr(data-sample); }\n.alea-contrast-sample { display: inline-grid; place-items: center; width: 32px; height: 28px; border-radius: var(--alea-radius-field); font: var(--alea-font-weight-semibold) 14px/1 var(--alea-font-family-body); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-contrast-ratio { font: var(--alea-font-weight-semibold) var(--alea-font-size-sm) / 1 var(--alea-font-family-body); }\n\n/* standalone parts */\n.alea-color-slider[data-orientation='vertical'] { width: auto; height: 200px; }\n.alea-color-slider[data-orientation='vertical'] .alea-color-track { width: 16px; height: 100%; }\n.alea-color-slider[data-orientation='vertical'] .alea-color-track .alea-color-thumb { left: 50%; top: auto; }\n.alea-color-slider-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--alea-space-2); }\n.alea-color-slider-value { color: var(--alea-text-muted); font: var(--alea-font-size-sm) / 1 var(--alea-font-family-mono); }\n.alea-color-wheel { position: relative; }\n.alea-color-wheel-track { border-radius: 50%; }\n.alea-color-chip { display: block; width: 20px; height: 20px; border-radius: var(--alea-radius-sm); box-shadow: inset 0 0 0 1px var(--alea-border-strong); background-image: none; }\n.alea-color-input .alea-input { font-family: var(--alea-font-family-mono); text-transform: uppercase; }\n.alea-swatch-picker[data-size='sm'] .alea-color-swatch { width: 24px; height: 24px; border-radius: var(--alea-radius-sm); }\n.alea-swatch-picker[data-size='md'] .alea-color-swatch { width: 32px; height: 32px; }\n.alea-swatch-picker[data-size='lg'] .alea-color-swatch { width: 40px; height: 40px; border-radius: var(--alea-radius-md); }\n.alea-swatch-picker[data-shape='circle'] .alea-color-swatch { border-radius: 50%; }\n.alea-swatch-picker[data-shape='square'] .alea-color-swatch { border-radius: var(--alea-radius-xs); }\n"}],"deps":["display"],"npm":["react-aria-components"],"exports":["ColorPicker","contrastRatio","ContrastBadge","ColorArea","ColorSlider","ColorWheel","ColorField","ColorSwatchPicker"],"descriptions":{"ColorPicker":"Pick a color by area, hue, hex or presets, with a live contrast check (plus WCAG).","contrastRatio":"The WCAG 2 contrast ratio between two colors (1 to 21).","ContrastBadge":"The contrast of a color pair with its WCAG verdict: AAA, AA, AA large or fail.","ColorArea":"A two-dimensional color area: saturation and brightness by default, or any two channels. Arrows move the thumb, Shift moves faster.","ColorSlider":"A slider for one color channel: hue, saturation, lightness, alpha, red, green or blue. Horizontal or vertical.","ColorWheel":"A hue wheel: drag around the ring, or use the arrow keys.","ColorField":"Type a color: hex by default, or one channel (hue, red, alpha...) as a number.","ColorSwatchPicker":"Pick one of a set of colors; arrow keys move between them."}},"combobox":{"files":[{"path":"components/combobox/Autocomplete.tsx","content":"import { useEffect, useId, useMemo, useRef, useState, type ReactNode } from 'react';\nimport { ComboBox as RACComboBox, Input, ListBox, ListBoxItem, ListBoxSection, Header, Collection, Button as RACButton, DialogTrigger, Dialog, useFilter, type Key, type Selection } from 'react-aria-components';\nimport type { MotionProp } from '@alea-design/motion';\nimport { Search, X, Clock, ChevronDown, Check } from 'lucide-react';\nimport { cx } from '../../utils/cx';\nimport { Label, Description } from '../field/Field';\nimport { Popover } from '../overlay/Overlay';\nimport { Spinner } from '../feedback/Spinner';\nimport { loadingAttrs } from '../field/FieldLoading';\nimport { Checkbox } from '../choice/Choice';\nimport { SearchField } from '../field/Field';\nimport { useStrings } from '../../i18n/strings';\nimport { MatchedText, OptionMatchContext, type MatchStyle } from './Highlight';\n\nexport interface AutocompleteItem { id: Key; label: string; description?: string; group?: string; icon?: ReactNode }\n\nexport { Highlight, getMatchRanges } from './Highlight';\n\nexport interface AutocompleteProps {\n /** The visible label. */\n label?: ReactNode;\n /** Help text shown under the field. */\n description?: ReactNode;\n /** Shown while there is no value. */\n placeholder?: string;\n /** Static items, filtered as people type. */\n items?: AutocompleteItem[];\n /** Or load matches as people type (debounced); return the items. */\n loadItems?: (query: string, signal: AbortSignal) => Promise<AutocompleteItem[]>;\n /** Wait this long after typing before loading, in ms. Default 250. */\n debounce?: number;\n /** Shown when the field is empty and focused: recent searches or suggestions. */\n recent?: AutocompleteItem[];\n /** Shows the loading spinner while you load the items yourself (with items). It also shows by itself while loadItems runs. */\n isLoading?: boolean;\n /** Marks the part of each suggestion that matches what was typed. Default true. */\n highlightMatch?: boolean;\n /** How the match looks: tint (default), bold or underline. */\n matchStyle?: MatchStyle;\n /** Called with the picked item. */\n onSelect?: (item: AutocompleteItem) => void;\n /** Called on Enter with free text (a search). */\n onSubmit?: (text: string) => void;\n /** Least characters before suggesting. Default 1. */\n minChars?: number;\n /** Extra class names for the root element. */\n className?: string;\n /** How the popup enters and leaves: a preset (fade, scale, pop, slide-down, blur...), false for none, or options. */\n motion?: MotionProp;\n}\n\n/** Search with suggestions: static or loaded as you type, grouped, matches highlighted, recent searches when empty. */\nexport function Autocomplete({ motion, label, description, placeholder, items, loadItems, debounce = 250, recent, isLoading, highlightMatch = true, matchStyle, onSelect, onSubmit, minChars = 1, className }: AutocompleteProps) {\n const t = useStrings(); placeholder ??= t.search;\n const [text, setText] = useState('');\n const [loaded, setLoaded] = useState<AutocompleteItem[]>([]);\n const [loadingOwn, setLoading] = useState(false);\n const loading = loadingOwn || !!isLoading;\n const { contains } = useFilter({ sensitivity: 'base' });\n const ctl = useRef<AbortController | null>(null);\n useEffect(() => {\n if (!loadItems) return;\n if (text.trim().length < minChars) { setLoaded([]); setLoading(false); return; }\n setLoading(true);\n const t = setTimeout(async () => {\n ctl.current?.abort();\n const c = new AbortController(); ctl.current = c;\n try { const res = await loadItems(text, c.signal); if (!c.signal.aborted) setLoaded(res); }\n catch { /* aborted or failed: keep the last results */ }\n finally { if (!c.signal.aborted) setLoading(false); }\n }, debounce);\n return () => clearTimeout(t);\n }, [text, loadItems, debounce, minChars]);\n const showRecent = !text && recent?.length;\n const list = showRecent ? recent! : loadItems ? loaded : text.trim().length < minChars ? [] : (items || []).filter(i => contains(i.label, text) || (i.description && contains(i.description, text)));\n const groups = useMemo(() => {\n const out: Array<{ id: string; items: AutocompleteItem[] }> = [];\n for (const it of list) { const g = showRecent ? t.recent : it.group || ''; let grp = out.find(x => x.id === g); if (!grp) out.push(grp = { id: g, items: [] }); grp.items.push(it); }\n return out;\n }, [list, showRecent]);\n const byId = useMemo(() => new Map(list.map(i => [i.id, i])), [list]);\n const matchValue = useMemo(() => ({ query: showRecent ? '' : text, style: matchStyle ?? 'tint', match: 'words' as const }), [text, matchStyle, showRecent]);\n return (\n <RACComboBox\n className={cx('alea-field alea-autocomplete', className)}\n {...loadingAttrs(loading)}\n items={groups}\n inputValue={text}\n onInputChange={setText}\n selectedKey={null}\n allowsCustomValue\n allowsEmptyCollection\n menuTrigger=\"focus\"\n onSelectionChange={k => { const it = k != null ? byId.get(k) : undefined; if (it) { setText(it.label); onSelect?.(it); } }}\n onKeyDown={e => { if (e.key === 'Enter' && !(e.target as HTMLElement).getAttribute('aria-activedescendant')) onSubmit?.(text); }}\n >\n {label && <Label>{label}</Label>}\n <div className=\"alea-input-wrap\">\n <span className=\"alea-input-affix\" data-side=\"start\" aria-hidden=\"true\"><Search size={16} /></span>\n <Input className=\"alea-input\" placeholder={placeholder} aria-busy={loading || undefined} />\n {loading ? <span className=\"alea-autocomplete-spin\"><Spinner size=\"sm\" aria-label={t.loadingSuggestions} /></span>\n : text ? <RACButton className=\"alea-input-clear alea-focus-ring\" aria-label={t.clear} onPress={() => setText('')}><X size={14} /></RACButton> : null}\n </div>\n {description && <Description>{description}</Description>}\n <Popover className=\"alea-popover alea-select-popover\" motion={motion}>\n <OptionMatchContext.Provider value={matchValue}>\n <ListBox className=\"alea-listbox\" renderEmptyState={() => <p className=\"alea-listbox-empty\">{loading ? t.searching : text ? t.nothingFor(text) : t.startTyping}</p>}>\n {(g: { id: string; items: AutocompleteItem[] }) => (\n <ListBoxSection id={g.id} className=\"alea-option-section\">\n {g.id && <Header className=\"alea-option-header\">{g.id}</Header>}\n <Collection items={g.items}>\n {(it: AutocompleteItem) => (\n <ListBoxItem id={it.id} textValue={it.label} className=\"alea-option\">\n {showRecent ? <Clock size={16} className=\"alea-option-icon\" aria-hidden=\"true\" /> : it.icon && <span className=\"alea-option-icon\" aria-hidden=\"true\">{it.icon}</span>}\n <span className=\"alea-option-text\"><span>{highlightMatch ? <MatchedText text={it.label} /> : it.label}</span>{it.description && <span className=\"alea-option-desc\">{highlightMatch ? <MatchedText text={it.description} /> : it.description}</span>}</span>\n </ListBoxItem>\n )}\n </Collection>\n </ListBoxSection>\n )}\n </ListBox>\n </OptionMatchContext.Provider>\n </Popover>\n </RACComboBox>\n );\n}\n\nexport interface MultiSelectProps {\n /** The visible label. */\n label?: ReactNode;\n /** Help text shown under the field. */\n description?: ReactNode;\n /** The options: id, label, optional description. */\n items: Array<{ id: Key; label: string; description?: string }>;\n /** The selected ids (controlled). */\n value?: Key[];\n /** The selected ids to start with. */\n defaultValue?: Key[];\n /** Called with the selected ids. */\n onChange?: (keys: Key[]) => void;\n /** Shown while there is no value. */\n placeholder?: string;\n /** Adds a search field to the list. Default true when there are more than 8 items. */\n searchable?: boolean;\n /** Adds \"Select all\" and \"Clear\". Default true. */\n showActions?: boolean;\n /** Disables every part of it. */\n isDisabled?: boolean;\n /** How the popup enters and leaves: a preset (fade, scale, pop, slide-down, blur...), false for none, or options. */\n motion?: MotionProp;\n}\n\n/** Pick several options from a list with checkboxes; the trigger summarizes the picks. */\nexport function MultiSelect({ motion, label, description, items, value, defaultValue = [], onChange, placeholder, searchable, showActions = true, isDisabled }: MultiSelectProps) {\n const t = useStrings(); placeholder ??= t.selectPlaceholder;\n const [own, setOwn] = useState<Key[]>(defaultValue);\n const keys = value ?? own;\n const [q, setQ] = useState('');\n const { contains } = useFilter({ sensitivity: 'base' });\n const set = (k: Key[]) => { if (value === undefined) setOwn(k); onChange?.(k); };\n const shown = items.filter(i => contains(i.label, q));\n const names = items.filter(i => keys.includes(i.id)).map(i => i.label);\n const summary = !names.length ? placeholder : names.length <= 2 ? names.join(', ') : `${names.slice(0, 2).join(', ')} +${names.length - 2}`;\n const doSearch = searchable ?? items.length > 8;\n const labelId = 'alea-ms' + useId().replace(/:/g, '');\n return (\n <div className=\"alea-field alea-multiselect\" data-disabled={isDisabled || undefined}>\n {label && <span className=\"alea-label\" id={labelId}>{label}</span>}\n <DialogTrigger>\n <RACButton className=\"alea-select-trigger alea-focus-ring\" aria-labelledby={label ? `${labelId} ${labelId}-v` : undefined} isDisabled={isDisabled}>\n <span id={`${labelId}-v`} className=\"alea-select-value\" data-placeholder={!names.length || undefined}>{summary}</span>\n <ChevronDown size={16} aria-hidden=\"true\" className=\"alea-select-chevron\" />\n </RACButton>\n <Popover className=\"alea-popover alea-select-popover\" placement=\"bottom start\" motion={motion}>\n <Dialog aria-label={typeof label === 'string' ? label : t.options} className=\"alea-multiselect-dialog\">\n {doSearch && <SearchField aria-label={t.filterOptions} size=\"sm\" value={q} onChange={setQ} autoFocus />}\n {showActions && <div className=\"alea-multiselect-actions\"><button type=\"button\" className=\"alea-link alea-focus-ring\" data-variant=\"standalone\" onClick={() => set(Array.from(new Set([...keys, ...shown.map(i => i.id)])))}>{q ? t.selectAllShown : t.selectAll}</button><button type=\"button\" className=\"alea-link alea-focus-ring\" data-variant=\"muted\" onClick={() => set([])}>{t.clear}</button></div>}\n <ListBox aria-label={typeof label === 'string' ? label : t.options} escapeKeyBehavior=\"none\" items={shown} selectionMode=\"multiple\" selectedKeys={keys} onSelectionChange={(s: Selection) => set(s === 'all' ? items.map(i => i.id) : [...s])} className=\"alea-listbox alea-multiselect-list\" autoFocus={!doSearch} renderEmptyState={() => <p className=\"alea-listbox-empty\">{t.noMatches}</p>}>\n {it => (\n <ListBoxItem id={it.id} textValue={it.label} className=\"alea-option\">\n {({ isSelected }) => <><span className=\"alea-check-box alea-ms-box\" data-on={isSelected || undefined} aria-hidden=\"true\"><Check size={12} strokeWidth={3} /></span><span className=\"alea-option-text\"><span>{it.label}</span>{it.description && <span className=\"alea-option-desc\">{it.description}</span>}</span></>}\n </ListBoxItem>\n )}\n </ListBox>\n </Dialog>\n </Popover>\n </DialogTrigger>\n {description && <span className=\"alea-description\">{description}</span>}\n </div>\n );\n}\n"},{"path":"components/combobox/ComboBox.tsx","content":"import { useContext, useMemo, useState, type CSSProperties, type ReactNode } from 'react';\nimport { ComboBox as RACComboBox, ComboBoxStateContext, Input, Button as RACButton, ListBox, Virtualizer, ListLayout, useFilter, type ComboBoxProps as RACComboBoxProps, type ValidationResult, type Key } from 'react-aria-components';\nimport type { MotionProp } from '@alea-design/motion';\nimport { ChevronDown, X } from 'lucide-react';\nimport { cx, withBase } from '../../utils/cx';\nimport { Label, Description, FieldError, type FieldSize, type FieldVariant } from '../field/Field';\nimport { FieldSpinner, loadingAttrs } from '../field/FieldLoading';\nimport { responsiveAttrs } from '../../utils/responsive';\nimport type { Responsive } from '../../utils/responsive';\nimport { Popover } from '../overlay/Overlay';\nimport { SelectItem, type SelectOption } from '../select/Select';\nimport { useStrings } from '../../i18n/strings';\nimport { OptionMatchContext, type MatchStyle } from './Highlight';\n\nexport interface ComboBoxProps<T extends object = SelectOption> extends Omit<RACComboBoxProps<T>, 'children'> {\n /** The visible label. */\n label?: ReactNode;\n /** Help text under the field. */\n description?: ReactNode;\n /** Error text, shown when invalid. */\n errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);\n /** A warning that does not block, shown under the field in amber. */\n warningMessage?: ReactNode;\n /** Shows \"(optional)\" after the label. */\n showOptional?: boolean;\n /** Shown while the field is empty. */\n placeholder?: string;\n /** Option rendering for custom items; plain {id, label} items render as options. */\n children?: ReactNode | ((item: T) => ReactNode);\n /** Shown when nothing matches. Default \"No matches\". */\n emptyText?: ReactNode;\n /** xs 28 px, sm 32 px, md 44 px (default), lg 48 px, xl 56 px. Can change per breakpoint. */\n size?: Responsive<FieldSize>;\n /** outline (default), filled, underline or borderless, like TextField. */\n variant?: FieldVariant;\n /** top (default) or side (from 640 px up). */\n labelPosition?: 'top' | 'side';\n /** An icon or text before the input. */\n prefix?: ReactNode;\n /** Shows a clear button while there is text or a selection. */\n isClearable?: boolean;\n /** Marks the part of each option that matches what was typed, with a mark element (screen readers can say it). */\n highlightMatch?: boolean;\n /** How the match looks: tint (default), bold or underline. */\n matchStyle?: MatchStyle;\n /** Shows a spinner at the end of the text, for results that are loading (async search). It takes no room, you can keep typing, and screen readers hear the field as busy. */\n isLoading?: boolean;\n /** Content under the list inside the popover, like \"Create “…”\". */\n footer?: ReactNode;\n /** Renders only the visible options: pass the row height (40). */\n virtualized?: number;\n /** How the popup enters and leaves: a preset (fade, scale, pop, slide-down, blur...), false for none, or options. */\n motion?: MotionProp;\n}\n\n/** Tells the options what was typed, so they can mark it. A value picked from the list is not a search, so nothing is marked then. */\nfunction ComboMatch({ style, children }: { style?: MatchStyle; children: ReactNode }) {\n const state = useContext(ComboBoxStateContext);\n const typed = state && !(state.selectedItem && state.inputValue === state.selectedItem.textValue) ? state.inputValue : '';\n const value = useMemo(() => ({ query: typed, style: style ?? 'tint', match: 'phrase' as const }), [typed, style]);\n return <OptionMatchContext.Provider value={value}>{children}</OptionMatchContext.Provider>;\n}\n\nfunction ComboClear() {\n const t = useStrings();\n const state = useContext(ComboBoxStateContext);\n if (!state || (!state.inputValue && state.selectedKey == null)) return null;\n return <RACButton slot={null} className=\"alea-input-clear alea-focus-ring\" aria-label={t.clear} onPress={() => { state.setSelectedKey(null); state.setInputValue(''); }}><X size={14} /></RACButton>;\n}\n\n/** Type to filter a list and pick one. Pass defaultItems to filter as people type, or items to filter yourself (async search). allowsCustomValue keeps free text. */\nexport function ComboBox<T extends object = SelectOption>({ motion, label, description, errorMessage, warningMessage, showOptional, placeholder, children, emptyText, size, variant = 'outline', labelPosition = 'top', prefix, isClearable, highlightMatch, matchStyle, isLoading, footer, virtualized, className, ...props }: ComboBoxProps<T>) {\n const t = useStrings(); emptyText ??= t.noMatches;\n const { contains } = useFilter({ sensitivity: 'base' });\n const list = (\n <ListBox className=\"alea-listbox\" renderEmptyState={() => <p className=\"alea-listbox-empty\">{isLoading ? t.loading : emptyText}</p>}>\n {children ?? ((item: any) => <SelectItem id={item.id} textValue={item.textValue ?? (typeof item.label === 'string' ? item.label : String(item.id))} description={item.description} icon={item.icon} isDisabled={item.isDisabled}>{item.label}</SelectItem>)}\n </ListBox>\n );\n return (\n <RACComboBox defaultFilter={contains} menuTrigger=\"input\" allowsEmptyCollection {...props} className={withBase('alea-field alea-combobox', className as any)}\n {...responsiveAttrs('size', size, 'md')} data-variant={variant !== 'outline' ? variant : undefined} data-label-position={labelPosition !== 'top' ? labelPosition : undefined} data-warning={warningMessage ? true : undefined} {...loadingAttrs(isLoading)}>\n {label && <Label>{label}{props.isRequired && <span className=\"alea-label-required\" aria-hidden=\"true\"> *</span>}{showOptional && !props.isRequired && <span className=\"alea-label-optional\"> ({t.optional})</span>}</Label>}\n <div className=\"alea-input-wrap\">\n {prefix && <span className=\"alea-input-affix\" data-side=\"start\" aria-hidden=\"true\">{prefix}</span>}\n <Input className=\"alea-input\" placeholder={placeholder} aria-busy={isLoading || undefined} />\n {isLoading && <FieldSpinner />}\n {isClearable && !props.isDisabled && !props.isReadOnly && <ComboClear />}\n <RACButton className=\"alea-input-clear alea-focus-ring\" aria-label={t.showSuggestions}><ChevronDown size={16} /></RACButton>\n </div>\n {(description || warningMessage) && <Description>{description}{warningMessage && <span className=\"alea-field-warning\">{warningMessage}</span>}</Description>}\n <FieldError>{errorMessage}</FieldError>\n <Popover className=\"alea-popover alea-select-popover\" motion={motion}>\n {highlightMatch ? <ComboMatch style={matchStyle}>{virtualized ? <Virtualizer layout={ListLayout} layoutOptions={{ rowHeight: virtualized }}>{list}</Virtualizer> : list}</ComboMatch> : virtualized ? <Virtualizer layout={ListLayout} layoutOptions={{ rowHeight: virtualized }}>{list}</Virtualizer> : list}\n {footer && <div className=\"alea-select-footer\">{footer}</div>}\n </Popover>\n </RACComboBox>\n );\n}\n\nexport interface TagFieldProps {\n /** The visible label. */\n label?: ReactNode;\n /** Help text shown under the field. */\n description?: ReactNode;\n /** The options to pick from. */\n items: SelectOption[];\n /** Picked ids (controlled). */\n value?: Key[];\n /** The tags to start with. */\n defaultValue?: Key[];\n /** Called with the tags. */\n onChange?: (value: Key[]) => void;\n /** Shown while there is no value. */\n placeholder?: string;\n /** Lets people add values that are not in the list (Enter). */\n allowsCustomValue?: boolean;\n /** Most picks allowed. */\n max?: number;\n /** Shows a spinner in the field while options load; see ComboBox. */\n isLoading?: boolean;\n /** Marks the part of each option that matches what was typed; see ComboBox. */\n highlightMatch?: boolean;\n /** Disables every part of it. */\n isDisabled?: boolean;\n /** Extra class names for the root element. */\n className?: string;\n /** Inline styles for the root element. */\n style?: CSSProperties;\n}\n\n/** Pick several options by typing; picks show as removable tags. */\nexport function TagField({ label, description, items, value, defaultValue = [], onChange, placeholder, allowsCustomValue, max, isLoading, highlightMatch, isDisabled, className, style }: TagFieldProps) {\n const t = useStrings(); placeholder ??= t.typeToAdd;\n const [own, setOwn] = useState<Key[]>(defaultValue);\n const picked = value ?? own;\n const [text, setText] = useState('');\n const { contains } = useFilter({ sensitivity: 'base' });\n const set = (v: Key[]) => { if (value === undefined) setOwn(v); onChange?.(v); };\n const byId = useMemo(() => new Map(items.map(i => [i.id, i])), [items]);\n const left = items.filter(i => !picked.includes(i.id));\n const full = max !== undefined && picked.length >= max;\n const add = (k: Key | null) => { if (k == null || picked.includes(k) || full) return; set([...picked, k]); setText(''); };\n return (\n <div className={cx('alea-field alea-tagfield', className)} style={style} data-disabled={isDisabled || undefined}>\n <ComboBox\n label={label}\n isLoading={isLoading}\n highlightMatch={highlightMatch}\n description={description ?? (max ? t.nOfTotal(picked.length, max) : undefined)}\n items={left.filter(i => contains(i.textValue ?? (typeof i.label === 'string' ? i.label : String(i.id)), text))}\n inputValue={text}\n onInputChange={setText}\n selectedKey={null}\n onSelectionChange={add}\n allowsCustomValue={allowsCustomValue}\n isDisabled={isDisabled || full}\n placeholder={full ? t.limitReached : placeholder}\n onKeyDown={e => {\n // Enter adds the typed text only when no suggestion is highlighted\n if (e.key === 'Enter' && allowsCustomValue && text.trim() && !(e.target as HTMLElement).getAttribute('aria-activedescendant') && !left.some(i => String(i.label).toLowerCase() === text.trim().toLowerCase())) { add(text.trim()); }\n if (e.key === 'Backspace' && !text && picked.length) set(picked.slice(0, -1));\n }}\n />\n {picked.length > 0 && (\n <ul className=\"alea-tagfield-tags\" aria-label={t.selected}>\n {picked.map(k => {\n const it = byId.get(k);\n const name = it ? (typeof it.label === 'string' ? it.label : String(k)) : String(k);\n return (\n <li key={String(k)} className=\"alea-tag\" data-allows-removing=\"true\">\n {it ? it.label : String(k)}\n {!isDisabled && <button type=\"button\" className=\"alea-tag-remove alea-focus-ring\" aria-label={t.removeItem(String(name))} onClick={() => set(picked.filter(x => x !== k))}><X size={12} /></button>}\n </li>\n );\n })}\n </ul>\n )}\n </div>\n );\n}\n"},{"path":"components/combobox/Highlight.tsx","content":"import { createContext, useContext, type ReactNode } from 'react';\n\n// How a match looks: tint (a soft accent background, default), bold, or underline.\nexport type MatchStyle = 'tint' | 'bold' | 'underline';\n// words: each word of the query is marked on its own (default); phrase: only the whole query, as typed (what a ComboBox filters by).\nexport type MatchMode = 'words' | 'phrase';\n\n// One letter to its plain lowercase form (é to e, É to e), keeping the text the same length so ranges still fit the original\nconst fold1 = (c: string) => {\n const base = c.normalize('NFD').replace(/\\p{M}/gu, '').toLowerCase();\n if (base.length === 1) return base;\n const low = c.toLowerCase();\n return low.length === 1 ? low : c;\n};\nconst fold = (s: string) => { let out = ''; for (let i = 0; i < s.length; i++) out += fold1(s[i]); return out; };\n\n/** Where a query matches a text, as [start, end) ranges in the original text: case and accent insensitive, overlapping matches merged. */\nexport function getMatchRanges(text: string, query: string, match: MatchMode = 'words'): Array<[number, number]> {\n const q = query.trim();\n if (!q) return [];\n const needles = (match === 'phrase' ? [q.replace(/\\s+/g, ' ')] : q.split(/\\s+/)).map(fold).filter(Boolean);\n const hay = fold(text);\n const found: Array<[number, number]> = [];\n for (const n of needles) for (let i = hay.indexOf(n); i !== -1; i = hay.indexOf(n, i + 1)) found.push([i, i + n.length]);\n found.sort((a, b) => a[0] - b[0] || a[1] - b[1]);\n const merged: Array<[number, number]> = [];\n for (const [s, e] of found) { const last = merged[merged.length - 1]; if (last && s < last[1]) last[1] = Math.max(last[1], e); else merged.push([s, e]); }\n // an accent that follows a marked letter stays with it\n return merged.map(([s, e]) => { while (e < text.length && /\\p{M}/u.test(text[e])) e++; return [s, e] as [number, number]; });\n}\n\n/** Marks the part of a text that matches the query, for search results and suggestions. */\nexport interface HighlightProps {\n /** The full text. */\n text: string;\n /** What to look for: case and accent insensitive. */\n query: string;\n /** words (default): each word is marked on its own; phrase: only the whole query. */\n match?: MatchMode;\n /** tint (default), bold or underline. */\n matchStyle?: MatchStyle;\n}\n\n/** Marks the part of a text that matches the query, for search results and suggestions. Matches are mark elements, so assistive technology can say them; the text itself is unchanged. */\nexport function Highlight({ text, query, match = 'words', matchStyle = 'tint' }: HighlightProps) {\n const ranges = getMatchRanges(text, query, match);\n if (!ranges.length) return <>{text}</>;\n const out: ReactNode[] = [];\n let at = 0;\n ranges.forEach(([s, e], i) => {\n if (s > at) out.push(text.slice(at, s));\n out.push(<mark key={i} className=\"alea-mark\" data-style={matchStyle !== 'tint' ? matchStyle : undefined}>{text.slice(s, e)}</mark>);\n at = e;\n });\n if (at < text.length) out.push(text.slice(at));\n return <>{out}</>;\n}\n\n// A text inside an option that marks what the surrounding list says was typed (internal). It reads the context where the option\n// renders, because options are first built where that is not known yet.\nexport function MatchedText({ text }: { text: string }) {\n const m = useOptionMatch();\n return m?.query ? <Highlight text={text} query={m.query} match={m.match} matchStyle={m.style} /> : <>{text}</>;\n}\n\nexport interface OptionMatch { query: string; style: MatchStyle; match: MatchMode }\n// what a ComboBox or searchable Select tells its options to mark (internal)\nexport const OptionMatchContext = createContext<OptionMatch | null>(null);\nexport const useOptionMatch = () => useContext(OptionMatchContext);\n"},{"path":"components/combobox/combobox.css","content":".alea-combobox .alea-input-wrap:focus-within { box-shadow: inset 0 0 0 1px var(--alea-focus), 0 0 0 4px var(--alea-focus-halo); }\n.alea-tagfield { gap: var(--alea-space-2); }\n.alea-tagfield-tags { display: flex; flex-wrap: wrap; gap: var(--alea-space-2); margin: 0; padding: 0; list-style: none; }\n.alea-mark { background: var(--alea-accent-subtle); color: inherit; border-radius: var(--alea-radius-xs); padding: 0 var(--alea-space-0-25); font-weight: var(--alea-font-weight-semibold); }\n.alea-autocomplete-spin { display: inline-grid; place-items: center; width: 28px; margin-right: var(--alea-space-2); }\n.alea-multiselect .alea-select-trigger .alea-count { margin-left: auto; }\n.alea-multiselect-dialog { display: flex; flex-direction: column; gap: var(--alea-space-2); padding: var(--alea-space-2); outline: none; min-width: 240px; }\n.alea-multiselect-actions { display: flex; justify-content: space-between; padding: var(--alea-space-0-5) var(--alea-space-2); font-size: var(--alea-font-size-xs); }\n.alea-multiselect-actions button { border: 0; background: none; padding: var(--alea-space-0-5) 0; cursor: pointer; font: inherit; }\n.alea-multiselect-list { max-height: 280px; overflow-y: auto; }\n.alea-ms-box { width: 20px; height: 20px; border-radius: var(--alea-radius-sm); }\n.alea-ms-box svg { opacity: 0; color: var(--alea-accent-on); }\n.alea-ms-box[data-on] { background: var(--alea-accent); box-shadow: none; }\n.alea-ms-box[data-on] svg { opacity: 1; }\n\n/* the match axis: how the part of an option that matches what was typed looks (tint is the default above) */\n.alea-mark[data-style='bold'] { background: none; padding: 0; font-weight: var(--alea-font-weight-semibold); }\n.alea-mark[data-style='underline'] { background: none; padding: 0; text-decoration: underline; text-decoration-color: var(--alea-accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }\n@media (forced-colors: active) { .alea-mark { background: Highlight; color: HighlightText; } .alea-mark[data-style] { background: none; color: inherit; } }\n"}],"deps":["field","overlay","feedback","choice","select"],"npm":["react-aria-components","lucide-react","@alea-design/motion"],"exports":["Autocomplete","MultiSelect","ComboBox","TagField","getMatchRanges","Highlight","MatchedText","OptionMatchContext","useOptionMatch"],"descriptions":{"Autocomplete":"Search with suggestions: static or loaded as you type, grouped, matches highlighted, recent searches when empty.","MultiSelect":"Pick several options from a list with checkboxes; the trigger summarizes the picks.","ComboBox":"Type to filter a list and pick one. Pass defaultItems to filter as people type, or items to filter yourself (async search). allowsCustomValue keeps free text.","TagField":"Pick several options by typing; picks show as removable tags.","getMatchRanges":"Where a query matches a text, as [start, end) ranges in the original text: case and accent insensitive, overlapping matches merged.","Highlight":"Marks the part of a text that matches the query, for search results and suggestions. Matches are mark elements, so assistive technology can say them; the text itself is unchanged."}},"command":{"files":[{"path":"components/command/CommandPalette.tsx","content":"import { useEffect, useMemo, useState, type ReactNode } from 'react';\nimport type { MotionProp } from '@alea-design/motion';\nimport { Autocomplete, Input, Menu as RACMenu, MenuItem as RACMenuItem, MenuSection, Header, SearchField as RACSearchField, Collection, Keyboard, useFilter, type Key } from 'react-aria-components';\nimport { Search } from 'lucide-react';\nimport { Dialog, DialogModal } from '../overlay/Overlay';\nimport { Kbd } from '../typography/Typography';\nimport { useStrings } from '../../i18n/strings';\n\nexport interface Command {\n id: Key;\n label: string;\n /** Group heading, e.g. \"Navigation\" or \"Actions\". */\n group?: string;\n /** A second line. */\n description?: string;\n icon?: ReactNode;\n /** Shown on the right, e.g. ⌘D. */\n shortcut?: string;\n /** More words that should find it. */\n keywords?: string[];\n onAction: () => void;\n}\n\nexport interface CommandPaletteProps {\n /** The commands, in groups: id, label, icon, shortcut, keywords and onAction. */\n commands: Command[];\n /** Whether it is open (controlled). Without it, the shortcut toggles it. */\n isOpen?: boolean;\n /** Called when it opens or closes. */\n onOpenChange?: (open: boolean) => void;\n /** Opens with ⌘K / Ctrl+K anywhere. Default true. */\n hotkey?: boolean;\n /** Shown in the search field. Default \"Type a command or search…\". */\n placeholder?: string;\n /** Shown when nothing matches. */\n emptyText?: ReactNode;\n /** How it enters and leaves (default rise): a preset, false, or options. */\n motion?: MotionProp;\n}\n\n/** Search every action and page from the keyboard (⌘K). */\nexport function CommandPalette({ commands, isOpen, onOpenChange, motion, hotkey = true, placeholder, emptyText }: CommandPaletteProps) {\n const t = useStrings(); placeholder ??= t.commandPlaceholder; emptyText ??= t.noResults;\n const [own, setOwn] = useState(false);\n const open = isOpen ?? own;\n const setOpen = (o: boolean) => { if (isOpen === undefined) setOwn(o); onOpenChange?.(o); };\n useEffect(() => {\n if (!hotkey) return;\n const on = (e: KeyboardEvent) => { if (e.key.toLowerCase() === 'k' && (e.metaKey || e.ctrlKey)) { e.preventDefault(); setOpen(!open); } };\n window.addEventListener('keydown', on);\n return () => window.removeEventListener('keydown', on);\n });\n const { contains } = useFilter({ sensitivity: 'base' });\n const groups = useMemo(() => {\n const out: Array<{ id: string; title: string; items: Command[] }> = [];\n for (const c of commands) { const g = c.group || ''; let grp = out.find(x => x.id === g); if (!grp) out.push(grp = { id: g, title: g, items: [] }); grp.items.push(c); }\n return out;\n }, [commands]);\n const byId = useMemo(() => new Map(commands.map(c => [c.id, c])), [commands]);\n return (\n <DialogModal isOpen={open} onOpenChange={setOpen} size=\"md\" className=\"alea-command-overlay\" motion={motion}>\n <Dialog aria-label={t.commandPalette} hideClose className=\"alea-command\">\n {({ close }) => (\n <Autocomplete filter={(text, input) => contains(text, input)}>\n <RACSearchField aria-label={t.searchCommands} autoFocus className=\"alea-command-search\">\n <Search size={18} aria-hidden=\"true\" />\n <Input placeholder={placeholder} className=\"alea-command-input\" />\n <Kbd>{t.esc}</Kbd>\n </RACSearchField>\n <RACMenu items={groups} className=\"alea-command-list\" onAction={key => { const c = byId.get(key); close(); c?.onAction(); }} renderEmptyState={() => <p className=\"alea-command-empty\">{emptyText}</p>}>\n {group => (\n <MenuSection id={group.id} className=\"alea-option-section\">\n {group.title && <Header className=\"alea-option-header\">{group.title}</Header>}\n <Collection items={group.items}>\n {c => (\n <RACMenuItem id={c.id} textValue={[c.label, ...(c.keywords || [])].join(' ')} className=\"alea-option alea-command-item\">\n {c.icon && <span className=\"alea-option-icon\" aria-hidden=\"true\">{c.icon}</span>}\n <span className=\"alea-option-text\"><span slot=\"label\">{c.label}</span>{c.description && <span className=\"alea-option-desc\" slot=\"description\">{c.description}</span>}</span>\n {c.shortcut && <Keyboard className=\"alea-menu-shortcut\">{c.shortcut}</Keyboard>}\n </RACMenuItem>\n )}\n </Collection>\n </MenuSection>\n )}\n </RACMenu>\n </Autocomplete>\n )}\n </Dialog>\n </DialogModal>\n );\n}\n"},{"path":"components/command/command.css","content":".alea-command-overlay { align-items: start; padding-top: min(12vh, calc(var(--alea-space-24) + var(--alea-space-6))); }\n.alea-command { padding: 0; gap: 0; }\n.alea-command-search { display: flex; align-items: center; gap: var(--alea-space-3); height: 56px; padding: 0 var(--alea-space-4); border-bottom: 1px solid var(--alea-border); color: var(--alea-text-muted); }\n.alea-command-input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--alea-text); font: var(--alea-font-weight-regular) 16px/1 var(--alea-font-family-body); outline: none; }\n.alea-command-input::placeholder { color: var(--alea-text-faint); }\n.alea-command-input::-webkit-search-cancel-button { display: none; }\n.alea-command-list { max-height: min(56vh, 480px); overflow-y: auto; padding: var(--alea-space-2); outline: none; display: flex; flex-direction: column; gap: var(--alea-space-0-25); }\n.alea-command-item[data-focused] { background: var(--alea-accent-subtle); }\n.alea-command-empty { margin: 0; padding: var(--alea-space-7) var(--alea-space-4); text-align: center; color: var(--alea-text-muted); }\n"}],"deps":["overlay","typography"],"npm":["react-aria-components","lucide-react","@alea-design/motion"],"exports":["CommandPalette"],"descriptions":{"CommandPalette":"Search every action and page from the keyboard (⌘K)."}},"content":{"files":[{"path":"components/content/Content.tsx","content":"import { useState, type ReactNode } from 'react';\nimport { TextArea as RACTextArea, TextField as RACTextField, Label, useLocale } from 'react-aria-components';\nimport { X, Lock } from 'lucide-react';\nimport { cx } from '../../utils/cx';\nimport { Avatar, type AvatarProps } from '../display/Display';\nimport { Button, IconButton } from '../button/Button';\nimport { useStrings } from '../../i18n/strings';\n\n// ---------------------------------------------------------------- Persona\n\nexport interface PersonaProps {\n /** The person's (or team's) name. */\n name: string;\n /** Photo URL. */\n src?: string;\n /** A second line: role, email. */\n secondary?: ReactNode;\n /** A third line, shown from size lg: status message, last seen. */\n tertiary?: ReactNode;\n /** A presence dot on the avatar. */\n status?: AvatarProps['status'];\n /** sm (24 px avatar, one line), md (40 px, default), lg (56 px), xl (80 px). */\n size?: 'sm' | 'md' | 'lg' | 'xl';\n /** Text after the avatar (default) or below it, centered. */\n textPosition?: 'after' | 'below';\n /** Something at the end: a badge, a button. */\n end?: ReactNode;\n /** Extra class names. */\n className?: string;\n}\n\n/** A person at a glance: avatar with presence, name, and up to two more lines. For lists, cards, menus and comments. */\nexport function Persona({ name, src, secondary, tertiary, status, size = 'md', textPosition = 'after', end, className }: PersonaProps) {\n const avatar = { sm: 'xs', md: 'md', lg: 'lg', xl: 'xl' }[size] as AvatarProps['size'];\n return (\n <div className={cx('alea-persona', className)} data-size={size} data-text={textPosition}>\n <Avatar name={name} src={src} size={avatar} status={status} />\n <div className=\"alea-persona-text\">\n <span className=\"alea-persona-name\">{name}</span>\n {secondary && size !== 'sm' && <span className=\"alea-persona-secondary\">{secondary}</span>}\n {tertiary && (size === 'lg' || size === 'xl') && <span className=\"alea-persona-tertiary\">{tertiary}</span>}\n </div>\n {end && <div className=\"alea-persona-end\">{end}</div>}\n </div>\n );\n}\n\n// ---------------------------------------------------------------- Comment\n\nexport interface CommentProps {\n /** Who wrote it. */\n author: string;\n /** Their photo. */\n avatarSrc?: string;\n /** When: a Date (shown relative, like \"5 min ago\", with the full date on hover) or your own text. */\n time?: Date | ReactNode;\n /** The comment. */\n children: ReactNode;\n /** Actions under it: Reply, Like, Edit (use Button variant=\"text\" size=\"xs\"). */\n actions?: ReactNode;\n /** A short tag after the name: Author, Admin, Bot. */\n badge?: ReactNode;\n /** Marks it as edited. */\n isEdited?: boolean;\n /** Only some people can see it: shows a lock and this text (\"Only visible to your team\"). */\n restricted?: ReactNode;\n /** Draws attention to it: a linked or new comment. */\n isHighlighted?: boolean;\n /** Shows it as being saved (dimmed) or failed (with errorMessage). */\n state?: 'saving' | 'failed';\n /** What went wrong when state is failed, with your retry action in actions. */\n errorMessage?: ReactNode;\n /** Replies: nested Comment elements. */\n replies?: ReactNode;\n /** Heading level of the author line for screen readers' heading navigation. Default none (plain text). */\n headingLevel?: 2 | 3 | 4 | 5 | 6;\n /** Extra class names. */\n className?: string;\n}\n\nfunction relative(d: Date, locale?: string) {\n const s = (d.getTime() - Date.now()) / 1000;\n const rtf = new Intl.RelativeTimeFormat(locale, { numeric: 'auto' });\n const steps: Array<[Intl.RelativeTimeFormatUnit, number]> = [['second', 60], ['minute', 60], ['hour', 24], ['day', 7], ['week', 4.35], ['month', 12], ['year', Infinity]];\n let v = s;\n for (const [unit, size] of steps) { if (Math.abs(v) < size) return rtf.format(Math.round(v), unit); v /= size; }\n return rtf.format(Math.round(v), 'year');\n}\n\n/** One comment in a conversation: author, time, text, actions, and nested replies. */\nexport function Comment({ author, avatarSrc, time, children, actions, badge, isEdited, restricted, isHighlighted, state, errorMessage, replies, headingLevel, className }: CommentProps) {\n const t = useStrings();\n const { locale } = useLocale();\n const Author = headingLevel ? (`h${headingLevel}` as 'h3') : 'span';\n return (\n <article className={cx('alea-comment', className)} data-highlighted={isHighlighted || undefined} data-state={state} aria-busy={state === 'saving' || undefined}>\n <Avatar name={author} src={avatarSrc} size=\"sm\" />\n <div className=\"alea-comment-main\">\n <header className=\"alea-comment-head\">\n <Author className=\"alea-comment-author\">{author}</Author>\n {badge && <span className=\"alea-comment-badge\">{badge}</span>}\n {time && (time instanceof Date ? <time className=\"alea-comment-time\" dateTime={time.toISOString()} title={time.toLocaleString()}>{relative(time, locale)}</time> : <span className=\"alea-comment-time\">{time}</span>)}\n {isEdited && <span className=\"alea-comment-time\">· {t.edited}</span>}\n {restricted && <span className=\"alea-comment-restricted\"><Lock size={12} aria-hidden=\"true\" /> {restricted}</span>}\n </header>\n <div className=\"alea-comment-body\">{children}</div>\n {state === 'failed' && errorMessage && <p className=\"alea-comment-error\" role=\"alert\">{errorMessage}</p>}\n {actions && <div className=\"alea-comment-actions\">{actions}</div>}\n {replies && <div className=\"alea-comment-replies\">{replies}</div>}\n </div>\n </article>\n );\n}\n\nexport interface CommentComposerProps {\n /** Called with the text when sent; clear it yourself if you control value. */\n onSubmit: (text: string) => void;\n /** Who is writing (shows their avatar). */\n author?: string;\n /** Their photo. */\n avatarSrc?: string;\n /** Placeholder. Default \"Add a comment…\". */\n placeholder?: string;\n /** Label for screen readers. Default \"Comment\". */\n label?: string;\n /** Text of the send button. Default \"Comment\". */\n submitLabel?: ReactNode;\n /** Shows Cancel, for inline replies. */\n onCancel?: () => void;\n /** Disables sending while it saves. */\n isSubmitting?: boolean;\n /** Extra class names. */\n className?: string;\n}\n\n/** Where people write a comment or a reply: grows with the text, ⌘Enter or Ctrl+Enter sends. */\nexport function CommentComposer({ onSubmit, author, avatarSrc, placeholder, label, submitLabel, onCancel, isSubmitting, className }: CommentComposerProps) {\n const t = useStrings();\n const [text, setText] = useState('');\n const send = () => { const v = text.trim(); if (!v || isSubmitting) return; onSubmit(v); setText(''); };\n return (\n <div className={cx('alea-comment-composer', className)}>\n {author && <Avatar name={author} src={avatarSrc} size=\"sm\" />}\n <RACTextField className=\"alea-comment-field\" value={text} onChange={setText} aria-label={label ?? t.comment}>\n <Label className=\"alea-visually-hidden\">{label ?? t.comment}</Label>\n <RACTextArea className=\"alea-comment-input\" placeholder={placeholder ?? t.addComment} rows={1} style={{ fieldSizing: 'content' } as any}\n onKeyDown={e => { if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) { e.preventDefault(); send(); } }} />\n <div className=\"alea-comment-composer-actions\">\n {onCancel && <Button size=\"sm\" variant=\"text\" onPress={onCancel}>{t.cancel}</Button>}\n <Button size=\"sm\" onPress={send} isDisabled={!text.trim()} isLoading={isSubmitting} shortcut=\"⌘↵\">{submitLabel ?? t.comment}</Button>\n </div>\n </RACTextField>\n </div>\n );\n}\n\n// ---------------------------------------------------------------- MediaCard and CalloutCard\n\nexport interface MediaCardProps {\n /** An image, video or illustration. */\n media: ReactNode;\n /** The title. */\n title: ReactNode;\n /** The text. */\n children?: ReactNode;\n /** The main action. */\n primaryAction?: ReactNode;\n /** A second action. */\n secondaryAction?: ReactNode;\n /** Adds a close button that calls this. */\n onDismiss?: () => void;\n /** horizontal (media on the side, default; stacks on narrow cards) or vertical (media on top). */\n layout?: 'horizontal' | 'vertical';\n /** Heading level of the title. Default 3. */\n headingLevel?: 2 | 3 | 4;\n /** Extra class names. */\n className?: string;\n}\n\n/** A card that leads with media: an image or video beside (or above) a title, text and actions. For tutorials, promotions, onboarding. */\nexport function MediaCard({ media, title, children, primaryAction, secondaryAction, onDismiss, layout = 'horizontal', headingLevel = 3, className }: MediaCardProps) {\n const t = useStrings();\n const H = `h${headingLevel}` as 'h3';\n return (\n <section className={cx('alea-media-card', className)} data-layout={layout}>\n <div className=\"alea-card-inner\">\n <div className=\"alea-media-card-media\">{media}</div>\n <div className=\"alea-media-card-body\">\n <H className=\"alea-media-card-title\">{title}</H>\n {children && <div className=\"alea-media-card-text\">{children}</div>}\n {(primaryAction || secondaryAction) && <div className=\"alea-media-card-actions\">{primaryAction}{secondaryAction}</div>}\n </div>\n </div>\n {onDismiss && <IconButton aria-label={t.dismiss} size=\"sm\" variant=\"text\" className=\"alea-card-dismiss\" onPress={onDismiss}><X /></IconButton>}\n </section>\n );\n}\n\nexport interface CalloutCardProps {\n /** The title. */\n title: ReactNode;\n /** The text. */\n children?: ReactNode;\n /** An illustration on the right (hidden on narrow cards). */\n illustration?: ReactNode;\n /** The main action. */\n primaryAction?: ReactNode;\n /** A second action. */\n secondaryAction?: ReactNode;\n /** Adds a close button that calls this. */\n onDismiss?: () => void;\n /** Heading level of the title. Default 3. */\n headingLevel?: 2 | 3 | 4;\n /** Extra class names. */\n className?: string;\n}\n\n/** A card that suggests a next step: a title, a sentence, an action and an illustration. Dismissible. */\nexport function CalloutCard({ title, children, illustration, primaryAction, secondaryAction, onDismiss, headingLevel = 3, className }: CalloutCardProps) {\n const t = useStrings();\n const H = `h${headingLevel}` as 'h3';\n return (\n <section className={cx('alea-callout-card', className)}>\n <div className=\"alea-card-inner\">\n <div className=\"alea-callout-card-body\">\n <H className=\"alea-media-card-title\">{title}</H>\n {children && <div className=\"alea-media-card-text\">{children}</div>}\n {(primaryAction || secondaryAction) && <div className=\"alea-media-card-actions\">{primaryAction}{secondaryAction}</div>}\n </div>\n {illustration && <div className=\"alea-callout-card-art\" aria-hidden=\"true\">{illustration}</div>}\n </div>\n {onDismiss && <IconButton aria-label={t.dismiss} size=\"sm\" variant=\"text\" className=\"alea-card-dismiss\" onPress={onDismiss}><X /></IconButton>}\n </section>\n );\n}\n"},{"path":"components/content/content.css","content":"/* Persona */\n.alea-persona { display: flex; align-items: center; gap: var(--alea-space-3); min-width: 0; }\n.alea-persona[data-size='sm'] { gap: var(--alea-space-2); }\n.alea-persona[data-text='below'] { flex-direction: column; text-align: center; }\n.alea-persona-text { display: flex; flex-direction: column; gap: var(--alea-space-0-5); min-width: 0; }\n.alea-persona-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--alea-font-weight-semibold); font-size: var(--alea-font-size-md); }\n.alea-persona[data-size='sm'] .alea-persona-name { font-weight: var(--alea-font-weight-medium); font-size: var(--alea-font-size-sm); }\n.alea-persona[data-size='lg'] .alea-persona-name { font-size: var(--alea-font-size-base); }\n.alea-persona[data-size='xl'] .alea-persona-name { font-size: var(--alea-font-size-lg); }\n.alea-persona-secondary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n.alea-persona-tertiary { color: var(--alea-text-faint); font-size: var(--alea-font-size-xs); }\n.alea-persona-end { margin-left: auto; flex: none; }\n\n/* Comment */\n.alea-comment { display: flex; gap: var(--alea-space-3); padding: var(--alea-space-2); margin: calc(-1 * var(--alea-space-2)); border-radius: var(--alea-radius-md); transition: background-color var(--alea-motion-duration-slow) var(--alea-motion-ease-standard); }\n.alea-comment[data-highlighted] { background: var(--alea-accent-subtle); }\n.alea-comment[data-state='saving'] { opacity: 0.6; }\n.alea-comment-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--alea-space-1); }\n.alea-comment-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--alea-space-1) var(--alea-space-2); }\n.alea-comment-author { margin: 0; font: var(--alea-font-weight-semibold) var(--alea-font-size-md) / 1.3 var(--alea-font-family-body); }\n.alea-comment-badge { padding: 0 var(--alea-space-2); border-radius: var(--alea-radius-xs); background: var(--alea-surface-raised); color: var(--alea-text-muted); font-size: var(--alea-font-size-2xs); font-weight: var(--alea-font-weight-semibold); line-height: 18px; }\n.alea-comment-time { color: var(--alea-text-faint); font-size: var(--alea-font-size-xs); }\n.alea-comment-restricted { display: inline-flex; align-items: center; gap: var(--alea-space-1); color: var(--alea-status-warning); font-size: var(--alea-font-size-xs); }\n.alea-comment-body { color: var(--alea-text); font-size: var(--alea-font-size-md); line-height: 1.55; overflow-wrap: anywhere; }\n.alea-comment-body > p { margin: 0 0 var(--alea-space-2); } .alea-comment-body > p:last-child { margin: 0; }\n.alea-comment-error { margin: 0; color: var(--alea-status-danger); font-size: var(--alea-font-size-sm); }\n.alea-comment-actions { display: flex; flex-wrap: wrap; gap: var(--alea-space-1); margin-left: calc(var(--alea-space-2) * -1); }\n.alea-comment-replies { display: flex; flex-direction: column; gap: var(--alea-space-4); margin-top: var(--alea-space-3); padding-left: var(--alea-space-3); border-left: 2px solid var(--alea-border); }\n@media (max-width: 479px) { .alea-comment-replies { padding-left: var(--alea-space-2); } }\n.alea-comment-composer { display: flex; gap: var(--alea-space-3); align-items: flex-start; }\n.alea-comment-field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--alea-space-2); padding: var(--alea-space-2); border-radius: var(--alea-radius-md); background: var(--alea-field-bg); box-shadow: inset 0 0 0 1px var(--alea-border); transition: box-shadow var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-comment-field:focus-within { box-shadow: inset 0 0 0 1px var(--alea-focus), 0 0 0 4px var(--alea-focus-halo); }\n.alea-comment-input { min-height: 40px; max-height: 240px; padding: var(--alea-space-1) var(--alea-space-2); border: 0; background: none; color: var(--alea-text); font: var(--alea-font-size-md) / 1.5 var(--alea-font-family-body); resize: none; outline: none; }\n.alea-comment-input::placeholder { color: var(--alea-text-faint); }\n.alea-comment-composer-actions { display: flex; justify-content: flex-end; gap: var(--alea-space-2); }\n\n/* MediaCard and CalloutCard: they adapt to their own width */\n.alea-media-card, .alea-callout-card { position: relative; border-radius: var(--alea-radius-lg); background: var(--alea-surface); box-shadow: var(--alea-shadow-card); container-type: inline-size; }\n.alea-card-inner { display: flex; gap: var(--alea-space-5); padding: var(--alea-space-5); }\n.alea-media-card[data-layout='vertical'] { overflow: hidden; }\n.alea-media-card[data-layout='vertical'] .alea-card-inner { flex-direction: column; padding: 0; }\n.alea-media-card-media { flex: 0 0 40%; min-width: 0; overflow: hidden; border-radius: var(--alea-radius-md); }\n.alea-media-card[data-layout='vertical'] .alea-media-card-media { border-radius: 0; }\n.alea-media-card-media > :is(img, video) { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }\n.alea-media-card-body, .alea-callout-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--alea-space-2); }\n.alea-media-card[data-layout='vertical'] .alea-media-card-body { padding: 0 var(--alea-space-5) var(--alea-space-5); }\n.alea-media-card-title { margin: 0; padding-right: var(--alea-space-8); font: var(--alea-font-weight-semibold) var(--alea-font-size-base) / 1.35 var(--alea-font-family-body); }\n.alea-media-card-text { color: var(--alea-text-muted); font-size: var(--alea-font-size-md); line-height: 1.55; }\n.alea-media-card-actions { display: flex; flex-wrap: wrap; gap: var(--alea-space-2); margin-top: auto; padding-top: var(--alea-space-2); }\n.alea-card-dismiss { position: absolute; top: var(--alea-space-2); right: var(--alea-space-2); }\n.alea-callout-card-art { flex: none; display: grid; place-items: center; width: 120px; }\n.alea-callout-card-art > :is(img, svg) { max-width: 100%; height: auto; }\n@container (max-width: 480px) { .alea-media-card[data-layout='horizontal'] .alea-card-inner { flex-direction: column; } .alea-callout-card-art { display: none; } }\n"}],"deps":["display","button"],"npm":["react-aria-components","lucide-react"],"exports":["Persona","Comment","CommentComposer","MediaCard","CalloutCard"],"descriptions":{"Persona":"A person at a glance: avatar with presence, name, and up to two more lines. For lists, cards, menus and comments.","Comment":"One comment in a conversation: author, time, text, actions, and nested replies.","CommentComposer":"Where people write a comment or a reply: grows with the text, ⌘Enter or Ctrl+Enter sends.","MediaCard":"A card that leads with media: an image or video beside (or above) a title, text and actions. For tutorials, promotions, onboarding.","CalloutCard":"A card that suggests a next step: a title, a sentence, an action and an illustration. Dismissible."}},"data":{"files":[{"path":"components/data/Data.tsx","content":"import { useEffect, useRef, useState, type ElementType, type HTMLAttributes, type ReactNode } from 'react';\nimport { createElement } from 'react';\nimport { TrendingUp, TrendingDown, Inbox, CircleCheck, CircleAlert, SearchX, Lock, ServerCrash } from 'lucide-react';\nimport { cx } from '../../utils/cx';\n\nexport interface DescriptionsProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {\n /** The pairs: label and value. span sets how many columns an item takes; wide spans the whole row. */\n items: Array<{ label: ReactNode; value: ReactNode; /** Columns it spans (1 to 4). */ span?: 1 | 2 | 3 | 4; /** Spans the whole row. */ wide?: boolean }>;\n /** Columns on wide screens: 1 to 4. Default 2. Three and four columns drop to two below 1024 px; everything is one column on phones. */\n columns?: 1 | 2 | 3 | 4;\n /** stacked (label above the value, default) or inline (label and value side by side). */\n layout?: 'stacked' | 'inline';\n /** Draws lines between items. */\n bordered?: boolean;\n /** sm (tighter, 13 px values) or md (default). */\n size?: 'sm' | 'md';\n /** A title above the list (an h3). */\n title?: ReactNode;\n /** Something at the end of the title row: an Edit button or link. */\n extra?: ReactNode;\n /** With layout inline: the width of the label column, any CSS length. Default 40%. */\n labelWidth?: string;\n}\n\n/** Key and value pairs: order details, profile facts, settings summaries. A title with an action, one to four columns, item spans, stacked or inline, two sizes. */\nexport function Descriptions({ items, columns = 2, layout = 'stacked', bordered, size, title, extra, labelWidth, className, style, ...props }: DescriptionsProps) {\n const list = (\n <dl className=\"alea-descriptions\" data-columns={columns} data-layout={layout} data-bordered={bordered || undefined} data-size={size} style={labelWidth ? { ['--alea-desc-label' as string]: labelWidth } : undefined}>\n {items.map((it, i) => <div key={i} className=\"alea-desc-item\" data-wide={it.wide || undefined} data-span={it.span && it.span > 1 ? it.span : undefined}><dt>{it.label}</dt><dd>{it.value}</dd></div>)}\n </dl>\n );\n if (!title && !extra) return <div {...props} style={style} className={cx('alea-descriptions-wrap', className)}>{list}</div>;\n return (\n <section {...props} style={style} className={cx('alea-descriptions-wrap', className)}>\n <header className=\"alea-descriptions-head\">{title && <h3 className=\"alea-descriptions-title\">{title}</h3>}{extra && <div className=\"alea-descriptions-extra\">{extra}</div>}</header>\n {list}\n </section>\n );\n}\n\nexport interface StatisticProps extends Omit<HTMLAttributes<HTMLDivElement>, 'prefix'> {\n /** What the number is. */\n label: ReactNode;\n /** The number. */\n value: number;\n /** Intl number format (currency, percent, compact). */\n formatOptions?: Intl.NumberFormatOptions;\n /** Change versus before, e.g. 0.12 for +12%. */\n delta?: number;\n /** Is up good? Default true (turns green); false flips the colors (costs, errors). */\n higherIsBetter?: boolean;\n /** Counts up from 0 when it appears (skipped with reduced motion). */\n animate?: boolean;\n /** Before the number, e.g. \"$\". */\n prefix?: ReactNode;\n /** After the number, e.g. \" ms\". */\n suffix?: ReactNode;\n}\n\n/** A big number with its label and change. */\nexport function Statistic({ label, value, formatOptions, delta, higherIsBetter = true, animate, prefix, suffix, className, ...props }: StatisticProps) {\n const [shown, setShown] = useState(animate ? 0 : value);\n const raf = useRef(0);\n useEffect(() => {\n if (!animate || typeof window === 'undefined' || window.matchMedia?.('(prefers-reduced-motion: reduce)').matches) { setShown(value); return; }\n const start = performance.now(), dur = 900;\n const step = (t: number) => { const k = Math.min(1, (t - start) / dur); setShown(value * (1 - Math.pow(1 - k, 3))); if (k < 1) raf.current = requestAnimationFrame(step); };\n raf.current = requestAnimationFrame(step);\n return () => cancelAnimationFrame(raf.current);\n }, [value, animate]);\n const fmt = new Intl.NumberFormat(undefined, formatOptions);\n const good = delta === undefined ? null : (delta >= 0) === higherIsBetter;\n return (\n <div {...props} className={cx('alea-stat', className)}>\n <div className=\"alea-stat-label\">{label}</div>\n <div className=\"alea-stat-value\"><span aria-hidden=\"true\">{prefix}{fmt.format(animate ? Math.round(shown * 100) / 100 : value)}{suffix}</span><span className=\"alea-visually-hidden\">{fmt.format(value)}</span></div>\n {delta !== undefined && (\n <div className=\"alea-stat-delta\" data-good={good ? true : undefined} data-bad={good === false ? true : undefined}>\n {delta >= 0 ? <TrendingUp size={14} aria-hidden=\"true\" /> : <TrendingDown size={14} aria-hidden=\"true\" />}\n <span>{delta >= 0 ? '+' : ''}{new Intl.NumberFormat(undefined, { style: 'percent', maximumFractionDigits: 1 }).format(delta)}</span>\n <span className=\"alea-visually-hidden\">{delta >= 0 ? 'up' : 'down'} from before</span>\n </div>\n )}\n </div>\n );\n}\n\nexport interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** What is empty, in a few words. */\n title: ReactNode;\n /** What to do about it. */\n description?: ReactNode;\n /** An icon or illustration. Default an inbox. Pass an <img> or SVG for a full illustration (it is shown larger, without the tile). */\n icon?: ReactNode;\n /** Shows icon as a full illustration instead of an icon in a tile. */\n illustration?: boolean;\n /** A button to fix it: \"Create your first palette\". */\n action?: ReactNode;\n /** A second, quieter action next to it: \"Import\", \"Learn more\". */\n secondaryAction?: ReactNode;\n /** A line under the actions: a help link, a note. */\n footer?: ReactNode;\n /** sm (inside cards and tables), md (default) or lg (a whole page). */\n size?: 'sm' | 'md' | 'lg';\n /** plain (default) or dashed: a dashed box, for areas waiting to be filled. */\n variant?: 'plain' | 'dashed';\n /** The title's heading element. Default h3. */\n headingAs?: ElementType;\n}\n\n/** What to show when there is nothing yet, and what to do about it: three sizes, a dashed look, an illustration, two actions and a footer. */\nexport function EmptyState({ title, description, icon, illustration, action, secondaryAction, footer, size, variant, headingAs = 'h3', className, ...props }: EmptyStateProps) {\n return (\n <div {...props} className={cx('alea-empty', className)} data-size={size} data-variant={variant}>\n <span className={illustration ? 'alea-empty-art' : 'alea-empty-icon'} aria-hidden=\"true\">{icon ?? <Inbox />}</span>\n {createElement(headingAs, { className: 'alea-empty-title' }, title)}\n {description && <p className=\"alea-empty-text\">{description}</p>}\n {(action || secondaryAction) && <div className=\"alea-empty-action\">{action}{secondaryAction}</div>}\n {footer && <p className=\"alea-empty-footer\">{footer}</p>}\n </div>\n );\n}\n\nconst RESULT_ICON = { success: CircleCheck, error: CircleAlert, '404': SearchX, '403': Lock, '500': ServerCrash, info: Inbox } as const;\n\nexport interface ResultProps extends Omit<EmptyStateProps, 'icon'> {\n /** success, error, 404, 403, 500 or info. */\n status: keyof typeof RESULT_ICON;\n}\n\n/** The outcome of a flow or a whole page: done, failed, not found, no access. */\nexport function Result({ status, className, ...props }: ResultProps) {\n const Glyph = RESULT_ICON[status];\n return <EmptyState {...props} headingAs={props.headingAs ?? 'h2'} icon={<Glyph />} className={cx('alea-result', className)} data-status={status} />;\n}\n"},{"path":"components/data/data.css","content":".alea-descriptions { display: grid; grid-template-columns: repeat(var(--alea-desc-cols, 2), minmax(0, 1fr)); gap: var(--alea-space-4) var(--alea-space-6); margin: 0; }\n.alea-descriptions[data-columns='1'] { --alea-desc-cols: 1; }\n.alea-descriptions[data-columns='3'] { --alea-desc-cols: 3; }\n.alea-descriptions[data-columns='4'] { --alea-desc-cols: 4; }\n@media (max-width: 1023px) { .alea-descriptions[data-columns='3'], .alea-descriptions[data-columns='4'] { --alea-desc-cols: 2; } }\n@media (max-width: 640px) { .alea-descriptions { --alea-desc-cols: 1 !important; } .alea-desc-item[data-span] { grid-column: auto; } }\n.alea-desc-item[data-span='2'] { grid-column: span min(2, var(--alea-desc-cols, 2)); }\n.alea-desc-item[data-span='3'] { grid-column: span min(3, var(--alea-desc-cols, 2)); }\n.alea-desc-item[data-span='4'] { grid-column: span min(4, var(--alea-desc-cols, 2)); }\n.alea-descriptions-head { display: flex; align-items: center; justify-content: space-between; gap: var(--alea-space-3); margin-bottom: var(--alea-space-4); }\n.alea-descriptions-title { margin: 0; font: var(--alea-font-weight-semibold) var(--alea-font-size-base) / 1.4 var(--alea-font-family-body); }\n.alea-descriptions[data-size='sm'] { gap: var(--alea-space-3) var(--alea-space-5); }\n.alea-descriptions[data-size='sm'] .alea-desc-item dt { font-size: var(--alea-font-size-xs); }\n.alea-descriptions[data-size='sm'] .alea-desc-item dd { font-size: var(--alea-font-size-sm); }\n.alea-descriptions[data-size='sm'][data-bordered] .alea-desc-item { padding: var(--alea-space-2) var(--alea-space-3); }\n.alea-desc-item { display: flex; flex-direction: column; gap: var(--alea-space-1); min-width: 0; }\n.alea-desc-item[data-wide] { grid-column: 1 / -1; }\n.alea-descriptions[data-layout='inline'] .alea-desc-item { flex-direction: row; gap: var(--alea-space-3); }\n.alea-descriptions[data-layout='inline'] dt { flex: 0 0 var(--alea-desc-label, 40%); }\n.alea-desc-item dt { font: var(--alea-font-weight-medium) var(--alea-font-size-sm) / 1.4 var(--alea-font-family-body); color: var(--alea-text-muted); }\n.alea-desc-item dd { margin: 0; font-size: var(--alea-font-size-md); line-height: 1.5; overflow-wrap: anywhere; }\n.alea-descriptions[data-bordered] { gap: 0; border-radius: var(--alea-radius-md); box-shadow: inset 0 0 0 1px var(--alea-border); overflow: hidden; }\n.alea-descriptions[data-bordered] .alea-desc-item { padding: var(--alea-space-3) var(--alea-space-4); border-bottom: 1px solid var(--alea-border); }\n\n.alea-stat { display: flex; flex-direction: column; gap: var(--alea-space-1); }\n.alea-stat-label { font: var(--alea-font-weight-medium) var(--alea-font-size-sm) / 1.3 var(--alea-font-family-body); color: var(--alea-text-muted); }\n.alea-stat-value { font: var(--alea-font-weight-light) var(--alea-font-size-4xl) / 1.05 var(--alea-font-family-display); letter-spacing: var(--alea-font-tracking-display); font-variant-numeric: tabular-nums; }\n.alea-card > .alea-stat { container-type: inline-size; }\n/* in a card the number fits the card: up to its full size, smaller in a narrow card (two per row on a phone) */\n.alea-card > .alea-stat .alea-stat-value { font-size: min(var(--alea-font-size-4xl), 17cqi); }\n.alea-stat-delta { display: inline-flex; align-items: center; gap: var(--alea-space-1); font: var(--alea-font-weight-semibold) var(--alea-font-size-xs) / 1 var(--alea-font-family-body); color: var(--alea-text-muted); }\n.alea-stat-delta[data-good] { color: var(--alea-status-success); }\n.alea-stat-delta[data-bad] { color: var(--alea-status-danger); }\n\n.alea-empty { display: flex; flex-direction: column; align-items: center; gap: var(--alea-space-2); padding: var(--alea-space-10) var(--alea-space-6); text-align: center; }\n.alea-empty-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: var(--alea-space-2); border-radius: var(--alea-radius-2xl); background: var(--alea-surface-raised); color: var(--alea-icon-muted); }\n.alea-empty-icon svg { width: 28px; height: 28px; }\n.alea-empty-title { margin: 0; font: var(--alea-font-weight-light) var(--alea-font-size-2xl) / 1.15 var(--alea-font-family-display); letter-spacing: var(--alea-font-tracking-display); }\n.alea-empty-text { margin: 0; max-width: 420px; color: var(--alea-text-muted); font-size: var(--alea-font-size-md); line-height: 1.5; }\n.alea-empty-action { margin-top: var(--alea-space-3); display: flex; gap: var(--alea-space-2); flex-wrap: wrap; justify-content: center; }\n.alea-empty-footer { margin: var(--alea-space-2) 0 0; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n.alea-empty-art { display: block; margin-bottom: var(--alea-space-2); }\n.alea-empty-art > img, .alea-empty-art > svg { display: block; width: auto; max-width: min(240px, 100%); height: auto; max-height: 160px; }\n.alea-empty[data-variant='dashed'] { border: 1px dashed var(--alea-border-control); border-radius: var(--alea-radius-lg); }\n.alea-empty[data-size='sm'] { gap: var(--alea-space-1); padding: var(--alea-space-6) var(--alea-space-4); }\n.alea-empty[data-size='sm'] .alea-empty-icon { width: 40px; height: 40px; border-radius: var(--alea-radius-lg); }\n.alea-empty[data-size='sm'] .alea-empty-icon svg { width: 20px; height: 20px; }\n.alea-empty[data-size='sm'] .alea-empty-title { font: var(--alea-font-weight-semibold) var(--alea-font-size-md) / 1.4 var(--alea-font-family-body); letter-spacing: 0; }\n.alea-empty[data-size='sm'] .alea-empty-text { font-size: var(--alea-font-size-sm); }\n.alea-empty[data-size='lg'] { padding: var(--alea-space-16) var(--alea-space-6); }\n.alea-empty[data-size='lg'] .alea-empty-icon { width: 72px; height: 72px; border-radius: var(--alea-radius-3xl); }\n.alea-empty[data-size='lg'] .alea-empty-icon svg { width: 36px; height: 36px; }\n.alea-empty[data-size='lg'] .alea-empty-title { font-size: var(--alea-font-size-3xl); }\n.alea-result .alea-empty-icon { width: 72px; height: 72px; border-radius: 50%; }\n.alea-result .alea-empty-icon svg { width: 36px; height: 36px; }\n.alea-result[data-status='success'] .alea-empty-icon { background: var(--alea-status-success-bg); color: var(--alea-icon-success); }\n.alea-result[data-status='error'] .alea-empty-icon { background: var(--alea-status-danger-bg); color: var(--alea-icon-danger); }\n.alea-result[data-status='404'] .alea-empty-icon, .alea-result[data-status='403'] .alea-empty-icon, .alea-result[data-status='500'] .alea-empty-icon { background: var(--alea-accent-subtle); color: var(--alea-icon-accent); }\n.alea-result .alea-empty-title { font-size: var(--alea-font-size-3xl); }\n"}],"deps":[],"npm":["lucide-react"],"exports":["Descriptions","Statistic","EmptyState","Result"],"descriptions":{"Descriptions":"Key and value pairs: order details, profile facts, settings summaries. A title with an action, one to four columns, item spans, stacked or inline, two sizes.","Statistic":"A big number with its label and change.","EmptyState":"What to show when there is nothing yet, and what to do about it: three sizes, a dashed look, an illustration, two actions and a footer.","Result":"The outcome of a flow or a whole page: done, failed, not found, no access."}},"date":{"files":[{"path":"components/date/Date.tsx","content":"import type { ReactNode } from 'react';\nimport {\n Calendar as RACCalendar, RangeCalendar as RACRangeCalendar, CalendarMonthPicker, CalendarYearPicker, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell, Heading as RACHeading, Button as RACButton,\n DatePicker as RACDatePicker, DateRangePicker as RACDateRangePicker, DateField as RACDateField, DateInput, DateSegment, TimeField as RACTimeField, Group, Dialog,\n type CalendarProps as RACCalendarProps, type RangeCalendarProps as RACRangeCalendarProps, type DatePickerProps as RACDatePickerProps, type DateRangePickerProps as RACDateRangePickerProps,\n type DateFieldProps as RACDateFieldProps, type TimeFieldProps as RACTimeFieldProps, type DateValue, type TimeValue, type ValidationResult,\n} from 'react-aria-components';\nimport type { MotionProp } from '@alea-design/motion';\nimport { ChevronLeft, ChevronRight, CalendarDays } from 'lucide-react';\nimport { withBase } from '../../utils/cx';\nimport { Label, Description, FieldError } from '../field/Field';\nimport { Popover } from '../overlay/Overlay';\nimport { FieldSpinner, loadingAttrs } from '../field/FieldLoading';\nimport { useStrings } from '../../i18n/strings';\n\nfunction CalendarTop({ pickers }: { pickers?: boolean }) {\n return (\n <header className=\"alea-cal-head\">\n <RACButton slot=\"previous\" className=\"alea-cal-nav alea-focus-ring\"><ChevronLeft size={16} /></RACButton>\n {pickers ? (\n <div className=\"alea-cal-pickers\">\n <CalendarMonthPicker>{p => <select className=\"alea-cal-select alea-focus-ring\" aria-label={p['aria-label']} value={String(p.value)} onChange={e => p.onChange(Number(e.target.value))}>{p.items.map(i => <option key={i.id} value={i.id}>{i.formatted}</option>)}</select>}</CalendarMonthPicker>\n <CalendarYearPicker>{p => <select className=\"alea-cal-select alea-focus-ring\" aria-label={p['aria-label']} value={String(p.value)} onChange={e => p.onChange(Number(e.target.value))}>{p.items.map(i => <option key={i.id} value={i.id}>{i.formatted}</option>)}</select>}</CalendarYearPicker>\n </div>\n ) : <RACHeading className=\"alea-cal-title\" />}\n <RACButton slot=\"next\" className=\"alea-cal-nav alea-focus-ring\"><ChevronRight size={16} /></RACButton>\n </header>\n );\n}\nfunction Grid({ offset = 0 }: { offset?: number }) {\n return (\n <CalendarGrid className=\"alea-cal-grid\" weekdayStyle=\"short\" offset={offset ? { months: offset } : undefined}>\n <CalendarGridHeader>{day => <CalendarHeaderCell className=\"alea-cal-weekday\">{day}</CalendarHeaderCell>}</CalendarGridHeader>\n <CalendarGridBody>{date => <CalendarCell date={date} className=\"alea-cal-cell alea-focus-ring\" />}</CalendarGridBody>\n </CalendarGrid>\n );\n}\nconst Months = ({ count }: { count: number }) => count > 1 ? <div className=\"alea-cal-months\">{Array.from({ length: count }, (_, i) => <Grid key={i} offset={i} />)}</div> : <Grid />;\n\ninterface CalendarExtras {\n /** Month and year dropdowns in the header, to jump far (birthdays, contracts). */\n pickers?: boolean;\n /** How many months show side by side. Default 1; 2 is common for ranges. They stack on narrow screens. */\n visibleMonths?: number;\n}\n\nexport interface CalendarProps<T extends DateValue> extends RACCalendarProps<T>, CalendarExtras {}\n/** A month to pick a date from: month and year dropdowns, several months side by side. Arrow keys move by day, Page Up/Down by month. */\nexport function Calendar<T extends DateValue>({ className, pickers, visibleMonths = 1, ...props }: CalendarProps<T>) {\n return <RACCalendar {...props} visibleDuration={visibleMonths > 1 ? { months: visibleMonths } : props.visibleDuration} className={withBase('alea-calendar', className as any)} data-months={visibleMonths > 1 ? visibleMonths : undefined}><CalendarTop pickers={pickers} /><Months count={visibleMonths} /></RACCalendar>;\n}\n\nexport interface RangeCalendarProps<T extends DateValue> extends RACRangeCalendarProps<T>, CalendarExtras {}\n/** Months to pick a start and end date from. */\nexport function RangeCalendar<T extends DateValue>({ className, pickers, visibleMonths = 1, ...props }: RangeCalendarProps<T>) {\n return <RACRangeCalendar {...props} visibleDuration={visibleMonths > 1 ? { months: visibleMonths } : props.visibleDuration} className={withBase('alea-calendar alea-range-calendar', className as any)} data-months={visibleMonths > 1 ? visibleMonths : undefined}><CalendarTop pickers={pickers} /><Months count={visibleMonths} /></RACRangeCalendar>;\n}\n\ninterface Bits {\n /** The visible label. */\n label?: ReactNode;\n /** Help text under the field. */\n description?: ReactNode;\n /** Error text, shown when invalid. */\n errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);\n /** Shows a spinner at the end of the value while it is saved or checked (a date being validated against a calendar, say). It takes no room, the field stays editable, and screen readers hear it as busy. */\n isLoading?: boolean;\n}\nfunction Head({ label, isRequired }: { label?: ReactNode; isRequired?: boolean }) {\n return label ? <Label>{label}{isRequired && <span className=\"alea-label-required\" aria-hidden=\"true\"> *</span>}</Label> : null;\n}\nfunction Foot({ description, errorMessage }: Bits) {\n return <>{description && <Description>{description}</Description>}<FieldError>{errorMessage}</FieldError></>;\n}\nfunction Segments() {\n return <DateInput className=\"alea-date-input\">{segment => <DateSegment segment={segment} className=\"alea-date-segment\" />}</DateInput>;\n}\n\nexport interface DateFieldProps<T extends DateValue> extends RACDateFieldProps<T>, Bits {}\n/** Type a date segment by segment, in the person's locale format. */\nexport function DateField<T extends DateValue>({ label, description, errorMessage, isLoading, className, ...props }: DateFieldProps<T>) {\n return <RACDateField {...props} className={withBase('alea-field', className as any)} {...loadingAttrs(isLoading)}><Head label={label} isRequired={props.isRequired} /><div className=\"alea-input-wrap alea-date-wrap\" aria-busy={isLoading || undefined}><Segments />{isLoading && <FieldSpinner />}</div><Foot description={description} errorMessage={errorMessage} /></RACDateField>;\n}\n\nexport interface TimeFieldProps<T extends TimeValue> extends RACTimeFieldProps<T>, Bits {}\n/** Type a time; 12 or 24 hours from the locale (hourCycle to force one). */\nexport function TimeField<T extends TimeValue>({ label, description, errorMessage, isLoading, className, ...props }: TimeFieldProps<T>) {\n return <RACTimeField {...props} className={withBase('alea-field', className as any)} {...loadingAttrs(isLoading)}><Head label={label} isRequired={props.isRequired} /><div className=\"alea-input-wrap alea-date-wrap\" aria-busy={isLoading || undefined}><Segments />{isLoading && <FieldSpinner />}</div><Foot description={description} errorMessage={errorMessage} /></RACTimeField>;\n}\n\nexport interface DatePickerProps<T extends DateValue> extends RACDatePickerProps<T>, Bits {\n /** How the popup enters and leaves: a preset (fade, scale, pop, slide-down, blur...), false for none, or options. */\n motion?: MotionProp;\n}\n/** Type a date or pick it from a calendar. */\nexport function DatePicker<T extends DateValue>({ motion, label, description, errorMessage, isLoading, className, ...props }: DatePickerProps<T>) {\n const t = useStrings();\n return (\n <RACDatePicker {...props} className={withBase('alea-field', className as any)} {...loadingAttrs(isLoading)}>\n <Head label={label} isRequired={props.isRequired} />\n <Group className=\"alea-input-wrap alea-date-wrap\" aria-busy={isLoading || undefined}><Segments />{isLoading && <FieldSpinner />}<RACButton className=\"alea-input-clear alea-focus-ring\" aria-label={t.openCalendar}><CalendarDays size={16} /></RACButton></Group>\n <Foot description={description} errorMessage={errorMessage} />\n <Popover className=\"alea-popover alea-cal-popover\" placement=\"bottom start\" motion={motion}><Dialog className=\"alea-cal-dialog\"><Calendar /></Dialog></Popover>\n </RACDatePicker>\n );\n}\n\nexport interface DateRangePickerProps<T extends DateValue> extends RACDateRangePickerProps<T>, Bits {\n /** How the popup enters and leaves: a preset (fade, scale, pop, slide-down, blur...), false for none, or options. */\n motion?: MotionProp;\n}\n/** Type or pick a start and end date. */\nexport function DateRangePicker<T extends DateValue>({ motion, label, description, errorMessage, isLoading, className, ...props }: DateRangePickerProps<T>) {\n const t = useStrings();\n return (\n <RACDateRangePicker {...props} className={withBase('alea-field', className as any)} {...loadingAttrs(isLoading)}>\n <Head label={label} isRequired={props.isRequired} />\n <Group className=\"alea-input-wrap alea-date-wrap\" aria-busy={isLoading || undefined}>\n <DateInput slot=\"start\" className=\"alea-date-input\">{s => <DateSegment segment={s} className=\"alea-date-segment\" />}</DateInput>\n <span className=\"alea-date-dash\" aria-hidden=\"true\">to</span>\n <DateInput slot=\"end\" className=\"alea-date-input\">{s => <DateSegment segment={s} className=\"alea-date-segment\" />}</DateInput>\n {isLoading && <FieldSpinner />}\n <RACButton className=\"alea-input-clear alea-focus-ring\" aria-label={t.openCalendar}><CalendarDays size={16} /></RACButton>\n </Group>\n <Foot description={description} errorMessage={errorMessage} />\n <Popover className=\"alea-popover alea-cal-popover\" placement=\"bottom start\" motion={motion}><Dialog className=\"alea-cal-dialog\"><RangeCalendar /></Dialog></Popover>\n </RACDateRangePicker>\n );\n}\n"},{"path":"components/date/date.css","content":".alea-calendar { display: inline-flex; flex-direction: column; gap: var(--alea-space-2); padding: var(--alea-space-2); color: var(--alea-text); }\n.alea-cal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--alea-space-2); }\n.alea-cal-title { margin: 0; font: var(--alea-font-weight-semibold) var(--alea-font-size-md) / 1 var(--alea-font-family-body); }\n.alea-cal-nav { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--alea-radius-full); background: transparent; color: var(--alea-text-muted); cursor: pointer; }\n.alea-cal-nav[data-hovered] { background: var(--alea-surface-hover); color: var(--alea-text); }\n.alea-cal-nav[data-disabled] { opacity: 0.35; }\n.alea-cal-grid { border-collapse: collapse; }\n.alea-cal-grid td { padding: var(--alea-space-0-25); }\n.alea-cal-weekday { width: 40px; padding-bottom: var(--alea-space-2); font: var(--alea-font-weight-medium) var(--alea-font-size-xs) / 1 var(--alea-font-family-body); color: var(--alea-text-muted); }\n.alea-cal-cell {\n display: grid; place-items: center; width: 36px; height: 36px;\n border-radius: var(--alea-radius-full);\n font: var(--alea-font-weight-regular) var(--alea-font-size-md) / 1 var(--alea-font-family-body); font-variant-numeric: tabular-nums;\n cursor: pointer; outline: none;\n transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard);\n}\n.alea-cal-cell[data-outside-month] { display: none; }\n.alea-cal-cell[data-hovered] { background: var(--alea-surface-hover); }\n.alea-cal-cell[data-today] { box-shadow: inset 0 0 0 1px var(--alea-border-control); }\n.alea-cal-cell[data-selected] { background: var(--alea-chip-bg); color: var(--alea-chip-text); font-weight: var(--alea-font-weight-semibold); }\n.alea-range-calendar .alea-cal-cell[data-selected] { border-radius: 0; background: var(--alea-accent-subtle); color: var(--alea-text); font-weight: var(--alea-font-weight-regular); }\n.alea-range-calendar .alea-cal-cell[data-selection-start], .alea-range-calendar .alea-cal-cell[data-selection-end] { background: var(--alea-chip-bg); color: var(--alea-chip-text); font-weight: var(--alea-font-weight-semibold); }\n.alea-range-calendar .alea-cal-cell[data-selection-start] { border-radius: var(--alea-radius-full) 0 0 var(--alea-radius-full); }\n.alea-range-calendar .alea-cal-cell[data-selection-end] { border-radius: 0 var(--alea-radius-full) var(--alea-radius-full) 0; }\n.alea-range-calendar .alea-cal-cell[data-selection-start][data-selection-end] { border-radius: var(--alea-radius-full); }\n.alea-cal-cell[data-disabled], .alea-cal-cell[data-unavailable] { color: var(--alea-text-faint); text-decoration: line-through; cursor: not-allowed; }\n.alea-cal-cell[data-focus-visible] { box-shadow: 0 0 0 2px var(--alea-focus); }\n.alea-cal-popover { padding: var(--alea-space-2); min-width: 0; }\n.alea-cal-dialog { outline: none; }\n\n.alea-date-wrap { gap: var(--alea-space-0-5); padding-left: var(--alea-space-4); }\n.alea-date-input { display: flex; align-items: center; flex: 1; min-width: 0; font: var(--alea-font-weight-regular) var(--alea-font-size-base) / 1 var(--alea-font-family-body); font-variant-numeric: tabular-nums; }\n.alea-date-segment { display: inline-block; min-width: 24px; min-height: 24px; padding: var(--alea-space-0-5) var(--alea-space-0-5); line-height: 20px; text-align: center; border-radius: var(--alea-radius-xs); outline: none; caret-color: transparent; }\n.alea-date-segment[data-type='dayPeriod'], .alea-date-segment[data-type='year'] { min-width: 0; }\n.alea-date-segment[data-type='literal'] { color: var(--alea-text-faint); padding: 0; min-width: 0; }\n.alea-date-segment[data-placeholder] { color: var(--alea-text-faint); }\n.alea-date-segment[data-focused] { background: var(--alea-accent); color: var(--alea-accent-on); }\n.alea-date-dash { padding: 0 var(--alea-space-2); color: var(--alea-text-faint); font-size: var(--alea-font-size-sm); }\n\n/* month and year dropdowns, several months */\n.alea-cal-pickers { display: flex; gap: var(--alea-space-2); }\n.alea-cal-select { height: 32px; padding: 0 var(--alea-space-7) 0 var(--alea-space-3); border: 0; border-radius: var(--alea-radius-sm); background: var(--alea-surface-raised) url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E\") no-repeat right 8px center; color: var(--alea-text); font: var(--alea-font-weight-semibold) var(--alea-font-size-sm) / 1 var(--alea-font-family-body); appearance: none; cursor: pointer; box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-cal-select:hover { box-shadow: inset 0 0 0 1px var(--alea-border-strong); }\n.alea-cal-months { display: flex; flex-wrap: wrap; gap: var(--alea-space-6); }\n.alea-cal-months > .alea-cal-grid { flex: none; width: auto; }\n.alea-calendar[data-months] { width: fit-content; max-width: 100%; }\n.alea-calendar:not([data-months]) { width: min(320px, 100%); }\n"}],"deps":["field","overlay"],"npm":["react-aria-components","lucide-react","@alea-design/motion"],"exports":["Calendar","RangeCalendar","DateField","TimeField","DatePicker","DateRangePicker"],"descriptions":{"Calendar":"A month to pick a date from: month and year dropdowns, several months side by side. Arrow keys move by day, Page Up/Down by month.","RangeCalendar":"Months to pick a start and end date from.","DateField":"Type a date segment by segment, in the person's locale format.","TimeField":"Type a time; 12 or 24 hours from the locale (hourCycle to force one).","DatePicker":"Type a date or pick it from a calendar.","DateRangePicker":"Type or pick a start and end date."}},"display":{"files":[{"path":"components/display/Display.tsx","content":"import { createContext, useContext, useEffect, useRef, useState, type HTMLAttributes, type ReactNode } from 'react';\nimport { TagGroup as RACTagGroup, TagList, Tag as RACTag, Button as RACButton, Label, type TagGroupProps as RACTagGroupProps, type TagProps as RACTagProps, type Key } from 'react-aria-components';\nimport { X, ChevronLeft, ChevronRight } from 'lucide-react';\nimport { useScrollEdges } from '../../utils/scrollEdges';\nimport { cx, withBase } from '../../utils/cx';\nimport { chipIcon } from '../icon/icon-contexts';\nimport { useStrings } from '../../i18n/strings';\n\nexport type Tone = 'neutral' | 'accent' | 'success' | 'warning' | 'danger' | 'info';\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n /** neutral, accent, success, warning, danger or info. */\n tone?: Tone;\n /** soft (tinted, default), solid, or outline. */\n appearance?: 'soft' | 'solid' | 'outline';\n /** A dot before the text, for statuses. pulse makes it breathe, for live things. */\n dot?: boolean | 'pulse';\n /** An icon before the text. */\n icon?: ReactNode;\n /** sm 20 px, md 24 px (default) or lg 28 px. */\n size?: 'sm' | 'md' | 'lg';\n /** pill (default) or rounded (6 px corners). */\n shape?: 'pill' | 'rounded';\n children?: ReactNode;\n}\n\n/** A small status or count label: six tones, three looks, three sizes, a dot or an icon. Not interactive. */\nexport function Badge({ tone = 'neutral', appearance = 'soft', dot, icon, size = 'md', shape, className, children, ...props }: BadgeProps) {\n return (\n <span {...props} className={cx('alea-badge', className)} data-tone={tone} data-appearance={appearance} data-size={size} data-shape={shape}>\n {dot && <span className=\"alea-badge-dot\" data-pulse={dot === 'pulse' || undefined} aria-hidden=\"true\" />}\n {icon && <span className=\"alea-badge-icon\" aria-hidden=\"true\" {...chipIcon('badge', appearance, tone)}>{icon}</span>}\n {children}\n </span>\n );\n}\n\n// ---------------------------------------------------------------- status badge\n/** The tone for common status words (lowercase). Extend or override it with StatusBadge's tones. */\nexport const STATUS_TONES: Record<string, Tone> = Object.fromEntries([\n ...['published', 'paid', 'active', 'done', 'complete', 'completed', 'live', 'delivered', 'fulfilled', 'shipped', 'healthy', 'operational', 'online', 'approved', 'resolved', 'in stock', 'connected', 'verified', 'enabled', 'succeeded', 'ready'].map(w => [w, 'success']),\n ...['draft', 'pending', 'scheduled', 'review', 'in review', 'processing', 'trial', 'low stock', 'degraded', 'on hold', 'unfulfilled', 'due', 'monitoring', 'in progress', 'queued', 'building', 'partially paid', 'investigating'].map(w => [w, 'warning']),\n ...['failed', 'error', 'canceled', 'cancelled', 'refunded', 'out of stock', 'down', 'blocked', 'overdue', 'rejected', 'expired', 'firing', 'rolled back', 'disconnected'].map(w => [w, 'danger']),\n ...['open', 'todo', 'new', 'running', 'invited'].map(w => [w, 'info']),\n] as Array<[string, Tone]>);\n\nexport interface StatusBadgeProps extends Omit<BadgeProps, 'tone' | 'children'> {\n /** The status as people read it: \"Paid\", \"In review\". */\n status: string;\n /** Your own words and their tones, merged over STATUS_TONES (keys in lowercase): { 'awaiting stock': 'warning' }. */\n tones?: Record<string, Tone>;\n /** Force a tone instead of looking it up. */\n tone?: Tone;\n}\n\n/** A status in its tone: Published and Paid in green, Draft and Pending in amber, Failed and Overdue in red, anything unknown neutral. The word always shows, so color is never the only cue. */\nexport function StatusBadge({ status, tones, tone, size = 'sm', dot = true, ...props }: StatusBadgeProps) {\n const key = status.trim().toLowerCase();\n const t = tone ?? tones?.[key] ?? STATUS_TONES[key] ?? 'neutral';\n return <Badge {...props} size={size} dot={dot} tone={t}>{status}</Badge>;\n}\n\nexport interface CountBadgeProps extends HTMLAttributes<HTMLSpanElement> {\n /** The number to show. */\n count: number;\n /** Shows max+ above this. Default 99. */\n max?: number;\n /** Name for screen readers, e.g. \"unread messages\". */\n label?: string;\n /** Color of the bubble. Default accent. */\n tone?: Tone;\n /** Shows 0 instead of hiding the bubble. */\n showZero?: boolean;\n /** Only a dot, without the number (screen readers still hear the count). */\n dot?: boolean;\n /** sm (16 px) or md (20 px, default). */\n size?: 'sm' | 'md';\n}\n\n/** A number bubble for notifications. Hidden at zero unless showZero. */\nexport function CountBadge({ count, max = 99, label, tone = 'accent', showZero, dot, size, className, ...props }: CountBadgeProps) {\n // The number pops when it changes (the badge pattern), not on the first render\n const first = useRef(true);\n useEffect(() => { first.current = false; }, []);\n if (count <= 0 && !showZero) return null;\n return <span {...props} className={cx('alea-count', className)} data-tone={tone} data-dot={dot || undefined} data-size={size} role={label || dot ? 'img' : undefined} aria-label={label || dot ? `${count}${label ? ` ${label}` : ''}` : undefined}>{!dot && <span key={count} className={first.current ? undefined : 'alea-badge-pop'} aria-hidden={label ? true : undefined}>{count > max ? `${max}+` : count}</span>}</span>;\n}\n\n/** True once the group has mounted: a tag that renders after that was added by the user, so only it pops in. */\nconst TagGroupMounted = createContext<{ current: boolean }>({ current: false });\n\nexport interface TagGroupProps<T extends object> extends Omit<RACTagGroupProps, 'children'> {\n /** The visible label for the group. */\n label?: ReactNode;\n /** The tags as data, rendered with the children function. */\n items?: Iterable<T>;\n children: ReactNode | ((item: T) => ReactNode);\n /** Called with the removed keys; shows an x on each tag. */\n onRemove?: (keys: Set<Key>) => void;\n /** Shown when there are no tags. */\n renderEmptyState?: () => ReactNode;\n /** wrap (default): tags flow onto more lines. scroll: one line that scrolls sideways, with arrows for the pointer, for filter chips above a list. */\n overflow?: 'wrap' | 'scroll';\n}\n\n/** Tags that can be selected (filters) or removed (chosen values). Arrow keys move, Delete removes. */\nexport function TagGroup<T extends object>({ label, items, children, renderEmptyState, overflow = 'wrap', className, ...props }: TagGroupProps<T>) {\n const box = useRef<HTMLDivElement>(null);\n const mounted = useRef(false);\n useEffect(() => { mounted.current = true; return () => { mounted.current = false; }; }, []);\n const { edges, scroll } = useScrollEdges(box, '.alea-tag-list', overflow === 'scroll');\n return (\n <TagGroupMounted.Provider value={mounted}>\n <RACTagGroup {...props} ref={box} data-overflow={overflow} data-overflow-start={edges.start || undefined} data-overflow-end={edges.end || undefined} className={cx('alea-tag-group', className as string)}>\n {label && <Label className=\"alea-label\">{label}</Label>}\n <div className=\"alea-tag-scroller\">\n {/* the arrows are for the pointer; keyboard users move with the arrow keys and tags scroll into view */}\n {edges.start && <button type=\"button\" tabIndex={-1} aria-hidden=\"true\" className=\"alea-tab-scroll\" data-side=\"start\" onClick={() => scroll(-1)}><ChevronLeft size={16} /></button>}\n <TagList items={items} renderEmptyState={renderEmptyState} className=\"alea-tag-list\">{children as any}</TagList>\n {edges.end && <button type=\"button\" tabIndex={-1} aria-hidden=\"true\" className=\"alea-tab-scroll\" data-side=\"end\" onClick={() => scroll(1)}><ChevronRight size={16} /></button>}\n </div>\n </RACTagGroup>\n </TagGroupMounted.Provider>\n );\n}\n\nexport interface TagProps extends RACTagProps {\n /** Color of the tag: neutral (default), accent, success, warning, danger or info. */\n tone?: Tone;\n /** outline (default), soft (tinted) or solid. */\n appearance?: 'outline' | 'soft' | 'solid';\n /** sm (24 px), md (32 px, default) or lg (40 px). */\n size?: 'sm' | 'md' | 'lg';\n /** An icon or a small avatar before the text. */\n icon?: ReactNode;\n}\n\n/** One tag in a TagGroup. */\nexport function Tag({ tone = 'neutral', appearance, size, icon, children, className, ...props }: TagProps) {\n const t = useStrings();\n const textValue = props.textValue ?? (typeof children === 'string' ? children : undefined);\n const group = useContext(TagGroupMounted);\n const added = useRef(group.current).current; // decided on the first render: tags present at mount do not pop\n return (\n <RACTag {...props} textValue={textValue} data-added={added || undefined} data-tone={tone} data-appearance={appearance} data-size={size} className={withBase('alea-tag alea-focus-ring', className as any)}>\n {(state) => (\n <>\n {icon && <span className=\"alea-tag-icon\" aria-hidden=\"true\" {...chipIcon('tag', appearance, tone, state.isSelected)}>{icon}</span>}\n {typeof children === 'function' ? children(state) : children}\n {state.allowsRemoving && <RACButton slot=\"remove\" className=\"alea-tag-remove\" aria-label={t.remove}><X size={12} /></RACButton>}\n </>\n )}\n </RACTag>\n );\n}\n\nexport interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {\n /** Image URL. Falls back to initials when missing or broken. */\n src?: string;\n /** The person's name: alt text and initials. */\n name: string;\n /** xs 24, sm 32, md 40 (default), lg 56, xl 80, 2xl 96 px. */\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n /** A status dot in the corner. */\n status?: 'online' | 'away' | 'busy' | 'offline';\n /** circle (default) or square. */\n shape?: 'circle' | 'square';\n /** What shows without a photo instead of initials: an icon, a logo. */\n fallback?: ReactNode;\n /** A ring around the avatar, in the accent or a tone (for the current user, or a story). */\n ring?: boolean | Tone;\n /** A count in the top corner (unread messages). */\n count?: number;\n}\n\nfunction initials(name: string) {\n const parts = name.trim().split(/\\s+/).filter(Boolean);\n return ((parts[0]?.[0] || '') + (parts.length > 1 ? parts[parts.length - 1][0] : '')).toUpperCase() || '?';\n}\n// Same name, same gradient angle: a stable color per person\n\n/** A person: photo, or initials on a gradient. */\nexport function Avatar({ src, name, size = 'md', status, shape = 'circle', fallback, ring, count, className, style, ...props }: AvatarProps) {\n const [broken, setBroken] = useState(false);\n const showImg = src && !broken;\n return (\n <span {...props} className={cx('alea-avatar', className)} data-size={size} data-shape={shape} data-ring={ring === true ? 'accent' : ring || undefined} role=\"img\" aria-label={name + (status ? ` (${status})` : '') + (count ? `, ${count}` : '')} style={style}>\n {showImg ? <img src={src} alt=\"\" onError={() => setBroken(true)} /> : fallback ? <span className=\"alea-avatar-fallback\" aria-hidden=\"true\">{fallback}</span> : <span className=\"alea-avatar-initials\" aria-hidden=\"true\" data-initials={initials(name)} />}\n {status && <span className=\"alea-avatar-status\" data-status={status} aria-hidden=\"true\" />}\n {count ? <span className=\"alea-avatar-count\" aria-hidden=\"true\">{count > 99 ? '99+' : count}</span> : null}\n </span>\n );\n}\n\nexport interface AvatarGroupProps extends HTMLAttributes<HTMLDivElement> {\n /** Shows this many, then +N. Default 4. */\n max?: number;\n /** Size of every avatar. */\n size?: AvatarProps['size'];\n /** The people: name, and src for a photo. */\n people: Array<{ name: string; src?: string }>;\n /** The avatars spread apart on hover or focus (the fan pattern). */\n fan?: boolean;\n /** How much the avatars overlap: tight, normal (default) or none (side by side). */\n spacing?: 'tight' | 'normal' | 'none';\n}\n\n/** Overlapping avatars with a +N for the rest. */\nexport function AvatarGroup({ people, max = 4, size = 'md', fan, spacing, className, ...props }: AvatarGroupProps) {\n const t = useStrings();\n const shown = people.slice(0, max), rest = people.length - shown.length;\n return (\n <div {...props} className={cx('alea-avatar-group', className)} data-fan={fan || undefined} data-spacing={spacing} role=\"group\" aria-label={t.people(people.length)}>\n {shown.map(p => <Avatar key={p.name} name={p.name} src={p.src} size={size} />)}\n {rest > 0 && <span className=\"alea-avatar alea-avatar-more\" data-size={size} role=\"img\" aria-label={t.andMore(rest)}><span aria-hidden=\"true\">+{rest}</span></span>}\n </div>\n );\n}\n"},{"path":"components/display/Display2.tsx","content":"import type { ReactNode } from 'react';\nimport { ArrowDownLeft, ArrowUpRight, Snowflake } from 'lucide-react';\nimport { cx } from '../../utils/cx';\nimport { useLocale, Link as RACLink } from 'react-aria-components';\nimport { useStrings } from '../../i18n/strings';\n\ntype Tone = 'accent' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';\n\n// ---------------------------------------------------------------- icon tile\nexport interface IconTileProps {\n /** The icon (a Lucide icon or any 24 px SVG). Decorative: say what it means in the text next to it. */\n icon: ReactNode;\n /** The color. Default accent. */\n tone?: Tone;\n /** soft (a tinted square, default), solid (filled, for a brand mark) or gradient (the accent gradient, for a product's logo mark). */\n variant?: 'soft' | 'solid' | 'gradient';\n /** xs (20 px, beside a name in a menu), sm (28 px, a logo in a navbar), md (40 px, default) or lg (48 px). */\n size?: 'xs' | 'sm' | 'md' | 'lg';\n /** Square with rounded corners (default) or a circle. */\n shape?: 'square' | 'circle';\n className?: string;\n}\n\n/** An icon in a tinted square: the face of a feature card, a collection, an integration, or an app's mark. */\nexport function IconTile({ icon, tone = 'accent', variant = 'soft', size = 'md', shape = 'square', className }: IconTileProps) {\n return <span className={cx('alea-icon-tile', className)} data-tone={tone} data-variant={variant} data-size={size} data-shape={shape} aria-hidden=\"true\">{icon}</span>;\n}\n\n// ---------------------------------------------------------------- payment card\nexport interface PaymentCardProps {\n /** The name on the card. */\n holder: string;\n /** The last four digits. */\n last4: string;\n /** Physical, Virtual, Debit… shown top right. */\n kind?: string;\n /** MM/YY. */\n expiry?: string;\n /** The issuer's name, top left. */\n brand?: ReactNode;\n /** Frozen: muted, with a snowflake. */\n frozen?: boolean;\n /** The card's color. Default accent (follows the theme). */\n tone?: 'accent' | 'graphite' | 'emerald' | 'indigo' | 'sunset';\n /** Makes the card a link (to its details), named like the picture. */\n href?: string;\n className?: string;\n}\n\n/** A bank card as a picture: issuer, number ending, holder and expiry on a gradient. One image for screen readers (\"Physical card for Ana, ending 4410\"). */\nexport function PaymentCard({ holder, last4, kind, expiry, brand, frozen, tone = 'accent', href, className }: PaymentCardProps) {\n const t = useStrings();\n const label = t.paymentCard(kind, holder, last4, !!frozen);\n if (!href) {\n // a picture of a card: one name for the whole thing, the face is decoration\n return (\n <div className={cx('alea-payment-card', className)} data-tone={tone} data-frozen={frozen || undefined} role=\"img\" aria-label={label}>\n <span className=\"alea-payment-card-top\" aria-hidden=\"true\"><span className=\"alea-payment-card-brand\">{brand}</span><span className=\"alea-payment-card-kind\">{frozen ? <Snowflake size={16} /> : kind}</span></span>\n <span className=\"alea-payment-card-number\" aria-hidden=\"true\">•••• •••• •••• {last4}</span>\n <span className=\"alea-payment-card-bottom\" aria-hidden=\"true\"><span>{holder}</span>{expiry && <span>{expiry}</span>}</span>\n </div>\n );\n }\n // a link: its name is its visible text read in order (WCAG 2.5.3, label in name), with the dots silent and a few\n // hidden words so it reads as a sentence: \"Brimfin Physical card ending 4410, Ana, 08/29\"\n const sr = t.paymentCardParts;\n return (\n <RACLink className={cx('alea-payment-card alea-focus-ring', className)} data-tone={tone} data-frozen={frozen || undefined} href={href}>\n <span className=\"alea-payment-card-top\"><span className=\"alea-payment-card-brand\">{brand}</span><span className=\"alea-payment-card-kind\">{frozen ? <><Snowflake size={16} aria-hidden=\"true\" /><span className=\"alea-visually-hidden\">{sr.frozen}</span></> : kind}<span className=\"alea-visually-hidden\"> {sr.card}</span></span></span>\n <span className=\"alea-payment-card-number\"><span aria-hidden=\"true\">•••• •••• •••• </span><span className=\"alea-visually-hidden\">{sr.ending} </span>{last4}</span>\n <span className=\"alea-payment-card-bottom\"><span><span className=\"alea-visually-hidden\">, </span>{holder}</span>{expiry && <span><span className=\"alea-visually-hidden\">, </span>{expiry}</span>}</span>\n </RACLink>\n );\n}\n\n// ---------------------------------------------------------------- amount\nexport interface AmountProps {\n /** The amount: positive is money in, negative money out. */\n value: number;\n /** ISO currency code. Default USD. */\n currency?: string;\n /** Show the in/out arrow before it. Default false. */\n icon?: boolean;\n /** Color money in green. Default true. */\n colorIn?: boolean;\n /** Number format options (merged with the currency). */\n formatOptions?: Intl.NumberFormatOptions;\n className?: string;\n}\n\n/** Money with its direction: +$8,400.00 in green for money in, −$842.17 for money out, in the people's locale. */\nexport function Amount({ value, currency = 'USD', icon, colorIn = true, formatOptions, className }: AmountProps) {\n const { locale } = useLocale();\n const text = new Intl.NumberFormat(locale, { style: 'currency', currency, signDisplay: 'exceptZero', ...formatOptions }).format(value);\n const dir = value > 0 ? 'in' : value < 0 ? 'out' : 'zero';\n return (\n <span className={cx('alea-amount', className)} data-dir={dir} data-color={colorIn || undefined}>\n {icon && dir !== 'zero' && <span className=\"alea-amount-icon\" aria-hidden=\"true\">{dir === 'in' ? <ArrowDownLeft /> : <ArrowUpRight />}</span>}\n <span className=\"alea-amount-value\">{text}</span>\n </span>\n );\n}\n"},{"path":"components/display/display.css","content":".alea-badge {\n --tone: var(--alea-text-muted); --tone-bg: var(--alea-surface-raised);\n display: inline-flex; align-items: center; gap: var(--alea-space-2);\n height: 24px; padding: 0 var(--alea-space-3);\n border-radius: var(--alea-radius-full);\n font: var(--alea-font-weight-semibold) var(--alea-font-size-xs) / 1 var(--alea-font-family-body);\n white-space: nowrap; max-width: 100%; overflow: hidden;\n color: var(--tone); background: var(--tone-bg);\n}\n.alea-badge[data-size='sm'] { height: 20px; padding: 0 var(--alea-space-2); font-size: var(--alea-font-size-2xs); }\n.alea-badge[data-tone='accent'], .alea-count[data-tone='accent'], .alea-tag[data-tone='accent'] { --tone: var(--alea-accent-strong); --tone-bg: var(--alea-accent-subtle); --tone-solid: var(--alea-accent-solid); --tone-on: var(--alea-accent-on); }\n.alea-badge[data-tone='success'], .alea-count[data-tone='success'], .alea-tag[data-tone='success'] { --tone: var(--alea-status-success); --tone-bg: var(--alea-status-success-bg); --tone-solid: var(--alea-status-success-solid); --tone-on: var(--alea-status-success-on-solid); }\n.alea-badge[data-tone='warning'], .alea-count[data-tone='warning'], .alea-tag[data-tone='warning'] { --tone: var(--alea-status-warning); --tone-bg: var(--alea-status-warning-bg); --tone-solid: var(--alea-status-warning-solid); --tone-on: var(--alea-status-warning-on-solid); }\n.alea-badge[data-tone='danger'], .alea-count[data-tone='danger'], .alea-tag[data-tone='danger'] { --tone: var(--alea-status-danger); --tone-bg: var(--alea-status-danger-bg); --tone-solid: var(--alea-status-danger-solid); --tone-on: var(--alea-status-danger-on-solid); }\n.alea-badge[data-tone='info'], .alea-count[data-tone='info'], .alea-tag[data-tone='info'] { --tone: var(--alea-status-info); --tone-bg: var(--alea-status-info-bg); --tone-solid: var(--alea-status-info-solid); --tone-on: var(--alea-status-info-on-solid); }\n.alea-badge[data-appearance='solid'] { background: var(--tone-solid, var(--alea-chip-bg)); color: var(--tone-on, var(--alea-chip-text)); }\n.alea-badge[data-appearance='solid'][data-tone='neutral'] { color: var(--alea-chip-text); }\n.alea-badge[data-appearance='outline'] { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }\n.alea-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }\n\n.alea-count {\n display: inline-grid; place-items: center;\n min-width: 20px; height: 20px; padding: 0 var(--alea-space-2);\n border-radius: var(--alea-radius-full);\n background: var(--tone-solid, var(--alea-accent-solid)); color: var(--tone-on, var(--alea-accent-on));\n font: var(--alea-font-weight-semibold) var(--alea-font-size-2xs) / 1 var(--alea-font-family-body);\n font-variant-numeric: tabular-nums;\n}\n\n.alea-tag-group { display: flex; flex-direction: column; gap: var(--alea-space-2); }\n.alea-tag-list { display: flex; flex-wrap: wrap; gap: var(--alea-space-2); }\n.alea-tag-scroller { position: relative; min-width: 0; }\n.alea-tag-group[data-overflow='scroll'] .alea-tag-list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-block: var(--alea-space-1); scroll-padding-inline: var(--alea-space-12); }\n.alea-tag-group[data-overflow='scroll'] .alea-tag-list::-webkit-scrollbar { display: none; }\n.alea-tag-group[data-overflow='scroll'] .alea-tag { flex: none; }\n.alea-tag-group[data-overflow-end] .alea-tag-list { mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }\n.alea-tag-group[data-overflow-start] .alea-tag-list { mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }\n.alea-tag-group[data-overflow-start][data-overflow-end] .alea-tag-list { mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }\n.alea-tag {\n --tone: var(--alea-text); --tone-bg: var(--alea-surface-raised);\n display: inline-flex; align-items: center; gap: var(--alea-space-2);\n height: 32px; padding: 0 var(--alea-space-3);\n border-radius: var(--alea-radius-full);\n background: var(--tone-bg); color: var(--tone);\n box-shadow: inset 0 0 0 1px var(--alea-border);\n font: var(--alea-font-weight-medium) var(--alea-font-size-sm) / 1 var(--alea-font-family-body);\n cursor: default; outline: none;\n transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), box-shadow var(--alea-motion-duration-fast) var(--alea-motion-ease-standard);\n}\n.alea-tag[data-allows-removing] { padding-right: var(--alea-space-1); }\n.alea-tag[data-hovered] { box-shadow: inset 0 0 0 1px var(--alea-border-strong); }\n.alea-tag[data-selection-mode] { cursor: pointer; }\n.alea-tag[data-selected] { background: var(--alea-chip-bg); color: var(--alea-chip-text); box-shadow: none; }\n.alea-tag[data-disabled] { opacity: 0.45; }\n.alea-tag-remove { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; opacity: 0.7; }\n.alea-tag-remove[data-hovered] { opacity: 1; background: var(--alea-surface-hover); }\n\n.alea-avatar {\n --alea-avatar-size: 40px;\n position: relative;\n display: inline-grid; place-items: center; flex: none;\n width: var(--alea-avatar-size); height: var(--alea-avatar-size);\n border-radius: 50%;\n background: var(--alea-gradient-accent);\n color: var(--alea-accent-on);\n font: var(--alea-font-weight-semibold) calc(var(--alea-avatar-size) * 0.38) / 1 var(--alea-font-family-body);\n user-select: none;\n}\n.alea-avatar[data-shape='square'] { border-radius: 30%; }\n.alea-avatar[data-size='xs'] { --alea-avatar-size: 24px; }\n.alea-avatar[data-size='sm'] { --alea-avatar-size: 32px; }\n.alea-avatar[data-size='lg'] { --alea-avatar-size: 56px; }\n.alea-avatar[data-size='xl'] { --alea-avatar-size: 80px; }\n.alea-avatar-initials::before { content: attr(data-initials); }\n.alea-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }\n.alea-avatar-status { position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; min-width: 8px; min-height: 8px; border-radius: 50%; box-shadow: 0 0 0 2px var(--alea-bg); }\n.alea-avatar-status[data-status='online'] { background: var(--alea-presence-online); }\n.alea-avatar-status[data-status='away'] { background: var(--alea-presence-away); }\n.alea-avatar-status[data-status='busy'] { background: var(--alea-presence-busy); }\n.alea-avatar-status[data-status='offline'] { background: var(--alea-presence-offline); }\n.alea-avatar-group { display: inline-flex; align-items: center; }\n.alea-avatar-group > .alea-avatar { box-shadow: 0 0 0 2px var(--alea-bg); }\n.alea-avatar-group > .alea-avatar + .alea-avatar { margin-left: calc(var(--alea-avatar-size) * -0.28); }\n.alea-avatar-more { background: var(--alea-surface-raised); color: var(--alea-text); font-size: calc(var(--alea-avatar-size) * 0.32); }\n\n/* badge: lg, rounded, icon, pulsing dot */\n.alea-badge[data-size='lg'] { height: 28px; padding: 0 var(--alea-space-3); font-size: var(--alea-font-size-sm); }\n.alea-badge[data-shape='rounded'] { border-radius: var(--alea-radius-sm); }\n.alea-badge-icon { display: inline-flex; }\n.alea-badge-icon svg { width: 12px; height: 12px; }\n.alea-badge[data-size='lg'] .alea-badge-icon svg { width: 16px; height: 16px; }\n.alea-badge-dot[data-pulse] { box-shadow: 0 0 0 0 currentColor; animation: alea-badge-pulse 1.8s var(--alea-motion-ease-out) infinite; }\n@keyframes alea-badge-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, currentColor 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }\n@media (prefers-reduced-motion: reduce) { .alea-badge-dot[data-pulse] { animation: none; } }\n/* count: dot only and small */\n.alea-count[data-dot] { width: 12px; min-width: 12px; height: 12px; padding: 0; }\n.alea-count[data-size='sm'] { min-width: 16px; height: 16px; font-size: 10px; }\n/* a neutral count has no tone colors of its own: it takes the chip colors (it fell back to the accent) */\n.alea-count[data-tone='neutral'] { --tone-solid: var(--alea-chip-bg); --tone-on: var(--alea-chip-text); }\n/* tag looks and sizes */\n.alea-tag[data-appearance='soft'] { background: var(--tone-bg, var(--alea-surface-raised)); color: var(--tone, var(--alea-text)); box-shadow: none; }\n.alea-tag[data-appearance='solid'] { background: var(--tone-solid, var(--alea-chip-bg)); color: var(--tone-on, var(--alea-chip-text)); box-shadow: none; }\n.alea-tag[data-appearance='solid'][data-tone='neutral'] { color: var(--alea-chip-text); }\n/* a selected tag takes the chip colors in every look (the appearance rules above would hide the selection) */\n.alea-tag[data-selected]:is([data-appearance='soft'], [data-appearance='solid'], [data-tone]) { background: var(--alea-chip-bg); color: var(--alea-chip-text); box-shadow: none; }\n.alea-tag[data-size='sm'] { height: 24px; padding: 0 var(--alea-space-2); font-size: var(--alea-font-size-xs); }\n.alea-tag[data-size='lg'] { height: 40px; padding: 0 var(--alea-space-4); font-size: var(--alea-font-size-md); }\n.alea-tag-icon { display: inline-flex; margin-left: calc(var(--alea-space-0-5) * -1); }\n.alea-tag-icon svg { width: 16px; height: 16px; }\n.alea-tag-icon .alea-avatar { --alea-avatar-size: 18px; }\n/* avatar: 2xl, fallback, ring, count */\n.alea-avatar[data-size='2xl'] { --alea-avatar-size: 96px; }\n.alea-avatar-fallback { display: grid; place-items: center; width: 100%; height: 100%; }\n.alea-avatar-fallback svg { width: 50%; height: 50%; }\n.alea-avatar[data-ring] { box-shadow: 0 0 0 2px var(--alea-bg), 0 0 0 4px var(--alea-accent); }\n.alea-avatar[data-ring='success'] { box-shadow: 0 0 0 2px var(--alea-bg), 0 0 0 4px var(--alea-status-success); }\n.alea-avatar[data-ring='warning'] { box-shadow: 0 0 0 2px var(--alea-bg), 0 0 0 4px var(--alea-status-warning); }\n.alea-avatar[data-ring='danger'] { box-shadow: 0 0 0 2px var(--alea-bg), 0 0 0 4px var(--alea-status-danger); }\n.alea-avatar[data-ring='info'] { box-shadow: 0 0 0 2px var(--alea-bg), 0 0 0 4px var(--alea-status-info); }\n.alea-avatar[data-ring='neutral'] { box-shadow: 0 0 0 2px var(--alea-bg), 0 0 0 4px var(--alea-border-strong); }\n.alea-avatar-count { position: absolute; top: calc(var(--alea-space-1) * -1); right: calc(var(--alea-space-1) * -1); min-width: 20px; height: 20px; padding: 0 var(--alea-space-1); border-radius: var(--alea-radius-full); background: var(--alea-accent); color: var(--alea-accent-on); font: var(--alea-font-weight-semibold) 10px / 18px var(--alea-font-family-body); text-align: center; box-shadow: 0 0 0 2px var(--alea-bg); }\n/* avatar group spacing */\n.alea-avatar-group[data-spacing='tight'] > .alea-avatar + .alea-avatar { margin-left: calc(var(--alea-avatar-size) * -0.4); }\n.alea-avatar-group[data-spacing='none'] { gap: var(--alea-space-1); }\n.alea-avatar-group[data-spacing='none'] > .alea-avatar + .alea-avatar { margin-left: 0; }\n"},{"path":"components/display/display2.css","content":"/* IconTile */\n.alea-icon-tile { --tone: var(--alea-accent); display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: var(--alea-radius-sm); background: color-mix(in srgb, var(--tone) 16%, transparent); color: var(--tone-text, var(--alea-accent-strong, var(--alea-accent))); }\n.alea-icon-tile svg { width: 18px; height: 18px; }\n.alea-icon-tile[data-size='xs'] { width: 20px; height: 20px; border-radius: var(--alea-radius-sm); }\n.alea-icon-tile[data-size='xs'] svg { width: 12px; height: 12px; }\n.alea-icon-tile[data-size='sm'] { width: 28px; height: 28px; border-radius: var(--alea-radius-field); }\n.alea-icon-tile[data-size='sm'] svg { width: 16px; height: 16px; }\n.alea-icon-tile[data-size='lg'] { width: 48px; height: 48px; border-radius: var(--alea-radius-md); }\n.alea-icon-tile[data-size='lg'] svg { width: 24px; height: 24px; }\n.alea-icon-tile[data-shape='circle'] { border-radius: 50%; }\n.alea-icon-tile[data-tone='neutral'] { --tone: var(--alea-text); --tone-text: var(--alea-text); }\n.alea-icon-tile[data-tone='success'] { --tone: var(--alea-status-success); --tone-text: var(--alea-status-success); }\n.alea-icon-tile[data-tone='warning'] { --tone: var(--alea-status-warning); --tone-text: var(--alea-status-warning); }\n.alea-icon-tile[data-tone='danger'] { --tone: var(--alea-status-danger); --tone-text: var(--alea-status-danger); }\n.alea-icon-tile[data-tone='info'] { --tone: var(--alea-status-info); --tone-text: var(--alea-status-info); }\n.alea-icon-tile[data-variant='solid'] { background: var(--tone); color: var(--alea-accent-on); }\n.alea-icon-tile[data-variant='solid']:not([data-tone='accent']) { color: var(--alea-white); }\n.alea-icon-tile[data-variant='gradient'] { background: var(--alea-gradient-accent); color: var(--alea-accent-on); }\n\n/* PaymentCard */\n.alea-payment-card { aspect-ratio: 1.586; width: 100%; max-width: 400px; display: flex; flex-direction: column; justify-content: space-between; padding: var(--alea-space-5); border-radius: var(--alea-radius-lg); color: var(--alea-white); font-size: var(--alea-font-size-sm); box-shadow: var(--alea-shadow-card);\n background: linear-gradient(135deg, color-mix(in oklch, var(--alea-accent) 55%, #000), var(--alea-accent) 60%, color-mix(in oklch, var(--alea-accent) 55%, #fff)); }\n.alea-payment-card[data-tone='graphite'] { background: linear-gradient(135deg, #111827, #374151 60%, #6b7280); }\n.alea-payment-card[data-tone='emerald'] { background: linear-gradient(135deg, #064e3b, #047857 55%, #34d399); }\n.alea-payment-card[data-tone='indigo'] { background: linear-gradient(135deg, #1e1b4b, #4338ca 60%, #818cf8); }\n.alea-payment-card[data-tone='sunset'] { background: linear-gradient(135deg, #7c2d12, #ea580c 55%, #fbbf24); }\n.alea-payment-card[href] { text-decoration: none; transition: transform var(--alea-motion-duration-base) var(--alea-motion-ease-emphasized, ease-out), box-shadow var(--alea-motion-duration-base) var(--alea-motion-ease-standard); }\n.alea-payment-card[data-hovered] { transform: translateY(calc(var(--alea-motion-lift) * 0.5)); box-shadow: var(--alea-shadow-pop); }\n@media (prefers-reduced-motion: reduce) { .alea-payment-card[data-hovered] { transform: none; } }\n.alea-payment-card[data-frozen] { filter: saturate(0.2); opacity: 0.8; }\n.alea-payment-card-top, .alea-payment-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: var(--alea-space-2); }\n.alea-payment-card-brand { font-weight: var(--alea-font-weight-semibold); }\n.alea-payment-card-kind { font-size: var(--alea-font-size-xs); opacity: 0.85; }\n.alea-payment-card-number { font-family: var(--alea-font-family-mono); font-size: var(--alea-font-size-lg); letter-spacing: 0.08em; }\n\n/* Amount */\n.alea-amount { display: inline-flex; align-items: center; gap: var(--alea-space-2); font-variant-numeric: tabular-nums; white-space: nowrap; }\n.alea-amount[data-color][data-dir='in'] .alea-amount-value { color: var(--alea-status-success); }\n.alea-amount-icon { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--alea-surface-raised); color: var(--alea-icon-muted); }\n.alea-amount-icon svg { width: 14px; height: 14px; }\n.alea-amount[data-dir='in'] .alea-amount-icon { background: color-mix(in srgb, var(--alea-status-success) 16%, transparent); color: var(--alea-icon-success); }\n"}],"deps":["icon"],"npm":["react-aria-components","lucide-react"],"exports":["Badge","STATUS_TONES","StatusBadge","CountBadge","TagGroup","Tag","Avatar","AvatarGroup","IconTile","PaymentCard","Amount"],"descriptions":{"Badge":"A small status or count label: six tones, three looks, three sizes, a dot or an icon. Not interactive.","STATUS_TONES":"The tone for common status words (lowercase). Extend or override it with StatusBadge's tones.","StatusBadge":"A status in its tone: Published and Paid in green, Draft and Pending in amber, Failed and Overdue in red, anything unknown neutral. The word always shows, so color is never the only cue.","CountBadge":"A number bubble for notifications. Hidden at zero unless showZero.","TagGroup":"Tags that can be selected (filters) or removed (chosen values). Arrow keys move, Delete removes.","Tag":"One tag in a TagGroup.","Avatar":"A person: photo, or initials on a gradient.","AvatarGroup":"Overlapping avatars with a +N for the rest.","IconTile":"An icon in a tinted square: the face of a feature card, a collection, an integration, or an app's mark.","PaymentCard":"A bank card as a picture: issuer, number ending, holder and expiry on a gradient. One image for screen readers (\"Physical card for Ana, ending 4410\").","Amount":"Money with its direction: +$8,400.00 in green for money in, −$842.17 for money out, in the people's locale."}},"emoji":{"files":[{"path":"components/emoji/EmojiPicker.tsx","content":"import { useMemo, useRef, useState } from 'react';\nimport { ListBox as RACListBox, ListBoxItem, ListBoxSection, Header, type Key } from 'react-aria-components';\nimport { cx } from '../../utils/cx';\nimport { SearchField } from '../field/Field';\nimport { useStrings } from '../../i18n/strings';\nimport { EMOJI, EMOJI_CATEGORIES, type EmojiCategory, type EmojiEntry } from './emoji-data';\n\nconst RECENT_KEY = 'alea-emoji-recent';\nconst readRecent = (): string[] => { try { return JSON.parse(localStorage.getItem(RECENT_KEY) || '[]').slice(0, 16); } catch { return []; } };\n\nexport interface EmojiPickerProps {\n /** Called with the picked emoji and its name. */\n onSelect: (emoji: string, name: string) => void;\n /** Remembers the last picks (in this browser) and shows them first. Default true. */\n showRecent?: boolean;\n /** Columns in the grid. Default 8. */\n columns?: number;\n /** Height of the scrolling grid in px. Default 280. */\n height?: number;\n /** Puts the cursor in the search field when it opens. Default true. */\n autoFocusSearch?: boolean;\n /** Extra class names. */\n className?: string;\n}\n\n/** Pick an emoji: search by name (English or Spanish), jump by category, recent picks first. The grid is a listbox in a grid layout: arrows move in two directions, Enter picks, and every emoji has a name for screen readers. */\nexport function EmojiPicker({ onSelect, showRecent = true, columns = 8, height = 280, autoFocusSearch = true, className }: EmojiPickerProps) {\n const t = useStrings();\n const es = t.langCode === 'es';\n const [q, setQ] = useState('');\n const [recent, setRecent] = useState<string[]>(() => (showRecent ? readRecent() : []));\n const grid = useRef<HTMLDivElement>(null);\n const name = (e: EmojiEntry) => (es ? e.es : e.en);\n const byEmoji = useMemo(() => new Map(EMOJI.map(e => [e.emoji, e])), []);\n\n const sections = useMemo(() => {\n const query = q.trim().toLowerCase();\n if (query) {\n const hits = EMOJI.filter(e => e.en.includes(query) || e.es.toLowerCase().includes(query) || e.emoji === query);\n return [{ id: 'results', title: '', items: hits }];\n }\n const out: Array<{ id: string; title: string; items: EmojiEntry[] }> = [];\n const rec = recent.map(r => byEmoji.get(r)).filter(Boolean) as EmojiEntry[];\n if (showRecent && rec.length) out.push({ id: 'recent', title: t.emojiCategories.recent, items: rec.map(e => ({ ...e, category: 'recent' as EmojiCategory })) });\n for (const c of EMOJI_CATEGORIES) out.push({ id: c.id, title: t.emojiCategories[c.id], items: EMOJI.filter(e => e.category === c.id) });\n return out;\n }, [q, recent, byEmoji, showRecent, t]);\n\n const pick = (key: Key) => {\n const emoji = String(key).split(':').pop()!;\n const entry = byEmoji.get(emoji);\n onSelect(emoji, entry ? name(entry) : emoji);\n if (showRecent) {\n const next = [emoji, ...recent.filter(r => r !== emoji)].slice(0, 16);\n setRecent(next);\n try { localStorage.setItem(RECENT_KEY, JSON.stringify(next)); } catch { /* private mode */ }\n }\n };\n const jump = (id: string) => {\n setQ('');\n requestAnimationFrame(() => grid.current?.querySelector(`[data-section=\"${id}\"]`)?.scrollIntoView({ block: 'start' }));\n };\n const empty = sections.every(s => !s.items.length);\n\n return (\n <div className={cx('alea-emoji', className)} style={{ ['--alea-emoji-cols' as string]: columns }}>\n <SearchField aria-label={t.searchEmoji} placeholder={t.searchEmoji} value={q} onChange={setQ} size=\"sm\" autoFocus={autoFocusSearch} />\n {!q && (\n <div className=\"alea-emoji-cats\" role=\"group\" aria-label={t.pickEmoji}>\n {EMOJI_CATEGORIES.map(c => <button key={c.id} type=\"button\" className=\"alea-emoji-cat alea-focus-ring\" aria-label={t.emojiCategories[c.id]} title={t.emojiCategories[c.id]} onClick={() => jump(c.id)}><span aria-hidden=\"true\">{c.icon}</span></button>)}\n </div>\n )}\n <div ref={grid} className=\"alea-emoji-scroll\" style={{ height }}>\n {empty ? <p className=\"alea-emoji-empty\" role=\"status\">{t.noEmoji}</p> : (\n <RACListBox aria-label={t.pickEmoji} layout=\"grid\" selectionMode=\"none\" onAction={pick} className=\"alea-emoji-grid\">\n {sections.map(s => (\n <ListBoxSection key={s.id} id={s.id} className=\"alea-emoji-section\" data-section={s.id}>\n {s.title && <Header className=\"alea-emoji-header\">{s.title}</Header>}\n {s.items.map(e => (\n <ListBoxItem key={`${s.id}:${e.emoji}`} id={`${s.id}:${e.emoji}`} textValue={name(e)} aria-label={name(e)} className=\"alea-emoji-item\">\n <span aria-hidden=\"true\">{e.emoji}</span>\n </ListBoxItem>\n ))}\n </ListBoxSection>\n ))}\n </RACListBox>\n )}\n </div>\n </div>\n );\n}\n"},{"path":"components/emoji/emoji-data.ts","content":"// A curated emoji set: the ones people actually react and write with, by category.\n// Each entry is \"emoji|english name|spanish name\"; names are used for search and screen readers.\nexport type EmojiCategory = 'smileys' | 'people' | 'nature' | 'food' | 'activities' | 'travel' | 'objects' | 'symbols';\n\nconst RAW: Record<EmojiCategory, string> = {\n smileys: '😀|grinning face|cara sonriente;😃|big smile|sonrisa grande;😄|smile with eyes|sonrisa con ojos;😁|beaming face|cara radiante;😆|laughing|riendo;😅|sweat smile|sonrisa nerviosa;🤣|rolling on the floor laughing|muerto de risa;😂|tears of joy|lágrimas de risa;🙂|slight smile|sonrisa leve;🙃|upside down face|cara al revés;😉|wink|guiño;😊|blush|sonrojado;😇|halo|angelito;🥰|smiling with hearts|enamorado;😍|heart eyes|ojos de corazón;🤩|star struck|deslumbrado;😘|blowing a kiss|lanzando un beso;😋|yum|delicioso;😛|tongue out|lengua afuera;😜|winking tongue|guiño con lengua;🤪|zany|loco;🤗|hug|abrazo;🤭|hand over mouth|mano en la boca;🤔|thinking|pensando;🤨|raised eyebrow|ceja levantada;😐|neutral|neutral;😑|expressionless|sin expresión;😶|no mouth|sin boca;😏|smirk|sonrisa pícara;😒|unamused|aburrido;🙄|eye roll|ojos en blanco;😬|grimace|mueca;😌|relieved|aliviado;😔|pensive|pensativo;😪|sleepy|con sueño;😴|sleeping|durmiendo;😷|mask|mascarilla;🤒|thermometer|termómetro;🤯|mind blown|cabeza explotando;🥳|party face|cara de fiesta;😎|sunglasses|lentes de sol;🤓|nerd|nerd;🧐|monocle|monóculo;😕|confused|confundido;😟|worried|preocupado;😮|open mouth|boca abierta;😲|astonished|asombrado;🥺|pleading|suplicante;😢|crying|llorando;😭|sobbing|llanto;😱|scream|grito;😤|huffing|resoplando;😡|angry|enojado;🤬|cursing|insultando;💀|skull|calavera;💩|poop|caca;🤡|clown|payaso;👻|ghost|fantasma;👽|alien|extraterrestre;🤖|robot|robot',\n people: '👋|wave|saludo;🤚|raised back of hand|dorso de la mano;✋|raised hand|mano levantada;👌|ok hand|ok;🤌|pinched fingers|dedos juntos;✌️|victory|victoria;🤞|crossed fingers|dedos cruzados;🤟|love you gesture|te quiero;🤘|rock on|rock;👈|point left|señal a la izquierda;👉|point right|señal a la derecha;👆|point up|señal arriba;👇|point down|señal abajo;👍|thumbs up|pulgar arriba;👎|thumbs down|pulgar abajo;✊|raised fist|puño;👏|clap|aplauso;🙌|raised hands|manos arriba;🫶|heart hands|manos de corazón;👐|open hands|manos abiertas;🤝|handshake|apretón de manos;🙏|folded hands|manos juntas;💪|flexed biceps|bíceps;🧠|brain|cerebro;👀|eyes|ojos;👁️|eye|ojo;👶|baby|bebé;🧒|child|niño;🧑|person|persona;👩|woman|mujer;👨|man|hombre;🧓|older person|persona mayor;🧑‍💻|technologist|programador;🧑‍🎨|artist|artista;🧑‍🏫|teacher|profesor;🧑‍⚕️|health worker|médico;🧑‍🚀|astronaut|astronauta;🦸|superhero|superhéroe;🧙|mage|mago;🙋|raising hand|levantando la mano;🤷|shrug|encogerse de hombros;🤦|facepalm|mano en la cara;🙇|bowing|reverencia;💃|dancing|bailando;🏃|running|corriendo;🧘|yoga|yoga',\n nature: '🐶|dog|perro;🐱|cat|gato;🐭|mouse|ratón;🐰|rabbit|conejo;🦊|fox|zorro;🐻|bear|oso;🐼|panda|panda;🐨|koala|koala;🐯|tiger|tigre;🦁|lion|león;🐮|cow|vaca;🐷|pig|cerdo;🐸|frog|rana;🐵|monkey|mono;🐔|chicken|gallina;🐧|penguin|pingüino;🐦|bird|pájaro;🦄|unicorn|unicornio;🐝|bee|abeja;🦋|butterfly|mariposa;🐢|turtle|tortuga;🐙|octopus|pulpo;🐬|dolphin|delfín;🐳|whale|ballena;🌵|cactus|cactus;🌲|evergreen tree|pino;🌴|palm tree|palmera;🌱|seedling|brote;🌿|herb|hierba;🍀|four leaf clover|trébol;🍁|maple leaf|hoja de arce;🌸|cherry blossom|flor de cerezo;🌻|sunflower|girasol;🌹|rose|rosa;🌷|tulip|tulipán;🌞|sun with face|sol;🌙|crescent moon|luna;⭐|star|estrella;🌈|rainbow|arcoíris;☁️|cloud|nube;⚡|lightning|rayo;❄️|snowflake|copo de nieve;🔥|fire|fuego;💧|droplet|gota;🌊|wave|ola',\n food: '🍎|apple|manzana;🍊|orange|naranja;🍋|lemon|limón;🍌|banana|banana;🍉|watermelon|sandía;🍇|grapes|uvas;🍓|strawberry|fresa;🍒|cherries|cerezas;🍑|peach|durazno;🥭|mango|mango;🍍|pineapple|piña;🥑|avocado|aguacate;🍅|tomato|tomate;🌽|corn|maíz;🥕|carrot|zanahoria;🥐|croissant|cruasán;🍞|bread|pan;🧀|cheese|queso;🥚|egg|huevo;🥓|bacon|tocino;🍔|burger|hamburguesa;🍟|fries|papas fritas;🍕|pizza|pizza;🌮|taco|taco;🌯|burrito|burrito;🫓|arepa|arepa;🍣|sushi|sushi;🍜|noodles|fideos;🍝|spaghetti|espagueti;🍦|ice cream|helado;🍩|donut|dona;🍪|cookie|galleta;🎂|birthday cake|pastel de cumpleaños;🍫|chocolate|chocolate;🍿|popcorn|palomitas;☕|coffee|café;🍵|tea|té;🧃|juice box|jugo;🍺|beer|cerveza;🍷|wine|vino;🥂|cheers|brindis;🍾|champagne|champán',\n activities: '⚽|soccer|fútbol;🏀|basketball|baloncesto;🏈|football|fútbol americano;⚾|baseball|béisbol;🎾|tennis|tenis;🏐|volleyball|voleibol;🏓|ping pong|ping pong;🥊|boxing|boxeo;🏆|trophy|trofeo;🥇|gold medal|medalla de oro;🥈|silver medal|medalla de plata;🥉|bronze medal|medalla de bronce;🎯|bullseye|diana;🎮|video game|videojuego;🕹️|joystick|joystick;🎲|dice|dado;♟️|chess|ajedrez;🧩|puzzle|rompecabezas;🎨|palette|paleta;🎭|theater|teatro;🎬|clapper|claqueta;🎤|microphone|micrófono;🎧|headphones|audífonos;🎸|guitar|guitarra;🎹|piano|piano;🥁|drum|tambor;🎉|party popper|cotillón;🎊|confetti|confeti;🎈|balloon|globo;🎁|gift|regalo;🎄|christmas tree|árbol de navidad;🎃|pumpkin|calabaza',\n travel: '🚗|car|carro;🚕|taxi|taxi;🚌|bus|autobús;🚲|bicycle|bicicleta;🛴|scooter|patineta;🏍️|motorcycle|moto;🚆|train|tren;🚇|metro|metro;✈️|airplane|avión;🚀|rocket|cohete;🛸|ufo|ovni;⛵|sailboat|velero;🚢|ship|barco;⛽|fuel|gasolina;🚦|traffic light|semáforo;🗺️|map|mapa;🧭|compass|brújula;🏔️|mountain|montaña;🏖️|beach|playa;🏝️|island|isla;🏕️|camping|campamento;🏠|house|casa;🏢|office building|oficina;🏫|school|escuela;🏥|hospital|hospital;🏦|bank|banco;🏰|castle|castillo;🗽|statue of liberty|estatua de la libertad;🌉|bridge|puente;🌃|night city|ciudad de noche;🎡|ferris wheel|rueda de la fortuna',\n objects: '💻|laptop|laptop;🖥️|desktop|computadora;⌨️|keyboard|teclado;🖱️|mouse|mouse;📱|phone|teléfono;☎️|telephone|teléfono fijo;📷|camera|cámara;🎥|movie camera|cámara de cine;📺|tv|televisor;💡|light bulb|bombilla;🔦|flashlight|linterna;📚|books|libros;📖|open book|libro abierto;📝|memo|nota;✏️|pencil|lápiz;🖊️|pen|bolígrafo;📌|pushpin|chincheta;📎|paperclip|clip;✂️|scissors|tijeras;🗂️|dividers|separadores;📁|folder|carpeta;📅|calendar|calendario;📈|chart up|gráfico subiendo;📉|chart down|gráfico bajando;📊|bar chart|gráfico de barras;🔒|locked|candado;🔑|key|llave;🔨|hammer|martillo;🛠️|tools|herramientas;⚙️|gear|engranaje;🧪|test tube|tubo de ensayo;🔬|microscope|microscopio;💊|pill|pastilla;💰|money bag|bolsa de dinero;💳|credit card|tarjeta;📦|package|paquete;✉️|envelope|sobre;📮|mailbox|buzón;🔔|bell|campana;📣|megaphone|megáfono;⏰|alarm clock|despertador;⌛|hourglass|reloj de arena',\n symbols: '❤️|red heart|corazón rojo;🧡|orange heart|corazón naranja;💛|yellow heart|corazón amarillo;💚|green heart|corazón verde;💙|blue heart|corazón azul;💜|purple heart|corazón morado;🖤|black heart|corazón negro;🤍|white heart|corazón blanco;💔|broken heart|corazón roto;💯|hundred points|cien;✅|check mark|marca de verificación;☑️|check box|casilla marcada;✔️|check|visto;❌|cross mark|equis;⚠️|warning|advertencia;⛔|no entry|prohibido;🚫|prohibited|prohibido;❓|question|pregunta;❗|exclamation|exclamación;💬|speech bubble|globo de diálogo;💭|thought bubble|globo de pensamiento;🔴|red circle|círculo rojo;🟠|orange circle|círculo naranja;🟡|yellow circle|círculo amarillo;🟢|green circle|círculo verde;🔵|blue circle|círculo azul;🟣|purple circle|círculo morado;⬆️|up arrow|flecha arriba;⬇️|down arrow|flecha abajo;➡️|right arrow|flecha derecha;⬅️|left arrow|flecha izquierda;🔄|counterclockwise arrows|recargar;➕|plus|más;➖|minus|menos;✨|sparkles|destellos;⭐|star|estrella;🆕|new|nuevo;🆗|ok button|botón ok;🔝|top|arriba',\n};\n\nexport interface EmojiEntry { emoji: string; en: string; es: string; category: EmojiCategory }\n\nexport const EMOJI: EmojiEntry[] = (Object.keys(RAW) as EmojiCategory[]).flatMap(category =>\n RAW[category].split(';').map(s => { const [emoji, en, es] = s.split('|'); return { emoji, en, es, category }; }));\n\nexport const EMOJI_CATEGORIES: Array<{ id: EmojiCategory; icon: string }> = [\n { id: 'smileys', icon: '😀' }, { id: 'people', icon: '👋' }, { id: 'nature', icon: '🌿' }, { id: 'food', icon: '🍕' },\n { id: 'activities', icon: '⚽' }, { id: 'travel', icon: '✈️' }, { id: 'objects', icon: '💡' }, { id: 'symbols', icon: '❤️' },\n];\n"},{"path":"components/emoji/emoji.css","content":"/* EmojiPicker */\n.alea-emoji { display: flex; flex-direction: column; gap: var(--alea-space-2); width: calc(var(--alea-emoji-cols, 8) * 36px + 16px); max-width: 100%; }\n.alea-emoji-cats { display: flex; justify-content: space-between; gap: var(--alea-space-0-5); padding-bottom: var(--alea-space-1); border-bottom: 1px solid var(--alea-border); }\n.alea-emoji-cat { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--alea-radius-sm); background: none; font-size: 18px; cursor: pointer; filter: grayscale(0.6); opacity: 0.8; transition: filter var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), opacity var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), background var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-emoji-cat:hover { filter: none; opacity: 1; background: var(--alea-surface-hover); }\n.alea-emoji-scroll { overflow-y: auto; overscroll-behavior: contain; margin-inline: calc(var(--alea-space-1) * -1); padding-inline: var(--alea-space-1); scrollbar-width: thin; }\n.alea-emoji-grid { outline: none; }\n.alea-emoji-section { display: grid; grid-template-columns: repeat(var(--alea-emoji-cols, 8), 36px); gap: 0; scroll-margin-top: var(--alea-space-1); }\n.alea-emoji-header { grid-column: 1 / -1; position: sticky; top: 0; z-index: 1; padding: var(--alea-space-2) var(--alea-space-1) var(--alea-space-1); background: var(--alea-surface); color: var(--alea-text-muted); font: var(--alea-font-weight-semibold) var(--alea-font-size-xs) / 1.4 var(--alea-font-family-body); }\n.alea-emoji-item { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--alea-radius-sm); font-size: 22px; line-height: 1; cursor: pointer; outline: none; transition: background var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), transform var(--alea-motion-duration-fast) var(--alea-motion-ease-emphasized); }\n.alea-emoji-item[data-hovered] { background: var(--alea-surface-hover); transform: scale(calc(1 + (1 - var(--alea-motion-scale-press)) * 3)); }\n.alea-emoji-item[data-focus-visible] { box-shadow: 0 0 0 2px var(--alea-focus); background: var(--alea-surface-hover); }\n.alea-emoji-item[data-pressed] { transform: scale(calc(1 - (1 - var(--alea-motion-scale-press)) * 2)); }\n.alea-emoji-empty { margin: var(--alea-space-6) 0; text-align: center; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n.alea-emoji-popover .alea-popover-dialog { padding: var(--alea-space-3); }\n@media (pointer: coarse) { .alea-emoji-section { grid-template-columns: repeat(var(--alea-emoji-cols, 8), 44px); } .alea-emoji-item { width: 44px; height: 44px; } .alea-emoji { width: calc(var(--alea-emoji-cols, 8) * 44px + 16px); } }\n@media (prefers-reduced-motion: reduce) { .alea-emoji-item[data-hovered], .alea-emoji-item[data-pressed] { transform: none; } }\n"}],"deps":["field"],"npm":["react-aria-components"],"exports":["EmojiPicker","EMOJI","EMOJI_CATEGORIES"],"descriptions":{"EmojiPicker":"Pick an emoji: search by name (English or Spanish), jump by category, recent picks first. The grid is a listbox in a grid layout: arrows move in two directions, Enter picks, and every emoji has a name for screen readers."}},"extras":{"files":[{"path":"components/extras/CodeSteps.tsx","content":"import type { ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\nimport { CodeBlock } from './Extras';\n\nexport interface CodeStep {\n /** Short name of the step: \"Install the package\". */\n title: ReactNode;\n /** What to do and why, beside the code. */\n description?: ReactNode;\n /** The code for this step. Leave it out for a step that is only text. */\n code?: string;\n /** Label over the code: a file name (\"main.tsx\") or \"Terminal\". */\n file?: string;\n /** Anything else under the description (a note, a link, an alert). */\n children?: ReactNode;\n}\n\nexport interface CodeStepsProps {\n steps: CodeStep[];\n /** Heading level of each step's title, to fit the page outline. Default 3. */\n headingLevel?: 2 | 3 | 4;\n /** Number to start counting from. Default 1. */\n start?: number;\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** Numbered steps with the text on one side and the code on the other: an install guide, a setup, a migration. Stacks on narrow screens. */\nexport function CodeSteps({ steps, headingLevel = 3, start = 1, className }: CodeStepsProps) {\n const H = `h${headingLevel}` as 'h3';\n return (\n <ol className={cx('alea-codesteps', className)} start={start}>\n {steps.map((s, i) => (\n <li key={i} className=\"alea-codesteps-step\" data-code={s.code ? true : undefined}>\n <span className=\"alea-codesteps-num\" aria-hidden=\"true\">{start + i}</span>\n <div className=\"alea-codesteps-text\">\n <H className=\"alea-codesteps-title\">{s.title}</H>\n {s.description && <div className=\"alea-codesteps-desc\">{s.description}</div>}\n {s.children}\n </div>\n {s.code && <div className=\"alea-codesteps-code\"><CodeBlock code={s.code} title={s.file} /></div>}\n </li>\n ))}\n </ol>\n );\n}\n"},{"path":"components/extras/Extras.tsx","content":"import { useEffect, useRef, useState, type HTMLAttributes, type ReactNode } from 'react';\nimport { Sun, Moon, Monitor, Copy, Check } from 'lucide-react';\nimport { useOffscreenPause } from '@alea-design/motion';\nimport { cx } from '../../utils/cx';\nimport { Button, IconButton } from '../button/Button';\nimport { useTheme, type ThemeName } from '../theme/Theme';\nimport { useStrings } from '../../i18n/strings';\nimport { Tooltip, TooltipTrigger } from '../overlay/Overlay';\n\nexport interface GradientTextProps extends HTMLAttributes<HTMLSpanElement> { children: ReactNode }\n/** Text filled with the purple to yellow accent gradient. */\nexport function GradientText({ className, ...props }: GradientTextProps) {\n return <span {...props} className={cx('alea-gradient-text', className)} />;\n}\n\nexport interface GradientDotProps extends HTMLAttributes<HTMLSpanElement> {\n /** Diameter in px. Default 14. */\n size?: number;\n /** Pulses softly, for \"live\" or \"new\". */\n pulse?: boolean;\n}\n/** The Alea dot: a small circle in the accent gradient. Decorative. */\nexport function GradientDot({ size = 14, pulse, className, style, ...props }: GradientDotProps) {\n return <span {...props} aria-hidden=\"true\" className={cx('alea-gradient-dot', className)} data-pulse={pulse || undefined} style={{ width: size, height: size, ...style }} />;\n}\n\nexport interface OrbBackgroundProps extends HTMLAttributes<HTMLDivElement> {\n /** fixed covers the viewport behind the page; absolute fills the nearest positioned parent. */\n position?: 'fixed' | 'absolute';\n /** Adds the faint dot grid on top. */\n grid?: boolean;\n}\n/** The drifting purple, violet and yellow glow behind Alea pages. Decorative and pointer-transparent. */\nexport function OrbBackground({ position = 'absolute', grid = true, className, ...props }: OrbBackgroundProps) {\n const ref = useOffscreenPause<HTMLDivElement>();\n return (\n <div {...props} ref={ref} aria-hidden=\"true\" className={cx('alea-orbs', className)} data-position={position}>\n <span className=\"alea-orb\" data-n=\"1\" /><span className=\"alea-orb\" data-n=\"2\" /><span className=\"alea-orb\" data-n=\"3\" />\n {grid && <span className=\"alea-orbs-grid\" />}\n </div>\n );\n}\n\nexport interface ThemeToggleProps {\n /** icon: one button cycling dark/light; segmented: dark, light, system. */\n appearance?: 'icon' | 'segmented';\n /** Extra class names. */\n className?: string;\n}\n/** Switches the theme (needs ThemeProvider for system and storage). */\nexport function ThemeToggle({ appearance = 'icon', className }: ThemeToggleProps) {\n const t = useStrings();\n const { theme, resolvedTheme, setTheme } = useTheme();\n if (appearance === 'segmented') {\n const opts: Array<{ id: ThemeName; label: string; Icon: typeof Sun }> = [{ id: 'dark', label: t.themeDark, Icon: Moon }, { id: 'light', label: t.themeLight, Icon: Sun }, { id: 'system', label: t.themeSystem, Icon: Monitor }];\n return (\n <div role=\"radiogroup\" aria-label={t.theme} className={cx('alea-theme-toggle alea-segmented', className)} data-size=\"sm\">\n {opts.map(o => (\n <button key={o.id} type=\"button\" role=\"radio\" aria-checked={theme === o.id} className=\"alea-segmented-item alea-focus-ring\" data-selected={theme === o.id || undefined} onClick={() => setTheme(o.id)}>\n <o.Icon size={14} aria-hidden=\"true\" /> {o.label}\n </button>\n ))}\n </div>\n );\n }\n const next = resolvedTheme === 'dark' ? 'light' : 'dark';\n return (\n <IconButton aria-label={t.switchTheme(next === 'dark' ? t.themeDark : t.themeLight)} className={cx('alea-theme-toggle', className)} onPress={() => setTheme(next)}>\n {resolvedTheme === 'dark' ? <Moon /> : <Sun />}\n </IconButton>\n );\n}\n\nexport interface CopyButtonProps {\n /** The text to copy. */\n value: string;\n /** What is copied, for the label (\"Copy hex\"). Default \"Copy\". */\n label?: string;\n /** icon (default) or a button with the label. */\n appearance?: 'icon' | 'button';\n /** sm or md (default). */\n size?: 'sm' | 'md';\n /** Called after the text is copied. */\n onCopy?: () => void;\n}\n\n/** Copies a value and confirms it, announced to screen readers. */\nexport function CopyButton({ value, label, appearance = 'icon', size = 'sm', onCopy }: CopyButtonProps) {\n const t = useStrings(); label ??= t.copy;\n const [done, setDone] = useState(false);\n const copy = async () => {\n try { await navigator.clipboard.writeText(value); } catch { /* blocked: still confirm, the value is visible */ }\n setDone(true); onCopy?.(); setTimeout(() => setDone(false), 1400);\n };\n return (\n <>\n {appearance === 'icon'\n ? <IconButton size={size} aria-label={done ? t.copied : label} onPress={copy}>{done ? <Check /> : <Copy />}</IconButton>\n : <Button size={size} variant=\"ghost\" iconStart={done ? <Check /> : <Copy />} onPress={copy}>{done ? t.copied : label}</Button>}\n <span className=\"alea-visually-hidden\" role=\"status\">{done ? t.copied : ''}</span>\n </>\n );\n}\n\nexport interface CodeBlockProps {\n /** The code. */\n code: string;\n /** Shown above the code, e.g. a file name or \"bash\". */\n title?: ReactNode;\n /** Shows line numbers. */\n lineNumbers?: boolean;\n /** Line numbers to highlight, from 1: [3, 4, 5]. */\n highlightLines?: number[];\n /** Shows this many lines and a Show more button for the rest. */\n maxLines?: number;\n /** Long lines wrap instead of scrolling sideways. */\n wrap?: boolean;\n /** Copy button. Default true. */\n copy?: boolean;\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** Code with a copy button, line numbers, highlighted lines, wrapping, and Show more for long snippets (no highlighter bundled). */\nexport function CodeBlock({ code, title, lineNumbers, highlightLines, maxLines, wrap, copy = true, className }: CodeBlockProps) {\n const t = useStrings();\n const lines = code.replace(/\\n$/, '').split('\\n');\n const [open, setOpen] = useState(false);\n const cut = maxLines != null && lines.length > maxLines && !open;\n const shown = cut ? lines.slice(0, maxLines) : lines;\n const perLine = lineNumbers || highlightLines?.length;\n return (\n <figure className={cx('alea-codeblock', className)} data-wrap={wrap || undefined}>\n {(title || copy) && <figcaption className=\"alea-codeblock-head\"><span>{title}</span>{copy && <CopyButton value={code} label={t.copyCode} />}</figcaption>}\n <pre tabIndex={0} className=\"alea-codeblock-pre\" data-line-numbers={lineNumbers || undefined} data-cut={cut || undefined}>\n <code>{perLine ? shown.map((l, i) => <span key={i} className=\"alea-codeblock-line\" data-highlight={highlightLines?.includes(i + 1) || undefined}>{l || ' '}</span>) : shown.join('\\n')}</code>\n </pre>\n {maxLines != null && lines.length > maxLines && (\n <button type=\"button\" className=\"alea-codeblock-more alea-focus-ring\" aria-expanded={open} onClick={() => setOpen(o => !o)}>\n {open ? t.showLess : `${t.showMore} (${lines.length - maxLines})`}\n </button>\n )}\n </figure>\n );\n}\n\nexport interface CodeSnippetProps {\n /** The code to show and copy. */\n code: string;\n /** inline: in a sentence, copies when pressed; single: one line in a box with a copy button. */\n variant?: 'inline' | 'single';\n /** A prompt shown before a single line, like $ (not copied). */\n prompt?: string;\n /** Extra class names. */\n className?: string;\n}\n\n/** A short piece of code to copy: inline in a sentence (press to copy), or a single line with a copy button, like an install command. */\nexport function CodeSnippet({ code, variant = 'single', prompt, className }: CodeSnippetProps) {\n const t = useStrings();\n const [done, setDone] = useState(false);\n // A line wider than its box scrolls, so it takes focus then: keyboard people can scroll it too\n const codeRef = useRef<HTMLElement>(null);\n const [overflows, setOverflows] = useState(false);\n useEffect(() => {\n const el = codeRef.current;\n if (!el || typeof ResizeObserver === 'undefined') return;\n const check = () => setOverflows(el.scrollWidth > el.clientWidth + 1);\n check();\n const ro = new ResizeObserver(check);\n ro.observe(el);\n return () => ro.disconnect();\n }, [code]);\n const copy = async () => { try { await navigator.clipboard.writeText(code); } catch { /* blocked */ } setDone(true); setTimeout(() => setDone(false), 1500); };\n if (variant === 'inline') {\n return (\n <TooltipTrigger delay={300}>\n <Button variant=\"text\" size=\"xs\" className={cx('alea-snippet-inline', className)} onPress={copy} aria-label={`${code}, ${done ? t.copied : t.copy}`}><code>{code}</code></Button>\n <Tooltip>{done ? t.copied : t.copy}</Tooltip>\n </TooltipTrigger>\n );\n }\n return (\n <div className={cx('alea-snippet', className)}>\n <code ref={codeRef} className=\"alea-snippet-code\" {...(overflows ? { tabIndex: 0, role: 'region', 'aria-label': code } : {})}>{prompt && <span className=\"alea-snippet-prompt\" aria-hidden=\"true\">{prompt} </span>}{code}</code>\n <IconButton size=\"sm\" variant=\"text\" aria-label={done ? t.copied : t.copy} onPress={copy}>{done ? <Check /> : <Copy />}</IconButton>\n <span className=\"alea-visually-hidden\" role=\"status\">{done ? t.copied : ''}</span>\n </div>\n );\n}\n\nexport interface SplitTextProps extends HTMLAttributes<HTMLSpanElement> {\n /** The text to animate, word by word. */\n children: string;\n /** Delay between words in ms. Default 60. */\n stagger?: number;\n}\n\n/** A headline that rises in word by word (reads as one string to screen readers; still with reduced motion). */\nexport function SplitText({ children, stagger = 60, className, ...props }: SplitTextProps) {\n const words = children.split(/(\\s+)/);\n let n = 0;\n return (\n <span {...props} className={cx('alea-split', className)}>\n <span className=\"alea-visually-hidden\">{children}</span>\n <span aria-hidden=\"true\">{words.map((w, i) => /^\\s+$/.test(w) ? w : <span key={i} className=\"alea-split-word\" style={{ animationDelay: `${(n++) * stagger}ms` }}>{w}</span>)}</span>\n </span>\n );\n}\n"},{"path":"components/extras/codesteps.css","content":"/* CodeSteps: numbered steps on a line, text beside the code (stacked on narrow screens) */\n.alea-codesteps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--alea-space-8); container-type: inline-size; }\n.alea-codesteps-step { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: var(--alea-space-4); row-gap: var(--alea-space-3); }\n.alea-codesteps-step:not(:last-child)::before { content: ''; position: absolute; left: var(--alea-space-4); top: var(--alea-space-10); bottom: calc(-1 * var(--alea-space-8) + var(--alea-space-2)); width: 1px; background: var(--alea-border); }\n.alea-codesteps-num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--alea-radius-full); background: var(--alea-surface-raised); box-shadow: inset 0 0 0 1px var(--alea-border-strong); color: var(--alea-text); font: var(--alea-font-weight-semibold) var(--alea-font-size-sm) / 1 var(--alea-font-family-body); font-variant-numeric: tabular-nums; }\n.alea-codesteps-text { display: grid; gap: var(--alea-space-2); align-content: start; padding-top: var(--alea-space-1); min-width: 0; }\n.alea-codesteps-title { margin: 0; font: var(--alea-font-weight-semibold) var(--alea-font-size-lg) / 1.3 var(--alea-font-family-body); color: var(--alea-text); }\n.alea-codesteps-desc { color: var(--alea-text-muted); line-height: var(--alea-font-leading-relaxed); }\n.alea-codesteps-desc > p { margin: 0; }\n.alea-codesteps-code { grid-column: 2; min-width: 0; }\n/* wide enough: the code sits beside the text */\n@container (min-width: 720px) {\n .alea-codesteps-step[data-code] { grid-template-columns: 32px minmax(0, 0.9fr) minmax(0, 1.1fr); }\n .alea-codesteps-step[data-code] .alea-codesteps-code { grid-column: 3; grid-row: 1; }\n}\n.alea-codesteps-step { animation: alea-item-in var(--alea-motion-duration-slow) var(--alea-motion-ease-out) both; }\n.alea-codesteps-step:nth-child(2) { animation-delay: calc(var(--alea-motion-stagger) * 1); } .alea-codesteps-step:nth-child(3) { animation-delay: calc(var(--alea-motion-stagger) * 2); } .alea-codesteps-step:nth-child(n + 4) { animation-delay: calc(var(--alea-motion-stagger) * 3); }\n@media (prefers-reduced-motion: reduce) { .alea-codesteps-step { animation: none; } }\n"},{"path":"components/extras/extras.css","content":".alea-gradient-dot { display: inline-block; flex: none; border-radius: 50%; background: var(--alea-gradient-accent); }\n.alea-gradient-dot[data-pulse] { animation: alea-pulse 2s var(--alea-motion-ease-in-out) infinite; }\n@keyframes alea-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--alea-accent) 45%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--alea-accent) 0%, transparent); } }\n\n.alea-orbs { inset: 0; overflow: hidden; pointer-events: none; z-index: 0; --alea-orb-1: color-mix(in srgb, var(--alea-accent) 22%, transparent); --alea-orb-2: rgba(255, 206, 31, 0.12); --alea-orb-3: rgba(139, 108, 240, 0.2); --alea-grid-dot: rgba(255, 255, 255, 0.06); }\n[data-theme='light'] .alea-orbs, .alea-orbs:where([data-theme='light'] *) { --alea-orb-1: color-mix(in srgb, var(--alea-accent) 16%, transparent); --alea-orb-2: rgba(255, 206, 31, 0.2); --alea-orb-3: rgba(139, 108, 240, 0.14); --alea-grid-dot: rgba(17, 16, 17, 0.07); }\n.alea-orbs[data-position='fixed'] { position: fixed; }\n.alea-orbs[data-position='absolute'] { position: absolute; }\n.alea-orb { position: absolute; border-radius: 50%; filter: blur(70px); }\n.alea-orb[data-n='1'] { width: 42%; aspect-ratio: 1; left: -6%; top: -12%; background: var(--alea-orb-1); animation: alea-orb-drift 22s var(--alea-motion-ease-in-out) infinite alternate; }\n.alea-orb[data-n='2'] { width: 36%; aspect-ratio: 1; right: -4%; top: 6%; background: var(--alea-orb-3); animation: alea-orb-drift 26s var(--alea-motion-ease-in-out) infinite alternate-reverse; }\n.alea-orb[data-n='3'] { width: 50%; aspect-ratio: 3 / 2; left: 25%; bottom: -20%; background: var(--alea-orb-2); animation: alea-orb-drift 30s var(--alea-motion-ease-in-out) infinite alternate; }\n@keyframes alea-orb-drift { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(-4%, 5%, 0) scale(1.08); } 100% { transform: translate3d(5%, -3%, 0) scale(1.02); } }\n.alea-orbs-grid { position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, var(--alea-grid-dot) 1px, transparent 0); background-size: 28px 28px; -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 80%); mask-image: linear-gradient(to bottom, #000 0%, transparent 80%); }\n.alea-theme-toggle svg { width: 20px; height: 20px; }\n.alea-theme-toggle.alea-segmented .alea-segmented-item { display: inline-flex; align-items: center; gap: var(--alea-space-2); }\n.alea-theme-toggle.alea-segmented svg { width: 16px; height: 16px; }\n.alea-codeblock { margin: 0; border-radius: var(--alea-radius-md); background: var(--alea-surface-deep); box-shadow: inset 0 0 0 1px var(--alea-border); overflow: hidden; }\n.alea-codeblock-head { display: flex; align-items: center; justify-content: space-between; gap: var(--alea-space-2); min-height: 48px; padding: var(--alea-space-2) var(--alea-space-2) var(--alea-space-2) var(--alea-space-4); border-bottom: 1px solid var(--alea-border); font: var(--alea-font-weight-medium) var(--alea-font-size-xs) / 1 var(--alea-font-family-mono); color: var(--alea-text-muted); }\n.alea-codeblock-pre { margin: 0; padding: var(--alea-space-4) var(--alea-space-4); overflow: auto; font: 13px/1.65 var(--alea-font-family-mono); color: var(--alea-text); outline: none; }\n.alea-codeblock-pre:focus-visible { box-shadow: inset 0 0 0 2px var(--alea-focus); }\n.alea-codeblock-pre[data-line-numbers] code { counter-reset: line; }\n[data-line-numbers] .alea-codeblock-line::before { counter-increment: line; content: counter(line); display: inline-block; width: 2.5ch; margin-right: 1.5ch; text-align: right; color: var(--alea-text-faint); }\n.alea-split { display: inline; }\n.alea-split-word { display: inline-block; animation: alea-word-in var(--alea-motion-duration-slower) var(--alea-motion-ease-out) both; }\n@keyframes alea-word-in { from { opacity: 0.01; transform: translateY(0.35em); filter: blur(var(--alea-motion-blur-sm)); } }\n\n/* CodeBlock: highlighted lines, wrapping, Show more */\n.alea-codeblock-line { display: block; }\n.alea-codeblock-pre:has(.alea-codeblock-line) code { display: block; min-width: max-content; }\n.alea-codeblock-line[data-highlight] { margin: 0 calc(var(--alea-space-4) * -1); padding: 0 var(--alea-space-4); background: var(--alea-accent-subtle); box-shadow: inset 3px 0 0 var(--alea-accent); }\n.alea-codeblock[data-wrap] .alea-codeblock-pre { white-space: pre-wrap; overflow-wrap: anywhere; }\n.alea-codeblock-pre[data-cut] { mask-image: linear-gradient(to bottom, #000 70%, transparent); }\n.alea-codeblock-more { display: block; width: 100%; padding: var(--alea-space-3); border: 0; border-top: 1px solid var(--alea-border); background: none; color: var(--alea-text-muted); font: var(--alea-font-weight-medium) var(--alea-font-size-sm) / 1 var(--alea-font-family-body); cursor: pointer; }\n.alea-codeblock-more:hover { color: var(--alea-text); background: var(--alea-surface-hover); }\n/* CodeSnippet */\n.alea-snippet { display: flex; align-items: center; gap: var(--alea-space-2); min-width: 0; padding: var(--alea-space-1) var(--alea-space-1) var(--alea-space-1) var(--alea-space-4); border-radius: var(--alea-radius-md); background: var(--alea-surface-deep); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-snippet-code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; font: 13px / 32px var(--alea-font-family-mono); color: var(--alea-text); }\n.alea-snippet-prompt { color: var(--alea-text-faint); user-select: none; }\n.alea-snippet-inline.alea-button { --alea-button-pad-x: var(--alea-space-1-5); height: auto; padding: var(--alea-space-0-25) var(--alea-space-2); border-radius: var(--alea-radius-sm); background: var(--alea-surface-raised); vertical-align: baseline; }\n.alea-snippet-inline code { font: 0.9em / 1.4 var(--alea-font-family-mono); color: var(--alea-text); }\n"}],"deps":["button","theme","overlay"],"npm":["lucide-react","@alea-design/motion"],"exports":["CodeSteps","GradientText","GradientDot","OrbBackground","ThemeToggle","CopyButton","CodeBlock","CodeSnippet","SplitText"],"descriptions":{"CodeSteps":"Numbered steps with the text on one side and the code on the other: an install guide, a setup, a migration. Stacks on narrow screens.","GradientText":"Text filled with the purple to yellow accent gradient.","GradientDot":"The Alea dot: a small circle in the accent gradient. Decorative.","OrbBackground":"The drifting purple, violet and yellow glow behind Alea pages. Decorative and pointer-transparent.","ThemeToggle":"Switches the theme (needs ThemeProvider for system and storage).","CopyButton":"Copies a value and confirms it, announced to screen readers.","CodeBlock":"Code with a copy button, line numbers, highlighted lines, wrapping, and Show more for long snippets (no highlighter bundled).","CodeSnippet":"A short piece of code to copy: inline in a sentence (press to copy), or a single line with a copy button, like an install command.","SplitText":"A headline that rises in word by word (reads as one string to screen readers; still with reduced motion)."}},"feedback":{"files":[{"path":"components/feedback/Feedback.tsx","content":"import { createContext, useCallback, useContext, useEffect, useRef, useState, type HTMLAttributes, type PointerEvent as ReactPointerEvent, type ReactNode } from 'react';\nimport { motionStyle, type MotionProp } from '@alea-design/motion';\nimport { ProgressBar as RACProgressBar, Meter as RACMeter, Label, type ProgressBarProps as RACProgressBarProps, type MeterProps as RACMeterProps } from 'react-aria-components';\nimport { CircleCheck, CircleAlert, TriangleAlert, Info, X } from 'lucide-react';\nimport { cx, withBase } from '../../utils/cx';\nimport { alertIcon } from '../icon/icon-contexts';\nimport { IconButton } from '../button/Button';\nimport type { Tone } from '../display/Display';\nimport { useStrings } from '../../i18n/strings';\nimport { Spinner } from './Spinner';\nimport { DotField } from '../../utils/DotField';\nimport { SkeletonBlueprint } from '../../utils/Blueprint';\n\nexport interface ProgressBarProps extends RACProgressBarProps {\n /** The visible label. */\n label?: ReactNode;\n /** Show the percent (or valueLabel). Default true with a label or with valuePosition=\"end\". */\n showValue?: boolean;\n /** Track height: sm 4 px, md 8 px (default) or lg 12 px. */\n size?: 'sm' | 'md' | 'lg';\n /** The fill color: accent (default, the gradient), success, warning, danger or info. */\n tone?: 'accent' | 'success' | 'warning' | 'danger' | 'info';\n /** Moving stripes on the fill, for work that is running. */\n striped?: boolean;\n /** Where the value shows: top (next to the label, default) or end (after the bar). */\n valuePosition?: 'top' | 'end';\n /** A line under the bar: \"3 of 12 files\", \"About 2 minutes left\". */\n description?: ReactNode;\n}\n\n/** How far a task has come: tones, three sizes, stripes, the value on top or at the end, and a description. Without value it is indeterminate. */\nexport function ProgressBar({ label, showValue: show, size = 'md', tone, striped, valuePosition = 'top', description, className, ...props }: ProgressBarProps) {\n const showValue = show ?? (!!label || valuePosition === 'end');\n return (\n <RACProgressBar {...props} className={withBase('alea-progress', className as any)} data-size={size} data-tone={tone} data-striped={striped || undefined} data-value-position={valuePosition !== 'top' ? valuePosition : undefined}>\n {({ percentage, valueText, isIndeterminate }) => (\n <>\n {(label || (showValue && valuePosition === 'top')) && <div className=\"alea-progress-head\">{label && <Label className=\"alea-label\">{label}</Label>}{showValue && valuePosition === 'top' && !isIndeterminate && <span className=\"alea-progress-value\">{valueText}</span>}</div>}\n <div className=\"alea-progress-row\">\n <div className=\"alea-progress-track\"><div className=\"alea-progress-fill\" data-indeterminate={isIndeterminate || undefined} style={isIndeterminate ? undefined : { width: `${percentage}%` }} /></div>\n {showValue && valuePosition === 'end' && !isIndeterminate && <span className=\"alea-progress-value\">{valueText}</span>}\n </div>\n {description && <span className=\"alea-description\">{description}</span>}\n </>\n )}\n </RACProgressBar>\n );\n}\n\nexport interface ProgressCircleProps extends Omit<RACProgressBarProps, 'children'> {\n /** sm 24, md 40 (default), lg 64, xl 96 px. */\n size?: 'sm' | 'md' | 'lg' | 'xl';\n /** Show the percent in the middle (md and up). */\n showValue?: boolean;\n /** The ring color: accent (default), success, warning, danger or info. */\n tone?: 'accent' | 'success' | 'warning' | 'danger' | 'info';\n /** Ring thickness in the 48 unit drawing: 3 (thin), 5 (default) or 8 (bold). */\n thickness?: number;\n /** Your own content in the middle: an icon, an avatar, \"3/5\". */\n children?: ReactNode;\n}\n\n/** Circular progress, for compact places: four sizes, tones, thickness and anything in the middle. */\nexport function ProgressCircle({ size = 'md', showValue, tone, thickness = 5, children, className, ...props }: ProgressCircleProps) {\n return (\n <RACProgressBar {...props} className={withBase('alea-progress-circle', className as any)} data-size={size} data-tone={tone}>\n {({ percentage = 0, valueText, isIndeterminate }) => {\n const r = 24 - thickness / 2 - 1, c = 2 * Math.PI * r;\n return (\n <>\n <svg viewBox=\"0 0 48 48\" aria-hidden=\"true\" data-indeterminate={isIndeterminate || undefined}>\n <circle cx=\"24\" cy=\"24\" r={r} fill=\"none\" stroke=\"var(--alea-surface-raised)\" strokeWidth={thickness} />\n <circle cx=\"24\" cy=\"24\" r={r} fill=\"none\" stroke=\"var(--alea-progress-tone, var(--alea-accent))\" strokeWidth={thickness} strokeLinecap=\"round\" strokeDasharray={c} strokeDashoffset={isIndeterminate ? c * 0.7 : c * (1 - percentage / 100)} transform=\"rotate(-90 24 24)\" className=\"alea-progress-circle-arc\" />\n </svg>\n {children ? <span className=\"alea-progress-circle-value\">{children}</span> : showValue && !isIndeterminate && <span className=\"alea-progress-circle-value\">{valueText}</span>}\n </>\n );\n }}\n </RACProgressBar>\n );\n}\n\nexport interface MeterProps extends RACMeterProps {\n /** The visible label. */\n label?: ReactNode;\n /** Show the value next to the label. Default true. */\n showValue?: boolean;\n /** Color by level: auto turns warning above 70% and danger above 90% (storage, quota). */\n tone?: Tone | 'auto';\n}\n\n/** A measured amount within a known range (storage, password strength, contrast). Not progress. */\nexport function Meter({ label, showValue = true, tone = 'accent', className, ...props }: MeterProps) {\n return (\n <RACMeter {...props} className={withBase('alea-progress alea-meter', className as any)}>\n {({ percentage, valueText }) => {\n const t = tone === 'auto' ? (percentage > 90 ? 'danger' : percentage > 70 ? 'warning' : 'success') : tone;\n return (\n <>\n {(label || showValue) && <div className=\"alea-progress-head\">{label && <Label className=\"alea-label\">{label}</Label>}{showValue && <span className=\"alea-progress-value\">{valueText}</span>}</div>}\n <div className=\"alea-progress-track\"><div className=\"alea-progress-fill\" data-tone={t} style={{ width: `${percentage}%` }} /></div>\n </>\n );\n }}\n </RACMeter>\n );\n}\n\nexport interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {\n /** text: lines of text; rect: a block; circle: an avatar. */\n shape?: 'text' | 'rect' | 'circle';\n /** Width, as px or any CSS length. */\n width?: number | string;\n /** Height, as px or any CSS length. */\n height?: number | string;\n /** Number of text lines (the last one shorter). */\n lines?: number;\n /** When true, shows children instead, crossfading in. */\n isLoaded?: boolean;\n /** shimmer (a light sweep, default), pulse (fades in and out), matrix (a field of dots that twinkle; with isLoaded it dissolves into the children), blueprint (the children's own shapes drawn as dotted outlines, then they take over) or none. */\n animation?: 'shimmer' | 'pulse' | 'matrix' | 'blueprint' | 'none';\n /** matrix: how many rows of dots. With cols it sets the size of the block; without them the dots fill the container. blueprint with no children: how many text lines to draw. */\n rows?: number;\n /** matrix: how many columns of dots. */\n cols?: number;\n children?: ReactNode;\n}\n\n/** A placeholder with a soft shimmer while content loads. Hidden from screen readers; mark the region aria-busy. animation=\"matrix\" is a field of dots that wraps its content: it announces Loading, and dissolves into the children when isLoaded turns true. */\nexport function Skeleton({ shape = 'text', width, height, lines = 1, isLoaded, animation, rows, cols, children, className, style, ...props }: SkeletonProps) {\n const t = useStrings();\n if (animation === 'blueprint') return <SkeletonBlueprint {...props} shape={shape} width={width} height={height} rows={rows} isLoaded={isLoaded} className={className} style={style}>{children}</SkeletonBlueprint>;\n if (animation === 'matrix') {\n const hasContent = children != null && children !== false;\n const { 'aria-label': label, ...rest } = props as HTMLAttributes<HTMLSpanElement>;\n const sized = rows != null || cols != null;\n return (\n <span {...rest} className={cx('alea-skeleton-matrix', className)} data-shape={shape} data-state={isLoaded ? 'loaded' : 'loading'} data-content={hasContent || undefined} data-sized={sized || undefined} aria-busy={!isLoaded}\n style={{ width, ...(hasContent ? { minHeight: height } : { height: height ?? (shape === 'circle' ? width : undefined) }), ...(cols != null ? { ['--alea-dots-cols' as string]: cols } : null), ...(rows != null ? { ['--alea-dots-rows' as string]: rows } : null), ...style }}>\n <DotField rows={rows} cols={cols} />\n {hasContent && <span className=\"alea-skeleton-matrix-content\" inert={!isLoaded}>{children}</span>}\n <span role=\"status\" className=\"alea-visually-hidden\">{isLoaded ? '' : label ?? t.loading}</span>\n </span>\n );\n }\n // loaded: the real content crossfades in (the reveal pattern)\n if (isLoaded) return <span className=\"alea-skeleton-reveal\">{children}</span>;\n if (shape === 'text' && lines > 1) {\n return <span className={cx('alea-skeleton-lines', className)} aria-hidden=\"true\">{Array.from({ length: lines }, (_, i) => <span key={i} className=\"alea-skeleton\" data-shape=\"text\" data-animation={animation} style={{ width: i === lines - 1 ? '60%' : width }} />)}</span>;\n }\n return <span {...props} aria-hidden=\"true\" className={cx('alea-skeleton', className)} data-shape={shape} data-animation={animation} style={{ width, height: height ?? (shape === 'circle' ? width : undefined), ...style }} />;\n}\n\nconst ALERT_ICON = { neutral: Info, accent: Info, info: Info, success: CircleCheck, warning: TriangleAlert, danger: CircleAlert } as const;\n\nexport interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** info (default), success, warning, danger, accent or neutral. */\n tone?: Tone;\n /** The headline, in bold. */\n title?: ReactNode;\n children?: ReactNode;\n /** Buttons or links on the right (or below on small screens). */\n actions?: ReactNode;\n /** Shows a close button and calls this. */\n onDismiss?: () => void;\n /** Announce it to screen readers when it appears (role alert for danger, status otherwise). Default false for alerts on page load. */\n live?: boolean;\n /** Hide the icon. */\n hideIcon?: boolean;\n /** Your own icon instead of the tone's. */\n icon?: ReactNode;\n /** soft (tinted, default), outline (a border in the tone), solid (filled) or accent (a bar on the left). */\n variant?: 'soft' | 'outline' | 'solid' | 'accent';\n /** md (default) or sm: one compact line, for forms and tables. */\n size?: 'sm' | 'md';\n}\n\n/** A message in the page: info, success, warning, danger, accent or neutral, in four looks and two sizes. */\nexport function Alert({ tone = 'info', title, children, actions, onDismiss, live, hideIcon, icon, variant, size, className, ...props }: AlertProps) {\n const t = useStrings();\n const Glyph = ALERT_ICON[tone];\n return (\n <div {...props} className={cx('alea-alert', className)} data-tone={tone} data-variant={variant !== 'soft' ? variant : undefined} data-size={size} role={live ? (tone === 'danger' ? 'alert' : 'status') : props.role}>\n {!hideIcon && (icon ? <span className=\"alea-alert-icon\" aria-hidden=\"true\" {...alertIcon(tone, variant === 'solid')}>{icon}</span> : <Glyph className=\"alea-alert-icon\" size={size === 'sm' ? 16 : 20} aria-hidden=\"true\" {...alertIcon(tone, variant === 'solid')} />)}\n <div className=\"alea-alert-body\">\n {title && <p className=\"alea-alert-title\">{title}</p>}\n {children && <div className=\"alea-alert-text\">{children}</div>}\n </div>\n {actions && <div className=\"alea-alert-actions\">{actions}</div>}\n {onDismiss && <IconButton aria-label={t.dismiss} size=\"sm\" variant=\"ghost\" onPress={onDismiss} className=\"alea-alert-x\"><X /></IconButton>}\n </div>\n );\n}\n\n// ---------------------------------------------------------------- toasts\nexport interface ToastOptions {\n title: ReactNode;\n description?: ReactNode;\n tone?: Tone;\n /** ms before it closes; 0 keeps it until closed. Default 5000 (danger: 0). */\n timeout?: number;\n /** One action button, e.g. Undo. */\n action?: { label: string; onAction: () => void };\n /** Your own icon instead of the tone's. */\n icon?: ReactNode;\n /** Shows a spinner and stays until updated (see promise and update). */\n isLoading?: boolean;\n /** A thin bar that empties until the toast closes. */\n showProgress?: boolean;\n}\ninterface ToastItem extends ToastOptions { id: number; exiting?: boolean; version?: number }\n// Fallback when the exit animation can't be observed (no animations, reduced motion off)\nconst TOAST_EXIT_MAX_MS = 600;\ninterface ToastApi {\n /** Shows a toast and returns its id. */\n show: (t: ToastOptions) => number;\n /** Closes a toast. */\n close: (id: number) => void;\n /** Changes a toast in place: a new title, tone, description, or isLoading false. */\n update: (id: number, t: Partial<ToastOptions>) => void;\n /** Shows a loading toast while the promise runs, then success or error. Returns the promise. */\n promise: <T>(p: Promise<T>, msgs: { loading: ReactNode; success: ReactNode | ((v: T) => ReactNode); error: ReactNode | ((e: unknown) => ReactNode) }) => Promise<T>;\n}\n\nconst ToastContext = createContext<ToastApi | null>(null);\n\nexport interface ToastProviderProps {\n children: ReactNode;\n /** Where toasts stack: bottom-end (default), bottom, top-end or top. */\n placement?: 'bottom-end' | 'bottom' | 'top-end' | 'top';\n /** How toasts enter and leave (default: rise with a spring, slide away): a preset, false, or options. */\n motion?: MotionProp;\n /** Toasts pile up behind the newest and fan out on hover or focus (the stack pattern). */\n stacked?: boolean;\n}\n\n/** Shows toasts anywhere below it; put it once near the root. */\nexport function ToastProvider({ children, placement = 'bottom-end', motion, stacked }: ToastProviderProps) {\n const t = useStrings();\n const [items, setItems] = useState<ToastItem[]>([]);\n const next = useRef(1);\n // Closing marks the toast as exiting so it can animate out, then removes it\n const remove = useCallback((id: number) => setItems(list => list.filter(t => t.id !== id)), []);\n const close = useCallback((id: number) => {\n setItems(list => list.map(t => (t.id === id ? { ...t, exiting: true } : t)));\n setTimeout(() => remove(id), TOAST_EXIT_MAX_MS);\n }, [remove]);\n const show = useCallback((t: ToastOptions) => { const id = next.current++; setItems(list => [...list.slice(-4), { ...t, id }]); return id; }, []);\n const update = useCallback((id: number, patch: Partial<ToastOptions>) => setItems(list => list.map(x => (x.id === id ? { ...x, ...patch, version: (x.version ?? 0) + 1 } : x))), []);\n const promise = useCallback(<T,>(p: Promise<T>, m: { loading: ReactNode; success: ReactNode | ((v: T) => ReactNode); error: ReactNode | ((e: unknown) => ReactNode) }) => {\n const id = show({ title: m.loading, isLoading: true, tone: 'neutral' });\n p.then(v => update(id, { title: typeof m.success === 'function' ? (m.success as (v: T) => ReactNode)(v) : m.success, tone: 'success', isLoading: false }),\n e => update(id, { title: typeof m.error === 'function' ? (m.error as (e: unknown) => ReactNode)(e) : m.error, tone: 'danger', isLoading: false }));\n return p;\n }, [show, update]);\n return (\n <ToastContext.Provider value={{ show, close, update, promise }}>\n {children}\n <section className=\"alea-toast-region\" data-placement={placement} data-stacked={stacked || undefined} aria-label={t.notifications} tabIndex={-1}>\n <ol>{items.map(t => <ToastView key={t.id} item={t} motion={motion} onClose={() => close(t.id)} onExited={() => remove(t.id)} />)}</ol>\n </section>\n </ToastContext.Provider>\n );\n}\n\nfunction ToastView({ item, onClose, onExited, motion }: { item: ToastItem; onClose: () => void; onExited: () => void; motion?: MotionProp }) {\n const t = useStrings();\n const tone = item.tone || 'neutral';\n const timeout = item.isLoading ? 0 : item.timeout ?? (tone === 'danger' ? 0 : 5000);\n const [paused, setPaused] = useState(false);\n useEffect(() => {\n if (!timeout || paused) return;\n const t = setTimeout(onClose, timeout);\n return () => clearTimeout(t);\n }, [timeout, paused, onClose, item.version]);\n const Glyph = ALERT_ICON[tone];\n // swipe sideways to dismiss: past 80 px (or a quick flick) it closes, otherwise it springs back\n const drag = useRef<{ x: number; t: number; id: number } | null>(null);\n const onPointerDown = (e: ReactPointerEvent<HTMLLIElement>) => { if (e.button !== 0 || (e.target as HTMLElement).closest('button, a')) return; drag.current = { x: e.clientX, t: performance.now(), id: e.pointerId }; };\n const onPointerMove = (e: ReactPointerEvent<HTMLLIElement>) => {\n const d = drag.current; if (!d || d.id !== e.pointerId) return;\n const dx = e.clientX - d.x; if (Math.abs(dx) < 4) return;\n const el = e.currentTarget; el.setAttribute('data-swiping', ''); el.setPointerCapture?.(e.pointerId);\n el.style.setProperty('--alea-swipe-x', `${dx}px`); el.style.setProperty('--alea-swipe-n', String(dx / 160));\n };\n const onPointerUp = (e: ReactPointerEvent<HTMLLIElement>) => {\n const d = drag.current; drag.current = null; if (!d) return;\n const el = e.currentTarget, dx = e.clientX - d.x, fast = Math.abs(dx) / Math.max(1, performance.now() - d.t) > 0.6;\n el.removeAttribute('data-swiping');\n if (Math.abs(dx) > 80 || (fast && Math.abs(dx) > 24)) onClose();\n else { el.style.removeProperty('--alea-swipe-x'); el.style.removeProperty('--alea-swipe-n'); }\n };\n return (\n <li className=\"alea-toast\" data-tone={tone} data-exiting={item.exiting || undefined} data-paused={paused || undefined} role={tone === 'danger' ? 'alert' : 'status'} aria-atomic=\"true\" aria-busy={item.isLoading || undefined} style={{ ...motionStyle(motion), ['--alea-toast-ms' as string]: `${timeout}ms` }}\n onAnimationEnd={e => { if (item.exiting && e.target === e.currentTarget) onExited(); }}\n onPointerDown={onPointerDown} onPointerMove={onPointerMove} onPointerUp={onPointerUp} onPointerCancel={onPointerUp}\n onMouseEnter={() => setPaused(true)} onMouseLeave={() => setPaused(false)} onFocus={() => setPaused(true)} onBlur={() => setPaused(false)}>\n {item.isLoading ? <span className=\"alea-alert-icon\"><Spinner size=\"sm\" aria-label=\"\" /></span> : item.icon ? <span className=\"alea-alert-icon\" aria-hidden=\"true\">{item.icon}</span> : <Glyph key={tone} className=\"alea-alert-icon\" size={18} aria-hidden=\"true\" />}\n {item.showProgress && timeout > 0 && <span key={item.version} className=\"alea-toast-progress\" aria-hidden=\"true\" />}\n <div className=\"alea-alert-body\">\n <p className=\"alea-alert-title\">{item.title}</p>\n {item.description && <div className=\"alea-alert-text\">{item.description}</div>}\n </div>\n {item.action && <button type=\"button\" className=\"alea-toast-action alea-focus-ring\" onClick={() => { item.action!.onAction(); onClose(); }}>{item.action.label}</button>}\n <IconButton aria-label={t.closeNotification} size=\"sm\" variant=\"ghost\" onPress={onClose} className=\"alea-alert-x\"><X /></IconButton>\n </li>\n );\n}\n\n/** show({ title, tone, description, action, timeout }) and close(id). Needs a ToastProvider above. */\nexport function useToast(): ToastApi {\n const ctx = useContext(ToastContext);\n if (!ctx) throw new Error('useToast needs a <ToastProvider> above it.');\n return ctx;\n}\n"},{"path":"components/feedback/Spinner.tsx","content":"import { cx } from '../../utils/cx';\nimport { useStrings } from '../../i18n/strings';\n\nexport interface SpinnerProps {\n /** sm 16, md 24 (default), lg 40 px. */\n size?: 'sm' | 'md' | 'lg';\n /** What is loading, for screen readers. Default \"Loading\". */\n 'aria-label'?: string;\n /** Extra class names. */\n className?: string;\n /** ring (default); dots: a 4 × 4 matrix of dots that pulses in a wave; morph: a soft shape that turns and changes form, for longer waits. */\n variant?: 'ring' | 'dots' | 'morph';\n}\n\n/** An indeterminate loading ring in the accent gradient. */\nexport function Spinner({ size = 'md', variant = 'ring', className, 'aria-label': label }: SpinnerProps) {\n const t = useStrings(); label ??= t.loading;\n if (variant === 'morph') return (\n <span role=\"progressbar\" aria-label={label} className={cx('alea-spinner alea-morph-loader', className)} data-size={size}><i aria-hidden=\"true\" /></span>\n );\n if (variant === 'dots') return (\n <span role=\"progressbar\" aria-label={label} className={cx('alea-spinner alea-dot-loader', className)} data-size={size}>\n {Array.from({ length: 16 }, (_, i) => <i key={i} aria-hidden=\"true\" style={{ ['--alea-dot-d' as string]: (i % 4) + Math.floor(i / 4) }} />)}\n </span>\n );\n return (\n <span role=\"progressbar\" aria-label={label} className={cx('alea-spinner', className)} data-size={size}>\n <svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n <defs><linearGradient id=\"alea-spinner-grad\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\"><stop offset=\"0\" stopColor=\"var(--alea-accent)\" /><stop offset=\"1\" stopColor=\"var(--alea-accent-second)\" /></linearGradient></defs>\n <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" strokeOpacity=\"0.15\" strokeWidth=\"3\" />\n <path d=\"M21 12a9 9 0 0 0-9-9\" stroke=\"url(#alea-spinner-grad)\" strokeWidth=\"3\" strokeLinecap=\"round\" />\n </svg>\n </span>\n );\n}\n"},{"path":"components/feedback/Status.tsx","content":"import { useEffect, useRef, useState, type ReactNode } from 'react';\nimport { Button as RACButton, DialogTrigger } from 'react-aria-components';\nimport { Info, CircleAlert, CircleHelp } from 'lucide-react';\nimport { cx } from '../../utils/cx';\nimport { Popover, PopoverDialog } from '../overlay/Overlay';\nimport { Spinner } from './Spinner';\nimport { useStrings } from '../../i18n/strings';\n\n// ---------------------------------------------------------------- Toggletip and InfoLabel\n\nexport interface ToggletipProps {\n /** What the popover says. Can hold links and buttons (unlike a Tooltip). */\n children: ReactNode;\n /** A title at the top of the popover. */\n title?: ReactNode;\n /** The button's name for screen readers. Default \"More information\". */\n 'aria-label'?: string;\n /** The icon: info (default), help, or warning. */\n icon?: 'info' | 'help' | 'warning';\n /** Where it opens. Default top. */\n placement?: 'top' | 'bottom' | 'start' | 'end';\n /** sm (16 px icon, default) or md (20 px). */\n size?: 'sm' | 'md';\n}\n\nconst ICONS = { info: Info, help: CircleHelp, warning: CircleAlert };\n\n/** A small info button that opens a popover on press: for explanations people may want to read, with links if needed. Escape or a press outside closes it. */\nexport function Toggletip({ children, title, 'aria-label': label, icon = 'info', placement = 'top', size = 'sm' }: ToggletipProps) {\n const t = useStrings();\n const I = ICONS[icon];\n return (\n <DialogTrigger>\n <RACButton className=\"alea-toggletip-btn alea-focus-ring\" aria-label={label ?? t.moreInfo} data-size={size} data-icon={icon}><I aria-hidden=\"true\" /></RACButton>\n <Popover placement={placement} showArrow className=\"alea-popover alea-toggletip\">\n <PopoverDialog title={title}>{children}</PopoverDialog>\n </Popover>\n </DialogTrigger>\n );\n}\n\nexport interface InfoLabelProps extends Omit<ToggletipProps, 'children'> {\n /** The label text. */\n children: ReactNode;\n /** What the info button explains. */\n info: ReactNode;\n /** The id of the field this labels, to use it as a field label. */\n htmlFor?: string;\n /** Marks the field as required. */\n isRequired?: boolean;\n /** Extra class names. */\n className?: string;\n}\n\n/** A label with an info button beside it, for fields that need a longer explanation than help text. */\nexport function InfoLabel({ children, info, htmlFor, isRequired, className, ...tip }: InfoLabelProps) {\n return (\n <span className={cx('alea-info-label', className)}>\n <label className=\"alea-label\" htmlFor={htmlFor}>{children}{isRequired && <span className=\"alea-label-required\" aria-hidden=\"true\"> *</span>}</label>\n <Toggletip {...tip}>{info}</Toggletip>\n </span>\n );\n}\n\n// ---------------------------------------------------------------- InlineLoading\n\nexport interface InlineLoadingProps {\n /** idle (nothing), loading (spinner), success (a check that draws itself) or error. */\n status: 'idle' | 'loading' | 'success' | 'error';\n /** The text for the current status, like \"Saving…\", \"Saved\", \"Could not save\". */\n children?: ReactNode;\n /** After success, wait this long (ms) and call onSuccessEnd: to go back to idle or move on. Default 1500. */\n successDuration?: number;\n /** Called after success has shown for successDuration. */\n onSuccessEnd?: () => void;\n /** Extra class names. */\n className?: string;\n}\n\n/** A small status line for an action in progress: a spinner, then a check or an error, with text. Screen readers hear each change. */\nexport function InlineLoading({ status, children, successDuration = 1500, onSuccessEnd, className }: InlineLoadingProps) {\n const end = useRef(onSuccessEnd); end.current = onSuccessEnd;\n useEffect(() => {\n if (status !== 'success' || !end.current) return;\n const id = setTimeout(() => end.current?.(), successDuration);\n return () => clearTimeout(id);\n }, [status, successDuration]);\n const [key, setKey] = useState(0);\n useEffect(() => setKey(k => k + 1), [status]);\n return (\n <span className={cx('alea-inline-loading', className)} data-status={status} role=\"status\" aria-live=\"polite\">\n {status === 'loading' && <Spinner size=\"sm\" aria-label=\"\" />}\n {status === 'success' && <svg key={key} className=\"alea-inline-check\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2.5} strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\"><path d=\"M5 12.5l4.5 4.5L19 7.5\" /></svg>}\n {status === 'error' && <CircleAlert size={16} aria-hidden=\"true\" />}\n {status !== 'idle' && <span className=\"alea-inline-loading-text\">{children}</span>}\n </span>\n );\n}\n"},{"path":"components/feedback/feedback.css","content":".alea-spinner { display: inline-grid; place-items: center; color: var(--alea-text); }\n.alea-spinner svg { width: 24px; height: 24px; animation: alea-spin 0.8s linear infinite; }\n.alea-spinner[data-size='sm'] svg { width: 16px; height: 16px; }\n.alea-spinner[data-size='lg'] svg { width: 40px; height: 40px; }\n\n.alea-progress { display: flex; flex-direction: column; gap: var(--alea-space-2); width: 100%; }\n.alea-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--alea-space-2); }\n.alea-progress-value { font: var(--alea-font-weight-medium) var(--alea-font-size-sm) / 1 var(--alea-font-family-body); font-variant-numeric: tabular-nums; }\n.alea-progress-track { position: relative; height: 8px; border-radius: var(--alea-radius-full); background: var(--alea-surface-raised); box-shadow: inset 0 0 0 1px var(--alea-border); overflow: hidden; }\n.alea-progress[data-size='sm'] .alea-progress-track { height: 4px; }\n.alea-progress-fill { height: 100%; border-radius: inherit; background: var(--alea-gradient-accent-linear); transition: width var(--alea-motion-duration-slow) var(--alea-motion-ease-out); }\n.alea-progress-fill[data-indeterminate] { width: 40%; animation: alea-indeterminate 1.4s var(--alea-motion-ease-in-out) infinite; }\n@keyframes alea-indeterminate { from { transform: translateX(-100%); } to { transform: translateX(250%); } }\n.alea-progress-fill[data-tone='success'] { background: var(--alea-status-success); }\n.alea-progress-fill[data-tone='warning'] { background: var(--alea-status-warning); }\n.alea-progress-fill[data-tone='danger'] { background: var(--alea-status-danger); }\n.alea-progress-fill[data-tone='info'] { background: var(--alea-status-info); }\n.alea-progress-fill[data-tone='neutral'] { background: var(--alea-text-muted); }\n\n.alea-progress-circle { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; }\n.alea-progress-circle[data-size='sm'] { width: 24px; height: 24px; }\n.alea-progress-circle[data-size='lg'] { width: 64px; height: 64px; }\n.alea-progress-circle svg { width: 100%; height: 100%; }\n.alea-progress-circle svg circle:last-child { transition: stroke-dashoffset var(--alea-motion-duration-slow) var(--alea-motion-ease-out); }\n.alea-progress-circle svg[data-indeterminate] { animation: alea-spin 1s linear infinite; }\n.alea-progress-circle-value { position: absolute; font: var(--alea-font-weight-semibold) var(--alea-font-size-2xs) / 1 var(--alea-font-family-body); font-variant-numeric: tabular-nums; }\n.alea-progress-circle[data-size='lg'] .alea-progress-circle-value { font-size: var(--alea-font-size-sm); }\n\n.alea-skeleton {\n display: block;\n height: 1em;\n border-radius: var(--alea-radius-sm);\n background: linear-gradient(90deg, var(--alea-surface-raised) 0%, var(--alea-surface-hover) 50%, var(--alea-surface-raised) 100%);\n background-size: 200% 100%;\n animation: alea-shimmer 1.6s var(--alea-motion-ease-in-out) infinite;\n}\n.alea-skeleton[data-shape='text'] { height: 0.8em; margin: 0.2em 0; }\n.alea-skeleton[data-shape='rect'] { border-radius: var(--alea-radius-md); height: 120px; }\n.alea-skeleton[data-shape='circle'] { border-radius: 50%; width: 40px; height: 40px; }\n.alea-skeleton-lines { display: flex; flex-direction: column; gap: var(--alea-space-2); }\n\n.alea-alert, .alea-toast {\n --tone: var(--alea-status-info); --tone-bg: var(--alea-status-info-bg);\n display: flex; align-items: flex-start; gap: var(--alea-space-3);\n padding: var(--alea-space-4);\n border-radius: var(--alea-radius-md);\n background: var(--tone-bg);\n box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 35%, transparent);\n color: var(--alea-text);\n}\n.alea-alert[data-tone='success'], .alea-toast[data-tone='success'] { --tone: var(--alea-status-success); --tone-bg: var(--alea-status-success-bg); }\n.alea-alert[data-tone='warning'], .alea-toast[data-tone='warning'] { --tone: var(--alea-status-warning); --tone-bg: var(--alea-status-warning-bg); }\n.alea-alert[data-tone='danger'], .alea-toast[data-tone='danger'] { --tone: var(--alea-status-danger); --tone-bg: var(--alea-status-danger-bg); }\n.alea-alert[data-tone='accent'], .alea-toast[data-tone='accent'] { --tone: var(--alea-accent-strong); --tone-bg: var(--alea-accent-subtle); }\n.alea-alert[data-tone='neutral'], .alea-toast[data-tone='neutral'] { --tone: var(--alea-text-muted); --tone-bg: var(--alea-surface-raised); }\n.alea-alert-icon { flex: none; color: var(--tone); margin-top: var(--alea-space-0-25); }\n.alea-alert-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--alea-space-0-5); }\n.alea-alert-title { margin: 0; font: var(--alea-font-weight-semibold) var(--alea-font-size-md) / 1.4 var(--alea-font-family-body); }\n.alea-alert-text { color: var(--alea-text-muted); font-size: var(--alea-font-size-md); line-height: var(--alea-font-leading-normal); }\n.alea-alert-actions { display: flex; gap: var(--alea-space-2); align-self: center; flex-wrap: wrap; }\n.alea-alert-x { margin: calc(var(--alea-space-2) * -1) calc(var(--alea-space-2) * -1) calc(var(--alea-space-2) * -1) 0; }\n@media (max-width: 520px) { .alea-alert { flex-wrap: wrap; } .alea-alert-actions { flex-basis: 100%; padding-left: var(--alea-space-8); } }\n\n.alea-toast-region { position: fixed; z-index: var(--alea-z-toast); padding: var(--alea-space-4); pointer-events: none; outline: none; }\n.alea-toast-region[data-placement='bottom-end'] { right: 0; bottom: 0; }\n.alea-toast-region[data-placement='top-end'] { right: 0; top: 0; }\n.alea-toast-region[data-placement='bottom'] { left: 50%; bottom: 0; transform: translateX(-50%); }\n.alea-toast-region[data-placement='top'] { left: 50%; top: 0; transform: translateX(-50%); }\n.alea-toast-region ol { display: flex; flex-direction: column; gap: var(--alea-space-2); margin: 0; padding: 0; list-style: none; }\n/* swipe: drag a toast sideways to dismiss it (translate composes with the enter/exit transform) */\n.alea-toast { translate: var(--alea-swipe-x, 0px) var(--alea-stack-y, 0px); touch-action: pan-y; transition: translate var(--alea-motion-duration-base) var(--alea-motion-ease-out), scale var(--alea-motion-duration-base) var(--alea-motion-ease-out), opacity var(--alea-motion-duration-base) var(--alea-motion-ease-standard); }\n.alea-toast[data-swiping] { transition: none; opacity: calc(1 - min(1, abs(var(--alea-swipe-n, 0)) * 0.6)); }\n/* stack: toasts pile up behind the newest and fan out on hover or focus (ToastProvider stacked) */\n.alea-toast-region[data-stacked] ol { display: grid; gap: 0; }\n.alea-toast-region[data-stacked] .alea-toast { grid-area: 1 / 1; align-self: end; --alea-stack-dir: -1;\n --alea-stack-y: calc(var(--alea-stack-i, 0) * 10px * var(--alea-stack-dir)); scale: calc(1 - var(--alea-stack-i, 0) * 0.05); }\n.alea-toast-region[data-stacked][data-placement^='top'] .alea-toast { align-self: start; --alea-stack-dir: 1; }\n.alea-toast-region[data-stacked] .alea-toast:nth-last-child(2) { --alea-stack-i: 1; }\n.alea-toast-region[data-stacked] .alea-toast:nth-last-child(3) { --alea-stack-i: 2; }\n.alea-toast-region[data-stacked] .alea-toast:nth-last-child(n+4) { --alea-stack-i: 3; opacity: 0; pointer-events: none; }\n.alea-toast-region[data-stacked]:is(:hover, :focus-within) .alea-toast { --alea-stack-y: calc(var(--alea-stack-i, 0) * (100% + var(--alea-space-2)) * var(--alea-stack-dir)); scale: 1; }\n.alea-toast-region[data-stacked]:is(:hover, :focus-within) .alea-toast:nth-last-child(n+4) { opacity: 1; pointer-events: auto; }\n@media (prefers-reduced-motion: reduce) { :root:not([data-alea-reduced='never']) .alea-toast { transition-property: opacity; } }\n.alea-toast {\n width: min(380px, calc(100vw - 32px));\n pointer-events: auto;\n background: var(--alea-surface-raised);\n box-shadow: inset 0 0 0 1px var(--alea-border-strong), var(--alea-shadow-pop);\n}\n.alea-toast-action {\n align-self: center; height: 32px; padding: 0 var(--alea-space-3);\n border: 0; border-radius: var(--alea-radius-full);\n background: var(--alea-chip-bg); color: var(--alea-chip-text);\n font: var(--alea-font-weight-semibold) var(--alea-font-size-xs) / 1 var(--alea-font-family-body);\n cursor: pointer;\n}\n\n/* Toggletip and InfoLabel */\n.alea-toggletip-btn { display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--alea-text-muted); cursor: pointer; vertical-align: middle; }\n.alea-toggletip-btn svg { width: 16px; height: 16px; }\n.alea-toggletip-btn[data-size='md'] { width: 28px; height: 28px; } .alea-toggletip-btn[data-size='md'] svg { width: 20px; height: 20px; }\n.alea-toggletip-btn[data-icon='warning'] { color: var(--alea-icon-warning); }\n.alea-toggletip-btn[data-hovered], .alea-toggletip-btn[data-pressed] { background: var(--alea-surface-hover); color: var(--alea-text); }\n.alea-toggletip { max-width: min(320px, calc(100vw - 32px)); font-size: var(--alea-font-size-sm); line-height: 1.5; }\n.alea-info-label { display: inline-flex; align-items: center; gap: var(--alea-space-0-5); }\n\n/* InlineLoading */\n.alea-inline-loading { display: inline-flex; align-items: center; gap: var(--alea-space-2); min-height: 24px; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n.alea-inline-loading[data-status='success'] { color: var(--alea-status-success); }\n.alea-inline-loading[data-status='error'] { color: var(--alea-status-danger); }\n.alea-inline-check path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: alea-inline-draw var(--alea-motion-duration-slow) var(--alea-motion-ease-out) forwards; }\n@keyframes alea-inline-draw { to { stroke-dashoffset: 0; } }\n.alea-inline-loading-text { animation: alea-m-fade-in var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n@media (prefers-reduced-motion: reduce) { .alea-inline-check path { animation: none; stroke-dashoffset: 0; } }\n\n/* rich tooltip: a title, and a shortcut */\n.alea-tooltip[data-rich] { display: flex; flex-direction: column; gap: var(--alea-space-0-5); max-width: 280px; padding: var(--alea-space-3) var(--alea-space-3); text-align: start; }\n.alea-tooltip-title { font-weight: var(--alea-font-weight-semibold); }\n.alea-tooltip[data-rich] .alea-tooltip-text { color: var(--alea-text-muted); font-weight: var(--alea-font-weight-regular); }\n.alea-tooltip-kbd { margin-left: var(--alea-space-2); padding: var(--alea-space-0-25) var(--alea-space-1); border-radius: var(--alea-radius-xs); box-shadow: inset 0 0 0 1px var(--alea-border-strong); color: var(--alea-text-muted); font: var(--alea-font-size-2xs) / 1.4 var(--alea-font-family-mono); }\n\n/* morph: a soft shape that turns and changes form */\n.alea-morph-loader { --morph: 24px; width: var(--morph); height: var(--morph); }\n.alea-morph-loader[data-size='sm'] { --morph: 16px; } .alea-morph-loader[data-size='lg'] { --morph: 48px; }\n.alea-morph-loader > i { display: block; width: 100%; height: 100%; background: var(--alea-gradient-accent-linear, var(--alea-accent)); animation: alea-morph 2.4s var(--alea-motion-ease-in-out, var(--alea-motion-ease-in-out)) infinite; }\n@keyframes alea-morph {\n 0% { border-radius: 50%; transform: rotate(0deg) scale(0.85); }\n 20% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: rotate(72deg) scale(1); }\n 40% { border-radius: 22%; transform: rotate(144deg) scale(0.9); }\n 60% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: rotate(216deg) scale(1); }\n 80% { border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%; transform: rotate(288deg) scale(0.92); }\n 100% { border-radius: 50%; transform: rotate(360deg) scale(0.85); }\n}\n@media (prefers-reduced-motion: reduce) { .alea-morph-loader > i { animation-duration: 6s; } }\n\n/* Alert looks and size */\n.alea-alert[data-variant='outline'] { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--tone) 55%, transparent); }\n.alea-alert[data-variant='solid'] { background: var(--tone); color: var(--alea-status-on); box-shadow: none; }\n.alea-alert[data-variant='solid'][data-tone='accent'] { color: var(--alea-accent-on); }\n.alea-alert[data-variant='solid'] :is(.alea-alert-icon, .alea-alert-text) { color: inherit; }\n.alea-alert[data-variant='solid'][data-tone='danger'] { background: var(--alea-status-danger-solid); color: var(--alea-status-danger-on-solid); }\n.alea-alert[data-variant='accent'] { background: var(--alea-surface); box-shadow: inset 3px 0 0 var(--tone), var(--alea-shadow-card); border-radius: var(--alea-radius-sm); }\n.alea-alert[data-size='sm'] { align-items: center; padding: var(--alea-space-2) var(--alea-space-3); gap: var(--alea-space-2); }\n.alea-alert[data-size='sm'] .alea-alert-body { flex-direction: row; flex-wrap: wrap; gap: var(--alea-space-1) var(--alea-space-2); }\n.alea-alert[data-size='sm'] :is(.alea-alert-title, .alea-alert-text) { font-size: var(--alea-font-size-sm); }\n.alea-alert[data-size='sm'] .alea-alert-icon { margin-top: 0; }\nspan.alea-alert-icon { display: inline-flex; }\nspan.alea-alert-icon svg { width: 20px; height: 20px; }\n/* Toast: a bar that empties until it closes */\n.alea-toast { position: relative; overflow: hidden; }\n.alea-toast-progress { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--tone); transform-origin: left; animation: alea-toast-progress var(--alea-toast-ms) linear forwards; }\n.alea-toast[data-paused] .alea-toast-progress { animation-play-state: paused; }\n@keyframes alea-toast-progress { to { transform: scaleX(0); } }\n\n/* ProgressBar: tones, lg, stripes, value at the end */\n.alea-progress { --alea-progress-tone: var(--alea-accent); }\n.alea-progress[data-tone='success'], .alea-progress-circle[data-tone='success'] { --alea-progress-tone: var(--alea-status-success); }\n.alea-progress[data-tone='warning'], .alea-progress-circle[data-tone='warning'] { --alea-progress-tone: var(--alea-status-warning); }\n.alea-progress[data-tone='danger'], .alea-progress-circle[data-tone='danger'] { --alea-progress-tone: var(--alea-status-danger); }\n.alea-progress[data-tone='info'], .alea-progress-circle[data-tone='info'] { --alea-progress-tone: var(--alea-status-info); }\n.alea-progress[data-tone] .alea-progress-fill { background: var(--alea-progress-tone); }\n.alea-progress[data-size='lg'] .alea-progress-track { height: 12px; }\n.alea-progress-row { display: flex; align-items: center; gap: var(--alea-space-3); }\n.alea-progress-row > .alea-progress-track { flex: 1; }\n.alea-progress[data-striped] .alea-progress-fill { background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.22) 0 8px, transparent 8px 16px), var(--alea-gradient-accent-linear); background-size: 22.6px 22.6px, 100% 100%; animation: alea-stripes 0.9s linear infinite; }\n.alea-progress[data-striped][data-tone] .alea-progress-fill { background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.22) 0 8px, transparent 8px 16px); background-color: var(--alea-progress-tone); }\n@keyframes alea-stripes { to { background-position: 22.6px 0, 0 0; } }\n@media (prefers-reduced-motion: reduce) { .alea-progress[data-striped] .alea-progress-fill { animation: none; } }\n.alea-progress-circle[data-size='xl'] { width: 96px; height: 96px; }\n.alea-progress-circle[data-size='xl'] .alea-progress-circle-value { font-size: var(--alea-font-size-lg); }\n.alea-progress-circle-arc { transition: stroke-dashoffset var(--alea-motion-duration-slow) var(--alea-motion-ease-out); }\n/* Skeleton animations */\n.alea-skeleton[data-animation='pulse'] { background: var(--alea-surface-raised); animation: alea-skeleton-pulse 1.6s var(--alea-motion-ease-in-out, var(--alea-motion-ease-in-out)) infinite; }\n.alea-skeleton[data-animation='none'] { background: var(--alea-surface-raised); animation: none; }\n@keyframes alea-skeleton-pulse { 50% { opacity: 0.45; } }\n\n/* Skeleton, matrix: a grid of dots that twinkle, each with its own speed and phase (scale and opacity, both on the compositor), then it dissolves into the content.\n The dots are spread edge to edge over the box; a dotted outline frames it. */\n:is(.alea-skeleton-matrix, .alea-image[data-effect='matrix']) {\n --alea-dots-pitch: var(--alea-space-4);\n --alea-dots-size: calc(var(--alea-space-0-5) * 1.5);\n --alea-dots-color: var(--alea-text-muted);\n --alea-dots-rest: 0.28;\n --alea-dots-cycle: 1800ms;\n --alea-dots-out: var(--alea-motion-duration-slow);\n --alea-dots-in: var(--alea-motion-duration-slower);\n --alea-dots-lag: 160ms;\n}\n.alea-skeleton-matrix { position: relative; display: block; border-radius: var(--alea-radius-md); }\n.alea-skeleton-matrix[data-shape='text'] { border-radius: var(--alea-radius-xs); }\n.alea-skeleton-matrix[data-shape='circle'] { border-radius: 50%; }\n.alea-skeleton-matrix:not([data-content]) { min-height: 120px; }\n.alea-skeleton-matrix[data-shape='text']:not([data-content]) { min-height: 0; height: 2em; }\n.alea-skeleton-matrix[data-shape='circle']:not([data-content]) { min-height: 0; width: 48px; height: 48px; }\n.alea-skeleton-matrix[data-sized] { width: calc(var(--alea-dots-cols, 1) * var(--alea-dots-pitch)); min-height: calc(var(--alea-dots-rows, 1) * var(--alea-dots-pitch)); }\n.alea-skeleton-matrix[data-sized]:not([data-content]) { height: calc(var(--alea-dots-rows, 1) * var(--alea-dots-pitch)); min-height: 0; }\n.alea-skeleton-matrix-field {\n position: absolute; inset: 0; display: grid; place-items: center; gap: var(--alea-dots-pitch); overflow: hidden; border-radius: inherit; pointer-events: none;\n box-shadow: inset 0 0 0 1px var(--alea-border-default);\n opacity: 1; visibility: visible;\n transition: opacity var(--alea-dots-out) var(--alea-motion-ease-in-out), visibility 0s linear 0s;\n}\n.alea-skeleton-matrix-field > i {\n display: block; width: var(--alea-dots-size); height: var(--alea-dots-size); border-radius: 50%; background: var(--alea-dots-color);\n opacity: var(--alea-dots-rest); transform: scale(0.55);\n}\n.alea-skeleton-matrix-field > i[data-t] {\n animation: alea-dots-twinkle calc(var(--alea-dots-cycle) * var(--k, 1)) var(--alea-motion-ease-in-out) var(--d, 0ms) infinite;\n}\n@keyframes alea-dots-twinkle { 0%, 70%, 100% { opacity: var(--alea-dots-rest); transform: scale(0.55); } 35% { opacity: 1; transform: scale(1); } }\n.alea-skeleton-matrix-content {\n display: block; opacity: 0; visibility: hidden; transform: translateY(var(--alea-space-1)); filter: blur(3px);\n transition: opacity var(--alea-dots-in) var(--alea-motion-ease-out) var(--alea-dots-lag), filter var(--alea-dots-in) var(--alea-motion-ease-out) var(--alea-dots-lag), transform var(--alea-dots-in) var(--alea-motion-ease-out) var(--alea-dots-lag), visibility 0s linear var(--alea-dots-lag);\n}\n/* loaded: the dots hold still and fade away while the content settles in underneath */\n:is(.alea-skeleton-matrix[data-state='loaded'], .alea-image[data-effect='matrix']:not([data-state='loading'])) .alea-skeleton-matrix-field { opacity: 0; visibility: hidden; transition: opacity var(--alea-dots-out) var(--alea-motion-ease-in-out), visibility 0s linear var(--alea-dots-out); }\n:is(.alea-skeleton-matrix[data-state='loaded'], .alea-image[data-effect='matrix']:not([data-state='loading'])) .alea-skeleton-matrix-field > i { animation: none; }\n.alea-skeleton-matrix[data-state='loaded'] .alea-skeleton-matrix-content { opacity: 1; visibility: visible; transform: none; filter: blur(0); }\n@media (prefers-reduced-motion: reduce) {\n :root:not([data-alea-reduced='never']) :is(.alea-skeleton-matrix, .alea-image[data-effect='matrix']) { --alea-dots-out: var(--alea-motion-duration-fast); --alea-dots-in: var(--alea-motion-duration-fast); --alea-dots-lag: 0ms; }\n :root:not([data-alea-reduced='never']) .alea-skeleton-matrix-field > i { animation: none; }\n :root:not([data-alea-reduced='never']) .alea-skeleton-matrix-content { transform: none; filter: none; }\n}\n:is([data-alea-motion='reduced'], [data-alea-reduced='always']) :is(.alea-skeleton-matrix, .alea-image[data-effect='matrix']) { --alea-dots-out: var(--alea-motion-duration-fast); --alea-dots-in: var(--alea-motion-duration-fast); --alea-dots-lag: 0ms; }\n:is([data-alea-motion='reduced'], [data-alea-reduced='always']) .alea-skeleton-matrix-field > i { animation: none; }\n:is([data-alea-motion='reduced'], [data-alea-reduced='always']) .alea-skeleton-matrix-content { transform: none; filter: none; }\n\n.alea-image[data-effect='matrix'][data-state='loading'] { animation: none; background: var(--alea-surface-raised); }\n.alea-image[data-effect='matrix'] > img { position: relative; }\n\n/* Skeleton, blueprint: the content's own shapes drawn dot by dot on a canvas (see utils/blueprintScene.ts), over a faint grid that sparks. When it is loaded a soft edge\n sweeps down the block: the real content (blurred, rising a few px) appears above the edge while the blueprint stays below it, then the blueprint fades. */\n@property --alea-bp-edge { syntax: '<length>'; inherits: false; initial-value: -48px; }\n.alea-skeleton-blueprint {\n --alea-bp-color: var(--alea-text-muted);\n --alea-bp-pitch: var(--alea-space-6);\n --alea-bp-stroke: calc(var(--alea-space-0-5) * 0.75);\n --alea-bp-gap: var(--alea-space-1);\n --alea-bp-sweep: 860ms;\n --alea-bp-end: 100vh;\n position: relative; display: block; border-radius: var(--alea-radius-lg);\n}\n.alea-skeleton-blueprint[data-state='loaded'] :is(.alea-blueprint-sheet, .alea-skeleton-blueprint-content) { --alea-bp-edge: var(--alea-bp-end); }\n.alea-skeleton-blueprint[data-shape='circle'] { border-radius: 50%; }\n.alea-skeleton-blueprint:not([data-content]) { min-height: 160px; }\n.alea-skeleton-blueprint[data-shape='text']:not([data-content]) { min-height: 0; height: 3em; }\n.alea-skeleton-blueprint[data-shape='circle']:not([data-content]) { min-height: 0; width: 48px; height: 48px; }\n.alea-blueprint-sheet {\n position: absolute; inset: calc(var(--alea-space-8) * -1); pointer-events: none; color: var(--alea-bp-color);\n font: var(--alea-font-weight-regular) var(--alea-font-size-2xs) / 1 var(--alea-font-family-mono);\n padding: var(--alea-bp-pitch) 0 0 var(--alea-bp-gap); border-top: var(--alea-bp-stroke) solid transparent; /* read by the painter: the grid pitch, the dot gap and the dot size */\n opacity: 1; visibility: visible;\n -webkit-mask-image: linear-gradient(to bottom, transparent calc(var(--alea-bp-edge) - 16px), #000 calc(var(--alea-bp-edge) + 32px)); mask-image: linear-gradient(to bottom, transparent calc(var(--alea-bp-edge) - 16px), #000 calc(var(--alea-bp-edge) + 32px));\n transition: --alea-bp-edge var(--alea-bp-sweep) var(--alea-motion-ease-in-out), opacity var(--alea-motion-duration-base) var(--alea-motion-ease-in-out) var(--alea-bp-sweep), visibility 0s linear calc(var(--alea-bp-sweep) + var(--alea-motion-duration-base));\n}\n.alea-blueprint-canvas { position: absolute; left: 0; top: 0; display: block; }\n.alea-skeleton-blueprint:not([data-state='loaded']) .alea-blueprint-sheet { transition: none; -webkit-mask-image: none; mask-image: none; }\n.alea-skeleton-blueprint[data-state='loaded'] .alea-blueprint-sheet { opacity: 0; visibility: hidden; }\n.alea-skeleton-blueprint-content {\n display: block; visibility: hidden; opacity: 0; transform: translateY(var(--alea-space-1)); filter: blur(4px);\n -webkit-mask-image: linear-gradient(to bottom, #000 calc(var(--alea-bp-edge) - 48px), transparent var(--alea-bp-edge)); mask-image: linear-gradient(to bottom, #000 calc(var(--alea-bp-edge) - 48px), transparent var(--alea-bp-edge));\n}\n.alea-skeleton-blueprint[data-state='loaded'] .alea-skeleton-blueprint-content {\n visibility: visible; opacity: 1; transform: none; filter: blur(0);\n transition: --alea-bp-edge var(--alea-bp-sweep) var(--alea-motion-ease-in-out), opacity var(--alea-motion-duration-instant) linear, filter calc(var(--alea-bp-sweep) + var(--alea-motion-duration-fast)) var(--alea-motion-ease-out) var(--alea-motion-duration-instant), transform calc(var(--alea-bp-sweep) + var(--alea-motion-duration-fast)) var(--alea-motion-ease-out) var(--alea-motion-duration-instant);\n}\n@media (prefers-reduced-motion: reduce) {\n :root:not([data-alea-reduced='never']) .alea-blueprint-sheet { transition: opacity var(--alea-motion-duration-fast) linear, visibility 0s linear var(--alea-motion-duration-fast); }\n :root:not([data-alea-reduced='never']) .alea-skeleton-blueprint[data-state='loaded'] .alea-skeleton-blueprint-content { transition: opacity var(--alea-motion-duration-fast) linear; transform: none; filter: none; }\n}\n:is([data-alea-motion='reduced'], [data-alea-reduced='always']) .alea-blueprint-sheet { transition: opacity var(--alea-motion-duration-fast) linear, visibility 0s linear var(--alea-motion-duration-fast); }\n:is([data-alea-motion='reduced'], [data-alea-reduced='always']) .alea-skeleton-blueprint[data-state='loaded'] .alea-skeleton-blueprint-content { transition: opacity var(--alea-motion-duration-fast) linear; transform: none; filter: none; }\n"}],"deps":["icon","button","display","overlay"],"npm":["react-aria-components","lucide-react","@alea-design/motion"],"exports":["ProgressBar","ProgressCircle","Meter","Skeleton","Alert","ToastProvider","useToast","Spinner","Toggletip","InfoLabel","InlineLoading"],"descriptions":{"ProgressBar":"How far a task has come: tones, three sizes, stripes, the value on top or at the end, and a description. Without value it is indeterminate.","ProgressCircle":"Circular progress, for compact places: four sizes, tones, thickness and anything in the middle.","Meter":"A measured amount within a known range (storage, password strength, contrast). Not progress.","Skeleton":"A placeholder with a soft shimmer while content loads. Hidden from screen readers; mark the region aria-busy. animation=\"matrix\" is a field of dots that wraps its content: it announces Loading, and dissolves into the children when isLoaded turns true.","Alert":"A message in the page: info, success, warning, danger, accent or neutral, in four looks and two sizes.","ToastProvider":"Shows toasts anywhere below it; put it once near the root.","useToast":"show({ title, tone, description, action, timeout }) and close(id). Needs a ToastProvider above.","Spinner":"An indeterminate loading ring in the accent gradient.","Toggletip":"A small info button that opens a popover on press: for explanations people may want to read, with links if needed. Escape or a press outside closes it.","InfoLabel":"A label with an info button beside it, for fields that need a longer explanation than help text.","InlineLoading":"A small status line for an action in progress: a spinner, then a check or an error, with text. Screen readers hear each change."}},"field":{"files":[{"path":"components/field/Field.tsx","content":"import { useRef, useState, type ReactNode } from 'react';\nimport {\n FieldError as RACFieldError, Input, Label as RACLabel, Text, TextArea as RACTextArea, TextField as RACTextField,\n SearchField as RACSearchField, NumberField as RACNumberField, Group, Button as RACButton,\n type TextFieldProps as RACTextFieldProps, type SearchFieldProps as RACSearchFieldProps, type NumberFieldProps as RACNumberFieldProps, type ValidationResult, type LabelProps,\n} from 'react-aria-components';\nimport { Search, X, Eye, EyeOff, Minus, Plus, ChevronUp, ChevronDown } from 'lucide-react';\nimport { cx, withBase } from '../../utils/cx';\nimport { useStrings } from '../../i18n/strings';\nimport { useControlled } from '../../utils/controlled';\nimport { responsiveAttrs } from '../../utils/responsive';\nimport type { Responsive } from '../../utils/responsive';\nimport { Spinner } from '../feedback/Spinner';\nimport { FieldSpinner, loadingAttrs } from './FieldLoading';\n\n/** A field label. Marks optional or required fields. */\nexport function Label({ className, ...props }: LabelProps) {\n return <RACLabel {...props} className={cx('alea-label', className)} />;\n}\n\n/** Help text under a field. */\nexport interface DescriptionProps {\n /** Extra class names. */\n className?: string;\n /** The help text. */\n children?: ReactNode;\n}\n\n/** Help text under a field, linked to it so screen readers read it after the label. */\nexport function Description({ className, ...props }: DescriptionProps) {\n return <Text {...props} slot=\"description\" className={cx('alea-description', className)} />;\n}\n\n/** The validation message, shown when the field is invalid. */\nexport interface FieldErrorProps {\n /** Extra class names. */\n className?: string;\n /** The message, or a function of the validation result. */\n children?: ReactNode | ((v: ValidationResult) => ReactNode);\n}\n\n/** The validation message of a field, shown and announced when the value is invalid. */\nexport function FieldError({ className, ...props }: FieldErrorProps) {\n return <RACFieldError {...props} className={cx('alea-field-error', className)} />;\n}\n\nexport type FieldSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\nexport type FieldVariant = 'outline' | 'filled' | 'underline' | 'borderless';\n\ninterface FieldBits {\n /** The visible label. Use aria-label instead only when the context makes it obvious. */\n label?: ReactNode;\n /** Help text under the field. */\n description?: ReactNode;\n /** Error text, or a function of the validation result. Shown when invalid. */\n errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);\n /** A warning that does not block: the border turns amber and the text shows under the field. */\n warningMessage?: ReactNode;\n /** Shows \"(optional)\" after the label. */\n showOptional?: boolean;\n /** xs 28 px, sm 32 px, md 44 px (default), lg 48 px, xl 56 px. Can change per breakpoint: { base: 'lg', md: 'md' }. */\n size?: Responsive<FieldSize>;\n /** outline (default), filled (tinted, no border until hover), underline (a bottom line only) or borderless (for inline editing and toolbars). */\n variant?: FieldVariant;\n /** top (default) or side: the label sits to the left from 640 px up and goes back on top on phones. Set the label column with --alea-label-width. */\n labelPosition?: 'top' | 'side';\n}\n\nconst fieldAttrs = (size: Responsive<FieldSize> | undefined, variant: FieldVariant, labelPosition: 'top' | 'side', warning: ReactNode, isLoading?: boolean) => ({\n ...responsiveAttrs('size', size, 'md'), 'data-variant': variant !== 'outline' ? variant : undefined,\n 'data-label-position': labelPosition !== 'top' ? labelPosition : undefined, 'data-warning': warning ? true : undefined, ...loadingAttrs(isLoading),\n});\n\nfunction LabelLine({ label, showOptional, isRequired }: { label?: ReactNode; showOptional?: boolean; isRequired?: boolean }) {\n const t = useStrings();\n if (!label) return null;\n return <Label>{label}{isRequired && <span className=\"alea-label-required\" aria-hidden=\"true\"> *</span>}{showOptional && !isRequired && <span className=\"alea-label-optional\"> ({t.optional})</span>}</Label>;\n}\n\n/** Under the field: help text and warning (read with the field), the error, and a character count. */\nfunction Footer({ description, errorMessage, warningMessage, count }: Pick<FieldBits, 'description' | 'errorMessage' | 'warningMessage'> & { count?: { n: number; max?: number } }) {\n const t = useStrings();\n const left = count?.max != null ? count.max - count.n : undefined;\n return (\n <>\n {(description || warningMessage) && <Description>{description}{warningMessage && <span className=\"alea-field-warning\">{warningMessage}</span>}</Description>}\n <FieldError>{errorMessage}</FieldError>\n {count && (\n <span className=\"alea-field-count\" data-over={left != null && left < 0 ? true : undefined}>\n <span aria-hidden=\"true\">{count.max != null ? `${count.n} / ${count.max}` : count.n}</span>\n <span className=\"alea-visually-hidden\" aria-live=\"polite\">{left != null && left <= 10 ? (left < 0 ? t.overLimit(-left) : t.charactersLeft(left)) : ''}</span>\n </span>\n )}\n </>\n );\n}\n\nexport interface TextFieldProps extends Omit<RACTextFieldProps, 'children'>, FieldBits {\n /** An example of what to type; never a replacement for the label. */\n placeholder?: string;\n /** Icon or text inside the field, before the value. */\n prefix?: ReactNode;\n /** Icon or text inside the field, after the value. */\n suffix?: ReactNode;\n /** A box attached outside the input on the left, like https://. */\n addonStart?: ReactNode;\n /** A box attached on the right, like .com or a unit. */\n addonEnd?: ReactNode;\n /** Shows a clear button while there is text. */\n isClearable?: boolean;\n /** Shows how many characters there are, and the limit with maxLength. Screen readers hear it when 10 or fewer are left. */\n showCount?: boolean;\n /** Shows a spinner at the end of the text, for a value being checked or looked up. It takes no room, the field stays editable, and screen readers hear it as busy. */\n isLoading?: boolean;\n}\n\n/** A single-line text input: label (top or side), help, warning and error, prefix and suffix, addons, a clear button, a character count, four variants and five sizes. */\nexport function TextField({ label, description, errorMessage, warningMessage, showOptional, size, variant = 'outline', labelPosition = 'top', placeholder, prefix, suffix, addonStart, addonEnd, isClearable, showCount, isLoading, className, value, defaultValue, onChange, ...props }: TextFieldProps) {\n const t = useStrings();\n const [val, setVal] = useControlled(value, defaultValue ?? '', onChange);\n const input = useRef<HTMLInputElement>(null);\n return (\n <RACTextField {...props} value={val} onChange={setVal} className={withBase('alea-field', className as any)} {...fieldAttrs(size, variant, labelPosition, warningMessage, isLoading)}>\n <LabelLine label={label} showOptional={showOptional} isRequired={props.isRequired} />\n <div className=\"alea-input-wrap\">\n {addonStart && <span className=\"alea-input-addon\" data-side=\"start\">{addonStart}</span>}\n {prefix && <span className=\"alea-input-affix\" data-side=\"start\">{prefix}</span>}\n <Input ref={input} className=\"alea-input\" placeholder={placeholder} aria-busy={isLoading || undefined} />\n {isLoading && <FieldSpinner />}\n {isClearable && val && !props.isDisabled && !props.isReadOnly && <RACButton className=\"alea-input-clear alea-focus-ring\" aria-label={t.clear} onPress={() => { setVal(''); input.current?.focus(); }}><X size={14} /></RACButton>}\n {suffix && <span className=\"alea-input-affix\" data-side=\"end\">{suffix}</span>}\n {addonEnd && <span className=\"alea-input-addon\" data-side=\"end\">{addonEnd}</span>}\n </div>\n <Footer description={description} errorMessage={errorMessage} warningMessage={warningMessage} count={showCount ? { n: val.length, max: props.maxLength } : undefined} />\n </RACTextField>\n );\n}\n\nexport interface TextAreaProps extends Omit<RACTextFieldProps, 'children'>, FieldBits {\n /** An example of what to type. */\n placeholder?: string;\n /** Visible lines. Default 4. */\n rows?: number;\n /** Grows with the text up to maxRows. */\n autoGrow?: boolean;\n /** With autoGrow, the most lines before it scrolls. Default 12. */\n maxRows?: number;\n /** Which way people can drag to resize: vertical (default), none or both. */\n resize?: 'vertical' | 'none' | 'both';\n /** Shows how many characters there are, and the limit with maxLength. */\n showCount?: boolean;\n /** Shows a spinner in the top corner while the text is saved or checked. It takes no room, the field stays editable, and screen readers hear it as busy. */\n isLoading?: boolean;\n}\n\n/** Multi-line text, optionally growing with its content, with a character count. */\nexport function TextArea({ label, description, errorMessage, warningMessage, showOptional, size, variant = 'outline', labelPosition = 'top', placeholder, rows = 4, autoGrow, maxRows = 12, resize = 'vertical', showCount, isLoading, className, value, defaultValue, onChange, ...props }: TextAreaProps) {\n const [val, setVal] = useControlled(value, defaultValue ?? '', onChange);\n return (\n <RACTextField {...props} value={val} onChange={setVal} className={withBase('alea-field', className as any)} {...fieldAttrs(size, variant, labelPosition, warningMessage, isLoading)}>\n <LabelLine label={label} showOptional={showOptional} isRequired={props.isRequired} />\n <div className=\"alea-input-wrap alea-textarea-wrap\">\n <RACTextArea\n className=\"alea-input alea-textarea\"\n placeholder={placeholder}\n rows={rows}\n aria-busy={isLoading || undefined}\n data-autogrow={autoGrow || undefined}\n style={{ resize: autoGrow ? 'none' : resize, ...(autoGrow ? ({ fieldSizing: 'content', minBlockSize: `calc(${rows} * 1.5em + var(--alea-space-6))`, maxBlockSize: `calc(${maxRows} * 1.5em + var(--alea-space-6))` } as any) : {}) }}\n />\n {isLoading && <FieldSpinner />}\n </div>\n <Footer description={description} errorMessage={errorMessage} warningMessage={warningMessage} count={showCount ? { n: val.length, max: props.maxLength } : undefined} />\n </RACTextField>\n );\n}\n\nexport interface SearchFieldProps extends Omit<RACSearchFieldProps, 'children'>, FieldBits {\n /** Placeholder text. Default \"Search\". */\n placeholder?: string;\n /** Shows a spinner in place of the search icon while results load (same size, so nothing moves). The field stays editable and screen readers hear it as busy. */\n isLoading?: boolean;\n /** A keyboard hint shown while the field is empty, like ⌘K or /. Bind the key yourself. */\n shortcut?: ReactNode;\n}\n\n/** A search box with a clear button; Escape clears it too. */\nexport function SearchField({ label, description, errorMessage, warningMessage, showOptional, size, variant = 'outline', labelPosition = 'top', placeholder, isLoading, shortcut, className, onClear, ...props }: SearchFieldProps) {\n const t = useStrings(); placeholder ??= t.search;\n // what was typed dissolves word by word when cleared (the dissolve pattern)\n const last = useRef('');\n const [ghost, setGhost] = useState<{ id: number; words: string[] } | null>(null);\n return (\n <RACSearchField {...props} onClear={() => { if (last.current.trim()) setGhost({ id: Date.now(), words: last.current.split(/(\\s+)/) }); last.current = ''; onClear?.(); }} className={withBase('alea-field alea-search-field', className as any)} {...fieldAttrs(size, variant, labelPosition, warningMessage, isLoading)}>\n <LabelLine label={label} showOptional={showOptional} isRequired={props.isRequired} />\n <div className=\"alea-input-wrap\">\n <span className=\"alea-input-affix\" data-side=\"start\" aria-hidden={isLoading ? undefined : true}>{isLoading ? <Spinner size=\"sm\" aria-label={t.searching} /> : <Search size={16} />}</span>\n <Input className=\"alea-input\" placeholder={placeholder} aria-busy={isLoading || undefined} onInput={e => { last.current = (e.target as HTMLInputElement).value; }} />\n {ghost && <span key={ghost.id} className=\"alea-input-ghost\" aria-hidden=\"true\" onAnimationEnd={e => { if ((e.target as HTMLElement).parentElement?.lastElementChild === e.target) setGhost(null); }}>{ghost.words.map((w, i) => <span key={i} style={{ ['--alea-i' as string]: i }}>{w}</span>)}</span>}\n {shortcut && <kbd className=\"alea-input-kbd\" aria-hidden=\"true\">{shortcut}</kbd>}\n <RACButton className=\"alea-input-clear alea-focus-ring\" aria-label={t.clearSearch}><X size={14} /></RACButton>\n </div>\n <Footer description={description} errorMessage={errorMessage} warningMessage={warningMessage} />\n </RACSearchField>\n );\n}\n\nexport interface PasswordFieldProps extends Omit<TextFieldProps, 'type' | 'suffix' | 'isClearable'> {\n /** Shows a four step strength meter under the field (length, case, digits and symbols). */\n showStrength?: boolean;\n /** Your own score from 0 (weak) to 3 (strong), from your own password checker. */\n strength?: (value: string) => 0 | 1 | 2 | 3;\n}\n\n/** A rough strength score: length, mixed case, digits and symbols. */\nexport function passwordScore(v: string): 0 | 1 | 2 | 3 {\n let s = 0;\n if (v.length >= 8) s++;\n if (v.length >= 12) s++;\n if (/[a-z]/.test(v) && /[A-Z]/.test(v)) s++;\n if (/\\d/.test(v)) s++;\n if (/[^A-Za-z0-9]/.test(v)) s++;\n return (s <= 1 ? 0 : s === 2 ? 1 : s === 3 ? 2 : 3) as 0 | 1 | 2 | 3;\n}\n\n/** A password input with a show/hide button and an optional strength meter. */\nexport function PasswordField({ label, showStrength, strength = passwordScore, value, defaultValue, onChange, description, ...props }: PasswordFieldProps) {\n const t = useStrings(); label ??= t.password;\n const [visible, setVisible] = useState(false);\n const [val, setVal] = useControlled(value, defaultValue ?? '', onChange);\n const score = val ? strength(val) : -1;\n return (\n <TextField\n {...props}\n label={label}\n value={val}\n onChange={setVal}\n type={visible ? 'text' : 'password'}\n autoComplete={props.autoComplete || 'current-password'}\n description={showStrength && score >= 0 ? <>{description}<span className=\"alea-strength\" data-score={score}><span className=\"alea-strength-bars\" aria-hidden=\"true\"><i /><i /><i /><i /></span><span aria-live=\"polite\">{t.passwordStrength}: {t.strengthLevels[score as 0 | 1 | 2 | 3]}</span></span></> : description}\n suffix={\n <RACButton className=\"alea-input-clear alea-focus-ring\" aria-label={visible ? t.hidePassword : t.showPassword} aria-pressed={visible} onPress={() => setVisible(v => !v)}>\n {visible ? <EyeOff size={16} /> : <Eye size={16} />}\n </RACButton>\n }\n />\n );\n}\n\nexport interface NumberFieldProps extends Omit<RACNumberFieldProps, 'children'>, FieldBits {\n /** Placeholder text. */\n placeholder?: string;\n /** Shows the − and + buttons. Default true. */\n showStepper?: boolean;\n /** sides: − on the left and + on the right (default); end: small up and down arrows on the right. */\n stepperPosition?: 'sides' | 'end';\n /** Icon or text before the value (a currency sign when you do not use formatOptions). */\n prefix?: ReactNode;\n /** Icon or text after the value (a unit). */\n suffix?: ReactNode;\n /** Shows a spinner at the end of the number while it is saved or checked. It takes no room, the field stays editable, and screen readers hear it as busy. */\n isLoading?: boolean;\n}\n\n/** A number input with steppers, min, max, step and locale formatting (currency, percent, units). */\nexport function NumberField({ label, description, errorMessage, warningMessage, showOptional, size, variant = 'outline', labelPosition = 'top', placeholder, showStepper = true, stepperPosition = 'sides', prefix, suffix, isLoading, className, ...props }: NumberFieldProps) {\n const sides = showStepper && stepperPosition === 'sides';\n return (\n <RACNumberField {...props} className={withBase('alea-field', className as any)} {...fieldAttrs(size, variant, labelPosition, warningMessage, isLoading)}>\n <LabelLine label={label} showOptional={showOptional} isRequired={props.isRequired} />\n <Group className=\"alea-input-wrap alea-number\" data-stepper={showStepper ? stepperPosition : undefined}>\n {sides && <RACButton slot=\"decrement\" className=\"alea-stepper alea-focus-ring\"><Minus size={14} /></RACButton>}\n {prefix && <span className=\"alea-input-affix\" data-side=\"start\">{prefix}</span>}\n <Input className=\"alea-input\" placeholder={placeholder} aria-busy={isLoading || undefined} />\n {isLoading && <FieldSpinner />}\n {suffix && <span className=\"alea-input-affix\" data-side=\"end\">{suffix}</span>}\n {sides && <RACButton slot=\"increment\" className=\"alea-stepper alea-focus-ring\"><Plus size={14} /></RACButton>}\n {showStepper && stepperPosition === 'end' && (\n <span className=\"alea-stepper-col\">\n <RACButton slot=\"increment\" className=\"alea-stepper-mini alea-focus-ring\"><ChevronUp size={14} /></RACButton>\n <RACButton slot=\"decrement\" className=\"alea-stepper-mini alea-focus-ring\"><ChevronDown size={14} /></RACButton>\n </span>\n )}\n </Group>\n <Footer description={description} errorMessage={errorMessage} warningMessage={warningMessage} />\n </RACNumberField>\n );\n}\n\nexport interface InputGroupProps {\n /** Fields, selects and buttons to join into one control, like an amount and its currency, or a search and its button. */\n children: ReactNode;\n /** Name of the group for screen readers, when there is no visible label. */\n 'aria-label'?: string;\n /** Id of a visible label for the group. */\n 'aria-labelledby'?: string;\n /** Extra class names. */\n className?: string;\n}\n\n/** Joins several controls into one row with shared borders: amount and currency, search and button, prefix select and text. */\nexport function InputGroup({ children, className, ...props }: InputGroupProps) {\n return <Group {...props} className={cx('alea-input-group', className)}>{children}</Group>;\n}\n"},{"path":"components/field/FieldLoading.tsx","content":"import { Spinner } from '../feedback/Spinner';\nimport { useStrings } from '../../i18n/strings';\nimport { useAttrRef } from '../../utils/attr';\n\n// The loading mark of a field (internal, not exported from the package): a spinner that takes no room, so nothing in the field\n// moves when it appears. It sits at the end of the text, before any clear button, suffix or stepper.\nexport function FieldSpinner() {\n const t = useStrings();\n return <span className=\"alea-input-loading\"><Spinner size=\"sm\" aria-label={t.loading} /></span>;\n}\n\n/** Attribute for the root of a field that is loading: it only adds the busy sweep under the control. The control itself carries aria-busy. */\nexport const loadingAttrs = (isLoading?: boolean) => ({ 'data-loading': isLoading || undefined });\n\n/** Marks the element busy for screen readers. React Aria does not pass aria-busy through on some of its components (Select's button, Tree, Switch), so it is set on the element itself; `pick` finds the real control inside the element the ref points at. */\nexport function useBusy<T extends HTMLElement>(isBusy?: boolean, pick?: (root: T) => HTMLElement | null) {\n return useAttrRef<T>('aria-busy', isBusy ? 'true' : undefined, pick);\n}\n"},{"path":"components/field/field.css","content":".alea-field {\n --alea-input-h: var(--alea-size-field); --alea-input-font: var(--alea-font-size-base); --alea-input-pad: var(--alea-space-4); --alea-input-radius: var(--alea-radius-field);\n display: flex; flex-direction: column; gap: var(--alea-space-2); min-width: 0;\n}\n.alea-field[data-size='xs'] { --alea-input-h: 28px; --alea-input-font: var(--alea-font-size-sm); --alea-input-pad: var(--alea-space-2); --alea-input-radius: var(--alea-radius-xs); }\n.alea-field[data-size='sm'] { --alea-input-h: var(--alea-size-control-sm); --alea-input-font: var(--alea-font-size-md); --alea-input-pad: var(--alea-space-3); --alea-input-radius: var(--alea-radius-sm); }\n.alea-field[data-size='md'] { --alea-input-h: var(--alea-size-field); --alea-input-font: var(--alea-font-size-base); --alea-input-pad: var(--alea-space-4); --alea-input-radius: var(--alea-radius-field); }\n.alea-field[data-size='lg'] { --alea-input-h: var(--alea-size-control-lg); --alea-input-font: var(--alea-font-size-base); --alea-input-pad: var(--alea-space-4); --alea-input-radius: var(--alea-radius-field); }\n.alea-field[data-size='xl'] { --alea-input-h: 56px; --alea-input-font: var(--alea-font-size-lg); --alea-input-pad: var(--alea-space-5); --alea-input-radius: var(--alea-radius-field); }\n.alea-label { font: var(--alea-font-weight-medium) var(--alea-font-size-sm) / 1.3 var(--alea-font-family-body); color: var(--alea-text-muted); }\n.alea-label-required { color: var(--alea-status-danger); }\n.alea-label-optional { color: var(--alea-text-faint); font-weight: var(--alea-font-weight-regular); }\n.alea-description { font-size: var(--alea-font-size-xs); line-height: 1.45; color: var(--alea-text-faint); }\n.alea-field-error { font-size: var(--alea-font-size-xs); line-height: 1.45; color: var(--alea-status-danger); }\n.alea-field-warning { display: block; color: var(--alea-status-warning); }\n.alea-description > .alea-field-warning:first-child { margin: 0; }\n.alea-field-count { align-self: flex-end; margin-top: calc(-1 * var(--alea-space-1)); color: var(--alea-text-faint); font: var(--alea-font-size-xs) / 1.4 var(--alea-font-family-body); font-variant-numeric: tabular-nums; }\n.alea-field-count[data-over] { color: var(--alea-status-danger); }\n\n/* the label on the side, from 640 px up */\n@media (min-width: 640px) {\n .alea-field[data-label-position='side'] { display: grid; grid-template-columns: var(--alea-label-width, 160px) minmax(0, 1fr); column-gap: var(--alea-space-4); row-gap: var(--alea-space-2); align-items: start; }\n .alea-field[data-label-position='side'] > .alea-label { grid-column: 1; grid-row: 1; align-self: start; padding-top: calc((var(--alea-input-h) - 1.3em) / 2); }\n .alea-field[data-label-position='side'] > :not(.alea-label) { grid-column: 2; }\n}\n\n.alea-input-wrap {\n position: relative;\n display: flex;\n align-items: center;\n min-width: 0;\n height: var(--alea-input-h);\n border-radius: var(--alea-input-radius);\n background: var(--alea-field-bg);\n box-shadow: inset 0 0 0 1px var(--alea-border);\n transition: box-shadow var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), background-color var(--alea-motion-duration-slow) var(--alea-motion-ease-standard);\n}\n.alea-input-wrap:hover { box-shadow: inset 0 0 0 1px var(--alea-border-strong); }\n.alea-input-wrap:focus-within { box-shadow: inset 0 0 0 1px var(--alea-focus), 0 0 0 4px var(--alea-focus-halo); }\n.alea-field[data-warning]:not([data-invalid]) .alea-input-wrap { box-shadow: inset 0 0 0 1px var(--alea-status-warning), 0 0 0 4px var(--alea-status-warning-bg); }\n.alea-field[data-invalid] .alea-input-wrap { box-shadow: inset 0 0 0 1px var(--alea-status-danger), 0 0 0 4px var(--alea-status-danger-bg); }\n/* focused and invalid: keep the red border and add the focus ring outside, so focus is always visible */\n.alea-field[data-invalid] .alea-input-wrap:focus-within, .alea-field[data-warning] .alea-input-wrap:focus-within { box-shadow: inset 0 0 0 1px var(--alea-status-danger), 0 0 0 2px var(--alea-bg), 0 0 0 4px var(--alea-focus); }\n.alea-field[data-warning]:not([data-invalid]) .alea-input-wrap:focus-within { box-shadow: inset 0 0 0 1px var(--alea-status-warning), 0 0 0 2px var(--alea-bg), 0 0 0 4px var(--alea-focus); }\n/* dim the control, not the messages: an error on a disabled field must stay readable */\n.alea-field[data-disabled] > :not(.alea-field-error, .alea-field-warning) { opacity: 0.5; }\n\n/* variants */\n.alea-field[data-variant='filled'] .alea-input-wrap { background: var(--alea-surface-raised); box-shadow: none; }\n.alea-field[data-variant='filled'] .alea-input-wrap:hover { background: var(--alea-surface-hover); }\n.alea-field[data-variant='filled'] .alea-input-wrap:focus-within { background: var(--alea-field-bg); box-shadow: inset 0 0 0 1px var(--alea-focus), 0 0 0 4px var(--alea-focus-halo); }\n.alea-field[data-variant='underline'] .alea-input-wrap { --alea-input-pad: var(--alea-space-0); border-radius: 0; background: transparent; box-shadow: inset 0 -1px 0 var(--alea-border-strong); }\n.alea-field[data-variant='underline'] .alea-input-wrap:hover { box-shadow: inset 0 -1px 0 var(--alea-border-control); }\n.alea-field[data-variant='underline'] .alea-input-wrap:focus-within { box-shadow: inset 0 -2px 0 var(--alea-focus); }\n.alea-field[data-variant='underline'][data-invalid] .alea-input-wrap { box-shadow: inset 0 -2px 0 var(--alea-status-danger); }\n.alea-field[data-variant='underline'][data-warning]:not([data-invalid]) .alea-input-wrap { box-shadow: inset 0 -2px 0 var(--alea-status-warning); }\n.alea-field[data-variant='underline'] .alea-input-affix[data-side='start'] { padding-left: 0; }\n.alea-field[data-variant='borderless'] .alea-input-wrap { background: transparent; box-shadow: none; }\n.alea-field[data-variant='borderless'] .alea-input-wrap:hover { background: var(--alea-surface-hover); }\n.alea-field[data-variant='borderless'] .alea-input-wrap:focus-within { background: var(--alea-surface-hover); box-shadow: 0 0 0 2px var(--alea-focus); }\n/* invalid fields keep their red ring in the filled and borderless looks (the rules above reset box-shadow after the state rules) */\n.alea-field[data-invalid]:is([data-variant='filled'], [data-variant='borderless']) .alea-input-wrap:not(:focus-within) { box-shadow: inset 0 0 0 1px var(--alea-status-danger), 0 0 0 4px var(--alea-status-danger-bg); }\n.alea-field[data-invalid]:is([data-variant='filled'], [data-variant='borderless']) .alea-input-wrap:focus-within { box-shadow: inset 0 0 0 1px var(--alea-status-danger), 0 0 0 2px var(--alea-bg), 0 0 0 4px var(--alea-focus); }\n\n.alea-input {\n flex: 1;\n min-width: 0;\n height: 100%;\n padding: 0 var(--alea-input-pad);\n border: 0;\n border-radius: inherit;\n background: transparent;\n color: var(--alea-text);\n font: var(--alea-font-weight-regular) var(--alea-input-font) / 1.4 var(--alea-font-family-body);\n outline: none;\n}\n.alea-input::placeholder { color: var(--alea-text-faint); }\n.alea-input[data-disabled] { cursor: not-allowed; }\n.alea-input-affix { display: inline-flex; align-items: center; color: var(--alea-text-muted); font-size: var(--alea-font-size-md); flex: none; }\n.alea-input-affix[data-side='start'] { padding-left: var(--alea-input-pad); margin-right: calc(-1 * var(--alea-space-2)); }\n.alea-input-affix[data-side='end'] { padding-right: var(--alea-space-2); }\n.alea-input-affix svg { width: 16px; height: 16px; }\n.alea-input-addon { display: inline-flex; align-items: center; align-self: stretch; flex: none; padding: 0 var(--alea-input-pad); background: var(--alea-surface-raised); color: var(--alea-text-muted); font-size: var(--alea-font-size-md); white-space: nowrap; }\n.alea-input-addon[data-side='start'] { border-radius: var(--alea-input-radius) 0 0 var(--alea-input-radius); box-shadow: inset -1px 0 0 var(--alea-border); }\n.alea-input-addon[data-side='end'] { border-radius: 0 var(--alea-input-radius) var(--alea-input-radius) 0; box-shadow: inset 1px 0 0 var(--alea-border); }\n.alea-input-kbd { flex: none; margin-right: var(--alea-space-2); padding: var(--alea-space-0-5) var(--alea-space-2); border-radius: var(--alea-radius-xs); box-shadow: inset 0 0 0 1px var(--alea-border-strong); color: var(--alea-text-faint); font: var(--alea-font-weight-medium) var(--alea-font-size-xs) / 1.3 var(--alea-font-family-mono); }\n.alea-search-field:not([data-empty]) .alea-input-kbd { display: none; }\n.alea-input-clear {\n display: inline-grid; place-items: center; flex: none;\n width: 28px; height: 28px; margin-right: var(--alea-space-2);\n border: 0; border-radius: var(--alea-radius-full);\n background: transparent; color: var(--alea-text-muted); cursor: pointer;\n}\n.alea-field[data-size='xs'] .alea-input-clear { width: 20px; height: 20px; margin-right: var(--alea-space-1); }\n.alea-input-clear[data-hovered] { background: var(--alea-surface-hover); color: var(--alea-text); }\n.alea-search-field[data-empty] .alea-input-clear { visibility: hidden; }\n.alea-search-field[data-empty] .alea-input-kbd + .alea-input-clear { display: none; }\n.alea-search-field .alea-input::-webkit-search-cancel-button { display: none; }\n\n.alea-textarea-wrap { height: auto; align-items: stretch; }\n/* a textarea on its own (Mentions, Editable, MarkdownEditor) draws its own box */\n.alea-textarea {\n height: auto; padding: var(--alea-space-3) var(--alea-input-pad, var(--alea-space-4)); border: 0; border-radius: var(--alea-input-radius, var(--alea-radius-field));\n background: var(--alea-field-bg); box-shadow: inset 0 0 0 1px var(--alea-border); color: var(--alea-text); outline: none;\n font: var(--alea-font-weight-regular) var(--alea-input-font, var(--alea-font-size-base)) / var(--alea-font-leading-normal) var(--alea-font-family-body);\n resize: vertical; transition: box-shadow var(--alea-motion-duration-fast) var(--alea-motion-ease-standard);\n}\n.alea-textarea:not(.alea-textarea-wrap > *):is([data-hovered], :hover) { box-shadow: inset 0 0 0 1px var(--alea-border-strong); }\n.alea-textarea:not(.alea-textarea-wrap > *):is([data-focused], :focus-visible) { box-shadow: inset 0 0 0 1px var(--alea-focus), 0 0 0 4px var(--alea-focus-halo); }\n.alea-textarea-wrap > .alea-textarea { background: transparent; box-shadow: none; border-radius: inherit; }\n.alea-textarea[data-autogrow] { overflow: auto; }\n\n.alea-number .alea-input { text-align: center; font-variant-numeric: tabular-nums; }\n.alea-number[data-stepper='end'] .alea-input, .alea-number:not([data-stepper]) .alea-input { text-align: start; }\n/* steppers on both sides: the value is centered between them, so it needs little padding (narrow quantity fields) */\n.alea-number[data-stepper='sides'] .alea-input { padding-inline: var(--alea-space-1); min-width: 2ch; }\n.alea-stepper {\n display: grid; place-items: center; flex: none;\n width: 32px; height: 32px; margin: 0 var(--alea-space-2);\n border: 0; border-radius: var(--alea-radius-full);\n background: var(--alea-surface-raised); color: var(--alea-text); cursor: pointer;\n}\n.alea-field:is([data-size='xs'], [data-size='sm']) .alea-stepper { width: 20px; height: 20px; margin: 0 var(--alea-space-1); }\n.alea-stepper[data-hovered] { background: var(--alea-surface-hover); box-shadow: inset 0 0 0 1px var(--alea-border-strong); }\n.alea-stepper[data-pressed] { transform: scale(calc(1 - (1 - var(--alea-motion-scale-press)) * 1.5)); }\n.alea-stepper[data-disabled], .alea-stepper-mini[data-disabled] { opacity: 0.35; cursor: not-allowed; }\n.alea-stepper-col { display: flex; flex-direction: column; align-self: stretch; flex: none; width: 28px; box-shadow: inset 1px 0 0 var(--alea-border); }\n.alea-stepper-mini { flex: 1; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: var(--alea-text-muted); cursor: pointer; }\n.alea-stepper-mini:first-child { border-top-right-radius: var(--alea-input-radius); box-shadow: inset 0 -1px 0 var(--alea-border); }\n.alea-stepper-mini:last-child { border-bottom-right-radius: var(--alea-input-radius); }\n.alea-stepper-mini[data-hovered] { background: var(--alea-surface-hover); color: var(--alea-text); }\n\n/* password strength */\n.alea-strength { display: flex; align-items: center; gap: var(--alea-space-2); margin-top: var(--alea-space-1); }\n.alea-strength-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--alea-space-1); width: 120px; }\n.alea-strength-bars i { height: 4px; border-radius: var(--alea-radius-2xs); background: var(--alea-border-strong); transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-out); }\n.alea-strength[data-score='0'] i:nth-child(-n+1) { background: var(--alea-status-danger); }\n.alea-strength[data-score='1'] i:nth-child(-n+2) { background: var(--alea-status-warning); }\n.alea-strength[data-score='2'] i:nth-child(-n+3) { background: var(--alea-accent); }\n.alea-strength[data-score='3'] i { background: var(--alea-status-success); }\n\n/* responsive size */\n@media (min-width: 640px) {\n .alea-field[data-size-sm='xs'] { --alea-input-h: 28px; --alea-input-font: var(--alea-font-size-sm); --alea-input-pad: var(--alea-space-2); --alea-input-radius: var(--alea-radius-xs); }\n .alea-field[data-size-sm='sm'] { --alea-input-h: var(--alea-size-control-sm); --alea-input-font: var(--alea-font-size-md); --alea-input-pad: var(--alea-space-3); --alea-input-radius: var(--alea-radius-sm); }\n .alea-field[data-size-sm='md'] { --alea-input-h: var(--alea-size-field); --alea-input-font: var(--alea-font-size-base); --alea-input-pad: var(--alea-space-4); --alea-input-radius: var(--alea-radius-field); }\n .alea-field[data-size-sm='lg'] { --alea-input-h: var(--alea-size-control-lg); --alea-input-font: var(--alea-font-size-base); --alea-input-pad: var(--alea-space-4); --alea-input-radius: var(--alea-radius-field); }\n .alea-field[data-size-sm='xl'] { --alea-input-h: 56px; --alea-input-font: var(--alea-font-size-lg); --alea-input-pad: var(--alea-space-5); --alea-input-radius: var(--alea-radius-field); }\n}\n@media (min-width: 768px) {\n .alea-field[data-size-md='xs'] { --alea-input-h: 28px; --alea-input-font: var(--alea-font-size-sm); --alea-input-pad: var(--alea-space-2); --alea-input-radius: var(--alea-radius-xs); }\n .alea-field[data-size-md='sm'] { --alea-input-h: var(--alea-size-control-sm); --alea-input-font: var(--alea-font-size-md); --alea-input-pad: var(--alea-space-3); --alea-input-radius: var(--alea-radius-sm); }\n .alea-field[data-size-md='md'] { --alea-input-h: var(--alea-size-field); --alea-input-font: var(--alea-font-size-base); --alea-input-pad: var(--alea-space-4); --alea-input-radius: var(--alea-radius-field); }\n .alea-field[data-size-md='lg'] { --alea-input-h: var(--alea-size-control-lg); --alea-input-font: var(--alea-font-size-base); --alea-input-pad: var(--alea-space-4); --alea-input-radius: var(--alea-radius-field); }\n .alea-field[data-size-md='xl'] { --alea-input-h: 56px; --alea-input-font: var(--alea-font-size-lg); --alea-input-pad: var(--alea-space-5); --alea-input-radius: var(--alea-radius-field); }\n}\n@media (min-width: 1024px) {\n .alea-field[data-size-lg='xs'] { --alea-input-h: 28px; --alea-input-font: var(--alea-font-size-sm); --alea-input-pad: var(--alea-space-2); --alea-input-radius: var(--alea-radius-xs); }\n .alea-field[data-size-lg='sm'] { --alea-input-h: var(--alea-size-control-sm); --alea-input-font: var(--alea-font-size-md); --alea-input-pad: var(--alea-space-3); --alea-input-radius: var(--alea-radius-sm); }\n .alea-field[data-size-lg='md'] { --alea-input-h: var(--alea-size-field); --alea-input-font: var(--alea-font-size-base); --alea-input-pad: var(--alea-space-4); --alea-input-radius: var(--alea-radius-field); }\n .alea-field[data-size-lg='lg'] { --alea-input-h: var(--alea-size-control-lg); --alea-input-font: var(--alea-font-size-base); --alea-input-pad: var(--alea-space-4); --alea-input-radius: var(--alea-radius-field); }\n .alea-field[data-size-lg='xl'] { --alea-input-h: 56px; --alea-input-font: var(--alea-font-size-lg); --alea-input-pad: var(--alea-space-5); --alea-input-radius: var(--alea-radius-field); }\n}\n@media (min-width: 1280px) {\n .alea-field[data-size-xl='xs'] { --alea-input-h: 28px; --alea-input-font: var(--alea-font-size-sm); --alea-input-pad: var(--alea-space-2); --alea-input-radius: var(--alea-radius-xs); }\n .alea-field[data-size-xl='sm'] { --alea-input-h: var(--alea-size-control-sm); --alea-input-font: var(--alea-font-size-md); --alea-input-pad: var(--alea-space-3); --alea-input-radius: var(--alea-radius-sm); }\n .alea-field[data-size-xl='md'] { --alea-input-h: var(--alea-size-field); --alea-input-font: var(--alea-font-size-base); --alea-input-pad: var(--alea-space-4); --alea-input-radius: var(--alea-radius-field); }\n .alea-field[data-size-xl='lg'] { --alea-input-h: var(--alea-size-control-lg); --alea-input-font: var(--alea-font-size-base); --alea-input-pad: var(--alea-space-4); --alea-input-radius: var(--alea-radius-field); }\n .alea-field[data-size-xl='xl'] { --alea-input-h: 56px; --alea-input-font: var(--alea-font-size-lg); --alea-input-pad: var(--alea-space-5); --alea-input-radius: var(--alea-radius-field); }\n}\n\n\n/* InputGroup: controls joined into one row (hidden <template> siblings do not count as first or last) */\n.alea-input-group { display: flex; align-items: flex-end; min-width: 0; }\n.alea-input-group > * { min-width: 0; }\n.alea-input-group > .alea-field:not(.alea-select) { flex: 1; }\n.alea-input-group > .alea-select { flex: none; width: auto; }\n.alea-input-group > :not(:nth-child(1 of :not(template))) :is(.alea-input-wrap, .alea-select-trigger), .alea-input-group > .alea-button:not(:nth-child(1 of :not(template))) { border-top-left-radius: 0; border-bottom-left-radius: 0; }\n.alea-input-group > :not(:nth-last-child(1 of :not(template))) :is(.alea-input-wrap, .alea-select-trigger), .alea-input-group > .alea-button:not(:nth-last-child(1 of :not(template))) { border-top-right-radius: 0; border-bottom-right-radius: 0; }\n.alea-input-group > :not(template):not(:nth-child(1 of :not(template))) { margin-left: calc(var(--alea-space-0-25) * -1); }\n.alea-input-group > .alea-button { height: var(--alea-size-field); }\n.alea-input-group :is(.alea-input-wrap, .alea-select-trigger):focus-within, .alea-input-group .alea-select[data-open] .alea-select-trigger, .alea-input-group .alea-select-trigger[data-focus-visible] { position: relative; z-index: 1; }\n\n/* loading (isLoading): a spinner that takes no room, and a sweep under the control. Nothing moves when it shows. */\n.alea-input-loading { position: relative; flex: none; align-self: stretch; width: 0; pointer-events: none; }\n.alea-input-loading .alea-spinner { position: absolute; top: 50%; right: var(--alea-space-2); translate: 0 -50%; animation: alea-field-loading-in var(--alea-motion-duration-fast) var(--alea-motion-ease-out) both; }\n.alea-field[data-loading]:not(.alea-search-field, .alea-autocomplete) .alea-input { padding-right: calc(var(--alea-input-pad) + var(--alea-space-6)); }\n.alea-textarea-wrap > .alea-input-loading { position: absolute; top: var(--alea-space-3); right: var(--alea-space-3); width: var(--alea-space-4); height: var(--alea-space-4); align-self: auto; }\n.alea-textarea-wrap > .alea-input-loading .alea-spinner { top: 0; right: 0; translate: none; }\n.alea-field[data-loading] :is(.alea-input-wrap, .alea-select-trigger) { position: relative; }\n.alea-field[data-loading] :is(.alea-input-wrap, .alea-select-trigger)::after {\n content: ''; position: absolute; left: var(--alea-input-radius); right: var(--alea-input-radius); bottom: 0; height: 2px; border-radius: var(--alea-radius-full); pointer-events: none;\n background: linear-gradient(90deg, transparent, var(--alea-accent), var(--alea-accent-second), transparent) no-repeat 0 0 / 40% 100%;\n animation: alea-field-sweep 1.4s var(--alea-motion-ease-in-out) infinite alternate;\n}\n.alea-field[data-variant='underline'][data-loading] :is(.alea-input-wrap, .alea-select-trigger)::after { left: 0; right: 0; }\n@keyframes alea-field-loading-in { from { opacity: 0.01; scale: 0.6; } }\n@keyframes alea-field-sweep { from { background-position-x: 0; } to { background-position-x: 100%; } }\n@media (prefers-reduced-motion: reduce) {\n .alea-input-loading .alea-spinner, .alea-field[data-loading] :is(.alea-input-wrap, .alea-select-trigger)::after { animation: none; }\n .alea-field[data-loading] :is(.alea-input-wrap, .alea-select-trigger)::after { background-size: 100% 100%; opacity: 0.5; }\n}\n"}],"deps":["feedback"],"npm":["react-aria-components","lucide-react"],"exports":["Label","Description","FieldError","TextField","TextArea","SearchField","passwordScore","PasswordField","NumberField","InputGroup","loadingAttrs","useBusy","FieldSpinner"],"descriptions":{"Label":"A field label. Marks optional or required fields.","Description":"Help text under a field, linked to it so screen readers read it after the label.","FieldError":"The validation message of a field, shown and announced when the value is invalid.","TextField":"A single-line text input: label (top or side), help, warning and error, prefix and suffix, addons, a clear button, a character count, four variants and five sizes.","TextArea":"Multi-line text, optionally growing with its content, with a character count.","SearchField":"A search box with a clear button; Escape clears it too.","passwordScore":"A rough strength score: length, mixed case, digits and symbols.","PasswordField":"A password input with a show/hide button and an optional strength meter.","NumberField":"A number input with steppers, min, max, step and locale formatting (currency, percent, units).","InputGroup":"Joins several controls into one row with shared borders: amount and currency, search and button, prefix select and text.","loadingAttrs":"Attribute for the root of a field that is loading: it only adds the busy sweep under the control. The control itself carries aria-busy.","useBusy":"Marks the element busy for screen readers. React Aria does not pass aria-busy through on some of its components (Select's button, Tree, Switch), so it is set on the element itself; `pick` finds the real control inside the element the ref points at."}},"filter":{"files":[{"path":"components/filter/FilterBar.tsx","content":"import { useState, type ReactNode } from 'react';\nimport { DialogTrigger, Button as RACButton, type Key, type Selection } from 'react-aria-components';\nimport { Plus, X, ChevronDown } from 'lucide-react';\nimport { cx } from '../../utils/cx';\nimport { useControlled } from '../../utils/controlled';\nimport { Button } from '../button/Button';\nimport { SearchField, TextField } from '../field/Field';\nimport { Switch } from '../choice/Choice';\nimport { DropdownMenu, MenuItem } from '../menu/Menu';\nimport { Popover, PopoverDialog } from '../overlay/Overlay';\nimport { ListBox, SelectItem } from '../select/Select';\nimport { Tabs, TabList, Tab } from '../tabs/Tabs';\nimport { useStrings } from '../../i18n/strings';\n\n/** A filter people can add: what it filters, and how they pick its value. */\nexport interface FilterDef {\n id: string;\n label: string;\n /** select: one option; multi: several; text: contains; boolean: on or off. */\n type: 'select' | 'multi' | 'text' | 'boolean';\n options?: Array<{ id: string; label: string }>;\n icon?: ReactNode;\n}\nexport type FilterValue = Record<string, string | string[] | boolean | undefined>;\n\nexport interface FilterBarProps {\n /** The filters people can add. */\n filters: FilterDef[];\n /** The active filters and their values (controlled). */\n value?: FilterValue;\n /** The active filters at first. */\n defaultValue?: FilterValue;\n /** Called with all active filters when one changes. */\n onChange?: (value: FilterValue) => void;\n /** The search text (controlled). Leave out search and onSearchChange to hide the search. */\n search?: string;\n /** Called as people type in the search. */\n onSearchChange?: (q: string) => void;\n /** Placeholder for the search. */\n searchPlaceholder?: string;\n /** Saved views as tabs above the filters (All, Unpaid, Mine). */\n views?: Array<{ id: string; label: string; count?: number }>;\n /** The current view. */\n view?: string;\n /** Called when a view is picked. */\n onViewChange?: (id: string) => void;\n /** Content at the end of the row: sort, export, a view switch. */\n end?: ReactNode;\n /** Name for screen readers. Default \"Filters\". */\n 'aria-label'?: string;\n /** Extra class names. */\n className?: string;\n}\n\nconst isActive = (v: FilterValue[string]) => (Array.isArray(v) ? v.length > 0 : v !== undefined && v !== '');\n\nfunction summary(def: FilterDef, v: FilterValue[string]) {\n if (def.type === 'boolean') return v ? '✓' : '✕';\n if (def.type === 'text') return `“${v}”`;\n const ids = Array.isArray(v) ? v : [v as string];\n const names = ids.map(id => def.options?.find(o => o.id === id)?.label ?? id);\n return names.length > 2 ? `${names.slice(0, 2).join(', ')} +${names.length - 2}` : names.join(', ');\n}\n\n/** Filters for a list or table: saved views, a search, active filters as chips you can edit or remove, an Add filter menu and Clear all. */\nexport function FilterBar({ filters, value, defaultValue = {}, onChange, search, onSearchChange, searchPlaceholder, views, view, onViewChange, end, className, 'aria-label': label }: FilterBarProps) {\n const t = useStrings();\n const [val, setVal] = useControlled<FilterValue>(value, defaultValue, onChange);\n const [editing, setEditing] = useState<string | null>(null);\n const active = filters.filter(f => isActive(val[f.id]) || editing === f.id);\n const available = filters.filter(f => !active.includes(f));\n const set = (id: string, v: FilterValue[string]) => { const next = { ...val, [id]: v }; if (!isActive(v)) delete next[id]; setVal(next); };\n\n const editor = (f: FilterDef) => {\n const v = val[f.id];\n if (f.type === 'boolean') return <Switch isSelected={!!v} onChange={on => set(f.id, on)}>{f.label}</Switch>;\n if (f.type === 'text') return <TextField aria-label={f.label} autoFocus defaultValue={(v as string) ?? ''} onChange={x => set(f.id, x)} isClearable size=\"sm\" />;\n return (\n <ListBox aria-label={f.label} variant=\"plain\" maxHeight={260} selectionMode={f.type === 'multi' ? 'multiple' : 'single'} autoFocus\n selectedKeys={Array.isArray(v) ? v : v ? [v as string] : []}\n onSelectionChange={(s: Selection) => { const keys = s === 'all' ? (f.options || []).map(o => o.id) : [...s].map(String); set(f.id, f.type === 'multi' ? keys : keys[0]); if (f.type === 'select') setEditing(null); }}\n items={f.options}>\n {(o: { id: string; label: string }) => <SelectItem id={o.id}>{o.label}</SelectItem>}\n </ListBox>\n );\n };\n\n return (\n <div className={cx('alea-filterbar', className)} role=\"group\" aria-label={label ?? t.filters}>\n {views && views.length > 0 && (\n <Tabs size=\"sm\" selectedKey={view} onSelectionChange={k => onViewChange?.(String(k))}>\n <TabList aria-label={t.views}>{views.map(v => <Tab key={v.id} id={v.id} badge={v.count}>{v.label}</Tab>)}</TabList>\n </Tabs>\n )}\n <div className=\"alea-filterbar-row\">\n {onSearchChange && <SearchField aria-label={searchPlaceholder ?? t.search} placeholder={searchPlaceholder} size=\"sm\" value={search} onChange={onSearchChange} className=\"alea-filterbar-search\" />}\n <ul className=\"alea-filterbar-chips\" aria-label={t.activeFilters}>\n {active.map(f => (\n <li key={f.id} className=\"alea-filter-chip\" data-empty={!isActive(val[f.id]) || undefined}>\n <DialogTrigger isOpen={editing === f.id} onOpenChange={o => setEditing(o ? f.id : null)}>\n <RACButton className=\"alea-filter-chip-main alea-focus-ring\">\n {f.icon && <span className=\"alea-filter-chip-icon\" aria-hidden=\"true\">{f.icon}</span>}\n {/* the name starts with the visible text (label in name), then adds the context */}\n <span className=\"alea-filter-chip-label\">{f.label}<span className=\"alea-visually-hidden\">{': '}</span></span>\n {isActive(val[f.id])\n ? <span className=\"alea-filter-chip-value\">{f.type === 'boolean' ? <><span aria-hidden=\"true\">{summary(f, val[f.id])}</span><span className=\"alea-visually-hidden\">{val[f.id] ? t.on : t.off}</span></> : summary(f, val[f.id])}</span>\n : <span className=\"alea-visually-hidden\">{t.noValue}</span>}\n <span className=\"alea-visually-hidden\">. {t.edit}</span>\n <ChevronDown size={14} aria-hidden=\"true\" />\n </RACButton>\n <Popover placement=\"bottom start\" className=\"alea-popover alea-filter-popover\">\n <PopoverDialog title={f.label}>{editor(f)}</PopoverDialog>\n </Popover>\n </DialogTrigger>\n <RACButton className=\"alea-filter-chip-remove alea-focus-ring\" aria-label={t.removeItem(f.label)} onPress={() => { set(f.id, undefined); if (editing === f.id) setEditing(null); }}><X size={12} aria-hidden=\"true\" /></RACButton>\n </li>\n ))}\n </ul>\n {available.length > 0 && (\n <DropdownMenu aria-label={t.addFilter} trigger={<Button size=\"sm\" variant=\"dashed\" iconStart={<Plus />}>{t.addFilter}</Button>}\n menuProps={{ onAction: (k: Key) => setEditing(String(k)) }}>\n {available.map(f => <MenuItem key={f.id} id={f.id} icon={f.icon}>{f.label}</MenuItem>)}\n </DropdownMenu>\n )}\n {active.some(f => isActive(val[f.id])) && <Button size=\"sm\" variant=\"text\" onPress={() => { setVal({}); setEditing(null); }}>{t.clearAll}</Button>}\n {end && <div className=\"alea-filterbar-end\">{end}</div>}\n </div>\n </div>\n );\n}\n"},{"path":"components/filter/filter.css","content":"/* FilterBar */\n.alea-filterbar { display: flex; flex-direction: column; gap: var(--alea-space-3); min-width: 0; }\n.alea-filterbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--alea-space-2); min-width: 0; }\n.alea-filterbar-search { flex: 0 1 260px; min-width: 160px; }\n.alea-filterbar-chips { display: contents; margin: 0; padding: 0; list-style: none; }\n.alea-filter-chip { display: inline-flex; align-items: center; height: 32px; border-radius: var(--alea-radius-full); background: var(--alea-surface-raised); box-shadow: inset 0 0 0 1px var(--alea-border-strong); animation: alea-m-pop-in var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-filter-chip[data-empty] { box-shadow: inset 0 0 0 1px var(--alea-border-strong); outline: 1px dashed var(--alea-border-strong); outline-offset: calc(var(--alea-space-0-25) * -1); background: none; }\n.alea-filter-chip-main { display: inline-flex; align-items: center; gap: var(--alea-space-2); height: 100%; padding: 0 var(--alea-space-2) 0 var(--alea-space-3); border: 0; border-radius: var(--alea-radius-full) 0 0 var(--alea-radius-full); background: none; color: var(--alea-text); font: var(--alea-font-weight-medium) var(--alea-font-size-sm) / 1 var(--alea-font-family-body); cursor: pointer; }\n.alea-filter-chip-main[data-hovered] { background: var(--alea-surface-hover); }\n.alea-filter-chip-icon { display: inline-flex; color: var(--alea-icon-muted); } .alea-filter-chip-icon svg { width: 16px; height: 16px; }\n.alea-filter-chip-label { color: var(--alea-text-muted); }\n.alea-filter-chip-value { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--alea-text); font-weight: var(--alea-font-weight-semibold); }\n.alea-filter-chip-remove { display: grid; place-items: center; width: 28px; height: 100%; padding: 0; border: 0; border-left: 1px solid var(--alea-border); border-radius: 0 var(--alea-radius-full) var(--alea-radius-full) 0; background: none; color: var(--alea-text-muted); cursor: pointer; }\n.alea-filter-chip-remove[data-hovered] { background: var(--alea-surface-hover); color: var(--alea-text); }\n.alea-filter-popover { min-width: 240px; }\n.alea-filterbar-end { margin-left: auto; display: flex; gap: var(--alea-space-2); }\n@media (max-width: 639px) { .alea-filterbar-search { flex-basis: 100%; } }\n"}],"deps":["button","field","choice","menu","overlay","select","tabs"],"npm":["react-aria-components","lucide-react"],"exports":["FilterBar"],"descriptions":{"FilterBar":"Filters for a list or table: saved views, a search, active filters as chips you can edit or remove, an Add filter menu and Clear all."}},"form":{"files":[{"path":"components/form/Form.tsx","content":"import { useState, type FormEvent, type ReactNode } from 'react';\nimport { Form as RACForm, type FormProps as RACFormProps } from 'react-aria-components';\nimport { cx } from '../../utils/cx';\nimport { spaceFromPx } from '../../utils/space';\nimport { Alert } from '../feedback/Feedback';\nimport { Button } from '../button/Button';\nimport { useStrings } from '../../i18n/strings';\n\nexport interface FormProps extends Omit<RACFormProps, 'onSubmit'> {\n /** Called with the form values when every field is valid. Return server errors by field name to show them on the fields; a promise shows the loading state. */\n onSubmit?: (values: Record<string, FormDataEntryValue>, event: FormEvent<HTMLFormElement>) => void | Record<string, string | string[]> | Promise<void | Record<string, string | string[]>>;\n /** Space between fields. Default 20 px; it lands on the nearest space step, so it follows the density. */\n gap?: number;\n children: ReactNode;\n}\n\n/** A form that validates on submit, moves focus to the first problem, and shows server errors on their fields. */\nexport function Form({ onSubmit, gap = 20, children, className, validationBehavior = 'native', style, ...props }: FormProps) {\n const [serverErrors, setServerErrors] = useState<Record<string, string | string[]>>({});\n const [busy, setBusy] = useState(false);\n return (\n <RACForm\n {...props}\n validationBehavior={validationBehavior}\n validationErrors={{ ...serverErrors, ...(props.validationErrors || {}) }}\n className={cx('alea-form', className as string)}\n style={{ gap: spaceFromPx(gap), ...(style as any) }}\n data-busy={busy || undefined}\n aria-busy={busy || undefined}\n onSubmit={async e => {\n e.preventDefault();\n if (!onSubmit) return;\n const values = Object.fromEntries(new FormData(e.currentTarget));\n setBusy(true);\n try { const errs = await onSubmit(values, e); setServerErrors(errs || {}); }\n finally { setBusy(false); }\n }}\n >\n {children}\n </RACForm>\n );\n}\n\nexport interface FormActionsProps {\n /** The submit button text. Default \"Save\". */\n submitLabel?: ReactNode;\n /** A cancel or secondary button. */\n secondary?: ReactNode;\n /** Shows the spinner on the submit button. */\n isLoading?: boolean;\n /** start (default), end, or stretch for full-width buttons. */\n align?: 'start' | 'end' | 'stretch';\n}\n\n/** The buttons at the end of a form. */\nexport function FormActions({ submitLabel, secondary, isLoading, align = 'start' }: FormActionsProps) {\n const t = useStrings(); submitLabel ??= t.save;\n return <div className=\"alea-form-actions\" data-align={align}>{secondary}<Button type=\"submit\" isLoading={isLoading} fullWidth={align === 'stretch'}>{submitLabel}</Button></div>;\n}\n\n/** A summary of what to fix, at the top of a long form, with links to the fields. */\nexport interface ErrorSummaryProps {\n /** The errors by field id: { email: 'Use a valid email.' }. Each links to its field. */\n errors: Record<string, string>;\n /** The heading. Default \"Fix these to continue\". */\n title?: ReactNode;\n}\n\n/** A list of the errors in a form, each a link that moves focus to its field. */\nexport function ErrorSummary({ errors, title }: ErrorSummaryProps) {\n const t = useStrings(); title ??= t.fixToContinue;\n const list = Object.entries(errors);\n if (!list.length) return null;\n return (\n <Alert tone=\"danger\" title={title} live>\n <ul className=\"alea-error-summary\">{list.map(([id, msg]) => <li key={id}><a href={`#${id}`}>{msg}</a></li>)}</ul>\n </Alert>\n );\n}\n"},{"path":"components/form/form.css","content":".alea-form { display: flex; flex-direction: column; }\n.alea-form[data-busy] { cursor: progress; }\n.alea-form-actions { display: flex; flex-wrap: wrap; gap: var(--alea-space-2); padding-top: var(--alea-space-2); }\n.alea-form-actions[data-align='end'] { justify-content: flex-end; }\n.alea-form-actions[data-align='stretch'] { flex-direction: column-reverse; }\n.alea-error-summary { margin: var(--alea-space-1) 0 0; padding-left: 1.1em; }\n.alea-error-summary a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }\n"}],"deps":["feedback","button"],"npm":["react-aria-components"],"exports":["Form","FormActions","ErrorSummary"],"descriptions":{"Form":"A form that validates on submit, moves focus to the first problem, and shows server errors on their fields.","FormActions":"The buttons at the end of a form.","ErrorSummary":"A list of the errors in a form, each a link that moves focus to its field."}},"icon":{"files":[{"path":"components/icon/Icon.tsx","content":"import { cloneElement, isValidElement, useEffect, useState, type ComponentType, type ReactElement, type SVGProps } from 'react';\nimport { cx } from '../../utils/cx';\nimport { ICON_LOADERS, type IconName } from './icon-names';\nimport { ICON_TONE_ALIASES, type IconSurface, type IconTone, type IconToneName, type IconOverride } from './icon-cells';\n\nexport type IconSize = 'sm' | 'md' | 'lg' | number;\n// The named sizes are the tokens --alea-size-icon-sm/md/lg (icon.css sizes the svg from them). These numbers only fill the width and height attributes\n// for a page without the CSS; the test icon-api.test.ts checks they equal the tokens.\nexport const ICON_SIZE_PX = { sm: 16, md: 20, lg: 24 } as const;\n\n/** Any icon component that takes size and strokeWidth. */\nexport type IconComponent = ComponentType<SVGProps<SVGSVGElement> & { size?: number | string; strokeWidth?: number | string; absoluteStrokeWidth?: boolean }>;\n\ninterface IconBaseProps extends Omit<SVGProps<SVGSVGElement>, 'ref'> {\n /** sm, md or lg (the tokens --alea-size-icon-sm, -md, -lg: 16, 20, 24 px), or a number of px. Default: md, or the size the component around it gives its icons (Button, Badge, Tab...). */\n size?: IconSize;\n /** Stroke width in the 24 px grid (it scales with the icon). Default 2. */\n strokeWidth?: number;\n /** Name it for screen readers when the icon means something on its own. Without it, the icon is hidden from them. */\n label?: string;\n /**\n * The color of the icon, by what it means. The same ten names as the Figma `Icon color` modes: default, muted, soft, faint, accent, danger, success, warning, info, status.\n * Also brand, rating, control and like (colors with no surface). Leave it out (or `current`, the old name) to inherit the text color around the icon.\n */\n tone?: IconTone;\n /** What the icon sits on: normal (the page, default), solid (a filled chip, badge or button in the tone) or button (the primary button). The same three as the Figma `Icon surface` modes. */\n surface?: IconSurface;\n}\n/** The glyph is given as a component or an element (`icon`), or by its name, loaded when needed (`name`). One of the two. */\nexport type IconProps = IconBaseProps & (\n | {\n /** The icon component, e.g. `Search`, or the same as an element, `<Search />` (the way Button takes iconStart). Any component with the same props works, so the set can be swapped. */\n icon: IconComponent | ReactElement;\n name?: never;\n }\n | {\n /** A glyph of the kit by its name (`search`, `arrow-right`: the same as Icon/<name> in Figma), loaded on demand: nothing of it is bundled until it is used. Preload with preloadIcons. */\n name: IconName;\n icon?: never;\n });\n\n// ---------------------------------------------------------------- glyphs by name (lazy)\nconst loaded = new Map<IconName, IconComponent>();\nconst pending = new Map<IconName, Promise<IconComponent | null>>();\nconst known = (name: string): name is IconName => Object.prototype.hasOwnProperty.call(ICON_LOADERS, name);\n/** Loads a glyph once (a second call, or a second Icon with the same name, reuses it). Resolves to null for a name the kit does not have. */\nexport function loadIcon(name: string): Promise<IconComponent | null> {\n if (!known(name)) return Promise.resolve(null);\n const hit = loaded.get(name); if (hit) return Promise.resolve(hit);\n let p = pending.get(name);\n if (!p) {\n p = ICON_LOADERS[name]().then(m => { loaded.set(name, m.default); return m.default; }, () => { pending.delete(name); return null; });\n pending.set(name, p);\n }\n return p;\n}\n/** Loads glyphs ahead of time, so an Icon with that name renders at once, also on the server (call it, and await it, before rendering). */\nexport async function preloadIcons(names: readonly IconName[]): Promise<void> { await Promise.all(names.map(loadIcon)); }\n\nconst warned = new Set<string>();\nfunction useGlyph(name: string | undefined): IconComponent | null {\n const [glyph, setGlyph] = useState<IconComponent | null>(() => (name && known(name) ? loaded.get(name) ?? null : null));\n useEffect(() => {\n if (!name) return;\n let alive = true;\n if (!known(name)) {\n if ((globalThis as { process?: { env?: { NODE_ENV?: string } } }).process?.env?.NODE_ENV !== 'production') { if (!warned.has(name)) { warned.add(name); console.warn(`Icon: there is no glyph named \"${name}\" in the kit.`); } }\n setGlyph(null); return;\n }\n const hit = loaded.get(name);\n if (hit) { setGlyph(hit); return; }\n setGlyph(null);\n loadIcon(name).then(g => { if (alive) setGlyph(g); });\n return () => { alive = false; };\n }, [name]);\n return glyph;\n}\n\n/** What shows until a glyph by name arrives (and for a name that does not exist): an empty svg of the same size, so nothing shifts and nothing flashes. */\nfunction Placeholder(props: SVGProps<SVGSVGElement> & { size?: number | string; strokeWidth?: number | string }) {\n const { size = 24, strokeWidth: _s, ...rest } = props;\n return <svg {...rest} width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\" />;\n}\n\n/** An icon at the kit's sizes and stroke, from the bundled set or your own. Its color is a token picked by tone and surface. */\nexport function Icon({ icon, name, size, strokeWidth = 2, label, tone, surface, className, ...props }: IconProps) {\n const byName = useGlyph(name);\n const Glyph: IconComponent | ReactElement = (name ? byName ?? Placeholder : icon) as IconComponent | ReactElement;\n const px = typeof size === 'number' ? size : ICON_SIZE_PX[size ?? 'md'];\n const t = tone === undefined && surface ? 'default' : tone; // a surface alone is the default tone on it\n const toneName: IconToneName | IconOverride | undefined = t && t in ICON_TONE_ALIASES ? undefined : (t as IconToneName | IconOverride | undefined);\n const all = {\n ...props,\n size: px,\n strokeWidth,\n className: cx('alea-icon', className),\n 'data-size': typeof size === 'number' ? 'custom' : size,\n 'data-tone': toneName,\n 'data-surface': toneName ? (surface ?? 'normal') : undefined,\n role: label ? 'img' : undefined,\n 'aria-label': label,\n 'aria-hidden': label ? undefined : true,\n focusable: 'false',\n };\n if (isValidElement(Glyph)) return cloneElement(Glyph as ReactElement<Record<string, unknown>>, { ...all, className: cx((Glyph.props as { className?: string }).className, all.className) });\n const Component = Glyph as IconComponent;\n return <Component {...(all as SVGProps<SVGSVGElement>)} />;\n}\n"},{"path":"components/icon/icon-cells.ts","content":"// The icon color API: a TONE (what the icon means) on a SURFACE (what it sits on) picks one of the --alea-icon-* tokens. This is the same cell table as the Figma kit:\n// the collections `Icon color` (modes = tones) and `Icon surface` (modes = surfaces) in packages/figma/src/lib/m-icon-color.js, written from tokens/dist/figma.json.\n// The test icon-api.test.ts keeps the three in step (this table, figma.json and figma-properties.json, section iconColor).\n\nexport const ICON_TONES = ['default', 'muted', 'soft', 'faint', 'accent', 'danger', 'success', 'warning', 'info', 'status'] as const;\nexport const ICON_SURFACES = ['normal', 'solid', 'button'] as const;\n/** Colors that are not a (tone, surface) cell: they come straight from a Theme token (brand = the active item of a nav, rating = filled stars, control = outline icons, like = a filled heart). */\nexport const ICON_OVERRIDES = ['brand', 'rating', 'control', 'like'] as const;\n/** The names `tone` took before the tones matched Figma. `current` inherits the text color of the parent (no token). */\nexport const ICON_TONE_ALIASES = { current: undefined } as const;\n\nexport type IconToneName = typeof ICON_TONES[number];\nexport type IconSurface = typeof ICON_SURFACES[number];\nexport type IconOverride = typeof ICON_OVERRIDES[number];\nexport type IconTone = IconToneName | IconOverride | keyof typeof ICON_TONE_ALIASES;\n\n/** The 17 cells that have a token of their own: `tone/surface` -> the context of the token (--alea-icon-<context>, `default` is --alea-icon). */\nexport const ICON_CELLS: Readonly<Record<string, string>> = {\n 'default/normal': 'default', 'muted/normal': 'muted', 'soft/normal': 'soft', 'faint/normal': 'faint', 'accent/normal': 'accent',\n 'danger/normal': 'danger', 'success/normal': 'success', 'warning/normal': 'warning', 'info/normal': 'info',\n 'accent/solid': 'on-accent', 'danger/solid': 'on-danger', 'success/solid': 'on-success', 'warning/solid': 'on-warning', 'info/solid': 'on-info', 'status/solid': 'on-status',\n 'default/solid': 'chip', 'default/button': 'button',\n};\n\n/** The token context of a (tone, surface): its own cell, else the normal one of the tone, else default (the same fallback as the Figma kit). Overrides ignore the surface. */\nexport function iconContext(tone: IconToneName | IconOverride, surface: IconSurface = 'normal'): string {\n if ((ICON_OVERRIDES as readonly string[]).includes(tone)) return tone;\n return ICON_CELLS[tone + '/' + surface] ?? ICON_CELLS[tone + '/normal'] ?? 'default';\n}\n/** The CSS variable of a context: `default` is --alea-icon, the others --alea-icon-<context>. */\nexport function iconVar(context: string): string { return context === 'default' ? '--alea-icon' : '--alea-icon-' + context; }\n\n/** The two data attributes a holder puts on the element around its icon (or on the icon): the CSS in icon.css colors it from the matching token. */\nexport function iconCtx(tone: IconToneName | IconOverride, surface: IconSurface = 'normal'): { 'data-icon-tone': string; 'data-icon-surface': string } {\n return { 'data-icon-tone': tone, 'data-icon-surface': surface };\n}\n"},{"path":"components/icon/icon-contexts.ts","content":"// Which (tone, surface) the icon of each component sits in. It follows the color of the label next to the icon, like the Figma kit (the nested Icon of a Button, Badge, Tag,\n// Tab or Link gets the Icon color / Icon surface modes of its label's variable). A component spreads the result on the element around its icon: <span {...buttonIcon(variant, tone)}>.\nimport { iconCtx, type IconToneName } from './icon-cells';\n\ntype Ctx = ReturnType<typeof iconCtx>;\nconst STATUS = ['success', 'warning', 'danger', 'info'] as const;\ntype Status = typeof STATUS[number];\n\n/** Button and IconButton. A solid look (primary, danger, a toned primary) sits on its tone, the secondary on the chip, the others on the page in their tone. */\nexport function buttonIcon(variant: string = 'primary', tone?: string): Ctx {\n const t = !tone || tone === 'neutral' ? undefined : tone;\n if (variant === 'danger') return iconCtx('danger', 'solid');\n if (variant === 'primary') {\n if (!t) return iconCtx('default', 'button');\n if (t === 'accent' || t === 'danger') return iconCtx(t, 'solid');\n return iconCtx('status', 'solid'); // success, warning and info use the shared \"on status\" color\n }\n if (variant === 'secondary') return iconCtx('default', 'solid');\n return iconCtx((t ?? (variant === 'link' ? 'accent' : 'default')) as IconToneName);\n}\n\n/** Badge (neutral text is muted) and Tag (neutral text is the default color): a solid look sits on its tone, the others on the page. */\nexport function chipIcon(kind: 'badge' | 'tag', appearance: string | undefined, tone: string = 'neutral', selected?: boolean): Ctx {\n if (selected) return iconCtx('default', 'solid');\n if (appearance === 'solid') return tone === 'neutral' ? iconCtx('default', 'solid') : iconCtx(tone as IconToneName, 'solid');\n if (tone === 'neutral') return iconCtx(kind === 'badge' ? 'muted' : 'default');\n return iconCtx(tone as IconToneName);\n}\n\n/** Tab: muted until selected; the pills look sits the selected tab on the chip. */\nexport function tabIcon(selected: boolean, variant?: string): Ctx {\n if (!selected) return iconCtx('muted');\n return variant === 'pills' ? iconCtx('default', 'solid') : iconCtx('default');\n}\n\n/** Link: accent by default, the text color for neutral, danger for danger. The muted look takes the text color, except in danger. */\nexport function linkIcon(tone?: string, variant?: string): Ctx {\n if (tone === 'danger') return iconCtx('danger');\n if (variant === 'muted' || tone === 'neutral') return iconCtx('default');\n return iconCtx('accent');\n}\n\n/** Alert and Toast: the tone on the page; the solid look sits on its tone (danger, accent) or on the shared \"on status\" color (the others). */\nexport function alertIcon(tone: string = 'info', solid?: boolean): Ctx {\n if (!solid) return iconCtx(tone === 'neutral' ? 'muted' : (STATUS as readonly string[]).includes(tone) || tone === 'accent' ? (tone as IconToneName) : 'info');\n return tone === 'danger' || tone === 'accent' ? iconCtx(tone, 'solid') : iconCtx('status', 'solid');\n}\n\n/** Menu item: muted, danger in a danger item. */\nexport function menuIcon(tone?: string): Ctx { return iconCtx(tone === 'danger' ? 'danger' : 'muted'); }\n\n/** App nav item: muted, the brand color when it is the current page. */\nexport function navIcon(current?: boolean): Ctx { return iconCtx(current ? 'brand' : 'muted'); }\n\n/** Rating: the empty icons are the control color; the filled ones the rating color (a tone changes it: accent is the brand color). */\nexport function ratingIcon(part: 'empty' | 'filled', tone?: string): Ctx {\n if (part === 'empty') return iconCtx('control');\n if (!tone || tone === 'warning') return iconCtx('rating');\n return iconCtx(tone === 'accent' ? 'brand' : (tone as IconToneName));\n}\n"},{"path":"components/icon/icon-names.ts","content":"// Generated by packages/react/scripts/icon-names.mjs from packages/figma/src/icons.txt (the Icon/<name> components of the Figma kit). Do not edit.\n/// <reference path=\"./lucide-icons.d.ts\" />\nimport type { IconComponent } from './Icon';\n\n/** The 184 glyphs of the kit, by the kebab-case name of Icon/<name> in Figma (lucide's own name). */\nexport const ICON_NAMES = [\n 'search',\n 'x',\n 'check',\n 'chevron-down',\n 'chevron-up',\n 'chevron-left',\n 'chevron-right',\n 'chevrons-left',\n 'chevrons-right',\n 'arrow-left',\n 'arrow-right',\n 'arrow-up',\n 'arrow-down',\n 'arrow-up-right',\n 'plus',\n 'minus',\n 'ellipsis',\n 'ellipsis-vertical',\n 'menu',\n 'grip-vertical',\n 'more-horizontal',\n 'house',\n 'settings',\n 'user',\n 'users',\n 'bell',\n 'mail',\n 'message-square',\n 'calendar',\n 'clock',\n 'star',\n 'heart',\n 'bookmark',\n 'share-2',\n 'link-2',\n 'external-link',\n 'eye',\n 'eye-off',\n 'lock',\n 'lock-open',\n 'key',\n 'shield',\n 'shield-check',\n 'log-in',\n 'log-out',\n 'info',\n 'circle-alert',\n 'circle-check',\n 'circle-x',\n 'triangle-alert',\n 'circle-help',\n 'ban',\n 'trash-2',\n 'pencil',\n 'copy',\n 'clipboard',\n 'download',\n 'upload',\n 'file',\n 'file-text',\n 'folder',\n 'image',\n 'paperclip',\n 'save',\n 'printer',\n 'filter',\n 'sliders-horizontal',\n 'list',\n 'list-ordered',\n 'layout-grid',\n 'table-2',\n 'columns-3',\n 'kanban',\n 'sun',\n 'moon',\n 'monitor',\n 'smartphone',\n 'tablet',\n 'laptop',\n 'bold',\n 'italic',\n 'underline',\n 'strikethrough',\n 'code',\n 'heading-2',\n 'quote',\n 'align-left',\n 'align-center',\n 'align-right',\n 'link',\n 'play',\n 'pause',\n 'skip-forward',\n 'volume-2',\n 'mic',\n 'camera',\n 'video',\n 'refresh-cw',\n 'rotate-ccw',\n 'loader-circle',\n 'zoom-in',\n 'zoom-out',\n 'maximize-2',\n 'minimize-2',\n 'move',\n 'map-pin',\n 'globe',\n 'compass',\n 'navigation',\n 'shopping-cart',\n 'shopping-bag',\n 'credit-card',\n 'wallet',\n 'tag',\n 'gift',\n 'package',\n 'truck',\n 'chart-line',\n 'chart-bar',\n 'chart-pie',\n 'trending-up',\n 'trending-down',\n 'activity',\n 'gauge',\n 'palette',\n 'paintbrush',\n 'type',\n 'contrast',\n 'swatch-book',\n 'pipette',\n 'layers',\n 'component',\n 'frame',\n 'figma',\n 'github',\n 'sparkles',\n 'zap',\n 'rocket',\n 'flag',\n 'award',\n 'trophy',\n 'target',\n 'lightbulb',\n 'thumbs-up',\n 'thumbs-down',\n 'smile',\n 'frown',\n 'inbox',\n 'send',\n 'archive',\n 'reply',\n 'circle',\n 'square',\n 'triangle',\n 'hexagon',\n 'dot',\n 'cloud',\n 'wifi',\n 'battery',\n 'cpu',\n 'database',\n 'server',\n 'hard-drive',\n 'terminal',\n 'book-open',\n 'graduation-cap',\n 'briefcase',\n 'building-2',\n 'phone',\n 'qr-code',\n 'scan-line',\n 'toggle-left',\n 'toggle-right',\n 'ruler',\n 'snowflake',\n 'arrow-down-left',\n 'store',\n 'cloud-upload',\n 'handshake',\n 'layout-list',\n 'leaf',\n 'life-buoy',\n 'newspaper',\n 'piggy-bank',\n] as const;\nexport type IconName = typeof ICON_NAMES[number];\n\n/** One dynamic import per glyph: nothing of a glyph is bundled or fetched until an Icon with that name (or preloadIcons) asks for it. */\nexport const ICON_LOADERS: Record<IconName, () => Promise<{ default: IconComponent }>> = {\n 'search': () => import('lucide-react/dist/esm/icons/search.js'),\n 'x': () => import('lucide-react/dist/esm/icons/x.js'),\n 'check': () => import('lucide-react/dist/esm/icons/check.js'),\n 'chevron-down': () => import('lucide-react/dist/esm/icons/chevron-down.js'),\n 'chevron-up': () => import('lucide-react/dist/esm/icons/chevron-up.js'),\n 'chevron-left': () => import('lucide-react/dist/esm/icons/chevron-left.js'),\n 'chevron-right': () => import('lucide-react/dist/esm/icons/chevron-right.js'),\n 'chevrons-left': () => import('lucide-react/dist/esm/icons/chevrons-left.js'),\n 'chevrons-right': () => import('lucide-react/dist/esm/icons/chevrons-right.js'),\n 'arrow-left': () => import('lucide-react/dist/esm/icons/arrow-left.js'),\n 'arrow-right': () => import('lucide-react/dist/esm/icons/arrow-right.js'),\n 'arrow-up': () => import('lucide-react/dist/esm/icons/arrow-up.js'),\n 'arrow-down': () => import('lucide-react/dist/esm/icons/arrow-down.js'),\n 'arrow-up-right': () => import('lucide-react/dist/esm/icons/arrow-up-right.js'),\n 'plus': () => import('lucide-react/dist/esm/icons/plus.js'),\n 'minus': () => import('lucide-react/dist/esm/icons/minus.js'),\n 'ellipsis': () => import('lucide-react/dist/esm/icons/ellipsis.js'),\n 'ellipsis-vertical': () => import('lucide-react/dist/esm/icons/ellipsis-vertical.js'),\n 'menu': () => import('lucide-react/dist/esm/icons/menu.js'),\n 'grip-vertical': () => import('lucide-react/dist/esm/icons/grip-vertical.js'),\n 'more-horizontal': () => import('lucide-react/dist/esm/icons/more-horizontal.js'),\n 'house': () => import('lucide-react/dist/esm/icons/house.js'),\n 'settings': () => import('lucide-react/dist/esm/icons/settings.js'),\n 'user': () => import('lucide-react/dist/esm/icons/user.js'),\n 'users': () => import('lucide-react/dist/esm/icons/users.js'),\n 'bell': () => import('lucide-react/dist/esm/icons/bell.js'),\n 'mail': () => import('lucide-react/dist/esm/icons/mail.js'),\n 'message-square': () => import('lucide-react/dist/esm/icons/message-square.js'),\n 'calendar': () => import('lucide-react/dist/esm/icons/calendar.js'),\n 'clock': () => import('lucide-react/dist/esm/icons/clock.js'),\n 'star': () => import('lucide-react/dist/esm/icons/star.js'),\n 'heart': () => import('lucide-react/dist/esm/icons/heart.js'),\n 'bookmark': () => import('lucide-react/dist/esm/icons/bookmark.js'),\n 'share-2': () => import('lucide-react/dist/esm/icons/share-2.js'),\n 'link-2': () => import('lucide-react/dist/esm/icons/link-2.js'),\n 'external-link': () => import('lucide-react/dist/esm/icons/external-link.js'),\n 'eye': () => import('lucide-react/dist/esm/icons/eye.js'),\n 'eye-off': () => import('lucide-react/dist/esm/icons/eye-off.js'),\n 'lock': () => import('lucide-react/dist/esm/icons/lock.js'),\n 'lock-open': () => import('lucide-react/dist/esm/icons/lock-open.js'),\n 'key': () => import('lucide-react/dist/esm/icons/key.js'),\n 'shield': () => import('lucide-react/dist/esm/icons/shield.js'),\n 'shield-check': () => import('lucide-react/dist/esm/icons/shield-check.js'),\n 'log-in': () => import('lucide-react/dist/esm/icons/log-in.js'),\n 'log-out': () => import('lucide-react/dist/esm/icons/log-out.js'),\n 'info': () => import('lucide-react/dist/esm/icons/info.js'),\n 'circle-alert': () => import('lucide-react/dist/esm/icons/circle-alert.js'),\n 'circle-check': () => import('lucide-react/dist/esm/icons/circle-check.js'),\n 'circle-x': () => import('lucide-react/dist/esm/icons/circle-x.js'),\n 'triangle-alert': () => import('lucide-react/dist/esm/icons/triangle-alert.js'),\n 'circle-help': () => import('lucide-react/dist/esm/icons/circle-help.js'),\n 'ban': () => import('lucide-react/dist/esm/icons/ban.js'),\n 'trash-2': () => import('lucide-react/dist/esm/icons/trash-2.js'),\n 'pencil': () => import('lucide-react/dist/esm/icons/pencil.js'),\n 'copy': () => import('lucide-react/dist/esm/icons/copy.js'),\n 'clipboard': () => import('lucide-react/dist/esm/icons/clipboard.js'),\n 'download': () => import('lucide-react/dist/esm/icons/download.js'),\n 'upload': () => import('lucide-react/dist/esm/icons/upload.js'),\n 'file': () => import('lucide-react/dist/esm/icons/file.js'),\n 'file-text': () => import('lucide-react/dist/esm/icons/file-text.js'),\n 'folder': () => import('lucide-react/dist/esm/icons/folder.js'),\n 'image': () => import('lucide-react/dist/esm/icons/image.js'),\n 'paperclip': () => import('lucide-react/dist/esm/icons/paperclip.js'),\n 'save': () => import('lucide-react/dist/esm/icons/save.js'),\n 'printer': () => import('lucide-react/dist/esm/icons/printer.js'),\n 'filter': () => import('lucide-react/dist/esm/icons/filter.js'),\n 'sliders-horizontal': () => import('lucide-react/dist/esm/icons/sliders-horizontal.js'),\n 'list': () => import('lucide-react/dist/esm/icons/list.js'),\n 'list-ordered': () => import('lucide-react/dist/esm/icons/list-ordered.js'),\n 'layout-grid': () => import('lucide-react/dist/esm/icons/layout-grid.js'),\n 'table-2': () => import('lucide-react/dist/esm/icons/table-2.js'),\n 'columns-3': () => import('lucide-react/dist/esm/icons/columns-3.js'),\n 'kanban': () => import('lucide-react/dist/esm/icons/kanban.js'),\n 'sun': () => import('lucide-react/dist/esm/icons/sun.js'),\n 'moon': () => import('lucide-react/dist/esm/icons/moon.js'),\n 'monitor': () => import('lucide-react/dist/esm/icons/monitor.js'),\n 'smartphone': () => import('lucide-react/dist/esm/icons/smartphone.js'),\n 'tablet': () => import('lucide-react/dist/esm/icons/tablet.js'),\n 'laptop': () => import('lucide-react/dist/esm/icons/laptop.js'),\n 'bold': () => import('lucide-react/dist/esm/icons/bold.js'),\n 'italic': () => import('lucide-react/dist/esm/icons/italic.js'),\n 'underline': () => import('lucide-react/dist/esm/icons/underline.js'),\n 'strikethrough': () => import('lucide-react/dist/esm/icons/strikethrough.js'),\n 'code': () => import('lucide-react/dist/esm/icons/code.js'),\n 'heading-2': () => import('lucide-react/dist/esm/icons/heading-2.js'),\n 'quote': () => import('lucide-react/dist/esm/icons/quote.js'),\n 'align-left': () => import('lucide-react/dist/esm/icons/align-left.js'),\n 'align-center': () => import('lucide-react/dist/esm/icons/align-center.js'),\n 'align-right': () => import('lucide-react/dist/esm/icons/align-right.js'),\n 'link': () => import('lucide-react/dist/esm/icons/link.js'),\n 'play': () => import('lucide-react/dist/esm/icons/play.js'),\n 'pause': () => import('lucide-react/dist/esm/icons/pause.js'),\n 'skip-forward': () => import('lucide-react/dist/esm/icons/skip-forward.js'),\n 'volume-2': () => import('lucide-react/dist/esm/icons/volume-2.js'),\n 'mic': () => import('lucide-react/dist/esm/icons/mic.js'),\n 'camera': () => import('lucide-react/dist/esm/icons/camera.js'),\n 'video': () => import('lucide-react/dist/esm/icons/video.js'),\n 'refresh-cw': () => import('lucide-react/dist/esm/icons/refresh-cw.js'),\n 'rotate-ccw': () => import('lucide-react/dist/esm/icons/rotate-ccw.js'),\n 'loader-circle': () => import('lucide-react/dist/esm/icons/loader-circle.js'),\n 'zoom-in': () => import('lucide-react/dist/esm/icons/zoom-in.js'),\n 'zoom-out': () => import('lucide-react/dist/esm/icons/zoom-out.js'),\n 'maximize-2': () => import('lucide-react/dist/esm/icons/maximize-2.js'),\n 'minimize-2': () => import('lucide-react/dist/esm/icons/minimize-2.js'),\n 'move': () => import('lucide-react/dist/esm/icons/move.js'),\n 'map-pin': () => import('lucide-react/dist/esm/icons/map-pin.js'),\n 'globe': () => import('lucide-react/dist/esm/icons/globe.js'),\n 'compass': () => import('lucide-react/dist/esm/icons/compass.js'),\n 'navigation': () => import('lucide-react/dist/esm/icons/navigation.js'),\n 'shopping-cart': () => import('lucide-react/dist/esm/icons/shopping-cart.js'),\n 'shopping-bag': () => import('lucide-react/dist/esm/icons/shopping-bag.js'),\n 'credit-card': () => import('lucide-react/dist/esm/icons/credit-card.js'),\n 'wallet': () => import('lucide-react/dist/esm/icons/wallet.js'),\n 'tag': () => import('lucide-react/dist/esm/icons/tag.js'),\n 'gift': () => import('lucide-react/dist/esm/icons/gift.js'),\n 'package': () => import('lucide-react/dist/esm/icons/package.js'),\n 'truck': () => import('lucide-react/dist/esm/icons/truck.js'),\n 'chart-line': () => import('lucide-react/dist/esm/icons/chart-line.js'),\n 'chart-bar': () => import('lucide-react/dist/esm/icons/chart-bar.js'),\n 'chart-pie': () => import('lucide-react/dist/esm/icons/chart-pie.js'),\n 'trending-up': () => import('lucide-react/dist/esm/icons/trending-up.js'),\n 'trending-down': () => import('lucide-react/dist/esm/icons/trending-down.js'),\n 'activity': () => import('lucide-react/dist/esm/icons/activity.js'),\n 'gauge': () => import('lucide-react/dist/esm/icons/gauge.js'),\n 'palette': () => import('lucide-react/dist/esm/icons/palette.js'),\n 'paintbrush': () => import('lucide-react/dist/esm/icons/paintbrush.js'),\n 'type': () => import('lucide-react/dist/esm/icons/type.js'),\n 'contrast': () => import('lucide-react/dist/esm/icons/contrast.js'),\n 'swatch-book': () => import('lucide-react/dist/esm/icons/swatch-book.js'),\n 'pipette': () => import('lucide-react/dist/esm/icons/pipette.js'),\n 'layers': () => import('lucide-react/dist/esm/icons/layers.js'),\n 'component': () => import('lucide-react/dist/esm/icons/component.js'),\n 'frame': () => import('lucide-react/dist/esm/icons/frame.js'),\n 'figma': () => import('lucide-react/dist/esm/icons/figma.js'),\n 'github': () => import('lucide-react/dist/esm/icons/github.js'),\n 'sparkles': () => import('lucide-react/dist/esm/icons/sparkles.js'),\n 'zap': () => import('lucide-react/dist/esm/icons/zap.js'),\n 'rocket': () => import('lucide-react/dist/esm/icons/rocket.js'),\n 'flag': () => import('lucide-react/dist/esm/icons/flag.js'),\n 'award': () => import('lucide-react/dist/esm/icons/award.js'),\n 'trophy': () => import('lucide-react/dist/esm/icons/trophy.js'),\n 'target': () => import('lucide-react/dist/esm/icons/target.js'),\n 'lightbulb': () => import('lucide-react/dist/esm/icons/lightbulb.js'),\n 'thumbs-up': () => import('lucide-react/dist/esm/icons/thumbs-up.js'),\n 'thumbs-down': () => import('lucide-react/dist/esm/icons/thumbs-down.js'),\n 'smile': () => import('lucide-react/dist/esm/icons/smile.js'),\n 'frown': () => import('lucide-react/dist/esm/icons/frown.js'),\n 'inbox': () => import('lucide-react/dist/esm/icons/inbox.js'),\n 'send': () => import('lucide-react/dist/esm/icons/send.js'),\n 'archive': () => import('lucide-react/dist/esm/icons/archive.js'),\n 'reply': () => import('lucide-react/dist/esm/icons/reply.js'),\n 'circle': () => import('lucide-react/dist/esm/icons/circle.js'),\n 'square': () => import('lucide-react/dist/esm/icons/square.js'),\n 'triangle': () => import('lucide-react/dist/esm/icons/triangle.js'),\n 'hexagon': () => import('lucide-react/dist/esm/icons/hexagon.js'),\n 'dot': () => import('lucide-react/dist/esm/icons/dot.js'),\n 'cloud': () => import('lucide-react/dist/esm/icons/cloud.js'),\n 'wifi': () => import('lucide-react/dist/esm/icons/wifi.js'),\n 'battery': () => import('lucide-react/dist/esm/icons/battery.js'),\n 'cpu': () => import('lucide-react/dist/esm/icons/cpu.js'),\n 'database': () => import('lucide-react/dist/esm/icons/database.js'),\n 'server': () => import('lucide-react/dist/esm/icons/server.js'),\n 'hard-drive': () => import('lucide-react/dist/esm/icons/hard-drive.js'),\n 'terminal': () => import('lucide-react/dist/esm/icons/terminal.js'),\n 'book-open': () => import('lucide-react/dist/esm/icons/book-open.js'),\n 'graduation-cap': () => import('lucide-react/dist/esm/icons/graduation-cap.js'),\n 'briefcase': () => import('lucide-react/dist/esm/icons/briefcase.js'),\n 'building-2': () => import('lucide-react/dist/esm/icons/building-2.js'),\n 'phone': () => import('lucide-react/dist/esm/icons/phone.js'),\n 'qr-code': () => import('lucide-react/dist/esm/icons/qr-code.js'),\n 'scan-line': () => import('lucide-react/dist/esm/icons/scan-line.js'),\n 'toggle-left': () => import('lucide-react/dist/esm/icons/toggle-left.js'),\n 'toggle-right': () => import('lucide-react/dist/esm/icons/toggle-right.js'),\n 'ruler': () => import('lucide-react/dist/esm/icons/ruler.js'),\n 'snowflake': () => import('lucide-react/dist/esm/icons/snowflake.js'),\n 'arrow-down-left': () => import('lucide-react/dist/esm/icons/arrow-down-left.js'),\n 'store': () => import('lucide-react/dist/esm/icons/store.js'),\n 'cloud-upload': () => import('lucide-react/dist/esm/icons/cloud-upload.js'),\n 'handshake': () => import('lucide-react/dist/esm/icons/handshake.js'),\n 'layout-list': () => import('lucide-react/dist/esm/icons/layout-list.js'),\n 'leaf': () => import('lucide-react/dist/esm/icons/leaf.js'),\n 'life-buoy': () => import('lucide-react/dist/esm/icons/life-buoy.js'),\n 'newspaper': () => import('lucide-react/dist/esm/icons/newspaper.js'),\n 'piggy-bank': () => import('lucide-react/dist/esm/icons/piggy-bank.js'),\n};\n"},{"path":"components/icon/icon.css","content":"/* An icon from the Icon component, or the element a component puts around its icon. */\n.alea-icon { flex: none; vertical-align: middle; }\n/* sizes: the tokens --alea-size-icon-sm, -md and -lg (a number size stays in the width and height attributes). With no size the icon is md, unless a component sizes the icons it holds (zero specificity here, so it wins) */\n:where(.alea-icon:not([data-size])) { width: var(--alea-size-icon-md); height: var(--alea-size-icon-md); }\n.alea-icon[data-size='sm'] { width: var(--alea-size-icon-sm); height: var(--alea-size-icon-sm); }\n.alea-icon[data-size='md'] { width: var(--alea-size-icon-md); height: var(--alea-size-icon-md); }\n.alea-icon[data-size='lg'] { width: var(--alea-size-icon-lg); height: var(--alea-size-icon-lg); }\n/* colors: tone x surface, the same cell table as the Figma kit (icon-cells.ts). A cell with no token of its own falls back to the normal color of its tone. The Icon itself (.alea-icon) and the element a component puts around its icon (data-icon-tone, data-icon-surface) use the same rules. */\n.alea-icon[data-tone='default'][data-surface='normal'], [data-icon-tone='default'][data-icon-surface='normal'],\n.alea-icon[data-tone='status'][data-surface='normal'], [data-icon-tone='status'][data-icon-surface='normal'],\n.alea-icon[data-tone='status'][data-surface='button'], [data-icon-tone='status'][data-icon-surface='button'] { color: var(--alea-icon); }\n.alea-icon[data-tone='default'][data-surface='solid'], [data-icon-tone='default'][data-icon-surface='solid'] { color: var(--alea-icon-chip); }\n.alea-icon[data-tone='default'][data-surface='button'], [data-icon-tone='default'][data-icon-surface='button'] { color: var(--alea-icon-button); }\n.alea-icon[data-tone='muted'][data-surface='normal'], [data-icon-tone='muted'][data-icon-surface='normal'],\n.alea-icon[data-tone='muted'][data-surface='solid'], [data-icon-tone='muted'][data-icon-surface='solid'],\n.alea-icon[data-tone='muted'][data-surface='button'], [data-icon-tone='muted'][data-icon-surface='button'] { color: var(--alea-icon-muted); }\n.alea-icon[data-tone='soft'][data-surface='normal'], [data-icon-tone='soft'][data-icon-surface='normal'],\n.alea-icon[data-tone='soft'][data-surface='solid'], [data-icon-tone='soft'][data-icon-surface='solid'],\n.alea-icon[data-tone='soft'][data-surface='button'], [data-icon-tone='soft'][data-icon-surface='button'] { color: var(--alea-icon-soft); }\n.alea-icon[data-tone='faint'][data-surface='normal'], [data-icon-tone='faint'][data-icon-surface='normal'],\n.alea-icon[data-tone='faint'][data-surface='solid'], [data-icon-tone='faint'][data-icon-surface='solid'],\n.alea-icon[data-tone='faint'][data-surface='button'], [data-icon-tone='faint'][data-icon-surface='button'] { color: var(--alea-icon-faint); }\n.alea-icon[data-tone='accent'][data-surface='normal'], [data-icon-tone='accent'][data-icon-surface='normal'],\n.alea-icon[data-tone='accent'][data-surface='button'], [data-icon-tone='accent'][data-icon-surface='button'] { color: var(--alea-icon-accent); }\n.alea-icon[data-tone='accent'][data-surface='solid'], [data-icon-tone='accent'][data-icon-surface='solid'] { color: var(--alea-icon-on-accent); }\n.alea-icon[data-tone='danger'][data-surface='normal'], [data-icon-tone='danger'][data-icon-surface='normal'],\n.alea-icon[data-tone='danger'][data-surface='button'], [data-icon-tone='danger'][data-icon-surface='button'] { color: var(--alea-icon-danger); }\n.alea-icon[data-tone='danger'][data-surface='solid'], [data-icon-tone='danger'][data-icon-surface='solid'] { color: var(--alea-icon-on-danger); }\n.alea-icon[data-tone='success'][data-surface='normal'], [data-icon-tone='success'][data-icon-surface='normal'],\n.alea-icon[data-tone='success'][data-surface='button'], [data-icon-tone='success'][data-icon-surface='button'] { color: var(--alea-icon-success); }\n.alea-icon[data-tone='success'][data-surface='solid'], [data-icon-tone='success'][data-icon-surface='solid'] { color: var(--alea-icon-on-success); }\n.alea-icon[data-tone='warning'][data-surface='normal'], [data-icon-tone='warning'][data-icon-surface='normal'],\n.alea-icon[data-tone='warning'][data-surface='button'], [data-icon-tone='warning'][data-icon-surface='button'] { color: var(--alea-icon-warning); }\n.alea-icon[data-tone='warning'][data-surface='solid'], [data-icon-tone='warning'][data-icon-surface='solid'] { color: var(--alea-icon-on-warning); }\n.alea-icon[data-tone='info'][data-surface='normal'], [data-icon-tone='info'][data-icon-surface='normal'],\n.alea-icon[data-tone='info'][data-surface='button'], [data-icon-tone='info'][data-icon-surface='button'] { color: var(--alea-icon-info); }\n.alea-icon[data-tone='info'][data-surface='solid'], [data-icon-tone='info'][data-icon-surface='solid'] { color: var(--alea-icon-on-info); }\n.alea-icon[data-tone='status'][data-surface='solid'], [data-icon-tone='status'][data-icon-surface='solid'] { color: var(--alea-icon-on-status); }\n/* colors with no surface */\n.alea-icon[data-tone='brand'], [data-icon-tone='brand'] { color: var(--alea-icon-brand); }\n.alea-icon[data-tone='rating'], [data-icon-tone='rating'] { color: var(--alea-icon-rating); }\n.alea-icon[data-tone='control'], [data-icon-tone='control'] { color: var(--alea-icon-control); }\n.alea-icon[data-tone='like'], [data-icon-tone='like'] { color: var(--alea-icon-like); }\n/* the Glass preset paints secondary buttons with the text color, not the chip color: the icon follows */\n[data-preset='glass'] :is(.alea-button, .alea-icon-button)[data-variant='secondary'] [data-icon-tone] { color: inherit; }\n"},{"path":"components/icon/lucide-icons.d.ts","content":"// Lucide's per-icon files have no type declarations of their own; each default export is an icon component (see icon-names.ts).\ndeclare module 'lucide-react/dist/esm/icons/*.js' {\n import type { ComponentType, SVGProps } from 'react';\n const icon: ComponentType<SVGProps<SVGSVGElement> & { size?: number | string; strokeWidth?: number | string; absoluteStrokeWidth?: boolean }>;\n export default icon;\n}\n"}],"deps":[],"npm":["lucide-react"],"exports":["loadIcon","Icon","ICON_SIZE_PX","ICON_OVERRIDES","ICON_TONE_ALIASES","ICON_CELLS","iconContext","iconVar","iconCtx","ICON_TONES","ICON_SURFACES","buttonIcon","chipIcon","tabIcon","linkIcon","alertIcon","menuIcon","navIcon","ratingIcon","ICON_NAMES","ICON_LOADERS"],"descriptions":{"loadIcon":"Loads a glyph once (a second call, or a second Icon with the same name, reuses it). Resolves to null for a name the kit does not have.","Icon":"An icon at the kit's sizes and stroke, from the bundled set or your own. Its color is a token picked by tone and surface.","ICON_OVERRIDES":"Colors that are not a (tone, surface) cell: they come straight from a Theme token (brand = the active item of a nav, rating = filled stars, control = outline icons, like = a filled heart).","ICON_TONE_ALIASES":"The names `tone` took before the tones matched Figma. `current` inherits the text color of the parent (no token).","ICON_CELLS":"The 17 cells that have a token of their own: `tone/surface` -> the context of the token (--alea-icon-<context>, `default` is --alea-icon).","iconContext":"The token context of a (tone, surface): its own cell, else the normal one of the tone, else default (the same fallback as the Figma kit). Overrides ignore the surface.","iconVar":"The CSS variable of a context: `default` is --alea-icon, the others --alea-icon-<context>.","iconCtx":"The two data attributes a holder puts on the element around its icon (or on the icon): the CSS in icon.css colors it from the matching token.","buttonIcon":"Button and IconButton. A solid look (primary, danger, a toned primary) sits on its tone, the secondary on the chip, the others on the page in their tone.","chipIcon":"Badge (neutral text is muted) and Tag (neutral text is the default color): a solid look sits on its tone, the others on the page.","tabIcon":"Tab: muted until selected; the pills look sits the selected tab on the chip.","linkIcon":"Link: accent by default, the text color for neutral, danger for danger. The muted look takes the text color, except in danger.","alertIcon":"Alert and Toast: the tone on the page; the solid look sits on its tone (danger, accent) or on the shared \"on status\" color (the others).","menuIcon":"Menu item: muted, danger in a danger item.","navIcon":"App nav item: muted, the brand color when it is the current page.","ratingIcon":"Rating: the empty icons are the control color; the filled ones the rating color (a tone changes it: accent is the brand color).","ICON_NAMES":"The 184 glyphs of the kit, by the kebab-case name of Icon/<name> in Figma (lucide's own name).","ICON_LOADERS":"One dynamic import per glyph: nothing of a glyph is bundled or fetched until an Icon with that name (or preloadIcons) asks for it."}},"layout":{"files":[{"path":"components/layout/Bento.tsx","content":"import { createElement, type CSSProperties, type ElementType, type HTMLAttributes, type ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\nimport { responsiveVars, type Responsive, type Space } from './Layout';\n\nconst space = (s: Space) => `var(--alea-space-${String(s).replace('.', '-')})`;\n\nexport interface BentoGridProps extends HTMLAttributes<HTMLElement> {\n /** Columns per breakpoint. Default { base: 1, sm: 2, lg: 4 }. */\n columns?: Responsive<number>;\n /** Height of one row in px; cards span rows with rowSpan. Default 200. */\n rowHeight?: number;\n /** Space between cards. Default 4 (16 px). */\n gap?: Responsive<Space>;\n as?: ElementType;\n children?: ReactNode;\n}\n\n/** A bento layout: cards of different sizes on an even grid that fills the gaps. On phones it is one column. */\nexport function BentoGrid({ columns = { base: 1, sm: 2, lg: 4 }, rowHeight = 200, gap = 4, as = 'div', className, style, ...props }: BentoGridProps) {\n return createElement(as, {\n ...props,\n className: cx('alea-bento alea-r-gap alea-r-cols', className),\n style: { '--alea-bento-row': `${rowHeight}px`, ...responsiveVars('alea-gap', gap, space), ...responsiveVars('alea-cols', columns, c => `repeat(${c}, minmax(0, 1fr))`), ...style } as CSSProperties,\n });\n}\n\nexport interface BentoCardProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {\n /** Columns it spans, per breakpoint: { base: 1, lg: 2 }. */\n colSpan?: Responsive<number>;\n /** Rows it spans, per breakpoint. */\n rowSpan?: Responsive<number>;\n /** A small label above the title. */\n eyebrow?: ReactNode;\n /** The title, at headingLevel. */\n title?: ReactNode;\n /** Text under the title. */\n description?: ReactNode;\n /** An icon by the title. */\n icon?: ReactNode;\n /** A picture, chart or live component that fills the card above the text. */\n visual?: ReactNode;\n /** Makes the whole card a link (one tab stop, named by the title). */\n href?: string;\n /** default: the surface; deep: darker; glass: frosted; outline: border only. */\n variant?: 'default' | 'deep' | 'glass' | 'outline';\n /** Inner space, like Card. Default normal. */\n padding?: 'none' | 'tight' | 'normal' | 'loose';\n /** Heading level of the title. Default 3. */\n headingLevel?: 2 | 3 | 4;\n as?: ElementType;\n children?: ReactNode;\n}\n\n/** A cell of a BentoGrid: an optional visual on top, then the title and text. */\nexport function BentoCard({ colSpan, rowSpan, eyebrow, title, description, icon, visual, href, variant = 'default', padding = 'normal', headingLevel = 3, as = 'article', className, style, children, ...props }: BentoCardProps) {\n const H = `h${headingLevel}` as ElementType;\n return createElement(as, {\n ...props,\n className: cx('alea-card alea-bento-card', colSpan !== undefined && 'alea-r-span', rowSpan !== undefined && 'alea-r-rspan', className),\n 'data-variant': variant, 'data-padding': padding, 'data-interactive': href ? true : undefined,\n style: { ...responsiveVars('alea-span', colSpan, v => `span ${v} / span ${v}`), ...responsiveVars('alea-rspan', rowSpan, v => `span ${v} / span ${v}`), ...style } as CSSProperties,\n },\n visual ? <div className=\"alea-bento-visual\">{visual}</div> : null,\n (title || description || eyebrow) ? (\n <div className=\"alea-bento-text\">\n {eyebrow ? <p className=\"alea-bento-eyebrow\">{eyebrow}</p> : null}\n {title ? createElement(H, { className: 'alea-bento-title' }, icon ? <span className=\"alea-bento-icon\" aria-hidden=\"true\">{icon}</span> : null, href ? <a href={href} className=\"alea-card-link alea-focus-ring\">{title}</a> : title) : null}\n {description ? <p className=\"alea-bento-desc\">{description}</p> : null}\n </div>\n ) : null,\n children,\n );\n}\n"},{"path":"components/layout/Layout.tsx","content":"import { createElement, type CSSProperties, type ElementType, type HTMLAttributes, type ReactNode } from 'react';\nimport { Separator, type SeparatorProps } from 'react-aria-components';\nimport { cx } from '../../utils/cx';\n\n/** Steps of the 4 px space scale (--alea-space-*). */\nexport type Space = 0 | 0.5 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | 12 | 16 | 20 | 24;\nconst space = (s: Space) => `var(--alea-space-${String(s).replace('.', '-')})`;\n\nimport type { Breakpoint, Responsive } from '../../utils/responsive';\nexport type { Breakpoint, Responsive };\nconst BPS: Breakpoint[] = ['base', 'sm', 'md', 'lg', 'xl'];\nconst isMap = <T,>(v: Responsive<T>): v is Partial<Record<Breakpoint, T>> => typeof v === 'object' && v !== null && !Array.isArray(v);\n/** CSS variables --{name}-{bp} for a responsive value; the CSS picks the right one per breakpoint. */\nexport function responsiveVars<T>(name: string, value: Responsive<T> | undefined, toCss: (v: T) => string): Record<string, string> {\n if (value === undefined) return {};\n // every breakpoint gets a value (carried up from the one below), so nested layouts never inherit their parent's\n const out: Record<string, string> = {};\n let last: string | undefined;\n for (const bp of BPS) {\n const v = isMap(value) ? value[bp] : bp === 'base' ? (value as T) : undefined;\n if (v !== undefined) last = toCss(v as T);\n if (last !== undefined) out[`--${name}-${bp}`] = last;\n }\n return out;\n}\n\ninterface BoxProps extends HTMLAttributes<HTMLElement> {\n /** The element to render. Default div. */\n as?: ElementType;\n}\n\nexport interface StackProps extends BoxProps {\n /** Space between children, from the space scale. Default 4 (16 px). Can change per breakpoint. */\n gap?: Responsive<Space>;\n /** Cross-axis alignment: start, center, end, stretch or baseline. */\n align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';\n /** Main-axis distribution: start, center, end or between. */\n justify?: 'start' | 'center' | 'end' | 'between';\n /** Room above and below, from the space scale: one value for both, or [top, bottom]. For a page's main area or a section. */\n paddingBlock?: Space | [Space, Space];\n}\n/** padding-block for a paddingBlock prop. */\nconst padBlock = (p?: Space | [Space, Space]): CSSProperties => (p === undefined ? {} : { paddingBlock: Array.isArray(p) ? `${space(p[0])} ${space(p[1])}` : space(p) });\n\n/** Children in a column with even space between them. */\nexport function Stack({ as = 'div', gap = 4, align, justify, paddingBlock, className, style, ...props }: StackProps) {\n return createElement(as, { ...props, className: cx('alea-stack alea-r-gap', className), 'data-align': align, 'data-justify': justify, style: { ...responsiveVars('alea-gap', gap, space), ...padBlock(paddingBlock), ...style } as CSSProperties });\n}\n\nexport interface InlineProps extends StackProps {\n /** Wrap onto new lines when there is no room. Default true. */\n wrap?: boolean;\n}\n\n/** Children in a row, wrapping by default. */\nexport function Inline({ as = 'div', gap = 2, align = 'center', justify, wrap = true, paddingBlock, className, style, ...props }: InlineProps) {\n return createElement(as, { ...props, className: cx('alea-inline alea-r-gap', className), 'data-align': align, 'data-justify': justify, 'data-wrap': wrap || undefined, style: { ...responsiveVars('alea-gap', gap, space), ...padBlock(paddingBlock), ...style } as CSSProperties });\n}\n\nexport interface FlexProps extends StackProps {\n /** row or column, per breakpoint: { base: 'column', md: 'row' } stacks on phones and lines up on tablets. */\n direction?: Responsive<'row' | 'column' | 'row-reverse' | 'column-reverse'>;\n /** Wrap onto new lines. Default false. */\n wrap?: boolean;\n}\n\n/** A flex row or column whose direction and gap can change per breakpoint. */\nexport function Flex({ as = 'div', gap = 4, direction = 'row', align, justify, wrap, paddingBlock, className, style, ...props }: FlexProps) {\n return createElement(as, { ...props, className: cx('alea-flex alea-r-gap alea-r-dir', className), 'data-align': align, 'data-justify': justify, 'data-wrap': wrap || undefined, style: { ...responsiveVars('alea-gap', gap, space), ...responsiveVars('alea-dir', direction, String), ...padBlock(paddingBlock), ...style } as CSSProperties });\n}\n\nexport interface GridProps extends BoxProps {\n /** Columns: a number, 'auto' to fit as many as minItemWidth allows, or one per breakpoint: { base: 1, md: 2, lg: 4 }. Use 12 with GridItem spans for page layouts. */\n columns?: Responsive<number | 'auto'>;\n /** Smallest column width for columns='auto'. Default 240 px. */\n minItemWidth?: number;\n /** Space between cells, from the space scale. Default 4 (16 px). Can change per breakpoint. */\n gap?: Responsive<Space>;\n /** With columns='auto': the items stretch to fill the row (no empty columns when there are few). Default false: the columns keep their width, so a lone card stays card-sized. */\n stretch?: boolean;\n}\n\n/** A responsive grid: fixed columns, as many as fit, or a different count per breakpoint. */\nexport function Grid({ as = 'div', columns = 'auto', minItemWidth = 240, gap = 4, stretch, className, style, ...props }: GridProps) {\n const tpl = (c: number | 'auto') => (c === 'auto' ? `repeat(${stretch ? 'auto-fit' : 'auto-fill'}, minmax(min(${minItemWidth}px, 100%), 1fr))` : `repeat(${c}, minmax(0, 1fr))`);\n const many = (typeof columns === 'object' ? Object.values(columns) : [columns]).some(c => typeof c === 'number' && c >= 6);\n return createElement(as, { ...props, 'data-many': many || undefined, className: cx('alea-grid alea-r-gap alea-r-cols', className), style: { ...responsiveVars('alea-gap', gap, space), ...responsiveVars('alea-cols', columns, tpl), ...style } as CSSProperties });\n}\n\nexport interface GridItemProps extends BoxProps {\n /** Columns it spans (of the grid's columns, usually 12), per breakpoint: { base: 12, md: 6, lg: 4 }. 'full' spans all. */\n span?: Responsive<number | 'full'>;\n /** Column it starts at, per breakpoint. */\n start?: Responsive<number>;\n}\n\n/** A cell of a Grid that spans several columns, with a value per breakpoint. */\nexport function GridItem({ as = 'div', span, start, className, style, ...props }: GridItemProps) {\n return createElement(as, { ...props, className: cx('alea-grid-item', span !== undefined && 'alea-r-span', start !== undefined && 'alea-r-start', className), style: { ...responsiveVars('alea-span', span, v => (v === 'full' ? '1 / -1' : `span ${v} / span ${v}`)), ...responsiveVars('alea-start', start, String), ...style } as CSSProperties });\n}\n\nexport interface ContainerProps extends BoxProps {\n /** Max width: sm 640, md 768, lg 1024, xl 1280 (the default page width), full. */\n size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';\n}\n\n/** Centers content at a max width with the page gutters. */\nexport function Container({ as = 'div', size = 'xl', className, ...props }: ContainerProps) {\n return createElement(as, { ...props, className: cx('alea-container', className), 'data-size': size });\n}\n\nexport interface DividerProps extends SeparatorProps {\n /** Spacing around the line, from the space scale. */\n spacing?: Space;\n /** Text or an icon in the line (\"or\", \"Today\"). Horizontal only. */\n label?: ReactNode;\n /** Where the label sits: center (default), start or end. */\n labelPosition?: 'start' | 'center' | 'end';\n /** solid (default), dashed or dotted. */\n variant?: 'solid' | 'dashed' | 'dotted';\n}\n\n/** A thin rule between groups, with an optional label in it; solid, dashed or dotted. */\nexport function Divider({ orientation = 'horizontal', spacing = 0, label, labelPosition = 'center', variant, className, style, ...props }: DividerProps) {\n const margin = orientation === 'horizontal' ? `${space(spacing)} 0` : `0 ${space(spacing)}`;\n if (label && orientation === 'horizontal') {\n return (\n <div className={cx('alea-divider-labeled', className as string)} data-position={labelPosition} data-variant={variant} style={{ margin, ...(style as CSSProperties) }}>\n <Separator {...props} className=\"alea-divider\" />\n <span className=\"alea-divider-label\">{label}</span>\n <Separator {...props} className=\"alea-divider\" aria-hidden=\"true\" />\n </div>\n );\n }\n return <Separator {...props} orientation={orientation} data-variant={variant} className={cx('alea-divider', className as string)} style={{ margin, ...(style as CSSProperties) }} />;\n}\n"},{"path":"components/layout/Layout2.tsx","content":"import { useEffect, useId, useRef, useState, type CSSProperties, type ReactNode } from 'react';\nimport { spaceFromPx } from '../../utils/space';\nimport { cx } from '../../utils/cx';\nimport { useStrings } from '../../i18n/strings';\n\n// ---------------------------------------------------------------- aspect ratio\nexport interface AspectRatioProps {\n /** width / height, e.g. 16 / 9. Default 16 / 9. */\n ratio?: number;\n children: ReactNode;\n /** Extra class names for the root element. */\n className?: string;\n /** Inline styles for the root element. */\n style?: CSSProperties;\n}\n\n/** Keeps its content at a width-to-height ratio: videos, maps, images. */\nexport function AspectRatio({ ratio = 16 / 9, children, className, style }: AspectRatioProps) {\n return <div className={cx('alea-aspect', className)} style={{ aspectRatio: String(ratio), ...style }}>{children}</div>;\n}\n\n// ---------------------------------------------------------------- scroll area\nexport interface ScrollAreaProps {\n children: ReactNode;\n /** Max height (or height) in px or CSS. */\n height?: number | string;\n /** Name, so keyboard users can find and scroll it. */\n 'aria-label': string;\n /** vertical (default), horizontal or both. */\n direction?: 'vertical' | 'horizontal' | 'both';\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** A scrolling region with thin themed scrollbars and fades that show there is more. Focusable only when it scrolls. */\nexport function ScrollArea({ children, height = 240, direction = 'vertical', className, 'aria-label': label }: ScrollAreaProps) {\n const ref = useRef<HTMLDivElement>(null);\n const [edge, setEdge] = useState({ start: false, end: false, scrolls: false });\n const check = () => {\n const el = ref.current; if (!el) return;\n const v = direction !== 'horizontal';\n const pos = v ? el.scrollTop : el.scrollLeft, size = v ? el.scrollHeight - el.clientHeight : el.scrollWidth - el.clientWidth;\n setEdge({ start: pos > 2, end: pos < size - 2, scrolls: size > 1 });\n };\n useEffect(() => {\n check();\n if (typeof ResizeObserver === 'undefined') return;\n const ro = new ResizeObserver(check); if (ref.current) { ro.observe(ref.current); if (ref.current.firstElementChild) ro.observe(ref.current.firstElementChild); }\n return () => ro.disconnect();\n }, []);\n return (\n <div className={cx('alea-scroll', className)} data-direction={direction} data-start={edge.start || undefined} data-end={edge.end || undefined}>\n <div ref={ref} className=\"alea-scroll-view\" onScroll={check} style={{ [direction === 'horizontal' ? 'maxWidth' : 'maxHeight']: direction === 'horizontal' ? '100%' : height }}\n tabIndex={edge.scrolls ? 0 : undefined} role={edge.scrolls ? 'region' : undefined} aria-label={edge.scrolls ? label : undefined}>\n <div className=\"alea-scroll-content\">{children}</div>\n </div>\n </div>\n );\n}\n\n// ---------------------------------------------------------------- masonry\nexport interface MasonryProps {\n children: ReactNode;\n /** Least column width in px; columns are added as space allows. Default 220. */\n columnWidth?: number;\n /** Gap in px, landed on the nearest space step. Default 12. */\n gap?: number;\n /** Extra class names for the root element. */\n className?: string;\n /** Render as a list (ul); children should then be li. Default false. */\n asList?: boolean;\n}\n\n/** Cards of different heights packed into columns. Reading order follows the columns top to bottom. */\nexport function Masonry({ children, columnWidth = 220, gap = 12, className, asList }: MasonryProps) {\n const Tag = (asList ? 'ul' : 'div') as 'div';\n return <Tag className={cx('alea-masonry', className)} style={{ columnWidth, columnGap: spaceFromPx(gap), ['--alea-masonry-gap' as any]: spaceFromPx(gap) }}>{children}</Tag>;\n}\n\nexport interface ImageListProps {\n /** Images: src, alt, and an optional title and subtitle shown over the bottom. */\n items: Array<{ src: string; alt: string; title?: string; subtitle?: string; href?: string }>;\n /** grid (same size) or masonry (keeps each image's shape). Default grid. */\n variant?: 'grid' | 'masonry';\n /** Least width of a tile. Default 180. */\n minItemWidth?: number;\n /** Tile ratio in grid. Default 1. */\n ratio?: number;\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** A gallery of images with optional captions. */\nexport function ImageList({ items, variant = 'grid', minItemWidth = 180, ratio = 1, className }: ImageListProps) {\n const tile = (it: ImageListProps['items'][number]) => {\n const img = <img src={it.src} alt={it.alt} loading=\"lazy\" style={variant === 'grid' ? { aspectRatio: String(ratio) } : undefined} />;\n const cap = (it.title || it.subtitle) && <span className=\"alea-imagelist-cap\">{it.title && <span className=\"alea-imagelist-title\">{it.title}</span>}{it.subtitle && <span className=\"alea-imagelist-sub\">{it.subtitle}</span>}</span>;\n return it.href ? <a href={it.href} className=\"alea-imagelist-tile alea-focus-ring\">{img}{cap}</a> : <figure className=\"alea-imagelist-tile\">{img}{cap && <figcaption>{cap}</figcaption>}</figure>;\n };\n if (variant === 'masonry') return <Masonry asList columnWidth={minItemWidth} className={cx('alea-imagelist', className)}>{items.map((it, i) => <li key={i}>{tile(it)}</li>)}</Masonry>;\n return <ul className={cx('alea-imagelist', className)} style={{ gridTemplateColumns: `repeat(auto-fill, minmax(min(${minItemWidth}px, 100%), 1fr))` }}>{items.map((it, i) => <li key={i}>{tile(it)}</li>)}</ul>;\n}\n\n// ---------------------------------------------------------------- fieldset\nexport interface FieldsetProps {\n /** The group's name, read before each field in it. */\n legend: ReactNode;\n /** One sentence under the legend, linked to the group. */\n description?: ReactNode;\n children: ReactNode;\n /** Disables every field inside. */\n isDisabled?: boolean;\n /** filled (a panel, default) or plain. */\n variant?: 'filled' | 'plain';\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** Groups related fields under a legend: an address, a payment method (HTML fieldset). */\nexport function Fieldset({ legend, description, children, isDisabled, variant = 'filled', className }: FieldsetProps) {\n const id = useId();\n return (\n <fieldset className={cx('alea-fieldset', className)} data-variant={variant} disabled={isDisabled} aria-describedby={description ? id : undefined}>\n <legend className=\"alea-fieldset-legend\">{legend}</legend>\n {description && <p id={id} className=\"alea-fieldset-desc\">{description}</p>}\n <div className=\"alea-fieldset-body\">{children}</div>\n </fieldset>\n );\n}\n\n// ---------------------------------------------------------------- spoiler\nexport interface SpoilerProps {\n children: ReactNode;\n /** Height shown before \"Show more\", px. Default 120. */\n maxHeight?: number;\n /** Text of the button that expands. Default \"Show more\". */\n showLabel?: string;\n /** Text of the button that collapses. Default \"Show less\". */\n hideLabel?: string;\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** Long content cut to a height with a fade and a Show more button. */\nexport function Spoiler({ children, maxHeight = 120, showLabel, hideLabel, className }: SpoilerProps) {\n const t = useStrings(); showLabel ??= t.showMore; hideLabel ??= t.showLess;\n const [open, setOpen] = useState(false);\n const [long, setLong] = useState(true);\n const body = useRef<HTMLDivElement>(null);\n const id = useId();\n useEffect(() => { const el = body.current; if (el && el.scrollHeight) setLong(el.scrollHeight > maxHeight + 8); }, [children, maxHeight]);\n return (\n <div className={cx('alea-spoiler', className)} data-open={open || undefined} data-long={long || undefined}>\n <div id={id} ref={body} className=\"alea-spoiler-body\" style={{ maxHeight: open || !long ? undefined : maxHeight }}>{children}</div>\n {long && <button type=\"button\" className=\"alea-link alea-spoiler-toggle alea-focus-ring\" data-variant=\"standalone\" aria-expanded={open} aria-controls={id} onClick={() => setOpen(!open)}>{open ? hideLabel : showLabel}</button>}\n </div>\n );\n}\n\n// ---------------------------------------------------------------- ribbon\nexport interface RibbonProps {\n /** The ribbon's text: New, Popular, -20%. */\n text: ReactNode;\n children: ReactNode;\n /** Color meaning: accent, success, warning, danger or neutral. */\n tone?: 'accent' | 'success' | 'warning' | 'danger' | 'neutral';\n /** start or end (default) corner. */\n placement?: 'start' | 'end';\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** A label wrapped around the corner of a card. */\nexport function Ribbon({ text, children, tone = 'accent', placement = 'end', className }: RibbonProps) {\n return (\n <div className={cx('alea-ribbon-wrap', className)}>\n {children}\n <span className=\"alea-ribbon\" data-tone={tone} data-placement={placement}>{text}</span>\n </div>\n );\n}\n\n// ---------------------------------------------------------------- indicator\nexport interface IndicatorProps {\n children: ReactNode;\n /** A number, or nothing for a dot. */\n count?: number;\n /** Shows max+ above this. Default 99. */\n max?: number;\n /** What it means, for screen readers (\"3 unread messages\", \"Online\"). */\n label: string;\n /** Color meaning: accent, success, warning, danger or neutral. */\n tone?: 'accent' | 'success' | 'warning' | 'danger' | 'neutral';\n /** Which corner. Default top end. */\n position?: 'top-end' | 'top-start' | 'bottom-end' | 'bottom-start';\n /** Pulse to draw attention. Respects reduced motion. */\n processing?: boolean;\n /** Hide it (keeps the child). */\n isHidden?: boolean;\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** A dot or number on the corner of an avatar, icon or button: status, unread count. */\nexport function Indicator({ children, count, max = 99, label, tone = 'danger', position = 'top-end', processing, isHidden, className }: IndicatorProps) {\n return (\n <span className={cx('alea-indicator-wrap', className)}>\n {children}\n {!isHidden && <span className=\"alea-indicator\" data-tone={tone} data-position={position} data-dot={count == null || undefined} data-processing={processing || undefined} role=\"status\">\n <span aria-hidden=\"true\">{count != null ? (count > max ? `${max}+` : count) : null}</span>\n <span className=\"alea-visually-hidden\">{label}</span>\n </span>}\n </span>\n );\n}\n"},{"path":"components/layout/Layout3.tsx","content":"import { useState, type CSSProperties, type ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\nimport { Card } from '../card/Card';\nimport { SegmentedControl } from '../button/Button';\nimport { useStrings } from '../../i18n/strings';\n\n// ---------------------------------------------------------------- split layout\nexport interface SplitLayoutProps {\n /** Two children: the main content and a narrower column (details, settings, a summary). */\n children: [ReactNode, ReactNode];\n /** Which child is the narrow column. end (default): main, then the side; start: a list or tree first, then the main. */\n narrow?: 'start' | 'end';\n /** Width of the narrow column in px. Default 340. */\n narrowWidth?: number;\n /** Below this available width the columns stack (the layout measures its own space, not the window). Default md (760 px). */\n stackBelow?: 'sm' | 'md' | 'lg';\n /** Extra class names for the root element. */\n className?: string;\n /** Inline styles for the root element. */\n style?: CSSProperties;\n}\n\n/** A main column and a narrower one side by side (an editor and its settings, a list and its detail); they stack when the space gets narrow. */\nexport function SplitLayout({ children, narrow = 'end', narrowWidth = 340, stackBelow = 'md', className, style }: SplitLayoutProps) {\n return (\n <div className={cx('alea-split-layout', className)} style={{ ['--alea-split-layout-narrow' as string]: `${narrowWidth}px`, ...style }}>\n <div className=\"alea-split-layout-grid\" data-narrow={narrow} data-stack={stackBelow}>\n <div className=\"alea-split-layout-col\">{children[0]}</div>\n <div className=\"alea-split-layout-col\">{children[1]}</div>\n </div>\n </div>\n );\n}\n\n// ---------------------------------------------------------------- focus layout\nexport interface FocusLayoutProps {\n /** The one task: sign in, a code, a setup step. */\n children: ReactNode;\n /** Card width: sm (420 px, a form) or md (640 px, a step with choices). Default sm. */\n size?: 'sm' | 'md';\n /** Wrap the content in a card. Default true. */\n card?: boolean;\n /** The element: main (default, when it is the page) or div. */\n as?: 'main' | 'div';\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** One task in the middle of the screen, nothing else around it: sign in, verify, onboarding, a result. */\nexport function FocusLayout({ children, size = 'sm', card = true, as: As = 'main', className }: FocusLayoutProps) {\n return (\n <As id={As === 'main' ? 'main' : undefined} className={cx('alea-focus-layout', className)} data-size={size}>\n {card ? <Card padding=\"loose\" className=\"alea-focus-layout-card\">{children}</Card> : <div className=\"alea-focus-layout-card\">{children}</div>}\n </As>\n );\n}\n\n// ---------------------------------------------------------------- pane layout\nexport interface PaneLayoutProps {\n /** The bar across the top: back, the document's name, tools, publish. */\n bar?: ReactNode;\n /** The pane on the start side (layers, files, outline). Hidden below 1280 px, a tab on phones. */\n start?: ReactNode;\n /** The pane on the end side (inspector, properties, comments). A tab on phones. */\n end?: ReactNode;\n /** The work area (canvas, editor, preview). */\n children: ReactNode;\n /** Names of the three areas, for landmarks and the phone tabs. Default Layers, Canvas, Inspector (translated). */\n labels?: { start?: string; main?: string; end?: string };\n /** Height of the whole layout. Default 100dvh (a full-screen tool). */\n height?: CSSProperties['height'];\n /** The work area's element: main (default) when the layout is the page, div when it sits inside another page. */\n mainAs?: 'main' | 'div';\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** A full-screen tool: a bar on top, panes on the sides and the work area between; on tablets the start pane goes, on phones one area at a time behind tabs. */\nexport function PaneLayout({ bar, start, end, children, labels = {}, height = '100dvh', mainAs: Main = 'main', className }: PaneLayoutProps) {\n const t = useStrings();\n const l = { start: labels.start ?? t.paneLabels.start, main: labels.main ?? t.paneLabels.main, end: labels.end ?? t.paneLabels.end };\n const [area, setArea] = useState<string>('main');\n const tabs = [start ? { id: 'start', label: l.start } : null, { id: 'main', label: l.main }, end ? { id: 'end', label: l.end } : null].filter(Boolean) as Array<{ id: string; label: string }>;\n return (\n <div className={cx('alea-panes', className)} data-area={area} data-start={start ? true : undefined} data-end={end ? true : undefined} style={{ height }}>\n {bar && <header className=\"alea-panes-bar\">{bar}</header>}\n {tabs.length > 1 && <div className=\"alea-panes-tabs\"><SegmentedControl aria-label={t.paneArea} size=\"sm\" value={area} onChange={k => setArea(String(k))} items={tabs} /></div>}\n {start && <aside className=\"alea-panes-start\" aria-label={l.start}>{start}</aside>}\n <Main id={Main === 'main' ? 'main' : undefined} role={Main === 'main' ? undefined : 'region'} className=\"alea-panes-main\" aria-label={l.main}>{children}</Main>\n {end && <aside className=\"alea-panes-end\" aria-label={l.end}>{end}</aside>}\n </div>\n );\n}\n\n// ---------------------------------------------------------------- device frame\nexport interface DeviceFrameProps {\n /** desktop (up to 1280 px), tablet (768) or phone (390). The width animates between them. */\n device?: 'desktop' | 'tablet' | 'phone';\n /** The page inside: a preview of a site, an email, a component. */\n children: ReactNode;\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** A preview at a device's width, centred, with a soft frame: pair it with a SegmentedControl of devices. */\nexport function DeviceFrame({ device = 'desktop', children, className }: DeviceFrameProps) {\n return <div className={cx('alea-device-frame', className)} data-device={device}>{children}</div>;\n}\n"},{"path":"components/layout/Responsive.tsx","content":"import { useEffect, useState, type ReactNode } from 'react';\nimport type { Breakpoint } from './Layout';\n\nconst MIN: Record<Exclude<Breakpoint, 'base'>, number> = { sm: 640, md: 768, lg: 1024, xl: 1280 };\n\n/** Whether a media query matches, updating live. False on the server. */\nexport function useMediaQuery(query: string): boolean {\n const get = () => typeof window !== 'undefined' && !!window.matchMedia && window.matchMedia(query).matches;\n const [on, setOn] = useState(get);\n useEffect(() => {\n if (typeof window === 'undefined' || !window.matchMedia) return;\n const mq = window.matchMedia(query);\n const fn = () => setOn(mq.matches);\n fn(); mq.addEventListener?.('change', fn);\n return () => mq.removeEventListener?.('change', fn);\n }, [query]);\n return on;\n}\n\n/** The current breakpoint (base, sm, md, lg, xl) and helpers: isAbove('md'), isBelow('lg'). */\nexport function useBreakpoint() {\n const sm = useMediaQuery(`(min-width: ${MIN.sm}px)`), md = useMediaQuery(`(min-width: ${MIN.md}px)`), lg = useMediaQuery(`(min-width: ${MIN.lg}px)`), xl = useMediaQuery(`(min-width: ${MIN.xl}px)`);\n const current: Breakpoint = xl ? 'xl' : lg ? 'lg' : md ? 'md' : sm ? 'sm' : 'base';\n const order: Breakpoint[] = ['base', 'sm', 'md', 'lg', 'xl'];\n return { current, isAbove: (bp: Breakpoint) => order.indexOf(current) >= order.indexOf(bp), isBelow: (bp: Breakpoint) => order.indexOf(current) < order.indexOf(bp) };\n}\n\nexport interface ShowProps {\n /** Show from this breakpoint up. */\n above?: Exclude<Breakpoint, 'base'>;\n /** Show below this breakpoint. */\n below?: Exclude<Breakpoint, 'base'>;\n children: ReactNode;\n}\n\n/** Shows its children only above or below a breakpoint, with CSS (no flash, same markup on the server). */\nexport function Show({ above, below, children }: ShowProps) {\n return <div className=\"alea-show\" data-above={above} data-below={below}>{children}</div>;\n}\n/** The opposite of Show: hides its children above or below a breakpoint. */\nexport function Hide({ above, below, children }: ShowProps) {\n return <div className=\"alea-show\" data-above={below} data-below={above}>{children}</div>;\n}\n"},{"path":"components/layout/bento.css","content":"/* Bento: an even grid of rows; cards span columns and rows, and dense flow fills the gaps */\n.alea-bento { display: grid; grid-auto-rows: minmax(var(--alea-bento-row), auto); grid-auto-flow: row dense; }\n.alea-bento-card { display: flex; flex-direction: column; gap: var(--alea-space-4); min-width: 0; overflow: hidden; }\n.alea-bento-visual { position: relative; flex: 1 1 auto; min-height: 96px; margin: calc(var(--alea-space-2) * -1) calc(var(--alea-space-2) * -1) 0; border-radius: calc(var(--alea-radius-lg) - var(--alea-space-2)); overflow: hidden; display: grid; place-items: center; }\n.alea-bento-visual > :is(img, video, svg) { width: 100%; height: 100%; object-fit: cover; }\n.alea-bento-text { display: flex; flex-direction: column; gap: var(--alea-space-1); margin-top: auto; }\n.alea-bento-eyebrow { margin: 0; color: var(--alea-text-faint); font-size: var(--alea-font-size-xs); font-weight: var(--alea-font-weight-semibold); letter-spacing: 0.08em; text-transform: uppercase; }\n.alea-bento-title { display: flex; align-items: center; gap: var(--alea-space-2); margin: 0; color: var(--alea-text); font: var(--alea-font-weight-semibold) var(--alea-font-size-lg) / 1.25 var(--alea-font-family-body); letter-spacing: -0.01em; }\n.alea-bento-title .alea-card-link { color: inherit; }\n.alea-bento-icon { display: inline-flex; color: var(--alea-icon-accent); }\n.alea-bento-icon svg { width: 20px; height: 20px; }\n.alea-bento-desc { margin: 0; color: var(--alea-text-muted); font-size: var(--alea-font-size-md); line-height: 1.5; text-wrap: pretty; }\n"},{"path":"components/layout/layout.css","content":".alea-stack { display: flex; flex-direction: column; min-width: 0; }\n.alea-inline { display: flex; flex-direction: row; min-width: 0; }\n.alea-inline[data-wrap] { flex-wrap: wrap; }\n/* a row that does not wrap reads as label … meta: the last item (a badge, a number, a chart) keeps its size, what comes before gives way */\n/* on one line: text wraps down to its longest word (truncated text all the way), groups keep their content's width,\n controls and marks keep their size */\n.alea-inline:not([data-wrap]) > .alea-inline:not([data-wrap]) { min-width: auto; }\n.alea-inline:not([data-wrap]) > :is(.alea-button, .alea-icon-button, .alea-switch, .alea-badge, .alea-count, .alea-avatar, .alea-icon-tile, .alea-status, .alea-amount, .alea-kbd, .alea-segmented, .alea-toggle-button, .alea-indicator-wrap, .alea-theme-toggle, .alea-spinner, .alea-button-group, button, select, svg) { flex-shrink: 0; }\n.alea-stack[data-align='start'], .alea-inline[data-align='start'] { align-items: flex-start; }\n.alea-stack[data-align='center'], .alea-inline[data-align='center'] { align-items: center; }\n.alea-stack[data-align='end'], .alea-inline[data-align='end'] { align-items: flex-end; }\n.alea-stack[data-align='stretch'], .alea-inline[data-align='stretch'] { align-items: stretch; }\n.alea-stack[data-align='baseline'], .alea-inline[data-align='baseline'] { align-items: baseline; }\n.alea-stack[data-justify='start'], .alea-inline[data-justify='start'] { justify-content: flex-start; }\n.alea-stack[data-justify='center'], .alea-inline[data-justify='center'] { justify-content: center; }\n.alea-stack[data-justify='end'], .alea-inline[data-justify='end'] { justify-content: flex-end; }\n.alea-stack[data-justify='between'], .alea-inline[data-justify='between'] { justify-content: space-between; }\n.alea-grid { display: grid; min-width: 0; }\n.alea-container { width: 100%; margin-inline: auto; padding-inline: clamp(var(--alea-space-4), 4vw, var(--alea-space-8)); }\n.alea-container[data-size='sm'] { max-width: calc(var(--alea-breakpoint-sm) + 64px); }\n.alea-container[data-size='md'] { max-width: calc(var(--alea-breakpoint-md) + 64px); }\n.alea-container[data-size='lg'] { max-width: calc(var(--alea-breakpoint-lg) + 64px); }\n.alea-container[data-size='xl'] { max-width: calc(var(--alea-breakpoint-xl) + 64px); }\n.alea-divider { border: 0; background: var(--alea-border); flex: none; }\n.alea-divider[aria-orientation='vertical'] { width: 1px; align-self: stretch; }\n.alea-divider:not([aria-orientation='vertical']) { height: 1px; width: 100%; }\n\n/* Responsive values: --{prop}-{bp} set inline; each breakpoint falls back to the one below */\n.alea-r-gap { --alea-gap-now: var(--alea-gap-base); gap: var(--alea-gap-now); }\n.alea-r-cols { grid-template-columns: var(--alea-cols-base); }\n.alea-r-span { grid-column: var(--alea-span-base, auto); }\n.alea-r-start { grid-column-start: var(--alea-start-base, auto); }\n.alea-r-rspan { grid-row: var(--alea-rspan-base, auto); }\n.alea-flex { display: flex; min-width: 0; }\n.alea-flex[data-wrap] { flex-wrap: wrap; }\n.alea-r-dir { flex-direction: var(--alea-dir-base, row); }\n.alea-flex[data-align='start'] { align-items: flex-start; } .alea-flex[data-align='center'] { align-items: center; } .alea-flex[data-align='end'] { align-items: flex-end; } .alea-flex[data-align='stretch'] { align-items: stretch; } .alea-flex[data-align='baseline'] { align-items: baseline; }\n.alea-flex[data-justify='start'] { justify-content: flex-start; } .alea-flex[data-justify='center'] { justify-content: center; } .alea-flex[data-justify='end'] { justify-content: flex-end; } .alea-flex[data-justify='between'] { justify-content: space-between; }\n@media (min-width: 640px) {\n .alea-r-rspan { grid-row: var(--alea-rspan-sm, var(--alea-rspan-base, auto)); }\n .alea-r-gap { --alea-gap-now: var(--alea-gap-sm, var(--alea-gap-base)); gap: var(--alea-gap-now); }\n .alea-r-cols { grid-template-columns: var(--alea-cols-sm, var(--alea-cols-base)); }\n .alea-r-span { grid-column: var(--alea-span-sm, var(--alea-span-base, auto)); }\n .alea-r-start { grid-column-start: var(--alea-start-sm, var(--alea-start-base, auto)); }\n .alea-r-dir { flex-direction: var(--alea-dir-sm, var(--alea-dir-base, row)); }\n}\n@media (min-width: 768px) {\n .alea-r-rspan { grid-row: var(--alea-rspan-md, var(--alea-rspan-sm, var(--alea-rspan-base, auto))); }\n .alea-r-gap { --alea-gap-now: var(--alea-gap-md, var(--alea-gap-sm, var(--alea-gap-base))); gap: var(--alea-gap-now); }\n .alea-r-cols { grid-template-columns: var(--alea-cols-md, var(--alea-cols-sm, var(--alea-cols-base))); }\n .alea-r-span { grid-column: var(--alea-span-md, var(--alea-span-sm, var(--alea-span-base, auto))); }\n .alea-r-start { grid-column-start: var(--alea-start-md, var(--alea-start-sm, var(--alea-start-base, auto))); }\n .alea-r-dir { flex-direction: var(--alea-dir-md, var(--alea-dir-sm, var(--alea-dir-base, row))); }\n}\n@media (min-width: 1024px) {\n .alea-r-rspan { grid-row: var(--alea-rspan-lg, var(--alea-rspan-md, var(--alea-rspan-sm, var(--alea-rspan-base, auto)))); }\n .alea-r-gap { --alea-gap-now: var(--alea-gap-lg, var(--alea-gap-md, var(--alea-gap-sm, var(--alea-gap-base)))); gap: var(--alea-gap-now); }\n .alea-r-cols { grid-template-columns: var(--alea-cols-lg, var(--alea-cols-md, var(--alea-cols-sm, var(--alea-cols-base)))); }\n .alea-r-span { grid-column: var(--alea-span-lg, var(--alea-span-md, var(--alea-span-sm, var(--alea-span-base, auto)))); }\n .alea-r-start { grid-column-start: var(--alea-start-lg, var(--alea-start-md, var(--alea-start-sm, var(--alea-start-base, auto)))); }\n .alea-r-dir { flex-direction: var(--alea-dir-lg, var(--alea-dir-md, var(--alea-dir-sm, var(--alea-dir-base, row)))); }\n}\n@media (min-width: 1280px) {\n .alea-r-rspan { grid-row: var(--alea-rspan-xl, var(--alea-rspan-lg, var(--alea-rspan-md, var(--alea-rspan-sm, var(--alea-rspan-base, auto))))); }\n .alea-r-gap { --alea-gap-now: var(--alea-gap-xl, var(--alea-gap-lg, var(--alea-gap-md, var(--alea-gap-sm, var(--alea-gap-base))))); gap: var(--alea-gap-now); }\n .alea-r-cols { grid-template-columns: var(--alea-cols-xl, var(--alea-cols-lg, var(--alea-cols-md, var(--alea-cols-sm, var(--alea-cols-base))))); }\n .alea-r-span { grid-column: var(--alea-span-xl, var(--alea-span-lg, var(--alea-span-md, var(--alea-span-sm, var(--alea-span-base, auto))))); }\n .alea-r-start { grid-column-start: var(--alea-start-xl, var(--alea-start-lg, var(--alea-start-md, var(--alea-start-sm, var(--alea-start-base, auto))))); }\n .alea-r-dir { flex-direction: var(--alea-dir-xl, var(--alea-dir-lg, var(--alea-dir-md, var(--alea-dir-sm, var(--alea-dir-base, row))))); }\n}\n\n/* Show and Hide: CSS only, so server and client render the same markup */\n.alea-show { display: contents; }\n.alea-show[data-above] { display: none; }\n.alea-show[data-below] { display: contents; }\n@media (min-width: 640px) { .alea-show[data-above='sm'] { display: contents; } .alea-show[data-below='sm'] { display: none; } }\n@media (min-width: 768px) { .alea-show[data-above='md'] { display: contents; } .alea-show[data-below='md'] { display: none; } }\n@media (min-width: 1024px) { .alea-show[data-above='lg'] { display: contents; } .alea-show[data-below='lg'] { display: none; } }\n@media (min-width: 1280px) { .alea-show[data-above='xl'] { display: contents; } .alea-show[data-below='xl'] { display: none; } }\n.alea-inline > .alea-divider:not([aria-orientation='vertical']), .alea-flex > .alea-divider:not([aria-orientation='vertical']) { flex: 1 1 0; width: auto; min-width: var(--alea-space-4); }\n\n/* Divider: a label in the line, dashed and dotted */\n.alea-divider[data-variant='dashed'], .alea-divider-labeled[data-variant='dashed'] .alea-divider { background: repeating-linear-gradient(to right, var(--alea-border-strong) 0 6px, transparent 6px 10px); }\n.alea-divider[data-variant='dotted'], .alea-divider-labeled[data-variant='dotted'] .alea-divider { background: repeating-linear-gradient(to right, var(--alea-border-strong) 0 2px, transparent 2px 6px); }\n.alea-divider[aria-orientation='vertical'][data-variant='dashed'] { background: repeating-linear-gradient(to bottom, var(--alea-border-strong) 0 6px, transparent 6px 10px); }\n.alea-divider-labeled { display: flex; align-items: center; gap: var(--alea-space-3); width: 100%; }\n.alea-divider-labeled > .alea-divider { flex: 1; width: auto; }\n.alea-divider-labeled[data-position='start'] > .alea-divider:first-child { flex: 0 0 24px; }\n.alea-divider-labeled[data-position='end'] > .alea-divider:last-child { flex: 0 0 24px; }\n.alea-divider-label { flex: none; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); white-space: nowrap; display: inline-flex; align-items: center; gap: var(--alea-space-2); }\n/* many fixed columns (a 12 column layout): column gaps shrink on narrow screens so the columns never go below zero */\n.alea-grid[data-many] { column-gap: min(var(--alea-gap-now), 100% / 16); }\n/* rendered as a list (as=\"ul\" / \"ol\"): the layout is the list, no bullets or indent */\n:is(ul, ol):is(.alea-stack, .alea-inline, .alea-flex, .alea-grid) { list-style: none; margin: 0; padding: 0; }\n"},{"path":"components/layout/layout2.css","content":"/* AspectRatio, ScrollArea, Masonry, ImageList, Fieldset, Spoiler, Ribbon, Indicator */\n.alea-aspect { position: relative; width: 100%; overflow: hidden; }\n.alea-aspect > :is(img, video, iframe) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }\n\n.alea-scroll { position: relative; }\n.alea-scroll-view { position: relative; overflow: auto; border-radius: inherit; outline: none; }\n.alea-scroll[data-direction='vertical'] .alea-scroll-view { overflow-x: hidden; }\n.alea-scroll[data-direction='horizontal'] .alea-scroll-view { overflow-y: hidden; }\n.alea-scroll-view:focus-visible { box-shadow: inset 0 0 0 2px var(--alea-focus); }\n.alea-scroll-view::-webkit-scrollbar { width: 8px; height: 8px; }\n.alea-scroll-view::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: var(--alea-radius-xs); background: var(--alea-border-strong) padding-box; }\n.alea-scroll::before, .alea-scroll::after { content: ''; position: absolute; left: 0; right: 0; height: 24px; pointer-events: none; opacity: 0.01; transition: opacity var(--alea-motion-duration-base) var(--alea-motion-ease-standard); z-index: 1; }\n.alea-scroll::before { top: 0; background: linear-gradient(var(--alea-bg), transparent); }\n.alea-scroll::after { bottom: 0; background: linear-gradient(transparent, var(--alea-bg)); }\n.alea-scroll[data-start]::before, .alea-scroll[data-end]::after { opacity: 1; }\n.alea-scroll[data-direction='horizontal']::before, .alea-scroll[data-direction='horizontal']::after { top: 0; bottom: 0; width: 24px; height: auto; }\n.alea-scroll[data-direction='horizontal']::before { left: 0; right: auto; background: linear-gradient(90deg, var(--alea-bg), transparent); }\n.alea-scroll[data-direction='horizontal']::after { left: auto; right: 0; background: linear-gradient(-90deg, var(--alea-bg), transparent); }\n\n.alea-masonry { margin: 0; padding: 0; list-style: none; }\n.alea-masonry > * { break-inside: avoid; margin-bottom: var(--alea-masonry-gap, var(--alea-space-3)); }\n\nul.alea-imagelist:not(.alea-masonry) { display: grid; gap: var(--alea-space-2); margin: 0; padding: 0; list-style: none; }\n.alea-imagelist-tile { position: relative; display: block; margin: 0; overflow: hidden; border-radius: var(--alea-radius-md); background: var(--alea-surface-raised); color: var(--alea-on-media); text-decoration: none; }\n.alea-imagelist-tile img { display: block; width: 100%; height: auto; object-fit: cover; transition: transform var(--alea-motion-duration-slow) var(--alea-motion-ease-out); }\na.alea-imagelist-tile:hover img { transform: scale(calc(2 - var(--alea-motion-scale-press))); }\n.alea-imagelist-cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: var(--alea-space-0-5); padding: var(--alea-space-6) var(--alea-space-3) var(--alea-space-3); background: linear-gradient(transparent, rgba(0, 0, 0, 0.72)); }\n.alea-imagelist-title { font-size: var(--alea-font-size-md); font-weight: var(--alea-font-weight-semibold); }\n.alea-imagelist-sub { font-size: var(--alea-font-size-xs); color: rgba(255, 255, 255, 0.86); }\n\n.alea-fieldset { min-width: 0; margin: 0; padding: var(--alea-space-5); border: 0; border-radius: var(--alea-radius-lg); }\n.alea-fieldset[data-variant='filled'] { background: var(--alea-surface); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-fieldset[data-variant='plain'] { padding: 0; }\n.alea-fieldset-legend { float: left; width: 100%; margin-bottom: var(--alea-space-1); padding: 0; font: var(--alea-font-weight-semibold) var(--alea-font-size-base) / 1.3 var(--alea-font-family-body); color: var(--alea-text); }\n.alea-fieldset-desc { clear: both; margin: 0 0 var(--alea-space-4); font-size: var(--alea-font-size-sm); color: var(--alea-text-muted); }\n.alea-fieldset-body { clear: both; display: grid; gap: var(--alea-space-4); }\n.alea-fieldset:disabled { opacity: 0.6; }\n\n.alea-spoiler-body { position: relative; overflow: hidden; transition: max-height var(--alea-motion-duration-slow) var(--alea-motion-ease-out); }\n.alea-spoiler[data-long]:not([data-open]) .alea-spoiler-body::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 48px; background: linear-gradient(transparent, var(--alea-bg)); pointer-events: none; }\n.alea-spoiler-toggle { margin-top: var(--alea-space-2); padding: 0; border: 0; background: none; font: inherit; font-size: var(--alea-font-size-sm); }\n\n.alea-ribbon-wrap { position: relative; }\n/* Same solid colors as the solid badges, which pass 4.5:1 in both themes. */\n.alea-ribbon { --alea-r: var(--alea-accent-solid); position: absolute; top: var(--alea-space-3); z-index: 1; padding: var(--alea-space-1) var(--alea-space-3); font: var(--alea-font-weight-semibold) var(--alea-font-size-xs) / 1.5 var(--alea-font-family-body); color: var(--alea-accent-on); background: var(--alea-r); }\n.alea-ribbon[data-placement='end'] { right: calc(var(--alea-space-1-5) * -1); border-radius: var(--alea-radius-xs) var(--alea-radius-xs) 0 var(--alea-radius-xs); }\n.alea-ribbon[data-placement='start'] { left: calc(var(--alea-space-1-5) * -1); border-radius: var(--alea-radius-xs) var(--alea-radius-xs) var(--alea-radius-xs) 0; }\n.alea-ribbon::after { content: ''; position: absolute; bottom: calc(var(--alea-space-1-5) * -1); border: 3px solid transparent; filter: brightness(0.55); }\n.alea-ribbon[data-placement='end']::after { right: 0; border-top-color: var(--alea-r); border-left-color: var(--alea-r); }\n.alea-ribbon[data-placement='start']::after { left: 0; border-top-color: var(--alea-r); border-right-color: var(--alea-r); }\n.alea-ribbon[data-tone='success'] { --alea-r: var(--alea-status-success-solid); color: var(--alea-status-success-on-solid); }\n.alea-ribbon[data-tone='warning'] { --alea-r: var(--alea-status-warning-solid); color: var(--alea-status-warning-on-solid); }\n.alea-ribbon[data-tone='danger'] { --alea-r: var(--alea-status-danger-solid); color: var(--alea-status-danger-on-solid); }\n.alea-ribbon[data-tone='neutral'] { --alea-r: var(--alea-chip-bg); color: var(--alea-chip-text); }\n\n.alea-indicator-wrap { position: relative; display: inline-flex; }\n.alea-indicator { position: absolute; z-index: 1; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 var(--alea-space-1); border-radius: var(--alea-radius-md); font: 600 10px/1 var(--alea-font-family-body); color: var(--alea-status-danger-on-solid); background: var(--alea-status-danger-solid); box-shadow: 0 0 0 2px var(--alea-bg); }\n.alea-indicator[data-dot] { min-width: 12px; width: 12px; height: 12px; padding: 0; }\n.alea-indicator[data-position='top-end'] { top: 0; right: 0; transform: translate(35%, -35%); }\n.alea-indicator[data-position='top-start'] { top: 0; left: 0; transform: translate(-35%, -35%); }\n.alea-indicator[data-position='bottom-end'] { bottom: 0; right: 0; transform: translate(25%, 25%); }\n.alea-indicator[data-position='bottom-start'] { bottom: 0; left: 0; transform: translate(-25%, 25%); }\n.alea-indicator[data-tone='success'] { background: var(--alea-status-success); color: var(--alea-bg-deep); }\n.alea-indicator[data-tone='warning'] { background: var(--alea-status-warning); color: var(--alea-bg-deep); }\n.alea-indicator[data-tone='accent'] { background: var(--alea-accent-strong); color: var(--alea-accent-on); }\n.alea-indicator[data-tone='neutral'] { background: var(--alea-text-muted); color: var(--alea-bg); }\n.alea-indicator[data-processing]::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: alea-ping 1.4s var(--alea-motion-ease-out) infinite; z-index: -1; }\n"},{"path":"components/layout/layout3.css","content":"/* SplitLayout: measures its own width (a container), so it stacks inside a narrow panel too */\n.alea-split-layout { container-type: inline-size; }\n.alea-split-layout-grid { display: grid; gap: var(--alea-space-4); align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, var(--alea-split-layout-narrow, 340px)); }\n.alea-split-layout-grid[data-narrow='start'] { grid-template-columns: minmax(0, var(--alea-split-layout-narrow, 340px)) minmax(0, 1fr); }\n.alea-split-layout-col { min-width: 0; display: flex; flex-direction: column; gap: var(--alea-space-4); }\n@container (max-width: 559.98px) { .alea-split-layout-grid[data-stack='sm'] { grid-template-columns: minmax(0, 1fr); } }\n@container (max-width: 759.98px) { .alea-split-layout-grid[data-stack='md'] { grid-template-columns: minmax(0, 1fr); } }\n@container (max-width: 959.98px) { .alea-split-layout-grid[data-stack='lg'] { grid-template-columns: minmax(0, 1fr); } }\n\n/* FocusLayout: one card in the middle of the screen */\n.alea-focus-layout { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: var(--alea-space-6) var(--alea-space-4); }\n.alea-focus-layout-card { width: min(100%, 420px); }\n.alea-focus-layout[data-size='md'] .alea-focus-layout-card { width: min(100%, 640px); }\n\n/* PaneLayout: bar, start pane, work area, end pane; on tablets the start pane goes; on phones one area at a time */\n.alea-panes { display: grid; grid-template-columns: 264px minmax(0, 1fr) 296px; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: 'bar bar bar' 'start main end'; background: var(--alea-bg); }\n.alea-panes:not([data-start]) { grid-template-columns: minmax(0, 1fr) 296px; grid-template-areas: 'bar bar' 'main end'; }\n.alea-panes:not([data-end]) { grid-template-columns: 264px minmax(0, 1fr); grid-template-areas: 'bar bar' 'start main'; }\n.alea-panes-bar { grid-area: bar; display: flex; align-items: center; justify-content: space-between; gap: var(--alea-space-3); min-width: 0; padding: var(--alea-space-2) var(--alea-space-3); border-bottom: 1px solid var(--alea-border); background: var(--alea-surface); }\n.alea-panes-bar > .alea-toolbar-fit { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; }\n.alea-panes-tabs { display: none; grid-area: tabs; padding: var(--alea-space-2) var(--alea-space-3); border-bottom: 1px solid var(--alea-border); }\n.alea-panes-start, .alea-panes-end, .alea-panes-main { position: relative; overflow: auto; min-width: 0; min-height: 0; }\n.alea-panes-start, .alea-panes-end { padding: var(--alea-space-4); background: var(--alea-surface); }\n.alea-panes-start { grid-area: start; border-right: 1px solid var(--alea-border); }\n.alea-panes-end { grid-area: end; border-left: 1px solid var(--alea-border); }\n.alea-panes-main { grid-area: main; padding: var(--alea-space-6); background: var(--alea-surface-deep, var(--alea-bg)); outline: none; }\n@media (max-width: 1279.98px) {\n .alea-panes[data-start][data-end] { grid-template-columns: minmax(0, 1fr) 280px; grid-template-areas: 'bar bar' 'main end'; }\n .alea-panes[data-start][data-end] .alea-panes-start { display: none; }\n}\n@media (max-width: 899.98px) {\n .alea-panes, .alea-panes:not([data-start]), .alea-panes:not([data-end]), .alea-panes[data-start][data-end] { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: 'bar' 'tabs' 'area'; }\n .alea-panes-tabs { display: block; }\n .alea-panes-start, .alea-panes-end, .alea-panes-main, .alea-panes[data-start][data-end] .alea-panes-start { display: none; grid-area: area; border: 0; }\n .alea-panes[data-area='start'] .alea-panes-start, .alea-panes[data-area='main'] .alea-panes-main, .alea-panes[data-area='end'] .alea-panes-end { display: block; }\n .alea-panes-main { padding: var(--alea-space-3); }\n .alea-panes-bar > .alea-toolbar-fit { display: none; }\n}\n\n/* DeviceFrame: a preview at a device's width */\n.alea-device-frame { margin-inline: auto; width: 100%; max-width: 1280px; border-radius: var(--alea-radius-md); overflow: hidden; box-shadow: var(--alea-shadow-card), 0 0 0 1px var(--alea-border); background: var(--alea-bg); transition: max-width var(--alea-motion-duration-slow, 320ms) var(--alea-motion-ease-out); }\n.alea-device-frame[data-device='tablet'] { max-width: 768px; }\n.alea-device-frame[data-device='phone'] { max-width: 390px; }\n@media (prefers-reduced-motion: reduce) { .alea-device-frame { transition: none; } }\n"}],"deps":["card","button"],"npm":["react-aria-components"],"exports":["BentoGrid","BentoCard","responsiveVars","Stack","Inline","Flex","Grid","GridItem","Container","Divider","AspectRatio","ScrollArea","Masonry","ImageList","Fieldset","Spoiler","Ribbon","Indicator","SplitLayout","FocusLayout","PaneLayout","DeviceFrame","useMediaQuery","useBreakpoint","Show","Hide"],"descriptions":{"BentoGrid":"A bento layout: cards of different sizes on an even grid that fills the gaps. On phones it is one column.","BentoCard":"A cell of a BentoGrid: an optional visual on top, then the title and text.","responsiveVars":"CSS variables --{name}-{bp} for a responsive value; the CSS picks the right one per breakpoint.","Stack":"Children in a column with even space between them.","Inline":"Children in a row, wrapping by default.","Flex":"A flex row or column whose direction and gap can change per breakpoint.","Grid":"A responsive grid: fixed columns, as many as fit, or a different count per breakpoint.","GridItem":"A cell of a Grid that spans several columns, with a value per breakpoint.","Container":"Centers content at a max width with the page gutters.","Divider":"A thin rule between groups, with an optional label in it; solid, dashed or dotted.","AspectRatio":"Keeps its content at a width-to-height ratio: videos, maps, images.","ScrollArea":"A scrolling region with thin themed scrollbars and fades that show there is more. Focusable only when it scrolls.","Masonry":"Cards of different heights packed into columns. Reading order follows the columns top to bottom.","ImageList":"A gallery of images with optional captions.","Fieldset":"Groups related fields under a legend: an address, a payment method (HTML fieldset).","Spoiler":"Long content cut to a height with a fade and a Show more button.","Ribbon":"A label wrapped around the corner of a card.","Indicator":"A dot or number on the corner of an avatar, icon or button: status, unread count.","SplitLayout":"A main column and a narrower one side by side (an editor and its settings, a list and its detail); they stack when the space gets narrow.","FocusLayout":"One task in the middle of the screen, nothing else around it: sign in, verify, onboarding, a result.","PaneLayout":"A full-screen tool: a bar on top, panes on the sides and the work area between; on tablets the start pane goes, on phones one area at a time behind tabs.","DeviceFrame":"A preview at a device's width, centred, with a soft frame: pair it with a SegmentedControl of devices.","useMediaQuery":"Whether a media query matches, updating live. False on the server.","useBreakpoint":"The current breakpoint (base, sm, md, lg, xl) and helpers: isAbove('md'), isBelow('lg').","Show":"Shows its children only above or below a breakpoint, with CSS (no flash, same markup on the server).","Hide":"The opposite of Show: hides its children above or below a breakpoint."}},"list":{"files":[{"path":"components/list/List.tsx","content":"import type { ReactNode } from 'react';\nimport {\n GridList, GridListItem, Checkbox as RACCheckbox, Button as RACButton, DropIndicator as RACDropIndicator, useDragAndDrop, isTextDropItem,\n type GridListProps, type GridListItemProps, type Key, type DropTarget, type DropIndicatorProps,\n} from 'react-aria-components';\nimport { Check, GripVertical } from 'lucide-react';\nimport { cx, withBase } from '../../utils/cx';\nimport { useStrings } from '../../i18n/strings';\n\ntype WithId = { id: Key };\n\n/** Moves keys of a list before, after (or into) a target: the new array after a drag. */\nexport function reorderItems<T extends WithId>(items: T[], keys: Key[], target: { key: Key; dropPosition: 'before' | 'after' | 'on' }): T[] {\n const moving = items.filter(i => keys.includes(i.id));\n const rest = items.filter(i => !keys.includes(i.id));\n let at = rest.findIndex(i => i.id === target.key);\n if (at < 0) return items;\n if (target.dropPosition === 'after') at += 1;\n return [...rest.slice(0, at), ...moving, ...rest.slice(at)];\n}\n\nexport interface ListViewProps<T extends object> extends GridListProps<T> {\n /** Lines between items (joined), separate cards, or nothing (plain). */\n variant?: 'joined' | 'separated' | 'plain';\n /** stack (rows, default) or grid (cards in columns, arrow keys move in two directions). Set the column width with --alea-list-min. */\n layout?: 'stack' | 'grid';\n /** With items: rows can be dragged to reorder (and moved between lists with the same dragGroup). Called with the new array. */\n onItemsChange?: (items: T[]) => void;\n /** Lists with the same dragGroup accept each other's rows. Items must be plain data (they travel as JSON). */\n dragGroup?: string;\n}\n\n/** A list of rich items people can select, open or act on, with keyboard navigation. Rows can be dragged to reorder, or between lists; cards can sit in a grid. */\nexport function ListView<T extends object>({ variant = 'joined', layout = 'stack', onItemsChange, dragGroup, items, className, ...props }: ListViewProps<T>) {\n const list = (items ? [...items] : []) as unknown as Array<T & WithId>;\n const type = dragGroup ? `application/x-alea-${dragGroup}` : 'application/x-alea-list';\n const text = (it: any) => String(it?.textValue ?? it?.label ?? it?.name ?? it?.title ?? it?.id ?? '');\n const { dragAndDropHooks } = useDragAndDrop<T>({\n getItems: keys => [...keys].map(k => { const it = list.find(i => i.id === k); return { 'text/plain': text(it), [type]: JSON.stringify(it) }; }),\n acceptedDragTypes: [type],\n getDropOperation: () => 'move',\n onReorder: e => onItemsChange?.(reorderItems(list, [...e.keys], e.target as any) as unknown as T[]),\n onInsert: dragGroup ? async e => {\n const dropped = await Promise.all(e.items.filter(isTextDropItem).map(async i => JSON.parse(await i.getText(type))));\n const t = e.target as DropTarget & { key: Key; dropPosition: 'before' | 'after' };\n let at = list.findIndex(i => i.id === t.key); if (t.dropPosition === 'after') at += 1;\n onItemsChange?.([...list.slice(0, at), ...dropped, ...list.slice(at)] as unknown as T[]);\n } : undefined,\n onRootDrop: dragGroup ? async e => {\n const dropped = await Promise.all(e.items.filter(isTextDropItem).map(async i => JSON.parse(await i.getText(type))));\n onItemsChange?.([...list, ...dropped] as unknown as T[]);\n } : undefined,\n onDragEnd: dragGroup ? e => { if (e.dropOperation === 'move' && !e.isInternal) onItemsChange?.(list.filter(i => !e.keys.has(i.id)) as unknown as T[]); } : undefined,\n renderDropIndicator: target => <DropIndicator target={target} />,\n });\n return (\n <GridList {...props} items={items} layout={layout} dragAndDropHooks={onItemsChange ? dragAndDropHooks : undefined}\n data-variant={variant} data-layout={layout} data-draggable={onItemsChange ? true : undefined}\n className={withBase('alea-list', className as any)} />\n );\n}\n\n/** The line that shows where a dragged row will land. Use it in renderDropIndicator of your own drag and drop. */\nexport function DropIndicator(props: DropIndicatorProps) {\n return <RACDropIndicator {...props} className={cx('alea-drop-indicator', props.className as string)} />;\n}\n\n/** The handle that starts a drag with the keyboard (Enter) or a screen reader. Put it in rows of a draggable list or table. */\nexport function DragHandle({ label, className }: { /** Accessible name. Default \"Drag to move\", from the kit strings. */ label?: string; className?: string }) {\n const t = useStrings();\n return <RACButton slot=\"drag\" className={cx('alea-drag-handle alea-focus-ring', className)} aria-label={label ?? t.dragToMove}><GripVertical size={16} aria-hidden=\"true\" /></RACButton>;\n}\n\nexport { useDragAndDrop, isTextDropItem, useListData, useTreeData, useAsyncList } from 'react-aria-components';\n\nexport interface ListItemProps extends Omit<GridListItemProps, 'children'> {\n children: ReactNode;\n /** A second line. */\n description?: ReactNode;\n /** An avatar, icon or image on the left. */\n start?: ReactNode;\n /** Actions or meta on the right (buttons stay reachable with Tab and arrows). */\n end?: ReactNode;\n}\n\n/** One item of a ListView. */\nexport function ListItem({ children, description, start, end, className, textValue, ...props }: ListItemProps) {\n return (\n <GridListItem {...props} textValue={textValue ?? (typeof children === 'string' ? children : undefined)} className={withBase('alea-list-item', className as any)}>\n {({ selectionMode, selectionBehavior, allowsDragging }) => (\n <>\n {allowsDragging && <DragHandle />}\n {selectionMode !== 'none' && selectionBehavior === 'toggle' && (\n <RACCheckbox slot=\"selection\" className=\"alea-check alea-table-check\"><span className=\"alea-check-box\" aria-hidden=\"true\"><Check size={14} strokeWidth={3} /></span></RACCheckbox>\n )}\n {start && <span className=\"alea-list-start\">{start}</span>}\n <span className=\"alea-list-text\"><span className=\"alea-list-title\">{children}</span>{description && <span className=\"alea-list-desc\">{description}</span>}</span>\n {end && <span className=\"alea-list-end\">{end}</span>}\n </>\n )}\n </GridListItem>\n );\n}\n"},{"path":"components/list/Lists2.tsx","content":"import type { ReactNode } from 'react';\nimport { RadioGroup as RACRadioGroup, Radio as RACRadio } from 'react-aria-components';\nimport { Check } from 'lucide-react';\nimport { cx } from '../../utils/cx';\nimport { useStrings } from '../../i18n/strings';\n\n// ---------------------------------------------------------------- StructuredList\n\nexport interface StructuredListProps<T extends { id: string }> {\n /** The columns: key in each row, header, and alignment. */\n columns: Array<{ key: keyof T & string; label: ReactNode; align?: 'start' | 'end'; width?: string }>;\n /** The rows. */\n rows: T[];\n /** Name for screen readers. */\n 'aria-label': string;\n /** single: each row is a choice (a radio), for plans and options compared side by side. Default none. */\n selectionMode?: 'none' | 'single';\n /** The chosen row id (controlled). */\n value?: string;\n /** The chosen row at first. */\n defaultValue?: string;\n /** Called with the chosen row id. */\n onChange?: (id: string) => void;\n /** Shows the column headers. Default true. */\n showHeader?: boolean;\n /** Extra class names. */\n className?: string;\n}\n\n/** Rows of facts in columns, lighter than a table: plan comparisons, settings summaries. With selectionMode=\"single\", each row is a choice. On phones each row stacks its cells. */\nexport function StructuredList<T extends { id: string }>({ columns, rows, selectionMode = 'none', value, defaultValue, onChange, showHeader = true, className, 'aria-label': label }: StructuredListProps<T>) {\n const grid = { gridTemplateColumns: `${selectionMode === 'single' ? '40px ' : ''}${columns.map(c => c.width ?? 'minmax(0, 1fr)').join(' ')}` };\n const head = showHeader && (\n <div className=\"alea-slist-row alea-slist-head\" style={grid} aria-hidden={selectionMode === 'single' || undefined} role={selectionMode === 'single' ? undefined : 'row'}>\n {selectionMode === 'single' && <span />}\n {columns.map(c => <span key={c.key} className=\"alea-slist-cell\" data-align={c.align} role={selectionMode === 'single' ? undefined : 'columnheader'}>{c.label}</span>)}\n </div>\n );\n if (selectionMode === 'single') {\n return (\n <RACRadioGroup aria-label={label} value={value} defaultValue={defaultValue} onChange={onChange} className={cx('alea-slist', className)} data-selectable>\n {head}\n {rows.map(r => (\n <RACRadio key={r.id} value={r.id} className=\"alea-slist-row alea-slist-option alea-focus-ring\" style={grid}>\n {({ isSelected }) => (\n <>\n <span className=\"alea-slist-check\" aria-hidden=\"true\">{isSelected && <Check size={16} />}</span>\n {columns.map(c => <span key={c.key} className=\"alea-slist-cell\" data-align={c.align} data-label={typeof c.label === 'string' ? c.label : undefined}>{r[c.key] as ReactNode}</span>)}\n </>\n )}\n </RACRadio>\n ))}\n </RACRadioGroup>\n );\n }\n return (\n <div className={cx('alea-slist', className)} role=\"table\" aria-label={label}>\n {head}\n <div role=\"rowgroup\">\n {rows.map(r => (\n <div key={r.id} className=\"alea-slist-row\" role=\"row\" style={grid}>\n {columns.map((c, i) => <span key={c.key} className=\"alea-slist-cell\" role={i === 0 ? 'rowheader' : 'cell'} data-align={c.align} data-label={typeof c.label === 'string' ? c.label : undefined}>{r[c.key] as ReactNode}</span>)}\n </div>\n ))}\n </div>\n </div>\n );\n}\n\n// ---------------------------------------------------------------- ContainedList\n\nexport interface ContainedListProps {\n /** The title of the list. */\n label: ReactNode;\n /** An action beside the title: Add, View all. */\n action?: ReactNode;\n /** ContainedListItem elements. */\n children: ReactNode;\n /** on-page (a card, default) or disclosed (flat, for lists inside popovers and panels). */\n kind?: 'on-page' | 'disclosed';\n /** sm (40 px rows), md (48 px, default) or lg (64 px). */\n size?: 'sm' | 'md' | 'lg';\n /** Heading level of the title. Default 3. */\n headingLevel?: 2 | 3 | 4;\n /** Extra class names. */\n className?: string;\n}\n\n/** A titled list in its own container, with an action: recent files, members, integrations. Rows hold text, an icon or avatar at the start, and actions at the end. */\nexport function ContainedList({ label, action, children, kind = 'on-page', size = 'md', headingLevel = 3, className }: ContainedListProps) {\n const H = `h${headingLevel}` as 'h3';\n return (\n <section className={cx('alea-clist', className)} data-kind={kind} data-size={size}>\n <header className=\"alea-clist-head\"><H className=\"alea-clist-title\">{label}</H>{action && <div className=\"alea-clist-action\">{action}</div>}</header>\n <ul className=\"alea-clist-items\">{children}</ul>\n </section>\n );\n}\n\nexport interface ContainedListItemProps {\n children: ReactNode;\n /** A second line. */\n description?: ReactNode;\n /** An icon or avatar at the start. */\n start?: ReactNode;\n /** Meta or actions at the end. */\n end?: ReactNode;\n /** Makes the whole row a link. */\n href?: string;\n}\n\n/** One row of a ContainedList. */\nexport function ContainedListItem({ children, description, start, end, href }: ContainedListItemProps) {\n const body = (\n <>\n {start && <span className=\"alea-clist-start\">{start}</span>}\n <span className=\"alea-clist-text\"><span className=\"alea-clist-name\">{children}</span>{description && <span className=\"alea-clist-desc\">{description}</span>}</span>\n </>\n );\n return (\n <li className=\"alea-clist-item\">\n {href ? <a href={href} className=\"alea-clist-link alea-focus-ring\">{body}</a> : <span className=\"alea-clist-link\">{body}</span>}\n {end && <span className=\"alea-clist-end\">{end}</span>}\n </li>\n );\n}\n\n// ---------------------------------------------------------------- PageIndicator\n\nexport interface PageIndicatorProps {\n /** How many pages. */\n count: number;\n /** The current page, from 0. */\n current: number;\n /** Called with the page to go to; leave it out for a display only indicator. */\n onChange?: (index: number) => void;\n /** dots (default), bars (the current one stretches) or numbers (\"2 / 5\"). */\n variant?: 'dots' | 'bars' | 'numbers';\n /** Name for screen readers. Default \"Pages\". */\n 'aria-label'?: string;\n /** Extra class names. */\n className?: string;\n}\n\n/** Shows where you are in a set of pages: onboarding screens, a carousel, a gallery. Each dot is a button when onChange is set. */\nexport function PageIndicator({ count, current, onChange, variant = 'dots', className, 'aria-label': label }: PageIndicatorProps) {\n const t = useStrings();\n if (variant === 'numbers') return <span className={cx('alea-page-indicator', className)} data-variant=\"numbers\" role=\"status\">{t.nOfTotal(current + 1, count)}</span>;\n return (\n <div className={cx('alea-page-indicator', className)} data-variant={variant} role=\"group\" aria-label={label ?? t.pages}>\n {Array.from({ length: count }, (_, i) => onChange\n ? <button key={i} type=\"button\" className=\"alea-page-dot alea-focus-ring\" aria-label={t.slideN(i + 1)} aria-current={i === current ? 'step' : undefined} data-current={i === current || undefined} onClick={() => onChange(i)} />\n : <span key={i} className=\"alea-page-dot\" aria-hidden=\"true\" data-current={i === current || undefined} />)}\n {!onChange && <span className=\"alea-visually-hidden\">{t.nOfTotal(current + 1, count)}</span>}\n </div>\n );\n}\n\n"},{"path":"components/list/list.css","content":".alea-list { display: flex; flex-direction: column; outline: none; }\n.alea-list[data-variant='joined'] { border-radius: var(--alea-radius-md); background: var(--alea-surface); box-shadow: inset 0 0 0 1px var(--alea-border); overflow: hidden; }\n.alea-list[data-variant='separated'] { gap: var(--alea-space-2); }\n.alea-list[data-focus-visible] { outline: 2px solid var(--alea-focus); outline-offset: var(--alea-space-0-5); border-radius: var(--alea-radius-md); }\n.alea-list-item {\n display: flex; align-items: center; gap: var(--alea-space-3);\n min-height: 56px; padding: var(--alea-space-3) var(--alea-space-4);\n outline: none; cursor: default;\n transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard);\n}\n.alea-list[data-variant='joined'] .alea-list-item + .alea-list-item { border-top: 1px solid var(--alea-border); }\n.alea-list[data-variant='separated'] .alea-list-item { border-radius: var(--alea-radius-md); background: var(--alea-surface); box-shadow: var(--alea-shadow-card); }\n.alea-list[data-variant='separated'] .alea-list-item[data-focus-visible] { box-shadow: var(--alea-shadow-card), 0 0 0 2px var(--alea-focus); }\n.alea-list-item[data-href], .alea-list-item[data-action] { cursor: pointer; }\n.alea-list-item[data-hovered] { background: var(--alea-surface-hover); }\n.alea-list-item[data-selected] { background: var(--alea-accent-subtle); }\n.alea-list-item[data-focus-visible] { box-shadow: inset 0 0 0 2px var(--alea-focus); }\n.alea-list-item[data-disabled] { opacity: 0.45; }\n.alea-list-start { display: inline-flex; flex: none; }\n.alea-list-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--alea-space-0-5); }\n.alea-list-title { font-weight: var(--alea-font-weight-medium); font-size: var(--alea-font-size-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.alea-list-desc { font-size: var(--alea-font-size-xs); color: var(--alea-text-faint); }\n.alea-list-end { display: inline-flex; align-items: center; gap: var(--alea-space-2); flex: none; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n\n\n/* StructuredList */\n.alea-slist { display: flex; flex-direction: column; min-width: 0; }\n.alea-slist-row { display: grid; align-items: center; gap: var(--alea-space-4); min-height: 48px; padding: var(--alea-space-3) var(--alea-space-4); border-bottom: 1px solid var(--alea-border); }\n.alea-slist-head { min-height: 40px; color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); font-weight: var(--alea-font-weight-semibold); letter-spacing: 0.04em; text-transform: uppercase; }\n.alea-slist-cell { min-width: 0; font-size: var(--alea-font-size-md); overflow-wrap: anywhere; }\n.alea-slist-cell[data-align='end'] { text-align: end; font-variant-numeric: tabular-nums; }\n.alea-slist-option { cursor: pointer; border-radius: var(--alea-radius-sm); transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-slist-option[data-hovered] { background: var(--alea-surface-hover); }\n.alea-slist-option[data-selected] { background: var(--alea-accent-subtle); }\n.alea-slist-option[data-focus-visible] { outline: 2px solid var(--alea-focus); outline-offset: calc(var(--alea-space-0-5) * -1); }\n.alea-slist-check { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--alea-border-control); color: var(--alea-accent-on); }\n.alea-slist-option[data-selected] .alea-slist-check { background: var(--alea-accent); box-shadow: none; }\n@media (max-width: 639px) {\n .alea-slist-head { display: none; }\n .alea-slist-row { grid-template-columns: 1fr !important; gap: var(--alea-space-1); }\n .alea-slist-cell[data-label]::before { content: attr(data-label) ': '; color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); }\n .alea-slist-option { grid-template-columns: 40px 1fr !important; }\n .alea-slist-option .alea-slist-check { grid-row: span 9; }\n}\n\n/* ContainedList */\n.alea-clist { --clist-row: 48px; display: flex; flex-direction: column; min-width: 0; }\n.alea-clist[data-size='sm'] { --clist-row: 40px; } .alea-clist[data-size='lg'] { --clist-row: 64px; }\n.alea-clist[data-kind='on-page'] { border-radius: var(--alea-radius-lg); background: var(--alea-surface); box-shadow: var(--alea-shadow-card); overflow: hidden; }\n.alea-clist-head { display: flex; align-items: center; justify-content: space-between; gap: var(--alea-space-2); min-height: 48px; padding: var(--alea-space-2) var(--alea-space-2) var(--alea-space-2) var(--alea-space-4); border-bottom: 1px solid var(--alea-border); }\n.alea-clist-title { margin: 0; font: var(--alea-font-weight-semibold) var(--alea-font-size-md) / 1.3 var(--alea-font-family-body); }\n.alea-clist-items { margin: 0; padding: 0; list-style: none; }\n.alea-clist-item { display: flex; align-items: center; gap: var(--alea-space-2); min-height: var(--clist-row); padding-right: var(--alea-space-2); }\n.alea-clist-item + .alea-clist-item { border-top: 1px solid var(--alea-border); }\n.alea-clist-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--alea-space-3); align-self: stretch; padding: var(--alea-space-2) var(--alea-space-4); color: inherit; text-decoration: none; }\na.alea-clist-link:hover { background: var(--alea-surface-hover); }\n.alea-clist-start { display: inline-flex; flex: none; color: var(--alea-text-muted); }\n.alea-clist-start svg { width: 20px; height: 20px; }\n.alea-clist-text { display: flex; flex-direction: column; gap: var(--alea-space-0-5); min-width: 0; }\n.alea-clist-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--alea-font-size-md); }\n.alea-clist-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n.alea-clist-end { flex: none; display: flex; align-items: center; gap: var(--alea-space-1); color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n\n/* PageIndicator */\n.alea-page-indicator { display: inline-flex; align-items: center; gap: var(--alea-space-2); }\n.alea-page-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: var(--alea-radius-xs); background: var(--alea-border-strong); transition: width var(--alea-motion-duration-base) var(--alea-motion-ease-spring, var(--alea-motion-ease-out)), background-color var(--alea-motion-duration-base) var(--alea-motion-ease-standard); }\n/* as buttons, each dot is a 24 px target that draws the dot inside it */\nbutton.alea-page-dot { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: var(--alea-radius-lg); background: none; cursor: pointer; }\nbutton.alea-page-dot::before { content: ''; width: 8px; height: 8px; border-radius: var(--alea-radius-xs); background: var(--alea-border-strong); transition: width var(--alea-motion-duration-base) var(--alea-motion-ease-spring, var(--alea-motion-ease-out)), background-color var(--alea-motion-duration-base) var(--alea-motion-ease-standard); }\nbutton.alea-page-dot[data-current] { width: 36px; background: none; }\nbutton.alea-page-dot[data-current]::before { width: 20px; background: var(--alea-text); }\n.alea-page-indicator[data-variant='bars'] button.alea-page-dot { width: 24px; height: 24px; background: none; }\n.alea-page-indicator[data-variant='bars'] button.alea-page-dot[data-current] { width: 36px; }\n.alea-page-indicator[data-variant='bars'] button.alea-page-dot::before { width: 16px; height: 4px; border-radius: var(--alea-radius-2xs); }\n.alea-page-indicator[data-variant='bars'] button.alea-page-dot[data-current]::before { width: 28px; }\n.alea-page-dot[data-current] { background: var(--alea-text); }\n.alea-page-indicator[data-variant='bars'] span.alea-page-dot { width: 16px; height: 4px; border-radius: var(--alea-radius-2xs); }\n.alea-page-indicator[data-variant='bars'] span.alea-page-dot[data-current] { width: 32px; background: var(--alea-accent); }\n.alea-page-indicator[data-variant='bars'] button.alea-page-dot[data-current]::before { background: var(--alea-accent); }\n.alea-page-indicator[data-variant='dots'] span.alea-page-dot[data-current] { width: 20px; }\n.alea-page-indicator button.alea-page-dot[data-current] { width: 36px; }\n.alea-page-indicator[data-variant='numbers'] { padding: var(--alea-space-1) var(--alea-space-3); border-radius: var(--alea-radius-full); background: var(--alea-surface-raised); font-size: var(--alea-font-size-xs); font-variant-numeric: tabular-nums; color: var(--alea-text-muted); }\n\n/* drag and drop: handles, drop lines, dragging rows, a grid of cards */\n.alea-drag-handle { display: grid; place-items: center; flex: none; width: 24px; height: 32px; margin-left: calc(var(--alea-space-2) * -1); padding: 0; border: 0; border-radius: var(--alea-radius-sm); background: none; color: var(--alea-text-faint); cursor: grab; }\n.alea-drag-handle[data-hovered] { color: var(--alea-text); background: var(--alea-surface-hover); }\n.alea-list-item[data-dragging], .alea-table [data-dragging] { opacity: 0.45; }\n.alea-drop-indicator { outline: none; }\n.alea-drop-indicator[data-drop-target] { height: 2px; margin: calc(var(--alea-space-0-25) * -1) var(--alea-space-2); border-radius: var(--alea-radius-2xs); background: var(--alea-accent); box-shadow: 0 0 0 2px color-mix(in oklab, var(--alea-accent) 25%, transparent); }\n.alea-list[data-drop-target] { box-shadow: inset 0 0 0 2px var(--alea-accent); background: var(--alea-accent-subtle); }\n.alea-list-item[data-drop-target] { background: var(--alea-accent-subtle); box-shadow: inset 0 0 0 2px var(--alea-accent); }\n.alea-list[data-variant='plain'] { gap: var(--alea-space-0-5); }\n.alea-list[data-variant='plain'] .alea-list-item { border-radius: var(--alea-radius-sm); }\n.alea-list[data-layout='grid'] { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--alea-list-min, 200px), 1fr)); gap: var(--alea-space-3); background: none; box-shadow: none; overflow: visible; }\n.alea-list[data-layout='grid'] .alea-list-item { flex-direction: column; align-items: flex-start; border-radius: var(--alea-radius-md); background: var(--alea-surface); box-shadow: var(--alea-shadow-card); }\n.alea-list[data-layout='grid'] .alea-list-item[data-focus-visible] { box-shadow: var(--alea-shadow-card), 0 0 0 2px var(--alea-focus); }\n.alea-list[data-layout='grid'] .alea-list-item + .alea-list-item { border-top: 0; }\n.alea-list[data-layout='grid'] .alea-drop-indicator[data-drop-target] { width: 2px; height: auto; margin: var(--alea-space-2) calc(var(--alea-space-2) * -1); }\n.alea-list:empty, .alea-list[data-empty] { min-height: 64px; }\n\n/* button dots are 24 px targets touching each other, so the gap moves inside them */\n.alea-page-indicator:has(> button.alea-page-dot) { gap: 0; }\n"}],"deps":[],"npm":["react-aria-components","lucide-react"],"exports":["reorderItems","ListView","DropIndicator","DragHandle","ListItem","StructuredList","ContainedList","ContainedListItem","PageIndicator"],"descriptions":{"reorderItems":"Moves keys of a list before, after (or into) a target: the new array after a drag.","ListView":"A list of rich items people can select, open or act on, with keyboard navigation. Rows can be dragged to reorder, or between lists; cards can sit in a grid.","DropIndicator":"The line that shows where a dragged row will land. Use it in renderDropIndicator of your own drag and drop.","DragHandle":"The handle that starts a drag with the keyboard (Enter) or a screen reader. Put it in rows of a draggable list or table.","ListItem":"One item of a ListView.","StructuredList":"Rows of facts in columns, lighter than a table: plan comparisons, settings summaries. With selectionMode=\"single\", each row is a choice. On phones each row stacks its cells.","ContainedList":"A titled list in its own container, with an action: recent files, members, integrations. Rows hold text, an icon or avatar at the start, and actions at the end.","ContainedListItem":"One row of a ContainedList.","PageIndicator":"Shows where you are in a set of pages: onboarding screens, a carousel, a gallery. Each dot is a button when onChange is set."}},"media":{"files":[{"path":"components/media/Media.tsx","content":"import { useCallback, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type ReactNode } from 'react';\nimport qrcode from 'qrcode-generator';\nimport { ChevronLeft, ChevronRight, Pause, Play, ZoomIn, ZoomOut, X, ImageOff } from 'lucide-react';\nimport { cx } from '../../utils/cx';\nimport { IconButton, Button } from '../button/Button';\nimport { DialogModal, Dialog } from '../overlay/Overlay';\nimport { useStrings } from '../../i18n/strings';\nimport { DotField } from '../../utils/DotField';\n\n// ---------------------------------------------------------------- Timeline\nexport interface TimelineItem {\n id: string;\n title: ReactNode;\n /** When: shown above the title (a <time> when you pass dateTime). */\n time?: ReactNode;\n dateTime?: string;\n description?: ReactNode;\n tone?: 'neutral' | 'accent' | 'success' | 'warning' | 'danger';\n /** A custom dot (an icon). */\n dot?: ReactNode;\n /** Marks the item happening now: its dot pulses. */\n isActive?: boolean;\n}\n\nexport interface TimelineProps {\n /** The entries: id, title, optional time, dateTime, description, tone, icon. */\n items: TimelineItem[];\n /** Newest first or oldest first is up to you; this only marks the last item as pending. */\n pending?: ReactNode;\n /** start (content on the right of the line, default), alternate (sides take turns, times on the other side from 640 px) or end. */\n mode?: 'start' | 'alternate' | 'end';\n /** Shows the items in reverse order. */\n reverse?: boolean;\n /** sm (tighter, for side panels) or md (default). */\n size?: 'sm' | 'md';\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** Events in order: a changelog, an order's progress, an activity feed. Content on one side, the other, or alternating; reversed; two sizes. */\nexport function Timeline({ items, pending, mode = 'start', reverse, size, className }: TimelineProps) {\n const list = reverse ? [...items].reverse() : items;\n return (\n <ol className={cx('alea-timeline', className)} data-mode={mode !== 'start' ? mode : undefined} data-size={size}>\n {list.map(it => (\n <li key={it.id} className=\"alea-tl-item\" data-tone={it.tone || 'neutral'} data-active={it.isActive || undefined}>\n <span className=\"alea-tl-dot\" aria-hidden=\"true\">{it.dot}</span>\n <div className=\"alea-tl-body\">\n {it.time && (it.dateTime ? <time className=\"alea-tl-time\" dateTime={it.dateTime}>{it.time}</time> : <span className=\"alea-tl-time\">{it.time}</span>)}\n <p className=\"alea-tl-title\">{it.title}</p>\n {it.description && <div className=\"alea-tl-desc\">{it.description}</div>}\n </div>\n </li>\n ))}\n {pending && <li className=\"alea-tl-item\" data-pending><span className=\"alea-tl-dot\" aria-hidden=\"true\" /><div className=\"alea-tl-body\"><p className=\"alea-tl-title alea-tl-pending\">{pending}</p></div></li>}\n </ol>\n );\n}\n\n// ---------------------------------------------------------------- Carousel\nexport interface CarouselProps {\n /** The slides. */\n children: ReactNode[];\n /** Name of the carousel for screen readers. */\n 'aria-label': string;\n /** Moves on by itself every n ms (pauses on hover, focus and with reduced motion; has a pause button). */\n autoplay?: number;\n /** Slides visible at once. Default 1. */\n perView?: number;\n /** Show the dots. Default true. */\n showDots?: boolean;\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** Slides you swipe or step through, with dots and an optional autoplay that people can pause (WAI-ARIA carousel pattern). */\nexport function Carousel({ children, 'aria-label': label, autoplay, perView = 1, showDots = true, className }: CarouselProps) {\n const t = useStrings();\n const track = useRef<HTMLDivElement>(null);\n const [index, setIndex] = useState(0);\n const [playing, setPlaying] = useState(!!autoplay);\n const [hover, setHover] = useState(false);\n const count = children.length, pages = Math.max(1, Math.ceil(count - perView + 1));\n const id = useId();\n const go = useCallback((i: number) => {\n const el = track.current; if (!el) return;\n const n = (i + pages) % pages;\n const slide = el.children[n] as HTMLElement | undefined;\n const left = slide ? slide.offsetLeft - el.offsetLeft : 0;\n const calm = window.matchMedia?.('(prefers-reduced-motion: reduce)').matches && document.documentElement.getAttribute('data-alea-reduced') !== 'never' || ['off', 'reduced'].includes(document.documentElement.getAttribute('data-alea-motion') || '');\n if (typeof el.scrollTo === 'function') el.scrollTo({ left, behavior: calm ? 'auto' : 'smooth' }); else el.scrollLeft = left;\n setIndex(n);\n }, [pages]);\n useEffect(() => {\n const el = track.current; if (!el) return;\n const on = () => { const w = el.clientWidth / perView; setIndex(Math.min(pages - 1, Math.round(el.scrollLeft / Math.max(1, w)))); };\n el.addEventListener('scroll', on, { passive: true });\n return () => el.removeEventListener('scroll', on);\n }, [perView, pages]);\n useEffect(() => {\n if (!autoplay || !playing || hover) return;\n if (typeof window !== 'undefined' && window.matchMedia?.('(prefers-reduced-motion: reduce)').matches) return;\n const t = setInterval(() => go(index + 1), autoplay);\n return () => clearInterval(t);\n }, [autoplay, playing, hover, index, go]);\n return (\n <section className={cx('alea-carousel', className)} aria-roledescription=\"carousel\" aria-label={label}\n onMouseEnter={() => setHover(true)} onMouseLeave={() => setHover(false)} onFocusCapture={() => setHover(true)} onBlurCapture={() => setHover(false)}>\n <div className=\"alea-carousel-controls\">\n {autoplay && <IconButton size=\"sm\" aria-label={playing ? t.stopSlides : t.playSlides} onPress={() => setPlaying(p => !p)}>{playing ? <Pause /> : <Play />}</IconButton>}\n <IconButton size=\"sm\" aria-label={t.previousSlide} aria-controls={`${id}-track`} onPress={() => go(index - 1)}><ChevronLeft /></IconButton>\n <IconButton size=\"sm\" aria-label={t.nextSlide} aria-controls={`${id}-track`} onPress={() => go(index + 1)}><ChevronRight /></IconButton>\n </div>\n <div ref={track} id={`${id}-track`} className=\"alea-carousel-track alea-focus-ring\" tabIndex={0} aria-label={t.slides} aria-live={playing && !hover ? 'off' : 'polite'} style={{ ['--alea-per-view' as any]: perView }}>\n {children.map((c, i) => (\n <div key={i} className=\"alea-carousel-slide\" role=\"group\" aria-roledescription=\"slide\" aria-label={t.nOfTotal(i + 1, count)} aria-hidden={i < index || i >= index + perView ? true : undefined} inert={i < index || i >= index + perView ? true : undefined}>{c}</div>\n ))}\n </div>\n {showDots && pages > 1 && (\n <div className=\"alea-carousel-dots\" role=\"group\" aria-label={t.chooseSlide}>\n {Array.from({ length: pages }, (_, i) => <button key={i} type=\"button\" className=\"alea-carousel-dot alea-focus-ring\" aria-label={t.slideN(i + 1)} aria-current={i === index ? 'true' : undefined} onClick={() => go(i)} />)}\n </div>\n )}\n </section>\n );\n}\n\n// ---------------------------------------------------------------- Image\nexport interface ImageProps {\n /** The image URL. */\n src: string;\n /** Describe the image; empty string only when it is decorative. */\n alt: string;\n /** Width in px. */\n width?: number | string;\n /** Height in px. */\n height?: number | string;\n /** Opens a larger view with zoom on press. Default true. */\n preview?: boolean;\n /** Shown while loading and if it fails. */\n fallback?: ReactNode;\n /** CSS object-fit. Default cover. */\n fit?: CSSProperties['objectFit'];\n /** Corner radius token: sm, md (default), lg or none. */\n radius?: 'none' | 'sm' | 'md' | 'lg';\n /** Responsive sources: \"hero-640.jpg 640w, hero-1280.jpg 1280w\". */\n srcSet?: string;\n /** How wide it shows, for srcSet: \"(min-width: 768px) 50vw, 100vw\". */\n sizes?: string;\n /** Width / height, e.g. 16 / 9: reserves the space so nothing jumps while it loads. */\n ratio?: number;\n /** The main image of the page (LCP): loads right away with high priority instead of lazily. */\n priority?: boolean;\n /** A tiny blurred version (data URL or color) shown until it loads; then the image fades in. Default the shimmer. */\n placeholder?: string;\n /** What shows while it loads: shimmer (a light sweep, default) or matrix (a field of dots that twinkle, then dissolves into the picture). */\n loadingEffect?: 'shimmer' | 'matrix';\n /** The picture is still being made (an AI image): keeps the loading effect, with or without a src, until you set it to false. */\n isLoading?: boolean;\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** An image that loads lazily, shows a shimmer while loading and a fallback on error, and opens a zoomable preview. */\nexport function Image({ src, alt, width, height, preview = true, fallback, fit = 'cover', radius = 'md', srcSet, sizes, ratio, priority, placeholder, loadingEffect = 'shimmer', isLoading, className }: ImageProps) {\n const t = useStrings();\n const [state, setState] = useState<'loading' | 'ok' | 'error'>('loading');\n const [open, setOpen] = useState(false);\n const [zoom, setZoom] = useState(1);\n const matrix = loadingEffect === 'matrix';\n const busy = !!isLoading || state === 'loading';\n const shown = isLoading ? 'loading' : state;\n const img = !src ? null : <img src={src} srcSet={srcSet} sizes={sizes} alt={alt} loading={priority ? 'eager' : 'lazy'} decoding={priority ? 'sync' : 'async'} fetchPriority={priority ? 'high' : undefined} onLoad={() => setState('ok')} onError={() => setState('error')} style={{ objectFit: fit }} />;\n const ph = placeholder ? (/^(data:|https?:|\\/)/.test(placeholder) ? { backgroundImage: `url(${placeholder})`, backgroundSize: 'cover' } : { background: placeholder }) : null;\n const box = (\n <span className={cx('alea-image', className)} data-state={shown} data-effect={matrix ? 'matrix' : undefined} aria-busy={busy || undefined} data-radius={radius} data-placeholder={ph ? true : undefined} style={{ width, height, aspectRatio: ratio ? String(ratio) : undefined, ...(state === 'loading' && ph ? ph : {}) }}>\n {matrix && state !== 'error' && <DotField />}\n {matrix && <span role=\"status\" className=\"alea-visually-hidden\">{busy ? t.loading : ''}</span>}\n {state === 'error' ? (fallback ?? <span className=\"alea-image-fallback\"><ImageOff size={22} aria-hidden=\"true\" /><span>{t.imageFailed(alt || '')}</span></span>) : img}\n </span>\n );\n if (!preview || state === 'error' || isLoading || !src) return box;\n return (\n <>\n <button type=\"button\" className=\"alea-image-button alea-focus-ring\" onClick={() => { setZoom(1); setOpen(true); }} aria-label={t.viewLarger(alt || t.image.toLowerCase())} style={{ width, height }}>{box}</button>\n <DialogModal isOpen={open} onOpenChange={setOpen} size=\"full\" className=\"alea-image-overlay\">\n <Dialog aria-label={alt || t.imagePreview} hideClose className=\"alea-image-dialog\">\n {({ close }) => (\n <>\n <div className=\"alea-image-tools\">\n <IconButton aria-label={t.zoomOut} variant=\"secondary\" isDisabled={zoom <= 0.5} onPress={() => setZoom(z => Math.max(0.5, z - 0.25))}><ZoomOut /></IconButton>\n <span className=\"alea-image-zoom\" aria-live=\"polite\">{Math.round(zoom * 100)}%</span>\n <IconButton aria-label={t.zoomIn} variant=\"secondary\" isDisabled={zoom >= 3} onPress={() => setZoom(z => Math.min(3, z + 0.25))}><ZoomIn /></IconButton>\n <IconButton aria-label={t.close} variant=\"secondary\" onPress={close}><X /></IconButton>\n </div>\n <div className=\"alea-image-stage\"><img src={src} alt={alt} style={{ transform: `scale(${zoom})` }} /></div>\n </>\n )}\n </Dialog>\n </DialogModal>\n </>\n );\n}\n\n// ---------------------------------------------------------------- QRCode\nexport interface QRCodeProps {\n /** What the code holds: a URL, text, a Wi-Fi string. */\n value: string;\n /** Size in px. Default 160. */\n size?: number;\n /** Error correction: L, M (default), Q, H. Use H when you put a logo in the middle. */\n level?: 'L' | 'M' | 'Q' | 'H';\n /** A logo or icon in the middle (use level H). */\n logo?: ReactNode;\n /** Describe what it opens, for screen readers. Default \"QR code: \" + value. */\n label?: string;\n /** Colors; dark on light reads best. */\n color?: string;\n /** Background color. Default white. */\n background?: string;\n}\n\nqrcode.stringToBytes = qrcode.stringToBytesFuncs['UTF-8'];\n\n/** A QR code drawn as SVG, crisp at any size. */\nexport function QRCode({ value, size = 160, level = 'M', logo, label, color = '#111011', background = '#ffffff' }: QRCodeProps) {\n const t = useStrings();\n const path = useMemo(() => {\n const qr = qrcode(0, level); qr.addData(value); qr.make();\n const n = qr.getModuleCount();\n let d = '';\n for (let r = 0; r < n; r++) for (let c = 0; c < n; c++) if (qr.isDark(r, c)) d += `M${c + 4} ${r + 4}h1v1h-1z`;\n return { d, n: n + 8 };\n }, [value, level]);\n return (\n <span className=\"alea-qr\" style={{ width: size, height: size }} role=\"img\" aria-label={label ?? t.qrCode(value)}>\n <svg viewBox={`0 0 ${path.n} ${path.n}`} width={size} height={size} shapeRendering=\"crispEdges\" aria-hidden=\"true\">\n <rect width={path.n} height={path.n} fill={background} rx={path.n * 0.06} />\n <path d={path.d} fill={color} />\n </svg>\n {logo && <span className=\"alea-qr-logo\" aria-hidden=\"true\" style={{ background }}>{logo}</span>}\n </span>\n );\n}\n\n// ---------------------------------------------------------------- Watermark\nexport interface WatermarkProps {\n children: ReactNode;\n /** The text repeated across the area. */\n text: string;\n /** Angle in degrees. Default -22. */\n rotate?: number;\n /** Gap between marks in px. Default 120. */\n gap?: number;\n /** 0 to 1. Default 0.08. */\n opacity?: number;\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** Repeats a faint text over content: drafts, confidential previews. Decorative: hidden from screen readers, not a security measure. */\nexport function Watermark({ children, text, rotate = -22, gap = 120, opacity = 0.08, className }: WatermarkProps) {\n const svg = useMemo(() => {\n const w = gap + text.length * 7.5, h = gap;\n const s = `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"${w}\" height=\"${h}\"><text x=\"50%\" y=\"50%\" fill=\"currentColor\" font-family=\"Inter, sans-serif\" font-size=\"14\" font-weight=\"600\" text-anchor=\"middle\" dominant-baseline=\"middle\" transform=\"rotate(${rotate} ${w / 2} ${h / 2})\">${text.replace(/[<&>\"]/g, c => ({ '<': '&lt;', '&': '&amp;', '>': '&gt;', '\"': '&quot;' }[c]!))}</text></svg>`;\n return `url(\"data:image/svg+xml,${encodeURIComponent(s)}\")`;\n }, [text, rotate, gap]);\n return (\n <div className={cx('alea-watermark', className)}>\n {children}\n <span className=\"alea-watermark-layer\" aria-hidden=\"true\" style={{ WebkitMaskImage: svg, maskImage: svg, opacity }} />\n </div>\n );\n}\n\n// ---------------------------------------------------------------- Tour\nexport interface TourStep {\n /** CSS selector or element to point at. Leave out for a centered step. */\n target?: string | HTMLElement | null;\n title: ReactNode;\n content?: ReactNode;\n}\n\nexport interface TourProps {\n /** The steps: target (a CSS selector), title and content. */\n steps: TourStep[];\n /** Whether the tour runs (controlled). */\n isOpen: boolean;\n /** Called when it starts or ends. */\n onOpenChange: (open: boolean) => void;\n /** Called when the last step is done. */\n onFinish?: () => void;\n}\n\n/** A guided walk through a screen: each step spotlights an element and explains it. Escape skips; focus stays in the step. */\nexport function Tour({ steps, isOpen, onOpenChange, onFinish }: TourProps) {\n const t = useStrings();\n const [at, setAt] = useState(0);\n const [rect, setRect] = useState<DOMRect | null>(null);\n const step = steps[at];\n useEffect(() => { if (isOpen) setAt(0); }, [isOpen]);\n useLayoutEffect(() => {\n if (!isOpen || !step) return;\n const el = typeof step.target === 'string' ? document.querySelector(step.target) as HTMLElement | null : step.target || null;\n if (!el) { setRect(null); return; }\n el.scrollIntoView({ block: 'center', behavior: 'smooth' });\n const measure = () => setRect(el.getBoundingClientRect());\n measure();\n const t = setTimeout(measure, 350);\n window.addEventListener('resize', measure); window.addEventListener('scroll', measure, true);\n return () => { clearTimeout(t); window.removeEventListener('resize', measure); window.removeEventListener('scroll', measure, true); };\n }, [isOpen, at, step]);\n if (!step) return null;\n const pad = 8;\n const pos: CSSProperties = rect\n ? { top: Math.min(window.innerHeight - 220, rect.bottom + pad + 12), left: Math.max(16, Math.min(window.innerWidth - 336, rect.left)) }\n : { top: '50%', left: '50%', transform: 'translate(-50%, -50%)' };\n return (\n <DialogModal isOpen={isOpen} onOpenChange={onOpenChange} isDismissable={false} className=\"alea-tour-overlay\">\n <Dialog aria-label={typeof step.title === 'string' ? step.title : t.stepN(at + 1)} hideClose className=\"alea-tour\">\n {({ close }) => (\n <>\n {rect && <span className=\"alea-tour-spot\" aria-hidden=\"true\" style={{ top: rect.top - pad, left: rect.left - pad, width: rect.width + pad * 2, height: rect.height + pad * 2 }} />}\n <div className=\"alea-tour-card\" style={pos}>\n <p className=\"alea-tour-count\">{t.stepNOfTotal(at + 1, steps.length)}</p>\n <h2 className=\"alea-tour-title\">{step.title}</h2>\n {step.content && <div className=\"alea-tour-text\">{step.content}</div>}\n <div className=\"alea-tour-actions\">\n <Button size=\"sm\" variant=\"ghost\" onPress={close}>{t.skip}</Button>\n <span className=\"alea-tour-spacer\" />\n {at > 0 && <Button size=\"sm\" variant=\"ghost\" onPress={() => setAt(a => a - 1)}>{t.back}</Button>}\n <Button size=\"sm\" autoFocus onPress={() => { if (at < steps.length - 1) setAt(a => a + 1); else { onFinish?.(); close(); } }}>{at < steps.length - 1 ? t.next : t.done}</Button>\n </div>\n </div>\n </>\n )}\n </Dialog>\n </DialogModal>\n );\n}\n"},{"path":"components/media/media.css","content":".alea-timeline { margin: 0; padding: 0; list-style: none; }\n.alea-tl-item { position: relative; display: flex; gap: var(--alea-space-4); padding-bottom: var(--alea-space-6); --tone: var(--alea-border-control); }\n.alea-tl-item[data-tone='accent'] { --tone: var(--alea-accent); }\n.alea-tl-item[data-tone='success'] { --tone: var(--alea-status-success); }\n.alea-tl-item[data-tone='warning'] { --tone: var(--alea-status-warning); }\n.alea-tl-item[data-tone='danger'] { --tone: var(--alea-status-danger); }\n.alea-tl-item:not(:last-child)::before { content: ''; position: absolute; left: var(--alea-space-2); top: var(--alea-space-6); bottom: var(--alea-space-0-5); width: 2px; border-radius: var(--alea-radius-3xs); background: var(--alea-border-strong); }\n.alea-tl-dot { position: relative; flex: none; display: grid; place-items: center; width: 16px; height: 16px; margin-top: var(--alea-space-1); border-radius: 50%; background: var(--alea-bg); box-shadow: inset 0 0 0 3px var(--tone); color: var(--tone); }\n.alea-tl-dot:not(:empty) { box-shadow: none; width: 24px; height: 24px; margin: calc(var(--alea-space-0-25) * -1) calc(var(--alea-space-1) * -1) 0; }\n.alea-tl-dot svg { width: 20px; height: 20px; }\n.alea-tl-item[data-pending] .alea-tl-dot { box-shadow: inset 0 0 0 2px var(--alea-border-control); border: 0; animation: alea-pulse 2s var(--alea-motion-ease-in-out) infinite; }\n.alea-tl-body { display: flex; flex-direction: column; gap: var(--alea-space-0-5); min-width: 0; }\n.alea-tl-time { font-size: var(--alea-font-size-xs); color: var(--alea-text-faint); font-variant-numeric: tabular-nums; }\n.alea-tl-title { margin: 0; font: var(--alea-font-weight-semibold) var(--alea-font-size-md) / 1.4 var(--alea-font-family-body); }\n.alea-tl-pending { color: var(--alea-text-muted); font-weight: var(--alea-font-weight-regular); }\n.alea-tl-desc { color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); line-height: 1.5; }\n\n.alea-carousel { position: relative; display: flex; flex-direction: column; gap: var(--alea-space-3); }\n.alea-carousel-controls { display: flex; justify-content: flex-end; gap: var(--alea-space-2); }\n.alea-carousel-track { position: relative; display: flex; gap: var(--alea-space-3); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--alea-radius-lg); overscroll-behavior-x: contain; }\n.alea-carousel-track::-webkit-scrollbar { display: none; }\n.alea-carousel-slide { flex: 0 0 calc((100% - (var(--alea-per-view, 1) - 1) * var(--alea-space-3)) / var(--alea-per-view, 1)); scroll-snap-align: start; min-width: 0; }\n.alea-carousel-dots { display: flex; justify-content: center; gap: 0; }\n.alea-carousel-dot { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 var(--alea-space-0-5); border: 0; border-radius: var(--alea-radius-full); background: none; cursor: pointer; }\n.alea-carousel-dot::before { content: ''; width: 8px; height: 8px; border-radius: var(--alea-radius-full); background: var(--alea-border-control); transition: width var(--alea-motion-duration-base) var(--alea-motion-ease-spring), background-color var(--alea-motion-duration-base) var(--alea-motion-ease-standard); }\n.alea-carousel-dot:hover::before { background: var(--alea-text-muted); }\n.alea-carousel-dot[aria-current]::before { width: 24px; background: var(--alea-gradient-accent-linear); }\n\n.alea-image-button { display: inline-block; padding: 0; border: 0; background: none; border-radius: var(--alea-radius-md); cursor: zoom-in; }\n.alea-image { position: relative; display: block; overflow: hidden; background: var(--alea-surface-raised); }\n.alea-image[data-radius='sm'] { border-radius: var(--alea-radius-sm); }\n.alea-image[data-radius='md'] { border-radius: var(--alea-radius-md); }\n.alea-image[data-radius='lg'] { border-radius: var(--alea-radius-lg); }\n.alea-image img { display: block; width: 100%; height: 100%; transition: opacity var(--alea-motion-duration-slow) var(--alea-motion-ease-standard), transform var(--alea-motion-duration-slow) var(--alea-motion-ease-out); }\n.alea-image[data-state='loading'] { background: linear-gradient(90deg, var(--alea-surface-raised) 0%, var(--alea-surface-hover) 50%, var(--alea-surface-raised) 100%); background-size: 200% 100%; animation: alea-shimmer 1.6s var(--alea-motion-ease-in-out) infinite; }\n.alea-image[data-state='loading'] img { opacity: 0.01; }\n.alea-image[data-state='loading'][data-placeholder] { animation: none; filter: blur(0); }\n.alea-image[data-placeholder] img { transition: opacity var(--alea-motion-duration-slower) var(--alea-motion-ease-out), filter var(--alea-motion-duration-slower) var(--alea-motion-ease-out); }\n.alea-image[data-state='loading'][data-placeholder] img { filter: blur(12px); }\n.alea-image-button:hover .alea-image img { transform: scale(calc(1 + (1 - var(--alea-motion-scale-press)) * 0.75)); }\n.alea-image-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--alea-space-2); width: 100%; height: 100%; min-height: 120px; padding: var(--alea-space-3); color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); text-align: center; }\n.alea-image-overlay .alea-modal { background: transparent; box-shadow: none; }\n.alea-image-dialog { position: relative; height: 100%; padding: 0; }\n.alea-image-tools { position: absolute; top: var(--alea-space-3); right: var(--alea-space-3); z-index: 2; display: flex; align-items: center; gap: var(--alea-space-2); }\n.alea-image-zoom { min-width: 48px; text-align: center; font: var(--alea-font-weight-semibold) var(--alea-font-size-sm) / 1 var(--alea-font-family-body); color: var(--alea-on-media); font-variant-numeric: tabular-nums; }\n.alea-image-stage { position: relative; height: 100%; display: grid; place-items: center; overflow: auto; }\n.alea-image-stage img { max-width: 100%; max-height: 100%; border-radius: var(--alea-radius-md); transition: transform var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n\n.alea-qr { position: relative; display: inline-grid; place-items: center; flex: none; }\n.alea-qr svg { display: block; }\n.alea-qr-logo { position: absolute; display: grid; place-items: center; width: 24%; height: 24%; border-radius: 22%; padding: 3%; }\n.alea-qr-logo > * { width: 100%; height: 100%; }\n\n.alea-watermark { position: relative; isolation: isolate; }\n.alea-watermark-layer { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: var(--alea-text); -webkit-mask-repeat: repeat; mask-repeat: repeat; user-select: none; }\n\n.alea-tour-overlay { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; display: block; padding: 0; }\n.alea-tour-overlay .alea-modal { max-width: none; width: 100vw; height: 100dvh; max-height: none; background: transparent; box-shadow: none; border-radius: 0; overflow: visible; }\n.alea-tour { position: relative; width: 100%; height: 100%; padding: 0; }\n.alea-tour-spot { position: fixed; border-radius: var(--alea-radius-md); box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55), 0 0 0 2px var(--alea-accent); transition: top var(--alea-motion-duration-slow) var(--alea-motion-ease-out), left var(--alea-motion-duration-slow) var(--alea-motion-ease-out), width var(--alea-motion-duration-slow) var(--alea-motion-ease-out), height var(--alea-motion-duration-slow) var(--alea-motion-ease-out); pointer-events: none; }\n.alea-tour-card { position: fixed; width: min(320px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: var(--alea-space-2); padding: var(--alea-space-5); border-radius: var(--alea-radius-lg); background: var(--alea-surface); box-shadow: var(--alea-shadow-card), var(--alea-shadow-pop); animation: alea-m-pop-in var(--alea-motion-duration-base) var(--alea-motion-ease-out); transition: top var(--alea-motion-duration-slow) var(--alea-motion-ease-out), left var(--alea-motion-duration-slow) var(--alea-motion-ease-out); }\n.alea-tour-count { margin: 0; font: var(--alea-font-weight-semibold) var(--alea-font-size-2xs) / 1.2 var(--alea-font-family-body); letter-spacing: var(--alea-font-tracking-eyebrow); text-transform: uppercase; color: var(--alea-accent-strong); }\n.alea-tour-title { margin: 0; font: var(--alea-font-weight-light) var(--alea-font-size-2xl) / 1.15 var(--alea-font-family-display); }\n.alea-tour-text { color: var(--alea-text-muted); font-size: var(--alea-font-size-md); line-height: 1.5; }\n.alea-tour-actions { display: flex; align-items: center; gap: var(--alea-space-2); margin-top: var(--alea-space-3); }\n.alea-tour-spacer { flex: 1; }\n/* Timeline: alternate and end, sizes, the active item */\n.alea-timeline[data-size='sm'] .alea-tl-item { gap: var(--alea-space-3); padding-bottom: var(--alea-space-4); }\n.alea-timeline[data-size='sm'] .alea-tl-title { font-size: var(--alea-font-size-sm); }\n.alea-tl-item[data-active] .alea-tl-dot { box-shadow: inset 0 0 0 3px var(--tone), 0 0 0 4px color-mix(in oklab, var(--tone) 25%, transparent); animation: alea-tl-pulse 2s var(--alea-motion-ease-out) infinite; }\n@keyframes alea-tl-pulse { 50% { box-shadow: inset 0 0 0 3px var(--tone), 0 0 0 8px transparent; } }\n@media (prefers-reduced-motion: reduce) { .alea-tl-item[data-active] .alea-tl-dot { animation: none; } }\n.alea-timeline[data-mode='end'] .alea-tl-item { flex-direction: row-reverse; text-align: end; }\n.alea-timeline[data-mode='end'] .alea-tl-item:not(:last-child)::before { left: auto; right: var(--alea-space-2); }\n@media (min-width: 640px) {\n .alea-timeline[data-mode='alternate'] .alea-tl-item { display: grid; grid-template-columns: 1fr 16px 1fr; column-gap: var(--alea-space-4); }\n .alea-timeline[data-mode='alternate'] .alea-tl-item::before { left: calc(50% - var(--alea-space-0-25)) !important; }\n .alea-timeline[data-mode='alternate'] .alea-tl-dot { grid-column: 2; grid-row: 1; }\n .alea-timeline[data-mode='alternate'] .alea-tl-body { grid-column: 3; grid-row: 1; }\n .alea-timeline[data-mode='alternate'] .alea-tl-item:nth-child(even) .alea-tl-body { grid-column: 1; text-align: end; }\n}\n"}],"deps":["button","overlay"],"npm":["lucide-react","qrcode-generator"],"exports":["Timeline","Carousel","Image","QRCode","Watermark","Tour"],"descriptions":{"Timeline":"Events in order: a changelog, an order's progress, an activity feed. Content on one side, the other, or alternating; reversed; two sizes.","Carousel":"Slides you swipe or step through, with dots and an optional autoplay that people can pause (WAI-ARIA carousel pattern).","Image":"An image that loads lazily, shows a shimmer while loading and a fallback on error, and opens a zoomable preview.","QRCode":"A QR code drawn as SVG, crisp at any size.","Watermark":"Repeats a faint text over content: drafts, confidential previews. Decorative: hidden from screen readers, not a security measure.","Tour":"A guided walk through a screen: each step spotlights an element and explains it. Escape skips; focus stays in the step."}},"menu":{"files":[{"path":"components/menu/Menu.tsx","content":"import type { ReactNode } from 'react';\nimport {\n Menu as RACMenu, MenuItem as RACMenuItem, MenuTrigger as RACMenuTrigger, SubmenuTrigger as RACSubmenuTrigger, MenuSection as RACMenuSection, Header, Separator, Keyboard, Text,\n type MenuProps as RACMenuProps, type MenuItemProps as RACMenuItemProps, type MenuTriggerProps, type SubmenuTriggerProps,\n} from 'react-aria-components';\nimport type { MotionProp } from '@alea-design/motion';\nimport { Check, ChevronRight } from 'lucide-react';\nimport { withBase } from '../../utils/cx';\nimport { menuIcon } from '../icon/icon-contexts';\nimport { Popover, type PopoverProps } from '../overlay/Overlay';\nimport { Badge, type BadgeProps } from '../display/Display';\nimport { useAttrRef } from '../../utils/attr';\n\nexport interface MenuProps<T extends object> extends RACMenuProps<T> {\n /** sm (32 px items, for dense apps and context menus) or md (40 px, default). */\n size?: 'sm' | 'md';\n}\n\n/** A list of actions or choices. Arrow keys move, typing jumps, Enter picks. */\nexport function Menu<T extends object>({ className, size, ...props }: MenuProps<T>) {\n return <RACMenu {...props} data-size={size} className={withBase('alea-menu', className as any)} />;\n}\n\nexport interface MenuItemProps extends Omit<RACMenuItemProps, 'children'> {\n children: ReactNode;\n /** Icon before the label. */\n icon?: ReactNode;\n /** A second line under the label. */\n description?: ReactNode;\n /** A shortcut shown at the end, e.g. ⌘D. A list of keys, like ['⌘', '⇧', 'P'], shows each key as a keycap. Display only: wire the keys yourself. It is also set as aria-keyshortcuts. */\n shortcut?: string | string[];\n /** danger turns it red, for destructive actions. */\n tone?: 'default' | 'danger';\n /** Something at the end: a count, a status, an icon button. */\n end?: ReactNode;\n /** A small badge at the end, after end: a count, New, Beta. It is read with the item. */\n badge?: ReactNode;\n /** The tone of the badge: neutral (default), accent, success, warning, danger or info. */\n badgeTone?: BadgeProps['tone'];\n /** Shows a chevron at the end for an item that leads somewhere else (a dialog, a page). Items that open a submenu always show one. */\n chevron?: boolean;\n}\n\n// ⌘⇧P or ['⌘', '⇧', 'P'] to the aria-keyshortcuts syntax: Meta+Shift+P\nconst MODS: Record<string, string> = { '⌘': 'Meta', '⇧': 'Shift', '⌥': 'Alt', '⌃': 'Control' };\nconst keyList = (s: string | string[]) => {\n if (Array.isArray(s)) return s;\n if (s.includes('+')) return s.split('+');\n let i = 0; while (i < s.length && MODS[s[i]]) i++; // leading modifier symbols, then one key\n return [...s.slice(0, i), s.slice(i)].filter(Boolean);\n};\nconst ariaKeys = (s: string | string[]) => keyList(s).map(k => MODS[k] ?? k).join('+');\n\n/** One item: an action, a link (href), or a choice in a selectable menu. Slots at the end, in order: end, badge, shortcut and a chevron. */\nexport function MenuItem({ children, icon, description, shortcut, tone = 'default', end, badge, badgeTone, chevron, className, textValue, ...props }: MenuItemProps) {\n const own = useAttrRef<HTMLDivElement>('aria-keyshortcuts', shortcut ? ariaKeys(shortcut) : undefined);\n return (\n <RACMenuItem {...props} ref={own} textValue={textValue ?? (typeof children === 'string' ? children : undefined)} data-tone={tone} className={withBase('alea-option alea-menu-item', className as any)}>\n {({ isSelected, selectionMode, hasSubmenu }) => (\n <>\n {selectionMode !== 'none' && <Check size={16} className=\"alea-menu-check\" aria-hidden=\"true\" data-on={isSelected || undefined} />}\n {icon && <span className=\"alea-option-icon\" aria-hidden=\"true\" {...menuIcon(tone)}>{icon}</span>}\n <span className=\"alea-option-text\"><Text slot=\"label\">{children}</Text>{description && <Text slot=\"description\" className=\"alea-option-desc\">{description}</Text>}</span>\n {end && <span className=\"alea-menu-end\">{end}</span>}\n {badge != null && badge !== false && <Badge size=\"sm\" tone={badgeTone} className=\"alea-menu-badge\">{badge}</Badge>}\n {shortcut && <Keyboard className=\"alea-menu-shortcut\" data-keys={Array.isArray(shortcut) || undefined}>{Array.isArray(shortcut) ? shortcut.map((k, i) => <span key={i} className=\"alea-menu-key\">{k}</span>) : shortcut}</Keyboard>}\n {(hasSubmenu || chevron) && <ChevronRight size={16} aria-hidden=\"true\" className=\"alea-menu-chevron\" />}\n </>\n )}\n </RACMenuItem>\n );\n}\n\n/** A titled group of items. */\nexport interface MenuSectionProps {\n /** The group heading. */\n title?: ReactNode;\n /** The MenuItems. */\n children: ReactNode;\n}\n\n/** A group of menu items under a title. */\nexport function MenuSection({ title, children }: MenuSectionProps) {\n return <RACMenuSection className=\"alea-option-section\">{title && <Header className=\"alea-option-header\">{title}</Header>}{children}</RACMenuSection>;\n}\n\n/** A line between groups of items. */\nexport function MenuSeparator() {\n return <Separator className=\"alea-menu-separator\" />;\n}\n\nexport interface DropdownMenuProps<T extends object> extends Omit<MenuTriggerProps, 'children' | 'trigger'> {\n /** The button that opens it (usually a Button or IconButton). */\n trigger: ReactNode;\n children: RACMenuProps<T>['children'];\n /** Where it opens. Default bottom start. */\n placement?: PopoverProps['placement'];\n /** Menu props: onAction, selectionMode, selectedKeys, items, disabledKeys... */\n menuProps?: Omit<MenuProps<T>, 'children'>;\n /** Name of the menu; defaults to the trigger's name. */\n 'aria-label'?: string;\n /** How the popup enters and leaves: a preset (fade, scale, pop, slide-down, blur...), false for none, or options. */\n motion?: MotionProp;\n /** sm (32 px items) or md (40 px, default). */\n size?: 'sm' | 'md';\n /** Content above the items, not focusable: who is signed in, a plan. */\n header?: ReactNode;\n /** Content under the items, not focusable: a version, a hint. */\n footer?: ReactNode;\n /** Least width of the menu, any CSS length. Default 200 px. */\n minWidth?: string | number;\n /** Most height before it scrolls, in px. */\n maxHeight?: number;\n}\n\n/** A button that opens a menu: two sizes, a header and footer, a width and a height limit. */\nexport function DropdownMenu<T extends object>({ motion, trigger, children, placement = 'bottom start', menuProps, size, header, footer, minWidth, maxHeight, 'aria-label': label, ...props }: DropdownMenuProps<T>) {\n return (\n <RACMenuTrigger {...props}>\n {trigger}\n <Popover placement={placement} className=\"alea-popover alea-menu-popover\" motion={motion} maxHeight={maxHeight} style={minWidth !== undefined ? { minWidth } : undefined}>\n {header && <div className=\"alea-menu-header\">{header}</div>}\n <Menu aria-label={label} size={size} {...(menuProps as any)}>{children}</Menu>\n {footer && <div className=\"alea-menu-footer\">{footer}</div>}\n </Popover>\n </RACMenuTrigger>\n );\n}\n\nexport interface SubmenuProps extends Omit<SubmenuTriggerProps, 'children'> {\n /** The item that opens the submenu. */\n label: ReactNode;\n /** An icon before the item label. */\n icon?: ReactNode;\n /** A second line under the label. */\n description?: ReactNode;\n /** Something at the end of the item, before the chevron: a count, a status. */\n end?: ReactNode;\n /** A small badge at the end of the item, before the chevron. */\n badge?: ReactNode;\n /** The tone of the badge. */\n badgeTone?: MenuItemProps['badgeTone'];\n /** Not available: the item is dimmed and the submenu does not open. */\n isDisabled?: boolean;\n children: ReactNode;\n}\n\n/** An item that opens another menu (arrow right or hover). It takes the same slots as MenuItem. */\nexport function Submenu({ label, icon, description, end, badge, badgeTone, isDisabled, children, ...props }: SubmenuProps) {\n return (\n <RACSubmenuTrigger {...props}>\n <MenuItem icon={icon} description={description} end={end} badge={badge} badgeTone={badgeTone} isDisabled={isDisabled} textValue={typeof label === 'string' ? label : undefined}>{label}</MenuItem>\n <Popover className=\"alea-popover alea-menu-popover\" offset={-4}>\n <Menu>{children}</Menu>\n </Popover>\n </RACSubmenuTrigger>\n );\n}\n"},{"path":"components/menu/menu.css","content":".alea-menu { display: flex; flex-direction: column; gap: var(--alea-space-0-25); min-width: 200px; outline: none; max-height: inherit; overflow: auto; }\n.alea-menu-popover { min-width: 200px; }\n.alea-menu-item[data-tone='danger'] { color: var(--alea-status-danger); }\n.alea-menu-item[data-tone='danger'][data-focused] { background: var(--alea-status-danger-bg); }\n.alea-menu-item[data-open] { background: var(--alea-surface-hover); }\n.alea-menu-check { flex: none; color: var(--alea-accent-strong); opacity: 0; margin-right: calc(var(--alea-space-1) * -1); }\n.alea-menu-check[data-on] { opacity: 1; }\n.alea-menu-shortcut { margin-left: auto; padding-left: var(--alea-space-4); font: var(--alea-font-weight-medium) var(--alea-font-size-xs) / 1 var(--alea-font-family-body); color: var(--alea-text-faint); letter-spacing: 0.04em; }\n.alea-menu-chevron { margin-left: auto; color: var(--alea-icon-muted); }\n.alea-menu-separator { height: 1px; margin: var(--alea-space-1) var(--alea-space-2); background: var(--alea-border); border: 0; }\n/* sizes, end slot, header and footer */\n.alea-menu[data-size='sm'] .alea-option { min-height: 32px; padding: var(--alea-space-1) var(--alea-space-3); font-size: var(--alea-font-size-sm); gap: var(--alea-space-2); }\n.alea-menu[data-size='sm'] .alea-option-icon svg { width: 16px; height: 16px; }\n@media (pointer: coarse) { .alea-menu[data-size='sm'] .alea-option { min-height: 44px; } }\n.alea-menu-end { margin-left: auto; display: inline-flex; align-items: center; color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); }\n.alea-menu-end + .alea-menu-shortcut { margin-left: 0; }\n.alea-menu-header { padding: var(--alea-space-2) var(--alea-space-3) var(--alea-space-3); margin-bottom: var(--alea-space-1); border-bottom: 1px solid var(--alea-border); }\n.alea-menu-footer { padding: var(--alea-space-2) var(--alea-space-3) var(--alea-space-1); margin-top: var(--alea-space-1); border-top: 1px solid var(--alea-border); color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); }\n\n/* end slots, in order: end, badge, shortcut, chevron */\n.alea-menu-badge { flex: none; }\n.alea-menu-shortcut[data-keys] { display: inline-flex; align-items: center; gap: var(--alea-space-1); }\n.alea-menu-key { display: inline-grid; place-items: center; min-width: var(--alea-space-5); height: var(--alea-space-5); padding: 0 var(--alea-space-1); border-radius: var(--alea-radius-xs); box-shadow: inset 0 0 0 1px var(--alea-border-strong); color: var(--alea-text-muted); font: var(--alea-font-weight-medium) var(--alea-font-size-xs) / 1 var(--alea-font-family-body); letter-spacing: 0; }\n.alea-menu-item[data-focused] .alea-menu-key { box-shadow: inset 0 0 0 1px var(--alea-border-control); color: var(--alea-text); }\n.alea-menu-badge + .alea-menu-shortcut, .alea-menu-end + .alea-menu-badge { margin-left: 0; }\n.alea-menu-item[data-disabled] :is(.alea-menu-badge, .alea-menu-shortcut, .alea-menu-chevron) { opacity: 0.6; }\n.alea-menu[data-size='sm'] .alea-menu-key { min-width: var(--alea-space-4); height: var(--alea-space-4); }\n"}],"deps":["icon","overlay","display"],"npm":["react-aria-components","lucide-react","@alea-design/motion"],"exports":["Menu","MenuItem","MenuSection","MenuSeparator","DropdownMenu","Submenu"],"descriptions":{"Menu":"A list of actions or choices. Arrow keys move, typing jumps, Enter picks.","MenuItem":"One item: an action, a link (href), or a choice in a selectable menu. Slots at the end, in order: end, badge, shortcut and a chevron.","MenuSection":"A group of menu items under a title.","MenuSeparator":"A line between groups of items.","DropdownMenu":"A button that opens a menu: two sizes, a header and footer, a width and a height limit.","Submenu":"An item that opens another menu (arrow right or hover). It takes the same slots as MenuItem."}},"more":{"files":[{"path":"components/more/More.tsx","content":"import { useEffect, useId, useRef, useState, type ReactNode, type CSSProperties } from 'react';\nimport { Disclosure, DisclosurePanel, Button as RACButton } from 'react-aria-components';\nimport { ChevronDown, Pencil, Check, X } from 'lucide-react';\nimport { cx } from '../../utils/cx';\nimport { Spinner } from '../feedback/Spinner';\nimport { useStrings } from '../../i18n/strings';\n\n// ---------------------------------------------------------------- accessibility\nexport interface SkipLinkProps {\n /** The id of the main content, without #. Default \"main\". */\n target?: string;\n /** The link text. Default \"Skip to content\". */\n children?: ReactNode;\n}\n\n/** The first link on the page: hidden until focused, it jumps past the navigation to the content. */\nexport function SkipLink({ target = 'main', children }: SkipLinkProps) {\n const t = useStrings(); children ??= t.skipToContent;\n return <a href={`#${target}`} className=\"alea-skip-link\">{children}</a>;\n}\n\nexport interface VisuallyHiddenProps {\n /** Text only screen readers should hear. */\n children: ReactNode;\n /** Render as another element. Default span. */\n as?: 'span' | 'div' | 'p' | 'h1' | 'h2' | 'h3';\n}\n\n/** Content for screen readers only: still read, never shown. */\nexport function VisuallyHidden({ children, as: Tag = 'span' }: VisuallyHiddenProps) {\n return <Tag className=\"alea-visually-hidden\">{children}</Tag>;\n}\n\n// ---------------------------------------------------------------- collapsible\nexport interface CollapsibleProps {\n /** The always-visible trigger text. */\n title: ReactNode;\n /** The content that opens and closes. */\n children: ReactNode;\n /** Open (controlled). */\n isExpanded?: boolean;\n /** Open to start with. */\n defaultExpanded?: boolean;\n /** Called when it opens or closes. */\n onExpandedChange?: (open: boolean) => void;\n className?: string;\n}\n\n/** One section that opens and closes, without the card look of an accordion. */\nexport function Collapsible({ title, children, isExpanded, defaultExpanded, onExpandedChange, className }: CollapsibleProps) {\n return (\n <Disclosure isExpanded={isExpanded} defaultExpanded={defaultExpanded} onExpandedChange={onExpandedChange} className={cx('alea-collapsible', className)}>\n <RACButton slot=\"trigger\" className=\"alea-collapsible-trigger alea-focus-ring\">\n <ChevronDown size={16} aria-hidden=\"true\" className=\"alea-collapsible-chevron\" />{title}\n </RACButton>\n <DisclosurePanel className=\"alea-collapsible-panel\"><div className=\"alea-collapsible-content\">{children}</div></DisclosurePanel>\n </Disclosure>\n );\n}\n\n// ---------------------------------------------------------------- editable\nexport interface EditableProps {\n /** The text (controlled). */\n value?: string;\n /** The text to start with. */\n defaultValue?: string;\n /** Called with the new text when it is saved. Return false to refuse it (stays editing, marked invalid). */\n onSave?: (value: string) => boolean | void;\n /** What the text is, for screen readers (\"Project name\"). */\n label: string;\n /** Shown while empty. */\n placeholder?: string;\n /** A text area instead of one line. */\n multiline?: boolean;\n className?: string;\n}\n\n/** Text that turns into a field when clicked: rename in place. Enter saves, Escape cancels. */\nexport function Editable({ value, defaultValue = '', onSave, label, placeholder = 'Empty', multiline, className }: EditableProps) {\n const t = useStrings();\n const [own, setOwn] = useState(defaultValue);\n const text = value ?? own;\n const [editing, setEditing] = useState(false);\n const [draft, setDraft] = useState(text);\n const [bad, setBad] = useState(false);\n const field = useRef<HTMLInputElement & HTMLTextAreaElement>(null);\n const trigger = useRef<HTMLButtonElement>(null);\n useEffect(() => { if (editing) { field.current?.focus(); field.current?.select(); } }, [editing]);\n const save = () => {\n if (onSave?.(draft) === false) { setBad(true); return; }\n if (value === undefined) setOwn(draft);\n setEditing(false); setBad(false);\n requestAnimationFrame(() => trigger.current?.focus());\n };\n const cancel = () => { setEditing(false); setBad(false); requestAnimationFrame(() => trigger.current?.focus()); };\n if (!editing) {\n return (\n <button ref={trigger} type=\"button\" className={cx('alea-editable alea-focus-ring', className)} data-empty={!text || undefined} aria-label={`${label}: ${text || placeholder}. Edit`} onClick={() => { setDraft(text); setEditing(true); }}>\n <span className=\"alea-editable-text\">{text || placeholder}</span><Pencil size={14} aria-hidden=\"true\" className=\"alea-editable-icon\" />\n </button>\n );\n }\n const Field = multiline ? 'textarea' : 'input';\n return (\n <span className={cx('alea-editable-edit', className)}>\n <Field ref={field as any} className={multiline ? 'alea-textarea' : 'alea-input alea-editable-input'} aria-label={label} aria-invalid={bad || undefined} value={draft} rows={multiline ? 3 : undefined}\n onChange={(e: any) => { setDraft(e.target.value); setBad(false); }}\n onKeyDown={(e: any) => { if (e.key === 'Escape') { e.preventDefault(); cancel(); } if (e.key === 'Enter' && (!multiline || e.metaKey || e.ctrlKey)) { e.preventDefault(); save(); } }} />\n <button type=\"button\" className=\"alea-editable-btn alea-focus-ring\" aria-label={t.save} onClick={save}><Check size={14} /></button>\n <button type=\"button\" className=\"alea-editable-btn alea-focus-ring\" aria-label={t.cancel} onClick={cancel}><X size={14} /></button>\n </span>\n );\n}\n\n// ---------------------------------------------------------------- numbers and time\nexport interface FormattedNumberProps {\n /** The number to format. */\n value: number;\n /** Intl.NumberFormat options: { style: 'currency', currency: 'USD' }, { notation: 'compact' }, { style: 'percent' }. */\n format?: Intl.NumberFormatOptions;\n /** A BCP 47 locale. Default the browser's. */\n locale?: string;\n}\n\n/** A number formatted for the reader's locale: currency, percent, compact. */\nexport function FormattedNumber({ value, format, locale }: FormattedNumberProps) {\n return <>{new Intl.NumberFormat(locale, format).format(value)}</>;\n}\n\nexport interface CountdownProps {\n /** When it ends: a Date or a timestamp in ms. */\n to: Date | number;\n /** What it counts down to, read before the time (\"Sale ends in\"). */\n label: ReactNode;\n /** Called once when it reaches zero. */\n onEnd?: () => void;\n /** Show days. Default true when there is more than a day left. */\n showDays?: boolean;\n className?: string;\n}\n\nconst pad = (n: number) => String(n).padStart(2, '0');\n/** Time left until a moment, updating every second. Screen readers hear it once a minute, not every second. */\nexport function Countdown({ to, label, onEnd, showDays, className }: CountdownProps) {\n const t = useStrings();\n const end = typeof to === 'number' ? to : to.getTime();\n const [now, setNow] = useState(() => Date.now());\n const ended = useRef(false);\n useEffect(() => { const t = setInterval(() => setNow(Date.now()), 1000); return () => clearInterval(t); }, []);\n const left = Math.max(0, end - now);\n useEffect(() => { if (left === 0 && !ended.current) { ended.current = true; onEnd?.(); } }, [left, onEnd]);\n const d = Math.floor(left / 864e5), h = Math.floor(left / 36e5) % 24, m = Math.floor(left / 6e4) % 60, s = Math.floor(left / 1e3) % 60;\n const days = showDays ?? d > 0;\n const parts: Array<[number, string]> = [...(days ? [[d, 'd'] as [number, string]] : []), [days ? h : h + d * 24, 'h'], [m, 'm'], [s, 's']];\n const spoken = `${days ? `${d} days, ` : ''}${days ? h : h + d * 24} hours, ${m} minutes`;\n return (\n <div className={cx('alea-stat alea-countdown', className)}>\n <span className=\"alea-stat-label\">{label}</span>\n <span className=\"alea-stat-value alea-countdown-value\" aria-hidden=\"true\">{parts.map(([v, u]) => <span key={u}><b>{u === 'd' ? v : pad(v)}</b><small>{u}</small></span>)}</span>\n <span className=\"alea-visually-hidden\" aria-live=\"polite\">{left === 0 ? t.ended : spoken}</span>\n </div>\n );\n}\n\n// ---------------------------------------------------------------- status, swatch\nexport interface StatusProps {\n /** The state: success (online, live), warning (degraded), danger (down), neutral (offline), info. */\n tone?: 'success' | 'warning' | 'danger' | 'neutral' | 'info' | 'accent';\n /** The words: the color is never the only signal. */\n children: ReactNode;\n /** Breathe, for live states (pulse pattern; stops with reduced motion). */\n pulse?: boolean;\n className?: string;\n}\n\n/** A colored dot with a label: service health, presence, deploy state. */\nexport function Status({ tone = 'neutral', children, pulse, className }: StatusProps) {\n return <span className={cx('alea-status', className)} data-tone={tone}><span className=\"alea-status-dot\" data-pulse={pulse || undefined} aria-hidden=\"true\" />{children}</span>;\n}\n\nexport interface ColorSwatchProps {\n /** Any CSS color, or a token: var(--alea-accent). */\n color: string;\n /** Name for screen readers (\"Orchid, purple 400\"). */\n label: string;\n /** Size in px. Default 28. */\n size?: number;\n /** circle (default) or square. */\n shape?: 'circle' | 'square';\n /** Shows the name and the value under the swatch. */\n showValue?: boolean;\n className?: string;\n style?: CSSProperties;\n}\n\n/** A color sample, with a checkerboard under transparent colors. */\nexport function ColorSwatch({ color, label, size = 28, shape = 'circle', showValue, className, style }: ColorSwatchProps) {\n const swatch = <span className=\"alea-swatch\" data-shape={shape} role=\"img\" aria-label={label} style={{ width: size, height: size, ['--alea-swatch' as any]: color, ...style }} />;\n if (!showValue) return <span className={cx('alea-swatch-wrap', className)}>{swatch}</span>;\n return <span className={cx('alea-swatch-wrap', className)} data-labeled>{swatch}<span className=\"alea-swatch-name\" aria-hidden=\"true\">{label}</span><code className=\"alea-swatch-value\">{color}</code></span>;\n}\n\n// ---------------------------------------------------------------- loading overlay, segmented progress\nexport interface LoadingOverlayProps {\n /** Shows the overlay and marks the content busy. */\n isLoading: boolean;\n /** The content it covers. */\n children: ReactNode;\n /** What is loading, for screen readers. Default \"Loading\". */\n label?: string;\n /** Blur the content under it. Default true. */\n blur?: boolean;\n className?: string;\n}\n\n/** Covers a region while it loads, keeps it in place and tells screen readers it is busy. */\nexport function LoadingOverlay({ isLoading, children, label, blur = true, className }: LoadingOverlayProps) {\n const t = useStrings(); label ??= t.loading;\n return (\n <div className={cx('alea-loading', className)} aria-busy={isLoading || undefined}>\n <div className=\"alea-loading-content\" inert={isLoading ? true : undefined}>{children}</div>\n {isLoading && <div className=\"alea-loading-overlay\" data-blur={blur || undefined}><Spinner size=\"md\" aria-label={label} /></div>}\n </div>\n );\n}\n\nexport interface ProgressSegmentsProps {\n /** The parts: label, value and an optional color (defaults to the chart colors). */\n segments: Array<{ label: string; value: number; color?: string }>;\n /** The whole. Default the sum of the values. */\n total?: number;\n /** Name of the bar (\"Storage\"). */\n label: ReactNode;\n /** Formats each value in the legend, e.g. v => `${v} GB`. */\n valueFormat?: (v: number) => string;\n /** Shows the legend under the bar. Default true. */\n showLegend?: boolean;\n className?: string;\n}\n\n/** One bar split into parts: storage by type, budget by team. */\nexport function ProgressSegments({ segments, total, label, valueFormat = v => String(v), showLegend = true, className }: ProgressSegmentsProps) {\n const id = useId();\n const sum = total ?? segments.reduce((a, s) => a + s.value, 0);\n const color = (s: { color?: string }, i: number) => s.color || `var(--alea-chart-${(i % 8) + 1})`;\n const used = segments.reduce((a, s) => a + s.value, 0);\n return (\n <div className={cx('alea-progress-seg', className)}>\n <div className=\"alea-progress-seg-head\"><span id={id} className=\"alea-label\">{label}</span><span className=\"alea-progress-seg-total\">{valueFormat(used)} of {valueFormat(sum)}</span></div>\n <div className=\"alea-progress-seg-bar\" role=\"meter\" aria-labelledby={id} aria-valuemin={0} aria-valuemax={sum} aria-valuenow={used} aria-valuetext={segments.map(s => `${s.label} ${valueFormat(s.value)}`).join(', ')}>\n {segments.map((s, i) => <span key={s.label} className=\"alea-progress-seg-part\" style={{ width: `${(s.value / (sum || 1)) * 100}%`, background: color(s, i), animationDelay: `${i * 60}ms` }} />)}\n </div>\n {showLegend && <ul className=\"alea-progress-seg-legend\" aria-hidden=\"true\">{segments.map((s, i) => <li key={s.label}><span style={{ background: color(s, i) }} />{s.label}<b>{valueFormat(s.value)}</b></li>)}</ul>}\n </div>\n );\n}\n\n// ---------------------------------------------------------------- typography\nexport interface BlockquoteProps {\n children: ReactNode;\n /** Who said it. */\n cite?: ReactNode;\n /** The source URL (sets cite on the quote). */\n source?: string;\n className?: string;\n}\n\n/** A quotation with its author. */\nexport function Blockquote({ children, cite, source, className }: BlockquoteProps) {\n return (\n <figure className={cx('alea-blockquote', className)}>\n <blockquote cite={source}>{children}</blockquote>\n {cite && <figcaption>{cite}</figcaption>}\n </figure>\n );\n}\n\nexport interface ListProps {\n /** The items. */\n items: ReactNode[];\n /** bullet (default), number, check or none. */\n marker?: 'bullet' | 'number' | 'check' | 'none';\n /** Space between items: sm or md (default). */\n spacing?: 'sm' | 'md';\n className?: string;\n}\n\n/** A styled list with bullets, numbers or checks. */\nexport function List({ items, marker = 'bullet', spacing = 'md', className }: ListProps) {\n const Tag = marker === 'number' ? 'ol' : 'ul';\n return <Tag className={cx('alea-text-list', className)} data-marker={marker} data-spacing={spacing}>{items.map((it, i) => <li key={i}>{marker === 'check' && <Check size={16} aria-hidden=\"true\" className=\"alea-text-list-check\" />}<span>{it}</span></li>)}</Tag>;\n}\n\n// ---------------------------------------------------------------- prose\nexport interface ProseProps {\n /** Rich content: headings, paragraphs, lists, links, quotes, code, images, tables (from Markdown or a CMS). */\n children: ReactNode;\n /** sm (14 px) or base (16 px, default) text. */\n size?: 'sm' | 'base';\n className?: string;\n}\n\n/** Styles long-form content you don't control element by element: articles, docs, CMS HTML. */\nexport function Prose({ children, size = 'base', className }: ProseProps) {\n return <div className={cx('alea-prose alea-markdown', className)} data-size={size}>{children}</div>;\n}\n\n// ---------------------------------------------------------------- banner\nexport interface BannerProps {\n /** The message. Keep it to one line on desktop. */\n children: ReactNode;\n /** accent (default, gradient), info, warning or danger. */\n tone?: 'accent' | 'info' | 'warning' | 'danger';\n /** A link or button after the message. */\n action?: ReactNode;\n /** Shows a close button; called when closed. */\n onDismiss?: () => void;\n /** Name of the region. Default \"Announcement\"; give each banner its own when there are several. */\n 'aria-label'?: string;\n className?: string;\n}\n\n/** A site-wide announcement bar above the header: launches, sales, outages. */\nexport function Banner({ children, tone = 'accent', action, onDismiss, className, 'aria-label': label }: BannerProps) {\n const t = useStrings(); label ??= t.announcement;\n const [open, setOpen] = useState(true);\n if (!open) return null;\n return (\n <div className={cx('alea-banner', className)} data-tone={tone} role=\"region\" aria-label={label}>\n <p className=\"alea-banner-text\">{children}</p>\n {action && <span className=\"alea-banner-action\">{action}</span>}\n {onDismiss && <button type=\"button\" className=\"alea-banner-close alea-focus-ring\" aria-label={t.dismissAnnouncement} onClick={() => { setOpen(false); onDismiss(); }}><X size={16} /></button>}\n </div>\n );\n}\n"},{"path":"components/more/more.css","content":"/* SkipLink, Collapsible, Editable, Countdown, Status, ColorSwatch, LoadingOverlay, ProgressSegments, Blockquote, List */\n.alea-skip-link { position: fixed; top: var(--alea-space-3); left: var(--alea-space-3); z-index: var(--alea-z-toast); padding: var(--alea-space-3) var(--alea-space-4); border-radius: var(--alea-radius-full); background: var(--alea-chip-bg); color: var(--alea-chip-text); font: var(--alea-font-weight-semibold) var(--alea-font-size-md) / 1 var(--alea-font-family-body); text-decoration: none; transform: translateY(-160%); transition: transform var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-skip-link:focus { transform: none; outline: 2px solid var(--alea-focus); outline-offset: var(--alea-space-0-5); }\n\n.alea-collapsible-trigger { display: inline-flex; align-items: center; gap: var(--alea-space-2); padding: var(--alea-space-2) var(--alea-space-1); border: 0; border-radius: var(--alea-radius-xs); background: none; color: var(--alea-text); font: var(--alea-font-weight-medium) var(--alea-font-size-md) / 1.3 var(--alea-font-family-body); cursor: pointer; }\n.alea-collapsible-trigger:hover { color: var(--alea-accent-strong); }\n.alea-collapsible-chevron { color: var(--alea-icon-muted); transform: rotate(-90deg); transition: transform var(--alea-motion-duration-base) var(--alea-motion-ease-emphasized); }\n.alea-collapsible[data-expanded] .alea-collapsible-chevron { transform: none; }\n.alea-collapsible-panel { height: var(--disclosure-panel-height); overflow: clip; transition: height var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-collapsible-content { padding: var(--alea-space-1) 0 var(--alea-space-2) var(--alea-space-7); color: var(--alea-text-muted); font-size: var(--alea-font-size-md); line-height: var(--alea-font-leading-relaxed); }\n.alea-collapsible[data-expanded] .alea-collapsible-content { animation: alea-item-in var(--alea-motion-duration-slow) var(--alea-motion-ease-out); }\n\n.alea-editable { display: inline-flex; align-items: center; gap: var(--alea-space-2); max-width: 100%; margin: calc(var(--alea-space-1) * -1) calc(var(--alea-space-2) * -1); padding: var(--alea-space-1) var(--alea-space-2); border: 0; border-radius: var(--alea-radius-xs); background: none; color: var(--alea-text); font: inherit; text-align: left; cursor: text; transition: background-color var(--alea-motion-duration-instant) var(--alea-motion-ease-standard); }\n.alea-editable:hover { background: var(--alea-surface-hover); }\n.alea-editable[data-empty] .alea-editable-text { color: var(--alea-text-faint); }\n.alea-editable-icon { flex: none; color: var(--alea-icon-faint); opacity: 0.01; transition: opacity var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-editable:hover .alea-editable-icon, .alea-editable:focus-visible .alea-editable-icon { opacity: 1; }\n.alea-editable-edit { display: inline-flex; align-items: center; gap: var(--alea-space-1); width: min(100%, 360px); animation: alea-item-in var(--alea-motion-duration-fast) var(--alea-motion-ease-out); }\n.alea-editable-input { flex: 1; height: 36px; padding: 0 var(--alea-space-3); border-radius: var(--alea-radius-sm); background: var(--alea-field-bg); color: var(--alea-text); font: inherit; border: 0; box-shadow: inset 0 0 0 1.5px var(--alea-accent); outline: none; }\n.alea-editable-input[aria-invalid] { box-shadow: inset 0 0 0 1.5px var(--alea-status-danger); animation: alea-nudge var(--alea-motion-duration-slow) var(--alea-motion-ease-out); }\n.alea-editable-btn { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border: 0; border-radius: var(--alea-radius-full); background: var(--alea-surface-raised); color: var(--alea-text); cursor: pointer; }\n.alea-editable-btn:hover { background: var(--alea-surface-hover); }\n\n.alea-countdown-value { display: inline-flex; gap: var(--alea-space-3); font-variant-numeric: tabular-nums; }\n.alea-countdown-value small { margin-left: var(--alea-space-0-5); font: var(--alea-font-weight-medium) var(--alea-font-size-sm) / 1 var(--alea-font-family-body); color: var(--alea-text-muted); }\n\n.alea-status { display: inline-flex; align-items: center; gap: var(--alea-space-2); font-size: var(--alea-font-size-md); color: var(--alea-text); }\n.alea-status-dot { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--tone, var(--alea-text-muted)); }\n.alea-status[data-tone='success'] { --tone: var(--alea-status-success); } .alea-status[data-tone='warning'] { --tone: var(--alea-status-warning); } .alea-status[data-tone='danger'] { --tone: var(--alea-status-danger); }\n.alea-status[data-tone='info'] { --tone: var(--alea-status-info); } .alea-status[data-tone='accent'] { --tone: var(--alea-accent); }\n.alea-status-dot[data-pulse]::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: inherit; animation: alea-ping 1.6s var(--alea-motion-ease-out) infinite; }\n\n.alea-swatch-wrap { display: inline-flex; flex-direction: column; gap: var(--alea-space-1); vertical-align: middle; }\n.alea-swatch { display: block; border-radius: 50%; background: linear-gradient(var(--alea-swatch), var(--alea-swatch)), repeating-conic-gradient(#9994 0 25%, transparent 0 50%) 0 0 / 8px 8px; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.25); }\n.alea-swatch[data-shape='square'] { border-radius: var(--alea-radius-xs); }\n.alea-swatch-name { font-size: var(--alea-font-size-xs); font-weight: var(--alea-font-weight-medium); }\n.alea-swatch-value { font: 11px var(--alea-font-family-mono); color: var(--alea-text-muted); }\n\n.alea-loading { position: relative; }\n.alea-loading-overlay { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; border-radius: inherit; background: color-mix(in srgb, var(--alea-bg) 60%, transparent); animation: alea-m-fade-in var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-loading-overlay[data-blur] { backdrop-filter: blur(3px); }\n\n.alea-progress-seg { display: flex; flex-direction: column; gap: var(--alea-space-2); }\n.alea-progress-seg-head { display: flex; justify-content: space-between; gap: var(--alea-space-3); }\n.alea-progress-seg-total { font-size: var(--alea-font-size-sm); color: var(--alea-text-muted); font-variant-numeric: tabular-nums; }\n.alea-progress-seg-bar { display: flex; gap: var(--alea-space-0-5); height: 12px; border-radius: var(--alea-radius-sm); background: var(--alea-surface-raised); overflow: hidden; }\n.alea-progress-seg-part { height: 100%; transform-origin: left; animation: alea-seg-grow var(--alea-motion-duration-slower) var(--alea-motion-ease-out) both; }\n.alea-progress-seg-part:first-child { border-radius: var(--alea-radius-sm) 0 0 var(--alea-radius-sm); }\n@keyframes alea-seg-grow { from { transform: scaleX(0.01); } }\n.alea-progress-seg-legend { display: flex; flex-wrap: wrap; gap: var(--alea-space-2) var(--alea-space-4); margin: 0; padding: 0; list-style: none; font-size: var(--alea-font-size-xs); color: var(--alea-text-muted); }\n.alea-progress-seg-legend li { display: inline-flex; align-items: center; gap: var(--alea-space-2); }\n.alea-progress-seg-legend span { width: 8px; height: 8px; border-radius: var(--alea-radius-2xs); }\n.alea-progress-seg-legend b { color: var(--alea-text); font-weight: var(--alea-font-weight-medium); }\n\n.alea-blockquote { margin: 0; padding: var(--alea-space-4) var(--alea-space-5); border-left: 4px solid; border-image: var(--alea-gradient-accent-linear) 1; background: var(--alea-surface); border-radius: 0 var(--alea-radius-md) var(--alea-radius-md) 0; }\n.alea-blockquote blockquote { margin: 0; font: var(--alea-font-weight-light) var(--alea-font-size-xl) / 1.4 var(--alea-font-family-display); color: var(--alea-text); }\n.alea-blockquote figcaption { margin-top: var(--alea-space-2); font-size: var(--alea-font-size-sm); color: var(--alea-text-muted); }\n.alea-blockquote figcaption::before { content: '- '; }\n\n.alea-text-list { margin: 0; padding-left: 1.25em; color: var(--alea-text); font-size: var(--alea-font-size-md); line-height: var(--alea-font-leading-relaxed); }\n.alea-text-list[data-spacing='md'] li + li { margin-top: var(--alea-space-2); }\n.alea-text-list[data-spacing='sm'] li + li { margin-top: var(--alea-space-0-5); }\n.alea-text-list li::marker { color: var(--alea-accent-strong); }\n.alea-text-list:is([data-marker='check'], [data-marker='none']) { padding-left: 0; list-style: none; }\n.alea-text-list[data-marker='check'] li { display: flex; gap: var(--alea-space-2); align-items: flex-start; }\n.alea-text-list-check { flex: none; margin-top: var(--alea-space-1); color: var(--alea-status-success); }\n\n/* Prose: extends the Markdown styles to any long-form HTML */\n.alea-prose { max-width: 72ch; }\n.alea-prose[data-size='base'] { font-size: var(--alea-font-size-base); }\n.alea-prose h1 { margin: 0 0 0.5em; font: var(--alea-font-weight-light) var(--alea-font-size-4xl) / 1.1 var(--alea-font-family-display); letter-spacing: var(--alea-font-tracking-display); }\n.alea-prose img { max-width: 100%; height: auto; border-radius: var(--alea-radius-md); margin: 1em 0; }\n.alea-prose figure { margin: 1.5em 0; } .alea-prose figcaption { margin-top: 0.5em; font-size: var(--alea-font-size-sm); color: var(--alea-text-muted); text-align: center; }\n.alea-prose hr { margin: 2em 0; border: 0; height: 1px; background: var(--alea-border); }\n.alea-prose table { width: 100%; margin: 1.2em 0; border-collapse: collapse; font-size: 0.92em; }\n.alea-prose th, .alea-prose td { padding: var(--alea-space-2) var(--alea-space-3); text-align: left; border-bottom: 1px solid var(--alea-border); }\n.alea-prose th { font-weight: var(--alea-font-weight-semibold); color: var(--alea-text-muted); }\n.alea-prose li::marker { color: var(--alea-accent-strong); }\n.alea-prose :is(h2, h3, h4) { scroll-margin-top: var(--alea-space-22); }\n\n/* Banner */\n.alea-banner { position: relative; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--alea-space-2) var(--alea-space-4); padding: var(--alea-space-3) var(--alea-space-12); font-size: var(--alea-font-size-sm); text-align: center; animation: alea-item-in var(--alea-motion-duration-slow) var(--alea-motion-ease-out); }\n.alea-banner[data-tone='accent'] { background: var(--alea-gradient-accent-linear); color: var(--alea-accent-on); }\n.alea-banner[data-tone='info'] { background: var(--alea-status-info-bg); color: var(--alea-text); box-shadow: inset 0 -1px 0 var(--alea-border); }\n.alea-banner[data-tone='warning'] { background: var(--alea-status-warning-bg); color: var(--alea-text); box-shadow: inset 0 -1px 0 var(--alea-border); }\n.alea-banner[data-tone='danger'] { background: var(--alea-status-danger-solid); color: var(--alea-status-danger-on-solid); }\n.alea-banner-text { margin: 0; font-weight: var(--alea-font-weight-medium); }\n.alea-banner-action a { color: inherit; font-weight: var(--alea-font-weight-semibold); text-underline-offset: 3px; }\n.alea-banner-close { position: absolute; right: var(--alea-space-3); top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }\n.alea-banner-close:hover { background: rgba(0, 0, 0, 0.12); }\n.alea-prose pre { white-space: pre-wrap; overflow-wrap: anywhere; }\n\n/* checklists (from the rich text editor): a box before each item, filled when data-checked is true */\n.alea-prose ul[data-checklist] { padding-inline-start: 0; list-style: none; }\n.alea-prose ul[data-checklist] > li { position: relative; padding-inline-start: var(--alea-space-7); }\n.alea-prose ul[data-checklist] > li::before { content: ''; position: absolute; inset-inline-start: 0; top: 0.3em; width: 16px; height: 16px; border-radius: var(--alea-radius-xs); box-shadow: inset 0 0 0 1.5px var(--alea-border-strong); transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-out); }\n.alea-prose ul[data-checklist] > li[data-checked='true']::before { background: var(--alea-accent-solid); box-shadow: none; }\n.alea-prose ul[data-checklist] > li[data-checked='true']::after { content: ''; position: absolute; inset-inline-start: var(--alea-space-0-5); top: calc(0.3em + var(--alea-space-0-5)); width: 12px; height: 12px; background: var(--alea-accent-on); pointer-events: none;\n -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E\") center / contain no-repeat;\n mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E\") center / contain no-repeat; }\n.alea-prose ul[data-checklist] > li[data-checked='true'] { color: var(--alea-text-muted); text-decoration: line-through; }\n"}],"deps":["feedback"],"npm":["react-aria-components","lucide-react"],"exports":["SkipLink","VisuallyHidden","Collapsible","Editable","FormattedNumber","Countdown","Status","ColorSwatch","LoadingOverlay","ProgressSegments","Blockquote","List","Prose","Banner"],"descriptions":{"SkipLink":"The first link on the page: hidden until focused, it jumps past the navigation to the content.","VisuallyHidden":"Content for screen readers only: still read, never shown.","Collapsible":"One section that opens and closes, without the card look of an accordion.","Editable":"Text that turns into a field when clicked: rename in place. Enter saves, Escape cancels.","FormattedNumber":"A number formatted for the reader's locale: currency, percent, compact.","Countdown":"Time left until a moment, updating every second. Screen readers hear it once a minute, not every second.","Status":"A colored dot with a label: service health, presence, deploy state.","ColorSwatch":"A color sample, with a checkerboard under transparent colors.","LoadingOverlay":"Covers a region while it loads, keeps it in place and tells screen readers it is busy.","ProgressSegments":"One bar split into parts: storage by type, budget by team.","Blockquote":"A quotation with its author.","List":"A styled list with bullets, numbers or checks.","Prose":"Styles long-form content you don't control element by element: articles, docs, CMS HTML.","Banner":"A site-wide announcement bar above the header: launches, sales, outages."}},"navigation":{"files":[{"path":"components/navigation/Navbar.tsx","content":"import { useId, useState, type CSSProperties, type ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\nimport { NavigationMenu, Burger, type NavigationMenuProps } from './Navigation2';\nimport { Drawer, DrawerContent } from '../overlay/Drawer';\nimport { useStrings } from '../../i18n/strings';\n\nexport interface NavbarProps {\n /** The logo or name, usually a link home. */\n brand: ReactNode;\n /** The links: the same items as NavigationMenu (links, or groups with panels). */\n items: NavigationMenuProps['items'];\n /** The href of the current page. */\n current?: string;\n /** Things on the right: theme toggle, sign in, a call to action. Also shown in the drawer on small screens. */\n actions?: ReactNode;\n /** Below this width the links move into a drawer behind a burger. Default md (768 px). */\n collapseBelow?: 'sm' | 'md' | 'lg';\n /** Stick to the top while scrolling, with a blurred background. Default true. */\n sticky?: boolean;\n /** Name of the navigation. Default \"Main\". */\n 'aria-label'?: string;\n className?: string;\n /** Inline styles for the root, e.g. a radius when it floats as a pill (the glass then follows the corners). */\n style?: CSSProperties;\n}\n\n/** A site header: brand, links with optional mega menus, actions; on small screens the links move into a drawer. */\nexport function Navbar({ brand, items, current, actions, collapseBelow = 'md', sticky = true, className, style, 'aria-label': label }: NavbarProps) {\n const t = useStrings(); label ??= t.mainNav;\n const [open, setOpen] = useState(false);\n const menuId = useId();\n return (\n <header className={cx('alea-navbar', className)} style={style} data-sticky={sticky || undefined} data-collapse={collapseBelow}>\n <div className=\"alea-navbar-inner\">\n <div className=\"alea-navbar-brand\">{brand}</div>\n <NavigationMenu aria-label={label} items={items} current={current} className=\"alea-navbar-links\" />\n <div className=\"alea-navbar-actions\">{actions}</div>\n <span className=\"alea-navbar-burger\"><Burger isOpen={open} onChange={setOpen} aria-controls={menuId} aria-label={t.menu} /></span>\n </div>\n <Drawer isOpen={open} onOpenChange={setOpen} placement=\"end\" size={320}>\n <DrawerContent title={t.menu}>\n <div id={menuId} className=\"alea-navbar-drawer\">\n <NavigationMenu orientation=\"vertical\" size=\"lg\" aria-label={label} items={items} current={current} onNavigate={() => setOpen(false)} />\n {actions && <div className=\"alea-navbar-drawer-actions\">{actions}</div>}\n </div>\n </DrawerContent>\n </Drawer>\n </header>\n );\n}\n"},{"path":"components/navigation/Navigation.tsx","content":"import { Children, isValidElement, useMemo, type ReactElement, type ReactNode } from 'react';\nimport { Breadcrumbs as RACBreadcrumbs, Breadcrumb as RACBreadcrumb, Link as RACLink, Button as RACButton, type BreadcrumbsProps as RACBreadcrumbsProps, type BreadcrumbProps as RACBreadcrumbProps, type Key } from 'react-aria-components';\nimport { ChevronLeft, ChevronRight, ChevronsLeft, ChevronsRight, Check, X } from 'lucide-react';\nimport { DropdownMenu, MenuItem } from '../menu/Menu';\nimport { cx, withBase } from '../../utils/cx';\nimport { useStrings } from '../../i18n/strings';\n\nexport interface BreadcrumbsProps<T extends object> extends RACBreadcrumbsProps<T> {\n /** Character or icon between items. Default a chevron. */\n separator?: ReactNode;\n /** With Breadcrumb children: show at most this many; the middle ones fold into a … menu (first and last stay). */\n maxItems?: number;\n /** sm (13 px) or md (14 px, default). */\n size?: 'sm' | 'md';\n}\n\n/** Where the page sits: a trail of links, the last one is the current page. Long trails fold their middle into a menu. */\nexport function Breadcrumbs<T extends object>({ separator, maxItems, size, className, children, ...props }: BreadcrumbsProps<T>) {\n const t = useStrings();\n let kids = children;\n if (maxItems && typeof children !== 'function') {\n const all = Children.toArray(children).filter(isValidElement) as Array<ReactElement<BreadcrumbProps>>;\n if (all.length > maxItems && maxItems >= 2) {\n const hidden = all.slice(1, all.length - (maxItems - 1));\n kids = [\n all[0],\n <RACBreadcrumb key=\"__more\" className=\"alea-crumb\">\n <DropdownMenu aria-label={t.showMore} trigger={<RACButton className=\"alea-crumb-link alea-crumb-more alea-focus-ring\" aria-label={t.showMore}>…</RACButton>}>\n {hidden.map((h, i) => <MenuItem key={i} id={`c${i}`} href={h.props.href}>{h.props.children}</MenuItem>)}\n </DropdownMenu>\n </RACBreadcrumb>,\n ...all.slice(all.length - (maxItems - 1)),\n ];\n }\n }\n return <RACBreadcrumbs {...props} className={cx('alea-breadcrumbs', className as string)} data-size={size} data-separator={separator ? undefined : 'chevron'} style={{ ['--alea-crumb-sep' as any]: typeof separator === 'string' ? `\"${separator}\"` : undefined, ...(props.style as any) }}>{kids as any}</RACBreadcrumbs>;\n}\n\nexport interface BreadcrumbProps extends RACBreadcrumbProps {\n /** Link target. Leave it out on the current page. */\n href?: string;\n /** An icon before the text (a home icon on the first crumb). */\n icon?: ReactNode;\n children: ReactNode;\n}\n\n/** One step of the trail. */\nexport function Breadcrumb({ href, icon, children, className, ...props }: BreadcrumbProps) {\n return (\n <RACBreadcrumb {...props} className={withBase('alea-crumb', className as any)}>\n <RACLink href={href} className=\"alea-crumb-link alea-focus-ring\">{icon && <span className=\"alea-crumb-icon\" aria-hidden=\"true\">{icon}</span>}{children}</RACLink>\n </RACBreadcrumb>\n );\n}\n\nexport interface PaginationProps {\n /** Current page, from 1. */\n page: number;\n /** Total pages. */\n total: number;\n /** Called with the new page number. */\n onChange: (page: number) => void;\n /** Pages shown on each side of the current one. Default 1. */\n siblings?: number;\n /** compact shows \"3 of 12\" between the arrows instead of page numbers. */\n appearance?: 'pages' | 'compact';\n /** sm (28 px), md (36 px, default) or lg (44 px) buttons. */\n size?: 'sm' | 'md' | 'lg';\n /** Adds first and last page buttons. */\n showFirstLast?: boolean;\n /** Rows per page, to show a page size select with onPageSizeChange. */\n pageSize?: number;\n /** The page sizes to offer. Default 10, 25, 50, 100. */\n pageSizeOptions?: number[];\n /** Called with the new page size. */\n onPageSizeChange?: (size: number) => void;\n /** All the items, to show \"1-10 of 248\" (needs pageSize). */\n totalItems?: number;\n /** A field to jump to a page. */\n showJumper?: boolean;\n /** Name for screen readers. Default \"Pagination\". */\n 'aria-label'?: string;\n /** Extra class names for the root element. */\n className?: string;\n}\n\nfunction range(page: number, total: number, siblings: number): Array<number | 'gap'> {\n const out: Array<number | 'gap'> = [];\n const start = Math.max(2, page - siblings), end = Math.min(total - 1, page + siblings);\n out.push(1);\n if (start > 2) out.push('gap');\n for (let i = start; i <= end; i++) out.push(i);\n if (end < total - 1) out.push('gap');\n if (total > 1) out.push(total);\n return out;\n}\n\n/** Move through pages of results. The current page is marked for screen readers. */\nexport function Pagination({ page, total, onChange, siblings = 1, appearance = 'pages', size, showFirstLast, pageSize, pageSizeOptions = [10, 25, 50, 100], onPageSizeChange, totalItems, showJumper, className, 'aria-label': label }: PaginationProps) {\n const t = useStrings(); label ??= t.pagination;\n const items = useMemo(() => range(page, Math.max(1, total), siblings), [page, total, siblings]);\n const go = (p: number) => onChange(Math.min(Math.max(1, p), total));\n const from = pageSize ? (page - 1) * pageSize + 1 : 0, to = pageSize && totalItems != null ? Math.min(totalItems, page * pageSize) : 0;\n const extras = (totalItems != null && pageSize) || onPageSizeChange || showJumper;\n const nav = (\n <nav aria-label={label} className={cx('alea-pagination', !extras && className)} data-size={size}>\n {showFirstLast && <button type=\"button\" className=\"alea-page alea-focus-ring\" data-far aria-label={t.firstPage} disabled={page <= 1} onClick={() => go(1)}><ChevronsLeft size={16} aria-hidden=\"true\" /></button>}\n <button type=\"button\" className=\"alea-page alea-focus-ring\" aria-label={t.previousPage} disabled={page <= 1} onClick={() => go(page - 1)}><ChevronLeft size={16} aria-hidden=\"true\" /></button>\n {appearance === 'compact' ? (\n <span className=\"alea-page-status\" aria-live=\"polite\">{t.nOfTotal(page, total)}</span>\n ) : (\n <ul>\n {items.map((it, i) => it === 'gap'\n ? <li key={`g${i}`} className=\"alea-page-gap\" aria-hidden=\"true\">…</li>\n : <li key={it} data-far={items.length > 5 && Math.abs((it as number) - page) > 1 || undefined}><button type=\"button\" className=\"alea-page alea-focus-ring\" aria-current={it === page ? 'page' : undefined} aria-label={t.pageN(it as number)} onClick={() => go(it)}>{it}</button></li>)}\n </ul>\n )}\n <button type=\"button\" className=\"alea-page alea-focus-ring\" aria-label={t.nextPage} disabled={page >= total} onClick={() => go(page + 1)}><ChevronRight size={16} aria-hidden=\"true\" /></button>\n {showFirstLast && <button type=\"button\" className=\"alea-page alea-focus-ring\" data-far aria-label={t.lastPage} disabled={page >= total} onClick={() => go(total)}><ChevronsRight size={16} aria-hidden=\"true\" /></button>}\n </nav>\n );\n if (!extras) return nav;\n return (\n <div className={cx('alea-pagination-bar', className)} data-size={size}>\n {totalItems != null && pageSize ? <span className=\"alea-pagination-total\" aria-live=\"polite\">{t.itemRange(from, to, totalItems)}</span> : <span />}\n <div className=\"alea-pagination-controls\">\n {onPageSizeChange && pageSize && (\n <label className=\"alea-pagination-size\"><span>{t.perPage}</span>\n <select className=\"alea-cal-select alea-focus-ring\" value={pageSize} onChange={e => onPageSizeChange(Number(e.target.value))}>{pageSizeOptions.map(n => <option key={n} value={n}>{n}</option>)}</select>\n </label>\n )}\n {nav}\n {showJumper && (\n <label className=\"alea-pagination-jump\"><span>{t.goToPage}</span>\n <input className=\"alea-pagination-input alea-focus-ring\" type=\"number\" inputMode=\"numeric\" min={1} max={total} placeholder={String(page)}\n onKeyDown={e => { if (e.key === 'Enter') { const n = Number((e.target as HTMLInputElement).value); if (n) { go(n); (e.target as HTMLInputElement).value = ''; } } }} />\n </label>\n )}\n </div>\n </div>\n );\n}\n\nexport interface Step {\n id: Key;\n title: ReactNode;\n description?: ReactNode;\n /** Overrides the status from current: error (something to fix) or warning. */\n status?: 'error' | 'warning';\n /** An icon instead of the number (with variant=\"icons\"). */\n icon?: ReactNode;\n /** Marks the step as optional. */\n isOptional?: boolean;\n}\n\nexport interface StepsProps {\n /** The steps: id, title, optional description. */\n steps: Step[];\n /** The step in progress (by id). Earlier steps show as done. */\n current: Key;\n /** horizontal (default) or vertical. */\n orientation?: 'horizontal' | 'vertical';\n /** Lets people jump back to finished steps. */\n onStepPress?: (id: Key) => void;\n /** Name of the list. Default \"Progress\". */\n 'aria-label'?: string;\n /** Extra class names for the root element. */\n className?: string;\n /** Horizontal steps turn vertical on phones (below 640 px). Default true. */\n responsive?: boolean;\n /** sm (24 px markers) or md (32 px, default). */\n size?: 'sm' | 'md';\n /** numbers (default), dots (small markers, for compact flows) or icons (each step's icon). */\n variant?: 'numbers' | 'dots' | 'icons';\n /** Horizontal only: the text beside the marker (end, default) or below it (centered). */\n labelPlacement?: 'end' | 'below';\n}\n\n/** Progress through a known sequence: done, current and upcoming steps. */\nexport function Steps({ steps, current, orientation = 'horizontal', responsive = true, onStepPress, size, variant = 'numbers', labelPlacement, className, 'aria-label': label }: StepsProps) {\n const t = useStrings(); label ??= t.progress;\n const at = Math.max(0, steps.findIndex(s => s.id === current));\n return (\n <ol aria-label={label} className={cx('alea-steps', className)} data-orientation={orientation} data-responsive={responsive || undefined} data-size={size} data-variant={variant !== 'numbers' ? variant : undefined} data-label-placement={labelPlacement !== 'end' ? labelPlacement : undefined}>\n {steps.map((s, i) => {\n const status = s.status ?? (i < at ? 'done' : i === at ? 'current' : 'upcoming');\n const marker = status === 'error' ? <X size={14} /> : status === 'warning' ? '!' : status === 'done' ? <Check size={14} /> : variant === 'dots' ? null : variant === 'icons' && s.icon ? s.icon : i + 1;\n const body = (\n <>\n <span className=\"alea-step-dot\" aria-hidden=\"true\">{marker}</span>\n <span className=\"alea-step-text\">\n <span className=\"alea-step-title\">{s.title}{s.isOptional && <span className=\"alea-step-optional\"> ({t.optional})</span>}</span>\n {s.description && <span className=\"alea-step-desc\">{s.description}</span>}\n {(status === 'error' || status === 'warning') && <span className=\"alea-visually-hidden\"> {status === 'error' ? t.stepError : t.stepWarning}</span>}\n </span>\n </>\n );\n return (\n <li key={s.id != null ? String(s.id) : i} className=\"alea-step\" data-status={status} aria-current={status === 'current' ? 'step' : undefined}>\n {onStepPress && status === 'done'\n ? <button type=\"button\" className=\"alea-step-button alea-focus-ring\" onClick={() => onStepPress(s.id)}>{body}<span className=\"alea-visually-hidden\"> {t.stepDoneBack}</span></button>\n : <div className=\"alea-step-button\">{body}{status === 'done' && <span className=\"alea-visually-hidden\"> {t.stepDone}</span>}</div>}\n </li>\n );\n })}\n </ol>\n );\n}\n"},{"path":"components/navigation/Navigation2.tsx","content":"import { useEffect, useId, useRef, useState, type KeyboardEvent, type MouseEvent, type ReactNode } from 'react';\nimport { Popover as RACPopover, Menu as RACMenu, type Key } from 'react-aria-components';\nimport { withMotionStyle, type MotionProp } from '@alea-design/motion';\nimport { ChevronDown } from 'lucide-react';\nimport { cx } from '../../utils/cx';\nimport { MenuItem, MenuSeparator } from '../menu/Menu';\nimport { useStrings } from '../../i18n/strings';\n\n/** One item of a menu built from data: an action, or a separator. */\nexport type MenuEntry = { id: Key; label: string; icon?: ReactNode; shortcut?: string; description?: string; tone?: 'default' | 'danger'; isDisabled?: boolean } | { separator: true };\n\nconst entries = (items: MenuEntry[]) => items.map((it, i) => ('separator' in it ? <MenuSeparator key={`s${i}`} /> : <MenuItem key={String(it.id)} id={it.id} icon={it.icon} shortcut={it.shortcut} description={it.description} tone={it.tone} isDisabled={it.isDisabled}>{it.label}</MenuItem>));\n\n// ---------------------------------------------------------------- context menu\nexport interface ContextMenuProps {\n /** The area people right-click (or long-press, or Shift+F10 when focused). */\n children: ReactNode;\n /** The menu entries: id, label, icon, shortcut, tone, or { separator: true }. */\n items: MenuEntry[];\n /** Called with the id of the entry picked. */\n onAction?: (id: Key) => void;\n /** Name of the menu. Default \"Context menu\". */\n 'aria-label'?: string;\n /** Name of the area, so people know it has a menu (\"File preview\"). */\n areaLabel: string;\n /** Extra class names for the root element. */\n className?: string;\n /** How the popup enters and leaves: a preset (fade, scale, pop, slide-down, blur...), false for none, or options. */\n motion?: MotionProp;\n}\n\n/** A menu that opens where people right-click; Shift+F10 or the Menu key opens it from the keyboard. */\nexport function ContextMenu({ motion, children, items, onAction, className, areaLabel, 'aria-label': label }: ContextMenuProps) {\n const t = useStrings(); label ??= t.contextMenu;\n const [at, setAt] = useState<{ x: number; y: number } | null>(null);\n const area = useRef<HTMLDivElement>(null);\n const anchor = useRef<HTMLSpanElement>(null);\n const press = useRef<number | undefined>(undefined);\n const openAt = (x: number, y: number) => { const r = area.current!.getBoundingClientRect(); setAt({ x: x - r.left, y: y - r.top }); };\n return (\n <div ref={area} className={cx('alea-context-area', className)} tabIndex={0} role=\"group\" aria-label={`${areaLabel}, menu with Shift+F10`}\n onContextMenu={e => { e.preventDefault(); openAt(e.clientX, e.clientY); }}\n onKeyDown={e => { if ((e.shiftKey && e.key === 'F10') || e.key === 'ContextMenu') { e.preventDefault(); const r = area.current!.getBoundingClientRect(); openAt(r.left + 16, r.top + 16); } }}\n onTouchStart={e => { const t = e.touches[0]; press.current = window.setTimeout(() => openAt(t.clientX, t.clientY), 550); }}\n onTouchEnd={() => clearTimeout(press.current)} onTouchMove={() => clearTimeout(press.current)}>\n {children}\n <span ref={anchor} className=\"alea-context-anchor\" style={{ left: at?.x ?? 0, top: at?.y ?? 0 }} aria-hidden=\"true\" />\n <RACPopover triggerRef={anchor} isOpen={!!at} onOpenChange={o => { if (!o) { setAt(null); area.current?.focus(); } }} placement=\"bottom start\" offset={2} className=\"alea-popover alea-menu-popover\" style={withMotionStyle(undefined, motion)}>\n <RACMenu aria-label={label} autoFocus=\"first\" className=\"alea-menu\" onAction={k => { onAction?.(k); setAt(null); area.current?.focus(); }}>{entries(items)}</RACMenu>\n </RACPopover>\n </div>\n );\n}\n\n// ---------------------------------------------------------------- menubar\nexport interface MenubarProps {\n /** Name of the menu bar (\"Editor\"). */\n 'aria-label': string;\n /** The menus, left to right: a label and its items. */\n menus: Array<{ id: string; label: string; items: MenuEntry[] }>;\n /** Called with the menu id and the item id. */\n onAction?: (menu: string, item: Key) => void;\n /** Extra class names for the root element. */\n className?: string;\n /** How the popup enters and leaves: a preset (fade, scale, pop, slide-down, blur...), false for none, or options. */\n motion?: MotionProp;\n}\n\n/** A desktop-app menu bar (File, Edit, View): arrows move between menus, Enter or Down opens one (WAI-ARIA menubar). */\nexport function Menubar({ motion, menus, onAction, className, 'aria-label': label }: MenubarProps) {\n const [focus, setFocus] = useState(0);\n const [open, setOpen] = useState<number | null>(null);\n const btns = useRef<Array<HTMLButtonElement | null>>([]);\n const move = (i: number, keepOpen: boolean) => {\n const n = (i + menus.length) % menus.length;\n setFocus(n); btns.current[n]?.focus();\n setOpen(keepOpen ? n : null);\n };\n const onBarKey = (e: KeyboardEvent, i: number) => {\n const k = e.key;\n if (k === 'ArrowRight') move(i + 1, false);\n else if (k === 'ArrowLeft') move(i - 1, false);\n else if (k === 'Home') move(0, false);\n else if (k === 'End') move(menus.length - 1, false);\n else if (k === 'ArrowDown' || k === 'Enter' || k === ' ') setOpen(i);\n else return;\n e.preventDefault();\n };\n return (\n <div role=\"menubar\" aria-label={label} className={cx('alea-menubar', className)}>\n {menus.map((m, i) => (\n <span key={m.id} className=\"alea-menubar-slot\">\n <button ref={el => { btns.current[i] = el; }} type=\"button\" role=\"menuitem\" aria-haspopup=\"menu\" aria-expanded={open === i} tabIndex={focus === i ? 0 : -1}\n className=\"alea-menubar-item alea-focus-ring\" onClick={() => { setFocus(i); setOpen(open === i ? null : i); }}\n onMouseEnter={() => { if (open != null && open !== i) { setFocus(i); setOpen(i); } }} onKeyDown={e => onBarKey(e, i)}>{m.label}</button>\n <RACPopover triggerRef={{ current: btns.current[i] }} isOpen={open === i} onOpenChange={o => { if (!o) { setOpen(null); btns.current[i]?.focus(); } }} style={withMotionStyle(undefined, motion)} placement=\"bottom start\" offset={4} className=\"alea-popover alea-menu-popover\">\n <div onKeyDown={e => { if (e.key === 'ArrowRight') { e.preventDefault(); move(i + 1, true); } if (e.key === 'ArrowLeft') { e.preventDefault(); move(i - 1, true); } }}>\n <RACMenu aria-label={m.label} autoFocus=\"first\" className=\"alea-menu\" onAction={k => { onAction?.(m.id, k); setOpen(null); btns.current[i]?.focus(); }}>{entries(m.items)}</RACMenu>\n </div>\n </RACPopover>\n </span>\n ))}\n </div>\n );\n}\n\n// ---------------------------------------------------------------- hover card\nexport interface HoverCardProps {\n /** The link or element people hover or focus. */\n trigger: ReactNode;\n /** The card: a preview of a profile, a page, a definition. Keep it supplementary: the same information must be reachable another way. */\n children: ReactNode;\n /** ms before it opens. Default 500. */\n openDelay?: number;\n /** ms before it closes after the pointer leaves. Default 200. */\n closeDelay?: number;\n /** top, bottom (default), start or end. */\n placement?: 'top' | 'bottom' | 'start' | 'end';\n /** How the popup enters and leaves: a preset (fade, scale, pop, slide-down, blur...), false for none, or options. */\n motion?: MotionProp;\n}\n\n/** A rich preview on hover or keyboard focus, which people can move into. */\nexport function HoverCard({ motion, trigger, children, openDelay = 500, closeDelay = 200, placement = 'bottom' }: HoverCardProps) {\n const [open, setOpen] = useState(false);\n const ref = useRef<HTMLSpanElement>(null);\n const t = useRef<number | undefined>(undefined);\n const id = useId();\n const later = (v: boolean, ms: number) => { clearTimeout(t.current); t.current = window.setTimeout(() => setOpen(v), ms); };\n useEffect(() => () => clearTimeout(t.current), []);\n useEffect(() => {\n if (!open) return;\n const esc = (e: globalThis.KeyboardEvent) => { if (e.key === 'Escape') setOpen(false); };\n document.addEventListener('keydown', esc); return () => document.removeEventListener('keydown', esc);\n }, [open]);\n return (\n <>\n <span ref={ref} className=\"alea-hovercard-trigger\" aria-describedby={open ? id : undefined}\n onMouseEnter={() => later(true, openDelay)} onMouseLeave={() => later(false, closeDelay)}\n onFocus={() => later(true, openDelay)} onBlur={() => later(false, closeDelay)}>{trigger}</span>\n <RACPopover triggerRef={ref} isOpen={open} onOpenChange={setOpen} isNonModal placement={placement} offset={8} className=\"alea-popover alea-hovercard\" style={withMotionStyle(undefined, motion)}>\n <div id={id} role=\"tooltip\" onMouseEnter={() => clearTimeout(t.current)} onMouseLeave={() => later(false, closeDelay)}>{children}</div>\n </RACPopover>\n </>\n );\n}\n\n// ---------------------------------------------------------------- navigation menu\n/** A link in a NavigationMenu. */\nexport interface NavLinkItem { label: string; href: string; description?: string; icon?: ReactNode; badge?: ReactNode; isDisabled?: boolean }\n/** A group of links that opens: a panel (horizontal) or a nested list or flyout (vertical). Groups can nest in vertical menus. */\nexport interface NavGroupItem { label: string; items: NavItem[]; icon?: ReactNode; badge?: ReactNode; footer?: ReactNode }\n/** Anything in a NavigationMenu: a link, a group, a section title or a divider. */\nexport type NavItem = NavLinkItem | NavGroupItem | { section: string } | { divider: true };\n\nexport interface NavigationMenuProps {\n /** Name of the navigation. Default \"Main\". */\n 'aria-label'?: string;\n /** Links, groups (nested in vertical menus), section titles ({ section: 'Workspace' }) and dividers ({ divider: true }). */\n items: NavItem[];\n /** The href of the current page (gets aria-current; its groups open). */\n current?: string;\n /** horizontal (a header bar with dropdown panels, default) or vertical (a sidebar with nested groups). */\n orientation?: 'horizontal' | 'vertical';\n /** Vertical only: an icon rail; labels show as tooltips and groups open as flyouts to the side. */\n collapsed?: boolean;\n /** With collapsed: short labels under the icons (a navigation rail) instead of tooltips. */\n railLabels?: boolean;\n /** Vertical only: opening a group closes its open siblings. */\n accordion?: boolean;\n /** Vertical only: sm (32 px rows), md (36 px, default) or lg (44 px). */\n size?: 'sm' | 'md' | 'lg';\n /** Called when a link is chosen, with its href: use it for client side routing (call preventDefault on the event). */\n onNavigate?: (href: string, event: MouseEvent<HTMLAnchorElement>) => void;\n /** Extra class names for the root element. */\n className?: string;\n}\n\nconst isGroup = (i: NavItem): i is NavGroupItem => 'items' in i;\nconst isLink = (i: NavItem): i is NavLinkItem => 'href' in i;\nconst holds = (g: NavGroupItem, href?: string): boolean => !!href && g.items.some(i => (isLink(i) ? i.href === href : isGroup(i) ? holds(i, href) : false));\n\n/** The vertical menu: nested groups that open in place, or flyouts in the collapsed rail; arrow keys move between rows. */\nfunction VerticalNav({ items, current, collapsed, railLabels, accordion, size = 'md', onNavigate, className, label }: NavigationMenuProps & { label: string }) {\n const base = useId();\n const root = useRef<HTMLElement>(null);\n // groups that hold the current page start open\n const [open, setOpen] = useState<Set<string>>(() => {\n const out = new Set<string>();\n const walk = (list: NavItem[], path: string) => list.forEach(i => { if (isGroup(i) && holds(i, current)) { out.add(`${path}/${i.label}`); walk(i.items, `${path}/${i.label}`); } });\n if (!collapsed) walk(items, '');\n return out;\n });\n useEffect(() => { if (collapsed) setOpen(new Set()); }, [collapsed]);\n useEffect(() => {\n if (!collapsed || !open.size) return;\n const out = (e: PointerEvent) => { if (!root.current?.contains(e.target as Node)) setOpen(new Set()); };\n document.addEventListener('pointerdown', out); return () => document.removeEventListener('pointerdown', out);\n }, [collapsed, open]);\n const toggle = (path: string) => setOpen(prev => {\n const next = new Set(prev);\n if (next.has(path)) { [...next].forEach(p => { if (p === path || p.startsWith(path + '/')) next.delete(p); }); return next; }\n // accordion and the collapsed rail keep one branch open\n if (accordion || collapsed) [...next].forEach(p => { if (!path.startsWith(p + '/')) next.delete(p); });\n next.add(path);\n return next;\n });\n const rows = () => Array.from(root.current?.querySelectorAll<HTMLElement>('.alea-vnav-item') || []).filter(el => !el.closest('.alea-vnav-sub:not([data-open])') && !el.hasAttribute('aria-disabled'));\n const onKeyDown = (e: KeyboardEvent<HTMLElement>) => {\n const list = rows(), at = list.indexOf(document.activeElement as HTMLElement);\n const go = (i: number) => { e.preventDefault(); list[(i + list.length) % list.length]?.focus(); };\n if (e.key === 'ArrowDown') go(at + 1);\n else if (e.key === 'ArrowUp') go(at - 1);\n else if (e.key === 'Home') go(0);\n else if (e.key === 'End') go(list.length - 1);\n else if (e.key === 'ArrowRight' || e.key === 'ArrowLeft') {\n const el = document.activeElement as HTMLElement;\n const path = el?.dataset.path;\n if (e.key === 'ArrowRight' && path && el.getAttribute('aria-expanded') === 'false') { e.preventDefault(); toggle(path); }\n else if (e.key === 'ArrowLeft') {\n if (path && el.getAttribute('aria-expanded') === 'true') { e.preventDefault(); toggle(path); }\n else { const parent = el.closest('.alea-vnav-sub')?.previousElementSibling as HTMLElement | null; if (parent) { e.preventDefault(); parent.focus(); } }\n }\n } else if (e.key === 'Escape' && collapsed && open.size) { const first = [...open][0]; (root.current?.querySelector(`[data-path=\"${CSS.escape(first)}\"]`) as HTMLElement | null)?.focus(); setOpen(new Set()); }\n };\n const list = (entries: NavItem[], level: number, path: string): ReactNode => (\n <ul className=\"alea-vnav-list\" data-level={level}>\n {entries.map((it, i) => {\n if ('divider' in it) return <li key={`d${i}`} aria-hidden=\"true\" className=\"alea-vnav-divider\" />;\n if ('section' in it) return <li key={`s${i}`} className=\"alea-vnav-section\"><span>{it.section}</span></li>;\n const inner = (icon: ReactNode, text: string, badge: ReactNode, tail?: ReactNode) => (\n <>{icon ? <span className=\"alea-vnav-icon\" aria-hidden=\"true\">{icon}</span> : level === 0 && collapsed ? <span className=\"alea-vnav-icon alea-vnav-initial\" aria-hidden=\"true\">{text.slice(0, 1)}</span> : null}\n <span className=\"alea-vnav-label\">{text}</span>{badge != null && <span className=\"alea-vnav-badge\">{badge}</span>}{tail}</>\n );\n if (isGroup(it)) {\n const p = `${path}/${it.label}`, isOpen = open.has(p), id = `${base}${p.replace(/[^a-z0-9]/gi, '-')}`;\n return (\n <li key={p} className=\"alea-vnav-li\">\n <button type=\"button\" className=\"alea-vnav-item alea-focus-ring\" data-path={p} aria-expanded={isOpen} aria-controls={id} data-current={holds(it, current) || undefined}\n data-tip={collapsed && level === 0 ? it.label : undefined} style={{ ['--lvl' as string]: level }} onClick={() => toggle(p)}>\n {inner(it.icon, it.label, it.badge, <ChevronDown size={14} aria-hidden=\"true\" className=\"alea-vnav-chevron\" />)}\n </button>\n <div id={id} className=\"alea-vnav-sub\" data-open={isOpen || undefined} data-flyout={collapsed && level === 0 ? true : undefined}>\n <div className=\"alea-vnav-sub-inner\">\n {collapsed && level === 0 && <p className=\"alea-vnav-flyout-title\">{it.label}</p>}\n {list(it.items, collapsed && level === 0 ? 0 : level + 1, p)}\n {it.footer && <div className=\"alea-vnav-footer\">{it.footer}</div>}\n </div>\n </div>\n </li>\n );\n }\n const link = it as NavLinkItem;\n return (\n <li key={`${path}/${link.href}`} className=\"alea-vnav-li\">\n <a href={link.isDisabled ? undefined : link.href} className=\"alea-vnav-item alea-focus-ring\" aria-current={link.href === current ? 'page' : undefined} aria-disabled={link.isDisabled || undefined}\n tabIndex={link.isDisabled ? -1 : undefined} data-tip={collapsed && level === 0 ? link.label : undefined} style={{ ['--lvl' as string]: level }}\n onClick={e => { if (link.isDisabled) { e.preventDefault(); return; } onNavigate?.(link.href, e); if (collapsed) setOpen(new Set()); }}>\n {inner(link.icon, link.label, link.badge)}\n </a>\n </li>\n );\n })}\n </ul>\n );\n return (\n <nav ref={root} aria-label={label} className={cx('alea-vnav', className)} data-collapsed={collapsed || undefined} data-rail-labels={collapsed && railLabels ? true : undefined} data-size={size !== 'md' ? size : undefined} onKeyDown={onKeyDown}\n onBlur={e => { if (collapsed && !root.current?.contains(e.relatedTarget as Node)) setOpen(new Set()); }}>\n {list(items, 0, '')}\n </nav>\n );\n}\n\n/** A site header navigation with dropdown panels (mega menus), using the disclosure pattern: buttons open panels of links. */\nexport function NavigationMenu(props: NavigationMenuProps) {\n const t = useStrings();\n if (props.orientation === 'vertical') return <VerticalNav {...props} label={props['aria-label'] ?? t.mainNav} />;\n return <HorizontalNav {...props} />;\n}\n\nfunction HorizontalNav({ items: all, current, className, onNavigate, 'aria-label': label }: NavigationMenuProps) {\n const t = useStrings(); label ??= t.mainNav;\n // a header bar has no room for section titles or dividers\n const items = all.filter((i): i is NavLinkItem | NavGroupItem => isLink(i) || isGroup(i));\n const [open, setOpen] = useState<number | null>(null);\n const root = useRef<HTMLElement>(null);\n const btns = useRef<Array<HTMLButtonElement | null>>([]);\n const base = useId();\n useEffect(() => {\n if (open == null) return;\n const out = (e: PointerEvent) => { if (!root.current?.contains(e.target as Node)) setOpen(null); };\n document.addEventListener('pointerdown', out); return () => document.removeEventListener('pointerdown', out);\n }, [open]);\n return (\n <nav ref={root} aria-label={label} className={cx('alea-navmenu', className)}\n onKeyDown={e => { if (e.key === 'Escape' && open != null) { btns.current[open]?.focus(); setOpen(null); } }}\n onBlur={e => { if (!root.current?.contains(e.relatedTarget as Node)) setOpen(null); }}>\n <ul className=\"alea-navmenu-list\">\n {items.map((it, i) => (\n <li key={it.label} className=\"alea-navmenu-li\">\n {'items' in it ? (\n <>\n <button ref={el => { btns.current[i] = el; }} type=\"button\" className=\"alea-navmenu-item alea-focus-ring\" aria-expanded={open === i} aria-controls={`${base}-${i}`} onClick={() => setOpen(open === i ? null : i)}\n data-current={holds(it, current) || undefined}>\n {it.label}<ChevronDown size={14} aria-hidden=\"true\" className=\"alea-navmenu-chevron\" />\n </button>\n <div id={`${base}-${i}`} className=\"alea-navmenu-panel\" hidden={open !== i}>\n <ul className=\"alea-navmenu-links\" data-cols={it.items.length > 3 ? 2 : 1}>\n {it.items.filter(isLink).map(l => (\n <li key={l.href}><a href={l.href} className=\"alea-navmenu-link alea-focus-ring\" aria-current={l.href === current ? 'page' : undefined} onClick={e => onNavigate?.(l.href, e)}>\n {l.icon && <span className=\"alea-navmenu-icon\" aria-hidden=\"true\">{l.icon}</span>}\n <span><span className=\"alea-navmenu-title\">{l.label}</span>{l.description && <span className=\"alea-navmenu-desc\">{l.description}</span>}</span>\n </a></li>\n ))}\n </ul>\n {it.footer && <div className=\"alea-navmenu-footer\">{it.footer}</div>}\n </div>\n </>\n ) : (\n <a href={it.href} className=\"alea-navmenu-item alea-focus-ring\" aria-current={it.href === current ? 'page' : undefined} onClick={e => onNavigate?.(it.href, e)}>{it.label}</a>\n )}\n </li>\n ))}\n </ul>\n </nav>\n );\n}\n\n// ---------------------------------------------------------------- bottom navigation\nexport interface BottomNavigationProps {\n /** Name of the navigation. Default \"Main\". */\n 'aria-label'?: string;\n /** Three to five destinations: id, label, icon, and an href (links) or none (buttons with onChange). */\n items: Array<{ id: string; label: string; icon: ReactNode; href?: string; badge?: number }>;\n /** The current destination. */\n value: string;\n /** Called with the id of the destination picked. */\n onChange?: (id: string) => void;\n /** Stick to the bottom of the screen. Default true. */\n fixed?: boolean;\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** The tab bar of a mobile app: three to five destinations with icons and labels. */\nexport function BottomNavigation({ items, value, onChange, fixed = true, className, 'aria-label': label }: BottomNavigationProps) {\n const t = useStrings(); label ??= t.mainNav;\n return (\n <nav aria-label={label} className={cx('alea-bottomnav', className)} data-fixed={fixed || undefined}>\n <ul>\n {items.map(it => {\n const inner = <><span className=\"alea-bottomnav-icon\" aria-hidden=\"true\">{it.icon}{it.badge ? <span className=\"alea-bottomnav-badge\">{it.badge > 99 ? '99+' : it.badge}</span> : null}</span><span className=\"alea-bottomnav-label\">{it.label}</span>{it.badge ? <span className=\"alea-visually-hidden\">, {it.badge} new</span> : null}</>;\n const cur = it.id === value;\n return (\n <li key={it.id}>\n {it.href\n ? <a href={it.href} className=\"alea-bottomnav-item alea-focus-ring\" aria-current={cur ? 'page' : undefined} onClick={() => onChange?.(it.id)}>{inner}</a>\n : <button type=\"button\" className=\"alea-bottomnav-item alea-focus-ring\" aria-current={cur ? 'page' : undefined} onClick={() => onChange?.(it.id)}>{inner}</button>}\n </li>\n );\n })}\n </ul>\n </nav>\n );\n}\n\n// ---------------------------------------------------------------- burger\nexport interface BurgerProps {\n /** Whether the menu it controls is open. */\n isOpen: boolean;\n /** Called with the new open state. */\n onChange: (open: boolean) => void;\n /** The id of the menu it opens. */\n 'aria-controls'?: string;\n /** Name. Default \"Menu\". */\n 'aria-label'?: string;\n /** sm (32 px) or md (40 px, default). */\n size?: 'sm' | 'md';\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** The three-line menu button that morphs into a close icon. */\nexport function Burger({ isOpen, onChange, size = 'md', className, 'aria-controls': controls, 'aria-label': label }: BurgerProps) {\n const t = useStrings(); label ??= t.menu;\n return (\n <button type=\"button\" className={cx('alea-burger alea-focus-ring', className)} data-size={size} data-open={isOpen || undefined} aria-expanded={isOpen} aria-controls={controls} aria-label={label} onClick={() => onChange(!isOpen)}>\n <span aria-hidden=\"true\" /><span aria-hidden=\"true\" /><span aria-hidden=\"true\" />\n </button>\n );\n}\n"},{"path":"components/navigation/navigation.css","content":".alea-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--alea-space-1); margin: 0; padding: 0; list-style: none; font-size: var(--alea-font-size-sm); }\n.alea-crumb { display: inline-flex; align-items: center; gap: var(--alea-space-1); }\n.alea-crumb:not(:last-child)::after { content: var(--alea-crumb-sep, ''); color: var(--alea-text-faint); }\n.alea-breadcrumbs[data-separator='chevron'] .alea-crumb:not(:last-child)::after {\n content: ''; width: 16px; height: 16px; background: currentColor; color: var(--alea-text-faint);\n -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E\") center / contain no-repeat;\n mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E\") center / contain no-repeat;\n}\n.alea-crumb-link { color: var(--alea-text-muted); text-decoration: none; border-radius: var(--alea-radius-xs); padding: var(--alea-space-0-5) var(--alea-space-1); }\n.alea-crumb-link[data-hovered] { color: var(--alea-text); text-decoration: underline; text-underline-offset: 3px; }\n.alea-crumb-link[data-current] { color: var(--alea-text); font-weight: var(--alea-font-weight-medium); text-decoration: none; cursor: default; }\n\n.alea-pagination { display: flex; align-items: center; gap: var(--alea-space-1); }\n.alea-pagination ul { display: flex; align-items: center; gap: var(--alea-space-1); margin: 0; padding: 0; list-style: none; }\n.alea-page {\n display: inline-grid; place-items: center;\n min-width: 36px; height: 36px; padding: 0 var(--alea-space-3);\n border: 0; border-radius: var(--alea-radius-full);\n background: transparent; color: var(--alea-text-muted);\n font: var(--alea-font-weight-medium) var(--alea-font-size-md) / 1 var(--alea-font-family-body);\n font-variant-numeric: tabular-nums; cursor: pointer;\n transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard);\n}\n.alea-page:hover:not(:disabled) { background: var(--alea-surface-hover); color: var(--alea-text); }\n.alea-page[aria-current='page'] { background: var(--alea-chip-bg); color: var(--alea-chip-text); }\n.alea-page:disabled { opacity: 0.35; cursor: not-allowed; }\n.alea-page-gap { min-width: 24px; text-align: center; color: var(--alea-text-faint); }\n.alea-page-status { padding: 0 var(--alea-space-2); font-size: var(--alea-font-size-sm); color: var(--alea-text-muted); font-variant-numeric: tabular-nums; }\n\n.alea-steps { display: flex; gap: 0; margin: 0; padding: 0; list-style: none; }\n.alea-step { position: relative; display: flex; align-items: flex-start; min-width: 0; }\n.alea-step-button { display: flex; align-items: flex-start; gap: var(--alea-space-3); padding: var(--alea-space-1); border: 0; border-radius: var(--alea-radius-sm); background: none; color: inherit; font: inherit; text-align: left; min-width: 0; }\nbutton.alea-step-button { cursor: pointer; }\nbutton.alea-step-button:hover .alea-step-title { text-decoration: underline; text-underline-offset: 3px; }\n.alea-step-dot {\n display: grid; place-items: center; flex: none;\n width: 28px; height: 28px; border-radius: 50%;\n font: var(--alea-font-weight-semibold) var(--alea-font-size-xs) / 1 var(--alea-font-family-body);\n background: var(--alea-surface-raised); color: var(--alea-text-muted);\n box-shadow: inset 0 0 0 1px var(--alea-border-strong);\n}\n.alea-step[data-status='current'] .alea-step-dot { background: var(--alea-chip-bg); color: var(--alea-chip-text); box-shadow: 0 0 0 4px var(--alea-accent-subtle); }\n.alea-step[data-status='done'] .alea-step-dot { background: var(--alea-accent); color: var(--alea-accent-on); box-shadow: none; }\n.alea-step-text { display: flex; flex-direction: column; gap: var(--alea-space-0-5); min-width: 0; padding-top: var(--alea-space-1); }\n.alea-step-title { font: var(--alea-font-weight-semibold) var(--alea-font-size-md) / 1.3 var(--alea-font-family-body); }\n.alea-step[data-status='upcoming'] .alea-step-title { color: var(--alea-text-muted); }\n.alea-step-desc { font-size: var(--alea-font-size-xs); color: var(--alea-text-faint); }\n/* horizontal: dot, text, then the connector fills the space to the next step */\n.alea-steps[data-orientation='horizontal'] .alea-step:not(:last-child) { flex: 1 1 0; }\n.alea-steps[data-orientation='horizontal'] .alea-step:not(:last-child)::after { content: ''; flex: 1 1 auto; min-width: var(--alea-space-4); height: 2px; margin: calc(var(--alea-space-1) + var(--alea-space-3-5) - var(--alea-space-0-25)) var(--alea-space-3) 0 var(--alea-space-2); /* centered on the 28 px dot inside 4 px padding */ border-radius: var(--alea-radius-3xs); background: var(--alea-border-strong); transition: background-color var(--alea-motion-duration-slow) var(--alea-motion-ease-out); }\n.alea-steps[data-orientation='horizontal'] .alea-step[data-status='done']::after { background: var(--alea-accent); }\n.alea-steps[data-orientation='horizontal'] .alea-step-text { max-width: 220px; }\n/* vertical (and horizontal on phones when responsive): the connector runs down from the dot */\n.alea-steps[data-orientation='vertical'] { flex-direction: column; }\n.alea-steps[data-orientation='vertical'] .alea-step { padding-bottom: var(--alea-space-5); }\n.alea-steps[data-orientation='vertical'] .alea-step:not(:last-child)::after { content: ''; position: absolute; left: 17px; top: 36px; bottom: var(--alea-space-1); width: 2px; border-radius: var(--alea-radius-3xs); background: var(--alea-border-strong); }\n.alea-steps[data-orientation='vertical'] .alea-step[data-status='done']::after { background: var(--alea-accent); }\n@media (max-width: 640px) {\n .alea-steps[data-responsive][data-orientation='horizontal'] { flex-direction: column; }\n .alea-steps[data-responsive][data-orientation='horizontal'] .alea-step { flex: none; padding-bottom: var(--alea-space-5); }\n .alea-steps[data-responsive][data-orientation='horizontal'] .alea-step:last-child { padding-bottom: 0; }\n .alea-steps[data-responsive][data-orientation='horizontal'] .alea-step:not(:last-child)::after { position: absolute; left: 17px; top: 36px; bottom: var(--alea-space-1); width: 2px; height: auto; min-width: 0; margin: 0; }\n .alea-steps[data-responsive][data-orientation='horizontal'] .alea-step-text { max-width: none; }\n}\n\n/* Breadcrumbs: icon, more, size */\n.alea-crumb-icon { display: inline-flex; margin-right: var(--alea-space-1); vertical-align: -2px; }\n.alea-crumb-icon svg { width: 16px; height: 16px; }\n.alea-crumb-more { border: 0; background: none; font: inherit; cursor: pointer; letter-spacing: 0.1em; }\n.alea-breadcrumbs[data-size='sm'] { font-size: var(--alea-font-size-sm); }\n/* Pagination: sizes and the bar with total, page size and jump */\n.alea-pagination[data-size='sm'] .alea-page { min-width: 28px; height: 28px; font-size: var(--alea-font-size-sm); }\n.alea-pagination[data-size='lg'] .alea-page { min-width: 44px; height: 44px; }\n.alea-pagination-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--alea-space-3); }\n.alea-pagination-total { color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); font-variant-numeric: tabular-nums; }\n.alea-pagination-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--alea-space-3); }\n.alea-pagination-size, .alea-pagination-jump { display: inline-flex; align-items: center; gap: var(--alea-space-2); color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n.alea-pagination-input { width: 64px; height: 32px; padding: 0 var(--alea-space-2); border: 0; border-radius: var(--alea-radius-sm); background: var(--alea-field-bg); box-shadow: inset 0 0 0 1px var(--alea-border); color: var(--alea-text); font: inherit; font-variant-numeric: tabular-nums; }\n@media (max-width: 639px) { .alea-pagination-jump { display: none; } }\n/* phones: the current page and its neighbours, without the far pages and gaps */\n@media (max-width: 479px) { .alea-pagination :is([data-far], .alea-page-gap) { display: none; } .alea-pagination-controls { min-width: 0; } }\n/* Steps: errors, sizes, dots, labels below */\n.alea-step[data-status='error'] .alea-step-dot { background: var(--alea-status-danger-solid); color: var(--alea-status-danger-on-solid); box-shadow: none; }\n.alea-step[data-status='warning'] .alea-step-dot { background: var(--alea-status-warning-solid); color: var(--alea-status-warning-on-solid); box-shadow: none; font-weight: var(--alea-font-weight-semibold); }\n.alea-step[data-status='error'] .alea-step-title { color: var(--alea-status-danger); }\n.alea-step-optional { color: var(--alea-text-faint); font-weight: var(--alea-font-weight-regular); }\n.alea-steps[data-size='sm'] .alea-step-dot { width: 24px; height: 24px; font-size: var(--alea-font-size-xs); }\n.alea-steps[data-size='sm'] .alea-step-title { font-size: var(--alea-font-size-sm); }\n.alea-steps[data-variant='dots'] .alea-step-dot { width: 12px; height: 12px; }\n.alea-steps[data-variant='dots'] .alea-step-dot svg { display: none; }\n.alea-steps[data-variant='icons'] .alea-step-dot svg { width: 16px; height: 16px; }\n.alea-steps[data-orientation='horizontal'][data-label-placement='below'] .alea-step-button { flex-direction: column; align-items: center; text-align: center; }\n"},{"path":"components/navigation/navigation2.css","content":"/* ContextMenu, Menubar, HoverCard, NavigationMenu, BottomNavigation, Burger */\n.alea-context-area { position: relative; border-radius: var(--alea-radius-md); outline: none; }\n.alea-context-area:focus-visible { box-shadow: 0 0 0 2px var(--alea-focus); }\n.alea-context-anchor { position: absolute; width: 0; height: 0; pointer-events: none; }\n\n.alea-menubar { display: inline-flex; gap: var(--alea-space-0-5); padding: var(--alea-space-1); border-radius: var(--alea-radius-md); background: var(--alea-surface); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-menubar-item { height: 32px; padding: 0 var(--alea-space-3); border: 0; border-radius: calc(var(--alea-radius-md) - var(--alea-space-1)); background: none; color: var(--alea-text); font: var(--alea-font-weight-medium) var(--alea-font-size-sm) / 1 var(--alea-font-family-body); cursor: pointer; }\n.alea-menubar-item:hover, .alea-menubar-item[aria-expanded='true'] { background: var(--alea-surface-hover); }\n\n.alea-hovercard-trigger { display: inline; }\n.alea-hovercard { max-width: 320px; padding: var(--alea-space-4); }\n\n.alea-navmenu-list { display: flex; flex-wrap: wrap; gap: var(--alea-space-0-5); margin: 0; padding: 0; list-style: none; }\n.alea-navmenu-li { position: relative; }\n.alea-navmenu-item { display: inline-flex; align-items: center; gap: var(--alea-space-1); height: 36px; padding: 0 var(--alea-space-3); border: 0; border-radius: var(--alea-radius-full); background: none; color: var(--alea-text-muted); font: var(--alea-font-weight-medium) var(--alea-font-size-md) / 1 var(--alea-font-family-body); text-decoration: none; cursor: pointer; transition: color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-navmenu-item:hover, .alea-navmenu-item[aria-expanded='true'] { color: var(--alea-text); background: var(--alea-surface-hover); }\n.alea-navmenu-item[aria-current='page'], .alea-navmenu-item[data-current] { color: var(--alea-text); }\n.alea-navmenu-item[aria-current='page']::after, .alea-navmenu-item[data-current]::after { content: ''; position: absolute; left: var(--alea-space-4); right: var(--alea-space-4); bottom: var(--alea-space-0-5); height: 2px; border-radius: var(--alea-radius-3xs); background: var(--alea-gradient-accent-linear); }\n.alea-navmenu-item[aria-expanded='true'] .alea-navmenu-chevron { transform: rotate(180deg); }\n.alea-navmenu-panel { position: absolute; top: calc(100% + var(--alea-space-2)); left: 0; z-index: var(--alea-z-dropdown); min-width: 280px; padding: var(--alea-space-2); border-radius: var(--alea-radius-lg); background: var(--alea-surface-overlay); box-shadow: var(--alea-shadow-pop), inset 0 0 0 1px var(--alea-border); animation: alea-m-pop-in var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-navmenu-panel[hidden] { display: none; }\n.alea-navmenu-links { display: grid; gap: var(--alea-space-0-5); margin: 0; padding: 0; list-style: none; }\n.alea-navmenu-links[data-cols='2'] { grid-template-columns: repeat(2, minmax(220px, 1fr)); }\n.alea-navmenu-link { display: flex; gap: var(--alea-space-3); padding: var(--alea-space-3); border-radius: var(--alea-radius-md); color: var(--alea-text); text-decoration: none; }\n.alea-navmenu-link:hover { background: var(--alea-surface-hover); }\n.alea-navmenu-link[aria-current='page'] { background: var(--alea-accent-subtle); }\n.alea-navmenu-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--alea-radius-sm); background: var(--alea-surface-raised); color: var(--alea-icon-accent); }\n.alea-navmenu-icon svg { width: 16px; height: 16px; }\n.alea-navmenu-title { display: block; font-size: var(--alea-font-size-md); font-weight: var(--alea-font-weight-semibold); }\n.alea-navmenu-desc { display: block; margin-top: var(--alea-space-0-5); font-size: var(--alea-font-size-sm); color: var(--alea-text-muted); line-height: 1.4; }\n.alea-navmenu-footer { margin-top: var(--alea-space-2); padding: var(--alea-space-3); border-top: 1px solid var(--alea-border); font-size: var(--alea-font-size-sm); }\n@media (max-width: 640px) { .alea-navmenu-links[data-cols='2'] { grid-template-columns: 1fr; } .alea-navmenu-panel { min-width: min(280px, 90vw); } }\n\n.alea-bottomnav { background: color-mix(in oklab, var(--alea-surface) 88%, transparent); box-shadow: 0 -1px 0 var(--alea-border); padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(12px); }\n.alea-bottomnav[data-fixed] { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--alea-z-sticky); }\n.alea-bottomnav ul { display: flex; margin: 0 auto; padding: 0; max-width: 560px; list-style: none; }\n.alea-bottomnav li { flex: 1; }\n.alea-bottomnav-item { display: flex; flex-direction: column; align-items: center; gap: var(--alea-space-1); width: 100%; min-height: 56px; padding: var(--alea-space-2) var(--alea-space-1); border: 0; background: none; color: var(--alea-text-muted); font: var(--alea-font-weight-medium) var(--alea-font-size-2xs) / 1.2 var(--alea-font-family-body); text-decoration: none; cursor: pointer; }\n.alea-bottomnav-item[aria-current='page'] { color: var(--alea-accent-strong); }\n.alea-bottomnav-icon { position: relative; display: grid; place-items: center; width: 56px; height: 28px; border-radius: var(--alea-radius-full); transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-bottomnav-item[aria-current='page'] .alea-bottomnav-icon { background: var(--alea-accent-subtle); }\n.alea-bottomnav-icon svg { width: 20px; height: 20px; }\n.alea-bottomnav-badge { position: absolute; top: calc(var(--alea-space-0-5) * -1); right: var(--alea-space-3); min-width: 16px; height: 16px; padding: 0 var(--alea-space-1); border-radius: var(--alea-radius-field); background: var(--alea-status-danger-solid); color: var(--alea-status-danger-on-solid); font-size: 10px; font-weight: 600; line-height: 16px; }\n\n.alea-burger { --b: 18px; position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--alea-radius-full); background: none; color: var(--alea-text); cursor: pointer; }\n.alea-burger[data-size='sm'] { --b: 14px; width: 32px; height: 32px; }\n.alea-burger:hover { background: var(--alea-surface-hover); }\n.alea-burger span { position: absolute; left: calc(50% - var(--b) / 2); width: var(--b); height: 2px; border-radius: var(--alea-radius-3xs); background: currentColor; transition: transform var(--alea-motion-duration-base) var(--alea-motion-ease-out), opacity var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-burger span:nth-child(1) { transform: translateY(-6px); }\n.alea-burger span:nth-child(3) { transform: translateY(6px); }\n.alea-burger[data-open] span:nth-child(1) { transform: rotate(45deg); }\n.alea-burger[data-open] span:nth-child(2) { opacity: 0.01; transform: scaleX(0.2); }\n.alea-burger[data-open] span:nth-child(3) { transform: rotate(-45deg); }\n\n/* Navbar */\n.alea-navbar { z-index: var(--alea-z-sticky); background: color-mix(in srgb, var(--alea-bg) 82%, transparent); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--alea-border); }\n.alea-navbar[data-sticky] { position: sticky; top: 0; }\n.alea-navbar-inner { display: flex; align-items: center; gap: var(--alea-space-4); max-width: calc(var(--alea-breakpoint-xl) + 64px); margin: 0 auto; padding: var(--alea-space-3) clamp(var(--alea-space-4), 4vw, var(--alea-space-8)); min-height: 64px; }\n.alea-navbar-brand { display: flex; align-items: center; gap: var(--alea-space-3); flex: none; font: var(--alea-font-weight-semibold) var(--alea-font-size-lg) / 1 var(--alea-font-family-body); }\n.alea-navbar-brand a { color: inherit; text-decoration: none; }\n.alea-navbar-links { flex: 1; display: flex; justify-content: center; }\n.alea-navbar-actions { display: flex; align-items: center; gap: var(--alea-space-2); flex: none; }\n.alea-navbar-burger { display: none; margin-left: auto; }\n.alea-navbar-drawer ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--alea-space-0-5); }\n.alea-navbar-group { display: block; margin: var(--alea-space-4) 0 var(--alea-space-1); padding: 0 var(--alea-space-3); font: var(--alea-font-weight-semibold) var(--alea-font-size-2xs) / 1 var(--alea-font-family-body); letter-spacing: var(--alea-font-tracking-eyebrow); text-transform: uppercase; color: var(--alea-text-faint); }\n.alea-navbar-drawer-link { display: block; padding: var(--alea-space-3); border-radius: var(--alea-radius-sm); color: var(--alea-text); text-decoration: none; font-size: var(--alea-font-size-base); }\n.alea-navbar-drawer-link:hover { background: var(--alea-surface-hover); }\n.alea-navbar-drawer-link[aria-current='page'] { background: var(--alea-accent-subtle); color: var(--alea-accent-strong); }\n.alea-navbar-drawer-actions { display: flex; flex-wrap: wrap; gap: var(--alea-space-2); margin-top: var(--alea-space-6); padding-top: var(--alea-space-4); border-top: 1px solid var(--alea-border); }\n@media (max-width: 639.98px) { .alea-navbar[data-collapse='sm'] :is(.alea-navbar-links, .alea-navbar-actions) { display: none; } .alea-navbar[data-collapse='sm'] .alea-navbar-burger { display: block; } }\n@media (max-width: 767.98px) { .alea-navbar[data-collapse='md'] :is(.alea-navbar-links, .alea-navbar-actions) { display: none; } .alea-navbar[data-collapse='md'] .alea-navbar-burger { display: block; } }\n@media (max-width: 1023.98px) { .alea-navbar[data-collapse='lg'] :is(.alea-navbar-links, .alea-navbar-actions) { display: none; } .alea-navbar[data-collapse='lg'] .alea-navbar-burger { display: block; } }\n\n/* NavigationMenu, vertical: nested groups, a collapsed icon rail with flyouts */\n.alea-vnav { --vnav-row: 36px; --vnav-indent: var(--alea-space-3); position: relative; width: 100%; min-width: 0; font-size: var(--alea-font-size-md); }\n.alea-vnav[data-size='sm'] { --vnav-row: 32px; font-size: var(--alea-font-size-sm); }\n.alea-vnav[data-size='lg'] { --vnav-row: 44px; font-size: var(--alea-font-size-base); }\n.alea-vnav-list { display: flex; flex-direction: column; gap: var(--alea-space-0-5); margin: 0; padding: 0; list-style: none; }\n.alea-vnav-li { position: relative; min-width: 0; }\n.alea-vnav-item {\n position: relative; display: flex; align-items: center; gap: var(--alea-space-3); width: 100%; min-height: var(--vnav-row);\n padding: 0 var(--alea-space-3) 0 calc(var(--alea-space-3) + var(--lvl, 0) * (var(--vnav-indent) + var(--alea-space-4)));\n border: 0; border-radius: var(--alea-radius-sm); background: none; color: var(--alea-text-muted);\n font-family: var(--alea-font-family-body); font-size: inherit; font-weight: var(--alea-font-weight-medium); line-height: 1.3; text-align: start; text-decoration: none; cursor: pointer;\n transition: color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard);\n}\n.alea-vnav-item:hover { color: var(--alea-text); background: var(--alea-surface-hover); }\n.alea-vnav-item[aria-current='page'] { color: var(--alea-text); background: var(--alea-accent-subtle); }\n.alea-vnav-item[aria-current='page']::before { content: ''; position: absolute; left: 0; top: var(--alea-space-2); bottom: var(--alea-space-2); width: 4px; border-radius: var(--alea-radius-2xs); background: var(--alea-gradient-accent-linear, var(--alea-accent)); }\n.alea-vnav-item[data-current] { color: var(--alea-text); }\n.alea-vnav-item[aria-disabled] { opacity: 0.45; cursor: not-allowed; }\n.alea-vnav-icon { display: grid; place-items: center; flex: none; width: 16px; height: 16px; }\n.alea-vnav-icon svg { width: 16px; height: 16px; }\n.alea-vnav[data-size='lg'] .alea-vnav-icon, .alea-vnav[data-size='lg'] .alea-vnav-icon svg { width: 20px; height: 20px; }\n.alea-vnav-initial { font-size: var(--alea-font-size-xs); font-weight: var(--alea-font-weight-semibold); }\n.alea-vnav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.alea-vnav-badge { flex: none; min-width: 20px; padding: var(--alea-space-0-5) var(--alea-space-2); border-radius: var(--alea-radius-full); background: var(--alea-surface-raised); color: var(--alea-text-muted); font: var(--alea-font-weight-semibold) var(--alea-font-size-2xs) / 1.3 var(--alea-font-family-body); text-align: center; font-variant-numeric: tabular-nums; }\n.alea-vnav-chevron { flex: none; color: var(--alea-icon-faint); transition: transform var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-vnav-item[aria-expanded='true'] .alea-vnav-chevron { transform: rotate(180deg); }\n.alea-vnav-section { padding: var(--alea-space-4) var(--alea-space-3) var(--alea-space-1); color: var(--alea-text-faint); font: var(--alea-font-weight-semibold) var(--alea-font-size-2xs) / 1.2 var(--alea-font-family-body); letter-spacing: var(--alea-font-tracking-eyebrow, 0.08em); text-transform: uppercase; }\n.alea-vnav-section:first-child { padding-top: var(--alea-space-1); }\n.alea-vnav-divider { height: 1px; margin: var(--alea-space-2) var(--alea-space-3); background: var(--alea-border); }\n.alea-vnav-footer { padding: var(--alea-space-2) var(--alea-space-3); font-size: var(--alea-font-size-sm); }\n/* groups open in place: the height grows from 0 */\n.alea-vnav-sub { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows var(--alea-motion-duration-base) var(--alea-motion-ease-out), visibility 0s linear var(--alea-motion-duration-base); }\n.alea-vnav-sub[data-open] { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows var(--alea-motion-duration-base) var(--alea-motion-ease-out), visibility 0s; }\n.alea-vnav-sub-inner { min-height: 0; overflow: hidden; }\n.alea-vnav-sub[data-open] > .alea-vnav-sub-inner > .alea-vnav-list { padding-top: var(--alea-space-0-5); }\n.alea-vnav-sub[data-open] .alea-vnav-li { animation: alea-item-drop var(--alea-motion-duration-base) var(--alea-motion-ease-out) both; }\n\n/* collapsed: an icon rail, labels as tooltips, groups as flyouts */\n.alea-vnav[data-collapsed] { width: 56px; }\n.alea-vnav[data-collapsed] > .alea-vnav-list > .alea-vnav-li > .alea-vnav-item { justify-content: center; width: 40px; min-height: 40px; margin: 0 auto; padding: 0; }\n.alea-vnav[data-collapsed] > .alea-vnav-list > .alea-vnav-li > .alea-vnav-item :is(.alea-vnav-label, .alea-vnav-chevron) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n.alea-vnav[data-collapsed] > .alea-vnav-list > .alea-vnav-li > .alea-vnav-item .alea-vnav-badge { position: absolute; top: var(--alea-space-0-5); right: 0; min-width: 16px; padding: var(--alea-space-0-25) var(--alea-space-1); background: var(--alea-accent); color: var(--alea-accent-on); }\n.alea-vnav[data-collapsed] > .alea-vnav-list > .alea-vnav-section { height: 1px; margin: var(--alea-space-2) var(--alea-space-3); padding: 0; overflow: hidden; color: transparent; background: var(--alea-border); }\n.alea-vnav[data-collapsed] .alea-vnav-item[data-tip]:is(:hover, :focus-visible)::after {\n content: attr(data-tip); position: absolute; left: calc(100% + var(--alea-space-3)); top: 50%; translate: 0 -50%; z-index: var(--alea-z-tooltip, 60);\n padding: var(--alea-space-2) var(--alea-space-3); border-radius: var(--alea-radius-sm); background: var(--alea-surface-overlay); box-shadow: var(--alea-shadow-pop), inset 0 0 0 1px var(--alea-border);\n color: var(--alea-text); font-size: var(--alea-font-size-sm); white-space: nowrap; pointer-events: none; animation: alea-m-fade-in var(--alea-motion-duration-fast) var(--alea-motion-ease-out);\n}\n.alea-vnav[data-collapsed] .alea-vnav-item[aria-expanded='true']::after { display: none; }\n.alea-vnav-sub[data-flyout] { position: absolute; left: calc(100% + var(--alea-space-2)); top: 0; z-index: var(--alea-z-dropdown); display: block; min-width: 220px; padding: var(--alea-space-2); border-radius: var(--alea-radius-lg); background: var(--alea-surface-overlay); box-shadow: var(--alea-shadow-pop), inset 0 0 0 1px var(--alea-border); }\n.alea-vnav-sub[data-flyout]:not([data-open]) { display: none; }\n.alea-vnav-sub[data-flyout][data-open] { animation: alea-m-pop-in var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-vnav-flyout-title { margin: 0; padding: var(--alea-space-1) var(--alea-space-3) var(--alea-space-2); color: var(--alea-text-faint); font: var(--alea-font-weight-semibold) var(--alea-font-size-2xs) / 1.2 var(--alea-font-family-body); letter-spacing: 0.08em; text-transform: uppercase; }\n@media (pointer: coarse) { .alea-vnav { --vnav-row: 44px; } }\n@media (prefers-reduced-motion: reduce) { .alea-vnav-sub, .alea-vnav-sub[data-open] { transition: none; } .alea-vnav-sub[data-open] .alea-vnav-li { animation: none; } }\n\n/* navigation rail: labels under the icons */\n.alea-vnav[data-rail-labels] { width: 80px; }\n.alea-vnav[data-rail-labels] > .alea-vnav-list > .alea-vnav-li > .alea-vnav-item { flex-direction: column; gap: var(--alea-space-1); width: 64px; min-height: 56px; padding: var(--alea-space-2) 0; }\n.alea-vnav[data-rail-labels] > .alea-vnav-list > .alea-vnav-li > .alea-vnav-item .alea-vnav-label { position: static; width: auto; height: auto; overflow: hidden; clip-path: none; max-width: 64px; font-size: var(--alea-font-size-2xs); text-align: center; }\n.alea-vnav[data-rail-labels] > .alea-vnav-list > .alea-vnav-li > .alea-vnav-item .alea-vnav-icon { width: 24px; height: 24px; display: grid; place-items: center; }\n.alea-vnav[data-rail-labels] .alea-vnav-item[data-tip]::after { display: none; }\n.alea-vnav[data-rail-labels] > .alea-vnav-list > .alea-vnav-li > .alea-vnav-item[aria-current='page'] { background: none; }\n.alea-vnav[data-rail-labels] > .alea-vnav-list > .alea-vnav-li > .alea-vnav-item[aria-current='page'] .alea-vnav-icon { width: 56px; border-radius: var(--alea-radius-xl); background: var(--alea-accent-subtle); }\n.alea-vnav[data-rail-labels] > .alea-vnav-list > .alea-vnav-li > .alea-vnav-item[aria-current='page']::before { display: none; }\n"}],"deps":["overlay","menu"],"npm":["react-aria-components","lucide-react","@alea-design/motion"],"exports":["Navbar","Breadcrumbs","Breadcrumb","Pagination","Steps","ContextMenu","Menubar","HoverCard","NavigationMenu","BottomNavigation","Burger"],"descriptions":{"Navbar":"A site header: brand, links with optional mega menus, actions; on small screens the links move into a drawer.","Breadcrumbs":"Where the page sits: a trail of links, the last one is the current page. Long trails fold their middle into a menu.","Breadcrumb":"One step of the trail.","Pagination":"Move through pages of results. The current page is marked for screen readers.","Steps":"Progress through a known sequence: done, current and upcoming steps.","ContextMenu":"A menu that opens where people right-click; Shift+F10 or the Menu key opens it from the keyboard.","Menubar":"A desktop-app menu bar (File, Edit, View): arrows move between menus, Enter or Down opens one (WAI-ARIA menubar).","HoverCard":"A rich preview on hover or keyboard focus, which people can move into.","NavigationMenu":"A site header navigation with dropdown panels (mega menus), using the disclosure pattern: buttons open panels of links.","BottomNavigation":"The tab bar of a mobile app: three to five destinations with icons and labels.","Burger":"The three-line menu button that morphs into a close icon."}},"overlay":{"files":[{"path":"components/overlay/Drawer.tsx","content":"import type { ReactNode } from 'react';\nimport { DialogTrigger, Modal, ModalOverlay, type ModalOverlayProps } from 'react-aria-components';\nimport { withMotionStyle, type MotionProp } from '@alea-design/motion';\nimport { withBase } from '../../utils/cx';\nimport { Button } from '../button/Button';\nimport { Dialog, Popover, PopoverDialog, type DialogProps, type PopoverProps } from './Overlay';\nimport { useStrings } from '../../i18n/strings';\n\nexport interface DrawerProps extends Omit<ModalOverlayProps, 'children'> {\n children: ReactNode;\n /** Side it slides in from. Default end (right in left-to-right). */\n placement?: 'start' | 'end' | 'bottom';\n /** Width (start/end) or height (bottom). Default 420 px. */\n size?: number | string;\n /** How it enters and leaves (default: from its edge): a preset, false, or options. */\n motion?: MotionProp;\n}\n\n/** A panel that slides in from the side: filters, details, navigation on mobile. Focus is trapped, Escape closes. */\nexport function Drawer({ children, placement = 'end', size = 420, className, isDismissable = true, motion, ...props }: DrawerProps) {\n return (\n <ModalOverlay {...props} isDismissable={isDismissable} className={withBase('alea-modal-overlay alea-drawer-overlay', className as any)} data-placement={placement}>\n <Modal className=\"alea-drawer\" data-placement={placement} style={withMotionStyle({ ['--alea-drawer-size' as any]: typeof size === 'number' ? `${size}px` : size }, motion)}>{children}</Modal>\n </ModalOverlay>\n );\n}\n\n/** The content of a Drawer: title, body and footer, like Dialog. */\nexport function DrawerContent(props: DialogProps) {\n return <Dialog {...props} className=\"alea-drawer-content\" />;\n}\n\nexport { DialogTrigger as DrawerTrigger };\n\nexport interface PopconfirmProps {\n /** The button that asks. */\n children: ReactNode;\n /** The question. */\n title: ReactNode;\n /** More context under the question. */\n description?: ReactNode;\n /** Default \"Yes\". */\n confirmLabel?: ReactNode;\n /** Default \"Cancel\". */\n cancelLabel?: ReactNode;\n /** danger turns the confirm button red. */\n tone?: 'default' | 'danger';\n /** Called when the person confirms. */\n onConfirm: () => unknown;\n /** Where it opens relative to its trigger. */\n placement?: PopoverProps['placement'];\n /** How the popup enters and leaves: a preset (fade, scale, pop, slide-down, blur...), false for none, or options. */\n motion?: MotionProp;\n}\n\n/** A small confirm next to its trigger, for quick, reversible-ish actions. */\nexport function Popconfirm({ motion, children, title, description, confirmLabel, cancelLabel, tone = 'default', onConfirm, placement = 'top' }: PopconfirmProps) {\n const t = useStrings(); confirmLabel ??= t.yes; cancelLabel ??= t.cancel;\n return (\n <DialogTrigger>\n {children}\n <Popover showArrow placement={placement} motion={motion}>\n <PopoverDialog role=\"alertdialog\" title={title} className=\"alea-popover-dialog alea-popconfirm\">\n {({ close }) => (\n <>\n {description && <p className=\"alea-popconfirm-text\">{description}</p>}\n <div className=\"alea-popconfirm-actions\">\n <Button size=\"sm\" variant=\"ghost\" onPress={close}>{cancelLabel}</Button>\n <Button size=\"sm\" variant={tone === 'danger' ? 'danger' : 'primary'} autoFocus onPress={async () => { await onConfirm(); close(); }}>{confirmLabel}</Button>\n </div>\n </>\n )}\n </PopoverDialog>\n </Popover>\n </DialogTrigger>\n );\n}\n"},{"path":"components/overlay/Modal.tsx","content":"import type { ReactNode } from 'react';\nimport { Dialog as RACDialog, DialogTrigger, Heading as RACHeading, Modal as RACModal, ModalOverlay, type ModalOverlayProps } from 'react-aria-components';\nimport { X } from 'lucide-react';\nimport { withMotionStyle, type MotionProp } from '@alea-design/motion';\nimport { cx } from '../../utils/cx';\nimport { IconButton } from '../button/Button';\nimport { useStrings } from '../../i18n/strings';\n\ntype Render = ReactNode | ((opts: { close: () => void }) => ReactNode);\nconst run = (r: Render, close: () => void) => (typeof r === 'function' ? r({ close }) : r);\n\nexport interface ModalProps extends Omit<ModalOverlayProps, 'children' | 'className' | 'style'> {\n /** Anything: a form, a gallery, a video, a wizard, a whole page. A function gets close. */\n children: Render;\n /** The button (or any pressable) that opens it. Leave it out and control isOpen yourself. */\n trigger?: ReactNode;\n /** A title in the header, read when it opens. Without one, give the modal an aria-label. */\n title?: ReactNode;\n /** Name for screen readers when there is no title. */\n 'aria-label'?: string;\n /** Your own header instead of the title row (it still gets the close button). */\n header?: ReactNode;\n /** Content pinned at the bottom: actions, a summary. A function gets close. */\n footer?: Render;\n /** xs 320, sm 400, md 560 (default), lg 760, xl 960, full (the whole window less a margin), or auto (as wide as its content). */\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full' | 'auto';\n /** center (default) or top (stays put while its content grows, good for search and long forms). */\n placement?: 'center' | 'top';\n /** inside: the header and footer stay, the body scrolls (default). outside: the whole modal scrolls with the page, for long reading. */\n scrollBehavior?: 'inside' | 'outside';\n /** normal (default) or none, for media that should touch the edges (an image, a video, a map). */\n padding?: 'normal' | 'none';\n /** What is behind it: dim (default), blur (dim and blur) or transparent (only for modals that already stand out). */\n backdrop?: 'dim' | 'blur' | 'transparent';\n /** Shows the close button. Default true. */\n showClose?: boolean;\n /** Takes the whole screen below this breakpoint (phones): sm (640 px) or md (768 px). */\n fullscreenBelow?: 'sm' | 'md';\n /** How it enters and leaves (default rise): a preset, false, or options. */\n motion?: MotionProp;\n /** Extra class names for the modal surface. */\n className?: string;\n}\n\n/** A modal with any content: a header and footer if you want them, seven sizes, centered or at the top, the body or the whole modal scrolling, edge-to-edge media, three backdrops. Traps focus, closes on Escape and outside click, and returns focus to what opened it. For a title, text and two buttons, Dialog is quicker; to confirm something destructive, AlertDialog. */\nexport function Modal({ children, trigger, title, 'aria-label': label, header, footer, size = 'md', placement = 'center', scrollBehavior = 'inside', padding = 'normal', backdrop = 'dim', showClose = true, fullscreenBelow, motion, className, isDismissable = true, isOpen, defaultOpen, onOpenChange, ...props }: ModalProps) {\n const t = useStrings();\n const modal = (\n <ModalOverlay {...props} {...(trigger ? {} : { isOpen, defaultOpen, onOpenChange })} isDismissable={isDismissable} className=\"alea-modal-overlay alea-xmodal-overlay\" data-placement={placement} data-scroll={scrollBehavior} data-backdrop={backdrop} data-fullscreen-below={fullscreenBelow}>\n <RACModal className=\"alea-modal alea-xmodal\" data-size={size} data-scroll={scrollBehavior} data-fullscreen-below={fullscreenBelow} style={withMotionStyle(undefined, motion)}>\n <RACDialog aria-label={title ? undefined : label} className={cx('alea-xmodal-dialog', className)} data-padding={padding}>\n {({ close }) => (\n <>\n {(header || title) ? (\n <div className=\"alea-xmodal-head\">\n {header ?? <RACHeading slot=\"title\" className=\"alea-dialog-title\">{title}</RACHeading>}\n {showClose && <IconButton aria-label={t.close} size=\"sm\" variant=\"ghost\" onPress={close} className=\"alea-dialog-x\"><X /></IconButton>}\n </div>\n ) : showClose && <IconButton aria-label={t.close} size=\"sm\" variant=\"ghost\" onPress={close} className=\"alea-xmodal-x\"><X /></IconButton>}\n <div className=\"alea-xmodal-body\">{run(children, close)}</div>\n {footer && <div className=\"alea-xmodal-footer\">{run(footer, close)}</div>}\n </>\n )}\n </RACDialog>\n </RACModal>\n </ModalOverlay>\n );\n return trigger ? <DialogTrigger isOpen={isOpen} defaultOpen={defaultOpen} onOpenChange={onOpenChange}>{trigger}{modal}</DialogTrigger> : modal;\n}\n"},{"path":"components/overlay/Overlay.tsx","content":"import type { ReactNode } from 'react';\nimport {\n Popover as RACPopover, OverlayArrow, Dialog as RACDialog, DialogTrigger, Modal, ModalOverlay, Heading as RACHeading, Button as RACButton,\n Tooltip as RACTooltip, TooltipTrigger as RACTooltipTrigger,\n type PopoverProps as RACPopoverProps, type TooltipProps as RACTooltipProps, type TooltipTriggerComponentProps, type DialogProps as RACDialogProps, type ModalOverlayProps,\n} from 'react-aria-components';\nimport { X } from 'lucide-react';\nimport { withMotionStyle, type MotionProp } from '@alea-design/motion';\nimport { cx, withBase } from '../../utils/cx';\nimport { Button, IconButton } from '../button/Button';\nimport { useStrings } from '../../i18n/strings';\n\nexport { DialogTrigger };\n\nexport interface PopoverProps extends Omit<RACPopoverProps, 'children'> {\n children: ReactNode;\n /** Shows the little arrow pointing at the trigger. */\n showArrow?: boolean;\n /** How it enters and leaves: a preset (fade, scale, pop, rise, slide-up, blur...), false for none, or { enter, exit, duration, easing, delay }. */\n motion?: MotionProp;\n /** Width: sm (240 px), md (320 px) or lg (420 px). Default: as wide as its content. */\n size?: 'sm' | 'md' | 'lg';\n}\n\n/** A floating panel attached to a trigger; closes on Escape or outside click. Three widths, an optional arrow. */\nexport function Popover({ children, showArrow, className, offset = 8, motion, style, size, ...props }: PopoverProps) {\n return (\n <RACPopover {...props} offset={showArrow ? 12 : offset} data-size={size} className={withBase('alea-popover', className as any)} style={withMotionStyle(style, motion)}>\n {showArrow && <OverlayArrow className=\"alea-arrow\"><svg width={12} height={12} viewBox=\"0 0 12 12\"><path d=\"M0 0 L6 6 L12 0\" /></svg></OverlayArrow>}\n {children}\n </RACPopover>\n );\n}\n\nexport interface PopoverDialogProps extends RACDialogProps {\n /** Optional title at the top. */\n title?: ReactNode;\n /** A line under the title. */\n description?: ReactNode;\n /** Buttons at the bottom, e.g. Cancel and Apply. A function gets close. */\n footer?: ReactNode | ((close: () => void) => ReactNode);\n /** Adds a close button in the corner (Escape and an outside click close it anyway). */\n showClose?: boolean;\n}\n\n/** The content of a Popover that holds interactive things (forms, filters, settings): a title, a description, a footer and a close button. */\nexport function PopoverDialog({ title, description, footer, showClose, children, className, ...props }: PopoverDialogProps) {\n const t = useStrings();\n return (\n <RACDialog {...props} className={cx('alea-popover-dialog', className as string)}>\n {(state) => (\n <>\n {(title || showClose) && (\n <div className=\"alea-popover-head\">\n {title && <RACHeading slot=\"title\" className=\"alea-popover-title\">{title}</RACHeading>}\n {showClose && <RACButton className=\"alea-popover-close alea-focus-ring\" aria-label={t.close} onPress={state.close}><X size={16} aria-hidden=\"true\" /></RACButton>}\n </div>\n )}\n {description && <p className=\"alea-popover-desc\">{description}</p>}\n {typeof children === 'function' ? children(state) : children}\n {footer && <div className=\"alea-popover-footer\">{typeof footer === 'function' ? footer(state.close) : footer}</div>}\n </>\n )}\n </RACDialog>\n );\n}\n\nexport interface TooltipProps extends Omit<RACTooltipProps, 'children'> {\n children: ReactNode;\n /** A bold first line: a rich tooltip with a title and a sentence. Keep it non-interactive; for links use Toggletip. */\n title?: ReactNode;\n /** A keyboard shortcut shown at the end, like ⌘K. */\n shortcut?: ReactNode;\n /** Hides the arrow. */\n hideArrow?: boolean;\n /** How it enters and leaves: a preset (fade, scale, pop, rise, slide-up, blur...), false for none, or { enter, exit, duration, easing, delay }. */\n motion?: MotionProp;\n}\n\n/** A short hint on hover or keyboard focus, with an optional title and shortcut. Not for anything the user must read to act. */\nexport function Tooltip({ children, title, shortcut, hideArrow, className, offset = 8, motion, style, ...props }: TooltipProps) {\n return (\n <RACTooltip {...props} offset={offset} className={withBase('alea-tooltip', className as any)} data-rich={title ? true : undefined} style={withMotionStyle(style, motion)}>\n {!hideArrow && <OverlayArrow className=\"alea-arrow alea-tooltip-arrow\"><svg width={8} height={8} viewBox=\"0 0 8 8\"><path d=\"M0 0 L4 4 L8 0\" /></svg></OverlayArrow>}\n {title && <span className=\"alea-tooltip-title\">{title}</span>}\n <span className=\"alea-tooltip-text\">{children}{shortcut && <kbd className=\"alea-tooltip-kbd\">{shortcut}</kbd>}</span>\n </RACTooltip>\n );\n}\n\nexport interface TooltipTriggerProps extends TooltipTriggerComponentProps {}\n/** Wraps a focusable trigger and its Tooltip. Default delay 600 ms, 0 when moving between tooltips. */\nexport function TooltipTrigger({ delay = 600, closeDelay = 200, ...props }: TooltipTriggerProps) {\n return <RACTooltipTrigger {...props} delay={delay} closeDelay={closeDelay} />;\n}\n\nexport interface DialogProps extends Omit<RACDialogProps, 'children'> {\n /** The title (required for screen readers unless aria-label is set). */\n title?: ReactNode;\n /** Text under the title. */\n description?: ReactNode;\n children?: ReactNode | ((opts: { close: () => void }) => ReactNode);\n /** Buttons at the bottom, e.g. Cancel and Save. Receives close. */\n footer?: ReactNode | ((opts: { close: () => void }) => ReactNode);\n /** Hides the X button. */\n hideClose?: boolean;\n}\n\n/** The dialog content: title, text, body and footer. Put it inside DialogModal. */\nexport function Dialog({ title, description, children, footer, hideClose, className, ...props }: DialogProps) {\n const t = useStrings();\n return (\n <RACDialog {...props} className={cx('alea-dialog', className as string)}>\n {({ close }) => (\n <>\n {(title || !hideClose) && (\n <div className=\"alea-dialog-head\">\n {title && <RACHeading slot=\"title\" className=\"alea-dialog-title\">{title}</RACHeading>}\n {!hideClose && <IconButton aria-label={t.close} size=\"sm\" variant=\"ghost\" onPress={close} className=\"alea-dialog-x\"><X /></IconButton>}\n </div>\n )}\n {description && <p className=\"alea-dialog-description\">{description}</p>}\n {children && <div className=\"alea-dialog-body\">{typeof children === 'function' ? children({ close }) : children}</div>}\n {footer && <div className=\"alea-dialog-footer\">{typeof footer === 'function' ? footer({ close }) : footer}</div>}\n </>\n )}\n </RACDialog>\n );\n}\n\nexport interface DialogModalProps extends Omit<ModalOverlayProps, 'children'> {\n children: ReactNode;\n /** sm 400, md 520, lg 720, full. */\n size?: 'sm' | 'md' | 'lg' | 'full';\n /** Takes the whole screen below this breakpoint (phones): sm (640 px) or md (768 px). */\n fullscreenBelow?: 'sm' | 'md';\n /** How the dialog enters and leaves (default rise): a preset, false, or options. */\n motion?: MotionProp;\n}\n\n/** The modal layer: dims the page, traps focus, closes on Escape (and outside click when isDismissable). Four sizes, full screen on phones when you want. */\nexport function DialogModal({ children, size = 'md', fullscreenBelow, className, isDismissable = true, motion, ...props }: DialogModalProps) {\n return (\n <ModalOverlay {...props} isDismissable={isDismissable} className={withBase('alea-modal-overlay', className as any)} data-fullscreen-below={fullscreenBelow}>\n <Modal className=\"alea-modal\" data-size={size} data-fullscreen-below={fullscreenBelow} style={withMotionStyle(undefined, motion)}>{children}</Modal>\n </ModalOverlay>\n );\n}\n\nexport interface AlertDialogProps {\n /** The question, e.g. \"Delete this file?\". */\n title: ReactNode;\n children?: ReactNode;\n /** The confirm button text. */\n confirmLabel?: ReactNode;\n /** The cancel button text. Default \"Cancel\". */\n cancelLabel?: ReactNode;\n /** danger turns the confirm button red. */\n tone?: 'default' | 'danger';\n /** Runs on confirm; the dialog closes after it (awaits a promise). */\n onConfirm?: () => unknown;\n /** Open state (controlled). */\n isOpen?: boolean;\n /** Open on first render (uncontrolled). */\n defaultOpen?: boolean;\n /** Called when it opens or closes. */\n onOpenChange?: (open: boolean) => void;\n /** How the dialog enters and leaves (default rise). */\n motion?: MotionProp;\n}\n\n/** A confirm dialog (role alertdialog): Escape and outside click don't dismiss it by accident. */\nexport function AlertDialog({ motion, title, children, confirmLabel, cancelLabel, tone = 'default', onConfirm, isOpen, defaultOpen, onOpenChange }: AlertDialogProps) {\n const t = useStrings(); confirmLabel ??= t.confirm; cancelLabel ??= t.cancel;\n return (\n <DialogModal isOpen={isOpen} defaultOpen={defaultOpen} onOpenChange={onOpenChange} isDismissable={false} size=\"sm\" motion={motion}>\n <Dialog role=\"alertdialog\" title={title} hideClose footer={({ close }) => (\n <>\n <Button variant=\"ghost\" onPress={close}>{cancelLabel}</Button>\n <Button variant={tone === 'danger' ? 'danger' : 'primary'} autoFocus onPress={async () => { await onConfirm?.(); close(); }}>{confirmLabel}</Button>\n </>\n )}>{children}</Dialog>\n </DialogModal>\n );\n}\n"},{"path":"components/overlay/Sheet.tsx","content":"import { useContext, type ReactNode } from 'react';\nimport { SheetTrigger as RACSheetTrigger, SheetOverlay, Sheet as RACSheet, SheetBackdrop, SheetContent, Heading, Button as RACButton, OverlayTriggerStateContext, type SheetTriggerProps } from 'react-aria-components';\nimport { useStrings } from '../../i18n/strings';\nimport { cx } from '../../utils/cx';\n\nexport interface SheetProps {\n /** Where the sheet comes from: bottom (default, phones), top, start, end or center. */\n position?: 'bottom' | 'top' | 'start' | 'end' | 'center';\n /** Heights it rests at, as fractions of the screen or CSS lengths: [0.5, 1] opens half way and can be dragged to full. */\n snapPoints?: Array<number | string>;\n /** Swiping and tapping outside do not close it (for unsaved work). */\n preventDismissal?: boolean;\n /** The title, read when the sheet opens. */\n title?: ReactNode;\n /** A line under the title. */\n description?: ReactNode;\n /** Content pinned at the bottom: actions. */\n footer?: ReactNode;\n /** Hides the drag handle (it shows for bottom and top sheets). */\n hideHandle?: boolean;\n /** Name for screen readers when there is no title. */\n 'aria-label'?: string;\n /** The content. */\n children?: ReactNode;\n /** Extra class names for the sheet. */\n className?: string;\n}\n\n/** A panel that slides in from an edge and follows the finger: swipe it away, or drag it between snap points. Built for phones; on desktop it works like a drawer. */\nexport function Sheet({ position = 'bottom', snapPoints, preventDismissal, title, description, footer, hideHandle, children, className, 'aria-label': label }: SheetProps) {\n const handle = !hideHandle && (position === 'bottom' || position === 'top');\n return (\n <SheetOverlay position={position} snapPoints={snapPoints} preventDismissal={preventDismissal} className=\"alea-sheet-overlay\" data-position={position}>\n <SheetBackdrop className=\"alea-sheet-backdrop\" />\n <RACSheet className={cx('alea-sheet', className)} data-position={position}>\n <SheetContent className=\"alea-sheet-content\" aria-label={title ? undefined : label}>\n {handle && <span className=\"alea-sheet-handle\" aria-hidden=\"true\" />}\n {(title || description) && (\n <header className=\"alea-sheet-head\">\n {title && <Heading slot=\"title\" className=\"alea-sheet-title\">{title}</Heading>}\n {description && <p className=\"alea-sheet-desc\">{description}</p>}\n </header>\n )}\n <div className=\"alea-sheet-body\">{children}</div>\n {footer && <footer className=\"alea-sheet-foot\">{footer}</footer>}\n </SheetContent>\n </RACSheet>\n </SheetOverlay>\n );\n}\n\n/** Opens a Sheet: put the trigger (a Button) first, then the Sheet. */\nexport function SheetTrigger(props: SheetTriggerProps) {\n return <RACSheetTrigger {...props} />;\n}\n\nexport interface ActionSheetAction { id: string; label: ReactNode; icon?: ReactNode; description?: ReactNode; tone?: 'default' | 'danger'; isDisabled?: boolean; onAction?: () => void }\n\nexport interface ActionSheetProps {\n /** The button that opens it. */\n trigger: ReactNode;\n /** A short title over the actions. */\n title?: ReactNode;\n /** A line under the title. */\n description?: ReactNode;\n /** The actions, top to bottom. Each one closes the sheet. */\n actions: ActionSheetAction[];\n /** The text of the cancel button. Default \"Cancel\". */\n cancelLabel?: ReactNode;\n /** Open state (controlled). */\n isOpen?: boolean;\n /** Called when it opens or closes. */\n onOpenChange?: (open: boolean) => void;\n}\n\nfunction ActionList({ actions, cancelLabel }: Pick<ActionSheetProps, 'actions' | 'cancelLabel'>) {\n const t = useStrings();\n const state = useContext(OverlayTriggerStateContext);\n return (\n <div className=\"alea-action-sheet-body\">\n <ul className=\"alea-action-sheet-list\">\n {actions.map(a => (\n <li key={a.id}>\n <RACButton className=\"alea-action-sheet-item alea-focus-ring\" data-tone={a.tone} isDisabled={a.isDisabled} onPress={() => { state?.close(); a.onAction?.(); }}>\n {a.icon && <span className=\"alea-action-sheet-icon\" aria-hidden=\"true\">{a.icon}</span>}\n <span className=\"alea-action-sheet-text\"><span>{a.label}</span>{a.description && <span className=\"alea-action-sheet-desc\">{a.description}</span>}</span>\n </RACButton>\n </li>\n ))}\n </ul>\n <RACButton className=\"alea-action-sheet-item alea-action-sheet-cancel alea-focus-ring\" onPress={() => state?.close()}>{cancelLabel ?? t.cancel}</RACButton>\n </div>\n );\n}\n\n/** A list of actions in a bottom sheet, with Cancel apart: Share, Duplicate, Delete. The phone way to show a short menu. */\nexport function ActionSheet({ trigger, title, description, actions, cancelLabel, isOpen, onOpenChange }: ActionSheetProps) {\n const t = useStrings();\n return (\n <RACSheetTrigger isOpen={isOpen} onOpenChange={onOpenChange}>\n {trigger}\n <Sheet title={title} description={description} aria-label={typeof title === 'string' ? undefined : t.options} className=\"alea-action-sheet\">\n <ActionList actions={actions} cancelLabel={cancelLabel} />\n </Sheet>\n </RACSheetTrigger>\n );\n}\n"},{"path":"components/overlay/overlay.css","content":".alea-popover {\n min-width: var(--trigger-width, 160px);\n max-width: min(400px, calc(100vw - 24px));\n padding: var(--alea-space-1);\n border-radius: var(--alea-radius-md);\n background: var(--alea-surface-raised);\n box-shadow: inset 0 0 0 1px var(--alea-border-strong), var(--alea-shadow-pop);\n color: var(--alea-text);\n outline: none;\n z-index: var(--alea-z-dropdown);\n}\n.alea-arrow svg { display: block; fill: var(--alea-surface-raised); stroke: var(--alea-border-strong); }\n.alea-popover[data-placement='bottom'] .alea-arrow svg { transform: rotate(180deg); }\n.alea-popover[data-placement='left'] .alea-arrow svg { transform: rotate(-90deg); }\n.alea-popover[data-placement='right'] .alea-arrow svg { transform: rotate(90deg); }\n.alea-popover-dialog { padding: var(--alea-space-3) var(--alea-space-4); outline: none; display: flex; flex-direction: column; gap: var(--alea-space-3); }\n.alea-popover-title { margin: 0; font: var(--alea-font-weight-semibold) var(--alea-font-size-md) / 1.3 var(--alea-font-family-body); }\n\n.alea-tooltip {\n max-width: 260px;\n padding: var(--alea-space-2) var(--alea-space-3);\n border-radius: var(--alea-radius-xs);\n background: var(--alea-chip-bg);\n color: var(--alea-chip-text);\n font: var(--alea-font-weight-medium) var(--alea-font-size-xs) / 1.4 var(--alea-font-family-body);\n box-shadow: var(--alea-shadow-pop);\n z-index: var(--alea-z-tooltip);\n}\n.alea-tooltip-arrow svg { fill: var(--alea-chip-bg); stroke: none; }\n.alea-tooltip[data-placement='bottom'] .alea-tooltip-arrow svg { transform: rotate(180deg); }\n.alea-tooltip[data-placement='left'] .alea-tooltip-arrow svg { transform: rotate(-90deg); }\n.alea-tooltip[data-placement='right'] .alea-tooltip-arrow svg { transform: rotate(90deg); }\n\n.alea-modal-overlay {\n position: fixed; inset: 0;\n display: grid; place-items: center;\n padding: var(--alea-space-4);\n background: var(--alea-surface-overlay);\n backdrop-filter: blur(6px);\n -webkit-backdrop-filter: blur(6px);\n z-index: var(--alea-z-modal);\n}\n.alea-modal {\n width: 100%;\n max-width: 520px;\n max-height: calc(100dvh - 32px);\n overflow: auto;\n border-radius: var(--alea-radius-lg);\n background: var(--alea-surface);\n box-shadow: var(--alea-shadow-card), var(--alea-shadow-pop);\n outline: none;\n}\n.alea-modal[data-size='sm'] { max-width: 400px; }\n.alea-modal[data-size='lg'] { max-width: 720px; }\n.alea-modal[data-size='full'] { max-width: calc(100vw - 32px); height: calc(100dvh - 32px); }\n.alea-dialog { display: flex; flex-direction: column; gap: var(--alea-space-3); padding: clamp(var(--alea-space-5), 3vw, var(--alea-space-7)); outline: none; }\n.alea-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--alea-space-4); }\n.alea-dialog-title { margin: 0; font: var(--alea-font-weight-light) var(--alea-font-size-2xl) / var(--alea-font-leading-tight) var(--alea-font-family-display); letter-spacing: var(--alea-font-tracking-display); }\n.alea-dialog-x { margin: calc(var(--alea-space-1) * -1) calc(var(--alea-space-2) * -1) 0 auto; }\n.alea-dialog-description { margin: 0; color: var(--alea-text-muted); font-size: var(--alea-font-size-md); }\n.alea-dialog-body { display: flex; flex-direction: column; gap: var(--alea-space-4); }\n.alea-dialog-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--alea-space-2); padding-top: var(--alea-space-2); }\n[data-density='compact'] .alea-dialog-footer { padding-top: var(--alea-space-3); } /* Compact halves the steps, so the footer takes one step more to keep the buttons clear of the content */\n\n.alea-drawer-overlay { place-items: stretch end; padding: 0; }\n.alea-drawer-overlay[data-placement='start'] { place-items: stretch start; }\n.alea-drawer-overlay[data-placement='bottom'] { place-items: end stretch; }\n.alea-drawer {\n width: min(var(--alea-drawer-size, 420px), 100vw);\n height: 100dvh;\n overflow: auto;\n background: var(--alea-surface);\n box-shadow: var(--alea-shadow-pop);\n outline: none;\n}\n.alea-drawer[data-placement='end'] { border-radius: var(--alea-radius-lg) 0 0 var(--alea-radius-lg); }\n.alea-drawer[data-placement='start'] { border-radius: 0 var(--alea-radius-lg) var(--alea-radius-lg) 0; }\n.alea-drawer[data-placement='bottom'] { width: 100%; height: auto; max-height: min(var(--alea-drawer-size, 420px), 90dvh); border-radius: var(--alea-radius-lg) var(--alea-radius-lg) 0 0; }\n.alea-drawer-content { min-height: 100%; }\n.alea-drawer-content .alea-dialog-footer { margin-top: auto; }\n.alea-popconfirm { max-width: 300px; }\n.alea-popconfirm-text { margin: 0; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n.alea-popconfirm-actions { display: flex; justify-content: flex-end; gap: var(--alea-space-2); }\n\n/* Sheet: slides from an edge and follows the finger. The engine lays it out as a flex item on a full-screen stage; we only size and style it. */\n.alea-sheet-overlay { z-index: var(--alea-z-modal, 50); }\n.alea-sheet-backdrop { position: fixed; inset: 0; background: var(--alea-surface-overlay); backdrop-filter: blur(2px); }\n.alea-sheet { display: flex; flex-direction: column; background: linear-gradient(var(--alea-surface-overlay), var(--alea-surface-overlay)), var(--alea-bg); color: var(--alea-text); box-shadow: var(--alea-shadow-pop), inset 0 0 0 1px var(--alea-border); outline: none; }\n.alea-sheet:is([data-position='bottom'], [data-position='top']) { width: 100%; max-height: calc(100dvh - 24px); }\n.alea-sheet[data-position='bottom'] { border-radius: var(--alea-radius-xl, var(--alea-space-6)) var(--alea-radius-xl, var(--alea-space-6)) 0 0; padding-bottom: env(safe-area-inset-bottom); }\n.alea-sheet[data-position='top'] { border-radius: 0 0 var(--alea-radius-xl, var(--alea-space-6)) var(--alea-radius-xl, var(--alea-space-6)); }\n.alea-sheet:is([data-position='start'], [data-position='end']) { height: 100dvh; width: min(420px, 88vw); }\n.alea-sheet[data-position='start'] { border-radius: 0 var(--alea-radius-lg) var(--alea-radius-lg) 0; }\n.alea-sheet[data-position='end'] { border-radius: var(--alea-radius-lg) 0 0 var(--alea-radius-lg); }\n.alea-sheet[data-position='center'] { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 64px); border-radius: var(--alea-radius-xl, var(--alea-space-6)); }\n@media (min-width: 768px) { .alea-sheet:is([data-position='bottom'], [data-position='top']) { width: min(640px, 100vw); } }\n.alea-sheet-content { display: flex; flex-direction: column; min-height: 0; flex: 1; outline: none; }\n.alea-sheet-handle { align-self: center; flex: none; width: 40px; height: 4px; margin: var(--alea-space-2) 0 var(--alea-space-1); border-radius: var(--alea-radius-2xs); background: var(--alea-border-strong); }\n.alea-sheet-head { display: flex; flex-direction: column; gap: var(--alea-space-1); padding: var(--alea-space-3) var(--alea-space-5) var(--alea-space-2); }\n.alea-sheet-title { margin: 0; font: var(--alea-font-weight-semibold) var(--alea-font-size-lg) / 1.3 var(--alea-font-family-body); }\n.alea-sheet-desc { margin: 0; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n.alea-sheet-body { flex: 1; min-height: 0; overflow: auto; padding: var(--alea-space-2) var(--alea-space-5) var(--alea-space-5); overscroll-behavior: contain; }\n.alea-sheet-foot { display: flex; gap: var(--alea-space-2); justify-content: flex-end; padding: var(--alea-space-3) var(--alea-space-5) var(--alea-space-4); border-top: 1px solid var(--alea-border); }\n@media (max-width: 639px) { .alea-sheet-foot > .alea-button { flex: 1; } }\n/* ActionSheet */\n.alea-action-sheet .alea-sheet-body { padding-top: 0; }\n.alea-action-sheet-body { display: flex; flex-direction: column; gap: var(--alea-space-3); }\n.alea-action-sheet-list { margin: 0; padding: var(--alea-space-1); list-style: none; border-radius: var(--alea-radius-lg); background: var(--alea-surface-raised); }\n.alea-action-sheet-item { display: flex; align-items: center; gap: var(--alea-space-3); width: 100%; min-height: 52px; padding: var(--alea-space-2) var(--alea-space-4); border: 0; border-radius: var(--alea-radius-md); background: none; color: var(--alea-text); font: var(--alea-font-weight-medium) var(--alea-font-size-base) / 1.3 var(--alea-font-family-body); text-align: start; cursor: pointer; }\n.alea-action-sheet-item[data-hovered], .alea-action-sheet-item[data-pressed] { background: var(--alea-surface-hover); }\n.alea-action-sheet-item[data-tone='danger'] { color: var(--alea-status-danger); }\n.alea-action-sheet-item[data-disabled] { opacity: 0.45; cursor: not-allowed; }\n.alea-action-sheet-icon { display: inline-flex; flex: none; color: var(--alea-icon-muted); }\n.alea-action-sheet-item[data-tone='danger'] .alea-action-sheet-icon { color: inherit; }\n.alea-action-sheet-icon svg { width: 20px; height: 20px; }\n.alea-action-sheet-text { display: flex; flex-direction: column; gap: var(--alea-space-0-5); }\n.alea-action-sheet-desc { color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); font-weight: var(--alea-font-weight-regular); }\n.alea-action-sheet-cancel { justify-content: center; border-radius: var(--alea-radius-lg); background: var(--alea-surface-raised); font-weight: var(--alea-font-weight-semibold); }\n/* full screen dialogs on phones */\n@media (max-width: 639px) {\n .alea-modal-overlay[data-fullscreen-below='sm'] { padding: 0; align-items: stretch; }\n .alea-modal[data-fullscreen-below='sm'] { max-width: none; width: 100%; height: 100dvh; max-height: none; border-radius: 0; }\n}\n@media (max-width: 767px) {\n .alea-modal-overlay[data-fullscreen-below='md'] { padding: 0; align-items: stretch; }\n .alea-modal[data-fullscreen-below='md'] { max-width: none; width: 100%; height: 100dvh; max-height: none; border-radius: 0; }\n}\n/* popover widths and dialog parts */\n.alea-popover[data-size='sm'] { width: min(240px, calc(100vw - 32px)); }\n.alea-popover[data-size='md'] { width: min(320px, calc(100vw - 32px)); }\n.alea-popover[data-size='lg'] { width: min(420px, calc(100vw - 32px)); }\n.alea-popover-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--alea-space-2); }\n.alea-popover-close { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin: calc(var(--alea-space-1) * -1) calc(var(--alea-space-2) * -1) 0 0; padding: 0; border: 0; border-radius: var(--alea-radius-sm); background: transparent; color: var(--alea-text-muted); cursor: pointer; }\n.alea-popover-close[data-hovered] { background: var(--alea-surface-hover); color: var(--alea-text); }\n.alea-popover-desc { margin: calc(var(--alea-space-2) * -1) 0 0; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); line-height: 1.45; }\n.alea-popover-footer { display: flex; justify-content: flex-end; gap: var(--alea-space-2); padding-top: var(--alea-space-3); border-top: 1px solid var(--alea-border); }\n@media (pointer: coarse) { .alea-popover-close { width: 44px; height: 44px; margin: calc(var(--alea-space-3) * -1) calc(var(--alea-space-4) * -1) calc(var(--alea-space-2) * -1) 0; } }\n\n/* ---------------------------------------------------------------- Modal: any content */\n.alea-xmodal[data-size='xs'] { max-width: 320px; }\n.alea-xmodal[data-size='md'] { max-width: 560px; }\n.alea-xmodal[data-size='lg'] { max-width: 760px; }\n.alea-xmodal[data-size='xl'] { max-width: 960px; }\n.alea-xmodal[data-size='auto'] { width: auto; max-width: calc(100vw - 32px); }\n.alea-xmodal-overlay[data-placement='top'] { place-items: start center; padding-top: clamp(var(--alea-space-4), 10vh, var(--alea-space-24)); }\n.alea-xmodal-overlay[data-backdrop='transparent'] { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }\n.alea-xmodal-overlay[data-backdrop='dim'] { backdrop-filter: none; -webkit-backdrop-filter: none; }\n.alea-xmodal-overlay[data-backdrop='blur'] { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }\n/* inside: the surface is a column whose body scrolls; outside: the overlay scrolls and the surface grows */\n.alea-xmodal[data-scroll='inside'] { display: flex; flex-direction: column; overflow: hidden; }\n.alea-xmodal-dialog { position: relative; display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; outline: none; }\n.alea-xmodal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--alea-space-4); padding: clamp(var(--alea-space-5), 3vw, var(--alea-space-7)) clamp(var(--alea-space-5), 3vw, var(--alea-space-7)) var(--alea-space-3); }\n.alea-xmodal-body { display: flex; flex-direction: column; gap: var(--alea-space-4); padding: 0 clamp(var(--alea-space-5), 3vw, var(--alea-space-7)) clamp(var(--alea-space-5), 3vw, var(--alea-space-7)); min-height: 0; }\n.alea-xmodal-dialog > .alea-xmodal-body:first-child, .alea-xmodal-x + .alea-xmodal-body { padding-top: clamp(var(--alea-space-5), 3vw, var(--alea-space-7)); }\n.alea-xmodal[data-scroll='inside'] .alea-xmodal-body { overflow: auto; flex: 1 1 auto; overscroll-behavior: contain; }\n.alea-xmodal-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--alea-space-2); padding: var(--alea-space-4) clamp(var(--alea-space-5), 3vw, var(--alea-space-7)); border-top: 1px solid var(--alea-border); }\n.alea-xmodal-x { position: absolute; top: var(--alea-space-3); right: var(--alea-space-3); z-index: 1; }\n.alea-xmodal-dialog[data-padding='none'] .alea-xmodal-body { padding: 0; }\n.alea-xmodal-dialog[data-padding='none'] .alea-xmodal-x { background: color-mix(in oklab, var(--alea-bg) 70%, transparent); }\n.alea-xmodal-overlay[data-scroll='outside'] { overflow-y: auto; place-items: start center; padding-block: clamp(var(--alea-space-4), 8vh, var(--alea-space-16)); }\n.alea-xmodal[data-scroll='outside'] { max-height: none; overflow: visible; }\n"}],"deps":["button"],"npm":["react-aria-components","@alea-design/motion","lucide-react"],"exports":["Drawer","DrawerContent","Popconfirm","Modal","Popover","PopoverDialog","Tooltip","TooltipTrigger","Dialog","DialogModal","AlertDialog","Sheet","SheetTrigger","ActionSheet"],"descriptions":{"Drawer":"A panel that slides in from the side: filters, details, navigation on mobile. Focus is trapped, Escape closes.","DrawerContent":"The content of a Drawer: title, body and footer, like Dialog.","Popconfirm":"A small confirm next to its trigger, for quick, reversible-ish actions.","Modal":"A modal with any content: a header and footer if you want them, seven sizes, centered or at the top, the body or the whole modal scrolling, edge-to-edge media, three backdrops. Traps focus, closes on Escape and outside click, and returns focus to what opened it. For a title, text and two buttons, Dialog is quicker; to confirm something destructive, AlertDialog.","Popover":"A floating panel attached to a trigger; closes on Escape or outside click. Three widths, an optional arrow.","PopoverDialog":"The content of a Popover that holds interactive things (forms, filters, settings): a title, a description, a footer and a close button.","Tooltip":"A short hint on hover or keyboard focus, with an optional title and shortcut. Not for anything the user must read to act.","TooltipTrigger":"Wraps a focusable trigger and its Tooltip. Default delay 600 ms, 0 when moving between tooltips.","Dialog":"The dialog content: title, text, body and footer. Put it inside DialogModal.","DialogModal":"The modal layer: dims the page, traps focus, closes on Escape (and outside click when isDismissable). Four sizes, full screen on phones when you want.","AlertDialog":"A confirm dialog (role alertdialog): Escape and outside click don't dismiss it by accident.","Sheet":"A panel that slides in from an edge and follows the finger: swipe it away, or drag it between snap points. Built for phones; on desktop it works like a drawer.","SheetTrigger":"Opens a Sheet: put the trigger (a Button) first, then the Sheet.","ActionSheet":"A list of actions in a bottom sheet, with Cancel apart: Share, Duplicate, Delete. The phone way to show a short menu."}},"page":{"files":[{"path":"components/page/Page.tsx","content":"import { useCallback, useEffect, useRef, useState, type CSSProperties, type KeyboardEvent, type ReactNode } from 'react';\nimport { ArrowUp } from 'lucide-react';\nimport { cx } from '../../utils/cx';\nimport { Tooltip, TooltipTrigger } from '../overlay/Overlay';\nimport { Button } from '../button/Button';\nimport { useStrings } from '../../i18n/strings';\n\n// ---------------------------------------------------------------- Splitter\nexport interface SplitterProps {\n /** The two panes. */\n children: [ReactNode, ReactNode];\n /** horizontal: side by side (default); vertical: stacked. */\n orientation?: 'horizontal' | 'vertical';\n /** Size of the first pane in percent (controlled). */\n size?: number;\n /** Starting size of the first pane in percent. Default 50. */\n defaultSize?: number;\n /** Called with the first panel's size in %. */\n onSizeChange?: (size: number) => void;\n /** Smallest and largest first pane, in percent. Default 15 and 85. */\n min?: number;\n /** Largest size of the first panel, in %. Default 85. */\n max?: number;\n /** Name of the handle for screen readers. Default \"Resize\". */\n 'aria-label'?: string;\n /** Extra class names for the root element. */\n className?: string;\n /** Inline styles for the root element. */\n style?: CSSProperties;\n}\n\n/** Two panes with a handle between them: drag it, or focus it and use the arrow keys. */\nexport function Splitter({ children, orientation = 'horizontal', size, defaultSize = 50, onSizeChange, min = 15, max = 85, className, style, 'aria-label': label }: SplitterProps) {\n const t = useStrings(); label ??= t.resize;\n const [own, setOwn] = useState(defaultSize);\n const value = size ?? own;\n const box = useRef<HTMLDivElement>(null);\n const set = useCallback((v: number) => { const c = Math.round(Math.min(max, Math.max(min, v)) * 10) / 10; if (size === undefined) setOwn(c); onSizeChange?.(c); }, [size, min, max, onSizeChange]);\n const horizontal = orientation === 'horizontal';\n const onPointerDown = (e: React.PointerEvent) => {\n e.preventDefault();\n const rect = box.current!.getBoundingClientRect();\n const move = (ev: PointerEvent) => set(horizontal ? ((ev.clientX - rect.left) / rect.width) * 100 : ((ev.clientY - rect.top) / rect.height) * 100);\n const up = () => { window.removeEventListener('pointermove', move); window.removeEventListener('pointerup', up); document.body.style.cursor = ''; };\n window.addEventListener('pointermove', move); window.addEventListener('pointerup', up);\n document.body.style.cursor = horizontal ? 'col-resize' : 'row-resize';\n };\n const onKeyDown = (e: KeyboardEvent) => {\n const step = e.shiftKey ? 10 : 2;\n const less = horizontal ? 'ArrowLeft' : 'ArrowUp', more = horizontal ? 'ArrowRight' : 'ArrowDown';\n if (e.key === less) set(value - step); else if (e.key === more) set(value + step);\n else if (e.key === 'Home') set(min); else if (e.key === 'End') set(max);\n else if (e.key === 'Enter') set(defaultSize);\n else return;\n e.preventDefault();\n };\n return (\n <div ref={box} className={cx('alea-splitter', className)} data-orientation={orientation} style={{ ...style, ['--alea-split' as any]: `${value}%` }}>\n <div className=\"alea-split-pane\">{children[0]}</div>\n <div role=\"separator\" tabIndex={0} aria-label={label} aria-orientation={horizontal ? 'vertical' : 'horizontal'} aria-valuenow={value} aria-valuemin={min} aria-valuemax={max}\n className=\"alea-split-handle alea-focus-ring\" onPointerDown={onPointerDown} onKeyDown={onKeyDown} onDoubleClick={() => set(defaultSize)}>\n <span className=\"alea-split-grip\" aria-hidden=\"true\" />\n </div>\n <div className=\"alea-split-pane\">{children[1]}</div>\n </div>\n );\n}\n\n// ---------------------------------------------------------------- Affix\nexport interface AffixProps {\n children: ReactNode;\n /** Distance from the top while stuck, in px. Default 0. */\n offsetTop?: number;\n /** Called when it sticks or unsticks (to change its look). */\n onChange?: (stuck: boolean) => void;\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** Sticks to the top once it scrolls there, and tells you when (data-stuck for styling). */\nexport function Affix({ children, offsetTop = 0, onChange, className }: AffixProps) {\n const sentinel = useRef<HTMLDivElement>(null);\n const [stuck, setStuck] = useState(false);\n useEffect(() => {\n const el = sentinel.current;\n if (!el || typeof IntersectionObserver === 'undefined') return;\n const io = new IntersectionObserver(([e]) => { const s = !e.isIntersecting && e.boundingClientRect.top < offsetTop + 1; setStuck(s); onChange?.(s); }, { rootMargin: `-${offsetTop + 1}px 0px 0px 0px`, threshold: 0 });\n io.observe(el);\n return () => io.disconnect();\n }, [offsetTop, onChange]);\n return (\n <>\n <div ref={sentinel} aria-hidden=\"true\" style={{ height: 1, marginBottom: 'calc(var(--alea-space-0-25) * -1)' }} />\n <div className={cx('alea-affix', className)} data-stuck={stuck || undefined} style={{ top: offsetTop }}>{children}</div>\n </>\n );\n}\n\n// ---------------------------------------------------------------- FloatButton\nexport interface FloatButtonProps {\n /** The icon. */\n icon: ReactNode;\n /** What it does; also the tooltip. */\n 'aria-label': string;\n /** Called when the main button is pressed (when there are no actions). */\n onPress?: () => void;\n /** Corner it sits in. Default bottom-end. */\n placement?: 'bottom-end' | 'bottom-start';\n /** primary: the dark gradient; secondary: the chip. */\n variant?: 'primary' | 'secondary';\n /** fixed to the viewport (default), or absolute inside a positioned parent. */\n position?: 'fixed' | 'absolute';\n /** Extra buttons that fan out above it on press. */\n actions?: Array<{ icon: ReactNode; label: string; onPress: () => void }>;\n /** Visible text next to the icon: an extended floating button (\"New message\"). */\n label?: ReactNode;\n /** With label: shrinks to the icon while scrolling down and grows back when scrolling up. */\n collapseOnScroll?: boolean;\n /** circle (default) or rounded (a rounded square). */\n shape?: 'circle' | 'rounded';\n /** md (56 px, default) or sm (44 px). */\n size?: 'sm' | 'md';\n}\n\n/** A round button floating over the page for one frequent action, or a few. */\nexport function FloatButton({ icon, onPress, placement = 'bottom-end', variant = 'primary', position = 'fixed', actions, label: text, collapseOnScroll, shape, size, 'aria-label': label }: FloatButtonProps) {\n const [open, setOpen] = useState(false);\n const [collapsed, setCollapsed] = useState(false);\n useEffect(() => {\n if (!collapseOnScroll || !text) return;\n let last = window.scrollY;\n const on = () => { const y = window.scrollY; if (Math.abs(y - last) > 8) { setCollapsed(y > last && y > 80); last = y; } };\n window.addEventListener('scroll', on, { passive: true });\n return () => window.removeEventListener('scroll', on);\n }, [collapseOnScroll, text]);\n return (\n <div className=\"alea-float\" data-placement={placement} data-position={position} data-open={open || undefined} data-extended={text ? true : undefined} data-collapsed={collapsed || undefined} data-shape={shape} data-size={size}>\n {actions && (\n <ul className=\"alea-float-actions\" hidden={!open}>\n {actions.map(a => (\n <li key={a.label}>\n <TooltipTrigger><Button variant=\"secondary\" className=\"alea-float-btn alea-float-small\" aria-label={a.label} onPress={() => { setOpen(false); a.onPress(); }}><span className=\"alea-button-icon\" aria-hidden=\"true\">{a.icon}</span></Button><Tooltip placement=\"start\">{a.label}</Tooltip></TooltipTrigger>\n </li>\n ))}\n </ul>\n )}\n <TooltipTrigger>\n <Button variant={variant} className=\"alea-float-btn\" aria-label={label} aria-expanded={actions ? open : undefined} onPress={() => (actions ? setOpen(o => !o) : onPress?.())}>\n <span className=\"alea-button-icon alea-float-icon\" aria-hidden=\"true\">{icon}</span>\n {text && <span className=\"alea-float-label\" aria-hidden=\"true\">{text}</span>}\n </Button>\n <Tooltip placement=\"start\">{label}</Tooltip>\n </TooltipTrigger>\n </div>\n );\n}\n\n/** A FloatButton that appears after scrolling down and takes you back to the top. */\nexport interface BackToTopProps {\n /** Scroll distance before it shows, in px. Default 400. */\n threshold?: number;\n /** fixed to the window (default) or absolute inside a positioned parent. */\n position?: 'fixed' | 'absolute';\n}\n\n/** A button that appears after scrolling down and takes people back to the top. */\nexport function BackToTop({ threshold = 400, position = 'fixed' }: BackToTopProps) {\n const t = useStrings();\n const [show, setShow] = useState(false);\n useEffect(() => {\n const on = () => setShow(window.scrollY > threshold);\n on(); window.addEventListener('scroll', on, { passive: true });\n return () => window.removeEventListener('scroll', on);\n }, [threshold]);\n if (!show && position === 'fixed') return null;\n return <FloatButton icon={<ArrowUp />} aria-label={t.backToTop} variant=\"secondary\" position={position} onPress={() => { window.scrollTo({ top: 0, behavior: 'smooth' }); (document.querySelector('main') as HTMLElement | null)?.focus?.(); }} />;\n}\n\n// ---------------------------------------------------------------- Anchor\nexport interface AnchorProps {\n /** The sections: id of the heading or section, and the link text. Nest with level 2 or 3. */\n items: Array<{ id: string; label: ReactNode; level?: 2 | 3 }>;\n /** Space taken by a sticky header, so the active section is right. Default 80. */\n offset?: number;\n /** Title above the links. Default \"On this page\". */\n title?: ReactNode;\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** On-page navigation that follows the section you are reading. */\nexport function Anchor({ items, offset = 80, title, className }: AnchorProps) {\n const t = useStrings(); title ??= t.onThisPage;\n const [active, setActive] = useState<string | null>(items[0]?.id ?? null);\n useEffect(() => {\n const on = () => {\n let cur: string | null = items[0]?.id ?? null;\n for (const it of items) { const el = document.getElementById(it.id); if (el && el.getBoundingClientRect().top - offset <= 1) cur = it.id; }\n setActive(cur);\n };\n on(); window.addEventListener('scroll', on, { passive: true }); window.addEventListener('resize', on);\n return () => { window.removeEventListener('scroll', on); window.removeEventListener('resize', on); };\n }, [items, offset]);\n return (\n <nav aria-label={typeof title === 'string' ? title : t.onThisPage} className={cx('alea-anchor', className)}>\n {title && <p className=\"alea-anchor-title\">{title}</p>}\n <ul>\n {items.map(it => (\n <li key={it.id} data-level={it.level || 2}>\n <a href={`#${it.id}`} className=\"alea-anchor-link alea-focus-ring\" aria-current={active === it.id ? 'location' : undefined} onClick={() => setActive(it.id)}>{it.label}</a>\n </li>\n ))}\n </ul>\n </nav>\n );\n}\n"},{"path":"components/page/PageParts.tsx","content":"import { createElement, useEffect, useRef, useState, type ReactNode } from 'react';\nimport type { Key } from 'react-aria-components';\nimport { ArrowLeft, MoreHorizontal, Info } from 'lucide-react';\nimport { cx } from '../../utils/cx';\nimport { Button, IconButton } from '../button/Button';\nimport { Breadcrumbs, Breadcrumb } from '../navigation/Navigation';\nimport { DropdownMenu, MenuItem } from '../menu/Menu';\nimport { useStrings } from '../../i18n/strings';\n\n/** An action for a page header, a save bar or page actions. */\nexport interface PageAction {\n id: Key;\n label: string;\n icon?: ReactNode;\n onAction?: () => void;\n href?: string;\n isDisabled?: boolean;\n tone?: 'default' | 'danger';\n}\n\n// ---------------------------------------------------------------- PageHeader\n\nexport interface PageHeaderProps {\n /** The page title (an h1 by default). */\n title: ReactNode;\n /** A line under the title. */\n subtitle?: ReactNode;\n /** Where Back goes: an href, or a function. Shows an arrow button before the title. */\n back?: string | (() => void);\n /** The label of the back button. Default \"Back\". */\n backLabel?: string;\n /** The trail above the title. */\n breadcrumbs?: Array<{ label: ReactNode; href?: string }>;\n /** An avatar, icon or thumbnail before the title. */\n media?: ReactNode;\n /** Badges and facts next to the title: status, dates, owner. */\n meta?: ReactNode;\n /** The main actions (usually one primary button). They stay visible on phones. */\n actions?: ReactNode;\n /** More actions: shown as buttons from 768 px up, folded into a More menu on phones. */\n secondaryActions?: PageAction[];\n /** Tabs or a segmented control under the header. */\n tabs?: ReactNode;\n /** Heading level. Default 1. */\n headingLevel?: 1 | 2 | 3;\n /** Sticks to the top while scrolling, and gets a border once stuck. */\n sticky?: boolean;\n /** Tighter spacing and a smaller title, for dense apps. */\n compact?: boolean;\n /** Extra class names. */\n className?: string;\n}\n\n/** The top of a page: breadcrumbs or back, title, subtitle, meta, actions and tabs. Secondary actions fold into a menu on phones. */\nexport function PageHeader({ title, subtitle, back, backLabel, breadcrumbs, media, meta, actions, secondaryActions, tabs, headingLevel = 1, sticky, compact, className }: PageHeaderProps) {\n const t = useStrings();\n const ref = useRef<HTMLElement>(null);\n const [stuck, setStuck] = useState(false);\n useEffect(() => {\n const el = ref.current;\n if (!sticky || !el || typeof IntersectionObserver === 'undefined') return;\n const sentinel = document.createElement('div');\n el.before(sentinel);\n const io = new IntersectionObserver(([e]) => setStuck(!e.isIntersecting));\n io.observe(sentinel);\n return () => { io.disconnect(); sentinel.remove(); };\n }, [sticky]);\n const secondary = secondaryActions?.length ? (\n <>\n <div className=\"alea-page-header-secondary\">\n {secondaryActions.map(a => <Button key={String(a.id)} variant=\"ghost\" size=\"sm\" iconStart={a.icon} href={a.href} onPress={a.onAction} isDisabled={a.isDisabled} tone={a.tone === 'danger' ? 'danger' : undefined}>{a.label}</Button>)}\n </div>\n <div className=\"alea-page-header-more\">\n <DropdownMenu aria-label={t.moreActions} placement=\"bottom end\" trigger={<IconButton aria-label={t.moreActions} size=\"sm\"><MoreHorizontal /></IconButton>}\n menuProps={{ onAction: (k: Key) => secondaryActions.find(a => a.id === k)?.onAction?.() }}>\n {secondaryActions.map(a => <MenuItem key={String(a.id)} id={a.id} icon={a.icon} href={a.href} isDisabled={a.isDisabled} tone={a.tone}>{a.label}</MenuItem>)}\n </DropdownMenu>\n </div>\n </>\n ) : null;\n return (\n <header ref={ref} className={cx('alea-page-header', className)} data-sticky={sticky || undefined} data-stuck={stuck || undefined} data-compact={compact || undefined}>\n {breadcrumbs?.length ? <Breadcrumbs className=\"alea-page-header-crumbs\">{breadcrumbs.map((b, i) => <Breadcrumb key={i} href={i === breadcrumbs.length - 1 ? undefined : b.href}>{b.label}</Breadcrumb>)}</Breadcrumbs> : null}\n <div className=\"alea-page-header-main\">\n {back && (typeof back === 'string'\n ? <IconButton aria-label={backLabel ?? t.back} variant=\"ghost\" size=\"sm\" href={back} className=\"alea-page-header-back\"><ArrowLeft /></IconButton>\n : <IconButton aria-label={backLabel ?? t.back} variant=\"ghost\" size=\"sm\" onPress={back} className=\"alea-page-header-back\"><ArrowLeft /></IconButton>)}\n {media && <span className=\"alea-page-header-media\">{media}</span>}\n <div className=\"alea-page-header-titles\">\n <div className=\"alea-page-header-title-row\">\n {createElement(`h${headingLevel}`, { className: 'alea-page-header-title' }, title)}\n {meta && <div className=\"alea-page-header-meta\">{meta}</div>}\n </div>\n {subtitle && <p className=\"alea-page-header-subtitle\">{subtitle}</p>}\n </div>\n {(actions || secondary) && <div className=\"alea-page-header-actions\">{secondary}{actions}</div>}\n </div>\n {tabs && <div className=\"alea-page-header-tabs\">{tabs}</div>}\n </header>\n );\n}\n\n// ---------------------------------------------------------------- SaveBar\n\nexport interface SaveBarProps {\n /** Show it while there are unsaved changes. */\n isVisible: boolean;\n /** The message. Default \"Unsaved changes\". */\n message?: ReactNode;\n /** Saves the changes. */\n onSave: () => void;\n /** Throws the changes away. */\n onDiscard?: () => void;\n /** Shows a spinner on Save while it works. */\n isSaving?: boolean;\n /** Label of the save button. Default \"Save\". */\n saveLabel?: ReactNode;\n /** Label of the discard button. Default \"Discard\". */\n discardLabel?: ReactNode;\n /** Where it shows: top (over the header, default) or bottom. */\n position?: 'top' | 'bottom';\n /** ⌘S / Ctrl+S saves while it is visible. Default true. */\n saveShortcut?: boolean;\n}\n\n/** A bar that appears while a form has unsaved changes, with Save and Discard. Announced to screen readers when it appears; ⌘S saves. */\nexport function SaveBar({ isVisible, message, onSave, onDiscard, isSaving, saveLabel, discardLabel, position = 'top', saveShortcut = true }: SaveBarProps) {\n const t = useStrings();\n const save = useRef(onSave); save.current = onSave;\n useEffect(() => {\n if (!isVisible || !saveShortcut) return;\n const on = (e: KeyboardEvent) => { if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === 's') { e.preventDefault(); save.current(); } };\n window.addEventListener('keydown', on);\n return () => window.removeEventListener('keydown', on);\n }, [isVisible, saveShortcut]);\n return (\n <div className=\"alea-savebar\" data-visible={isVisible || undefined} data-position={position} role=\"region\" aria-label={t.unsavedChanges} aria-hidden={!isVisible || undefined} inert={!isVisible || undefined}>\n <p className=\"alea-savebar-message\" aria-live=\"polite\">{isVisible ? message ?? t.unsavedChanges : ''}</p>\n <div className=\"alea-savebar-actions\">\n {onDiscard && <Button variant=\"ghost\" size=\"sm\" onPress={onDiscard} isDisabled={isSaving}>{discardLabel ?? t.discard}</Button>}\n <Button size=\"sm\" variant=\"secondary\" onPress={onSave} isLoading={isSaving} shortcut={saveShortcut ? '⌘S' : undefined}>{saveLabel ?? t.save}</Button>\n </div>\n </div>\n );\n}\n\n// ---------------------------------------------------------------- TopLoadingBar\n\nexport interface TopLoadingBarProps {\n /** Shows the bar while a page or a big request loads. */\n isLoading: boolean;\n /** A known progress from 0 to 100; without it the bar creeps forward on its own. */\n value?: number;\n /** Name for screen readers. Default \"Loading\". */\n 'aria-label'?: string;\n}\n\n/** A thin bar at the very top of the window while a page loads: it creeps forward, then completes and fades. */\nexport function TopLoadingBar({ isLoading, value, 'aria-label': label }: TopLoadingBarProps) {\n const t = useStrings();\n const [shown, setShown] = useState(isLoading);\n const [done, setDone] = useState(false);\n useEffect(() => {\n if (isLoading) { setShown(true); setDone(false); return; }\n if (!shown) return;\n setDone(true);\n const id = setTimeout(() => { setShown(false); setDone(false); }, 500);\n return () => clearTimeout(id);\n }, [isLoading]); // eslint-disable-line react-hooks/exhaustive-deps\n if (!shown) return null;\n const pct = done ? 100 : value;\n return (\n <div className=\"alea-top-loading\" role=\"progressbar\" aria-label={label ?? t.loading} aria-valuemin={0} aria-valuemax={100} aria-valuenow={pct} data-done={done || undefined} data-indeterminate={pct == null || undefined}>\n <span className=\"alea-top-loading-bar\" style={pct != null ? { width: `${pct}%` } : undefined} />\n </div>\n );\n}\n\n// ---------------------------------------------------------------- FooterHelp\n\n/** A quiet line at the end of a page that points to help: \"Learn more about payouts\". */\nexport function FooterHelp({ children, className }: { children: ReactNode; className?: string }) {\n return <p className={cx('alea-footer-help', className)}><Info size={16} aria-hidden=\"true\" /><span>{children}</span></p>;\n}\n\n// ---------------------------------------------------------------- PageActions\n\nexport interface PageActionsProps {\n /** The main action, on the right. */\n primary?: ReactNode;\n /** Other actions, on the left (Delete, Archive). */\n secondary?: ReactNode;\n /** Extra class names. */\n className?: string;\n}\n\n/** The row of actions at the end of a form page: primary on the right, secondary on the left. Full width and stacked on phones. */\nexport function PageActions({ primary, secondary, className }: PageActionsProps) {\n return <div className={cx('alea-page-actions', className)}><div className=\"alea-page-actions-secondary\">{secondary}</div><div className=\"alea-page-actions-primary\">{primary}</div></div>;\n}\n"},{"path":"components/page/page.css","content":".alea-splitter { display: flex; width: 100%; min-height: 200px; border-radius: var(--alea-radius-md); box-shadow: inset 0 0 0 1px var(--alea-border); overflow: hidden; }\n.alea-splitter[data-orientation='vertical'] { flex-direction: column; }\n.alea-split-pane { position: relative; min-width: 0; min-height: 0; overflow: auto; }\n.alea-split-pane:first-child { flex: 0 0 var(--alea-split); }\n.alea-split-pane:last-child { flex: 1; }\n.alea-split-handle { position: relative; flex: none; display: grid; place-items: center; width: 12px; background: var(--alea-surface-deep); cursor: col-resize; touch-action: none; transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-splitter[data-orientation='vertical'] .alea-split-handle { width: auto; height: 12px; cursor: row-resize; }\n.alea-split-handle:hover, .alea-split-handle:focus-visible { background: var(--alea-accent-subtle); }\n.alea-split-grip { width: 4px; height: 28px; border-radius: var(--alea-radius-2xs); background: var(--alea-border-control); }\n.alea-splitter[data-orientation='vertical'] .alea-split-grip { width: 28px; height: 4px; }\n.alea-split-handle:hover .alea-split-grip, .alea-split-handle:focus-visible .alea-split-grip { background: var(--alea-accent); }\n\n.alea-affix { position: sticky; z-index: var(--alea-z-sticky); transition: box-shadow var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-affix[data-stuck] { box-shadow: var(--alea-shadow-pop); }\n\n.alea-float { position: fixed; z-index: var(--alea-z-overlay); bottom: var(--alea-space-6); right: var(--alea-space-6); display: flex; flex-direction: column; align-items: center; gap: var(--alea-space-3); }\n.alea-float[data-placement='bottom-start'] { right: auto; left: var(--alea-space-6); }\n.alea-float[data-position='absolute'] { position: absolute; bottom: var(--alea-space-4); right: var(--alea-space-4); }\n.alea-float[data-position='absolute'][data-placement='bottom-start'] { right: auto; left: var(--alea-space-4); }\n.alea-float-btn.alea-button { --alea-button-pad: 0; width: 56px; height: 56px; border-radius: 50%; box-shadow: var(--alea-shadow-pop), var(--alea-button-ring) 0 0 0 1px; }\n.alea-float-btn .alea-button-icon svg { width: 24px; height: 24px; }\n.alea-float-small.alea-button { width: 44px; height: 44px; }\n.alea-float-small .alea-button-icon svg { width: 20px; height: 20px; }\n.alea-float-icon { transition: transform var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-float[data-open] .alea-float-icon { transform: rotate(45deg); }\n.alea-float[data-shape='rounded'] .alea-float-btn.alea-button { border-radius: var(--alea-radius-2xl); }\n.alea-float[data-size='sm'] .alea-float-btn.alea-button:not(.alea-float-small) { width: 44px; height: 44px; }\n/* extended: icon and label; it collapses to the icon while scrolling down */\n.alea-float[data-extended] .alea-float-btn.alea-button:not(.alea-float-small) { width: auto; min-width: 56px; padding: 0 var(--alea-space-5) 0 var(--alea-space-4); border-radius: var(--alea-radius-2xl); gap: var(--alea-space-2); transition: padding var(--alea-motion-duration-base) var(--alea-motion-ease-out), gap var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-float-label { display: inline-block; max-width: 240px; overflow: hidden; white-space: nowrap; font-weight: var(--alea-font-weight-semibold); transition: max-width var(--alea-motion-duration-base) var(--alea-motion-ease-out), opacity var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-float[data-collapsed] .alea-float-btn.alea-button:not(.alea-float-small) { padding: 0 var(--alea-space-4); gap: 0; }\n.alea-float[data-collapsed] .alea-float-label { max-width: 0; opacity: 0; }\n.alea-float[data-extended] .alea-button-content { gap: inherit; }\n.alea-float-actions { display: flex; flex-direction: column; gap: var(--alea-space-3); margin: 0; padding: 0; list-style: none; }\n.alea-float-actions:not([hidden]) li { animation: alea-m-pop-in var(--alea-motion-duration-base) var(--alea-motion-ease-out) both; }\n.alea-float-actions li:nth-last-child(2) { animation-delay: calc(var(--alea-motion-stagger) * 1); }\n.alea-float-actions li:nth-last-child(3) { animation-delay: calc(var(--alea-motion-stagger) * 2); }\n\n.alea-anchor { font-size: var(--alea-font-size-sm); }\n.alea-anchor-title { margin: 0 0 var(--alea-space-2); font: var(--alea-font-weight-semibold) var(--alea-font-size-2xs) / 1.2 var(--alea-font-family-body); letter-spacing: var(--alea-font-tracking-eyebrow); text-transform: uppercase; color: var(--alea-text-faint); }\n.alea-anchor ul { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--alea-border); }\n.alea-anchor li[data-level='3'] { padding-left: var(--alea-space-3); }\n.alea-anchor-link { display: block; margin-left: calc(var(--alea-space-0-25) * -1); padding: var(--alea-space-1) var(--alea-space-3); border-left: 2px solid transparent; color: var(--alea-text-muted); text-decoration: none; line-height: 1.4; transition: color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), border-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-anchor-link:hover { color: var(--alea-text); }\n.alea-anchor-link[aria-current] { color: var(--alea-text); border-left-color: var(--alea-accent); font-weight: var(--alea-font-weight-medium); }\n\n/* PageHeader */\n.alea-page-header { display: flex; flex-direction: column; gap: var(--alea-space-3); padding-bottom: var(--alea-space-6); container-type: inline-size; container-name: page-header; }\n.alea-page-header[data-compact] { gap: var(--alea-space-2); padding-bottom: var(--alea-space-4); }\n.alea-page-header[data-sticky] { position: sticky; top: 0; z-index: var(--alea-z-sticky, 20); padding-top: var(--alea-space-3); background: var(--alea-bg); transition: box-shadow var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-page-header[data-stuck] { box-shadow: 0 1px 0 var(--alea-border); }\n.alea-page-header-crumbs { font-size: var(--alea-font-size-sm); }\n.alea-page-header-main { display: flex; align-items: flex-start; gap: var(--alea-space-3); min-width: 0; }\n.alea-page-header-back { margin-top: var(--alea-space-1); flex: none; }\n.alea-page-header-media { flex: none; display: inline-flex; }\n.alea-page-header-titles { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: var(--alea-space-1); }\n.alea-page-header-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--alea-space-2) var(--alea-space-3); min-width: 0; }\n.alea-page-header-title { margin: 0; min-width: 0; font: var(--alea-font-weight-semibold) var(--alea-font-size-2xl, 28px) / 1.2 var(--alea-font-family-body); letter-spacing: var(--alea-font-tracking-tight); overflow-wrap: anywhere; }\n.alea-page-header[data-compact] .alea-page-header-title { font-size: var(--alea-font-size-xl, 20px); }\n.alea-page-header-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--alea-space-2); color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n.alea-page-header-subtitle { margin: 0; color: var(--alea-text-muted); font-size: var(--alea-font-size-md); line-height: 1.5; }\n.alea-page-header-actions { flex: none; display: flex; align-items: center; gap: var(--alea-space-2); margin-left: auto; }\n.alea-page-header-secondary { display: flex; gap: var(--alea-space-1); }\n.alea-page-header-more { display: none; }\n.alea-page-header-tabs { margin-top: var(--alea-space-2); }\n/* the header adapts to its own width: secondary actions fold into More below 720 px, actions wrap under the title below 560 px */\n@container page-header (max-width: 720px) {\n .alea-page-header-secondary { display: none; }\n .alea-page-header-more { display: block; order: 2; }\n}\n@container page-header (max-width: 560px) {\n .alea-page-header-main { flex-wrap: wrap; }\n .alea-page-header-titles { flex-basis: calc(100% - 48px); }\n .alea-page-header-actions { width: 100%; margin-left: 0; }\n .alea-page-header-actions > .alea-button { flex: 1; }\n}\n\n/* SaveBar */\n.alea-savebar { position: fixed; left: 50%; z-index: var(--alea-z-toast, 60); display: flex; align-items: center; gap: var(--alea-space-4); width: min(720px, calc(100vw - 32px)); padding: var(--alea-space-2) var(--alea-space-2) var(--alea-space-2) var(--alea-space-5); border-radius: var(--alea-radius-full); background: var(--alea-surface-overlay); box-shadow: var(--alea-shadow-pop), inset 0 0 0 1px var(--alea-border-strong); color: var(--alea-text); translate: -50% 0; opacity: 0; pointer-events: none; transition: opacity var(--alea-motion-duration-base) var(--alea-motion-ease-out), transform var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-savebar[data-position='top'] { top: var(--alea-space-3); transform: translateY(calc(var(--alea-motion-distance-md) * -1)); }\n.alea-savebar[data-position='bottom'] { bottom: calc(var(--alea-space-4) + env(safe-area-inset-bottom)); transform: translateY(var(--alea-motion-distance-md)); }\n.alea-savebar[data-visible] { opacity: 1; transform: none; pointer-events: auto; }\n.alea-savebar-message { flex: 1; margin: 0; font-weight: var(--alea-font-weight-medium); font-size: var(--alea-font-size-md); }\n.alea-savebar-message::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: var(--alea-space-3); border-radius: 50%; background: var(--alea-status-warning); vertical-align: middle; }\n.alea-savebar-actions { display: flex; gap: var(--alea-space-2); }\n@media (max-width: 479px) { .alea-savebar { border-radius: var(--alea-radius-lg); flex-wrap: wrap; padding: var(--alea-space-3); } .alea-savebar-actions { width: 100%; } .alea-savebar-actions > * { flex: 1; } }\n\n/* TopLoadingBar */\n.alea-top-loading { position: fixed; top: 0; left: 0; right: 0; z-index: calc(var(--alea-z-toast, 60) + 1); height: 4px; pointer-events: none; transition: opacity var(--alea-motion-duration-base) var(--alea-motion-ease-out) var(--alea-motion-duration-fast); }\n.alea-top-loading[data-done] { opacity: 0; }\n.alea-top-loading-bar { display: block; height: 100%; width: 0; background: var(--alea-gradient-accent-linear, var(--alea-accent)); box-shadow: 0 0 10px var(--alea-accent); transition: width var(--alea-motion-duration-slow) var(--alea-motion-ease-out); }\n.alea-top-loading[data-indeterminate] .alea-top-loading-bar { width: 85%; transition: none; animation: alea-top-creep 8s var(--alea-motion-ease-out) both; }\n@keyframes alea-top-creep { from { width: 0; } 20% { width: 40%; } to { width: 85%; } }\n\n/* FooterHelp and PageActions */\n.alea-footer-help { display: flex; align-items: center; justify-content: center; gap: var(--alea-space-2); margin: var(--alea-space-8) 0; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); text-align: center; }\n.alea-footer-help svg { flex: none; color: var(--alea-accent-strong); }\n.alea-page-actions { display: flex; justify-content: space-between; align-items: center; gap: var(--alea-space-3); padding-top: var(--alea-space-5); border-top: 1px solid var(--alea-border); }\n.alea-page-actions-secondary, .alea-page-actions-primary { display: flex; gap: var(--alea-space-2); }\n@media (max-width: 639px) { .alea-page-actions { flex-direction: column-reverse; align-items: stretch; } .alea-page-actions-secondary, .alea-page-actions-primary { flex-direction: column; } .alea-page-actions .alea-button { width: 100%; } }\n@media (prefers-reduced-motion: reduce) { .alea-top-loading[data-indeterminate] .alea-top-loading-bar { animation: none; } }\n"}],"deps":["overlay","button","navigation","menu"],"npm":["lucide-react","react-aria-components"],"exports":["Splitter","Affix","FloatButton","BackToTop","Anchor","PageHeader","SaveBar","TopLoadingBar","FooterHelp","PageActions"],"descriptions":{"Splitter":"Two panes with a handle between them: drag it, or focus it and use the arrow keys.","Affix":"Sticks to the top once it scrolls there, and tells you when (data-stuck for styling).","FloatButton":"A round button floating over the page for one frequent action, or a few.","BackToTop":"A button that appears after scrolling down and takes people back to the top.","Anchor":"On-page navigation that follows the section you are reading.","PageHeader":"The top of a page: breadcrumbs or back, title, subtitle, meta, actions and tabs. Secondary actions fold into a menu on phones.","SaveBar":"A bar that appears while a form has unsaved changes, with Save and Discard. Announced to screen readers when it appears; ⌘S saves.","TopLoadingBar":"A thin bar at the very top of the window while a page loads: it creeps forward, then completes and fades.","FooterHelp":"A quiet line at the end of a page that points to help: \"Learn more about payouts\".","PageActions":"The row of actions at the end of a form page: primary on the right, secondary on the left. Full width and stacked on phones."}},"picker":{"files":[{"path":"components/picker/Picker.tsx","content":"import { useEffect, useId, useMemo, useRef, useState, type ClipboardEvent, type KeyboardEvent, type ReactNode } from 'react';\nimport { DialogTrigger, Dialog, Button as RACButton, ListBox, ListBoxItem, useFilter, type Key, type Selection } from 'react-aria-components';\nimport type { MotionProp } from '@alea-design/motion';\nimport { ChevronDown, ChevronRight, ChevronsRight, ChevronsLeft, Check } from 'lucide-react';\nimport { cx } from '../../utils/cx';\nimport { Popover } from '../overlay/Overlay';\nimport { ListView, ListItem } from '../list/List';\nimport { Tree, TreeItem } from '../tree/Tree';\nimport { Button } from '../button/Button';\nimport { SearchField } from '../field/Field';\nimport { useStrings } from '../../i18n/strings';\n\n// ---------------------------------------------------------------- OTPField\nexport interface OTPFieldProps {\n /** Number of characters. Default 6. */\n length?: number;\n /** The visible label (\"Verification code\"). */\n label?: ReactNode;\n /** The code (controlled). */\n value?: string;\n /** The code to start with. */\n defaultValue?: string;\n /** Called with the code as it is typed. */\n onChange?: (value: string) => void;\n /** Called when every box is filled. */\n onComplete?: (value: string) => void;\n /** numeric (default) or alphanumeric. */\n type?: 'numeric' | 'alphanumeric';\n /** Hide the characters (PINs). */\n mask?: boolean;\n /** Marks it invalid and shows errorMessage. */\n isInvalid?: boolean;\n /** The error shown when it is invalid. */\n errorMessage?: ReactNode;\n /** Disables every part of it. */\n isDisabled?: boolean;\n /** Form field name for the joined value. */\n name?: string;\n}\n\n/** One-time codes in separate boxes: paste the whole code, arrows and Backspace move between boxes. */\nexport function OTPField({ length = 6, label, value, defaultValue = '', onChange, onComplete, type = 'numeric', mask, isInvalid, errorMessage, isDisabled, name }: OTPFieldProps) {\n const t = useStrings(); label ??= t.verificationCode;\n const [own, setOwn] = useState(defaultValue.slice(0, length));\n const v = (value ?? own).slice(0, length);\n const refs = useRef<Array<HTMLInputElement | null>>([]);\n const id = useId();\n const ok = (c: string) => (type === 'numeric' ? /^\\d$/.test(c) : /^[a-z0-9]$/i.test(c));\n const set = (next: string) => {\n next = next.slice(0, length);\n if (value === undefined) setOwn(next);\n onChange?.(next);\n if (next.length === length && !next.includes(' ')) onComplete?.(next);\n };\n const put = (i: number, chars: string) => {\n const arr = v.padEnd(length, ' ').split('');\n let at = i;\n for (const c of chars.split('').filter(ok)) { if (at >= length) break; arr[at++] = type === 'alphanumeric' ? c.toUpperCase() : c; }\n set(arr.join('').replace(/\\s+$/, ''));\n refs.current[Math.min(at, length - 1)]?.focus();\n };\n const onKey = (i: number, e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Backspace') {\n e.preventDefault();\n const arr = v.padEnd(length, ' ').split('');\n if (arr[i] && arr[i] !== ' ') arr[i] = ' '; else if (i > 0) { arr[i - 1] = ' '; refs.current[i - 1]?.focus(); }\n set(arr.join('').replace(/\\s+$/, ''));\n } else if (e.key === 'ArrowLeft' && i > 0) { e.preventDefault(); refs.current[i - 1]?.focus(); }\n else if (e.key === 'ArrowRight' && i < length - 1) { e.preventDefault(); refs.current[i + 1]?.focus(); }\n };\n return (\n <div className=\"alea-field alea-otp\" data-invalid={isInvalid || undefined} data-disabled={isDisabled || undefined}>\n <span className=\"alea-label\" id={`${id}-label`}>{label}</span>\n <div role=\"group\" aria-labelledby={`${id}-label`} aria-describedby={isInvalid && errorMessage ? `${id}-err` : undefined} className=\"alea-otp-boxes\">\n {Array.from({ length }, (_, i) => (\n <input\n key={i}\n ref={el => { refs.current[i] = el; }}\n className=\"alea-otp-box\"\n aria-label={t.characterNOfTotal(i + 1, length)}\n aria-invalid={isInvalid || undefined}\n inputMode={type === 'numeric' ? 'numeric' : 'text'}\n autoComplete={i === 0 ? 'one-time-code' : 'off'}\n type={mask ? 'password' : 'text'}\n maxLength={length}\n disabled={isDisabled}\n value={(v[i] || '').trim()}\n // one keystroke adds a character (the last one typed); a fill (the phone's code suggestion, a password\n // manager, a pasted code that skipped onPaste) brings the whole code at once and spreads it over the boxes\n onChange={e => { const val = e.target.value; if (val.length > 2) put(i, val); else { const c = val.slice(-1); if (c && ok(c)) put(i, c); } }}\n onKeyDown={e => onKey(i, e)}\n onPaste={(e: ClipboardEvent<HTMLInputElement>) => { e.preventDefault(); put(i, e.clipboardData.getData('text')); }}\n onFocus={e => e.target.select()}\n />\n ))}\n </div>\n {name && <input type=\"hidden\" name={name} value={v.replace(/\\s/g, '')} />}\n {isInvalid && errorMessage && <span id={`${id}-err`} className=\"alea-field-error\">{errorMessage}</span>}\n </div>\n );\n}\n\n// ---------------------------------------------------------------- Cascader\nexport interface CascaderOption { id: Key; label: string; children?: CascaderOption[]; isDisabled?: boolean }\n\nexport interface CascaderProps {\n /** The visible label. */\n label?: ReactNode;\n /** The tree of options: id, label, children. */\n options: CascaderOption[];\n /** The picked path of ids (controlled). */\n value?: Key[];\n /** The path of ids to start with. */\n defaultValue?: Key[];\n /** Called with the path of ids. */\n onChange?: (path: Key[], options: CascaderOption[]) => void;\n /** Shown while there is no value. */\n placeholder?: string;\n /** Lets people pick a parent too, not only the last level. */\n allowsParentSelection?: boolean;\n /** Help text shown under the field. */\n description?: ReactNode;\n /** Disables every part of it. */\n isDisabled?: boolean;\n /** How the popup enters and leaves: a preset (fade, scale, pop, slide-down, blur...), false for none, or options. */\n motion?: MotionProp;\n}\n\nfunction walk(options: CascaderOption[], path: Key[]) {\n const out: CascaderOption[] = [];\n let level = options;\n for (const k of path) { const o = level.find(x => x.id === k); if (!o) break; out.push(o); level = o.children || []; }\n return out;\n}\n\n/** Pick from nested options column by column: country, then city. */\nexport function Cascader({ motion, label, options, value, defaultValue = [], onChange, placeholder, allowsParentSelection, description, isDisabled }: CascaderProps) {\n const t = useStrings(); placeholder ??= t.selectPlaceholder;\n const [own, setOwn] = useState<Key[]>(defaultValue);\n const picked = value ?? own;\n const [open, setOpen] = useState(false);\n const [path, setPath] = useState<Key[]>(picked);\n const id = useId();\n const columns = useMemo(() => { const cols = [options]; walk(options, path).forEach(o => { if (o.children?.length) cols.push(o.children); }); return cols; }, [options, path]);\n const commit = (p: Key[]) => { if (value === undefined) setOwn(p); onChange?.(p, walk(options, p)); setOpen(false); };\n const text = walk(options, picked).map(o => o.label).join(' / ');\n const colRefs = useRef<Array<HTMLDivElement | null>>([]);\n return (\n <div className=\"alea-field alea-cascader\" data-disabled={isDisabled || undefined}>\n {label && <span className=\"alea-label\" id={`${id}-label`}>{label}</span>}\n <DialogTrigger isOpen={open} onOpenChange={o => { setOpen(o); if (o) setPath(picked); }}>\n <RACButton className=\"alea-select-trigger alea-focus-ring\" aria-labelledby={label ? `${id}-label ${id}-value` : undefined} isDisabled={isDisabled}>\n <span id={`${id}-value`} className=\"alea-select-value\" data-placeholder={!text || undefined}>{text || placeholder}</span>\n <ChevronDown size={16} aria-hidden=\"true\" className=\"alea-select-chevron\" />\n </RACButton>\n <Popover className=\"alea-popover alea-cascader-popover\" placement=\"bottom start\" motion={motion}>\n <Dialog aria-label={typeof label === 'string' ? label : t.options} className=\"alea-cascader-columns\">\n {columns.map((col, depth) => (\n <div key={depth} ref={el => { colRefs.current[depth] = el; }} className=\"alea-cascader-col\"\n onKeyDown={(e: React.KeyboardEvent) => {\n if (e.key === 'ArrowLeft' && depth > 0) { (colRefs.current[depth - 1]?.querySelector('[aria-selected=true], [role=option]') as HTMLElement | null)?.focus(); }\n if (e.key === 'ArrowRight') { const k = (document.activeElement as HTMLElement)?.dataset?.key; const o = col.find(x => String(x.id) === k); if (o?.children?.length) { setPath([...path.slice(0, depth), o.id]); setTimeout(() => (colRefs.current[depth + 1]?.querySelector('[role=option]') as HTMLElement | null)?.focus(), 0); } }\n }}>\n <ListBox\n aria-label={depth === 0 ? (typeof label === 'string' ? label : t.options) : walk(options, path)[depth - 1]?.label}\n items={col}\n selectionMode=\"single\"\n selectedKeys={path[depth] !== undefined ? [path[depth]] : []}\n disabledKeys={col.filter(o => o.isDisabled).map(o => o.id)}\n autoFocus={depth === 0 ? 'first' : undefined}\n className=\"alea-listbox\"\n onAction={k => {\n const o = col.find(x => x.id === k)!;\n const p = [...path.slice(0, depth), k];\n if (o.children?.length) { setPath(p); setTimeout(() => (colRefs.current[depth + 1]?.querySelector('[role=option]') as HTMLElement | null)?.focus(), 0); }\n else commit(p);\n }}\n >\n {(o: CascaderOption) => (\n <ListBoxItem id={o.id} textValue={o.label} className=\"alea-option\">\n <span className=\"alea-option-text\">{o.label}</span>\n {o.children?.length ? <ChevronRight size={16} aria-hidden=\"true\" className=\"alea-menu-chevron\" /> : <Check size={16} aria-hidden=\"true\" className=\"alea-option-check\" data-on={picked[depth] === o.id || undefined} />}\n </ListBoxItem>\n )}\n </ListBox>\n {allowsParentSelection && depth > 0 && <Button size=\"sm\" variant=\"ghost\" onPress={() => commit(path.slice(0, depth))}>Choose “{walk(options, path)[depth - 1]?.label}”</Button>}\n </div>\n ))}\n </Dialog>\n </Popover>\n </DialogTrigger>\n {description && <span className=\"alea-description\">{description}</span>}\n </div>\n );\n}\n\n// ---------------------------------------------------------------- TreeSelect\nexport interface TreeSelectNode { id: Key; label: string; children?: TreeSelectNode[] }\n\nexport interface TreeSelectProps {\n /** The visible label. */\n label?: ReactNode;\n /** The tree: id, label, children. */\n nodes: TreeSelectNode[];\n /** single (default) or multiple. */\n selectionMode?: 'single' | 'multiple';\n /** The selected id (controlled). */\n value?: Key[];\n /** The selected id to start with. */\n defaultValue?: Key[];\n /** Called with the selected id. */\n onChange?: (keys: Key[]) => void;\n /** Shown while there is no value. */\n placeholder?: string;\n /** Disables every part of it. */\n isDisabled?: boolean;\n /** How the popup enters and leaves: a preset (fade, scale, pop, slide-down, blur...), false for none, or options. */\n motion?: MotionProp;\n}\n\nfunction flat(nodes: TreeSelectNode[], out = new Map<Key, TreeSelectNode>()) { nodes.forEach(n => { out.set(n.id, n); if (n.children) flat(n.children, out); }); return out; }\nfunction renderNodes(nodes: TreeSelectNode[]): ReactNode { return nodes.map(n => <TreeItem key={String(n.id)} id={n.id} title={n.label} textValue={n.label}>{n.children ? renderNodes(n.children) : null}</TreeItem>); }\n\n/** A select whose options are a tree: categories, folders, org charts. */\nexport function TreeSelect({ motion, label, nodes, selectionMode = 'single', value, defaultValue = [], onChange, placeholder, isDisabled }: TreeSelectProps) {\n const t = useStrings(); placeholder ??= t.selectPlaceholder;\n const [own, setOwn] = useState<Key[]>(defaultValue);\n const keys = value ?? own;\n const [open, setOpen] = useState(false);\n const byId = useMemo(() => flat(nodes), [nodes]);\n const id = useId();\n const text = keys.map(k => byId.get(k)?.label).filter(Boolean).join(', ');\n return (\n <div className=\"alea-field alea-treeselect\" data-disabled={isDisabled || undefined}>\n {label && <span className=\"alea-label\" id={`${id}-label`}>{label}</span>}\n <DialogTrigger isOpen={open} onOpenChange={setOpen}>\n <RACButton className=\"alea-select-trigger alea-focus-ring\" aria-labelledby={label ? `${id}-label ${id}-value` : undefined} isDisabled={isDisabled}>\n <span id={`${id}-value`} className=\"alea-select-value\" data-placeholder={!text || undefined}>{text || placeholder}</span>\n <ChevronDown size={16} aria-hidden=\"true\" className=\"alea-select-chevron\" />\n </RACButton>\n <Popover className=\"alea-popover alea-select-popover\" placement=\"bottom start\" motion={motion}>\n <Dialog aria-label={typeof label === 'string' ? label : t.options} className=\"alea-treeselect-dialog\">\n <Tree\n aria-label={typeof label === 'string' ? label : t.options}\n selectionMode={selectionMode}\n selectionBehavior={selectionMode === 'multiple' ? 'toggle' : 'replace'}\n selectedKeys={keys}\n defaultExpandedKeys={keys.length ? undefined : nodes.map(n => n.id)}\n autoFocus\n onSelectionChange={(s: Selection) => {\n const next = s === 'all' ? [...byId.keys()] : [...s];\n if (value === undefined) setOwn(next);\n onChange?.(next);\n if (selectionMode === 'single') setOpen(false);\n }}\n >\n {renderNodes(nodes)}\n </Tree>\n </Dialog>\n </Popover>\n </DialogTrigger>\n </div>\n );\n}\n\n// ---------------------------------------------------------------- Transfer\nexport interface TransferItem { id: Key; label: string; description?: string; isDisabled?: boolean }\n\nexport interface TransferProps {\n /** All the items: id and label. */\n items: TransferItem[];\n /** Ids on the right side (controlled). */\n value?: Key[];\n /** The ids on the right to start with. */\n defaultValue?: Key[];\n /** Called with the ids on the right. */\n onChange?: (keys: Key[]) => void;\n /** Titles of the two lists. */\n titles?: [string, string];\n /** Adds a search field to each list. */\n searchable?: boolean;\n}\n\n/** Move items between two lists: available and chosen. */\nexport function Transfer({ items, value, defaultValue = [], onChange, titles, searchable }: TransferProps) {\n const t = useStrings(); titles ??= [t.available, t.chosen];\n const [own, setOwn] = useState<Key[]>(defaultValue);\n const right = value ?? own;\n const [selLeft, setSelLeft] = useState<Set<Key>>(new Set());\n const [selRight, setSelRight] = useState<Set<Key>>(new Set());\n const [q, setQ] = useState(['', '']);\n const { contains } = useFilter({ sensitivity: 'base' });\n const set = (k: Key[]) => { if (value === undefined) setOwn(k); onChange?.(k); };\n const leftItems = items.filter(i => !right.includes(i.id) && contains(i.label, q[0]));\n const rightItems = items.filter(i => right.includes(i.id) && contains(i.label, q[1]));\n const side = (n: 0 | 1, list: TransferItem[], sel: Set<Key>, setSel: (s: Set<Key>) => void) => (\n <section className=\"alea-transfer-side\" aria-labelledby={`alea-transfer-${n}`}>\n <header className=\"alea-transfer-head\"><h3 id={`alea-transfer-${n}`}>{titles[n]}</h3><span>{sel.size ? t.nOfTotal(sel.size, list.length) : list.length}</span></header>\n {searchable && <SearchField aria-label={t.searchIn(titles[n])} size=\"sm\" value={q[n]} onChange={v => setQ(n ? [q[0], v] : [v, q[1]])} />}\n <ListView aria-label={titles[n]} selectionMode=\"multiple\" selectedKeys={sel} onSelectionChange={s => setSel(s === 'all' ? new Set(list.map(i => i.id)) : new Set(s))} disabledKeys={list.filter(i => i.isDisabled).map(i => i.id)} items={list} renderEmptyState={() => <p className=\"alea-transfer-empty\">Nothing here</p>} className=\"alea-transfer-list\">\n {(i: TransferItem) => <ListItem id={i.id} description={i.description}>{i.label}</ListItem>}\n </ListView>\n </section>\n );\n return (\n <div className=\"alea-transfer\">\n {side(0, leftItems, selLeft, setSelLeft)}\n <div className=\"alea-transfer-actions\">\n <Button size=\"sm\" variant=\"secondary\" isDisabled={!selLeft.size} aria-label={t.moveTo(selLeft.size, titles[1])} onPress={() => { set([...right, ...selLeft]); setSelLeft(new Set()); }}><ChevronsRight /></Button>\n <Button size=\"sm\" variant=\"ghost\" isDisabled={!selRight.size} aria-label={t.moveTo(selRight.size, titles[0])} onPress={() => { set(right.filter(k => !selRight.has(k))); setSelRight(new Set()); }}><ChevronsLeft /></Button>\n </div>\n {side(1, rightItems, selRight, setSelRight)}\n </div>\n );\n}\n\n// ---------------------------------------------------------------- Mentions\nexport interface MentionsProps {\n /** The visible label. */\n label?: ReactNode;\n /** People or things to mention. */\n options: Array<{ id: string; label: string; description?: string }>;\n /** The text (controlled). */\n value?: string;\n /** The text to start with. */\n defaultValue?: string;\n /** Called with the text. */\n onChange?: (value: string) => void;\n /** Character that starts a mention. Default @. */\n trigger?: string;\n /** Shown while there is no value. */\n placeholder?: string;\n /** Rows of the text area. Default 3. */\n rows?: number;\n /** Help text shown under the field. */\n description?: ReactNode;\n}\n\n/** A text area where @ suggests people to mention; arrows pick, Enter inserts. */\nexport function Mentions({ label, options, value, defaultValue = '', onChange, trigger = '@', placeholder, rows = 3, description }: MentionsProps) {\n const t = useStrings();\n const [own, setOwn] = useState(defaultValue);\n const text = value ?? own;\n const ref = useRef<HTMLTextAreaElement>(null);\n const [query, setQuery] = useState<{ start: number; q: string } | null>(null);\n const [active, setActive] = useState(0);\n const id = useId();\n const { startsWith } = useFilter({ sensitivity: 'base' });\n const hits = query ? options.filter(o => startsWith(o.label, query.q) || startsWith(o.id, query.q)).slice(0, 8) : [];\n const open = !!query && hits.length > 0;\n const set = (t: string) => { if (value === undefined) setOwn(t); onChange?.(t); };\n const look = (t: string, caret: number) => {\n const before = t.slice(0, caret);\n const m = new RegExp(`(^|\\\\s)${trigger.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')}([\\\\w.-]*)$`).exec(before);\n setQuery(m ? { start: caret - m[2].length - trigger.length, q: m[2] } : null);\n setActive(0);\n };\n const insert = (o: { label: string; id: string }) => {\n if (!query) return;\n const caret = ref.current?.selectionStart ?? text.length;\n const next = text.slice(0, query.start) + trigger + o.id + ' ' + text.slice(caret);\n set(next); setQuery(null);\n const pos = query.start + trigger.length + o.id.length + 1;\n requestAnimationFrame(() => { ref.current?.focus(); ref.current?.setSelectionRange(pos, pos); });\n };\n useEffect(() => { if (active >= hits.length) setActive(0); }, [hits.length, active]);\n return (\n <div className=\"alea-field alea-mentions\">\n {label && <label className=\"alea-label\" htmlFor={`${id}-ta`}>{label}</label>}\n <div className=\"alea-mentions-wrap\">\n <textarea\n ref={ref}\n id={`${id}-ta`}\n className=\"alea-input alea-textarea\"\n rows={rows}\n placeholder={placeholder}\n value={text}\n aria-autocomplete=\"list\"\n aria-controls={`${id}-list`}\n aria-activedescendant={open ? `${id}-opt-${active}` : undefined}\n aria-describedby={description ? `${id}-desc` : undefined}\n onChange={e => { set(e.target.value); look(e.target.value, e.target.selectionStart); }}\n onKeyDown={e => {\n if (!open) return;\n if (e.key === 'ArrowDown') { e.preventDefault(); setActive(a => (a + 1) % hits.length); }\n else if (e.key === 'ArrowUp') { e.preventDefault(); setActive(a => (a - 1 + hits.length) % hits.length); }\n else if (e.key === 'Enter' || e.key === 'Tab') { e.preventDefault(); insert(hits[active]); }\n else if (e.key === 'Escape') { e.preventDefault(); setQuery(null); }\n }}\n onBlur={() => setTimeout(() => setQuery(null), 120)}\n />\n <ul id={`${id}-list`} role=\"listbox\" aria-label={t.suggestions} className=\"alea-popover alea-mentions-list\" hidden={!open}>\n {hits.map((o, i) => (\n <li key={o.id} id={`${id}-opt-${i}`} role=\"option\" aria-selected={i === active} className=\"alea-option\" data-focused={i === active || undefined} onMouseDown={e => { e.preventDefault(); insert(o); }}>\n <span className=\"alea-option-text\"><span>{o.label}</span><span className=\"alea-option-desc\">{trigger}{o.id}{o.description ? ` · ${o.description}` : ''}</span></span>\n </li>\n ))}\n </ul>\n </div>\n <span className=\"alea-visually-hidden\" role=\"status\">{open ? `${hits.length} suggestion${hits.length === 1 ? '' : 's'}, arrows to choose, Enter to insert` : ''}</span>\n {description && <span id={`${id}-desc`} className=\"alea-description\">{description}</span>}\n </div>\n );\n}\n"},{"path":"components/picker/Wheel.tsx","content":"import { useEffect, useRef, useState, type KeyboardEvent, type ReactNode } from 'react';\nimport { DialogTrigger, Button as RACButton, Dialog } from 'react-aria-components';\nimport { Clock } from 'lucide-react';\nimport { cx } from '../../utils/cx';\nimport { useControlled } from '../../utils/controlled';\nimport { Popover } from '../overlay/Overlay';\nimport { Button } from '../button/Button';\nimport { SegmentedControl } from '../button/Button';\nimport { useStrings } from '../../i18n/strings';\n\n// ---------------------------------------------------------------- WheelPicker\n\nexport interface WheelColumn<V extends string | number = string | number> {\n /** The column's id, the key in value. */\n id: string;\n /** Name for screen readers (\"Hour\", \"Size\"). */\n label: string;\n /** The choices, top to bottom. */\n items: Array<{ value: V; label: ReactNode; textValue?: string }>;\n /** Wraps around: after the last comes the first (hours, minutes). */\n loop?: boolean;\n}\n\nexport interface WheelPickerProps {\n /** One or more columns side by side. */\n columns: WheelColumn[];\n /** The picked value of each column, by column id (controlled). */\n value?: Record<string, string | number>;\n /** The picked values at first. Default the first item of each column. */\n defaultValue?: Record<string, string | number>;\n /** Called with every column's value when one changes. */\n onChange?: (value: Record<string, string | number>) => void;\n /** How many rows show. Odd numbers center the pick. Default 5. */\n visibleRows?: number;\n /** Row height in px. Default 40 (44 on touch screens). */\n rowHeight?: number;\n /** Name of the whole picker. */\n 'aria-label'?: string;\n /** Extra class names. */\n className?: string;\n}\n\nconst ROW = 40;\n\nfunction WheelCol({ col, value, onChange, rows, rowHeight }: { col: WheelColumn; value: string | number; onChange: (v: string | number) => void; rows: number; rowHeight: number }) {\n const scroller = useRef<HTMLDivElement>(null);\n const index = Math.max(0, col.items.findIndex(i => i.value === value));\n const settling = useRef(false);\n // scroll to the picked row when the value changes from outside\n useEffect(() => {\n const el = scroller.current;\n if (!el || settling.current) return;\n const top = index * rowHeight;\n if (Math.abs(el.scrollTop - top) > 1) el.scrollTo({ top, behavior: el.dataset.ready ? 'smooth' : 'auto' });\n el.dataset.ready = '1';\n }, [index, rowHeight]);\n // when scrolling stops, the row in the middle is the pick\n useEffect(() => {\n const el = scroller.current;\n if (!el) return;\n let timer = 0;\n const settle = () => {\n const i = Math.min(col.items.length - 1, Math.max(0, Math.round(el.scrollTop / rowHeight)));\n settling.current = false;\n if (col.items[i] && col.items[i].value !== value) onChange(col.items[i].value);\n };\n const on = () => { settling.current = true; clearTimeout(timer); timer = window.setTimeout(settle, 120); };\n el.addEventListener('scroll', on, { passive: true });\n return () => { el.removeEventListener('scroll', on); clearTimeout(timer); };\n }, [col.items, value, rowHeight, onChange]);\n const step = (d: number) => {\n let i = index + d;\n if (col.loop) i = (i + col.items.length) % col.items.length; else i = Math.min(col.items.length - 1, Math.max(0, i));\n onChange(col.items[i].value);\n };\n const onKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {\n const map: Record<string, () => void> = { ArrowUp: () => step(-1), ArrowDown: () => step(1), PageUp: () => step(-5), PageDown: () => step(5), Home: () => onChange(col.items[0].value), End: () => onChange(col.items[col.items.length - 1].value) };\n if (map[e.key]) { e.preventDefault(); map[e.key](); }\n };\n const item = col.items[index];\n const pad = Math.floor(rows / 2) * rowHeight;\n return (\n <div className=\"alea-wheel-col\" role=\"spinbutton\" tabIndex={0} aria-label={col.label} aria-valuenow={index} aria-valuemin={0} aria-valuemax={col.items.length - 1}\n aria-valuetext={item?.textValue ?? (typeof item?.label === 'string' ? item.label : String(item?.value ?? ''))} onKeyDown={onKeyDown}>\n <div ref={scroller} className=\"alea-wheel-scroll\" style={{ height: rows * rowHeight, paddingBlock: pad, scrollPaddingBlock: pad }} aria-hidden=\"true\">\n {col.items.map((it, i) => (\n <div key={String(it.value)} className=\"alea-wheel-item\" data-selected={i === index || undefined} style={{ height: rowHeight }} onClick={() => onChange(it.value)}>{it.label}</div>\n ))}\n </div>\n </div>\n );\n}\n\n/** Scrolling wheels to pick from, like a phone's picker: one or several columns (hours and minutes, size and color). Swipe, scroll, click a row, or use the arrow keys. */\nexport function WheelPicker({ columns, value, defaultValue, onChange, visibleRows = 5, rowHeight = ROW, className, 'aria-label': label }: WheelPickerProps) {\n const first = Object.fromEntries(columns.map(c => [c.id, c.items[0]?.value]));\n const [val, setVal] = useControlled<Record<string, string | number>>(value, { ...first, ...defaultValue }, onChange);\n return (\n <div className={cx('alea-wheel', className)} role=\"group\" aria-label={label} style={{ ['--alea-wheel-row' as string]: `${rowHeight}px` }}>\n <span className=\"alea-wheel-band\" aria-hidden=\"true\" />\n {columns.map(c => <WheelCol key={c.id} col={c} value={val[c.id]} rows={visibleRows} rowHeight={rowHeight} onChange={v => setVal({ ...val, [c.id]: v })} />)}\n </div>\n );\n}\n\n// ---------------------------------------------------------------- TimePicker\n\nexport interface TimeValue24 { hour: number; minute: number }\n\nexport interface TimePickerProps {\n /** The visible label. */\n label?: ReactNode;\n /** The time (controlled), 24 h. */\n value?: TimeValue24 | null;\n /** The time at first. */\n defaultValue?: TimeValue24 | null;\n /** Called with the new time. */\n onChange?: (value: TimeValue24) => void;\n /** 12 h with AM and PM (default for the locale's convention when left out) or 24 h. */\n hourCycle?: 12 | 24;\n /** Minutes step on the dial. Default 5. */\n minuteStep?: number;\n /** How to pick: a clock dial (default) or wheels. */\n input?: 'dial' | 'wheel';\n /** Help text under the field. */\n description?: ReactNode;\n /** Disables it. */\n isDisabled?: boolean;\n /** Extra class names. */\n className?: string;\n}\n\nconst pad2 = (n: number) => String(n).padStart(2, '0');\n\n/** A time field with a clock dial (or wheels) in a popover: pick the hour, then the minutes, then AM or PM. Every number on the dial is a button, so it works with the keyboard and screen readers. */\nexport function TimePicker({ label, value, defaultValue = null, onChange, hourCycle, minuteStep = 5, input = 'dial', description, isDisabled, className }: TimePickerProps) {\n const t = useStrings();\n const cycle = hourCycle ?? (new Intl.DateTimeFormat(undefined, { hour: 'numeric' }).resolvedOptions().hourCycle?.startsWith('h1') ? 12 : 24);\n const [val, setVal] = useControlled<TimeValue24 | null>(value, defaultValue, onChange as any);\n const [stage, setStage] = useState<'hour' | 'minute'>('hour');\n const cur = val ?? { hour: 9, minute: 0 };\n const pm = cur.hour >= 12;\n const shown = val ? (cycle === 12 ? `${((cur.hour + 11) % 12) + 1}:${pad2(cur.minute)} ${pm ? 'PM' : 'AM'}` : `${pad2(cur.hour)}:${pad2(cur.minute)}`) : '';\n const setHour = (h: number) => setVal({ hour: cycle === 12 ? (h % 12) + (pm ? 12 : 0) : h, minute: cur.minute });\n const dial = (stage === 'hour' ? (cycle === 12 ? Array.from({ length: 12 }, (_, i) => i + 1) : Array.from({ length: 24 }, (_, i) => i)) : Array.from({ length: 60 / minuteStep }, (_, i) => i * minuteStep));\n const current = stage === 'hour' ? (cycle === 12 ? ((cur.hour + 11) % 12) + 1 : cur.hour) : cur.minute;\n const pos = (i: number, n: number, inner = false) => {\n const a = (i / n) * 2 * Math.PI - Math.PI / 2, r = inner ? 30 : 42;\n return { left: `${50 + r * Math.cos(a)}%`, top: `${50 + r * Math.sin(a)}%` };\n };\n return (\n <div className={cx('alea-field alea-time-picker', className)} data-disabled={isDisabled || undefined}>\n {label && <span className=\"alea-label\" aria-hidden=\"true\">{label}</span>}\n <DialogTrigger onOpenChange={o => o && setStage('hour')}>\n <RACButton className=\"alea-input-wrap alea-time-trigger alea-focus-ring\" isDisabled={isDisabled} aria-label={`${typeof label === 'string' ? label + ', ' : ''}${shown || t.pickTime}`}>\n <span className=\"alea-input alea-time-value\" data-placeholder={!val || undefined}>{shown || '--:--'}</span>\n <span className=\"alea-input-affix\" data-side=\"end\" aria-hidden=\"true\"><Clock size={16} /></span>\n </RACButton>\n <Popover placement=\"bottom start\" className=\"alea-popover alea-time-popover\">\n <Dialog className=\"alea-time-dialog\" aria-label={t.pickTime}>\n {({ close }) => (\n <>\n <div className=\"alea-time-head\">\n <button type=\"button\" className=\"alea-time-part alea-focus-ring\" data-active={stage === 'hour' || undefined} onClick={() => setStage('hour')}>{cycle === 12 ? ((cur.hour + 11) % 12) + 1 : pad2(cur.hour)}</button>\n <span aria-hidden=\"true\">:</span>\n <button type=\"button\" className=\"alea-time-part alea-focus-ring\" data-active={stage === 'minute' || undefined} onClick={() => setStage('minute')}>{pad2(cur.minute)}</button>\n {cycle === 12 && <SegmentedControl size=\"sm\" aria-label=\"AM or PM\" items={[{ id: 'am', label: 'AM' }, { id: 'pm', label: 'PM' }]} value={pm ? 'pm' : 'am'} onChange={k => setVal({ hour: (cur.hour % 12) + (k === 'pm' ? 12 : 0), minute: cur.minute })} />}\n </div>\n {input === 'dial' ? (\n <div className=\"alea-clock\" role=\"group\" aria-label={stage === 'hour' ? t.hours : t.minutes}>\n <span className=\"alea-clock-center\" aria-hidden=\"true\" />\n <span className=\"alea-clock-hand\" aria-hidden=\"true\" style={{ transform: `rotate(${stage === 'hour' ? ((current % 12) / 12) * 360 : (cur.minute / 60) * 360}deg)`, height: cycle === 24 && stage === 'hour' && (cur.hour === 0 || cur.hour > 12) ? '30%' : '42%' }} />\n {dial.map((n, i) => {\n const inner = cycle === 24 && stage === 'hour' && (n === 0 || n > 12);\n const k = stage === 'hour' ? (cycle === 24 && inner ? (n === 0 ? 0 : n - 12) : n) % 12 : i;\n return (\n <button key={n} type=\"button\" className=\"alea-clock-num alea-focus-ring\" data-inner={inner || undefined} data-selected={n === current || undefined}\n style={pos(k, stage === 'hour' ? 12 : dial.length, inner)} aria-pressed={n === current}\n aria-label={stage === 'hour' ? t.hourN(n) : t.minuteN(n)}\n onClick={() => { if (stage === 'hour') { setHour(n); setStage('minute'); } else setVal({ hour: cur.hour, minute: n }); }}>\n {stage === 'minute' ? pad2(n) : n}\n </button>\n );\n })}\n </div>\n ) : (\n <WheelPicker aria-label={t.pickTime} visibleRows={5}\n columns={[\n { id: 'h', label: t.hours, loop: true, items: (cycle === 12 ? Array.from({ length: 12 }, (_, i) => i + 1) : Array.from({ length: 24 }, (_, i) => i)).map(h => ({ value: h, label: cycle === 12 ? h : pad2(h) })) },\n { id: 'm', label: t.minutes, loop: true, items: Array.from({ length: 60 / minuteStep }, (_, i) => i * minuteStep).map(m => ({ value: m, label: pad2(m) })) },\n ]}\n value={{ h: cycle === 12 ? ((cur.hour + 11) % 12) + 1 : cur.hour, m: cur.minute }}\n onChange={v => setVal({ hour: cycle === 12 ? (Number(v.h) % 12) + (pm ? 12 : 0) : Number(v.h), minute: Number(v.m) })} />\n )}\n <div className=\"alea-time-foot\"><Button size=\"sm\" onPress={close}>{t.done}</Button></div>\n </>\n )}\n </Dialog>\n </Popover>\n </DialogTrigger>\n {description && <span className=\"alea-description\">{description}</span>}\n </div>\n );\n}\n"},{"path":"components/picker/picker.css","content":".alea-otp-boxes { display: flex; gap: var(--alea-space-2); }\n.alea-otp-box {\n width: 48px; height: 56px; padding: 0;\n border: 0; border-radius: var(--alea-radius-sm);\n background: var(--alea-field-bg); color: var(--alea-text);\n box-shadow: inset 0 0 0 1px var(--alea-border-strong);\n font: var(--alea-font-weight-semibold) 22px/1 var(--alea-font-family-mono); text-align: center;\n caret-color: var(--alea-accent);\n transition: box-shadow var(--alea-motion-duration-fast) var(--alea-motion-ease-standard);\n}\n.alea-otp-box:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--alea-focus), 0 0 0 4px var(--alea-focus-halo); }\n.alea-otp[data-invalid] .alea-otp-box { box-shadow: inset 0 0 0 1.5px var(--alea-status-danger); }\n.alea-otp[data-invalid] .alea-otp-box:focus { box-shadow: inset 0 0 0 1.5px var(--alea-status-danger), 0 0 0 2px var(--alea-bg), 0 0 0 4px var(--alea-focus); }\n.alea-otp-box:disabled { opacity: 0.5; }\n@media (max-width: 420px) { .alea-otp-box { width: 40px; height: 48px; font-size: 18px; } }\n\n.alea-cascader-popover { padding: var(--alea-space-1); max-width: calc(100vw - 24px); overflow-x: auto; }\n.alea-cascader-columns { display: flex; outline: none; }\n.alea-cascader-col { display: flex; flex-direction: column; gap: var(--alea-space-1); min-width: 180px; max-height: 300px; overflow-y: auto; padding: 0 var(--alea-space-1); }\n.alea-cascader-col + .alea-cascader-col { border-left: 1px solid var(--alea-border); }\n.alea-treeselect-dialog { outline: none; padding: var(--alea-space-1); min-width: 240px; max-height: 340px; overflow: auto; }\n\n.alea-transfer { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--alea-space-3); align-items: center; }\n@media (max-width: 640px) { .alea-transfer { grid-template-columns: minmax(0, 1fr); } .alea-transfer-actions { flex-direction: row !important; justify-content: center; } }\n.alea-transfer-side { display: flex; flex-direction: column; gap: var(--alea-space-2); min-width: 0; padding: var(--alea-space-3); border-radius: var(--alea-radius-md); background: var(--alea-surface); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-transfer-head { display: flex; justify-content: space-between; align-items: baseline; }\n.alea-transfer-head h3 { margin: 0; font: var(--alea-font-weight-semibold) var(--alea-font-size-md) / 1.3 var(--alea-font-family-body); }\n.alea-transfer-head span { font-size: var(--alea-font-size-xs); color: var(--alea-text-muted); }\n.alea-transfer-list { max-height: 260px; overflow-y: auto; min-height: 160px; }\n.alea-transfer-list .alea-list-item { min-height: 44px; }\n.alea-transfer-empty { margin: 0; padding: var(--alea-space-6); text-align: center; color: var(--alea-text-faint); font-size: var(--alea-font-size-sm); }\n.alea-transfer-actions { display: flex; flex-direction: column; gap: var(--alea-space-2); }\n.alea-transfer-actions .alea-button { --alea-button-pad: 0; width: 40px; }\n\n.alea-mentions-wrap { position: relative; }\n.alea-mentions-list { position: absolute; left: 0; top: calc(100% + var(--alea-space-2)); margin: 0; padding: var(--alea-space-1); list-style: none; width: min(320px, 100%); max-height: 260px; overflow-y: auto; }\n.alea-mentions-list[hidden] { display: none; }\n\n/* WheelPicker */\n.alea-wheel { --alea-wheel-row: 40px; position: relative; display: flex; justify-content: center; gap: var(--alea-space-1); padding: 0 var(--alea-space-2); border-radius: var(--alea-radius-lg); background: var(--alea-surface-deep); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-wheel-band { position: absolute; left: var(--alea-space-2); right: var(--alea-space-2); top: 50%; height: var(--alea-wheel-row); translate: 0 -50%; border-radius: var(--alea-radius-sm); background: var(--alea-surface-raised); box-shadow: inset 0 0 0 1px var(--alea-border); pointer-events: none; }\n.alea-wheel-col { position: relative; flex: 1; min-width: 56px; border-radius: var(--alea-radius-sm); outline: none; }\n.alea-wheel-col:focus-visible { box-shadow: 0 0 0 2px var(--alea-focus); }\n.alea-wheel-scroll { overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; box-sizing: border-box; mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 65%, transparent); }\n.alea-wheel-scroll::-webkit-scrollbar { display: none; }\n.alea-wheel-item { display: grid; place-items: center; padding: 0 var(--alea-space-3); scroll-snap-align: center; color: var(--alea-text-muted); font-size: var(--alea-font-size-base); font-variant-numeric: tabular-nums; white-space: nowrap; cursor: pointer; user-select: none; transition: color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), transform var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-wheel-item[data-selected] { color: var(--alea-text); font-weight: var(--alea-font-weight-semibold); transform: scale(1.06); }\n@media (pointer: coarse) { .alea-wheel { --alea-wheel-row: 44px; } }\n\n/* TimePicker */\n.alea-time-trigger { justify-content: space-between; width: 100%; padding: 0; border: 0; cursor: pointer; text-align: start; }\n.alea-time-value { display: flex; align-items: center; font-variant-numeric: tabular-nums; }\n.alea-time-value[data-placeholder] { color: var(--alea-text-faint); }\n.alea-time-dialog { display: flex; flex-direction: column; gap: var(--alea-space-4); padding: var(--alea-space-2); outline: none; min-width: 260px; }\n.alea-time-head { display: flex; align-items: center; justify-content: center; gap: var(--alea-space-2); font: var(--alea-font-weight-semibold) 32px / 1 var(--alea-font-family-body); font-variant-numeric: tabular-nums; }\n.alea-time-part { min-width: 64px; padding: var(--alea-space-2) var(--alea-space-3); border: 0; border-radius: var(--alea-radius-md); background: var(--alea-surface-raised); color: var(--alea-text-muted); font: inherit; cursor: pointer; }\n.alea-time-part[data-active] { background: var(--alea-accent-subtle); color: var(--alea-text); box-shadow: inset 0 0 0 1.5px var(--alea-accent); }\n.alea-time-head .alea-segmented { margin-left: var(--alea-space-2); }\n.alea-clock { position: relative; width: 240px; height: 240px; margin: 0 auto; border-radius: 50%; background: var(--alea-surface-raised); }\n.alea-clock-center { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; translate: -50% -50%; border-radius: 50%; background: var(--alea-accent); }\n.alea-clock-hand { position: absolute; left: 50%; bottom: 50%; width: 2px; translate: -50% 0; transform-origin: 50% 100%; background: var(--alea-accent); transition: transform var(--alea-motion-duration-base) var(--alea-motion-ease-out), height var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-clock-num { position: absolute; display: grid; place-items: center; width: 36px; height: 36px; translate: -50% -50%; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--alea-text); font: var(--alea-font-weight-medium) var(--alea-font-size-md) / 1 var(--alea-font-family-body); font-variant-numeric: tabular-nums; cursor: pointer; z-index: 1; }\n.alea-clock-num[data-inner] { width: 32px; height: 32px; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n.alea-clock-num:hover { background: var(--alea-surface-hover); }\n.alea-clock-num[data-selected] { background: var(--alea-accent); color: var(--alea-accent-on); }\n.alea-time-foot { display: flex; justify-content: flex-end; }\n"}],"deps":["overlay","list","tree","button","field"],"npm":["react-aria-components","lucide-react","@alea-design/motion"],"exports":["OTPField","Cascader","TreeSelect","Transfer","Mentions","WheelPicker","TimePicker"],"descriptions":{"OTPField":"One-time codes in separate boxes: paste the whole code, arrows and Backspace move between boxes.","Cascader":"Pick from nested options column by column: country, then city.","TreeSelect":"A select whose options are a tree: categories, folders, org charts.","Transfer":"Move items between two lists: available and chosen.","Mentions":"A text area where @ suggests people to mention; arrows pick, Enter inserts.","WheelPicker":"Scrolling wheels to pick from, like a phone's picker: one or several columns (hours and minutes, size and color). Swipe, scroll, click a row, or use the arrow keys.","TimePicker":"A time field with a clock dial (or wheels) in a popover: pick the hour, then the minutes, then AM or PM. Every number on the dial is a button, so it works with the keyboard and screen readers."}},"rating":{"files":[{"path":"components/rating/Rating.tsx","content":"import { RadioGroup, Radio, Label } from 'react-aria-components';\nimport { Star } from 'lucide-react';\nimport { useState, type ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\nimport { ratingIcon } from '../icon/icon-contexts';\nimport { useStrings } from '../../i18n/strings';\n\nexport interface RatingProps {\n /** Name of the rating (\"Rate this plugin\"). */\n label?: ReactNode;\n /** The rating (controlled), 0 for none. Halves with allowHalf. */\n value?: number;\n /** The rating to start with. */\n defaultValue?: number;\n /** Called with the new rating. */\n onChange?: (value: number) => void;\n /** Number of icons. Default 5. */\n max?: number;\n /** Lets people pick halves (3.5). Shown values can always be halves. */\n allowHalf?: boolean;\n /** Pressing the current value again clears it to 0. Default true. */\n allowClear?: boolean;\n /** The icon: a star by default, or any icon (a heart, a flame). */\n icon?: ReactNode;\n /** The color of the filled icons: warning (amber, default), accent, danger or success. */\n tone?: 'warning' | 'accent' | 'danger' | 'success';\n /** Shows the number after the icons (\"4.5\"), or the value's words with \"label\". */\n showValue?: boolean | 'label';\n /** Shows the value without letting people change it. */\n isReadOnly?: boolean;\n /** Disables every part of it. */\n isDisabled?: boolean;\n /** sm, md (default) or lg. */\n size?: 'sm' | 'md' | 'lg';\n /** Words for each value, read by screen readers (\"1 star\" by default), and shown with showValue=\"label\". */\n getValueLabel?: (n: number) => string;\n /** Extra class names for the root element. */\n className?: string;\n}\n\nfunction Glyph({ fill, icon, tone }: { fill: number; icon?: ReactNode; tone?: string }) {\n // fill: 0, 0.5 or 1; the filled copy is clipped to show a half\n const g = icon ?? <Star />;\n return (\n <span className=\"alea-rating-glyph\" aria-hidden=\"true\">\n <span className=\"alea-rating-base\" {...ratingIcon('empty')}>{g}</span>\n {fill > 0 && <span className=\"alea-rating-fill\" {...ratingIcon('filled', tone)} style={{ clipPath: fill < 1 ? 'inset(0 50% 0 0)' : undefined }}>{g}</span>}\n </span>\n );\n}\n\n/** Icons to rate something: stars or your own icon, halves, clear by pressing again, the value shown, four tones. Arrows move, like radios. */\nexport function Rating({ label, value, defaultValue = 0, onChange, max = 5, allowHalf, allowClear = true, icon, tone, showValue, isReadOnly, isDisabled, size = 'md', getValueLabel, className }: RatingProps) {\n const t = useStrings(); getValueLabel ??= t.starsN;\n const [own, setOwn] = useState(defaultValue);\n const v = value ?? own;\n const [hover, setHover] = useState(0);\n const shown = hover || v;\n const fillOf = (i: number) => (shown >= i + 1 ? 1 : shown >= i + 0.5 ? 0.5 : 0);\n const set = (n: number) => { const next = allowClear && n === v ? 0 : n; if (value === undefined) setOwn(next); onChange?.(next); };\n const fmt = (n: number) => (Number.isInteger(n) ? String(n) : n.toFixed(1));\n const after = showValue ? <span className=\"alea-rating-value\">{showValue === 'label' ? (v ? getValueLabel(v) : '') : fmt(v)}</span> : null;\n if (isReadOnly) {\n return (\n <span role=\"img\" aria-label={t.outOf(getValueLabel(v), max)} className={cx('alea-rating', className)} data-size={size} data-tone={tone} data-readonly>\n {Array.from({ length: max }, (_, i) => <Glyph key={i} fill={fillOf(i)} icon={icon} tone={tone} />)}{after}\n </span>\n );\n }\n const steps = allowHalf ? Array.from({ length: max * 2 }, (_, i) => (i + 1) / 2) : Array.from({ length: max }, (_, i) => i + 1);\n return (\n <RadioGroup\n value={v ? String(v) : null}\n onChange={s => set(Number(s))}\n isDisabled={isDisabled}\n orientation=\"horizontal\"\n className={cx('alea-rating-group', className)}\n aria-label={label ? undefined : t.ratingLabel}\n >\n {label && <Label className=\"alea-label\">{label}</Label>}\n <div className=\"alea-rating\" data-size={size} data-tone={tone} data-half={allowHalf || undefined} onMouseLeave={() => setHover(0)}>\n {Array.from({ length: max }, (_, i) => (\n <span key={i} className=\"alea-rating-cell\">\n <Glyph fill={fillOf(i)} icon={icon} tone={tone} />\n {steps.filter(n => n > i && n <= i + 1).map(n => (\n <Radio key={n} value={String(n)} aria-label={getValueLabel(n)} className=\"alea-rating-item\" data-part={allowHalf ? (n === i + 0.5 ? 'left' : 'right') : 'whole'}\n onHoverStart={() => setHover(n)} onPress={() => { if (n === v && allowClear) set(n); }} />\n ))}\n </span>\n ))}\n {after}\n </div>\n </RadioGroup>\n );\n}\n"},{"path":"components/rating/rating.css","content":".alea-rating-group { display: flex; flex-direction: column; gap: var(--alea-space-2); }\n.alea-rating { --alea-star: 24px; display: inline-flex; align-items: center; gap: var(--alea-space-0-5); }\n.alea-rating[data-size='sm'] { --alea-star: 16px; }\n.alea-rating[data-size='lg'] { --alea-star: 32px; }\n/* each icon sits in a cell; the radio (whole, or left and right halves) covers it */\n.alea-rating-cell { position: relative; display: inline-grid; place-items: center; padding: var(--alea-space-0-5); }\n.alea-rating-glyph { position: relative; display: inline-grid; width: var(--alea-star); height: var(--alea-star); transition: transform var(--alea-motion-duration-fast) var(--alea-motion-spring, var(--alea-motion-ease-out)); }\n.alea-rating-glyph > span { grid-area: 1 / 1; display: inline-flex; }\n.alea-rating-glyph svg { width: var(--alea-star); height: var(--alea-star); }\n.alea-rating-base svg { fill: transparent; }\n.alea-rating-fill svg { fill: currentColor; }\n.alea-rating-item { position: absolute; inset: 0; border-radius: var(--alea-radius-sm); cursor: pointer; }\n.alea-rating-item[data-part='left'] { right: 50%; }\n.alea-rating-item[data-part='right'] { left: 50%; }\n.alea-rating-item[data-focus-visible] { outline: 2px solid var(--alea-focus); outline-offset: var(--alea-space-0-25); }\n.alea-rating-item[data-disabled] { cursor: not-allowed; }\n.alea-rating-group[data-disabled] .alea-rating { opacity: 0.5; }\n.alea-rating-cell:has(.alea-rating-item[data-hovered]) .alea-rating-glyph { transform: scale(calc(1 + (1 - var(--alea-motion-scale-press)) * 3)); }\n.alea-rating-value { margin-left: var(--alea-space-2); font: var(--alea-font-weight-semibold) var(--alea-font-size-md) / 1 var(--alea-font-family-body); font-variant-numeric: tabular-nums; }\n"}],"deps":["icon"],"npm":["react-aria-components","lucide-react"],"exports":["Rating"],"descriptions":{"Rating":"Icons to rate something: stars or your own icon, halves, clear by pressing again, the value shown, four tones. Arrows move, like radios."}},"select":{"files":[{"path":"components/select/Select.tsx","content":"import { useContext, useMemo, type ReactNode } from 'react';\nimport {\n Select as RACSelect, SelectValue, Button as RACButton, ListBox as RACListBox, ListBoxItem as RACListBoxItem, ListBoxSection, Header, SelectStateContext, AutocompleteStateContext,\n Autocomplete as RACAutocomplete, SearchField as RACSearchField, Input, Virtualizer, ListLayout, useFilter, Text,\n type SelectProps as RACSelectProps, type ListBoxProps as RACListBoxProps, type ListBoxItemProps, type ValidationResult, type Key,\n} from 'react-aria-components';\nimport type { MotionProp } from '@alea-design/motion';\nimport { ChevronDown, Check, X, Search } from 'lucide-react';\nimport { withBase } from '../../utils/cx';\nimport { Label, Description, FieldError, type FieldSize, type FieldVariant } from '../field/Field';\nimport { Spinner } from '../feedback/Spinner';\nimport { loadingAttrs, useBusy } from '../field/FieldLoading';\nimport { responsiveAttrs } from '../../utils/responsive';\nimport type { Responsive } from '../../utils/responsive';\nimport { Popover } from '../overlay/Overlay';\nimport { useStrings } from '../../i18n/strings';\nimport { Highlight, OptionMatchContext, useOptionMatch, type MatchStyle } from '../combobox/Highlight';\n\nexport interface SelectOption { id: Key; label: ReactNode; description?: ReactNode; icon?: ReactNode; isDisabled?: boolean; textValue?: string }\n\nexport interface SelectProps<T extends object = SelectOption> extends Omit<RACSelectProps<T, 'single' | 'multiple'>, 'children'> {\n /** The visible label. */\n label?: ReactNode;\n /** Help text under the field. */\n description?: ReactNode;\n /** Error text, shown when invalid. */\n errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);\n /** A warning that does not block, shown under the field in amber. */\n warningMessage?: ReactNode;\n /** Shows \"(optional)\" after the label. */\n showOptional?: boolean;\n /** The options. For sections, nest SelectSection and SelectItem as children instead. */\n items?: Iterable<T>;\n children?: ReactNode | ((item: T) => ReactNode);\n /** xs 28 px, sm 32 px, md 44 px (default), lg 48 px, xl 56 px. Can change per breakpoint. */\n size?: Responsive<FieldSize>;\n /** outline (default), filled, underline or borderless, like TextField. */\n variant?: FieldVariant;\n /** top (default) or side (from 640 px up). */\n labelPosition?: 'top' | 'side';\n /** An icon or text inside the trigger, before the value. */\n prefix?: ReactNode;\n /** Shows a clear button while something is selected. */\n isClearable?: boolean;\n /** A search box at the top of the list that filters the options. */\n searchable?: boolean;\n /** With searchable: marks the part of each option that matches what was typed, with a mark element. */\n highlightMatch?: boolean;\n /** How the match looks: tint (default), bold or underline. */\n matchStyle?: MatchStyle;\n /** Shows a spinner instead of the chevron (same size, so nothing moves), for options that are still loading. Screen readers hear the select as busy. */\n isLoading?: boolean;\n /** What the list says when there are no options or no matches. Default \"No results\". */\n emptyText?: ReactNode;\n /** Content under the list inside the popover, like an \"Add option\" button. */\n footer?: ReactNode;\n /** Where the selected check shows: end (default) or start. */\n checkPosition?: 'start' | 'end';\n /** With selectionMode=\"multiple\": how many tags show in the trigger before \"+N\". Default 2. */\n maxTags?: number;\n /** Your own content for the trigger, from the selected items. */\n renderValue?: (items: T[]) => ReactNode;\n /** Renders only the visible options: pass the row height (40). For lists of thousands. */\n virtualized?: number;\n /** How the popup enters and leaves: a preset (fade, scale, pop, slide-down, blur...), false for none, or options. */\n motion?: MotionProp;\n}\n\n/** Tells the options what was typed in the search box, so they can mark it. */\nfunction SelectMatch({ style, children }: { style?: MatchStyle; children: ReactNode }) {\n const state = useContext(AutocompleteStateContext);\n const query = state?.inputValue ?? '';\n const value = useMemo(() => ({ query, style: style ?? 'tint', match: 'phrase' as const }), [query, style]);\n return <OptionMatchContext.Provider value={value}>{children}</OptionMatchContext.Provider>;\n}\n\n/** The clear button: reads the select state, so it works controlled or not. */\nfunction SelectClear() {\n const t = useStrings();\n const state = useContext(SelectStateContext);\n const has = state && (Array.isArray(state.value) ? state.value.length > 0 : state.value != null);\n if (!state || !has) return null;\n return <RACButton slot={null} className=\"alea-input-clear alea-select-clear alea-focus-ring\" aria-label={t.clear} onPress={() => state.setValue((state.selectionManager.selectionMode === 'multiple' ? [] : null) as never)}><X size={14} /></RACButton>;\n}\n\n/** Pick one or several options from a list in a popover; type to jump, arrows to move. Search, clear, tags, groups, a footer and virtualization when you need them. */\nexport function Select<T extends object = SelectOption>({ motion, label, description, errorMessage, warningMessage, showOptional, items, children, size, variant = 'outline', labelPosition = 'top', prefix, isClearable, searchable, highlightMatch, matchStyle, isLoading, emptyText, footer, checkPosition = 'end', maxTags = 2, renderValue, virtualized, className, placeholder, ...props }: SelectProps<T>) {\n const t = useStrings(); placeholder ??= t.selectPlaceholder;\n const busy = useBusy<HTMLButtonElement>(isLoading);\n const { contains } = useFilter({ sensitivity: 'base' });\n const multiple = props.selectionMode === 'multiple';\n const list = (\n <RACListBox items={items} className=\"alea-listbox\" data-check={checkPosition} renderEmptyState={() => <div className=\"alea-listbox-empty\">{emptyText ?? t.noResults}</div>}>\n {children ?? ((item: any) => <SelectItem id={item.id} textValue={item.textValue ?? (typeof item.label === 'string' ? item.label : String(item.id))} isDisabled={item.isDisabled} description={item.description} icon={item.icon}>{item.label}</SelectItem>)}\n </RACListBox>\n );\n const body = virtualized ? <Virtualizer layout={ListLayout} layoutOptions={{ rowHeight: virtualized }}>{list}</Virtualizer> : list;\n return (\n <RACSelect {...props} placeholder={placeholder} allowsEmptyCollection className={withBase('alea-field alea-select', className as any)}\n {...responsiveAttrs('size', size, 'md')} data-variant={variant !== 'outline' ? variant : undefined} data-label-position={labelPosition !== 'top' ? labelPosition : undefined} data-warning={warningMessage ? true : undefined} {...loadingAttrs(isLoading)}>\n {label && <Label>{label}{props.isRequired && <span className=\"alea-label-required\" aria-hidden=\"true\"> *</span>}{showOptional && !props.isRequired && <span className=\"alea-label-optional\"> ({t.optional})</span>}</Label>}\n <div className=\"alea-select-control\">\n <RACButton ref={busy} className=\"alea-select-trigger alea-focus-ring\">\n {prefix && <span className=\"alea-input-affix alea-select-prefix\" aria-hidden=\"true\">{prefix}</span>}\n <SelectValue<T> className=\"alea-select-value\">\n {({ selectedItems, isPlaceholder, defaultChildren }) => {\n const picked = selectedItems.filter(Boolean) as T[];\n if (isPlaceholder) return defaultChildren;\n if (renderValue) return renderValue(picked);\n if (!multiple) return defaultChildren;\n const text = (it: any) => it?.textValue ?? (typeof it?.label === 'string' ? it.label : String(it?.id ?? ''));\n return <span className=\"alea-select-tags\">{picked.slice(0, maxTags).map((it: any, i) => <span key={i} className=\"alea-select-tag\">{text(it)}</span>)}{picked.length > maxTags && <span className=\"alea-select-tag\" data-more>+{picked.length - maxTags}</span>}</span>;\n }}\n </SelectValue>\n {isLoading ? <Spinner size=\"sm\" aria-label={t.loading} /> : <ChevronDown size={16} aria-hidden=\"true\" className=\"alea-select-chevron\" />}\n </RACButton>\n {isClearable && !props.isDisabled && <SelectClear />}\n </div>\n {(description || warningMessage) && <Description>{description}{warningMessage && <span className=\"alea-field-warning\">{warningMessage}</span>}</Description>}\n <FieldError>{errorMessage}</FieldError>\n <Popover className=\"alea-popover alea-select-popover\" motion={motion} data-searchable={searchable || undefined}>\n {searchable ? (\n <RACAutocomplete filter={contains}>\n <RACSearchField aria-label={t.filterOptions} autoFocus className=\"alea-select-search\">\n <Search size={14} aria-hidden=\"true\" />\n <Input className=\"alea-select-search-input\" placeholder={t.search} />\n </RACSearchField>\n {highlightMatch ? <SelectMatch style={matchStyle}>{body}</SelectMatch> : body}\n </RACAutocomplete>\n ) : body}\n {footer && <div className=\"alea-select-footer\">{footer}</div>}\n </Popover>\n </RACSelect>\n );\n}\n\nexport interface SelectItemProps extends Omit<ListBoxItemProps, 'children'> {\n children: ReactNode;\n /** A second line under the option. */\n description?: ReactNode;\n /** An icon before the option. */\n icon?: ReactNode;\n /** Text to mark in the label and the description, like what was typed to filter. A ComboBox or a searchable Select with highlightMatch sets it for you; set it yourself when you filter the options. */\n matchQuery?: string;\n /** How the match looks: tint (default), bold or underline. */\n matchStyle?: MatchStyle;\n}\n\n// The label and description of an option. A component of its own, because options are first built where the select state is not\n// available yet: this one renders with the option, where the typed text is.\nfunction OptionText({ label, description, matchQuery, matchStyle }: { label: ReactNode; description?: ReactNode; matchQuery?: string; matchStyle?: MatchStyle }) {\n const ctx = useOptionMatch();\n const query = matchQuery ?? ctx?.query ?? '';\n const mark = (node: ReactNode) => (query && typeof node === 'string' ? <Highlight text={node} query={query} match={ctx?.match ?? 'phrase'} matchStyle={matchStyle ?? ctx?.style} /> : node);\n return <span className=\"alea-option-text\"><Text slot=\"label\">{mark(label)}</Text>{description && <Text slot=\"description\" className=\"alea-option-desc\">{mark(description)}</Text>}</span>;\n}\n\n/** An option in a Select (or any listbox). Marks the part that matches matchQuery, with a mark element. */\nexport function SelectItem({ children, description, icon, matchQuery, matchStyle, className, textValue, ...props }: SelectItemProps) {\n return (\n <RACListBoxItem {...props} textValue={textValue ?? (typeof children === 'string' || typeof children === 'number' ? String(children) : undefined)} className={withBase('alea-option', className as any)}>\n {({ isSelected }) => (\n <>\n {icon && <span className=\"alea-option-icon\" aria-hidden=\"true\">{icon}</span>}\n <OptionText label={children} description={description} matchQuery={matchQuery} matchStyle={matchStyle} />\n <Check size={16} className=\"alea-option-check\" aria-hidden=\"true\" data-on={isSelected || undefined} />\n </>\n )}\n </RACListBoxItem>\n );\n}\n\nexport interface SelectSectionProps {\n /** The section heading. */\n title: ReactNode;\n children: ReactNode;\n}\n\n/** A titled group of options. */\nexport function SelectSection({ title, children }: SelectSectionProps) {\n return <ListBoxSection className=\"alea-option-section\"><Header className=\"alea-option-header\">{title}</Header>{children}</ListBoxSection>;\n}\n\nexport interface ListBoxProps<T extends object = SelectOption> extends Omit<RACListBoxProps<T>, 'children'> {\n /** The options as data, or SelectItem and SelectSection children. */\n items?: Iterable<T>;\n children?: ReactNode | ((item: T) => ReactNode);\n /** What shows when the list is empty. */\n emptyText?: ReactNode;\n /** Where the selected check shows: end (default) or start. */\n checkPosition?: 'start' | 'end';\n /** Draws the list as a card with a border (default), or plain inside your own container. */\n variant?: 'card' | 'plain';\n /** Scrolls inside this height. */\n maxHeight?: number | string;\n}\n\n/** A list of options people pick from, on its own (not in a popup): settings, filters, side lists. Single or multiple selection, sections, descriptions and icons, type to jump. */\nexport function ListBox<T extends object = SelectOption>({ items, children, emptyText, checkPosition = 'end', variant = 'card', maxHeight, className, style, ...props }: ListBoxProps<T>) {\n const t = useStrings();\n return (\n <RACListBox {...props} items={items} data-check={checkPosition} data-variant={variant} renderEmptyState={() => <div className=\"alea-listbox-empty\">{emptyText ?? t.noResults}</div>}\n className={withBase('alea-listbox alea-listbox-standalone', className as any)} style={{ ...(maxHeight ? { maxHeight, overflow: 'auto' } : {}), ...(style as object) }}>\n {children ?? ((item: any) => <SelectItem id={item.id} textValue={item.textValue ?? (typeof item.label === 'string' ? item.label : String(item.id))} isDisabled={item.isDisabled} description={item.description} icon={item.icon}>{item.label}</SelectItem>)}\n </RACListBox>\n );\n}\n\n// ---------------------------------------------------------------- period select\nexport type Period = '24h' | '7d' | '30d' | '90d' | '6m' | '12m' | 'ytd' | 'all';\nexport interface PeriodSelectProps {\n /** The periods to offer, in order. Default 24h, 7d, 30d, 12m. */\n periods?: Period[];\n /** The chosen period (controlled). */\n value?: Period;\n /** The period at first. Default 30d. */\n defaultValue?: Period;\n /** Called with the new period. */\n onChange?: (period: Period) => void;\n /** A visible label. Without it the field is named \"Period\" (translated) for screen readers. */\n label?: ReactNode;\n /** sm for a toolbar or a card header. */\n size?: SelectProps['size'];\n className?: string;\n}\n\n/** The time range of a dashboard or a report: Last 7 days, Last 30 days, Year to date, in the people's language. */\nexport function PeriodSelect({ periods = ['24h', '7d', '30d', '12m'], value, defaultValue = '30d', onChange, label, size, className }: PeriodSelectProps) {\n const t = useStrings();\n return (\n <Select aria-label={label ? undefined : t.period} label={label} size={size} className={className}\n selectedKey={value} defaultSelectedKey={value === undefined ? defaultValue : undefined}\n onSelectionChange={k => onChange?.(k as Period)}\n items={periods.map(id => ({ id, label: t.periods[id] }))} />\n );\n}\n"},{"path":"components/select/select.css","content":".alea-select-control { position: relative; display: flex; min-width: 0; }\n.alea-select-trigger {\n display: flex; align-items: center; justify-content: space-between; gap: var(--alea-space-2);\n width: 100%; height: var(--alea-input-h, var(--alea-size-field));\n padding: 0 var(--alea-space-3) 0 var(--alea-input-pad, var(--alea-space-4));\n border: 0; border-radius: var(--alea-input-radius, var(--alea-radius-field));\n background: var(--alea-field-bg); color: var(--alea-text);\n box-shadow: inset 0 0 0 1px var(--alea-border);\n font: var(--alea-font-weight-regular) var(--alea-input-font, var(--alea-font-size-base)) / 1.4 var(--alea-font-family-body);\n text-align: left; cursor: pointer;\n transition: box-shadow var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard);\n}\n.alea-select-control:has(.alea-select-clear) .alea-select-value { margin-right: var(--alea-space-8); }\n.alea-select-clear { position: absolute; right: var(--alea-space-8); top: 50%; translate: 0 -50%; margin: 0; }\n.alea-select-prefix { padding-left: 0 !important; margin-right: 0 !important; }\n.alea-select-trigger[data-hovered] { box-shadow: inset 0 0 0 1px var(--alea-border-strong); }\n.alea-select[data-open] .alea-select-trigger, .alea-select-trigger[data-focus-visible] { box-shadow: inset 0 0 0 1px var(--alea-focus), 0 0 0 4px var(--alea-focus-halo); outline: none; }\n.alea-select[data-warning]:not([data-invalid]) .alea-select-trigger { box-shadow: inset 0 0 0 1px var(--alea-status-warning), 0 0 0 4px var(--alea-status-warning-bg); }\n.alea-select[data-invalid] .alea-select-trigger { box-shadow: inset 0 0 0 1px var(--alea-status-danger), 0 0 0 4px var(--alea-status-danger-bg); }\n.alea-select[data-invalid] .alea-select-trigger:is([data-focus-visible], [data-focused]) { box-shadow: inset 0 0 0 1px var(--alea-status-danger), 0 0 0 2px var(--alea-bg), 0 0 0 4px var(--alea-focus); }\n/* the disabled dimming comes from .alea-field[data-disabled] (the label, the control, the description): dimming the root too made a disabled select twice as faint */\n/* variants, as in TextField */\n.alea-select[data-variant='filled'] .alea-select-trigger { background: var(--alea-surface-raised); box-shadow: none; }\n.alea-select[data-variant='filled'] .alea-select-trigger[data-hovered] { background: var(--alea-surface-hover); }\n.alea-select[data-variant='underline'] .alea-select-trigger { padding-left: 0; border-radius: 0; background: transparent; box-shadow: inset 0 -1px 0 var(--alea-border-strong); }\n.alea-select[data-variant='underline'] .alea-select-trigger[data-hovered] { box-shadow: inset 0 -1px 0 var(--alea-border-control); }\n.alea-select[data-variant='underline'][data-invalid] .alea-select-trigger { box-shadow: inset 0 -2px 0 var(--alea-status-danger); }\n.alea-select[data-variant='underline'][data-warning]:not([data-invalid]) .alea-select-trigger { box-shadow: inset 0 -2px 0 var(--alea-status-warning); }\n.alea-select[data-variant='underline'][data-open] .alea-select-trigger, .alea-select[data-variant='underline'] .alea-select-trigger[data-focus-visible] { box-shadow: inset 0 -2px 0 var(--alea-focus); }\n.alea-select[data-variant='borderless'] .alea-select-trigger { background: transparent; box-shadow: none; }\n.alea-select[data-variant='borderless'] .alea-select-trigger[data-hovered] { background: var(--alea-surface-hover); }\n/* the filled and borderless looks must still show open, focused, invalid and warning (their box-shadow: none above came last and hid them) */\n.alea-select[data-variant='filled']:is([data-open], :has(.alea-select-trigger[data-focus-visible])) .alea-select-trigger { background: var(--alea-field-bg); box-shadow: inset 0 0 0 1px var(--alea-focus), 0 0 0 4px var(--alea-focus-halo); }\n.alea-select[data-variant='borderless']:is([data-open], :has(.alea-select-trigger[data-focus-visible])) .alea-select-trigger { background: var(--alea-surface-hover); box-shadow: 0 0 0 2px var(--alea-focus); }\n.alea-select:is([data-variant='filled'], [data-variant='borderless'])[data-warning]:not([data-invalid]) .alea-select-trigger { box-shadow: inset 0 0 0 1px var(--alea-status-warning), 0 0 0 4px var(--alea-status-warning-bg); }\n.alea-select:is([data-variant='filled'], [data-variant='borderless'])[data-invalid] .alea-select-trigger { box-shadow: inset 0 0 0 1px var(--alea-status-danger), 0 0 0 4px var(--alea-status-danger-bg); }\n.alea-select-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: var(--alea-space-2); }\n.alea-select-value[data-placeholder] { color: var(--alea-text-faint); }\n.alea-select-value .alea-option-check, .alea-select-value .alea-option-desc { display: none; }\n.alea-select-tags { display: flex; gap: var(--alea-space-1); min-width: 0; overflow: hidden; }\n.alea-select-tag { flex: none; max-width: 140px; overflow: hidden; text-overflow: ellipsis; padding: var(--alea-space-0-5) var(--alea-space-2); border-radius: var(--alea-radius-full); background: var(--alea-surface-raised); box-shadow: inset 0 0 0 1px var(--alea-border); font-size: var(--alea-font-size-sm); line-height: 1.4; }\n.alea-select-tag[data-more] { color: var(--alea-text-muted); }\n.alea-select-chevron { flex: none; color: var(--alea-icon-muted); }\n.alea-select[data-open] .alea-select-chevron { transform: rotate(180deg); }\n.alea-select-search { display: flex; align-items: center; gap: var(--alea-space-2); margin: calc(var(--alea-space-1) * -1) calc(var(--alea-space-1) * -1) var(--alea-space-1); padding: 0 var(--alea-space-3); height: 40px; border-bottom: 1px solid var(--alea-border); color: var(--alea-text-muted); }\n.alea-select-search-input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: var(--alea-text); font: inherit; font-size: var(--alea-font-size-md); outline: none; }\n.alea-select-search-input::-webkit-search-cancel-button { display: none; }\n.alea-select-footer { margin: var(--alea-space-1) calc(var(--alea-space-1) * -1) calc(var(--alea-space-1) * -1); padding: var(--alea-space-2); border-top: 1px solid var(--alea-border); }\n.alea-listbox-empty { margin: 0; padding: var(--alea-space-3); color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n.alea-listbox[data-check='start'] .alea-option-check { order: -1; }\n.alea-select-popover { max-height: min(320px, var(--visual-viewport-height, 100vh)); overflow: auto; }\n\n.alea-listbox { display: flex; flex-direction: column; gap: var(--alea-space-0-25); outline: none; }\n.alea-option {\n display: flex; align-items: center; gap: var(--alea-space-3);\n min-height: 40px; padding: var(--alea-space-2) var(--alea-space-3) var(--alea-space-2) var(--alea-space-3);\n border-radius: var(--alea-radius-sm);\n color: var(--alea-text); font-size: var(--alea-font-size-md);\n cursor: pointer; outline: none;\n}\n.alea-option[data-focused], .alea-option[data-hovered] { background: var(--alea-surface-hover); }\n.alea-option[data-focus-visible] { box-shadow: inset 0 0 0 2px var(--alea-focus); }\n.alea-option[data-selected] { font-weight: var(--alea-font-weight-medium); }\n.alea-option[data-disabled] { opacity: 0.4; cursor: not-allowed; }\n.alea-option-icon { display: inline-flex; color: var(--alea-icon-muted); }\n.alea-option-icon svg { width: 16px; height: 16px; }\n.alea-option-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--alea-space-0-25); }\n.alea-option-desc { font-size: var(--alea-font-size-xs); color: var(--alea-text-faint); font-weight: var(--alea-font-weight-regular); }\n.alea-option-check { flex: none; color: var(--alea-accent-strong); opacity: 0; }\n.alea-option-check[data-on] { opacity: 1; }\n.alea-option-section:not(:first-child) { margin-top: var(--alea-space-1); padding-top: var(--alea-space-1); border-top: 1px solid var(--alea-border); }\n.alea-option-header { padding: var(--alea-space-2) var(--alea-space-3) var(--alea-space-1); font: var(--alea-font-weight-semibold) var(--alea-font-size-2xs) / 1.2 var(--alea-font-family-body); letter-spacing: var(--alea-font-tracking-eyebrow); text-transform: uppercase; color: var(--alea-text-faint); }\n\n/* ListBox on its own */\n.alea-listbox-standalone[data-variant='card'] { padding: var(--alea-space-1); border-radius: var(--alea-radius-md); background: var(--alea-surface); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-listbox-standalone[data-focus-visible] { outline: 2px solid var(--alea-focus); outline-offset: var(--alea-space-0-5); }\n.alea-listbox-standalone .alea-option[data-selected] { background: var(--alea-accent-subtle); }\n"}],"deps":["field","feedback","overlay","combobox"],"npm":["react-aria-components","lucide-react","@alea-design/motion"],"exports":["Select","SelectItem","SelectSection","ListBox","PeriodSelect"],"descriptions":{"Select":"Pick one or several options from a list in a popover; type to jump, arrows to move. Search, clear, tags, groups, a footer and virtualization when you need them.","SelectItem":"An option in a Select (or any listbox). Marks the part that matches matchQuery, with a mark element.","SelectSection":"A titled group of options.","ListBox":"A list of options people pick from, on its own (not in a popup): settings, filters, side lists. Single or multiple selection, sections, descriptions and icons, type to jump.","PeriodSelect":"The time range of a dashboard or a report: Last 7 days, Last 30 days, Year to date, in the people's language."}},"shell":{"files":[{"path":"components/shell/AppShell.tsx","content":"import { useState, type ReactNode } from 'react';\nimport { Link as RACLink, type LinkProps } from 'react-aria-components';\nimport { Menu as MenuIcon } from 'lucide-react';\nimport { cx, withBase } from '../../utils/cx';\nimport { useMediaQuery } from '../layout/Responsive';\nimport { IconButton } from '../button/Button';\nimport { Drawer } from '../overlay/Drawer';\nimport { Dialog } from '../overlay/Overlay';\nimport { useStrings } from '../../i18n/strings';\nimport { SkipLink } from '../more/More';\n\nexport interface AppShellProps {\n /** Logo or product name, top left. */\n brand?: ReactNode;\n /** Things on the right of the header: search, theme toggle, avatar. */\n headerEnd?: ReactNode;\n /** The side navigation (a SidebarNav). On small screens it moves into a drawer. */\n sidebar?: ReactNode;\n children: ReactNode;\n /** Sidebar width. Default 248 px. */\n sidebarWidth?: number;\n /** Below this width the sidebar goes into a drawer. Default 900 px. */\n collapseBelow?: number;\n /** The content element: main (default), or div when the shell sits inside a page that already has a main (demos, embeds). */\n mainAs?: 'main' | 'div';\n /** header (default): a bar across the top, the sidebar under it. sidebar: a web app layout, the sidebar full height\n * (put the brand in it, e.g. with AppSidebar and WorkspaceSwitcher) and the page in an inset panel whose top bar holds headerEnd. */\n layout?: 'header' | 'sidebar';\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** The app frame: sticky header, sidebar, scrollable content and a skip link. */\nexport function AppShell({ brand, headerEnd, sidebar, children, sidebarWidth = 248, collapseBelow = 900, mainAs = 'main', layout = 'header', className }: AppShellProps) {\n const t = useStrings();\n const Main = mainAs;\n const [open, setOpen] = useState(false);\n // Below collapseBelow the sidebar moves into a drawer. CSS handles the default (900 px) before hydration; this handles any value.\n const collapsed = useMediaQuery(`(max-width: ${collapseBelow - 0.02}px)`);\n const header = (\n <header className=\"alea-shell-header\">\n {sidebar && <IconButton aria-label={t.openNavigation} className=\"alea-shell-menu\" onPress={() => setOpen(true)}><MenuIcon /></IconButton>}\n {brand && <div className=\"alea-shell-brand\">{brand}</div>}\n {headerEnd && <div className=\"alea-shell-end\">{headerEnd}</div>}\n </header>\n );\n const main = <Main id=\"alea-main\" className=\"alea-shell-main\" tabIndex={-1}>{children}</Main>;\n return (\n <div className={cx('alea-shell', className)} style={{ ['--alea-shell-sidebar' as any]: `${sidebarWidth}px` }} data-layout={layout} data-collapse={collapseBelow} data-collapsed={collapsed || undefined} data-custom-collapse={collapseBelow !== 900 || undefined}>\n <SkipLink target=\"alea-main\" />\n {layout === 'header' && header}\n <div className=\"alea-shell-body\">\n {sidebar && <aside className=\"alea-shell-sidebar\">{sidebar}</aside>}\n {layout === 'sidebar' ? <div className=\"alea-shell-panel\">{header}{main}</div> : main}\n </div>\n {sidebar && (\n <Drawer isOpen={open} onOpenChange={setOpen} placement=\"start\" size={300}>\n <Dialog aria-label={t.navigation} hideClose className=\"alea-shell-drawer\">{() => <div onClickCapture={e => { if ((e.target as HTMLElement).closest('a')) setOpen(false); }}>{sidebar}</div>}</Dialog>\n </Drawer>\n )}\n </div>\n );\n}\n\nexport interface SidebarNavProps {\n children: ReactNode;\n /** Name of the navigation. Default \"Sidebar\". */\n 'aria-label'?: string;\n /** Extra class names for the root element. */\n className?: string;\n}\n\n/** Vertical navigation with groups; the current page is marked. */\nexport function SidebarNav({ children, className, 'aria-label': label }: SidebarNavProps) {\n const t = useStrings(); label ??= t.mainNav;\n return <nav aria-label={label} className={cx('alea-sidenav', className)}>{children}</nav>;\n}\n\n/** A titled group of nav links. */\nexport interface SidebarGroupProps {\n /** Small uppercase title of the group. */\n title?: ReactNode;\n /** The SidebarLinks. */\n children: ReactNode;\n}\n\n/** A group of sidebar links under a title. */\nexport function SidebarGroup({ title, children }: SidebarGroupProps) {\n return (\n <div className=\"alea-sidenav-group\">\n {title && <p className=\"alea-sidenav-title\">{title}</p>}\n <ul>{children}</ul>\n </div>\n );\n}\n\nexport interface SidebarLinkProps extends LinkProps {\n /** Marks the current page (aria-current). */\n isCurrent?: boolean;\n /** An icon before the label. */\n icon?: ReactNode;\n /** A count or badge on the right. */\n end?: ReactNode;\n}\n\n/** A link in the side navigation. */\nexport function SidebarLink({ isCurrent, icon, end, children, className, ...props }: SidebarLinkProps) {\n return (\n <li>\n <RACLink {...props} aria-current={isCurrent ? 'page' : undefined} className={withBase('alea-sidenav-link alea-focus-ring', className as any)}>\n {(state) => (\n <>\n {icon && <span className=\"alea-sidenav-icon\" aria-hidden=\"true\">{icon}</span>}\n <span className=\"alea-sidenav-label\">{typeof children === 'function' ? children(state) : children}</span>\n {end && <span className=\"alea-sidenav-end\">{end}</span>}\n </>\n )}\n </RACLink>\n </li>\n );\n}\n"},{"path":"components/shell/AppSidebar.tsx","content":"import { useId, useState, type ReactNode } from 'react';\nimport { Button as RACButton, Link as RACLink, type LinkProps } from 'react-aria-components';\nimport { ChevronDown, ChevronRight } from 'lucide-react';\nimport { cx, withBase } from '../../utils/cx';\nimport { navIcon } from '../icon/icon-contexts';\nimport { DropdownMenu } from '../menu/Menu';\nimport { useStrings } from '../../i18n/strings';\n\nexport interface AppSidebarProps {\n /** The top: usually a WorkspaceSwitcher. Stays in place while the links scroll. */\n header?: ReactNode;\n /** AppNavSections and AppNavItems. */\n children: ReactNode;\n /** The bottom: an invite button, a plan meter, help. */\n footer?: ReactNode;\n /** Name of the navigation. Default \"Sidebar\". */\n 'aria-label'?: string;\n className?: string;\n}\n\n/** The side navigation of a web app: a workspace switcher on top, compact links, sections that fold. Pair it with AppShell layout=\"sidebar\". */\nexport function AppSidebar({ header, children, footer, className, 'aria-label': label }: AppSidebarProps) {\n const t = useStrings();\n return (\n <div className={cx('alea-appnav', className)}>\n {header && <div className=\"alea-appnav-header\">{header}</div>}\n <nav aria-label={label ?? t.mainNav} className=\"alea-appnav-body\">{children}</nav>\n {footer && <div className=\"alea-appnav-footer\">{footer}</div>}\n </div>\n );\n}\n\nexport interface WorkspaceSwitcherProps {\n /** The workspace or product name. */\n name: ReactNode;\n /** A logo or mark before the name (about 20 px). */\n logo?: ReactNode;\n /** The menu: MenuItems to switch workspaces, settings, sign out. Without it the name is plain text. */\n children?: ReactNode;\n /** Name of the menu button. Default \"{name}, workspace menu\" when name is text. */\n 'aria-label'?: string;\n /** Icon buttons on the right: search, new item. */\n actions?: ReactNode;\n /** Called with the menu item's id. */\n onAction?: (key: string | number) => void;\n}\n\n/** The workspace name at the top of the sidebar: a menu to switch workspaces, with quick actions beside it. */\nexport function WorkspaceSwitcher({ name, logo, children, actions, onAction, 'aria-label': label }: WorkspaceSwitcherProps) {\n const content = <>{logo && <span className=\"alea-ws-logo\" aria-hidden=\"true\">{logo}</span>}<span className=\"alea-ws-name\">{name}</span>{children && <ChevronDown className=\"alea-ws-chevron\" aria-hidden=\"true\" />}</>;\n return (\n <div className=\"alea-ws\">\n {children\n ? <DropdownMenu aria-label={label ?? (typeof name === 'string' ? `${name}, workspace menu` : 'Workspace menu')} placement=\"bottom start\" menuProps={onAction ? { onAction: k => onAction(k) } : undefined}\n trigger={<RACButton className=\"alea-ws-button alea-focus-ring\" aria-label={label ?? (typeof name === 'string' ? `${name}, workspace menu` : undefined)}>{content}</RACButton>}>{children}</DropdownMenu>\n : <span className=\"alea-ws-button\" data-static>{content}</span>}\n {actions && <span className=\"alea-ws-actions\">{actions}</span>}\n </div>\n );\n}\n\nexport interface AppNavSectionProps {\n /** The section's name, small and muted. Leave it out for the first, main group. */\n title?: ReactNode;\n /** The AppNavItems. */\n children: ReactNode;\n /** People can fold it (a chevron next to the title). Default true when there is a title. */\n collapsible?: boolean;\n /** Open at first. Default true. */\n defaultExpanded?: boolean;\n /** Something on the right of the title: an add button. */\n action?: ReactNode;\n}\n\n/** A group of links in the AppSidebar; with a title it folds. */\nexport function AppNavSection({ title, children, collapsible = !!title, defaultExpanded = true, action }: AppNavSectionProps) {\n const [open, setOpen] = useState(defaultExpanded);\n const id = useId();\n return (\n <div className=\"alea-navsec\" data-open={open || undefined}>\n {title && (\n <div className=\"alea-navsec-head\">\n {collapsible\n ? <button type=\"button\" className=\"alea-navsec-title alea-focus-ring\" aria-expanded={open} aria-controls={id} onClick={() => setOpen(o => !o)}>{title}<ChevronRight className=\"alea-navsec-chevron\" aria-hidden=\"true\" /></button>\n : <span className=\"alea-navsec-title\">{title}</span>}\n {action && <span className=\"alea-navsec-action\">{action}</span>}\n </div>\n )}\n <ul id={id} className=\"alea-navsec-list\" hidden={collapsible && !open}>{children}</ul>\n </div>\n );\n}\n\nexport interface AppNavItemProps extends LinkProps {\n /** Marks the current page (aria-current). */\n isCurrent?: boolean;\n /** A 16 px icon before the label. */\n icon?: ReactNode;\n /** A count, a badge or a shortcut on the right. */\n end?: ReactNode;\n}\n\n/** A compact link in the AppSidebar: icon, label and an optional count. */\nexport function AppNavItem({ isCurrent, icon, end, children, className, ...props }: AppNavItemProps) {\n return (\n <li>\n <RACLink {...props} aria-current={isCurrent ? 'page' : undefined} className={withBase('alea-navitem alea-focus-ring', className as any)}>\n {(state) => (\n <>\n {icon && <span className=\"alea-navitem-icon\" aria-hidden=\"true\" {...navIcon(isCurrent)}>{icon}</span>}\n <span className=\"alea-navitem-label\">{typeof children === 'function' ? children(state) : children}</span>\n {end != null && <span className=\"alea-navitem-end\">{end}</span>}\n </>\n )}\n </RACLink>\n </li>\n );\n}\n"},{"path":"components/shell/shell.css","content":".alea-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--alea-bg); }\n.alea-shell-header {\n position: sticky; top: 0; z-index: var(--alea-z-sticky);\n display: flex; align-items: center; gap: var(--alea-space-3);\n height: 64px; padding: 0 clamp(var(--alea-space-4), 3vw, var(--alea-space-7));\n background: color-mix(in srgb, var(--alea-bg) 80%, transparent);\n backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);\n border-bottom: 1px solid var(--alea-border);\n}\n.alea-shell-brand { display: flex; align-items: center; gap: var(--alea-space-3); min-width: 0; white-space: nowrap; font: var(--alea-font-weight-light) 22px/1 var(--alea-font-family-display); }\n.alea-shell-end { margin-left: auto; display: flex; align-items: center; gap: var(--alea-space-2); }\n.alea-shell-menu { display: none; }\n.alea-shell-body { flex: 1; display: grid; grid-template-columns: var(--alea-shell-sidebar) minmax(0, 1fr); }\n.alea-shell-sidebar { position: sticky; top: var(--alea-space-16); height: calc(100vh - 64px); overflow-y: auto; padding: var(--alea-space-6) var(--alea-space-3); border-right: 1px solid var(--alea-border); }\n.alea-shell-main { min-width: 0; padding: clamp(var(--alea-space-5), 4vw, var(--alea-space-12)); outline: none; }\n@media (max-width: 899.98px) {\n .alea-shell:not([data-custom-collapse]) .alea-shell-body { grid-template-columns: minmax(0, 1fr); }\n .alea-shell:not([data-custom-collapse]) .alea-shell-sidebar { display: none; }\n .alea-shell:not([data-custom-collapse]) .alea-shell-menu { display: inline-flex; }\n}\n.alea-shell[data-collapsed] .alea-shell-body { grid-template-columns: minmax(0, 1fr); }\n.alea-shell[data-collapsed] .alea-shell-sidebar { display: none; }\n.alea-shell[data-collapsed] .alea-shell-menu { display: inline-flex; }\n.alea-shell-drawer { padding: var(--alea-space-5) var(--alea-space-3); }\n\n.alea-sidenav { display: flex; flex-direction: column; gap: var(--alea-space-5); }\n.alea-sidenav-title { display: flex; align-items: center; gap: var(--alea-space-2); margin: 0 0 var(--alea-space-2) var(--alea-space-0-5); font: var(--alea-font-weight-semibold) var(--alea-font-size-2xs) / 1.2 var(--alea-font-family-body); letter-spacing: var(--alea-font-tracking-eyebrow); text-transform: uppercase; color: var(--alea-text-muted); cursor: default; }\n.alea-sidenav-title::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--alea-gradient-accent); flex: none; }\n.alea-sidenav-group ul { margin: 0 0 0 var(--alea-space-1); padding: 0 0 0 var(--alea-space-3); list-style: none; display: flex; flex-direction: column; gap: var(--alea-space-0-25); border-left: 1px solid var(--alea-border); }\n.alea-sidenav-link {\n display: flex; align-items: center; gap: var(--alea-space-3);\n min-height: 36px; padding: var(--alea-space-2) var(--alea-space-3);\n border-radius: var(--alea-radius-xs);\n color: var(--alea-text-muted); font-size: var(--alea-font-size-md); text-decoration: none;\n transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard);\n}\n.alea-sidenav-link[data-hovered] { background: var(--alea-surface-hover); color: var(--alea-text); }\n.alea-sidenav-link { position: relative; color: var(--alea-text-soft); }\n.alea-sidenav-link[aria-current='page'] { background: var(--alea-accent-subtle); color: var(--alea-text); font-weight: var(--alea-font-weight-semibold); }\n.alea-sidenav-link[aria-current='page']::before { content: ''; position: absolute; left: calc(var(--alea-space-3) * -1); top: var(--alea-space-2); bottom: var(--alea-space-2); width: 2px; border-radius: var(--alea-radius-3xs); background: var(--alea-accent); }\n.alea-sidenav-icon { display: inline-flex; color: inherit; }\n.alea-sidenav-icon svg { width: 20px; height: 20px; }\n.alea-sidenav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.alea-sidenav-end { flex: none; }\n\n/* layout=\"sidebar\": the web app frame. The sidebar runs the full height on the page background; the page sits in an inset\n panel with its own top bar (headerEnd); the brand lives in the sidebar, and shows in the bar only once the sidebar folds away. */\n.alea-shell[data-layout='sidebar'] .alea-shell-body { min-height: 100vh; padding: var(--alea-space-2) var(--alea-space-2) var(--alea-space-2) 0; }\n.alea-shell[data-layout='sidebar'] .alea-shell-sidebar { top: 0; height: 100vh; margin-block: calc(-1 * var(--alea-space-2)); padding: var(--alea-space-2); border-right: 0; }\n.alea-shell-panel { min-width: 0; display: flex; flex-direction: column; background: var(--alea-surface); border-radius: var(--alea-radius-md); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-shell[data-layout='sidebar'] .alea-shell-header { height: 56px; border-radius: var(--alea-radius-md) var(--alea-radius-md) 0 0; background: color-mix(in srgb, var(--alea-surface) 86%, transparent); }\n.alea-shell[data-layout='sidebar'] .alea-shell-brand { display: none; font: var(--alea-font-weight-semibold) var(--alea-font-size-md) / 1 var(--alea-font-family-body); }\n.alea-shell[data-layout='sidebar'] .alea-shell-main { flex: 1; padding: clamp(var(--alea-space-5), 3vw, var(--alea-space-10)); }\n@media (max-width: 899.98px) {\n .alea-shell[data-layout='sidebar']:not([data-custom-collapse]) .alea-shell-body { padding: 0; }\n .alea-shell[data-layout='sidebar']:not([data-custom-collapse]) .alea-shell-panel { border-radius: 0; box-shadow: none; }\n .alea-shell[data-layout='sidebar']:not([data-custom-collapse]) .alea-shell-header { border-radius: 0; }\n .alea-shell[data-layout='sidebar']:not([data-custom-collapse]) .alea-shell-brand { display: flex; }\n}\n.alea-shell[data-layout='sidebar'][data-collapsed] .alea-shell-body { padding: 0; }\n.alea-shell[data-layout='sidebar'][data-collapsed] .alea-shell-panel { border-radius: 0; box-shadow: none; }\n.alea-shell[data-layout='sidebar'][data-collapsed] .alea-shell-header { border-radius: 0; }\n.alea-shell[data-layout='sidebar'][data-collapsed] .alea-shell-brand { display: flex; }\n\n/* AppSidebar: compact rows (32 px), 16 px icons, sections that fold */\n.alea-appnav { display: flex; flex-direction: column; gap: var(--alea-space-3); height: 100%; min-height: 0; }\n.alea-appnav-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--alea-space-4); padding-inline: var(--alea-space-1); }\n.alea-appnav-footer { padding: var(--alea-space-2) var(--alea-space-1) 0; border-top: 1px solid var(--alea-border); }\n.alea-ws { display: flex; align-items: center; gap: var(--alea-space-1); min-width: 0; }\n.alea-ws-button { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: var(--alea-space-2); min-width: 0; flex: 1 1 auto; height: 32px; padding: 0 var(--alea-space-2); border-radius: var(--alea-radius-xs); font: var(--alea-font-weight-semibold) var(--alea-font-size-md) / 1 var(--alea-font-family-body); color: var(--alea-text); cursor: default; }\n.alea-ws-button:not([data-static])[data-hovered], .alea-ws-button[data-pressed] { background: var(--alea-surface-hover); }\n.alea-ws-logo { display: inline-grid; place-items: center; flex: none; }\n.alea-ws-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.alea-ws-chevron { width: 14px; height: 14px; color: var(--alea-icon-muted); flex: none; }\n.alea-ws-actions { display: inline-flex; align-items: center; gap: var(--alea-space-1); flex: none; }\n.alea-navsec { display: flex; flex-direction: column; gap: var(--alea-space-0-5); }\n.alea-navsec-head { display: flex; align-items: center; justify-content: space-between; gap: var(--alea-space-2); padding-inline: var(--alea-space-2); }\n.alea-navsec-title { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: var(--alea-space-1); height: 24px; padding: 0 var(--alea-space-1); margin-inline-start: calc(-1 * var(--alea-space-1)); border-radius: var(--alea-radius-xs); font: var(--alea-font-weight-medium) var(--alea-font-size-xs) / 1 var(--alea-font-family-body); color: var(--alea-text-muted); }\nbutton.alea-navsec-title:hover { color: var(--alea-text); background: var(--alea-surface-hover); }\n.alea-navsec-chevron { width: 12px; height: 12px; transition: transform var(--alea-motion-duration-fast) var(--alea-motion-ease-out); }\n.alea-navsec[data-open] .alea-navsec-chevron { transform: rotate(90deg); }\n.alea-navsec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--alea-space-0-5); }\n.alea-navsec-list[hidden] { display: none; }\n.alea-navitem { display: flex; align-items: center; gap: var(--alea-space-2); height: 32px; padding: 0 var(--alea-space-2); border-radius: var(--alea-radius-xs); color: var(--alea-text-soft); font-size: var(--alea-font-size-md); text-decoration: none; transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-navitem[data-hovered] { background: var(--alea-surface-hover); color: var(--alea-text); }\n.alea-navitem[aria-current='page'] { background: var(--alea-surface-raised); color: var(--alea-text); font-weight: var(--alea-font-weight-medium); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-navitem-icon { display: inline-flex; flex: none; } /* its color: navIcon() in icon-contexts.ts (muted, brand when current) */\n.alea-navitem-icon svg { width: 16px; height: 16px; }\n.alea-navitem-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.alea-navitem-end { flex: none; font-size: var(--alea-font-size-xs); color: var(--alea-text-muted); font-variant-numeric: tabular-nums; }\n@media (prefers-reduced-motion: reduce) { .alea-navsec-chevron { transition: none; } }\n"}],"deps":["layout","button","overlay","more","icon","menu"],"npm":["react-aria-components","lucide-react"],"exports":["AppShell","SidebarNav","SidebarGroup","SidebarLink","AppSidebar","WorkspaceSwitcher","AppNavSection","AppNavItem"],"descriptions":{"AppShell":"The app frame: sticky header, sidebar, scrollable content and a skip link.","SidebarNav":"Vertical navigation with groups; the current page is marked.","SidebarGroup":"A group of sidebar links under a title.","SidebarLink":"A link in the side navigation.","AppSidebar":"The side navigation of a web app: a workspace switcher on top, compact links, sections that fold. Pair it with AppShell layout=\"sidebar\".","WorkspaceSwitcher":"The workspace name at the top of the sidebar: a menu to switch workspaces, with quick actions beside it.","AppNavSection":"A group of links in the AppSidebar; with a title it folds.","AppNavItem":"A compact link in the AppSidebar: icon, label and an optional count."}},"slider":{"files":[{"path":"components/slider/Slider.tsx","content":"import type { ReactNode } from 'react';\nimport { useEffect, useRef } from 'react';\nimport { Slider as RACSlider, SliderOutput, SliderTrack, SliderThumb, Label, type SliderProps as RACSliderProps } from 'react-aria-components';\nimport { withBase } from '../../utils/cx';\n\nexport interface SliderProps<T extends number | number[] = number> extends RACSliderProps<T> {\n /** The visible label. */\n label?: ReactNode;\n /** Show the current value next to the label. Default true. */\n showValue?: boolean;\n /** Labels for each thumb in a range (\"Minimum\", \"Maximum\"). */\n thumbLabels?: string[];\n /** Marks along the track: true for one at every step, or values with optional labels ([{ value: 0, label: 'Off' }]). */\n marks?: boolean | Array<{ value: number; label?: ReactNode }>;\n /** A bubble with the value over the thumb: while dragging or focused (default when showValue is false), always, or never. */\n showTooltip?: 'drag' | 'always' | 'never';\n /** sm (4 px track, 16 px thumb), md (default) or lg (8 px track, 24 px thumb). */\n size?: 'sm' | 'md' | 'lg';\n /** The fill color: accent (default), success, warning, danger or info. */\n tone?: 'accent' | 'success' | 'warning' | 'danger' | 'info';\n /** The fill starts here instead of the minimum: 0 in a −50 to 50 slider fills to either side. */\n fillOffset?: number;\n /** The value as words, shown and spoken instead of the number: \"1:23 of 4:56\", \"16 px\", \"Loud\". */\n getValueText?: (value: number) => string;\n}\n\n/** Pick a value, or a range when value is an array (two thumbs): marks with labels, a value bubble, three sizes, tones and a centered fill. Arrows, Page Up/Down, Home and End work. */\nexport function Slider<T extends number | number[] = number>({ label, showValue = true, thumbLabels, marks, showTooltip, size, tone, fillOffset, getValueText, className, ...props }: SliderProps<T>) {\n const root = useRef<HTMLDivElement>(null);\n // the thumbs' inputs carry the spoken value; set it after every render so it follows the value\n useEffect(() => {\n if (!getValueText) return;\n root.current?.querySelectorAll<HTMLInputElement>('input[type=\"range\"]').forEach(i => i.setAttribute('aria-valuetext', getValueText(Number(i.value))));\n });\n const min = props.minValue ?? 0, max = props.maxValue ?? 100, step = props.step ?? 1;\n const tip = showTooltip ?? (showValue ? 'never' : 'drag');\n const markList = marks === true ? Array.from({ length: Math.floor((max - min) / step) + 1 }, (_, i) => ({ value: min + i * step, label: undefined as ReactNode })) : marks || [];\n return (\n <RACSlider {...props} ref={root} className={withBase('alea-slider', className as any)} data-size={size} data-tone={tone} data-marks={markList.length ? true : undefined} data-labeled-marks={markList.some(m => m.label != null) || undefined}>\n {(label || showValue) && (\n <div className=\"alea-slider-head\">\n {label && <Label className=\"alea-label\">{label}</Label>}\n {showValue && <SliderOutput className=\"alea-slider-output\">{({ state }) => state.values.map((v, i) => getValueText ? getValueText(v) : state.getThumbValueLabel(i)).join(' to ')}</SliderOutput>}\n </div>\n )}\n <SliderTrack className=\"alea-slider-track\">\n {({ state }) => {\n const n = state.values.length;\n const pct = (v: number) => (Math.min(max, Math.max(min, v)) - min) / (max - min);\n let a = n > 1 ? state.getThumbPercent(0) : 0, b = state.getThumbPercent(n - 1);\n if (n === 1 && fillOffset != null) { const o = pct(fillOffset); a = Math.min(o, b); b = Math.max(o, b); }\n return (\n <>\n <div className=\"alea-slider-rail\" />\n <div className=\"alea-slider-fill\" style={{ left: `${a * 100}%`, width: `${(b - a) * 100}%` }} />\n {markList.map(m => <span key={m.value} className=\"alea-slider-mark\" data-in={(pct(m.value) >= a && pct(m.value) <= b) || undefined} style={{ left: `${pct(m.value) * 100}%` }} aria-hidden=\"true\">{m.label != null && <span className=\"alea-slider-mark-label\">{m.label}</span>}</span>)}\n {state.values.map((_, i) => (\n <SliderThumb key={i} index={i} aria-label={thumbLabels?.[i]} className=\"alea-slider-thumb\">\n {tip !== 'never' && <span className=\"alea-slider-tip\" data-mode={tip} aria-hidden=\"true\">{getValueText ? getValueText(state.values[i]) : state.getThumbValueLabel(i)}</span>}\n </SliderThumb>\n ))}\n </>\n );\n }}\n </SliderTrack>\n </RACSlider>\n );\n}\n"},{"path":"components/slider/slider.css","content":".alea-slider { display: flex; flex-direction: column; gap: var(--alea-space-2); min-width: 120px; }\n.alea-slider-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--alea-space-2); }\n.alea-slider-output { font: var(--alea-font-weight-medium) var(--alea-font-size-sm) / 1 var(--alea-font-family-body); font-variant-numeric: tabular-nums; color: var(--alea-text); }\n.alea-slider-track { position: relative; height: 28px; width: 100%; }\n.alea-slider-rail, .alea-slider-fill { position: absolute; top: 50%; height: 8px; transform: translateY(-50%); border-radius: var(--alea-radius-full); }\n.alea-slider-rail { left: 0; right: 0; background: var(--alea-surface-raised); box-shadow: inset 0 0 0 1px var(--alea-border-strong); }\n.alea-slider-fill { background: var(--alea-gradient-accent-linear); }\n.alea-slider-thumb {\n top: 50%;\n width: 20px; height: 20px;\n border-radius: 50%;\n background: var(--alea-control-thumb);\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.35);\n transition: transform var(--alea-motion-duration-fast) var(--alea-motion-ease-out), box-shadow var(--alea-motion-duration-fast) var(--alea-motion-ease-standard);\n cursor: grab;\n}\n.alea-slider-thumb[data-hovered] { transform: translateY(-50%) scale(calc(1 + (1 - var(--alea-motion-scale-press)) * 2)) !important; }\n.alea-slider-thumb[data-dragging] { cursor: grabbing; box-shadow: 0 0 0 6px var(--alea-focus-halo), 0 2px 6px rgba(0, 0, 0, 0.35); }\n.alea-slider-thumb[data-focus-visible] { outline: 2px solid var(--alea-focus); outline-offset: var(--alea-space-1); }\n.alea-slider[data-disabled] { opacity: 0.45; }\n\n/* Slider: sizes, tones, marks, value bubble */\n.alea-slider[data-size='sm'] :is(.alea-slider-rail, .alea-slider-fill) { height: 4px; }\n.alea-slider[data-size='sm'] .alea-slider-thumb { width: 16px; height: 16px; }\n.alea-slider[data-size='lg'] :is(.alea-slider-rail, .alea-slider-fill) { height: 8px; }\n.alea-slider[data-size='lg'] .alea-slider-thumb { width: 24px; height: 24px; }\n.alea-slider[data-size='lg'] .alea-slider-track { height: 32px; }\n.alea-slider[data-tone='success'] .alea-slider-fill { background: var(--alea-status-success); }\n.alea-slider[data-tone='warning'] .alea-slider-fill { background: var(--alea-status-warning); }\n.alea-slider[data-tone='danger'] .alea-slider-fill { background: var(--alea-status-danger); }\n.alea-slider[data-tone='info'] .alea-slider-fill { background: var(--alea-status-info); }\n.alea-slider-mark { position: absolute; top: 50%; width: 4px; height: 4px; translate: -50% -50%; border-radius: 50%; background: var(--alea-text-faint); pointer-events: none; }\n.alea-slider-mark[data-in] { background: color-mix(in srgb, var(--alea-control-thumb) 80%, transparent); }\n.alea-slider-mark-label { position: absolute; top: var(--alea-space-3-5); left: 50%; translate: -50% 0; color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); white-space: nowrap; }\n.alea-slider[data-labeled-marks] { padding-bottom: var(--alea-space-5); }\n.alea-slider-tip { position: absolute; bottom: calc(100% + var(--alea-space-2-5)); left: 50%; translate: -50% 4px; padding: var(--alea-space-1) var(--alea-space-2); border-radius: var(--alea-radius-sm); background: var(--alea-chip-bg); color: var(--alea-chip-text); font: var(--alea-font-weight-semibold) var(--alea-font-size-xs) / 1 var(--alea-font-family-body); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), translate var(--alea-motion-duration-fast) var(--alea-motion-ease-out); }\n.alea-slider-tip::after { content: ''; position: absolute; top: 100%; left: 50%; translate: -50% 0; border: 5px solid transparent; border-top-color: var(--alea-chip-bg); }\n.alea-slider-tip[data-mode='always'], .alea-slider-thumb:is([data-dragging], [data-focus-visible], [data-hovered]) .alea-slider-tip { opacity: 1; translate: -50% 0; }\n"}],"deps":[],"npm":["react-aria-components"],"exports":["Slider"],"descriptions":{"Slider":"Pick a value, or a range when value is an array (two thumbs): marks with labels, a value bubble, three sizes, tones and a centered fill. Arrows, Page Up/Down, Home and End work."}},"table":{"files":[{"path":"components/table/Table.tsx","content":"import { useContext, type ReactNode } from 'react';\nimport {\n Table as RACTable, TableHeader as RACTableHeader, Column as RACColumn, TableBody as RACTableBody, Row as RACRow, Cell as RACCell, Checkbox as RACCheckbox, useTableOptions, Collection,\n ResizableTableContainer, ColumnResizer, TableColumnResizeStateContext, Virtualizer, TableLayout,\n type TableProps as RACTableProps, type TableHeaderProps, type ColumnProps as RACColumnProps, type TableBodyProps, type RowProps, type CellProps,\n} from 'react-aria-components';\nimport { ArrowUp, Check, Minus } from 'lucide-react';\nimport { cx, withBase } from '../../utils/cx';\nimport { DragHandle } from '../list/List';\nimport { useStrings } from '../../i18n/strings';\n\nexport interface TableProps extends RACTableProps {\n /** Header stays visible while the body scrolls (needs a height on the container). */\n stickyHeader?: boolean;\n /** compact rows (40 px) or comfy (52 px, default). 'comfortable' is a deprecated alias of 'comfy'. */\n density?: 'comfy' | 'compact' | 'comfortable';\n /** Max height of the scroll area, e.g. 400. */\n maxHeight?: number | string;\n /** Lets people drag column edges to resize. */\n resizable?: boolean;\n /** default, striped (alternate row shades) or bordered (lines between columns too). */\n variant?: 'default' | 'striped' | 'bordered';\n /** Below this breakpoint each row becomes a card, every cell with its column label (give Cell a label). */\n stackBelow?: 'sm' | 'md';\n /** Renders only the rows on screen, for thousands of rows: fixed row height in px (needs maxHeight). */\n virtualized?: { rowHeight: number; headingHeight?: number };\n}\n\nfunction SelectBox({ slot }: { slot?: string }) {\n return (\n <RACCheckbox slot={slot as any} className=\"alea-check alea-table-check\">\n {({ isIndeterminate }) => <span className=\"alea-check-box\" aria-hidden=\"true\">{isIndeterminate ? <Minus size={14} strokeWidth={3} /> : <Check size={14} strokeWidth={3} />}</span>}\n </RACCheckbox>\n );\n}\n\n/** Data in rows and columns: sorting, row selection, sticky header, resizing, keyboard grid navigation. */\nexport function Table({ stickyHeader, density: densityProp = 'comfy', maxHeight, resizable, variant = 'default', stackBelow, virtualized, className, ...props }: TableProps) {\n const density = densityProp === 'compact' ? 'compact' : 'comfy';\n const raw = <RACTable {...props} className={withBase('alea-table', className as any)} data-density={density} data-sticky={stickyHeader || virtualized ? true : undefined} data-variant={variant !== 'default' ? variant : undefined} data-stack={stackBelow} data-virtualized={virtualized ? true : undefined} />;\n const table = virtualized ? <Virtualizer layout={TableLayout} layoutOptions={{ rowHeight: virtualized.rowHeight, headingHeight: virtualized.headingHeight ?? 44 }}>{raw}</Virtualizer> : raw;\n const style = maxHeight ? { maxHeight, ...(virtualized ? { height: maxHeight } : {}) } : undefined;\n return resizable\n ? <ResizableTableContainer className=\"alea-table-wrap\" style={style}>{table}</ResizableTableContainer>\n : <div className=\"alea-table-wrap\" style={style}>{table}</div>;\n}\n\n/** The header row. Adds the select-all checkbox when the table selects multiple rows. */\nexport function TableHeader<T extends object>({ columns, children, className, ...props }: TableHeaderProps<T>) {\n const t = useStrings();\n const { selectionBehavior, selectionMode, allowsDragging } = useTableOptions();\n return (\n <RACTableHeader {...props} className={cx('alea-thead', className as string)}>\n {allowsDragging && <RACColumn className=\"alea-th alea-th-narrow\"><span className=\"alea-visually-hidden\">{t.dragToMove}</span></RACColumn>}\n {selectionBehavior === 'toggle' && <RACColumn className=\"alea-th alea-th-narrow\">{selectionMode === 'multiple' && <SelectBox slot=\"selection\" />}</RACColumn>}\n <Collection items={columns}>{children}</Collection>\n </RACTableHeader>\n );\n}\n\nexport interface ColumnProps extends RACColumnProps {\n children?: ReactNode;\n /** Right-aligns numbers. */\n align?: 'start' | 'end' | 'center';\n}\n\n/** A column header; allowsSorting shows the sort arrow and makes it pressable. */\nexport function Column({ children, align = 'start', className, ...props }: ColumnProps) {\n return (\n <RACColumn {...props} className={withBase('alea-th', className as any)} data-align={align}>\n {({ allowsSorting, sortDirection }) => (\n <div className=\"alea-th-inner\">\n <span className=\"alea-th-label\">{children}</span>\n {allowsSorting && <ArrowUp size={14} aria-hidden=\"true\" className=\"alea-sort\" data-direction={sortDirection} />}\n <ColumnResizerSlot />\n </div>\n )}\n </RACColumn>\n );\n}\n// Only inside a resizable table (the resizer needs its state)\nfunction ColumnResizerSlot() {\n return useContext(TableColumnResizeStateContext) ? <ColumnResizer className=\"alea-col-resizer\" /> : null;\n}\n\n/** The rows. renderEmptyState shows when there are none. */\nexport function TableBody<T extends object>({ className, ...props }: TableBodyProps<T>) {\n return <RACTableBody {...props} className={cx('alea-tbody', className as string)} />;\n}\n\n/** A row; with selection it starts with a checkbox. */\nexport function Row<T extends object>({ id, columns, children, className, ...props }: RowProps<T>) {\n const { selectionBehavior, allowsDragging } = useTableOptions();\n return (\n <RACRow id={id} {...props} className={withBase('alea-tr', className as any)}>\n {allowsDragging && <RACCell className=\"alea-td alea-td-narrow\"><DragHandle /></RACCell>}\n {selectionBehavior === 'toggle' && <RACCell className=\"alea-td alea-td-narrow\"><SelectBox slot=\"selection\" /></RACCell>}\n <Collection items={columns} dependencies={(props as any).dependencies}>{children}</Collection>\n </RACRow>\n );\n}\n\n/** A cell. */\nexport interface FlCellProps extends CellProps {\n /** Text alignment: start (default), center, or end for numbers. */\n align?: 'start' | 'end' | 'center';\n /** The column's name, shown before the value when the table stacks into cards (stackBelow). */\n label?: string;\n}\n\n/** A table cell. */\nexport function Cell({ className, ...props }: FlCellProps) {\n const { align, label, ...rest } = props as any;\n return <RACCell {...rest} data-align={align} data-label={label} className={withBase('alea-td', className as any)} />;\n}\n"},{"path":"components/table/table.css","content":".alea-table-wrap { position: relative; overflow: auto; border-radius: var(--alea-radius-md); background: var(--alea-surface); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--alea-font-size-md); outline: none; }\n.alea-table[data-focus-visible] { outline: 2px solid var(--alea-focus); outline-offset: calc(var(--alea-space-0-5) * -1); border-radius: var(--alea-radius-md); }\n.alea-th {\n height: 44px; padding: 0 var(--alea-space-4);\n text-align: start; vertical-align: middle;\n font: var(--alea-font-weight-semibold) var(--alea-font-size-xs) / 1.2 var(--alea-font-family-body);\n color: var(--alea-text-muted);\n background: var(--alea-surface-deep);\n border-bottom: 1px solid var(--alea-border);\n white-space: nowrap; outline: none; cursor: default;\n}\n.alea-table[data-sticky] .alea-th { position: sticky; top: 0; z-index: 1; }\n.alea-th[data-allows-sorting] { cursor: pointer; }\n.alea-th[data-hovered] { color: var(--alea-text); }\n.alea-th[data-focus-visible] { box-shadow: inset 0 0 0 2px var(--alea-focus); }\n.alea-th-inner { display: flex; align-items: center; gap: var(--alea-space-2); }\n.alea-th[data-align='end'] .alea-th-inner { justify-content: flex-end; }\n.alea-th[data-align='center'] .alea-th-inner { justify-content: center; }\n.alea-th-label { overflow: hidden; text-overflow: ellipsis; }\n.alea-sort { flex: none; opacity: 0.35; transition: transform var(--alea-motion-duration-base) var(--alea-motion-ease-out), opacity var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-th[data-hovered] .alea-sort { opacity: 0.7; }\n.alea-sort[data-direction='ascending'], .alea-sort[data-direction='descending'] { opacity: 1; color: var(--alea-accent-strong); }\n.alea-sort[data-direction='descending'] { transform: rotate(180deg); }\n.alea-col-resizer { width: 2px; height: 20px; margin-left: auto; background: var(--alea-border-strong); cursor: col-resize; touch-action: none; }\n.alea-col-resizer[data-resizing], .alea-col-resizer[data-hovered] { background: var(--alea-accent); }\n.alea-th-narrow, .alea-td-narrow { width: 44px; padding: 0 0 0 var(--alea-space-4); }\n.alea-tr { outline: none; cursor: default; transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-tr[data-href], .alea-tr[data-action] { cursor: pointer; }\n.alea-tr[data-hovered] { background: var(--alea-surface-hover); }\n.alea-tr[data-selected] { background: var(--alea-accent-subtle); }\n.alea-tr[data-focus-visible] { box-shadow: inset 0 0 0 2px var(--alea-focus); }\n.alea-tr[data-disabled] { opacity: 0.45; }\n.alea-td { height: 52px; padding: 0 var(--alea-space-4); border-bottom: 1px solid var(--alea-border); vertical-align: middle; outline: none; }\n.alea-table[data-density='compact'] .alea-td { height: max(var(--alea-size-control-md), 2.5rem); }\n.alea-tr:last-child .alea-td { border-bottom: 0; }\n.alea-td[data-align='end'] { text-align: end; font-variant-numeric: tabular-nums; }\n.alea-td[data-align='center'] { text-align: center; }\n.alea-td[data-focus-visible] { box-shadow: inset 0 0 0 2px var(--alea-focus); }\n.alea-tbody[data-empty] .alea-td, .alea-tbody .alea-table-empty { padding: var(--alea-space-10); text-align: center; color: var(--alea-text-muted); }\n.alea-table-check .alea-check-box svg { width: 16px; height: 16px; }\n\n/* variants */\n.alea-table[data-variant='striped'] .alea-tbody .alea-tr:nth-child(even):not([data-selected]):not([data-hovered]) { background: color-mix(in srgb, var(--alea-surface-deep) 60%, transparent); }\n.alea-table[data-variant='bordered'] .alea-td:not(:last-child), .alea-table[data-variant='bordered'] .alea-th:not(:last-child) { border-right: 1px solid var(--alea-border); }\n/* virtualized: the layout positions rows itself */\n.alea-table[data-virtualized] { display: block; }\n/* stacked into cards on small screens: the header hides, each cell shows its column's label. Each card is outlined on\n the table's own surface (a raised fill would lower the contrast of status colors in the cells) */\n@media (max-width: 639px) {\n .alea-table[data-stack] .alea-thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }\n .alea-table[data-stack] .alea-tbody, .alea-table[data-stack] .alea-tr { display: block; }\n .alea-table[data-stack] .alea-tr { margin: var(--alea-space-2); padding: var(--alea-space-2) 0; border-radius: var(--alea-radius-md); background: transparent; box-shadow: inset 0 0 0 1px var(--alea-border); }\n .alea-table[data-stack] .alea-td { display: flex; justify-content: space-between; gap: var(--alea-space-4); height: auto; min-height: 36px; padding: var(--alea-space-2) var(--alea-space-4); border: 0; text-align: end; }\n .alea-table[data-stack] .alea-td[data-label]::before { content: attr(data-label); flex: none; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); text-align: start; }\n}\n@media (max-width: 767px) {\n .alea-table[data-stack='md'] .alea-thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }\n .alea-table[data-stack='md'] .alea-tbody, .alea-table[data-stack='md'] .alea-tr { display: block; }\n .alea-table[data-stack='md'] .alea-tr { margin: var(--alea-space-2); padding: var(--alea-space-2) 0; border-radius: var(--alea-radius-md); background: transparent; box-shadow: inset 0 0 0 1px var(--alea-border); }\n .alea-table[data-stack='md'] .alea-td { display: flex; justify-content: space-between; gap: var(--alea-space-4); height: auto; min-height: 36px; padding: var(--alea-space-2) var(--alea-space-4); border: 0; text-align: end; }\n .alea-table[data-stack='md'] .alea-td[data-label]::before { content: attr(data-label); flex: none; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); text-align: start; }\n}\n\n/* virtualized: rows and cells render as positioned divs, so center them with flex */\n.alea-table[data-virtualized] .alea-th,\n.alea-table[data-virtualized] .alea-td { display: flex; align-items: center; height: 100%; }\n.alea-table[data-virtualized] [data-align='end'] { justify-content: flex-end; }\n.alea-table[data-virtualized] [data-align='center'] { justify-content: center; }\n.alea-table[data-virtualized] .alea-th > .alea-th-inner { flex: 1; }\n.alea-table[data-virtualized] .alea-td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n\n/* stacked rows keep their focus ring (the card outline above would otherwise replace it) */\n.alea-table[data-stack] .alea-tr[data-focus-visible], .alea-table[data-stack='md'] .alea-tr[data-focus-visible] { box-shadow: inset 0 0 0 2px var(--alea-focus); }\n"}],"deps":["list"],"npm":["react-aria-components","lucide-react"],"exports":["Table","TableHeader","Column","TableBody","Row","Cell"],"descriptions":{"Table":"Data in rows and columns: sorting, row selection, sticky header, resizing, keyboard grid navigation.","TableHeader":"The header row. Adds the select-all checkbox when the table selects multiple rows.","Column":"A column header; allowsSorting shows the sort arrow and makes it pressable.","TableBody":"The rows. renderEmptyState shows when there are none.","Row":"A row; with selection it starts with a checkbox.","Cell":"A table cell."}},"tabs":{"files":[{"path":"components/tabs/Tabs.tsx","content":"import { useEffect, useId, useLayoutEffect, useRef, useState, type ReactNode } from 'react';\nimport { Tabs as RACTabs, TabList as RACTabList, Tab as RACTab, TabPanel as RACTabPanel, type TabsProps as RACTabsProps, type TabListProps as RACTabListProps, type TabProps as RACTabProps, type TabPanelProps, SelectionIndicator, Link as RACLink } from 'react-aria-components';\nimport { ChevronLeft, ChevronRight, X } from 'lucide-react';\nimport { withBase } from '../../utils/cx';\nimport { tabIcon } from '../icon/icon-contexts';\nimport { useScrollEdges } from '../../utils/scrollEdges';\nimport { useStrings } from '../../i18n/strings';\n\nexport interface TabsProps extends RACTabsProps {\n /** underline (default), pills (the segmented look), enclosed (card tabs joined to the panel) or soft (a tinted pill). */\n variant?: 'underline' | 'pills' | 'enclosed' | 'soft';\n /** sm (32 px tabs), md (40 px, default) or lg (48 px). */\n size?: 'sm' | 'md' | 'lg';\n /** The tabs share the full width equally. */\n fitted?: boolean;\n /** Where the tabs sit in the row when not fitted: start (default), center or end. */\n justify?: 'start' | 'center' | 'end';\n}\n\n/** Switch between views: four looks, three sizes, icons, badges, closable tabs, extra content and scroll arrows when tabs overflow. Arrow keys move between tabs; Home and End jump. */\nexport function Tabs({ variant = 'underline', size, fitted, justify, className, ...props }: TabsProps) {\n const root = useRef<HTMLDivElement>(null);\n // tabs used as a view switch have no TabPanel: drop aria-controls when it points at nothing (checked again\n // whenever tabs or panels change, since panels mount and unmount with the selection)\n useLayoutEffect(() => {\n const el = root.current;\n if (!el) return;\n const fix = () => el.querySelectorAll('[role=\"tab\"][aria-controls]').forEach(t => { if (!document.getElementById(t.getAttribute('aria-controls')!)) t.removeAttribute('aria-controls'); });\n fix();\n if (typeof MutationObserver === 'undefined') return;\n const mo = new MutationObserver(fix);\n mo.observe(el, { subtree: true, childList: true, attributes: true, attributeFilter: ['aria-controls'] });\n return () => mo.disconnect();\n }, []);\n return <RACTabs {...props} ref={root} data-variant={variant} data-size={size} data-fitted={fitted || undefined} data-justify={justify} className={withBase('alea-tabs', className as any)} />;\n}\n\nexport interface TabListProps<T extends object> extends RACTabListProps<T> {\n /** Content at the end of the row, outside the tabs: an add button, a filter. */\n extra?: ReactNode;\n /** Makes the tabs reorderable: drag them, or Alt + Shift + arrows on the focused tab. Called with the moved tab's id and its new index; update your order. */\n onReorder?: (key: string, toIndex: number) => void;\n}\n\n/** The row of tabs. Needs an aria-label when there is no visible heading for it. Shows scroll arrows when the tabs do not fit, and can be reordered. */\nexport function TabList<T extends object>({ className, extra, onReorder, ...props }: TabListProps<T>) {\n const t = useStrings();\n const box = useRef<HTMLDivElement>(null);\n const { edges, scroll } = useScrollEdges(box, '.alea-tab-list');\n const [said, setSaid] = useState('');\n const hint = useId();\n const reorder = useRef(onReorder); reorder.current = onReorder;\n useEffect(() => {\n const list = box.current?.querySelector<HTMLElement>('.alea-tab-list');\n if (!list || !onReorder) return;\n const tabs = () => Array.from(list.querySelectorAll<HTMLElement>('[role=\"tab\"]'));\n const mark = () => tabs().forEach(el => { el.setAttribute('draggable', 'true'); el.setAttribute('aria-describedby', hint); el.setAttribute('aria-keyshortcuts', 'Alt+Shift+ArrowLeft Alt+Shift+ArrowRight'); });\n mark();\n const mo = new MutationObserver(mark); mo.observe(list, { childList: true });\n const vertical = () => list.getAttribute('aria-orientation') === 'vertical';\n const move = (el: HTMLElement, to: number) => {\n const all = tabs(), key = el.dataset.key!; to = Math.max(0, Math.min(all.length - 1, to));\n if (to === all.indexOf(el)) return;\n reorder.current?.(key, to);\n setSaid(t.movedTo(el.textContent ?? key, to + 1, all.length));\n // React moves the node; keep focus on it\n requestAnimationFrame(() => list.querySelector<HTMLElement>(`[data-key=\"${CSS.escape(key)}\"]`)?.focus());\n };\n const onKey = (e: globalThis.KeyboardEvent) => {\n const el = (e.target as HTMLElement).closest<HTMLElement>('[role=\"tab\"]');\n if (!el || !e.altKey || !e.shiftKey) return;\n const back = vertical() ? 'ArrowUp' : 'ArrowLeft', fwd = vertical() ? 'ArrowDown' : 'ArrowRight';\n if (e.key !== back && e.key !== fwd) return;\n e.preventDefault(); e.stopPropagation();\n const rtl = getComputedStyle(list).direction === 'rtl' && !vertical();\n move(el, tabs().indexOf(el) + ((e.key === fwd) !== rtl ? 1 : -1));\n };\n let dragged: HTMLElement | null = null;\n const onStart = (e: DragEvent) => { dragged = (e.target as HTMLElement).closest('[role=\"tab\"]'); if (dragged) { e.dataTransfer?.setData('text/plain', dragged.dataset.key ?? ''); dragged.dataset.dragging = 'true'; } };\n const onOver = (e: DragEvent) => { if (dragged) e.preventDefault(); };\n const onDrop = (e: DragEvent) => {\n const over = (e.target as HTMLElement).closest<HTMLElement>('[role=\"tab\"]');\n if (dragged && over && over !== dragged) { e.preventDefault(); move(dragged, tabs().indexOf(over)); }\n };\n const onEnd = () => { if (dragged) delete dragged.dataset.dragging; dragged = null; };\n list.addEventListener('keydown', onKey, true);\n list.addEventListener('dragstart', onStart); list.addEventListener('dragover', onOver); list.addEventListener('drop', onDrop); list.addEventListener('dragend', onEnd);\n return () => {\n mo.disconnect(); list.removeEventListener('keydown', onKey, true);\n list.removeEventListener('dragstart', onStart); list.removeEventListener('dragover', onOver); list.removeEventListener('drop', onDrop); list.removeEventListener('dragend', onEnd);\n tabs().forEach(el => { el.removeAttribute('draggable'); el.removeAttribute('aria-describedby'); el.removeAttribute('aria-keyshortcuts'); });\n };\n }, [!!onReorder, hint]); // eslint-disable-line react-hooks/exhaustive-deps\n return (\n <div ref={box} className=\"alea-tab-bar\" data-overflow-start={edges.start || undefined} data-overflow-end={edges.end || undefined} data-reorderable={onReorder ? true : undefined}>\n {/* the arrows are for the pointer; keyboard users move with the arrow keys and tabs scroll into view */}\n {edges.start && <button type=\"button\" tabIndex={-1} aria-hidden=\"true\" className=\"alea-tab-scroll\" data-side=\"start\" onClick={() => scroll(-1)}><ChevronLeft size={16} /></button>}\n <RACTabList {...props} aria-label={props['aria-label']} className={withBase('alea-tab-list', className as any)} />\n {edges.end && <button type=\"button\" tabIndex={-1} aria-hidden=\"true\" className=\"alea-tab-scroll\" data-side=\"end\" onClick={() => scroll(1)}><ChevronRight size={16} /></button>}\n {extra && <div className=\"alea-tab-extra\">{extra}</div>}\n {onReorder && <><span id={hint} hidden>{t.reorderHint}</span><span className=\"alea-visually-hidden\" role=\"status\">{said}</span></>}\n </div>\n );\n}\n\nexport interface TabProps extends RACTabProps {\n /** An icon before the label. */\n icon?: ReactNode;\n /** A count or short tag after the label. */\n badge?: ReactNode;\n /** Makes the tab closable: Delete or Backspace closes it, and an × shows for the pointer. */\n onClose?: () => void;\n}\n\n/** One tab; its id matches a TabPanel. */\nexport function Tab({ className, children, icon, badge, onClose, ...props }: TabProps) {\n const t = useStrings();\n const ref = useRef<HTMLDivElement>(null);\n const close = useRef(onClose); close.current = onClose;\n // React Aria's Tab takes no onKeyDown, so listen on the element\n useEffect(() => {\n const el = ref.current;\n if (!el || !onClose) return;\n el.setAttribute('aria-keyshortcuts', 'Delete');\n const on = (e: globalThis.KeyboardEvent) => { if (e.key === 'Delete' || e.key === 'Backspace') { e.preventDefault(); close.current?.(); } };\n el.addEventListener('keydown', on);\n return () => el.removeEventListener('keydown', on);\n }, [!!onClose]); // eslint-disable-line react-hooks/exhaustive-deps\n return (\n <RACTab {...props} ref={ref} className={withBase('alea-tab alea-focus-ring', className as any)} data-closable={onClose ? true : undefined}>\n {state => (\n <>\n {icon && <span className=\"alea-tab-icon\" aria-hidden=\"true\" {...tabIcon(state.isSelected)}>{icon}</span>}\n <span className=\"alea-tab-label\">{typeof children === 'function' ? children(state) : children}</span>\n {badge != null && <span className=\"alea-tab-badge\">{badge}</span>}\n {onClose && <span className=\"alea-tab-close\" aria-hidden=\"true\" title={t.close} onPointerDown={e => e.stopPropagation()} onClick={e => { e.stopPropagation(); onClose(); }}><X size={12} /></span>}\n <SelectionIndicator className=\"alea-sel-indicator\" />\n </>\n )}\n </RACTab>\n );\n}\n\n/** The content for the tab with the same id. Pass shouldForceMount to keep it mounted while hidden. */\nexport function TabPanel({ className, ...props }: TabPanelProps) {\n // an empty panel would be an invisible Tab stop; Tabs drops the aria-controls that pointed at it\n if (props.children == null || props.children === false) return null;\n return <RACTabPanel {...props} className={withBase('alea-tab-panel alea-focus-ring', className as any)} />;\n}\n\n// ---------------------------------------------------------------- tab nav\nexport interface TabNavItem {\n /** Matches current. */\n id: string;\n label: ReactNode;\n /** The page it opens. */\n href: string;\n /** An icon before the label. */\n icon?: ReactNode;\n /** A count or short word after the label. */\n badge?: ReactNode;\n}\nexport interface TabNavProps {\n /** The pages of the section, in order. */\n items: TabNavItem[];\n /** The id of the page being shown. */\n current?: string;\n /** Name of the navigation (\"Settings\"). */\n 'aria-label': string;\n /** The same looks and sizes as Tabs. */\n variant?: TabsProps['variant'];\n size?: TabsProps['size'];\n className?: string;\n}\n\n/** Tabs that are links: the pages of one section (settings, a project, a profile), each with its own address. A navigation landmark; the current page is marked with aria-current. Use Tabs to switch views inside one page. */\nexport function TabNav({ items, current, variant = 'underline', size, className, 'aria-label': label }: TabNavProps) {\n return (\n <nav aria-label={label} className={['alea-tabs alea-tab-nav', className].filter(Boolean).join(' ')} data-variant={variant} data-size={size}>\n <div className=\"alea-tab-bar\">\n <div className=\"alea-tab-list\">\n {items.map(it => {\n const on = it.id === current;\n return (\n <RACLink key={it.id} href={it.href} aria-current={on ? 'page' : undefined} data-selected={on || undefined} className=\"alea-tab alea-focus-ring\">\n {it.icon && <span className=\"alea-tab-icon\" aria-hidden=\"true\">{it.icon}</span>}\n <span className=\"alea-tab-label\">{it.label}</span>\n {it.badge != null && <span className=\"alea-tab-badge\">{it.badge}</span>}\n {on && <span className=\"alea-sel-indicator\" />}\n </RACLink>\n );\n })}\n </div>\n </div>\n </nav>\n );\n}\n"},{"path":"components/tabs/tabs.css","content":".alea-tabs { display: flex; flex-direction: column; gap: var(--alea-space-4); }\n.alea-tabs[data-orientation='vertical'] { flex-direction: row; }\n.alea-tab-bar { position: relative; display: flex; align-items: center; gap: var(--alea-space-2); min-width: 0; }\n.alea-tabs[data-orientation='vertical'] > .alea-tab-bar { flex-direction: column; align-items: stretch; }\n.alea-tab-list { position: relative; display: flex; flex: 1; min-width: 0; gap: var(--alea-space-1); overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }\n.alea-tab-list::-webkit-scrollbar { display: none; }\n/* fade the edge where more tabs hide */\n.alea-tab-bar[data-overflow-end] .alea-tab-list { mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }\n.alea-tab-bar[data-overflow-start] .alea-tab-list { mask-image: linear-gradient(to left, #000 calc(100% - 48px), transparent); }\n.alea-tab-bar[data-overflow-start][data-overflow-end] .alea-tab-list { mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent); }\n.alea-tab-scroll { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 28px; height: 28px; translate: 0 -50%; border: 0; border-radius: 50%; background: var(--alea-surface-overlay); box-shadow: var(--alea-shadow-card), inset 0 0 0 1px var(--alea-border); color: var(--alea-text); cursor: pointer; }\n.alea-tab-scroll[data-side='start'] { left: 0; } .alea-tab-scroll[data-side='end'] { right: 0; }\n.alea-tab-bar:has(.alea-tab-extra) .alea-tab-scroll[data-side='end'] { right: auto; left: calc(100% - var(--alea-space-7) - var(--alea-tab-extra-w, var(--alea-space-0))); }\n.alea-tab-extra { flex: none; display: flex; align-items: center; gap: var(--alea-space-2); }\n@media (pointer: coarse) { .alea-tab-scroll { display: none; } }\n.alea-tab-bar[data-reorderable] .alea-tab { cursor: grab; }\n.alea-tab-bar[data-reorderable] .alea-tab[data-dragging] { opacity: 0.48; cursor: grabbing; }\n.alea-tab-icon { display: inline-flex; flex: none; }\n/* the icon is muted like the label, and follows it on hover and on the selected pill (tabIcon() in icon-contexts.ts) */\n.alea-tab[data-hovered] .alea-tab-icon[data-icon-tone] { color: var(--alea-icon); }\n.alea-tabs[data-variant='pills'] .alea-tab[data-selected] .alea-tab-icon[data-icon-tone] { color: var(--alea-icon-chip); }\n.alea-tab-badge { min-width: 20px; padding: var(--alea-space-0-25) var(--alea-space-2); border-radius: var(--alea-radius-full); background: var(--alea-surface-raised); color: var(--alea-text-muted); font: var(--alea-font-weight-semibold) var(--alea-font-size-2xs) / 1.4 var(--alea-font-family-body); text-align: center; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }\n.alea-tab[data-selected] .alea-tab-badge { background: var(--alea-accent-subtle); color: var(--alea-text); }\n.alea-tab-close { position: relative; z-index: 1; display: grid; place-items: center; width: 20px; height: 20px; margin-right: calc(var(--alea-space-1) * -1); border-radius: var(--alea-radius-xs); color: var(--alea-text-faint); }\n.alea-tab-close:hover { background: var(--alea-surface-hover); color: var(--alea-text); }\n.alea-tab-label { position: relative; z-index: 1; }\n.alea-tab-icon { position: relative; z-index: 1; }\n.alea-tab-list[data-orientation='vertical'] { flex-direction: column; }\n.alea-tab {\n position: relative;\n display: inline-flex; align-items: center; gap: var(--alea-space-2);\n height: 40px; padding: 0 var(--alea-space-3);\n border-radius: var(--alea-radius-xs);\n color: var(--alea-text-muted);\n font: var(--alea-font-weight-medium) var(--alea-font-size-md) / 1 var(--alea-font-family-body);\n white-space: nowrap; cursor: pointer; outline: none;\n transition: color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard);\n}\n.alea-tab[data-hovered] { color: var(--alea-text); }\n.alea-tab[data-disabled] { opacity: 0.4; cursor: not-allowed; }\n.alea-tab svg { width: 16px; height: 16px; }\n.alea-tabs[data-variant='underline'] .alea-tab-list { box-shadow: inset 0 -1px 0 var(--alea-border); }\n.alea-tabs[data-variant='underline'] .alea-tab[data-selected] { color: var(--alea-text); }\n.alea-tabs[data-variant='pills'] .alea-tab-list { align-self: flex-start; padding: var(--alea-space-1); gap: var(--alea-space-0-5); border-radius: var(--alea-radius-full); background: var(--alea-surface-deep); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-tabs[data-variant='pills'] .alea-tab { height: 36px; border-radius: var(--alea-radius-full); padding: 0 var(--alea-space-4); }\n.alea-tabs[data-variant='pills'] .alea-tab[data-selected] { color: var(--alea-chip-text); }\n.alea-tabs[data-variant='pills'] .alea-tab[data-selected] :is(.alea-badge, .alea-tab-badge) { background: color-mix(in oklab, var(--alea-chip-text) 20%, transparent); color: var(--alea-chip-text); } /* a count on the selected pill reads on the pill, whatever the look */\n.alea-tab-panel { border-radius: var(--alea-radius-xs); }\n.alea-tab-panel[data-entering] { animation: alea-m-fade-in var(--alea-motion-duration-base) var(--alea-motion-ease-standard); }\n\n/* sizes */\n.alea-tabs[data-size='sm'] .alea-tab { height: 32px; padding: 0 var(--alea-space-2); font-size: var(--alea-font-size-sm); }\n.alea-tabs[data-size='lg'] .alea-tab { height: 48px; padding: 0 var(--alea-space-4); font-size: var(--alea-font-size-base); }\n.alea-tabs[data-variant='pills'][data-size='sm'] .alea-tab { height: 28px; }\n.alea-tabs[data-variant='pills'][data-size='lg'] .alea-tab { height: 44px; }\n/* fitted and justify */\n.alea-tabs[data-fitted] .alea-tab { flex: 1; justify-content: center; }\n.alea-tabs[data-fitted][data-variant='pills'] .alea-tab-list { align-self: stretch; }\n.alea-tabs[data-justify='center'] .alea-tab-list { justify-content: center; }\n.alea-tabs[data-justify='end'] .alea-tab-list { justify-content: flex-end; }\n/* enclosed: card tabs joined to the panel */\n.alea-tabs[data-variant='enclosed'] { gap: 0; }\n.alea-tabs[data-variant='enclosed'] .alea-tab-list { gap: var(--alea-space-1); box-shadow: inset 0 -1px 0 var(--alea-border); }\n.alea-tabs[data-variant='enclosed'] .alea-tab { border-radius: var(--alea-radius-sm) var(--alea-radius-sm) 0 0; background: var(--alea-surface-deep); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-tabs[data-variant='enclosed'] .alea-tab[data-selected] { background: var(--alea-surface); color: var(--alea-text); box-shadow: inset 1px 0 0 var(--alea-border), inset -1px 0 0 var(--alea-border), inset 0 1px 0 var(--alea-border); }\n.alea-tabs[data-variant='enclosed'] .alea-tab-panel { padding: var(--alea-space-4); border: 1px solid var(--alea-border); border-top: 0; border-radius: 0 0 var(--alea-radius-md) var(--alea-radius-md); background: var(--alea-surface); }\n.alea-tabs[data-variant='enclosed'] .alea-sel-indicator { display: none; }\n/* soft: a tinted pill under the selected tab */\n.alea-tabs[data-variant='soft'] .alea-tab { border-radius: var(--alea-radius-full); padding: 0 var(--alea-space-4); }\n.alea-tabs[data-variant='soft'] .alea-tab[data-selected] { color: var(--alea-text); }\n.alea-tabs[data-variant='soft'] .alea-sel-indicator { background: var(--alea-accent-subtle); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--alea-accent) 35%, transparent); }\n/* TabNav: tabs that are links */\n.alea-tab-nav .alea-tab { text-decoration: none; }\n"}],"deps":["icon"],"npm":["react-aria-components","lucide-react"],"exports":["Tabs","TabList","Tab","TabPanel","TabNav"],"descriptions":{"Tabs":"Switch between views: four looks, three sizes, icons, badges, closable tabs, extra content and scroll arrows when tabs overflow. Arrow keys move between tabs; Home and End jump.","TabList":"The row of tabs. Needs an aria-label when there is no visible heading for it. Shows scroll arrows when the tabs do not fit, and can be reordered.","Tab":"One tab; its id matches a TabPanel.","TabPanel":"The content for the tab with the same id. Pass shouldForceMount to keep it mounted while hidden.","TabNav":"Tabs that are links: the pages of one section (settings, a project, a profile), each with its own address. A navigation landmark; the current page is marked with aria-current. Use Tabs to switch views inside one page."}},"theme":{"files":[{"path":"components/theme/Theme.tsx","content":"import { createContext, useCallback, useContext, useEffect, useId, useMemo, useState, type CSSProperties, type ReactNode, useSyncExternalStore } from 'react';\nimport { I18nProvider, RouterProvider } from 'react-aria-components';\nimport { motionAttributes, motionComponentCss, motionVariables, type MotionConfig } from '@alea-design/motion';\nimport { cx } from '../../utils/cx';\nimport { StringsContext, type AleaStrings } from '../../i18n/strings';\nimport { refractionLevel, startGlassLens, type GlassRefraction } from './lens';\n\n/** Brand changes on top of the Alea tokens. Everything not set keeps the default. */\nexport interface BrandTheme {\n /** Your accent color (any CSS color). Strong (for text and links), subtle and focus are mixed from it per theme; check text on it with ContrastBadge. */\n accent?: string;\n /** Text on solid accent surfaces. Default the kit's (near black). */\n accentOn?: string;\n /** Multiplies every radius: 0 square, 0.5 tight, 1 the Alea default, 1.4 rounder. */\n radius?: number;\n /** compact (controls 8 px shorter and the Compact space scale: base 2 px) or comfy (default). To change the space scale only, use the density prop of ThemeProvider. 'comfortable' is a deprecated alias of 'comfy'. */\n density?: 'comfy' | 'compact' | 'comfortable';\n /** Font stacks: body (UI and text), display (big titles), mono (code). Load the fonts yourself. */\n fonts?: { body?: string; display?: string; mono?: string };\n}\n\n// The Compact space scale in rem (base 0.125rem = 2 px; 1rem = 16 px): step N is N x 2 px, an odd result of a whole step rounded up to the next even number; the half steps (0-5, 1-5, 2-5, 3-5) are literal, base x N; the hairline 0-25 stays 1 px. The same values as [data-density=\"compact\"] in tokens.css (a test keeps them equal).\nexport const COMPACT_SPACE: Record<string, string> = {\n '--alea-spacing-base': '0.125rem', '--alea-space-0': '0rem', '--alea-space-0-25': '0.0625rem', '--alea-space-0-5': '0.0625rem', '--alea-space-1-5': '0.1875rem', '--alea-space-2-5': '0.3125rem', '--alea-space-3-5': '0.4375rem', '--alea-space-1': '0.125rem', '--alea-space-2': '0.25rem', '--alea-space-3': '0.375rem', '--alea-space-4': '0.5rem', '--alea-space-5': '0.625rem', '--alea-space-6': '0.75rem',\n '--alea-space-7': '0.875rem', '--alea-space-8': '1rem', '--alea-space-10': '1.25rem', '--alea-space-12': '1.5rem', '--alea-space-16': '2rem', '--alea-space-20': '2.5rem', '--alea-space-22': '2.75rem', '--alea-space-24': '3rem',\n};\nconst RADII: Array<[string, number]> = [['3xs', 1], ['2xs', 2], ['xs', 4], ['sm', 6], ['field', 8], ['md', 10], ['lg', 12], ['xl', 16], ['2xl', 20], ['3xl', 24], ['4xl', 32]]; // the Graphite ladder, the one of every look but Glass\n/** Glass is the one look with its own ladder: twice Graphite from xs to 4xl; the hairlines 3xs and 2xs stay. */\nexport const GLASS_RADII: Array<[string, number]> = RADII.map(([k, px]) => [k, k === '3xs' || k === '2xs' ? px : px * 2]);\n/** The CSS variables a brand sets. Use it to theme a server-rendered page or a wrapper by hand. */\nexport function brandVariables(b: BrandTheme = {}, preset: string = 'default'): Record<string, string> {\n const v: Record<string, string> = {};\n if (b.accent) {\n v['--alea-accent'] = b.accent;\n v['--alea-accent-strong'] = `color-mix(in oklch, ${b.accent} 62%, var(--alea-text))`;\n v['--alea-accent-subtle'] = `color-mix(in oklch, ${b.accent} 16%, transparent)`;\n v['--alea-focus'] = b.accent;\n v['--alea-focus-halo'] = `color-mix(in oklch, ${b.accent} 30%, transparent)`;\n // filled controls (checked boxes, switches, primary accent buttons) and the accent gradients follow too\n v['--alea-accent-solid'] = b.accent;\n const light = `color-mix(in oklch, ${b.accent} 55%, white)`;\n v['--alea-gradient-accent'] = `radial-gradient(100% 100% at 25% 100%, ${b.accent} 0%, ${light} 100%)`;\n v['--alea-gradient-accent-linear'] = `linear-gradient(120deg, ${b.accent} 0%, ${light} 100%)`;\n // the text gradients follow the brand too (the defaults darken the yellow end in Light, which is the kit's own accent)\n v['--alea-gradient-text'] = v['--alea-gradient-accent'];\n v['--alea-gradient-text-linear'] = v['--alea-gradient-accent-linear'];\n // the hover glow too (a wrapper with a brand may sit under a root with another accent)\n v['--alea-shadow-glow'] = `0 10px 30px -10px color-mix(in srgb, ${b.accent} 55%, transparent)`;\n }\n if (b.accentOn) v['--alea-accent-on'] = b.accentOn;\n if (b.radius != null) {\n for (const [k, px] of (preset === 'glass' ? GLASS_RADII : RADII)) v[`--alea-radius-${k}`] = `${Math.round(px * b.radius)}px`;\n // pills (buttons, tags, switches, segmented controls) stay pills from 1 up and round down to square at 0\n v['--alea-radius-full'] = b.radius >= 1 ? '9999px' : `${Math.round(18 * b.radius)}px`;\n }\n // compact: smaller controls and the Compact space scale (base 2 px), so paddings and gaps shrink with them\n if (b.density === 'compact') Object.assign(v, COMPACT_SPACE, {\n '--alea-size-control-sm': '24px', '--alea-size-control-md': '32px', '--alea-size-control-lg': '40px', '--alea-size-field': '36px',\n });\n if (b.fonts?.body) v['--alea-font-family-body'] = b.fonts.body;\n if (b.fonts?.display) v['--alea-font-family-display'] = b.fonts.display;\n if (b.fonts?.mono) v['--alea-font-family-mono'] = b.fonts.mono;\n return v;\n}\n\nexport type ThemeName = 'dark' | 'light' | 'system';\n\ninterface ThemeContextValue {\n /** The theme picked: dark, light or system. */\n theme: ThemeName;\n /** The theme in effect after resolving system. */\n resolvedTheme: 'dark' | 'light';\n setTheme: (theme: ThemeName) => void;\n}\n\nconst ThemeContext = createContext<ThemeContextValue | null>(null);\n\nexport interface ThemeProviderProps {\n children: ReactNode;\n /** Theme to start with when nothing is stored. Defaults to dark. */\n defaultTheme?: ThemeName;\n /** Controlled theme. */\n theme?: ThemeName;\n /** Called with the new theme when it changes. */\n onThemeChange?: (theme: ThemeName) => void;\n /** localStorage key to remember the choice; pass null to not store it. */\n storageKey?: string | null;\n /** Where data-theme goes: the document root (default) or a wrapper div. */\n scope?: 'document' | 'element';\n /** Class names for the wrapper (scope=\"element\"). */\n className?: string;\n /** Brand changes: accent color, radius, density, fonts. */\n brand?: BrandTheme;\n /** Space density: \"comfy\" (default, base 4 px; \"comfortable\" is a deprecated alias) or \"compact\" (base 2 px: every space token halves, odd results rounded up to even). Sets data-density on the root or the wrapper; controls keep their size (use brand.density for shorter controls too). */\n density?: 'comfy' | 'compact' | 'comfortable';\n /** Your router's navigate function (React Router's useNavigate(), Next's router.push): links in the kit then navigate without a reload. */\n navigate?: (path: string, options?: any) => void;\n /** Your router's useHref, for routers with a base path. */\n useHref?: (href: string) => string;\n /** A BCP 47 locale (\"es-ES\", \"pt-BR\"): dates, numbers, calendars and the built-in labels follow it. Default the browser's. */\n locale?: string;\n /** A look on top of the tokens, each with dark and light: \"graphite\" is monochrome (near-black and white, gray surfaces, sans titles); \"midnight\" is serious and precise (navy, hairline borders, a clear blue accent and button, sans titles); \"glass\" is light and airy (frosted glass on every surface, Inter, a blue accent); \"ember\", \"solar\" and \"moss\" keep one hue each: warm red, amber and green, in dark and light. */\n preset?: 'default' | 'graphite' | 'midnight' | 'glass' | 'ember' | 'solar' | 'moss';\n /** \"glass\" turns floating surfaces (navbar, popovers, menus, dialogs, toasts, drawers) into frosted glass. */\n surface?: 'solid' | 'glass';\n /** system (default) raises contrast when the device asks for it; more always raises it to WCAG AAA (7:1 text, stronger borders); normal never does. */\n contrast?: 'system' | 'more' | 'normal';\n /** decorated (default) keeps the background orbs and aurora; plain turns them off for a flat page, in any look and contrast. */\n background?: 'decorated' | 'plain';\n /** The glass look's liquid edge (Chromium; others keep the frost): how much what is behind a glass surface bends at its edge,\n * 'off', 'subtle', 'medium' (default) or 'strong', or a multiplier; lensSelector adds your own surfaces (CSS selector).\n * The lens rests while the page scrolls and comes back ~150 ms after it stops (the frost stays); pauseOnScroll={false} keeps it on always. Surfaces over 400 x 300 px keep the frost only. */\n glass?: { refraction?: GlassRefraction; lensSelector?: string; pauseOnScroll?: boolean };\n /** Change any text the kit writes (labels, placeholders, announcements), on top of the locale's pack (English and Spanish ship). */\n strings?: Partial<AleaStrings>;\n /** Motion for everything below: mode (expressive, productive, reduced, off), reduced (system, always, never), speed, intensity, and per-component defaults. */\n motion?: MotionConfig;\n}\n\nfunction systemTheme(): 'dark' | 'light' {\n return typeof window !== 'undefined' && window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark';\n}\nfunction subscribeSystem(onChange: () => void) {\n if (typeof window === 'undefined' || !window.matchMedia) return () => {};\n const mq = window.matchMedia('(prefers-color-scheme: light)');\n mq.addEventListener?.('change', onChange);\n return () => mq.removeEventListener?.('change', onChange);\n}\nconst noSubscribe = () => () => {};\n\n/** An inline script for server-rendered pages: sets data-theme on <html> from the stored choice (or the OS) before\n * the first paint, so the page never flashes the other theme. Put it in <head> with suppressHydrationWarning on <html>. */\nexport function themeScript(storageKey = 'alea-theme', defaultTheme: ThemeName = 'dark') {\n return `(function(){try{var k=${JSON.stringify(storageKey)},t=k&&localStorage.getItem(k)||${JSON.stringify(defaultTheme)};if(t==='system')t=matchMedia('(prefers-color-scheme: light)').matches?'light':'dark';document.documentElement.setAttribute('data-theme',t)}catch(e){}})()`;\n}\n/** The same script as an element, for React frameworks with server components (a server layout can render it; it cannot\n * call themeScript() directly): <head><ThemeScript /></head>, with suppressHydrationWarning on <html>. */\nexport function ThemeScript({ storageKey = 'alea-theme', defaultTheme = 'dark' }: { storageKey?: string; defaultTheme?: ThemeName }) {\n return <script dangerouslySetInnerHTML={{ __html: themeScript(storageKey, defaultTheme) }} />;\n}\nfunction stored(key: string | null): ThemeName | null {\n if (!key || typeof window === 'undefined') return null;\n try { const v = window.localStorage.getItem(key); return v === 'dark' || v === 'light' || v === 'system' ? v : null; } catch { return null; }\n}\n\n/** Puts the Alea tokens in dark, light or system mode and shares the choice. */\nconst ABSOLUTE = /^([a-z][a-z0-9+.-]*:|\\/\\/|#)/i;\nconst wrapped = new WeakMap<(href: string) => string, (href: string) => string>();\n/** A router's useHref that leaves absolute URLs, protocol-relative URLs and #anchors alone (routers would turn https://… into /current/https:/…). */\nexport function keepAbsolute(useHref: (href: string) => string) {\n let w = wrapped.get(useHref);\n if (!w) { w = (href: string) => { const h = useHref(href); return ABSOLUTE.test(href) ? href : h; }; wrapped.set(useHref, w); }\n return w;\n}\n\n// Glass refraction: the shared lens manager (lens.ts) bends the backdrop at the edge of every glass surface\nfunction useGlassLens(level: number, extra?: string, pause = true) {\n useEffect(() => {\n if (typeof document === 'undefined') return;\n document.documentElement.setAttribute('data-alea-refraction', String(level));\n if (pause) document.documentElement.removeAttribute('data-alea-lens-pause'); else document.documentElement.setAttribute('data-alea-lens-pause', 'off');\n startGlassLens(extra).refresh();\n }, [level, extra, pause]);\n}\n\nexport function ThemeProvider({ children, defaultTheme = 'dark', theme: controlled, onThemeChange, storageKey = 'alea-theme', scope = 'document', className, brand, density, navigate, useHref, locale, motion, preset = 'default', surface = 'solid', contrast = 'system', background = 'decorated', strings, glass }: ThemeProviderProps) {\n useGlassLens(refractionLevel(glass?.refraction), glass?.lensSelector, glass?.pauseOnScroll !== false);\n // The stored choice and the OS preference are read through useSyncExternalStore: in a client-only app the first\n // render already has them (no flash); when the markup comes from a server, hydration uses the server values and\n // React re-renders with the real ones afterwards, without a hydration warning.\n const [picked, setPicked] = useState<ThemeName | null>(null);\n const remembered = useSyncExternalStore(noSubscribe, () => stored(storageKey), () => null);\n const theme = controlled ?? picked ?? remembered ?? defaultTheme;\n const system = useSyncExternalStore(subscribeSystem, systemTheme, () => 'dark' as const);\n const resolvedTheme = theme === 'system' ? system : theme;\n useEffect(() => {\n if (scope !== 'document' || typeof document === 'undefined') return;\n document.documentElement.setAttribute('data-theme', resolvedTheme);\n document.documentElement.classList.add('alea-root');\n }, [resolvedTheme, scope]);\n // --alea-scrollbar: the width the vertical scrollbar takes (0 with overlay scrollbars), so a full-bleed section\n // (margin-inline: calc(50% - 50vw + var(--alea-scrollbar) / 2)) ends at the window's edge instead of scrolling sideways\n useEffect(() => {\n if (scope !== 'document' || typeof window === 'undefined') return;\n const root = document.documentElement;\n const measure = () => root.style.setProperty('--alea-scrollbar', `${Math.max(0, window.innerWidth - root.clientWidth)}px`);\n measure();\n window.addEventListener('resize', measure);\n return () => { window.removeEventListener('resize', measure); root.style.removeProperty('--alea-scrollbar'); };\n }, [scope]);\n const motionKey = JSON.stringify(motion || {});\n const brandVars = useMemo(() => ({ ...brandVariables(brand, preset), ...motionVariables(motion) }), [brand, motionKey, preset]); // eslint-disable-line react-hooks/exhaustive-deps\n const compact = (density ?? (brand?.density === 'compact' ? 'compact' : 'comfy')) === 'compact';\n const motionAttrs = useMemo(() => ({ ...motionAttributes(motion), ...(compact ? { 'data-density': 'compact' } : {}), ...(preset !== 'default' ? { 'data-preset': preset } : {}), ...(surface !== 'solid' ? { 'data-surface': surface } : {}), ...(contrast !== 'system' ? { 'data-contrast': contrast } : {}), ...(background === 'plain' ? { 'data-background': 'plain' } : {}) }) as Record<string, string>, [motionKey, preset, surface, contrast, background, compact]); // eslint-disable-line react-hooks/exhaustive-deps\n const scopeId = useId().replace(/[^a-zA-Z0-9_-]/g, '');\n const motionCss = useMemo(() => motionComponentCss(motion?.components, scope === 'document' ? ':root' : `[data-alea-scope=\"${scopeId}\"]`), [motionKey, scope, scopeId]); // eslint-disable-line react-hooks/exhaustive-deps\n useEffect(() => {\n if (scope !== 'document' || typeof document === 'undefined') return;\n const root = document.documentElement;\n Object.entries(motionAttrs).forEach(([k, val]) => root.setAttribute(k, val));\n return () => { Object.keys(motionAttrs).forEach(k => root.removeAttribute(k)); };\n }, [motionAttrs, scope]);\n useEffect(() => {\n if (scope !== 'document' || typeof document === 'undefined') return;\n const root = document.documentElement;\n Object.entries(brandVars).forEach(([k, val]) => root.style.setProperty(k, val));\n return () => { Object.keys(brandVars).forEach(k => root.style.removeProperty(k)); };\n }, [brandVars, scope]);\n const setTheme = useCallback((t: ThemeName) => {\n if (controlled === undefined) setPicked(t);\n onThemeChange?.(t);\n if (storageKey) { try { window.localStorage.setItem(storageKey, t); } catch { /* private mode */ } }\n }, [controlled, onThemeChange, storageKey]);\n const value = useMemo(() => ({ theme, resolvedTheme, setTheme }), [theme, resolvedTheme, setTheme]);\n const styleTag = motionCss ? <style>{motionCss}</style> : null;\n const inner = scope === 'element'\n ? <div className={cx('alea-root', className)} data-theme={resolvedTheme} data-alea-scope={motionCss ? scopeId : undefined} {...motionAttrs} style={brandVars as CSSProperties}>{styleTag}{children}</div>\n : <>{styleTag}{children}</>;\n return (\n <ThemeContext.Provider value={value}>\n {(() => {\n const texts = strings ? <StringsContext.Provider value={strings}>{inner}</StringsContext.Provider> : inner;\n const routed = navigate ? <RouterProvider navigate={navigate} useHref={useHref ? keepAbsolute(useHref) : undefined}>{texts}</RouterProvider> : texts;\n return locale ? <I18nProvider locale={locale}>{routed}</I18nProvider> : routed;\n })()}\n </ThemeContext.Provider>\n );\n}\n\n/** The current theme and a setter. Works without a provider (reads the document). */\nexport function useTheme(): ThemeContextValue {\n const ctx = useContext(ThemeContext);\n if (ctx) return ctx;\n const t = typeof document !== 'undefined' && document.documentElement.getAttribute('data-theme') === 'light' ? 'light' : 'dark';\n return { theme: t, resolvedTheme: t, setTheme: (n) => { if (typeof document !== 'undefined') document.documentElement.setAttribute('data-theme', n === 'system' ? systemTheme() : n); } };\n}\n"},{"path":"components/theme/lens.ts","content":"// Liquid glass lens for the glass look (Chromium: backdrop-filter accepts url()).\n// Every glass surface gets an SVG lens made for its own size: what is behind it wobbles through soft noise inside,\n// and bends in a band of fixed width along its rounded edge, like light through the rim of a glass. Small and wide\n// surfaces bend the same way. The lens goes in as CSS variables (--alea-lens, --alea-lens-blur), so the stylesheet\n// decides where it applies and reduced transparency or high contrast still win. Other browsers keep the frost.\n// Scroll containers and very large surfaces are skipped: refracting a scrolling area stalls the browser.\n\n/** The surfaces that get the lens in the glass look (any element can opt in with data-alea-lens). */\nexport const LENS_SURFACES = '.alea-popover, .alea-modal, .alea-toast, .alea-command, .alea-hovercard, .alea-menu, .alea-button[data-variant=\"secondary\"], .alea-button[data-variant=\"primary\"], .alea-input-wrap, .alea-select-trigger, .alea-segmented, .alea-tag, .alea-switch-track, [data-alea-lens]';\n/** How much the edge bends: a word or a multiplier (1 = medium). */\nexport type GlassRefraction = 'off' | 'subtle' | 'medium' | 'strong' | number;\nconst LEVEL: Record<string, number> = { off: 0, subtle: 0.5, medium: 1, strong: 1.8 };\nexport function refractionLevel(r: GlassRefraction | undefined): number {\n if (r == null) return 1;\n return typeof r === 'number' ? Math.max(0, r) : (LEVEL[r] ?? 1);\n}\nconst GLASS = '[data-preset=\"glass\"], [data-surface=\"glass\"]';\nconst NS = 'http://www.w3.org/2000/svg';\n// large surfaces keep the frost only: a big lens costs a frame while scrolling (a card or a code block is far over this)\nconst MAX_AREA = 400 * 300;\n/** How long after the last scroll event the lens comes back (ms). */\nexport const LENS_IDLE_MS = 150;\n// the inside wobble: noise frequency per pixel and the largest push in pixels (at medium)\nconst INNER_FREQ = 0.008, INNER_PUSH = 44;\n\n// The lens maps are SVG gradients (Chromium ignores canvas PNG maps inside a backdrop filter): red pushes\n// sideways inside a band of fixed width at the left and right edges, green up and down at the top and bottom.\nconst svgUrl = (svg: string) => 'data:image/svg+xml,' + encodeURIComponent(svg);\nfunction edgeMap(axis: 'x' | 'y', band: number): string {\n const b = Math.max(0.02, Math.min(0.45, band)).toFixed(4), e = (1 - Number(b)).toFixed(4);\n const [c1, c0] = axis === 'x' ? ['#ff0000', '#000000'] : ['#00ff00', '#000000'];\n const mid = axis === 'x' ? '#800000' : '#008000';\n const dir = axis === 'x' ? \"x2='1' y2='0'\" : \"x2='0' y2='1'\";\n return svgUrl(`<svg xmlns='http://www.w3.org/2000/svg' width='256' height='256' preserveAspectRatio='none'><linearGradient id='g' ${dir}><stop offset='0' stop-color='${c1}'/><stop offset='${b}' stop-color='${mid}'/><stop offset='${e}' stop-color='${mid}'/><stop offset='1' stop-color='${c0}'/></linearGradient><rect width='256' height='256' fill='url(%23g)'/></svg>`);\n}\n\n// The inside map: soft fractal noise drawn in the surface's own pixels (the noise ignores bounding-box units\n// in the filter itself, so it comes in as an image), red and green around the middle.\nfunction noiseMap(w: number, h: number): string {\n return svgUrl(`<svg xmlns='http://www.w3.org/2000/svg' width='${w}' height='${h}'><filter id='n' x='0' y='0' width='1' height='1' color-interpolation-filters='sRGB'><feTurbulence type='fractalNoise' baseFrequency='${INNER_FREQ}' numOctaves='1' seed='5'/><feGaussianBlur stdDeviation='6'/><feColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1'/></filter><rect width='${w}' height='${h}' filter='url(#n)'/></svg>`);\n}\n\nexport function supportsLens(): boolean {\n if (typeof navigator === 'undefined') return false;\n const brands = (navigator as Navigator & { userAgentData?: { brands?: Array<{ brand: string }> } }).userAgentData?.brands || [];\n return brands.some(b => /Chromium/.test(b.brand));\n}\n\n/** Pauses the lens while the page scrolls: one attribute on <html> (data-alea-scrolling), set on the first scroll event\n * of a burst and removed after LENS_IDLE_MS of quiet. The stylesheet turns the lens off under it (the frost stays),\n * so a scroll never pays for the SVG filters. Scroll events do not bubble, so one capturing listener hears every\n * scroll container. Opt out with data-alea-lens-pause=\"off\" on <html> (ThemeProvider glass.pauseOnScroll={false}). */\nexport function watchScrolling(root: HTMLElement = document.documentElement, idle = LENS_IDLE_MS): () => void {\n let on = false, timer = 0, frame = 0;\n const done = () => { timer = 0; if (on) { on = false; root.removeAttribute('data-alea-scrolling'); } };\n const arm = () => { frame = 0; if (timer) clearTimeout(timer); timer = window.setTimeout(done, idle); };\n const onScroll = () => {\n if (root.getAttribute('data-alea-lens-pause') === 'off') return;\n if (!on) { on = true; root.setAttribute('data-alea-scrolling', ''); }\n if (!frame) frame = requestAnimationFrame(arm);\n };\n window.addEventListener('scroll', onScroll, { capture: true, passive: true });\n return () => {\n window.removeEventListener('scroll', onScroll, { capture: true });\n if (frame) cancelAnimationFrame(frame);\n if (timer) clearTimeout(timer);\n on = false; root.removeAttribute('data-alea-scrolling');\n };\n}\n\nlet running: { stop: () => void; refresh: () => void } | null = null;\n\n/** Starts the shared lens manager (once per page). The strength comes from data-alea-refraction on <html>. */\nexport function startGlassLens(extra = ''): { stop: () => void; refresh: () => void } {\n if (running) return running;\n if (typeof document === 'undefined' || !supportsLens()) return { stop: () => {}, refresh: () => {} };\n const selector = extra ? `${LENS_SURFACES}, ${extra}` : LENS_SURFACES;\n const defs = document.createElementNS(NS, 'svg');\n defs.setAttribute('aria-hidden', 'true'); defs.setAttribute('width', '0'); defs.setAttribute('height', '0');\n defs.setAttribute('style', 'position:absolute;width:0;height:0;overflow:hidden;pointer-events:none');\n document.body.appendChild(defs);\n const made = new Set<string>();\n const tracked = new Set<HTMLElement>();\n const level = () => { const v = document.documentElement.getAttribute('data-alea-refraction'); return v == null ? 1 : Number(v) || 0; };\n const filterFor = (w: number, h: number, r: number, lv: number) => {\n // sizes rounded to 4 px so similar surfaces share one lens\n const W = Math.max(8, Math.round(w / 4) * 4), H = Math.max(8, Math.round(h / 4) * 4), R = Math.round(Math.min(r, W / 2, H / 2));\n const edge = Math.round(Math.min(36, Math.min(W, H) * 0.45));\n const scale = Math.round(Math.min(120, Math.max(20, edge * 3)) * lv);\n const id = `alea-lens-${W}x${H}r${R}s${scale}`;\n if (!made.has(id)) {\n // in bounding-box units: the band and the push are fractions of the surface, computed from pixels\n const f = document.createElementNS(NS, 'filter');\n f.setAttribute('id', id); f.setAttribute('x', '0'); f.setAttribute('y', '0'); f.setAttribute('width', '1'); f.setAttribute('height', '1');\n f.setAttribute('primitiveUnits', 'objectBoundingBox'); f.setAttribute('color-interpolation-filters', 'sRGB');\n // the edge maps plus the noise (centred on the middle), weighted so the inside pushes about INNER_PUSH px\n const k = Math.min(3, (INNER_PUSH * lv) / Math.max(1, scale)).toFixed(3), k4 = (-Number(k) / 2).toFixed(3);\n f.innerHTML = `<feImage href=\"${edgeMap('x', edge / W)}\" x=\"0\" y=\"0\" width=\"1\" height=\"1\" preserveAspectRatio=\"none\" result=\"rx\"/><feImage href=\"${edgeMap('y', edge / H)}\" x=\"0\" y=\"0\" width=\"1\" height=\"1\" preserveAspectRatio=\"none\" result=\"gy\"/><feComposite in=\"rx\" in2=\"gy\" operator=\"arithmetic\" k1=\"0\" k2=\"1\" k3=\"1\" k4=\"0\" result=\"edge\"/><feImage href=\"${noiseMap(W, H)}\" x=\"0\" y=\"0\" width=\"1\" height=\"1\" preserveAspectRatio=\"none\" result=\"noise\"/><feComposite in=\"edge\" in2=\"noise\" operator=\"arithmetic\" k1=\"0\" k2=\"1\" k3=\"${k}\" k4=\"${k4}\" result=\"map\"/><feDisplacementMap in=\"SourceGraphic\" in2=\"map\" scale=\"${(scale / Math.max(W, H)).toFixed(4)}\" xChannelSelector=\"R\" yChannelSelector=\"G\" result=\"bent\"/><feComposite in=\"bent\" in2=\"SourceGraphic\" operator=\"over\"/>`;\n // (near the rim the push can reach past the surface, where there is nothing to pull: the unbent backdrop fills in, not a dark band)\n defs.appendChild(f); made.add(id);\n }\n return id;\n };\n const clear = (el: HTMLElement) => { el.style.removeProperty('--alea-lens-def'); el.style.removeProperty('--alea-lens-blur-def'); el.removeAttribute('data-alea-lensed'); };\n const apply = (el: HTMLElement) => {\n const lv = level();\n const w = el.offsetWidth, h = el.offsetHeight;\n if (!lv || w < 16 || h < 16 || w * h > MAX_AREA || !el.closest(GLASS)) { clear(el); return; }\n // a panel inside another lensed panel stays plain: bending what is already bent smears it (small controls keep theirs)\n if ((w > 240 || h > 120) && el.parentElement?.closest(selector)) { clear(el); return; }\n const cs = getComputedStyle(el);\n // a surface that scrolls its own content: no lens (refracting it stalls the browser)\n if (/(auto|scroll)/.test(cs.overflowY + cs.overflowX) && (el.scrollHeight > el.clientHeight + 1 || el.scrollWidth > el.clientWidth + 1)) { clear(el); return; }\n // the stylesheet turns --alea-lens-def into --alea-lens (and drops it while the page scrolls)\n el.style.setProperty('--alea-lens-def', `url(#${filterFor(w, h, parseFloat(cs.borderTopLeftRadius) || 0, lv)})`);\n el.setAttribute('data-alea-lensed', '');\n el.style.setProperty('--alea-lens-blur-def', '4px');\n };\n const ro = new ResizeObserver(entries => { for (const e of entries) apply(e.target as HTMLElement); });\n let queued = 0;\n const scan = () => {\n queued = 0;\n if (!document.querySelector(GLASS) || !level()) { tracked.forEach(el => { clear(el); ro.unobserve(el); }); tracked.clear(); return; }\n document.querySelectorAll<HTMLElement>(selector).forEach(el => { if (!tracked.has(el)) { tracked.add(el); ro.observe(el); apply(el); } });\n tracked.forEach(el => { if (!el.isConnected) { tracked.delete(el); ro.unobserve(el); } });\n };\n const later = () => { if (!queued) queued = requestAnimationFrame(scan); };\n const mo = new MutationObserver(later);\n mo.observe(document.documentElement, { childList: true, subtree: true, attributes: true, attributeFilter: ['data-preset', 'data-surface', 'data-alea-refraction'] });\n scan();\n const unwatch = watchScrolling();\n const refresh = () => { tracked.forEach(apply); later(); };\n running = { stop: () => { unwatch(); mo.disconnect(); ro.disconnect(); if (queued) cancelAnimationFrame(queued); tracked.forEach(clear); defs.remove(); running = null; }, refresh };\n return running;\n}\n"}],"deps":[],"npm":["react-aria-components","@alea-design/motion"],"exports":["GLASS_RADII","brandVariables","keepAbsolute","useTheme","COMPACT_SPACE","themeScript","ThemeScript","ThemeProvider","LENS_SURFACES","LENS_IDLE_MS","startGlassLens","refractionLevel","supportsLens","watchScrolling"],"descriptions":{"GLASS_RADII":"Glass is the one look with its own ladder: twice Graphite from xs to 4xl; the hairlines 3xs and 2xs stay.","brandVariables":"The CSS variables a brand sets. Use it to theme a server-rendered page or a wrapper by hand.","keepAbsolute":"A router's useHref that leaves absolute URLs, protocol-relative URLs and #anchors alone (routers would turn https://… into /current/https:/…).","useTheme":"The current theme and a setter. Works without a provider (reads the document).","LENS_SURFACES":"The surfaces that get the lens in the glass look (any element can opt in with data-alea-lens).","LENS_IDLE_MS":"How long after the last scroll event the lens comes back (ms).","startGlassLens":"Starts the shared lens manager (once per page). The strength comes from data-alea-refraction on <html>."}},"tree":{"files":[{"path":"components/tree/Tree.tsx","content":"import { createContext, useContext, useEffect, useMemo, useRef, useState, type CSSProperties, type KeyboardEvent, type ReactNode } from 'react';\nimport {\n Tree as RACTree, TreeItem as RACTreeItem, TreeItemContent, TreeLoadMoreItem, TreeSection as RACTreeSection, TreeHeader as RACTreeHeader,\n Collection, Button as RACButton, Checkbox as RACCheckbox, Virtualizer, ListLayout, useDragAndDrop,\n type TreeProps as RACTreeProps, type TreeItemProps as RACTreeItemProps, type Key, type Selection,\n} from 'react-aria-components';\nimport { Check, ChevronRight, File, Folder, FolderOpen, GripVertical, Minus } from 'lucide-react';\nimport { withBase, cx } from '../../utils/cx';\nimport { useStrings } from '../../i18n/strings';\nimport { Highlight } from '../combobox/Autocomplete';\nimport { Spinner } from '../feedback/Spinner';\nimport { Skeleton } from '../feedback/Feedback';\nimport { useBusy } from '../field/FieldLoading';\n\n/** One node of a data tree (the data prop). */\nexport interface TreeNode {\n id: Key;\n /** The label. Plain text, so filtering, typeahead and renaming work; use renderTitle for rich content. */\n title: string;\n /** An icon before the title. With directory, folders and files get one automatically. */\n icon?: ReactNode;\n /** A second, muted line under the title. */\n description?: ReactNode;\n /** Meta or actions on the right: a count, a badge, an IconButton. */\n end?: ReactNode;\n /** The children. Leave it out (and isLeaf off) to load them with loadChildren when the node opens. */\n children?: TreeNode[];\n /** No children and no chevron, even with loadChildren. */\n isLeaf?: boolean;\n /** Not selectable, checkable or actionable; still visible. */\n isDisabled?: boolean;\n /** Turns the row into a link. */\n href?: string;\n /** Its children are loading (you load them yourself, or refresh them): a spinner takes the chevron's place and a Loading row shows under the node. Lazy loading with loadChildren sets it for you. */\n isLoading?: boolean;\n}\n\nexport type TreeSize = 'sm' | 'md' | 'lg';\n\ninterface Ctx {\n size: TreeSize; directory: boolean; draggable: boolean; canRename: boolean; query: string;\n indeterminate: Set<Key>; loading: Set<Key>;\n renaming: Key | null; setRenaming: (k: Key | null) => void; rename: (k: Key, title: string) => void;\n}\nconst TreeCtx = createContext<Ctx>({ size: 'md', directory: false, draggable: false, canRename: false, query: '', indeterminate: new Set(), loading: new Set(), renaming: null, setRenaming: () => {}, rename: () => {} });\n\nexport interface TreeProps<T extends object> extends Omit<RACTreeProps<T>, 'children'> {\n /** Items as JSX (TreeItem) or a render function for items. Or pass data instead. */\n children?: RACTreeProps<T>['children'];\n /** The tree as data: unlocks defaultExpandAll, checkable cascading, loadChildren, filterText, draggable and renaming. */\n data?: TreeNode[];\n /** Called with the new data after a drag, a rename or a lazy load, so you can keep it. */\n onDataChange?: (data: TreeNode[]) => void;\n /** Row height: sm 28 px, md 36 px (default), lg 44 px. Touch screens get at least 44 px. */\n size?: TreeSize;\n /** How the selected row looks: subtle (tinted, default) or solid (accent). */\n variant?: 'subtle' | 'solid';\n /** Guide lines that show each level. */\n showLines?: boolean;\n /** Indent per level in px. Default 16, 20 or 24 by size. */\n indent?: number;\n /** A file browser: folders and files get icons, and pressing a folder opens it. */\n directory?: boolean;\n /** Pressing a row opens or closes it. Default: on when there is no selection, or with directory. */\n expandOnClick?: boolean;\n /** Opens every node at first (data mode). */\n defaultExpandAll?: boolean;\n /** Checkboxes that cascade: checking a parent checks its children, and a parent with some checked children shows a dash (data mode). */\n checkable?: boolean;\n /** Parents and children are checked on their own, no cascading. */\n checkStrictly?: boolean;\n /** The checked keys (controlled). */\n checkedKeys?: Iterable<Key>;\n /** The checked keys at first. */\n defaultCheckedKeys?: Iterable<Key>;\n /** Called with every checked key, and the half checked parents. */\n onCheckedChange?: (keys: Key[], info: { halfChecked: Key[] }) => void;\n /** Loads the children of a node the first time it opens (lazy loading). A loading row shows while it waits. */\n loadChildren?: (node: TreeNode) => Promise<TreeNode[]>;\n /** The whole tree is loading. With no nodes yet it shows skeleton rows with a shimmer; with nodes it shows a Loading row at the end. The tree is marked busy for screen readers and rows stay usable. */\n isLoading?: boolean;\n /** With isLoading and no nodes, how many skeleton rows to show. Default 4. */\n loadingRows?: number;\n /** Shows only the nodes that match (and their parents), opens them and marks the match. */\n filterText?: string;\n /** Rows can be dragged to reorder, or dropped on a folder to move inside it; keyboard users use the handle (data mode). */\n draggable?: boolean;\n /** F2 or a double click renames a row; Enter saves, Escape cancels (data mode). */\n onRename?: (id: Key, title: string) => void;\n /** Custom content for a node's title. */\n renderTitle?: (node: TreeNode, state: { isExpanded: boolean; level: number }) => ReactNode;\n /** Renders only the rows on screen: pass the row height. Needs maxHeight. */\n virtualized?: number;\n /** Scrolls inside this height. */\n maxHeight?: number | string;\n}\n\nconst walk = (nodes: TreeNode[], fn: (n: TreeNode, parent: TreeNode | null) => void, parent: TreeNode | null = null) => { for (const n of nodes) { fn(n, parent); if (n.children) walk(n.children, fn, n); } };\nconst update = (nodes: TreeNode[], id: Key, fn: (n: TreeNode) => TreeNode): TreeNode[] => nodes.map(n => n.id === id ? fn(n) : n.children ? { ...n, children: update(n.children, id, fn) } : n);\n\n/** Every key in the data: handy for an \"Expand all\" button. */\nexport function getTreeKeys(nodes: TreeNode[], onlyParents = true): Key[] {\n const out: Key[] = [];\n walk(nodes, n => { if (!onlyParents || n.children?.length) out.push(n.id); });\n return out;\n}\n\n/** Removes keys from the tree and inserts them before, after or inside the target. */\nfunction moveNodes(nodes: TreeNode[], keys: Key[], target: Key, position: 'before' | 'after' | 'on'): TreeNode[] {\n const moving: TreeNode[] = [];\n const inside = new Set<Key>();\n walk(nodes, n => { if (keys.includes(n.id)) walk([n], d => inside.add(d.id)); });\n if (inside.has(target)) return nodes; // a node cannot go inside itself\n const strip = (list: TreeNode[]): TreeNode[] => list.flatMap(n => keys.includes(n.id) ? (moving.push(n), []) : [n.children ? { ...n, children: strip(n.children) } : n]);\n const rest = strip(nodes);\n const ordered = keys.map(k => moving.find(m => m.id === k)!).filter(Boolean);\n const place = (list: TreeNode[]): TreeNode[] => list.flatMap(n => {\n if (n.id === target) {\n if (position === 'on') return [{ ...n, children: [...ordered, ...(n.children || [])] }];\n return position === 'before' ? [...ordered, n] : [n, ...ordered];\n }\n return [n.children ? { ...n, children: place(n.children) } : n];\n });\n return place(rest);\n}\n\nfunction filterNodes(nodes: TreeNode[], q: string): TreeNode[] {\n const needle = q.toLowerCase();\n return nodes.flatMap(n => {\n const kids = n.children ? filterNodes(n.children, q) : undefined;\n if (n.title.toLowerCase().includes(needle)) return [n];\n return kids?.length ? [{ ...n, children: kids }] : [];\n });\n}\n\n/** Nested items that open and close: files, categories, outlines, org charts. Arrow Right opens, Arrow Left closes.\n * Pass TreeItems as children, or the whole tree as data to get cascading checkboxes, lazy loading, filtering, drag and drop and renaming. */\nexport function Tree<T extends object>({\n data, onDataChange, size = 'md', variant = 'subtle', showLines, indent, directory = false, expandOnClick, defaultExpandAll,\n checkable, checkStrictly, checkedKeys, defaultCheckedKeys, onCheckedChange, loadChildren, isLoading, loadingRows = 4, filterText = '', draggable = false, onRename, renderTitle,\n virtualized, maxHeight, expandedKeys, defaultExpandedKeys, onExpandedChange, className, style, children, renderEmptyState, onAction, selectionMode, ...props\n}: TreeProps<T>) {\n const t = useStrings();\n const [nodes, setNodes] = useState<TreeNode[]>(data || []);\n useEffect(() => { if (data) setNodes(data); }, [data]);\n const commit = (next: TreeNode[]) => { setNodes(next); onDataChange?.(next); };\n\n // index of the data: parents and nodes by key\n const { byId, parentOf } = useMemo(() => {\n const byId = new Map<Key, TreeNode>(), parentOf = new Map<Key, Key | null>();\n walk(nodes, (n, p) => { byId.set(n.id, n); parentOf.set(n.id, p ? p.id : null); });\n return { byId, parentOf };\n }, [nodes]);\n\n // expansion: controlled or our own\n const [ownExpanded, setOwnExpanded] = useState<Set<Key>>(() => new Set(defaultExpandedKeys ?? (defaultExpandAll && data ? getTreeKeys(data) : [])));\n const expanded = expandedKeys ? new Set(expandedKeys) : ownExpanded;\n const setExpanded = (next: Set<Key>) => { if (!expandedKeys) setOwnExpanded(next); onExpandedChange?.(next); };\n\n // filtering: matching nodes, with their parents opened\n const q = filterText.trim();\n const shown = useMemo(() => (q ? filterNodes(nodes, q) : nodes), [nodes, q]);\n const shownExpanded = useMemo(() => {\n if (!q) return expanded;\n const out = new Set(expanded);\n walk(shown, n => { if (n.children?.length) out.add(n.id); });\n return out;\n }, [q, shown, expanded]); // eslint-disable-line react-hooks/exhaustive-deps\n\n // lazy loading: the first time a node without children opens\n const [loading, setLoading] = useState<Set<Key>>(new Set());\n const asked = useRef(new Set<Key>());\n useEffect(() => {\n if (!loadChildren) return;\n for (const k of expanded) {\n const n = byId.get(k);\n if (!n || n.isLeaf || n.children || asked.current.has(k)) continue;\n asked.current.add(k);\n setLoading(s => new Set(s).add(k));\n loadChildren(n).then(kids => {\n setNodes(prev => { const next = update(prev, k, x => ({ ...x, children: kids })); onDataChange?.(next); return next; });\n }).finally(() => setLoading(s => { const c = new Set(s); c.delete(k); return c; }));\n }\n }, [expanded, byId]); // eslint-disable-line react-hooks/exhaustive-deps\n\n // nodes whose children are loading: lazy loading, plus the nodes marked isLoading\n const busy = useMemo(() => {\n const out = new Set(loading);\n walk(nodes, n => { if (n.isLoading) out.add(n.id); });\n return out;\n }, [loading, nodes]);\n\n const busyRef = useBusy<HTMLDivElement>(!!isLoading || busy.size > 0);\n\n // cascading checkboxes, on top of React Aria's selection\n const [ownChecked, setOwnChecked] = useState<Set<Key>>(() => new Set(defaultCheckedKeys));\n const checked = checkedKeys ? new Set(checkedKeys) : ownChecked;\n const indeterminate = useMemo(() => {\n const out = new Set<Key>();\n if (!checkable || checkStrictly) return out;\n const any = (n: TreeNode): boolean => !!n.children?.some(c => checked.has(c.id) || any(c));\n walk(nodes, n => { if (!checked.has(n.id) && any(n)) out.add(n.id); });\n return out;\n }, [checkable, checkStrictly, nodes, checked]); // eslint-disable-line react-hooks/exhaustive-deps\n const setChecked = (sel: Selection) => {\n const all = new Set<Key>(); walk(nodes, n => { if (!n.isDisabled) all.add(n.id); });\n let next = sel === 'all' ? all : new Set(sel);\n if (!checkStrictly && sel !== 'all') {\n const added = [...next].filter(k => !checked.has(k)), removed = [...checked].filter(k => !next.has(k));\n const down = (k: Key, on: boolean) => { const n = byId.get(k); if (!n) return; walk([n], d => { if (d.isDisabled) return; if (on) next.add(d.id); else next.delete(d.id); }); };\n added.forEach(k => down(k, true)); removed.forEach(k => down(k, false));\n // a parent is checked when all its children are\n const fix = (list: TreeNode[]) => { for (const n of list) { if (!n.children?.length) continue; fix(n.children); const kids = n.children.filter(c => !c.isDisabled); if (kids.length && kids.every(c => next.has(c.id))) next.add(n.id); else next.delete(n.id); } };\n fix(nodes);\n next = new Set(next);\n }\n if (!checkedKeys) setOwnChecked(next);\n const half: Key[] = []; if (!checkStrictly) { const any = (n: TreeNode): boolean => !!n.children?.some(c => next.has(c.id) || any(c)); walk(nodes, n => { if (!next.has(n.id) && any(n)) half.push(n.id); }); }\n onCheckedChange?.([...next], { halfChecked: half });\n };\n\n // renaming\n const [renaming, setRenaming] = useState<Key | null>(null);\n const rename = (k: Key, title: string) => { setRenaming(null); const v = title.trim(); if (!v || byId.get(k)?.title === v) return; commit(update(nodes, k, n => ({ ...n, title: v }))); onRename?.(k, v); };\n\n // drag and drop\n const { dragAndDropHooks } = useDragAndDrop({\n getItems: keys => [...keys].map(k => ({ 'text/plain': byId.get(k)?.title ?? String(k) })),\n onMove: e => { if (e.target.type !== 'item') return; commit(moveNodes(nodes, [...e.keys], e.target.key, e.target.dropPosition)); },\n getDropOperation: target => (target.type === 'item' && target.dropPosition === 'on' && byId.get(target.key)?.isLeaf ? 'cancel' : 'move'),\n });\n\n const clickToggles = expandOnClick ?? (directory || !selectionMode || selectionMode === 'none');\n const mode = checkable ? 'multiple' : selectionMode;\n const isData = !!data;\n\n const renderNode = (n: TreeNode): ReactNode => {\n const lazy = !!loadChildren && !n.isLeaf && n.children === undefined;\n return (\n <TreeItem key={n.id} id={n.id} title={n.title} textValue={n.title} icon={n.icon} description={n.description} end={n.end} href={n.href} isDisabled={n.isDisabled}\n hasChildItems={lazy || undefined} isFolder={!n.isLeaf && (n.children !== undefined || lazy)} renderTitle={renderTitle ? s => renderTitle(n, s) : undefined} isLoading={busy.has(n.id)}>\n {n.children && <Collection items={n.children}>{renderNode}</Collection>}\n </TreeItem>\n );\n };\n\n const onKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {\n if (e.key !== 'F2' || !isData || (!onRename && !onDataChange) || renaming !== null) return;\n const key = (document.activeElement as HTMLElement | null)?.closest('[data-key]')?.getAttribute('data-key');\n const node = key != null ? [...byId.values()].find(n => String(n.id) === key) : undefined;\n if (node && !node.isDisabled) { e.preventDefault(); setRenaming(node.id); }\n };\n\n const tree = (\n <RACTree\n {...props}\n selectionMode={mode}\n selectionBehavior={checkable ? 'toggle' : props.selectionBehavior ?? (selectionMode === 'single' ? 'replace' : 'toggle')}\n {...(checkable ? { selectedKeys: checked, onSelectionChange: setChecked } : {})}\n {...(isData ? { items: shown as unknown as Iterable<T> } : {})}\n expandedKeys={shownExpanded}\n onExpandedChange={k => setExpanded(new Set(k))}\n onAction={clickToggles || onAction ? key => { if (clickToggles) { const n = new Set(expanded); n.has(key) ? n.delete(key) : n.add(key); setExpanded(n); } onAction?.(key); } : undefined}\n dragAndDropHooks={draggable && isData ? dragAndDropHooks : undefined}\n renderEmptyState={isLoading ? () => <TreeSkeleton rows={loadingRows} /> : renderEmptyState ?? (() => <div className=\"alea-tree-empty\">{q ? t.nothingFor(q) : t.nothingHere}</div>)}\n ref={busyRef}\n className={withBase('alea-tree', className as any)}\n data-loading={isLoading || undefined}\n data-size={size} data-variant={variant !== 'subtle' ? variant : undefined} data-lines={showLines || undefined} data-checkable={checkable || undefined}\n style={{ ...(indent ? { ['--alea-tree-indent' as any]: `${indent}px` } : {}), ...(maxHeight || virtualized ? { maxHeight: maxHeight ?? 400, overflow: 'auto' } : {}), ...(style as CSSProperties) }}>\n {(isData ? (renderNode as any) : children) as any}\n </RACTree>\n );\n return (\n <TreeCtx.Provider value={{ size, directory, draggable: draggable && isData, canRename: isData && !!(onRename || onDataChange), query: q, indeterminate, loading: busy, renaming, setRenaming, rename }}>\n <div className=\"alea-tree-wrap\" onKeyDown={onKeyDown}>\n {virtualized ? <Virtualizer layout={ListLayout} layoutOptions={{ rowHeight: virtualized }}>{tree}</Virtualizer> : tree}\n {isLoading && shown.length > 0 && <div className=\"alea-tree-loading alea-tree-loading-end\"><span aria-hidden=\"true\" className=\"alea-tree-loading-spin\"><Spinner size=\"sm\" /></span><span>{t.loading}</span></div>}\n <span className=\"alea-visually-hidden\" role=\"status\">{isLoading ? t.loading : ''}</span>\n </div>\n </TreeCtx.Provider>\n );\n}\n\nconst SKELETON_WIDTHS = [64, 48, 56, 40, 72, 52];\n/** Rows that stand in for the nodes while the tree loads: an icon block and a bar, indented like a tree, with the shimmer. */\nfunction TreeSkeleton({ rows }: { rows: number }) {\n return (\n <div className=\"alea-tree-skeleton\" aria-hidden=\"true\">\n {Array.from({ length: rows }, (_, i) => (\n <div key={i} className=\"alea-tree-skeleton-row\" style={{ ['--alea-tree-level' as any]: i % 3 === 1 ? 2 : 1 }}>\n <Skeleton shape=\"circle\" width={16} />\n <Skeleton shape=\"text\" width={`${SKELETON_WIDTHS[i % SKELETON_WIDTHS.length]}%`} />\n </div>\n ))}\n </div>\n );\n}\n\nexport interface TreeItemProps extends Omit<RACTreeItemProps, 'children' | 'textValue'> {\n /** Text for typeahead and screen readers when title is not plain text. */\n textValue?: string;\n /** The item's label. */\n title: ReactNode;\n /** An icon before the title. */\n icon?: ReactNode;\n /** A second, muted line under the title. */\n description?: ReactNode;\n /** Meta or actions on the right (they stay reachable with the keyboard). */\n end?: ReactNode;\n /** Custom title content, with the row's state. */\n renderTitle?: (state: { isExpanded: boolean; level: number }) => ReactNode;\n /** In a directory tree, show a folder icon even with no children yet. */\n isFolder?: boolean;\n /** Its children are loading: a spinner takes the chevron's place and a Loading row shows under the item. The item is marked busy for screen readers. */\n isLoading?: boolean;\n /** Nested TreeItems. */\n children?: ReactNode;\n}\n\n/** An item in a Tree; nest TreeItems inside for children. */\nexport function TreeItem({ title, icon, description, end, renderTitle, isFolder, isLoading, children, className, textValue, ...props }: TreeItemProps) {\n const ctx = useContext(TreeCtx);\n const t = useStrings();\n const busy = useBusy<HTMLDivElement>(isLoading);\n const text =textValue ?? (typeof title === 'string' ? title : '');\n return (\n <RACTreeItem {...props} ref={busy} textValue={text} className={withBase('alea-tree-item', className as any)} data-loading={isLoading || undefined}>\n <TreeItemContent>\n {({ hasChildItems, isExpanded, selectionMode, selectionBehavior, level, id, allowsDragging }) => {\n const ic = icon ?? (ctx.directory ? (hasChildItems || isFolder ? (isExpanded ? <FolderOpen /> : <Folder />) : <File />) : null);\n const editing = ctx.renaming === id;\n return (\n <div className=\"alea-tree-row\" style={{ ['--alea-tree-level' as any]: level }} data-description={description ? true : undefined}>\n {allowsDragging && <RACButton slot=\"drag\" className=\"alea-tree-drag\" aria-label={t.moveItem(text)}><GripVertical size={14} aria-hidden=\"true\" /></RACButton>}\n {hasChildItems ? <RACButton slot=\"chevron\" className=\"alea-tree-chevron\">{ctx.loading.has(id) || isLoading ? <span aria-hidden=\"true\" className=\"alea-tree-spin\"><Spinner size=\"sm\" aria-label=\"\" /></span> : <ChevronRight size={16} aria-hidden=\"true\" />}</RACButton> : <span className=\"alea-tree-spacer\" />}\n {selectionMode !== 'none' && selectionBehavior === 'toggle' && (\n <RACCheckbox slot=\"selection\" isIndeterminate={ctx.indeterminate.has(id)} className=\"alea-check alea-table-check\">\n {({ isIndeterminate }) => <span className=\"alea-check-box\" aria-hidden=\"true\">{isIndeterminate ? <Minus size={14} strokeWidth={3} /> : <Check size={14} strokeWidth={3} />}</span>}\n </RACCheckbox>\n )}\n {ic && <span className=\"alea-tree-icon\" aria-hidden=\"true\">{ic}</span>}\n {editing ? (\n <input className=\"alea-tree-rename\" defaultValue={text} aria-label={text} autoFocus onFocus={e => e.currentTarget.select()}\n onKeyDown={e => { e.stopPropagation(); if (e.key === 'Enter') ctx.rename(id, e.currentTarget.value); if (e.key === 'Escape') ctx.setRenaming(null); }}\n onPointerDown={e => e.stopPropagation()} onClick={e => e.stopPropagation()} onBlur={e => ctx.rename(id, e.currentTarget.value)} />\n ) : (\n <span className=\"alea-tree-text\" onDoubleClick={ctx.canRename && !props.isDisabled ? () => ctx.setRenaming(id) : undefined}>\n <span className=\"alea-tree-title\">{renderTitle ? renderTitle({ isExpanded, level }) : ctx.query && typeof title === 'string' ? <Highlight text={title} query={ctx.query} /> : title}</span>\n {description && <span className=\"alea-tree-desc\">{description}</span>}\n </span>\n )}\n {end && <span className=\"alea-tree-end\">{end}</span>}\n </div>\n );\n }}\n </TreeItemContent>\n {children}\n {isLoading && <TreeLoadMoreItem isLoading className=\"alea-tree-loading\"><span aria-hidden=\"true\" className=\"alea-tree-loading-spin\"><Spinner size=\"sm\" /></span><span>{t.loading}</span></TreeLoadMoreItem>}\n </RACTreeItem>\n );\n}\n\nexport interface TreeSectionProps<T extends object> {\n children?: ReactNode | ((item: T) => ReactNode);\n /** The items in the section, for a dynamic collection. */\n items?: Iterable<T>;\n id?: Key;\n className?: string;\n 'aria-label'?: string;\n}\n/** A group of items with a header inside a Tree. */\nexport function TreeSection<T extends object>({ className, ...props }: TreeSectionProps<T>) {\n return <RACTreeSection {...(props as any)} className={cx('alea-tree-section', className)} />;\n}\n/** The heading of a TreeSection. */\nexport function TreeHeader({ className, ...props }: { children: ReactNode; className?: string }) {\n return <RACTreeHeader {...props} className={cx('alea-tree-header', className)} />;\n}\n"},{"path":"components/tree/tree.css","content":"/* Tree: sizes, guide lines, selection looks, checkboxes, lazy loading, drag and drop, renaming */\n.alea-tree-wrap { min-width: 0; }\n.alea-tree { --alea-tree-indent: var(--alea-space-5); --alea-tree-row: 36px; display: flex; flex-direction: column; gap: var(--alea-space-0-5); outline: none; font-size: var(--alea-font-size-md); }\n.alea-tree[data-size='sm'] { --alea-tree-indent: var(--alea-space-4); --alea-tree-row: 28px; font-size: var(--alea-font-size-sm); }\n.alea-tree[data-size='lg'] { --alea-tree-indent: var(--alea-space-6); --alea-tree-row: 44px; }\n.alea-tree[data-focus-visible] { box-shadow: inset 0 0 0 2px var(--alea-focus); border-radius: var(--alea-radius-sm); }\n.alea-tree-item { outline: none; border-radius: var(--alea-radius-xs); cursor: default; }\n.alea-tree-item[href], .alea-tree-item[data-href] { cursor: pointer; }\n.alea-tree-row { position: relative; display: flex; align-items: center; gap: var(--alea-space-2); min-height: var(--alea-tree-row); padding: 0 var(--alea-space-2) 0 calc((var(--alea-tree-level, 1) - 1) * var(--alea-tree-indent) + var(--alea-space-2)); border-radius: var(--alea-radius-xs); transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-out); }\n.alea-tree-row[data-description] { padding-block: var(--alea-space-1); }\n.alea-tree-item[data-hovered] > .alea-tree-row, .alea-tree-item[data-hovered] .alea-tree-row:first-child { background: var(--alea-surface-hover); }\n.alea-tree-item[data-pressed] .alea-tree-row { background: var(--alea-surface-active, var(--alea-surface-hover)); }\n.alea-tree-item[data-selected] .alea-tree-row { background: var(--alea-accent-subtle); }\n.alea-tree[data-variant='solid'] .alea-tree-item[data-selected] .alea-tree-row { background: var(--alea-accent-solid); color: var(--alea-accent-on); }\n.alea-tree[data-variant='solid'] .alea-tree-item[data-selected] :is(.alea-tree-icon, .alea-tree-chevron, .alea-tree-desc, .alea-tree-end) { color: inherit; }\n.alea-tree[data-checkable] .alea-tree-item[data-selected] .alea-tree-row { background: none; }\n.alea-tree[data-checkable] .alea-tree-item[data-hovered] .alea-tree-row { background: var(--alea-surface-hover); }\n.alea-tree-item[data-focus-visible] .alea-tree-row { box-shadow: inset 0 0 0 2px var(--alea-focus); }\n.alea-tree-item[data-disabled] .alea-tree-row { opacity: 0.5; }\n.alea-tree-chevron { flex: none; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--alea-radius-sm); background: none; color: var(--alea-icon-muted); cursor: pointer; }\n.alea-tree-chevron[data-hovered] { color: var(--alea-icon); background: var(--alea-surface-hover); }\n.alea-tree-item[data-expanded] .alea-tree-chevron { transform: rotate(90deg); }\n.alea-tree-item[data-expanded] .alea-tree-spin { transform: rotate(-90deg); display: inline-flex; }\n.alea-tree-spacer { width: 24px; flex: none; }\n.alea-tree-icon { flex: none; display: inline-flex; color: var(--alea-icon-muted); }\n.alea-tree-icon svg { width: 16px; height: 16px; }\n.alea-tree[data-size='lg'] .alea-tree-icon svg { width: 20px; height: 20px; }\n.alea-tree-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }\n.alea-tree-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.alea-tree-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n.alea-tree-end { flex: none; display: inline-flex; align-items: center; gap: var(--alea-space-1); margin-left: auto; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); font-variant-numeric: tabular-nums; }\n.alea-tree-row .alea-check { flex: none; }\n.alea-tree-empty { padding: var(--alea-space-4) var(--alea-space-2); color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n.alea-tree-loading { display: flex; align-items: center; gap: var(--alea-space-2); min-height: var(--alea-tree-row); padding-left: calc((var(--alea-tree-level, 2) - 1) * var(--alea-tree-indent) + var(--alea-space-10)); color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n\n/* guide lines: one per level, through the middle of each chevron */\n.alea-tree[data-lines] .alea-tree-row::before {\n content: ''; position: absolute; inset-block: 0; left: calc(var(--alea-space-2) + var(--alea-space-3)); width: calc((var(--alea-tree-level, 1) - 1) * var(--alea-tree-indent)); pointer-events: none;\n background: repeating-linear-gradient(to right, var(--alea-border-strong) 0 1px, transparent 1px var(--alea-tree-indent));\n}\n\n/* drag and drop */\n.alea-tree-drag { flex: none; display: grid; place-items: center; width: 20px; height: 24px; margin-left: calc(var(--alea-space-1) * -1); padding: 0; border: 0; border-radius: var(--alea-radius-xs); background: none; color: var(--alea-text-faint); cursor: grab; opacity: 0; transition: opacity var(--alea-motion-duration-fast) var(--alea-motion-ease-out); }\n.alea-tree-item:is([data-hovered], [data-focus-visible-within], [data-focus-visible]) .alea-tree-drag, .alea-tree-drag[data-focus-visible] { opacity: 1; }\n.alea-tree-drag[data-focus-visible] { box-shadow: 0 0 0 2px var(--alea-focus); }\n.alea-tree-item[data-dragging] { opacity: 0.5; }\n.alea-tree-item[data-drop-target] .alea-tree-row { background: var(--alea-accent-subtle); box-shadow: inset 0 0 0 2px var(--alea-accent); }\n.alea-tree .react-aria-DropIndicator[data-drop-target] { height: 2px; margin-block: calc(var(--alea-space-0-25) * -1); background: var(--alea-accent); border-radius: var(--alea-radius-2xs); }\n.alea-tree .react-aria-DropIndicator { outline: none; }\n\n/* renaming */\n.alea-tree-rename { flex: 1; min-width: 0; height: calc(var(--alea-tree-row) - 8px); padding: 0 var(--alea-space-2); border: 0; border-radius: var(--alea-radius-xs); background: var(--alea-surface-deep, var(--alea-surface)); color: var(--alea-text); font: inherit; box-shadow: inset 0 0 0 2px var(--alea-focus); outline: none; }\n\n/* sections */\n.alea-tree-section + .alea-tree-section { margin-top: var(--alea-space-2); }\n.alea-tree-header { padding: var(--alea-space-2) var(--alea-space-2) var(--alea-space-1); color: var(--alea-text-faint); font-size: var(--alea-font-size-xs); font-weight: var(--alea-font-weight-medium); letter-spacing: 0.06em; text-transform: uppercase; }\n\n/* rows that appear when a node opens drop in from above */\n.alea-tree-item { animation: alea-tree-in var(--alea-motion-duration-base) var(--alea-motion-ease-out) both; }\n@keyframes alea-tree-in { from { opacity: 0.01; transform: translateY(calc(var(--alea-motion-distance-sm, 8px) * -0.5)); } }\n\n/* touch screens: rows big enough for a finger */\n@media (pointer: coarse) { .alea-tree { --alea-tree-row: 44px; } .alea-tree-drag { opacity: 1; } }\n@media (prefers-reduced-motion: reduce) { .alea-tree-item { animation: none; } }\n\n/* loading: skeleton rows while the tree has no nodes yet, a Loading row at the end while it refreshes, a sweep on a node whose children load */\n.alea-tree-skeleton { display: flex; flex-direction: column; gap: var(--alea-space-0-5); }\n.alea-tree-skeleton-row { display: flex; align-items: center; gap: var(--alea-space-2); min-height: var(--alea-tree-row); padding: 0 var(--alea-space-2) 0 calc((var(--alea-tree-level, 1) - 1) * var(--alea-tree-indent) + var(--alea-space-2) + var(--alea-space-8)); }\n.alea-tree-skeleton-row .alea-skeleton[data-shape='text'] { flex: 1; max-width: 240px; margin: 0; }\n.alea-tree-skeleton-row .alea-skeleton[data-shape='circle'] { flex: none; }\n.alea-tree-loading-end { padding-left: calc(var(--alea-space-2) + var(--alea-space-8)); }\n.alea-tree-item[data-loading] > .alea-tree-row { background: linear-gradient(90deg, transparent, var(--alea-accent-subtle), transparent) no-repeat 0 0 / 40% 100%; animation: alea-tree-busy 1.6s var(--alea-motion-ease-in-out) infinite alternate; }\n@keyframes alea-tree-busy { from { background-position-x: 0; } to { background-position-x: 100%; } }\n@media (prefers-reduced-motion: reduce) { .alea-tree-item[data-loading] > .alea-tree-row { animation: none; background: none; } }\n"}],"deps":["combobox","feedback","field"],"npm":["react-aria-components","lucide-react"],"exports":["getTreeKeys","TreeItem","TreeSection","TreeHeader","Tree"],"descriptions":{"getTreeKeys":"Every key in the data: handy for an \"Expand all\" button.","TreeItem":"An item in a Tree; nest TreeItems inside for children.","TreeSection":"A group of items with a header inside a Tree.","TreeHeader":"The heading of a TreeSection."}},"typography":{"files":[{"path":"components/typography/Typography.tsx","content":"import { createElement, forwardRef, type ElementType, type HTMLAttributes, type ReactNode } from 'react';\nimport { Link as RACLink, type LinkProps as RACLinkProps } from 'react-aria-components';\nimport { useStrings } from '../../i18n/strings';\nimport { cx, withBase } from '../../utils/cx';\nimport { linkIcon } from '../icon/icon-contexts';\n\nexport type HeadingSize = 'display' | '4xl' | '3xl' | '2xl' | 'xl' | 'lg' | 'md';\n\nexport interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {\n /** The outline level (h1 to h6). Pick it for the page structure, not the size. */\n level?: 1 | 2 | 3 | 4 | 5 | 6;\n /** Visual size; defaults from the level. display is the hero size. */\n size?: HeadingSize;\n /** serif (Crimson Pro, light) for titles, sans (Inter, semibold) for UI headings. */\n family?: 'serif' | 'sans';\n /** Fills the text with the accent gradient. */\n gradient?: boolean;\n}\n\nconst LEVEL_SIZE: Record<number, HeadingSize> = { 1: '4xl', 2: '3xl', 3: '2xl', 4: 'xl', 5: 'lg', 6: 'md' };\n\n/** A heading with the Alea type: Crimson Pro light for titles, Inter for UI. */\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(function Heading({ level = 2, size, family = 'serif', gradient, className, ...props }, ref) {\n return createElement(`h${level}`, { ...props, ref, 'data-size': size || LEVEL_SIZE[level], 'data-family': family, className: cx('alea-heading', gradient && 'alea-gradient-text', className) });\n});\n\nexport interface TextProps extends HTMLAttributes<HTMLElement> {\n /** The element to render. Default p. */\n as?: ElementType;\n /** xs 12, sm 13, md 14, base 16 (default), lg 18, xl 20 px. */\n size?: 'xs' | 'sm' | 'md' | 'base' | 'lg' | 'xl';\n /** default, muted, faint, accent, success, warning or danger. */\n tone?: 'default' | 'muted' | 'faint' | 'accent' | 'success' | 'warning' | 'danger';\n /** regular, medium or semibold. */\n weight?: 'regular' | 'medium' | 'semibold';\n /** Cut to one line with an ellipsis. */\n truncate?: boolean;\n /** Text alignment: start (default), center or end. */\n align?: 'start' | 'center' | 'end';\n /** Cut to this many lines with an ellipsis. */\n lineClamp?: number;\n children?: ReactNode;\n}\n\n/** Body text with the token sizes and tones; cut to one line or several. */\nexport function Text({ as = 'p', size = 'base', tone = 'default', weight, truncate, lineClamp, align, className, style, ...props }: TextProps) {\n return createElement(as, { ...props, 'data-align': align, 'data-size': size, 'data-tone': tone, 'data-weight': weight, 'data-truncate': truncate || undefined, 'data-clamp': lineClamp || undefined, style: lineClamp ? { ['--alea-clamp' as string]: lineClamp, ...style } : style, className: cx('alea-text', className) });\n}\n\n/** The small uppercase label above a section title. */\nexport function Eyebrow({ className, ...props }: HTMLAttributes<HTMLParagraphElement>) {\n return <p {...props} className={cx('alea-eyebrow', className)} />;\n}\n\n/** Inline code. */\nexport function Code({ className, ...props }: HTMLAttributes<HTMLElement>) {\n return <code {...props} className={cx('alea-code', className)} />;\n}\n\nexport interface KbdProps extends HTMLAttributes<HTMLElement> { children: ReactNode }\n/** A key or shortcut, like ⌘K. */\nexport function Kbd({ className, ...props }: KbdProps) {\n return <kbd {...props} className={cx('alea-kbd', className)} />;\n}\n\nexport interface LinkProps extends RACLinkProps {\n /** inline: underlined accent text; standalone: no underline until hover; muted: text color. */\n variant?: 'inline' | 'standalone' | 'muted';\n /** Opens in a new tab with rel=noopener and an arrow. */\n external?: boolean;\n /** sm (13 px), md (14 px) or lg (16 px). Default: the size of the text around it. */\n size?: 'sm' | 'md' | 'lg';\n /** accent (default), neutral (text color, for dense lists) or danger (destructive links like \"Remove\"). */\n tone?: 'accent' | 'neutral' | 'danger';\n /** An icon before the text. */\n iconStart?: ReactNode;\n /** An icon after the text (with standalone links it nudges toward where the link goes). */\n iconEnd?: ReactNode;\n}\n\n/** A link, accessible and focus-visible: three looks, three sizes, three tones, icons, and external links that say they open a new tab. */\nexport function Link({ variant = 'inline', external, size, tone, iconStart, iconEnd, className, children, ...props }: LinkProps) {\n const t = useStrings();\n return (\n <RACLink {...props} target={external ? '_blank' : props.target} rel={external ? 'noopener noreferrer' : props.rel} data-variant={variant} data-size={size} data-tone={tone} className={withBase('alea-link alea-focus-ring', className as any)}>\n {(renderProps) => (\n <>\n {iconStart && <span className=\"alea-link-icon\" aria-hidden=\"true\" {...linkIcon(tone, variant)}>{iconStart}</span>}\n {typeof children === 'function' ? children(renderProps) : children}\n {iconEnd && <span className=\"alea-link-icon alea-link-icon-end\" aria-hidden=\"true\" {...linkIcon(tone, variant)}>{iconEnd}</span>}\n {external && <span className=\"alea-link-ext\" aria-hidden=\"true\">↗</span>}\n {external && <span className=\"alea-visually-hidden\"> {t.newTab}</span>}\n </>\n )}\n </RACLink>\n );\n}\n"},{"path":"components/typography/typography.css","content":".alea-heading { margin: 0; color: var(--alea-text); text-wrap: balance; }\n.alea-heading[data-family='serif'] { font-family: var(--alea-font-family-display); font-weight: var(--alea-font-weight-light); letter-spacing: var(--alea-font-tracking-display); line-height: var(--alea-font-leading-tight); }\n.alea-heading[data-family='sans'] { font-family: var(--alea-font-family-body); font-weight: var(--alea-font-weight-semibold); letter-spacing: var(--alea-font-tracking-tight); line-height: var(--alea-font-leading-snug); }\n.alea-heading[data-size='display'] { font-size: clamp(var(--alea-font-size-5xl), 7vw, var(--alea-font-size-7xl)); line-height: 1.02; }\n.alea-heading[data-size='4xl'] { font-size: clamp(var(--alea-font-size-4xl), 4.5vw, var(--alea-font-size-5xl)); }\n.alea-heading[data-size='3xl'] { font-size: clamp(var(--alea-font-size-2xl), 3vw, var(--alea-font-size-4xl)); }\n.alea-heading[data-size='2xl'] { font-size: clamp(22px, 2.2vw, var(--alea-font-size-3xl)); }\n.alea-heading[data-size='xl'] { font-size: var(--alea-font-size-xl); }\n.alea-heading[data-size='lg'] { font-size: var(--alea-font-size-lg); }\n.alea-heading[data-size='md'] { font-size: var(--alea-font-size-base); }\n.alea-heading[data-family='sans'][data-size='xl'], .alea-heading[data-family='sans'][data-size='lg'], .alea-heading[data-family='sans'][data-size='md'] { line-height: var(--alea-font-leading-snug); }\n\n.alea-gradient-text {\n background: var(--alea-gradient-text-linear);\n -webkit-background-clip: text;\n background-clip: text;\n color: transparent;\n}\n\n.alea-text { margin: 0; color: var(--alea-text); line-height: var(--alea-font-leading-normal); }\n.alea-text[data-size='xs'] { font-size: var(--alea-font-size-xs); }\n.alea-text[data-size='sm'] { font-size: var(--alea-font-size-sm); }\n.alea-text[data-size='md'] { font-size: var(--alea-font-size-md); }\n.alea-text[data-size='base'] { font-size: var(--alea-font-size-base); }\n.alea-text[data-size='lg'] { font-size: var(--alea-font-size-lg); line-height: var(--alea-font-leading-relaxed); }\n.alea-text[data-size='xl'] { font-size: var(--alea-font-size-xl); line-height: var(--alea-font-leading-relaxed); }\n.alea-text[data-tone='muted'] { color: var(--alea-text-muted); }\n.alea-text[data-tone='faint'] { color: var(--alea-text-faint); }\n.alea-text[data-tone='accent'] { color: var(--alea-accent-strong); }\n.alea-text[data-tone='success'] { color: var(--alea-status-success); }\n.alea-text[data-tone='warning'] { color: var(--alea-status-warning); }\n.alea-text[data-tone='danger'] { color: var(--alea-status-danger); }\n.alea-text[data-weight='regular'] { font-weight: var(--alea-font-weight-regular); }\n.alea-text[data-weight='medium'] { font-weight: var(--alea-font-weight-medium); }\n.alea-text[data-weight='semibold'] { font-weight: var(--alea-font-weight-semibold); }\n/* min-width: 0 lets it shrink inside a flex row (Inline), so the ellipsis shows instead of the row overflowing */\n.alea-text[data-truncate] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }\n\n.alea-eyebrow {\n margin: 0;\n font: var(--alea-font-weight-semibold) var(--alea-font-size-xs) / 1.2 var(--alea-font-family-body);\n letter-spacing: var(--alea-font-tracking-eyebrow);\n text-transform: uppercase;\n color: var(--alea-text-muted);\n}\n.alea-code {\n font-family: var(--alea-font-family-mono);\n font-size: 0.875em;\n padding: 0.1em 0.4em;\n border-radius: var(--alea-radius-sm);\n background: var(--alea-surface-deep);\n box-shadow: inset 0 0 0 1px var(--alea-border);\n}\n.alea-kbd {\n display: inline-flex; align-items: center; justify-content: center;\n min-width: 24px; height: 24px; padding: 0 var(--alea-space-2);\n border-radius: var(--alea-radius-sm);\n font: var(--alea-font-weight-medium) var(--alea-font-size-2xs) / 1 var(--alea-font-family-body);\n color: var(--alea-text-muted);\n background: var(--alea-surface-raised);\n box-shadow: inset 0 -1px 0 var(--alea-border-strong), inset 0 0 0 1px var(--alea-border);\n}\n\n.alea-link { color: var(--alea-accent-strong); border-radius: var(--alea-radius-xs); cursor: pointer; transition: color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), text-decoration-color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-link[data-variant='inline'] { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }\n.alea-link[data-variant='inline'][data-hovered] { text-decoration-thickness: 2px; }\n.alea-link[data-variant='standalone'] { text-decoration: none; font-weight: var(--alea-font-weight-medium); }\n.alea-link[data-variant='standalone'][data-hovered] { text-decoration: underline; text-underline-offset: 3px; }\n.alea-link[data-variant='muted'] { color: inherit; text-decoration: underline; text-decoration-color: var(--alea-border-control); text-underline-offset: 3px; }\n.alea-link[data-variant='muted'][data-hovered] { text-decoration-color: currentColor; }\n.alea-link[data-disabled] { opacity: 0.45; cursor: not-allowed; }\n.alea-link[data-size='sm'] { font-size: var(--alea-font-size-sm); }\n.alea-link[data-size='md'] { font-size: var(--alea-font-size-md); }\n.alea-link[data-size='lg'] { font-size: var(--alea-font-size-base); }\n.alea-link[data-tone='neutral'] { color: var(--alea-text); }\n.alea-link[data-tone='danger'] { color: var(--alea-status-danger); }\n.alea-link:has(.alea-link-icon) { display: inline-flex; align-items: center; gap: 0.35em; }\n.alea-link-icon { display: inline-flex; flex: none; }\n.alea-link-icon svg { width: 1.1em; height: 1.1em; }\n.alea-link-icon-end { transition: transform var(--alea-motion-duration-base) var(--alea-motion-ease-emphasized); }\n.alea-link[data-variant='standalone'][data-hovered] .alea-link-icon-end, .alea-link[data-variant='standalone'][data-focus-visible] .alea-link-icon-end { transform: translateX(var(--alea-hint-distance, 3px)); }\n.alea-link-ext { display: inline-block; margin-left: 0.2em; font-size: 0.9em; transition: transform var(--alea-motion-duration-base) var(--alea-motion-ease-out); }\n.alea-link[data-hovered] .alea-link-ext { transform: translate(calc(var(--alea-motion-lift) * -0.5), calc(var(--alea-motion-lift) * 0.5)); }\n.alea-text[data-clamp] { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--alea-clamp); line-clamp: var(--alea-clamp); overflow: hidden; }\n\n.alea-text[data-align='center'] { text-align: center; }\n.alea-text[data-align='end'] { text-align: end; }\n"}],"deps":["icon"],"npm":["react-aria-components"],"exports":["Heading","Text","Eyebrow","Code","Kbd","Link"],"descriptions":{"Heading":"A heading with the Alea type: Crimson Pro light for titles, Inter for UI.","Text":"Body text with the token sizes and tones; cut to one line or several.","Eyebrow":"The small uppercase label above a section title.","Code":"Inline code.","Kbd":"A key or shortcut, like ⌘K.","Link":"A link, accessible and focus-visible: three looks, three sizes, three tones, icons, and external links that say they open a new tab."}},"upload":{"files":[{"path":"components/upload/Upload.tsx","content":"import { useEffect, useState, type ReactNode } from 'react';\nimport { FileTrigger as RACFileTrigger, DropZone as RACDropZone, Text, type DropZoneProps as RACDropZoneProps, type FileDropItem } from 'react-aria-components';\nimport { UploadCloud, FileText, X, RotateCw, Check, Paperclip } from 'lucide-react';\nimport { cx, withBase } from '../../utils/cx';\nimport { Button } from '../button/Button';\nimport { ProgressBar } from '../feedback/Feedback';\nimport { useStrings } from '../../i18n/strings';\n\nexport interface UploadFile {\n id: string;\n file: File;\n /** 0 to 100 while uploading. */\n progress?: number;\n /** Set when it failed. */\n error?: string;\n}\n\nexport interface FileUploadProps {\n /** Accepted types, e.g. ['image/png', '.svg']. */\n accept?: string[];\n /** Pick or drop more than one. Default true. */\n allowsMultiple?: boolean;\n /** Largest size in bytes; bigger files are listed with an error. */\n maxSize?: number;\n /** The files (controlled), with progress and errors you set. */\n files?: UploadFile[];\n /** Called with the full new list when files are added or removed. */\n onChange?: (files: UploadFile[]) => void;\n /** The text in the drop area. */\n label?: ReactNode;\n /** Help under it: types and size. */\n description?: ReactNode;\n /** Disables every part of it. */\n isDisabled?: boolean;\n /** How the files show: text (rows with an icon, default), thumbnail (rows with a preview of images) or grid (picture cards, for galleries and avatars). */\n listType?: 'text' | 'thumbnail' | 'grid';\n /** dropzone (a drop area with a button, default) or button (only the button and the list, for tight forms). */\n variant?: 'dropzone' | 'button';\n /** The most files kept; the rest are listed with an error. */\n maxFiles?: number;\n /** Shows a Retry button on files with an error, and calls this with the file. */\n onRetry?: (file: UploadFile) => void;\n /** Label of the browse button. Default \"Browse files\". */\n buttonLabel?: ReactNode;\n /** Extra class names for the root element. */\n className?: string;\n}\n\nconst size = (b: number) => (b < 1024 ? `${b} B` : b < 1048576 ? `${Math.round(b / 102.4) / 10} KB` : `${Math.round(b / 104857.6) / 10} MB`);\nconst matches = (f: File, accept?: string[]) => !accept || accept.some(a => a.startsWith('.') ? f.name.toLowerCase().endsWith(a.toLowerCase()) : a.endsWith('/*') ? f.type.startsWith(a.slice(0, -1)) : f.type === a);\n\n/** A preview of an image file; other files get an icon. The object URL is released when it unmounts. */\nfunction Thumb({ file }: { file: File }) {\n const [url, setUrl] = useState<string | null>(null);\n useEffect(() => {\n if (!file.type.startsWith('image/') || typeof URL.createObjectURL !== 'function') return;\n const u = URL.createObjectURL(file); setUrl(u);\n return () => URL.revokeObjectURL(u);\n }, [file]);\n return url ? <img className=\"alea-upload-thumb\" src={url} alt=\"\" /> : <span className=\"alea-upload-thumb\" aria-hidden=\"true\"><FileText size={20} /></span>;\n}\n\n/** Drop files or browse for them, with a list that shows size, progress, done and errors: rows, rows with previews, or a grid of picture cards. */\nexport function FileUpload({ accept, allowsMultiple = true, maxSize, files, onChange, label, description, isDisabled, listType = 'text', variant = 'dropzone', maxFiles, onRetry, buttonLabel, className }: FileUploadProps) {\n const t = useStrings(); label ??= t.dropFiles;\n const [own, setOwn] = useState<UploadFile[]>([]);\n const list = files ?? own;\n const set = (v: UploadFile[]) => { if (files === undefined) setOwn(v); onChange?.(v); };\n const add = (fs: File[]) => {\n const kept = list.filter(f => !f.error).length;\n const picked = (allowsMultiple ? fs : fs.slice(0, 1)).map((file, i) => ({\n id: `${file.name}-${file.size}-${Math.random().toString(36).slice(2, 7)}`, file,\n error: !matches(file, accept) ? t.typeNotAccepted : maxSize && file.size > maxSize ? t.largerThan(size(maxSize)) : maxFiles !== undefined && allowsMultiple && kept + i >= maxFiles ? t.tooManyFiles(maxFiles) : undefined,\n }));\n set(allowsMultiple ? [...list, ...picked] : picked);\n };\n const trigger = (\n <FileTrigger acceptedFileTypes={accept} allowsMultiple={allowsMultiple} onSelect={fl => fl && add(Array.from(fl))}>\n <Button size=\"sm\" variant=\"secondary\" isDisabled={isDisabled} iconStart={variant === 'button' ? <Paperclip /> : undefined}>{buttonLabel ?? t.browseFiles}</Button>\n </FileTrigger>\n );\n return (\n <div className={cx('alea-upload', className)} data-list={listType} data-variant={variant}>\n {variant === 'button' ? (\n <div className=\"alea-upload-button\">{trigger}{description && <span className=\"alea-upload-desc\">{description}</span>}</div>\n ) : (\n <DropZone isDisabled={isDisabled} onDrop={async e => {\n const items = e.items.filter((i): i is FileDropItem => i.kind === 'file');\n add(await Promise.all(items.map(i => i.getFile())));\n }}>\n <UploadCloud size={28} aria-hidden=\"true\" className=\"alea-upload-icon\" />\n <Text slot=\"label\" className=\"alea-upload-label\">{label}</Text>\n {description && <span className=\"alea-upload-desc\">{description}</span>}\n {trigger}\n </DropZone>\n )}\n {list.length > 0 && (\n <ul className=\"alea-upload-list\" aria-label={t.files}>\n {list.map(f => {\n const busy = f.progress !== undefined && f.progress < 100 && !f.error;\n const done = f.progress !== undefined && f.progress >= 100 && !f.error;\n return (\n <li key={f.id} className=\"alea-upload-item\" data-error={f.error ? true : undefined} data-done={done || undefined} aria-busy={busy || undefined}>\n {listType === 'text' ? <FileText size={18} aria-hidden=\"true\" className=\"alea-upload-file-icon\" /> : <Thumb file={f.file} />}\n <div className=\"alea-upload-meta\">\n <span className=\"alea-upload-name\">{f.file.name}</span>\n <span className=\"alea-upload-size\">{f.error || (done ? `${size(f.file.size)} · ${t.uploaded}` : size(f.file.size))}</span>\n {busy && <ProgressBar aria-label={t.uploading(f.file.name)} value={f.progress} size=\"sm\" />}\n </div>\n {done && <Check size={16} aria-hidden=\"true\" className=\"alea-upload-done\" />}\n {f.error && onRetry && <button type=\"button\" className=\"alea-upload-action alea-focus-ring\" aria-label={`${t.retry}: ${f.file.name}`} onClick={() => onRetry(f)}><RotateCw size={14} /></button>}\n <button type=\"button\" className=\"alea-upload-action alea-focus-ring\" aria-label={t.removeItem(f.file.name)} onClick={() => set(list.filter(x => x.id !== f.id))}><X size={14} /></button>\n </li>\n );\n })}\n </ul>\n )}\n </div>\n );\n}\n\nexport interface DropZoneProps extends RACDropZoneProps { children: ReactNode }\n/** A bare drop target, for custom layouts. Keyboard users get the button inside. */\nexport function DropZone({ className, ...props }: DropZoneProps) {\n return <RACDropZone {...props} className={withBase('alea-dropzone', className as any)} />;\n}\n\nexport interface FileTriggerProps {\n /** The element that opens the file picker: a Button, IconButton or Link. */\n children: ReactNode;\n /** File types to offer, like ['image/*', '.pdf']. */\n acceptedFileTypes?: string[];\n /** Lets people pick several files. */\n allowsMultiple?: boolean;\n /** Picks a whole folder instead of files. */\n acceptDirectory?: boolean;\n /** On phones, opens the camera: user (front) or environment (back). */\n defaultCamera?: 'user' | 'environment';\n /** Called with the picked files. */\n onSelect?: (files: FileList | null) => void;\n}\n\n/** Any button that opens the file picker: avatars, attachments, imports. For drag and drop as well, use FileUpload or DropZone. */\nexport function FileTrigger(props: FileTriggerProps) {\n return <RACFileTrigger {...props} />;\n}\n"},{"path":"components/upload/upload.css","content":".alea-upload { display: flex; flex-direction: column; gap: var(--alea-space-3); }\n.alea-dropzone {\n display: flex; flex-direction: column; align-items: center; gap: var(--alea-space-2);\n padding: var(--alea-space-8) var(--alea-space-6);\n border-radius: var(--alea-radius-lg);\n border: 1.5px dashed var(--alea-border-control);\n background: var(--alea-surface-deep);\n text-align: center;\n}\n.alea-dropzone[data-drop-target] { border-color: var(--alea-accent); background: var(--alea-accent-subtle); }\n.alea-dropzone[data-focus-visible] { outline: 2px solid var(--alea-focus); outline-offset: var(--alea-space-0-5); }\n.alea-dropzone[data-disabled] { opacity: 0.5; }\n.alea-upload-icon { color: var(--alea-icon-accent); }\n.alea-upload-label { font: var(--alea-font-weight-semibold) var(--alea-font-size-base) / 1.3 var(--alea-font-family-body); }\n.alea-upload-desc { font-size: var(--alea-font-size-xs); color: var(--alea-text-faint); margin-bottom: var(--alea-space-2); }\n.alea-upload-list { display: flex; flex-direction: column; gap: var(--alea-space-2); margin: 0; padding: 0; list-style: none; }\n.alea-upload-item { display: flex; align-items: center; gap: var(--alea-space-3); padding: var(--alea-space-3) var(--alea-space-3); border-radius: var(--alea-radius-sm); background: var(--alea-surface); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-upload-item[data-error] { box-shadow: inset 0 0 0 1px var(--alea-status-danger); }\n.alea-upload-file-icon { flex: none; color: var(--alea-icon-muted); }\n.alea-upload-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--alea-space-1); }\n.alea-upload-name { font-size: var(--alea-font-size-md); font-weight: var(--alea-font-weight-medium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.alea-upload-size { font-size: var(--alea-font-size-xs); color: var(--alea-text-faint); }\n.alea-upload-item[data-error] .alea-upload-size { color: var(--alea-status-danger); }\n\n/* actions, done, previews */\n.alea-upload-action { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--alea-radius-sm); background: transparent; color: var(--alea-text-muted); cursor: pointer; transition: background var(--alea-motion-duration-fast) var(--alea-motion-ease-standard), color var(--alea-motion-duration-fast) var(--alea-motion-ease-standard); }\n.alea-upload-action:hover { background: var(--alea-surface-raised); color: var(--alea-text); }\n.alea-upload-done { flex: none; color: var(--alea-status-success); }\n.alea-upload-thumb { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--alea-radius-sm); object-fit: cover; background: var(--alea-surface-raised); color: var(--alea-text-muted); }\n.alea-upload-button { display: flex; align-items: center; flex-wrap: wrap; gap: var(--alea-space-3); }\n.alea-upload-button .alea-upload-desc { margin: 0; }\n/* grid: picture cards */\n.alea-upload[data-list='grid'] .alea-upload-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--alea-space-3); }\n.alea-upload[data-list='grid'] .alea-upload-item { position: relative; flex-direction: column; align-items: stretch; gap: var(--alea-space-2); padding: var(--alea-space-2); }\n.alea-upload[data-list='grid'] .alea-upload-thumb { width: 100%; height: auto; aspect-ratio: 1; }\n.alea-upload[data-list='grid'] .alea-upload-name { font-size: var(--alea-font-size-sm); }\n.alea-upload[data-list='grid'] .alea-upload-action { position: absolute; top: var(--alea-space-3); right: var(--alea-space-3); background: color-mix(in oklab, var(--alea-bg) 80%, transparent); }\n.alea-upload[data-list='grid'] .alea-upload-action + .alea-upload-action { right: var(--alea-space-12); }\n.alea-upload[data-list='grid'] .alea-upload-done { position: absolute; top: var(--alea-space-4); left: var(--alea-space-4); }\n@media (pointer: coarse) { .alea-upload-action { width: 44px; height: 44px; } }\n"}],"deps":["button","feedback"],"npm":["react-aria-components","lucide-react"],"exports":["FileUpload","DropZone","FileTrigger"],"descriptions":{"FileUpload":"Drop files or browse for them, with a list that shows size, progress, done and errors: rows, rows with previews, or a grid of picture cards.","DropZone":"A bare drop target, for custom layouts. Keyboard users get the button inside.","FileTrigger":"Any button that opens the file picker: avatars, attachments, imports. For drag and drop as well, use FileUpload or DropZone."}},"work":{"files":[{"path":"components/work/Ops.tsx","content":"import { useId, type ReactNode } from 'react';\nimport { cx } from '../../utils/cx';\nimport { useStrings } from '../../i18n/strings';\n\n// ---------------------------------------------------------------- uptime bar\nexport type UptimeState = 'ok' | 'degraded' | 'down' | 'none';\nexport interface UptimeBarProps {\n /** One state per day (or hour), oldest first. */\n days: UptimeState[];\n /** What it measures: \"API gateway\". */\n label: string;\n /** The uptime to say, e.g. 99.98 (percent). Without it the bar is described by its incidents. */\n uptime?: number;\n /** What one bar is: \"day\" (default) or \"hour\". */\n unit?: string;\n className?: string;\n}\n\n/** A service's recent history as thin bars, one per day: green, amber when it was slow, red when it was down. Read as one sentence. */\nexport function UptimeBar({ days, label, uptime, unit = 'day', className }: UptimeBarProps) {\n const t = useStrings();\n const bad = days.filter(d => d === 'down').length, slow = days.filter(d => d === 'degraded').length;\n const text = t.uptime(label, uptime, days.length, unit, bad, slow);\n return (\n <div className={cx('alea-uptime', className)} role=\"img\" aria-label={text} style={{ gridTemplateColumns: `repeat(${days.length}, minmax(0, 1fr))` }}>\n {days.map((d, i) => <span key={i} data-state={d} />)}\n </div>\n );\n}\n\n// ---------------------------------------------------------------- diff view\nexport interface DiffLine {\n /** add (new), remove (gone) or same (context). */\n type: 'add' | 'remove' | 'same';\n text: ReactNode;\n}\nexport interface DiffViewProps {\n /** The lines, in order. */\n lines: DiffLine[];\n /** A name for the change (\"Venue\", \"tokens.css\"); also the list's label. */\n title?: string;\n className?: string;\n}\n\n/** What changed between two versions, line by line: removed lines marked − in red, added + in green, the rest as context. */\nexport function DiffView({ lines, title, className }: DiffViewProps) {\n const t = useStrings();\n const id = useId();\n return (\n <figure className={cx('alea-diff', className)} aria-labelledby={title ? id : undefined}>\n {title && <figcaption id={id} className=\"alea-diff-title\">{title}</figcaption>}\n <ol className=\"alea-diff-lines\">\n {lines.map((l, i) => <li key={i} data-type={l.type}><span className=\"alea-diff-sign\" aria-hidden=\"true\">{l.type === 'add' ? '+' : l.type === 'remove' ? '−' : ' '}</span><span className=\"alea-visually-hidden\">{l.type === 'add' ? t.diffAdded : l.type === 'remove' ? t.diffRemoved : ''}</span>{l.text}</li>)}\n </ol>\n </figure>\n );\n}\n"},{"path":"components/work/Work.tsx","content":"import { useId, type Key, type ReactNode } from 'react';\nimport { GridList, GridListItem, useLocale } from 'react-aria-components';\nimport { AtSign, Bot, CircleCheck, CircleDot, CircleX, GitPullRequest, Loader2, MessageSquare, UserPlus } from 'lucide-react';\nimport { cx } from '../../utils/cx';\nimport { Avatar } from '../display/Display';\nimport { useStrings } from '../../i18n/strings';\n\n// ---------------------------------------------------------------- StatusIcon and PriorityIcon\n\nexport type WorkStatus = 'backlog' | 'todo' | 'progress' | 'review' | 'done' | 'canceled';\nexport type WorkPriority = 'none' | 'urgent' | 'high' | 'medium' | 'low';\n\nexport interface StatusIconProps {\n /** backlog, todo, progress, review, done or canceled. */\n status: WorkStatus;\n /** For in progress: how far along, 0 to 1 (the ring fills). Default 0.5. */\n progress?: number;\n /** Size in px. Default 14. */\n size?: number;\n /** Names it for screen readers (when it stands alone). Default: decorative, with the status said in text nearby. */\n label?: boolean;\n className?: string;\n}\n\n/** The status of a piece of work as a small ring: dashed for backlog, empty for todo, filling for in progress, half for review, checked for done, crossed for canceled. */\nexport function StatusIcon({ status, progress = 0.5, size = 14, label, className }: StatusIconProps) {\n const t = useStrings();\n const r = 5, c = 2 * Math.PI * r;\n const fill = status === 'progress' ? progress : status === 'review' ? 0.75 : status === 'done' ? 1 : 0;\n const a11y = label ? { role: 'img', 'aria-label': t.workStatus[status] } : { 'aria-hidden': true as const };\n return (\n <svg viewBox=\"0 0 14 14\" width={size} height={size} className={cx('alea-status-icon', className)} data-status={status} {...a11y}>\n <circle cx=\"7\" cy=\"7\" r=\"6\" fill=\"none\" strokeWidth=\"1.5\" className=\"alea-status-ring\" strokeDasharray={status === 'backlog' ? '2 2.2' : undefined} />\n {(status === 'progress' || status === 'review') && <circle cx=\"7\" cy=\"7\" r={r / 2} fill=\"none\" strokeWidth={r} className=\"alea-status-fill\" strokeDasharray={`${(c / 2) * fill} ${c}`} transform=\"rotate(-90 7 7)\" />}\n {status === 'done' && <><circle cx=\"7\" cy=\"7\" r=\"6\" className=\"alea-status-solid\" /><path d=\"M4.5 7.2l1.7 1.7 3.3-3.6\" fill=\"none\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"alea-status-mark\" /></>}\n {status === 'canceled' && <><circle cx=\"7\" cy=\"7\" r=\"6\" className=\"alea-status-solid\" /><path d=\"M5 5l4 4M9 5l-4 4\" fill=\"none\" strokeWidth=\"1.5\" strokeLinecap=\"round\" className=\"alea-status-mark\" /></>}\n </svg>\n );\n}\n\nexport interface PriorityIconProps {\n /** none, urgent, high, medium or low. */\n priority: WorkPriority;\n /** Size in px. Default 14. */\n size?: number;\n /** Names it for screen readers. Default decorative. */\n label?: boolean;\n className?: string;\n}\n\n/** Priority as signal bars (low, medium, high), a filled square with ! for urgent, and a dash for none. */\nexport function PriorityIcon({ priority, size = 14, label, className }: PriorityIconProps) {\n const t = useStrings();\n const a11y = label ? { role: 'img', 'aria-label': t.workPriority[priority] } : { 'aria-hidden': true as const };\n const on = { none: 0, low: 1, medium: 2, high: 3, urgent: 3 }[priority];\n return (\n <svg viewBox=\"0 0 14 14\" width={size} height={size} className={cx('alea-priority-icon', className)} data-priority={priority} {...a11y}>\n {priority === 'urgent' ? <><rect x=\"1\" y=\"1\" width=\"12\" height=\"12\" rx=\"3\" className=\"alea-priority-urgent\" /><path d=\"M7 4v3.5M7 9.6v.1\" strokeWidth=\"1.6\" strokeLinecap=\"round\" className=\"alea-priority-mark\" /></>\n : priority === 'none' ? <path d=\"M3 7h1.5M6.25 7h1.5M9.5 7H11\" strokeWidth=\"1.5\" strokeLinecap=\"round\" className=\"alea-priority-dash\" />\n : [0, 1, 2].map(i => <rect key={i} x={1.5 + i * 4} y={9 - i * 3} width=\"3\" height={4 + i * 3} rx=\"1\" className={i < on ? 'alea-priority-on' : 'alea-priority-off'} />)}\n </svg>\n );\n}\n\n// ---------------------------------------------------------------- DiffStat\n\nexport interface DiffStatProps {\n /** Lines added. */\n additions: number;\n /** Lines removed. */\n deletions: number;\n /** Files changed, said with the numbers. */\n files?: number;\n /** Shows five blocks in proportion. Default true. */\n blocks?: boolean;\n className?: string;\n}\n\n/** Lines added and removed, as +22 −10 and five blocks in proportion. The whole is read as one sentence. */\nexport function DiffStat({ additions, deletions, files = 1, blocks = true, className }: DiffStatProps) {\n const t = useStrings();\n const total = additions + deletions || 1;\n const add = Math.round((additions / total) * 5);\n return (\n <span className={cx('alea-diffstat', className)} role=\"img\" aria-label={t.diffStat(files, additions, deletions)}>\n <span className=\"alea-diffstat-add\" aria-hidden=\"true\">+{additions}</span>\n <span className=\"alea-diffstat-del\" aria-hidden=\"true\">−{deletions}</span>\n {blocks && <span className=\"alea-diffstat-blocks\" aria-hidden=\"true\">{[0, 1, 2, 3, 4].map(i => <span key={i} data-kind={i < add ? 'add' : 'del'} />)}</span>}\n </span>\n );\n}\n\n// ---------------------------------------------------------------- IssueList\n\nexport interface Issue {\n id: string;\n /** A short key people quote: \"ENG-142\". */\n key?: string;\n title: string;\n status: WorkStatus;\n priority?: WorkPriority;\n /** For in progress, 0 to 1. */\n progress?: number;\n labels?: Array<{ name: string; color?: string }>;\n assignee?: { name: string; src?: string };\n /** A due date. */\n due?: Date;\n href?: string;\n}\n\nexport interface IssueListProps {\n /** The issues: id, title, status and optional key, priority, assignee, labels, due date and href. */\n issues: Issue[];\n /** Groups rows by status, each under a heading with its count. Default true. */\n groupByStatus?: boolean;\n /** Called when a row is opened (Enter or click), when rows have no href. */\n onOpen?: (issue: Issue) => void;\n /** Lets people select rows (checkboxes appear). */\n selectionMode?: 'none' | 'multiple';\n /** Called with the selected ids. */\n onSelectionChange?: (ids: Set<string>) => void;\n /** Name of the list. Default \"Issues\". */\n 'aria-label'?: string;\n /** The group headings' level, to fit the page's outline. Default 3. */\n headingLevel?: 2 | 3 | 4;\n className?: string;\n}\n\nconst ORDER: WorkStatus[] = ['progress', 'review', 'todo', 'backlog', 'done', 'canceled'];\n\n/** Dense rows of work: status, priority, key, title, labels, due date and who has it. Grouped by status; arrow keys move through each group, Enter opens. */\nexport function IssueList({ issues, groupByStatus = true, onOpen, selectionMode = 'none', onSelectionChange, 'aria-label': label, headingLevel = 3, className }: IssueListProps) {\n const t = useStrings();\n const H = `h${headingLevel}` as 'h3';\n const id = useId();\n const groups = groupByStatus ? ORDER.map(s => [s, issues.filter(i => i.status === s)] as const).filter(([, l]) => l.length) : [['all' as const, issues] as const];\n return (\n <div className={cx('alea-issues', className)} role=\"group\" aria-label={label ?? t.issues}>\n {groups.map(([status, list]) => (\n <section key={status} className=\"alea-issues-group\" aria-labelledby={`${id}-${status}`}>\n {groupByStatus && (\n <H className=\"alea-issues-head\" id={`${id}-${status}`}>\n <StatusIcon status={status as WorkStatus} />\n <span>{t.workStatus[status as WorkStatus]}</span>\n <span className=\"alea-issues-count\">{list.length}</span>\n </H>\n )}\n <GridList aria-labelledby={groupByStatus ? `${id}-${status}` : undefined} aria-label={groupByStatus ? undefined : label ?? t.issues} className=\"alea-issues-list\"\n selectionMode={selectionMode === 'multiple' ? 'multiple' : 'none'} onSelectionChange={k => onSelectionChange?.(new Set([...(k === 'all' ? list.map(i => i.id) : k)].map(String)))}\n onAction={onOpen ? k => { const it = list.find(i => i.id === k); if (it) onOpen(it); } : undefined}>\n {list.map(it => <IssueRow key={it.id} issue={it} selectable={selectionMode === 'multiple'} />)}\n </GridList>\n </section>\n ))}\n </div>\n );\n}\n\nfunction IssueRow({ issue, selectable }: { issue: Issue; selectable: boolean }) {\n const t = useStrings();\n const { locale } = useLocale();\n const due = issue.due ? new Intl.DateTimeFormat(locale, { month: 'short', day: 'numeric' }).format(issue.due) : null;\n const overdue = issue.due && issue.status !== 'done' && issue.due.getTime() < Date.now();\n // the row's name says everything the icons show\n const text = [issue.key, issue.title, t.workStatus[issue.status], issue.priority && issue.priority !== 'none' ? t.workPriority[issue.priority] : null, issue.assignee?.name, due ? `${t.due} ${due}` : null].filter(Boolean).join(', ');\n return (\n <GridListItem id={issue.id} textValue={text} href={issue.href} className=\"alea-issue alea-focus-ring\">\n {({ isSelected }) => (\n <>\n {selectable && <span className=\"alea-issue-check\" data-on={isSelected || undefined} aria-hidden=\"true\" />}\n <PriorityIcon priority={issue.priority ?? 'none'} />\n {issue.key && <span className=\"alea-issue-key\">{issue.key}</span>}\n <StatusIcon status={issue.status} progress={issue.progress} />\n <span className=\"alea-issue-title\">{issue.title}</span>\n <span className=\"alea-issue-meta\">\n {issue.labels?.map(l => <span key={l.name} className=\"alea-issue-label\"><span style={{ background: l.color ?? 'var(--alea-accent)' }} aria-hidden=\"true\" />{l.name}</span>)}\n {due && <span className=\"alea-issue-due\" data-overdue={overdue || undefined}>{due}</span>}\n {issue.assignee ? <Avatar name={issue.assignee.name} src={issue.assignee.src} size=\"xs\" aria-hidden=\"true\" /> : <span className=\"alea-issue-nobody\" aria-hidden=\"true\" />}\n </span>\n </>\n )}\n </GridListItem>\n );\n}\n\n// ---------------------------------------------------------------- PropertyList\n\nexport interface PropertyListProps {\n /** Label and value pairs: the value can be any node (a picker, a badge, an avatar and a name). */\n items: Array<{ label: ReactNode; value: ReactNode; icon?: ReactNode }>;\n /** A heading above. */\n title?: ReactNode;\n /** The heading's level, to fit the page's outline. Default 3. */\n headingLevel?: 2 | 3 | 4;\n className?: string;\n}\n\n/** The properties of an item in a side panel: label on the left, value (often an inline picker) on the right. */\nexport function PropertyList({ items, title, headingLevel = 3, className }: PropertyListProps) {\n const t = useStrings();\n const H = `h${headingLevel}` as 'h3';\n const id = useId();\n return (\n <section className={cx('alea-props', className)} aria-labelledby={`${id}-t`}>\n <H id={`${id}-t`} className=\"alea-props-title\">{title ?? t.properties}</H>\n <dl className=\"alea-props-list\">\n {items.map((it, i) => <div key={i} className=\"alea-props-row\"><dt>{it.icon && <span aria-hidden=\"true\">{it.icon}</span>}{it.label}</dt><dd>{it.value}</dd></div>)}\n </dl>\n </section>\n );\n}\n\n// ---------------------------------------------------------------- ActivityFeed\n\nexport interface ActivityEvent {\n id: string;\n /** Who did it: a person or an agent. */\n actor: { name: string; src?: string; agent?: boolean };\n /** What they did, as a sentence after the name: \"moved this to In progress\". */\n action?: ReactNode;\n /** A comment's text, shown in a bubble. */\n comment?: ReactNode;\n time: Date;\n /** An icon instead of the avatar, for system events. */\n icon?: ReactNode;\n}\n\nexport interface ActivityFeedProps {\n /** The events to list: who did what, when, and any comment. */\n events: ActivityEvent[];\n /** Name of the feed. Default \"Activity\". */\n 'aria-label'?: string;\n className?: string;\n}\n\nconst ago = (d: Date, locale: string, style: 'long' | 'short' = 'long') => {\n const s = Math.round((d.getTime() - Date.now()) / 1000);\n const rtf = new Intl.RelativeTimeFormat(locale, { numeric: 'auto', style });\n const a = Math.abs(s);\n return a < 60 ? rtf.format(Math.round(s), 'second') : a < 3600 ? rtf.format(Math.round(s / 60), 'minute') : a < 86400 ? rtf.format(Math.round(s / 3600), 'hour') : rtf.format(Math.round(s / 86400), 'day');\n};\n\n/** What happened to an item, in order: people and agents, changes and comments, with relative times. A list a screen reader reads top to bottom. */\nexport function ActivityFeed({ events, 'aria-label': label, className }: ActivityFeedProps) {\n const t = useStrings();\n const { locale } = useLocale();\n return (\n <ol className={cx('alea-activity', className)} aria-label={label ?? t.activity}>\n {events.map(e => (\n <li key={e.id} className=\"alea-activity-item\" data-comment={e.comment ? true : undefined}>\n <span className=\"alea-activity-avatar\" aria-hidden=\"true\">{e.icon ?? (e.actor.agent ? <span className=\"alea-activity-agent\"><Bot /></span> : <Avatar name={e.actor.name} src={e.actor.src} size=\"xs\" />)}</span>\n <div className=\"alea-activity-body\">\n <p className=\"alea-activity-line\">\n <strong>{e.actor.name}</strong>{e.actor.agent && <span className=\"alea-activity-tag\">{t.agent}</span>}{e.action && <> {e.action}</>}\n <span className=\"alea-activity-time\"> · <time dateTime={e.time.toISOString()}>{ago(e.time, locale)}</time></span>\n </p>\n {e.comment && <div className=\"alea-activity-comment\">{e.comment}</div>}\n </div>\n </li>\n ))}\n </ol>\n );\n}\n\n// ---------------------------------------------------------------- AgentRun\n\nexport interface AgentRunProps {\n /** The agent's name. */\n agent: string;\n /** The model or the tool it runs on. */\n model?: string;\n /** What it was asked to do. */\n task: ReactNode;\n /** running, done or failed. */\n status: 'running' | 'done' | 'failed';\n /** How long it worked: \"10 s\", \"2 min\". */\n duration?: string;\n /** What it says it did. */\n summary?: ReactNode;\n /** The change it made. */\n diff?: { files: number; additions: number; deletions: number };\n /** A pull request or result it opened: title and state. */\n result?: { title: string; state: string; href?: string };\n /** Buttons at the end: review, revert. */\n actions?: ReactNode;\n className?: string;\n}\n\n/** One task given to an agent: what it was asked, how long it worked, what it says it did, the change and the result, with actions to review it. Its status is announced as it changes. */\nexport function AgentRun({ agent, model, task, status, duration, summary, diff, result, actions, className }: AgentRunProps) {\n const t = useStrings();\n const S = status === 'running' ? Loader2 : status === 'done' ? CircleCheck : CircleX;\n return (\n <article className={cx('alea-agentrun', className)} data-status={status} aria-label={`${agent}: ${typeof task === 'string' ? task : ''}`}>\n <header className=\"alea-agentrun-head\">\n <span className=\"alea-activity-agent\" aria-hidden=\"true\"><Bot /></span>\n <strong>{agent}</strong>\n {model && <span className=\"alea-agentrun-model\">{model}</span>}\n <span className=\"alea-agentrun-status\" data-status={status} role=\"status\"><S aria-hidden=\"true\" />{duration ? t.workedFor(duration) : null}</span>\n </header>\n <p className=\"alea-agentrun-task\">{task}</p>\n {summary && <p className=\"alea-agentrun-summary\">{summary}</p>}\n {(diff || result) && (\n <div className=\"alea-agentrun-result\">\n {result && <span className=\"alea-agentrun-pr\"><GitPullRequest aria-hidden=\"true\" />{result.href ? <a href={result.href} className=\"alea-link alea-focus-ring\" data-variant=\"inline\">{result.title}</a> : <span>{result.title}</span>}<span className=\"alea-agentrun-state\">{result.state}</span></span>}\n {diff && <DiffStat files={diff.files} additions={diff.additions} deletions={diff.deletions} />}\n </div>\n )}\n {actions && <div className=\"alea-agentrun-actions\">{actions}</div>}\n </article>\n );\n}\n\n// ---------------------------------------------------------------- InboxList\n\nexport type InboxKind = 'mention' | 'assigned' | 'comment' | 'status' | 'review' | 'agent';\n\nexport interface InboxItem {\n id: string;\n /** What it is about: \"ENG-142 Focus ring missing on audio players\". */\n title: string;\n /** Who did it: a person or an agent. */\n actor?: { name: string; src?: string; agent?: boolean };\n /** What happened, as an icon and a phrase after the name: mentioned you, assigned you, commented… */\n kind?: InboxKind;\n /** A short quote or detail under the title. */\n summary?: string;\n time: Date;\n /** Not read yet: a dot and a bolder title. */\n unread?: boolean;\n}\n\nexport interface InboxListProps {\n items: InboxItem[];\n /** The open item, when controlled. */\n selectedId?: string | null;\n /** The item open at first, when uncontrolled. */\n defaultSelectedId?: string | null;\n /** Called with the id of the item people open: click, or the arrow keys (the selection follows focus, like a mail list). */\n onSelectionChange?: (id: string) => void;\n /** Name of the list. Default \"Inbox\". */\n 'aria-label'?: string;\n className?: string;\n}\n\nconst KIND_ICON: Record<InboxKind, typeof AtSign> = { mention: AtSign, assigned: UserPlus, comment: MessageSquare, status: CircleDot, review: GitPullRequest, agent: Bot };\n\n/** Notifications as a list next to the item they open: unread dots, who did what, a short detail and when. Arrow keys move and open, like a mail list. */\nexport function InboxList({ items, selectedId, defaultSelectedId, onSelectionChange, 'aria-label': label, className }: InboxListProps) {\n const t = useStrings();\n const { locale } = useLocale();\n const sel = (v: string | null | undefined) => (v === undefined ? undefined : v === null ? [] : [v]);\n return (\n <GridList aria-label={label ?? t.inbox} className={cx('alea-inbox', className)} selectionMode=\"single\" selectionBehavior=\"replace\" disallowEmptySelection={selectedId != null || defaultSelectedId != null}\n selectedKeys={sel(selectedId)} defaultSelectedKeys={sel(defaultSelectedId)}\n onSelectionChange={k => { const id = k === 'all' ? null : [...k][0]; if (id != null) onSelectionChange?.(String(id as Key)); }}>\n {items.map(it => {\n const Icon = it.kind ? KIND_ICON[it.kind] : null;\n const when = ago(it.time, locale, 'short'), spoken = ago(it.time, locale);\n // the row's name says what the dot and the icons show\n const text = [it.unread ? t.unread : null, it.title, it.actor ? `${it.actor.name}${it.kind ? ` ${t.inboxKind[it.kind]}` : ''}` : null, it.summary, spoken].filter(Boolean).join(', ');\n return (\n <GridListItem key={it.id} id={it.id} textValue={text} className=\"alea-inbox-item alea-focus-ring\" data-unread={it.unread || undefined}>\n <span className=\"alea-inbox-dot\" aria-hidden=\"true\" />\n <span className=\"alea-inbox-avatar\" aria-hidden=\"true\">{it.actor?.agent ? <span className=\"alea-activity-agent\"><Bot /></span> : it.actor ? <Avatar name={it.actor.name} src={it.actor.src} size=\"sm\" /> : null}</span>\n <span className=\"alea-inbox-text\" aria-hidden=\"true\">\n <span className=\"alea-inbox-title\">{it.title}</span>\n <span className=\"alea-inbox-summary\">{it.actor && <>{it.actor.name}{it.kind && ` ${t.inboxKind[it.kind]}`}{it.summary && ': '}</>}{it.summary}</span>\n </span>\n <span className=\"alea-inbox-meta\" aria-hidden=\"true\">{Icon && <Icon />}<time dateTime={it.time.toISOString()}>{when}</time></span>\n </GridListItem>\n );\n })}\n </GridList>\n );\n}\n\n// ---------------------------------------------------------------- ProjectHealth and ProjectUpdate\n\nexport type ProjectHealthValue = 'onTrack' | 'atRisk' | 'offTrack' | 'none';\n\nexport interface ProjectHealthProps {\n /** onTrack, atRisk, offTrack or none (no update yet). */\n health: ProjectHealthValue;\n /** sm for rows and tables, md (default) for headers. */\n size?: 'sm' | 'md';\n className?: string;\n}\n\n/** How a project is doing, as a colored mark and its words: on track, at risk, off track. */\nexport function ProjectHealth({ health, size = 'md', className }: ProjectHealthProps) {\n const t = useStrings();\n return (\n <span className={cx('alea-health', className)} data-health={health} data-size={size}>\n <svg viewBox=\"0 0 12 12\" aria-hidden=\"true\">\n {health === 'none' ? <circle cx=\"6\" cy=\"6\" r=\"4.5\" fill=\"none\" strokeWidth=\"1.5\" strokeDasharray=\"2 2\" /> : <circle cx=\"6\" cy=\"6\" r=\"5\" />}\n {health === 'onTrack' && <path d=\"M3.6 6.2l1.6 1.6 3.2-3.4\" fill=\"none\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />}\n {health === 'atRisk' && <path d=\"M6 3.4v3M6 8.4v.1\" fill=\"none\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />}\n {health === 'offTrack' && <path d=\"M4.2 4.2l3.6 3.6M7.8 4.2l-3.6 3.6\" fill=\"none\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />}\n </svg>\n {t.projectHealth[health]}\n </span>\n );\n}\n\nexport interface ProjectUpdateProps {\n /** How the project is doing with this update. */\n health: ProjectHealthValue;\n /** Who wrote it. */\n author: { name: string; src?: string };\n /** When it was written. */\n time: Date;\n /** The project, when the update is shown outside it; the heading reads \"Project update\" otherwise. */\n project?: ReactNode;\n /** The update itself: a few lines, lists, links. */\n children: ReactNode;\n /** Reactions, a reply button or a link to the project. */\n footer?: ReactNode;\n /** The heading level for the title. Default 3. */\n headingLevel?: 2 | 3 | 4;\n className?: string;\n}\n\n/** A written status update: health, who wrote it and when, what changed and what's next. */\nexport function ProjectUpdate({ health, author, time, project, children, footer, headingLevel = 3, className }: ProjectUpdateProps) {\n const t = useStrings();\n const { locale } = useLocale();\n const id = useId();\n const H = `h${headingLevel}` as 'h3';\n return (\n <article className={cx('alea-update', className)} data-health={health} aria-labelledby={id}>\n <header className=\"alea-update-head\">\n <H id={id} className=\"alea-update-title\">{project ?? t.projectUpdate}</H>\n <ProjectHealth health={health} size=\"sm\" />\n </header>\n <p className=\"alea-update-by\">\n <Avatar name={author.name} src={author.src} size=\"xs\" aria-hidden=\"true\" />\n <span className=\"alea-update-author\">{author.name}</span>\n <span aria-hidden=\"true\">·</span>\n <time dateTime={time.toISOString()}>{ago(time, locale)}</time>\n </p>\n <div className=\"alea-update-body\">{children}</div>\n {footer && <footer className=\"alea-update-foot\">{footer}</footer>}\n </article>\n );\n}\n"},{"path":"components/work/ops.css","content":"/* UptimeBar: one thin bar per day */\n.alea-uptime { display: grid; gap: var(--alea-space-0-5); height: 28px; }\n.alea-uptime > span { border-radius: var(--alea-radius-2xs); background: var(--alea-status-success); }\n.alea-uptime > span[data-state='degraded'] { background: var(--alea-status-warning); }\n.alea-uptime > span[data-state='down'] { background: var(--alea-status-danger); }\n.alea-uptime > span[data-state='none'] { background: var(--alea-surface-raised); }\n\n/* DiffView */\n.alea-diff { margin: 0; display: grid; gap: var(--alea-space-2); }\n.alea-diff-title { font-weight: var(--alea-font-weight-semibold); font-size: var(--alea-font-size-sm); }\n.alea-diff-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--alea-space-0-5); font-family: var(--alea-font-family-mono); font-size: var(--alea-font-size-sm); }\n.alea-diff-lines > li { display: flex; gap: var(--alea-space-2); padding: var(--alea-space-1) var(--alea-space-3); border-radius: var(--alea-radius-xs); }\n.alea-diff-lines > li[data-type='remove'] { background: color-mix(in srgb, var(--alea-status-danger) 14%, transparent); }\n.alea-diff-lines > li[data-type='add'] { background: color-mix(in srgb, var(--alea-status-success) 14%, transparent); }\n.alea-diff-sign { flex: none; width: 1ch; color: var(--alea-text-muted); }\n"},{"path":"components/work/work.css","content":"/* Work: status and priority icons, diff stats, issue lists, properties, activity and agent runs */\n.alea-status-icon { flex: none; overflow: visible; }\n.alea-status-ring { stroke: var(--alea-text-muted); }\n.alea-status-icon[data-status='todo'] .alea-status-ring { stroke: var(--alea-text-soft); }\n.alea-status-icon[data-status='progress'] .alea-status-ring, .alea-status-icon[data-status='progress'] .alea-status-fill { stroke: var(--alea-status-warning); }\n.alea-status-icon[data-status='review'] .alea-status-ring, .alea-status-icon[data-status='review'] .alea-status-fill { stroke: var(--alea-status-success); }\n.alea-status-icon[data-status='done'] .alea-status-ring { stroke: var(--alea-accent-solid); }\n.alea-status-icon[data-status='done'] .alea-status-solid { fill: var(--alea-accent-solid); }\n.alea-status-icon[data-status='canceled'] .alea-status-solid { fill: var(--alea-text-muted); }\n.alea-status-mark { stroke: var(--alea-bg); }\n.alea-status-fill { transition: stroke-dasharray var(--alea-motion-duration-slow) var(--alea-motion-ease-out); }\n.alea-priority-icon { flex: none; }\n.alea-priority-on { fill: var(--alea-text-soft); }\n.alea-priority-off { fill: var(--alea-border-strong); }\n.alea-priority-dash { stroke: var(--alea-text-muted); }\n.alea-priority-urgent { fill: var(--alea-status-danger-solid); }\n.alea-priority-mark { stroke: var(--alea-status-danger-on-solid); }\n\n.alea-diffstat { display: inline-flex; align-items: center; gap: var(--alea-space-1-5); font: var(--alea-font-weight-medium) var(--alea-font-size-xs) / 1 var(--alea-font-family-mono); }\n.alea-diffstat-add { color: var(--alea-status-success); }\n.alea-diffstat-del { color: var(--alea-status-danger); }\n.alea-diffstat-blocks { display: inline-flex; gap: var(--alea-space-0-5); }\n.alea-diffstat-blocks > span { width: 8px; height: 8px; border-radius: var(--alea-radius-2xs); }\n.alea-diffstat-blocks > [data-kind='add'] { background: var(--alea-status-success); }\n.alea-diffstat-blocks > [data-kind='del'] { background: var(--alea-status-danger); }\n\n.alea-issues { display: flex; flex-direction: column; gap: var(--alea-space-2); }\n.alea-issues-head { display: flex; align-items: center; gap: var(--alea-space-2); margin: 0; padding: var(--alea-space-2) var(--alea-space-3); border-radius: var(--alea-radius-sm); background: var(--alea-surface-raised); color: var(--alea-text); font: var(--alea-font-weight-medium) var(--alea-font-size-sm) / 1.2 var(--alea-font-family-body); }\n.alea-issues-count { color: var(--alea-text-muted); font-weight: var(--alea-font-weight-regular); font-variant-numeric: tabular-nums; }\n.alea-issues-list { display: flex; flex-direction: column; outline: none; }\n.alea-issue { display: flex; align-items: center; gap: var(--alea-space-3); min-height: 40px; padding: var(--alea-space-1) var(--alea-space-3); border-bottom: 1px solid var(--alea-border); color: var(--alea-text); font-size: var(--alea-font-size-sm); text-decoration: none; cursor: default; outline: none; transition: background-color var(--alea-motion-duration-fast) var(--alea-motion-ease-out); }\n.alea-issue[data-hovered], .alea-issue[data-focused] { background: var(--alea-surface-hover); }\n.alea-issue[data-selected] { background: var(--alea-accent-subtle); }\n.alea-issue[data-href] { cursor: pointer; }\n.alea-issue-check { width: 14px; height: 14px; flex: none; border-radius: var(--alea-radius-xs); box-shadow: inset 0 0 0 1.5px var(--alea-border-control); }\n.alea-issue-check[data-on] { background: var(--alea-accent-solid); box-shadow: none; }\n.alea-issue-key { min-width: 64px; color: var(--alea-text-muted); font: var(--alea-font-size-xs) / 1 var(--alea-font-family-mono); }\n.alea-issue-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--alea-font-weight-medium); }\n.alea-issue-meta { display: flex; align-items: center; gap: var(--alea-space-2); flex: none; }\n.alea-issue-label { display: inline-flex; align-items: center; gap: var(--alea-space-1-5); height: 22px; padding: 0 var(--alea-space-2); border-radius: var(--alea-radius-full); box-shadow: inset 0 0 0 1px var(--alea-border-strong); color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); }\n.alea-issue-label > span { width: 8px; height: 8px; border-radius: 50%; }\n.alea-issue-due { color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); font-variant-numeric: tabular-nums; }\n.alea-issue-due[data-overdue] { color: var(--alea-status-danger); }\n.alea-issue-nobody { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--alea-border-strong); }\n@media (max-width: 640px) { .alea-issue-label, .alea-issue-key { display: none; } }\n\n.alea-props { display: flex; flex-direction: column; gap: var(--alea-space-2); }\n.alea-props-title { margin: 0; color: var(--alea-text-muted); font: var(--alea-font-weight-medium) var(--alea-font-size-xs) / 1.4 var(--alea-font-family-body); }\n.alea-props-list { display: flex; flex-direction: column; margin: 0; }\n.alea-props-row { display: grid; grid-template-columns: minmax(88px, 0.4fr) 1fr; align-items: center; gap: var(--alea-space-3); min-height: 36px; }\n.alea-props-row dt { display: flex; align-items: center; gap: var(--alea-space-2); color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); }\n.alea-props-row dt svg { width: 16px; height: 16px; }\n.alea-props-row dd { margin: 0; min-width: 0; font-size: var(--alea-font-size-sm); }\n\n.alea-activity { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }\n.alea-activity-item { position: relative; display: flex; gap: var(--alea-space-3); padding-bottom: var(--alea-space-4); }\n.alea-activity-item:not(:last-child)::before { content: ''; position: absolute; top: var(--alea-space-6); bottom: 0; inset-inline-start: var(--alea-space-2-5); width: 1px; background: var(--alea-border-strong); }\n.alea-activity-avatar { display: grid; place-items: center; width: 20px; height: 20px; flex: none; color: var(--alea-text-muted); }\n.alea-activity-avatar svg { width: 16px; height: 16px; }\n.alea-activity-agent { display: grid; place-items: center; width: 20px; height: 20px; border-radius: var(--alea-radius-sm); background: var(--alea-accent-subtle); color: var(--alea-accent-strong); }\n.alea-activity-agent svg { width: 14px; height: 14px; }\n.alea-activity-body { display: flex; flex-direction: column; gap: var(--alea-space-2); min-width: 0; }\n.alea-activity-line { margin: 0; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); line-height: 20px; }\n.alea-activity-line strong { color: var(--alea-text); font-weight: var(--alea-font-weight-medium); }\n.alea-activity-tag { margin-inline-start: var(--alea-space-1-5); padding: var(--alea-space-0-25) var(--alea-space-1-5); border-radius: var(--alea-radius-xs); background: var(--alea-accent-subtle); color: var(--alea-accent-strong); font-size: 11px; }\n.alea-activity-comment { padding: var(--alea-space-3); border-radius: var(--alea-radius-md); background: var(--alea-surface); box-shadow: inset 0 0 0 1px var(--alea-border); color: var(--alea-text); font-size: var(--alea-font-size-sm); line-height: 1.5; }\n\n.alea-agentrun { display: flex; flex-direction: column; gap: var(--alea-space-3); padding: var(--alea-space-4); border-radius: var(--alea-radius-lg); background: var(--alea-surface); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-agentrun-head { display: flex; align-items: center; gap: var(--alea-space-2); font-size: var(--alea-font-size-sm); }\n.alea-agentrun-model { padding: var(--alea-space-0-5) var(--alea-space-2); border-radius: var(--alea-radius-full); background: var(--alea-surface-raised); color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); }\n.alea-agentrun-status { display: inline-flex; align-items: center; gap: var(--alea-space-1-5); margin-inline-start: auto; color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); }\n.alea-agentrun-status svg { width: 16px; height: 16px; }\n.alea-agentrun-status[data-status='running'] svg { animation: alea-work-spin 0.9s linear infinite; }\n.alea-agentrun-status[data-status='done'] svg { color: var(--alea-status-success); }\n.alea-agentrun-status[data-status='failed'] svg { color: var(--alea-status-danger); }\n@keyframes alea-work-spin { to { transform: rotate(360deg); } }\n.alea-agentrun-task { margin: 0; color: var(--alea-text); font-weight: var(--alea-font-weight-medium); }\n.alea-agentrun-summary { margin: 0; color: var(--alea-text-muted); font-size: var(--alea-font-size-sm); line-height: 1.5; }\n.alea-agentrun-result { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--alea-space-3); padding: var(--alea-space-2) var(--alea-space-3); border-radius: var(--alea-radius-sm); background: var(--alea-surface-deep); font-size: var(--alea-font-size-sm); }\n.alea-agentrun-pr { display: inline-flex; align-items: center; gap: var(--alea-space-2); }\n.alea-agentrun-pr svg { width: 16px; height: 16px; color: var(--alea-status-success); }\n.alea-agentrun-state { padding: var(--alea-space-0-25) var(--alea-space-1-5); border-radius: var(--alea-radius-xs); background: var(--alea-surface-raised); color: var(--alea-text-muted); font-size: 11px; }\n.alea-agentrun-actions { display: flex; gap: var(--alea-space-2); }\n@media (prefers-reduced-motion: reduce) { :root:not([data-alea-reduced='never']) .alea-agentrun-status[data-status='running'] svg { animation-duration: 2.4s; } }\n\n.alea-inbox { display: flex; flex-direction: column; outline: none; }\n.alea-inbox-item { display: grid; grid-template-columns: 8px 32px minmax(0, 1fr) auto; align-items: center; gap: var(--alea-space-3); min-height: 64px; padding: var(--alea-space-2) var(--alea-space-3) var(--alea-space-2) var(--alea-space-2); border-radius: var(--alea-radius-md); color: var(--alea-text); cursor: default; }\n.alea-inbox-item[data-hovered] { background: var(--alea-surface-hover); }\n.alea-inbox-item[data-selected] { background: var(--alea-accent-subtle); }\n.alea-inbox-dot { width: 8px; height: 8px; border-radius: 50%; }\n.alea-inbox-item[data-unread] .alea-inbox-dot { background: var(--alea-accent-solid); }\n.alea-inbox-avatar { display: grid; place-items: center; width: 32px; height: 32px; }\n.alea-inbox-avatar .alea-activity-agent { width: 32px; height: 32px; border-radius: var(--alea-radius-sm); }\n.alea-inbox-avatar .alea-activity-agent svg { width: 16px; height: 16px; }\n.alea-inbox-text { display: flex; flex-direction: column; gap: var(--alea-space-0-5); min-width: 0; }\n.alea-inbox-title, .alea-inbox-summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.alea-inbox-title { font-size: var(--alea-font-size-sm); color: var(--alea-text-muted); }\n.alea-inbox-item[data-unread] .alea-inbox-title { color: var(--alea-text); font-weight: var(--alea-font-weight-semibold); }\n.alea-inbox-summary { color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); }\n.alea-inbox-meta { display: flex; flex-direction: column; align-items: flex-end; gap: var(--alea-space-1); color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); font-variant-numeric: tabular-nums; white-space: nowrap; }\n.alea-inbox-meta svg { width: 14px; height: 14px; }\n\n.alea-health { --tone: var(--alea-text-muted); display: inline-flex; align-items: center; gap: var(--alea-space-1-5); color: var(--alea-text); font-size: var(--alea-font-size-sm); font-weight: var(--alea-font-weight-medium); white-space: nowrap; }\n.alea-health[data-size='sm'] { font-size: var(--alea-font-size-xs); }\n.alea-health svg { width: 14px; height: 14px; flex: none; }\n.alea-health[data-size='sm'] svg { width: 12px; height: 12px; }\n.alea-health circle { fill: var(--tone); stroke: var(--tone); }\n.alea-health[data-health='none'] circle { fill: none; }\n.alea-health path { stroke: var(--alea-bg); }\n.alea-health[data-health='onTrack'] { --tone: var(--alea-status-success); }\n.alea-health[data-health='atRisk'] { --tone: var(--alea-status-warning); }\n.alea-health[data-health='offTrack'] { --tone: var(--alea-status-danger); }\n\n.alea-update { display: flex; flex-direction: column; gap: var(--alea-space-3); padding: var(--alea-space-4) var(--alea-space-5); border-radius: var(--alea-radius-lg); background: var(--alea-surface); box-shadow: inset 0 0 0 1px var(--alea-border); }\n.alea-update-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--alea-space-2) var(--alea-space-3); }\n.alea-update-title { margin: 0; color: var(--alea-text); font: var(--alea-font-weight-semibold) var(--alea-font-size-md) / 1.3 var(--alea-font-family-body); }\n.alea-update-by { display: flex; align-items: center; gap: var(--alea-space-2); margin: 0; color: var(--alea-text-muted); font-size: var(--alea-font-size-xs); }\n.alea-update-author { color: var(--alea-text); font-weight: var(--alea-font-weight-medium); }\n.alea-update-body { color: var(--alea-text); font-size: var(--alea-font-size-sm); line-height: 1.6; }\n.alea-update-body > :first-child { margin-top: 0; }\n.alea-update-body > :last-child { margin-bottom: 0; }\n.alea-update-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--alea-space-2); padding-top: var(--alea-space-3); border-top: 1px solid var(--alea-border); }\n"}],"deps":["display"],"npm":["react-aria-components","lucide-react"],"exports":["UptimeBar","DiffView","StatusIcon","PriorityIcon","DiffStat","IssueList","PropertyList","ActivityFeed","AgentRun","InboxList","ProjectHealth","ProjectUpdate"],"descriptions":{"UptimeBar":"A service's recent history as thin bars, one per day: green, amber when it was slow, red when it was down. Read as one sentence.","DiffView":"What changed between two versions, line by line: removed lines marked − in red, added + in green, the rest as context.","StatusIcon":"The status of a piece of work as a small ring: dashed for backlog, empty for todo, filling for in progress, half for review, checked for done, crossed for canceled.","PriorityIcon":"Priority as signal bars (low, medium, high), a filled square with ! for urgent, and a dash for none.","DiffStat":"Lines added and removed, as +22 −10 and five blocks in proportion. The whole is read as one sentence.","IssueList":"Dense rows of work: status, priority, key, title, labels, due date and who has it. Grouped by status; arrow keys move through each group, Enter opens.","PropertyList":"The properties of an item in a side panel: label on the left, value (often an inline picker) on the right.","ActivityFeed":"What happened to an item, in order: people and agents, changes and comments, with relative times. A list a screen reader reads top to bottom.","AgentRun":"One task given to an agent: what it was asked, how long it worked, what it says it did, the change and the result, with actions to review it. Its status is announced as it changes.","InboxList":"Notifications as a list next to the item they open: unread dots, who did what, a short detail and when. Arrow keys move and open, like a mail list.","ProjectHealth":"How a project is doing, as a colored mark and its words: on track, at risk, off track.","ProjectUpdate":"A written status update: health, who wrote it and when, what changed and what's next."}}},"pro":{"calendar":["CalendarView","Scheduler","scheduleAt"],"chart":["LineChart","AreaChart","BarChart","PieChart","DonutChart","ScatterChart","RadarChart","Sparkline","Gauge","Heatmap","ComboChart","FunnelChart","Treemap","RadialBarChart","WaterfallChart","BulletChart","CalendarHeatmap","smoothPath","stepPath","ChartFrame","useActive","ChartTooltip","useWidth","seriesColor","niceTicks","linear","linePath","fmt"],"datagrid":["DataGrid"],"dnd":["SortableList","KanbanBoard","VirtualList"],"editor":["Markdown","applyMarkdown","MarkdownEditor","sanitizeRichText","RICH_TEXT_BASIC","RICH_TEXT_STANDARD","RichTextEditor"],"effects":["LiquidGlass","GooeyFilter","Gooey","GooeyNav","GooeyMenu","BorderBeam","Spotlight","Tilt","Magnet","Aurora","Grain","Pattern","BlurEdge","ShimmerText","ScrambleText","Typewriter","RotatingText","burst","Burst","Marquee","confetti","LikeButton","CardStack","FlipCard","GradientBorder","RimGlow","Meteors","Sparkles","Ripple","Blob","InteractiveGrid","OrbitingCircles","AnimatedBeam","Dock","Highlighter","ScrollTextReveal","AuroraText","Lens","ImageCompare","ImageReveal","Disintegrate","useEffectsAllowed"],"media":["MediaPlayer"],"work":["RoadmapTimeline","CycleProgress","LogView"]}}