reifyui 0.15.2 → 0.16.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/dist/index.js CHANGED
@@ -1,9 +1,13 @@
1
1
  import {
2
2
  AgentTurnView,
3
+ FileCard,
4
+ FilePreview,
5
+ FileTypeIcon,
6
+ extOf,
3
7
  newTurn,
4
8
  reduceTurn,
5
9
  turnFromMessage
6
- } from "./chunk-SF5QML3U.js";
10
+ } from "./chunk-4SVQGVJH.js";
7
11
  import {
8
12
  createResponsesDispatcher,
9
13
  pumpResponsesStream,
@@ -20,11 +24,11 @@ import {
20
24
  sheetToDelimited
21
25
  } from "./chunk-G34T6ZLN.js";
22
26
  import {
23
- CodeBlock,
24
27
  Modal
25
- } from "./chunk-AGSX5YKH.js";
28
+ } from "./chunk-SPLQ7T6F.js";
26
29
  import {
27
30
  Chevron,
31
+ CodeBlock,
28
32
  IcCheck,
29
33
  IcDoc,
30
34
  IcDownload,
@@ -45,7 +49,7 @@ import {
45
49
  IcTool,
46
50
  IcX,
47
51
  Svg
48
- } from "./chunk-WAND7AYD.js";
52
+ } from "./chunk-QCISEB67.js";
49
53
  import {
50
54
  useOverlayEscape
51
55
  } from "./chunk-J633KV57.js";
@@ -2152,7 +2156,7 @@ function MicrosoftButton({ onCredential, onError, disabled }) {
2152
2156
 
2153
2157
  // src/auth/AuthForm.jsx
2154
2158
  import { Fragment as Fragment7, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
2155
- function AuthForm({ onDone, subtitle: subtitle2, brand = null, productName = "" }) {
2159
+ function AuthForm({ onDone, subtitle, brand = null, productName = "" }) {
2156
2160
  const [mode, setMode] = useState9("signin");
2157
2161
  const [email, setEmail] = useState9("");
2158
2162
  const [password, setPassword] = useState9("");
@@ -2239,7 +2243,7 @@ function AuthForm({ onDone, subtitle: subtitle2, brand = null, productName = ""
2239
2243
  return /* @__PURE__ */ jsxs10("form", { onSubmit: submit, children: [
2240
2244
  /* @__PURE__ */ jsx11("div", { className: "logo", children: brand }),
2241
2245
  /* @__PURE__ */ jsx11("h1", { children: mode === "register" ? "Create your account" : mode === "forgot" ? "Reset password" : "Sign in" }),
2242
- /* @__PURE__ */ jsx11("p", { className: "sub", children: mode === "register" ? "Get started in seconds." : mode === "forgot" ? "We will email you a reset link." : subtitle2 || "Welcome back." }),
2246
+ /* @__PURE__ */ jsx11("p", { className: "sub", children: mode === "register" ? "Get started in seconds." : mode === "forgot" ? "We will email you a reset link." : subtitle || "Welcome back." }),
2243
2247
  mode === "forgot" ? resetSent ? /* @__PURE__ */ jsxs10(Fragment7, { children: [
2244
2248
  /* @__PURE__ */ jsxs10("div", { className: "auth-note", children: [
2245
2249
  "If an account exists for ",
@@ -2319,371 +2323,31 @@ function AuthForm({ onDone, subtitle: subtitle2, brand = null, productName = ""
2319
2323
  ] });
2320
2324
  }
2321
2325
 
2322
- // src/components/FileTypeIcon.jsx
2323
- import { useEffect as useEffect7, useState as useState10 } from "react";
2324
- import { jsx as jsx12 } from "react/jsx-runtime";
2325
- function extOf(name) {
2326
- const m = String(name || "").toLowerCase().match(/\.([a-z0-9]+)$/);
2327
- return m ? m[1] : "";
2328
- }
2329
- var mod = null;
2330
- var tried = false;
2331
- function FileTypeIcon({ name, size = 36 }) {
2332
- const [, force] = useState10(0);
2333
- const ext = extOf(name);
2334
- useEffect7(() => {
2335
- if (tried || mod) return;
2336
- tried = true;
2337
- import("react-file-icon").then((m) => {
2338
- mod = m;
2339
- force((n) => n + 1);
2340
- }).catch(() => {
2341
- });
2342
- }, []);
2343
- const box = { width: size, height: Math.round(size * 1.16), display: "inline-block", flex: "0 0 auto" };
2344
- if (!mod) {
2345
- return /* @__PURE__ */ jsx12("span", { className: "uic-fileglyph", style: box, "aria-hidden": "true", children: /* @__PURE__ */ jsx12("span", { className: "uic-fileglyph-ext", children: (ext || "file").slice(0, 4) }) });
2346
- }
2347
- const { FileIcon, defaultStyles } = mod;
2348
- const style = defaultStyles?.[ext] || {};
2349
- return /* @__PURE__ */ jsx12("span", { style: box, children: /* @__PURE__ */ jsx12(FileIcon, { extension: ext || void 0, ...style }) });
2350
- }
2351
-
2352
- // src/components/FileCard.jsx
2353
- import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
2354
- function subtitle(name, origin, bytes) {
2355
- const parts = [(extOf(name) || "file").toUpperCase()];
2356
- if (origin) parts.push(origin);
2357
- if (bytes != null) parts.push(bytesLabel2(bytes));
2358
- return parts.join(" \xB7 ");
2359
- }
2360
- function bytesLabel2(n) {
2361
- if (n == null) return "";
2362
- if (n < 1024) return `${n} B`;
2363
- if (n < 1048576) return `${Math.round(n / 1024)} KB`;
2364
- return `${(n / 1048576).toFixed(1)} MB`;
2365
- }
2366
- function FileCard({ name, origin = "output", bytes, onPreview, onDownload, className = "" }) {
2367
- const open = onPreview ? (e) => {
2368
- e.stopPropagation();
2369
- onPreview();
2370
- } : void 0;
2371
- return /* @__PURE__ */ jsxs11(
2372
- "div",
2373
- {
2374
- className: "uic-filecard" + (open ? " is-clickable" : "") + (className ? " " + className : ""),
2375
- onClick: open,
2376
- role: open ? "button" : void 0,
2377
- tabIndex: open ? 0 : void 0,
2378
- onKeyDown: open ? (e) => {
2379
- if (e.key === "Enter" || e.key === " ") {
2380
- e.preventDefault();
2381
- open(e);
2382
- }
2383
- } : void 0,
2384
- title: name,
2385
- children: [
2386
- /* @__PURE__ */ jsx13("span", { className: "uic-filecard-ic", children: /* @__PURE__ */ jsx13(FileTypeIcon, { name, size: 32 }) }),
2387
- /* @__PURE__ */ jsxs11("span", { className: "uic-filecard-meta", children: [
2388
- /* @__PURE__ */ jsx13("span", { className: "uic-filecard-name", children: name }),
2389
- /* @__PURE__ */ jsx13("span", { className: "uic-filecard-sub", children: subtitle(name, origin, bytes) })
2390
- ] }),
2391
- onDownload && /* @__PURE__ */ jsx13(
2392
- "button",
2393
- {
2394
- type: "button",
2395
- className: "uic-filecard-dl",
2396
- "aria-label": `Download ${name}`,
2397
- title: "Download",
2398
- onClick: (e) => {
2399
- e.stopPropagation();
2400
- onDownload();
2401
- },
2402
- children: /* @__PURE__ */ jsx13(IcDownload, { size: 18 })
2403
- }
2404
- ),
2405
- onPreview && /* @__PURE__ */ jsx13("button", { type: "button", className: "uic-filecard-open", "aria-label": `Preview ${name}`, onClick: open, children: "Preview" })
2406
- ]
2407
- }
2408
- );
2409
- }
2410
-
2411
- // src/components/FilePreview.jsx
2412
- import { useEffect as useEffect8, useState as useState11 } from "react";
2413
- import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
2414
- var LANG = {
2415
- js: "javascript",
2416
- mjs: "javascript",
2417
- cjs: "javascript",
2418
- jsx: "javascript",
2419
- ts: "typescript",
2420
- tsx: "typescript",
2421
- py: "python",
2422
- rb: "ruby",
2423
- go: "go",
2424
- rs: "rust",
2425
- java: "java",
2426
- c: "c",
2427
- h: "c",
2428
- cpp: "cpp",
2429
- hpp: "cpp",
2430
- cs: "csharp",
2431
- php: "php",
2432
- swift: "swift",
2433
- kt: "kotlin",
2434
- scala: "scala",
2435
- sh: "bash",
2436
- bash: "bash",
2437
- zsh: "bash",
2438
- sql: "sql",
2439
- css: "css",
2440
- scss: "scss",
2441
- less: "less",
2442
- html: "xml",
2443
- htm: "xml",
2444
- xml: "xml",
2445
- svg: "xml",
2446
- json: "json",
2447
- yaml: "yaml",
2448
- yml: "yaml",
2449
- toml: "ini",
2450
- ini: "ini",
2451
- r: "r",
2452
- lua: "lua",
2453
- pl: "perl",
2454
- dockerfile: "dockerfile",
2455
- diff: "diff",
2456
- md: "markdown",
2457
- txt: "plaintext",
2458
- log: "plaintext",
2459
- csv: "plaintext"
2460
- };
2461
- var OFFICE = /* @__PURE__ */ new Set(["pptx", "ppt", "pptm", "odp", "doc", "docx", "odt", "rtf"]);
2462
- var SHEET = /* @__PURE__ */ new Set(["xls", "xlsx", "xlsm", "xlsb", "ods"]);
2463
- function kindOf(name, mime = "") {
2464
- const e = extOf(name);
2465
- if (mime.startsWith("image/") || /^(png|jpe?g|gif|webp|svg|bmp|ico|avif)$/.test(e)) return "image";
2466
- if (mime === "application/pdf" || e === "pdf") return "pdf";
2467
- if (mime.startsWith("video/") || ["mp4", "webm", "mov", "m4v"].includes(e)) return "video";
2468
- if (mime.startsWith("audio/") || ["mp3", "wav", "ogg", "m4a", "flac"].includes(e)) return "audio";
2469
- if (e === "csv" || e === "tsv") return "csv";
2470
- if (e === "md" || e === "markdown") return "markdown";
2471
- if (e === "html" || e === "htm") return "html";
2472
- if (SHEET.has(e)) return "sheet";
2473
- if (OFFICE.has(e)) return "office";
2474
- if (mime.startsWith("text/") || LANG[e] || /^(txt|log|env|conf|cfg|gitignore)$/.test(e)) return "code";
2475
- return "binary";
2476
- }
2477
- function delimitedToRows(text, sep) {
2478
- return text.split(/\r?\n/).filter((l) => l.length).slice(0, 1e3).map((line) => {
2479
- const out = [];
2480
- let cur = "";
2481
- let q = false;
2482
- for (const ch of line) {
2483
- if (ch === '"') q = !q;
2484
- else if (ch === sep && !q) {
2485
- out.push(cur);
2486
- cur = "";
2487
- } else cur += ch;
2488
- }
2489
- out.push(cur);
2490
- return out.map((c) => c.replace(/^"|"$/g, ""));
2491
- });
2492
- }
2493
- function Grid({ rows }) {
2494
- if (!rows?.length) return /* @__PURE__ */ jsx14("div", { className: "uic-fp-empty", children: "This file is empty." });
2495
- const [head, ...body] = rows;
2496
- return /* @__PURE__ */ jsx14("div", { className: "uic-fp-sheet", children: /* @__PURE__ */ jsxs12("table", { children: [
2497
- /* @__PURE__ */ jsx14("thead", { children: /* @__PURE__ */ jsx14("tr", { children: head.map((c, i) => /* @__PURE__ */ jsx14("th", { children: c }, i)) }) }),
2498
- /* @__PURE__ */ jsx14("tbody", { children: body.map((r, i) => /* @__PURE__ */ jsx14("tr", { children: r.map((c, j) => /* @__PURE__ */ jsx14("td", { children: c }, j)) }, i)) })
2499
- ] }) });
2500
- }
2501
- var defaultDownload = (url, name) => {
2502
- const a = document.createElement("a");
2503
- a.href = url;
2504
- a.download = name;
2505
- a.rel = "noreferrer";
2506
- document.body.appendChild(a);
2507
- a.click();
2508
- a.remove();
2509
- };
2510
- function FilePreview({
2511
- file,
2512
- onClose,
2513
- fetchFile,
2514
- officePdfUrl,
2515
- renderMarkdown,
2516
- parseWorkbook,
2517
- onDownload,
2518
- title
2519
- }) {
2520
- const { url, name } = file || {};
2521
- const [st, setSt] = useState11({ kind: "loading" });
2522
- const [tab, setTab] = useState11(0);
2523
- const [view, setView] = useState11("preview");
2524
- useEffect8(() => {
2525
- if (!url) return void 0;
2526
- let alive = true;
2527
- let obj;
2528
- setSt({ kind: "loading" });
2529
- setTab(0);
2530
- setView("preview");
2531
- const get = fetchFile || ((u) => fetch(u, { cache: "no-store" }));
2532
- (async () => {
2533
- const res = await get(url);
2534
- if (!res.ok) throw new Error(`${res.status}`);
2535
- const mime = (res.headers.get("content-type") || "").toLowerCase();
2536
- const kind = kindOf(name, mime);
2537
- if (kind === "office") {
2538
- if (!officePdfUrl) {
2539
- setSt({ kind: "binary", error: "This format has no preview here. Download it to open it." });
2540
- return;
2541
- }
2542
- const r = await get(officePdfUrl(url));
2543
- if (!r.ok) throw new Error(`${r.status}`);
2544
- obj = URL.createObjectURL(await r.blob());
2545
- if (alive) setSt({ kind: "pdf", objUrl: obj });
2546
- return;
2547
- }
2548
- if (kind === "sheet") {
2549
- if (!parseWorkbook) {
2550
- setSt({ kind: "binary", error: "This format has no preview here. Download it to open it." });
2551
- return;
2552
- }
2553
- try {
2554
- const sheets = await parseWorkbook(await res.arrayBuffer());
2555
- const first = sheets.findIndex((s) => s.filled);
2556
- if (alive) {
2557
- setTab(first < 0 ? 0 : first);
2558
- setSt({ kind: "sheet", sheets });
2559
- }
2560
- } catch (e) {
2561
- if (alive) setSt({ kind: "binary", error: `This spreadsheet couldn\u2019t be read (${String(e?.message || "parse failed").slice(0, 80)}).` });
2562
- }
2563
- return;
2564
- }
2565
- if (kind === "csv" || kind === "markdown" || kind === "code" || kind === "html") {
2566
- const text = await res.text();
2567
- if (!alive) return;
2568
- if (kind === "csv") setSt({ kind: "csv", rows: delimitedToRows(text, extOf(name) === "tsv" ? " " : ",") });
2569
- else setSt({ kind, text: text.slice(0, 4e5) });
2570
- return;
2571
- }
2572
- if (kind === "binary") {
2573
- if (alive) setSt({ kind: "binary" });
2574
- return;
2575
- }
2576
- obj = URL.createObjectURL(await res.blob());
2577
- if (alive) setSt({ kind, objUrl: obj });
2578
- })().catch(() => {
2579
- if (alive) setSt({ kind: "binary", error: "Could not load this file." });
2580
- });
2581
- return () => {
2582
- alive = false;
2583
- if (obj) URL.revokeObjectURL(obj);
2584
- };
2585
- }, [url, name, fetchFile, officePdfUrl, parseWorkbook]);
2586
- const download = () => onDownload ? onDownload(url, name) : defaultDownload(url, name);
2587
- return /* @__PURE__ */ jsxs12("aside", { className: "uic-fp", "aria-label": title || `Preview of ${name}`, children: [
2588
- /* @__PURE__ */ jsxs12("header", { className: "uic-fp-head", children: [
2589
- /* @__PURE__ */ jsx14("span", { className: "uic-fp-ic", children: /* @__PURE__ */ jsx14(FileTypeIcon, { name, size: 20 }) }),
2590
- /* @__PURE__ */ jsx14("span", { className: "uic-fp-name", title: name, children: name }),
2591
- st.kind === "html" && /* @__PURE__ */ jsx14("div", { className: "uic-fp-seg", role: "tablist", "aria-label": "Show the page or its source", children: [["preview", "Preview"], ["source", "Source"]].map(([id, label]) => /* @__PURE__ */ jsx14(
2592
- "button",
2593
- {
2594
- type: "button",
2595
- role: "tab",
2596
- "aria-selected": view === id,
2597
- className: "uic-fp-seg-btn" + (view === id ? " is-on" : ""),
2598
- onClick: () => setView(id),
2599
- children: label
2600
- },
2601
- id
2602
- )) }),
2603
- /* @__PURE__ */ jsx14(
2604
- "button",
2605
- {
2606
- type: "button",
2607
- className: "uic-fp-btn",
2608
- "aria-label": `Download ${name}`,
2609
- title: "Download",
2610
- onClick: download,
2611
- children: /* @__PURE__ */ jsx14(IcDownload, {})
2612
- }
2613
- ),
2614
- onClose && /* @__PURE__ */ jsx14(
2615
- "button",
2616
- {
2617
- type: "button",
2618
- className: "uic-fp-btn",
2619
- "aria-label": "Close preview",
2620
- title: "Close",
2621
- onClick: onClose,
2622
- children: /* @__PURE__ */ jsx14(IcX, { size: 18 })
2623
- }
2624
- )
2625
- ] }),
2626
- /* @__PURE__ */ jsxs12("div", { className: "uic-fp-body", children: [
2627
- st.kind === "loading" && /* @__PURE__ */ jsx14("div", { className: "uic-fp-pad", children: /* @__PURE__ */ jsx14("span", { className: "uic-skel uic-fp-skel" }) }),
2628
- st.kind === "image" && st.objUrl && /* @__PURE__ */ jsx14("div", { className: "uic-fp-center", children: /* @__PURE__ */ jsx14("img", { className: "uic-fp-img", src: st.objUrl, alt: name }) }),
2629
- st.kind === "pdf" && st.objUrl && /* @__PURE__ */ jsx14("iframe", { className: "uic-fp-frame", src: st.objUrl, title: name }),
2630
- st.kind === "video" && st.objUrl && /* @__PURE__ */ jsx14("div", { className: "uic-fp-center", children: /* @__PURE__ */ jsx14("video", { className: "uic-fp-media", src: st.objUrl, controls: true }) }),
2631
- st.kind === "audio" && st.objUrl && /* @__PURE__ */ jsx14("div", { className: "uic-fp-center", children: /* @__PURE__ */ jsx14("audio", { src: st.objUrl, controls: true }) }),
2632
- st.kind === "markdown" && /* @__PURE__ */ jsx14("div", { className: "uic-fp-doc", children: renderMarkdown ? renderMarkdown(st.text || "") : /* @__PURE__ */ jsx14("pre", { className: "uic-fp-pre", children: st.text }) }),
2633
- st.kind === "code" && /* @__PURE__ */ jsx14(CodeBlock, { code: st.text || "", language: LANG[extOf(name)] || "plaintext" }),
2634
- st.kind === "html" && view === "source" && /* @__PURE__ */ jsx14(CodeBlock, { code: st.text || "", language: "xml" }),
2635
- st.kind === "html" && view === "preview" && // The page runs in its own origin with scripts only: a mockup's own script and styles
2636
- // work, and nothing in it can read the host page, its cookies or its storage.
2637
- /* @__PURE__ */ jsx14("iframe", { className: "uic-fp-frame", title: name, sandbox: "allow-scripts", srcDoc: st.text || "" }),
2638
- st.kind === "csv" && /* @__PURE__ */ jsx14(Grid, { rows: st.rows }),
2639
- st.kind === "sheet" && st.sheets && /* @__PURE__ */ jsxs12("div", { className: "uic-fp-xlsx", children: [
2640
- st.sheets[tab]?.filled ? /* @__PURE__ */ jsx14(Grid, { rows: st.sheets[tab].rows }) : /* @__PURE__ */ jsx14("div", { className: "uic-fp-empty", children: "This sheet is empty." }),
2641
- /* @__PURE__ */ jsx14("div", { className: "uic-fp-tabs", children: st.sheets.map((s, i) => /* @__PURE__ */ jsx14(
2642
- "button",
2643
- {
2644
- type: "button",
2645
- className: "uic-fp-tab" + (i === tab ? " is-on" : "") + (s.filled ? "" : " is-empty"),
2646
- onClick: () => setTab(i),
2647
- title: s.filled ? s.name : `${s.name} (empty)`,
2648
- children: s.name
2649
- },
2650
- s.name + i
2651
- )) })
2652
- ] }),
2653
- st.kind === "binary" && /* @__PURE__ */ jsx14("div", { className: "uic-fp-center", children: /* @__PURE__ */ jsxs12("div", { className: "uic-fp-fallback", children: [
2654
- /* @__PURE__ */ jsx14(FileTypeIcon, { name, size: 56 }),
2655
- /* @__PURE__ */ jsx14("p", { children: st.error || "No inline preview for this file type." }),
2656
- /* @__PURE__ */ jsx14("button", { type: "button", className: "uic-fp-dl", onClick: download, children: "Download" })
2657
- ] }) })
2658
- ] })
2659
- ] });
2660
- }
2661
-
2662
2326
  // src/components/form.jsx
2663
2327
  import { useId as useId2 } from "react";
2664
- import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
2328
+ import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
2665
2329
  function Field({ label, hint, error, htmlFor, required, children, className = "" }) {
2666
- return /* @__PURE__ */ jsxs13("div", { className: "uic-field" + (error ? " is-error" : "") + (className ? " " + className : ""), children: [
2667
- label && /* @__PURE__ */ jsxs13("label", { className: "uic-field-label", htmlFor, children: [
2330
+ return /* @__PURE__ */ jsxs11("div", { className: "uic-field" + (error ? " is-error" : "") + (className ? " " + className : ""), children: [
2331
+ label && /* @__PURE__ */ jsxs11("label", { className: "uic-field-label", htmlFor, children: [
2668
2332
  label,
2669
- required && /* @__PURE__ */ jsx15("span", { className: "uic-field-req", "aria-hidden": "true", children: "*" })
2333
+ required && /* @__PURE__ */ jsx12("span", { className: "uic-field-req", "aria-hidden": "true", children: "*" })
2670
2334
  ] }),
2671
2335
  children,
2672
- error ? /* @__PURE__ */ jsx15("p", { className: "uic-field-err", children: error }) : hint ? /* @__PURE__ */ jsx15("p", { className: "uic-field-hint", children: hint }) : null
2336
+ error ? /* @__PURE__ */ jsx12("p", { className: "uic-field-err", children: error }) : hint ? /* @__PURE__ */ jsx12("p", { className: "uic-field-hint", children: hint }) : null
2673
2337
  ] });
2674
2338
  }
2675
2339
  function withField(Control) {
2676
2340
  return function Fielded({ label, hint, error, required, id, className, ...rest }) {
2677
2341
  const auto = useId2();
2678
2342
  const inputId = id || auto;
2679
- return /* @__PURE__ */ jsx15(Field, { label, hint, error, required, htmlFor: inputId, className, children: /* @__PURE__ */ jsx15(Control, { id: inputId, invalid: !!error, required, ...rest }) });
2343
+ return /* @__PURE__ */ jsx12(Field, { label, hint, error, required, htmlFor: inputId, className, children: /* @__PURE__ */ jsx12(Control, { id: inputId, invalid: !!error, required, ...rest }) });
2680
2344
  };
2681
2345
  }
2682
2346
  function BareInput({ invalid, ...rest }) {
2683
- return /* @__PURE__ */ jsx15("input", { className: "uic-input" + (invalid ? " is-error" : ""), "aria-invalid": invalid || void 0, ...rest });
2347
+ return /* @__PURE__ */ jsx12("input", { className: "uic-input" + (invalid ? " is-error" : ""), "aria-invalid": invalid || void 0, ...rest });
2684
2348
  }
2685
2349
  function BareTextarea({ invalid, rows = 4, ...rest }) {
2686
- return /* @__PURE__ */ jsx15(
2350
+ return /* @__PURE__ */ jsx12(
2687
2351
  "textarea",
2688
2352
  {
2689
2353
  className: "uic-input uic-textarea" + (invalid ? " is-error" : ""),
@@ -2694,43 +2358,43 @@ function BareTextarea({ invalid, rows = 4, ...rest }) {
2694
2358
  );
2695
2359
  }
2696
2360
  function BareSelect({ invalid, options = [], placeholder, ...rest }) {
2697
- return /* @__PURE__ */ jsxs13("span", { className: "uic-select-wrap", children: [
2698
- /* @__PURE__ */ jsxs13(
2361
+ return /* @__PURE__ */ jsxs11("span", { className: "uic-select-wrap", children: [
2362
+ /* @__PURE__ */ jsxs11(
2699
2363
  "select",
2700
2364
  {
2701
2365
  className: "uic-input uic-select" + (invalid ? " is-error" : ""),
2702
2366
  "aria-invalid": invalid || void 0,
2703
2367
  ...rest,
2704
2368
  children: [
2705
- placeholder && /* @__PURE__ */ jsx15("option", { value: "", children: placeholder }),
2369
+ placeholder && /* @__PURE__ */ jsx12("option", { value: "", children: placeholder }),
2706
2370
  options.map((o) => {
2707
2371
  const opt = typeof o === "string" ? { value: o, label: o } : o;
2708
- return /* @__PURE__ */ jsx15("option", { value: opt.value, disabled: opt.disabled, children: opt.label }, opt.value);
2372
+ return /* @__PURE__ */ jsx12("option", { value: opt.value, disabled: opt.disabled, children: opt.label }, opt.value);
2709
2373
  })
2710
2374
  ]
2711
2375
  }
2712
2376
  ),
2713
- /* @__PURE__ */ jsx15("span", { className: "uic-select-chev", "aria-hidden": "true", children: /* @__PURE__ */ jsx15(Chevron, { dir: "down", size: 14 }) })
2377
+ /* @__PURE__ */ jsx12("span", { className: "uic-select-chev", "aria-hidden": "true", children: /* @__PURE__ */ jsx12(Chevron, { dir: "down", size: 14 }) })
2714
2378
  ] });
2715
2379
  }
2716
2380
  var Input = withField(BareInput);
2717
2381
  var Textarea = withField(BareTextarea);
2718
2382
  var Select = withField(BareSelect);
2719
2383
  function FormActions({ children, align = "end", className = "" }) {
2720
- return /* @__PURE__ */ jsx15("div", { className: `uic-form-actions is-${align}${className ? " " + className : ""}`, children });
2384
+ return /* @__PURE__ */ jsx12("div", { className: `uic-form-actions is-${align}${className ? " " + className : ""}`, children });
2721
2385
  }
2722
2386
  function Button({ variant = "default", size = "md", type = "button", className = "", ...rest }) {
2723
- return /* @__PURE__ */ jsx15("button", { type, className: `uic-btn is-${variant} is-${size}${className ? " " + className : ""}`, ...rest });
2387
+ return /* @__PURE__ */ jsx12("button", { type, className: `uic-btn is-${variant} is-${size}${className ? " " + className : ""}`, ...rest });
2724
2388
  }
2725
2389
 
2726
2390
  // src/components/Carousel.jsx
2727
- import React7, { useCallback as useCallback5, useEffect as useEffect9, useRef as useRef8, useState as useState12 } from "react";
2728
- import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
2391
+ import React7, { useCallback as useCallback5, useEffect as useEffect7, useRef as useRef8, useState as useState10 } from "react";
2392
+ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
2729
2393
  var EDGE = 2;
2730
2394
  function Carousel(props) {
2731
2395
  const { label, step, children, classNames = {} } = props;
2732
2396
  const ref = useRef8(null);
2733
- const [edges, setEdges] = useState12({ start: true, end: true, overflow: false });
2397
+ const [edges, setEdges] = useState10({ start: true, end: true, overflow: false });
2734
2398
  const measure = useCallback5(() => {
2735
2399
  const el = ref.current;
2736
2400
  if (!el) return;
@@ -2741,7 +2405,7 @@ function Carousel(props) {
2741
2405
  end: el.scrollLeft >= el.scrollWidth - el.clientWidth - EDGE
2742
2406
  });
2743
2407
  }, []);
2744
- useEffect9(() => {
2408
+ useEffect7(() => {
2745
2409
  const el = ref.current;
2746
2410
  if (!el) return void 0;
2747
2411
  measure();
@@ -2755,8 +2419,8 @@ function Carousel(props) {
2755
2419
  if (!el) return;
2756
2420
  el.scrollBy({ left: dir * (step || Math.round(el.clientWidth * 0.9)), behavior: "smooth" });
2757
2421
  };
2758
- return /* @__PURE__ */ jsxs14("div", { className: ["uic-carousel-wrap", classNames.root || ""].filter(Boolean).join(" "), children: [
2759
- edges.overflow ? /* @__PURE__ */ jsx16(
2422
+ return /* @__PURE__ */ jsxs12("div", { className: ["uic-carousel-wrap", classNames.root || ""].filter(Boolean).join(" "), children: [
2423
+ edges.overflow ? /* @__PURE__ */ jsx13(
2760
2424
  "button",
2761
2425
  {
2762
2426
  type: "button",
@@ -2764,10 +2428,10 @@ function Carousel(props) {
2764
2428
  onClick: () => scroll(-1),
2765
2429
  disabled: edges.start,
2766
2430
  "aria-label": `Scroll ${label} left`,
2767
- children: /* @__PURE__ */ jsx16(Chevron, { dir: "left" })
2431
+ children: /* @__PURE__ */ jsx13(Chevron, { dir: "left" })
2768
2432
  }
2769
2433
  ) : null,
2770
- /* @__PURE__ */ jsx16(
2434
+ /* @__PURE__ */ jsx13(
2771
2435
  "div",
2772
2436
  {
2773
2437
  className: ["uic-carousel", classNames.viewport || ""].filter(Boolean).join(" "),
@@ -2778,7 +2442,7 @@ function Carousel(props) {
2778
2442
  children
2779
2443
  }
2780
2444
  ),
2781
- edges.overflow ? /* @__PURE__ */ jsx16(
2445
+ edges.overflow ? /* @__PURE__ */ jsx13(
2782
2446
  "button",
2783
2447
  {
2784
2448
  type: "button",
@@ -2786,7 +2450,7 @@ function Carousel(props) {
2786
2450
  onClick: () => scroll(1),
2787
2451
  disabled: edges.end,
2788
2452
  "aria-label": `Scroll ${label} right`,
2789
- children: /* @__PURE__ */ jsx16(Chevron, { dir: "right" })
2453
+ children: /* @__PURE__ */ jsx13(Chevron, { dir: "right" })
2790
2454
  }
2791
2455
  ) : null
2792
2456
  ] });
@@ -2794,34 +2458,34 @@ function Carousel(props) {
2794
2458
 
2795
2459
  // src/components/Card.jsx
2796
2460
  import React8 from "react";
2797
- import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
2461
+ import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
2798
2462
  function Card(props) {
2799
- const { art, title, subtitle: subtitle2, onClick, selected = false, overlay, actions, classNames = {} } = props;
2800
- const foot = /* @__PURE__ */ jsxs15("span", { className: "uic-card-foot", children: [
2801
- /* @__PURE__ */ jsx17("span", { className: "uic-card-name", children: title }),
2802
- subtitle2 ? /* @__PURE__ */ jsx17("span", { className: "uic-card-sub", children: subtitle2 }) : null
2463
+ const { art, title, subtitle, onClick, selected = false, overlay, actions, classNames = {} } = props;
2464
+ const foot = /* @__PURE__ */ jsxs13("span", { className: "uic-card-foot", children: [
2465
+ /* @__PURE__ */ jsx14("span", { className: "uic-card-name", children: title }),
2466
+ subtitle ? /* @__PURE__ */ jsx14("span", { className: "uic-card-sub", children: subtitle }) : null
2803
2467
  ] });
2804
- return /* @__PURE__ */ jsxs15("div", { className: ["uic-card", selected ? "is-selected" : "", classNames.root || ""].filter(Boolean).join(" "), children: [
2805
- onClick ? /* @__PURE__ */ jsxs15("button", { type: "button", className: "uic-card-main", onClick, "aria-pressed": selected || void 0, children: [
2806
- /* @__PURE__ */ jsx17("span", { className: "uic-card-art", children: art }),
2468
+ return /* @__PURE__ */ jsxs13("div", { className: ["uic-card", selected ? "is-selected" : "", classNames.root || ""].filter(Boolean).join(" "), children: [
2469
+ onClick ? /* @__PURE__ */ jsxs13("button", { type: "button", className: "uic-card-main", onClick, "aria-pressed": selected || void 0, children: [
2470
+ /* @__PURE__ */ jsx14("span", { className: "uic-card-art", children: art }),
2807
2471
  foot
2808
- ] }) : /* @__PURE__ */ jsxs15("div", { className: "uic-card-main", children: [
2809
- /* @__PURE__ */ jsx17("span", { className: "uic-card-art", children: art }),
2472
+ ] }) : /* @__PURE__ */ jsxs13("div", { className: "uic-card-main", children: [
2473
+ /* @__PURE__ */ jsx14("span", { className: "uic-card-art", children: art }),
2810
2474
  foot
2811
2475
  ] }),
2812
- overlay ? /* @__PURE__ */ jsx17("div", { className: "uic-card-overlay", children: overlay }) : null,
2813
- actions ? /* @__PURE__ */ jsx17("div", { className: "uic-card-actions", children: actions }) : null
2476
+ overlay ? /* @__PURE__ */ jsx14("div", { className: "uic-card-overlay", children: overlay }) : null,
2477
+ actions ? /* @__PURE__ */ jsx14("div", { className: "uic-card-actions", children: actions }) : null
2814
2478
  ] });
2815
2479
  }
2816
2480
 
2817
2481
  // src/components/SearchField.jsx
2818
2482
  import React9 from "react";
2819
- import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
2483
+ import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
2820
2484
  function SearchField(props) {
2821
2485
  const { value, onChange, placeholder, clearLabel = "Clear search", className } = props;
2822
- return /* @__PURE__ */ jsxs16("label", { className: ["uic-search", className || ""].filter(Boolean).join(" "), children: [
2823
- /* @__PURE__ */ jsx18("span", { className: "uic-search-ic", "aria-hidden": "true", children: /* @__PURE__ */ jsx18(IcSearch, {}) }),
2824
- /* @__PURE__ */ jsx18(
2486
+ return /* @__PURE__ */ jsxs14("label", { className: ["uic-search", className || ""].filter(Boolean).join(" "), children: [
2487
+ /* @__PURE__ */ jsx15("span", { className: "uic-search-ic", "aria-hidden": "true", children: /* @__PURE__ */ jsx15(IcSearch, {}) }),
2488
+ /* @__PURE__ */ jsx15(
2825
2489
  "input",
2826
2490
  {
2827
2491
  type: "search",
@@ -2831,14 +2495,14 @@ function SearchField(props) {
2831
2495
  onChange: (e) => onChange(e.target.value)
2832
2496
  }
2833
2497
  ),
2834
- value ? /* @__PURE__ */ jsx18("button", { type: "button", className: "uic-search-x", "aria-label": clearLabel, onClick: () => onChange(""), children: /* @__PURE__ */ jsx18(IcX, { size: 12 }) }) : null
2498
+ value ? /* @__PURE__ */ jsx15("button", { type: "button", className: "uic-search-x", "aria-label": clearLabel, onClick: () => onChange(""), children: /* @__PURE__ */ jsx15(IcX, { size: 12 }) }) : null
2835
2499
  ] });
2836
2500
  }
2837
2501
 
2838
2502
  // src/components/CascadeMenu.jsx
2839
- import React10, { Fragment as Fragment8, useCallback as useCallback6, useEffect as useEffect10, useMemo as useMemo3, useRef as useRef9, useState as useState13 } from "react";
2840
- import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
2841
- var Tick = () => /* @__PURE__ */ jsx19(Svg, { s: 14, children: /* @__PURE__ */ jsx19("path", { d: "M20 6 9 17l-5-5" }) });
2503
+ import React10, { Fragment as Fragment8, useCallback as useCallback6, useEffect as useEffect8, useMemo as useMemo3, useRef as useRef9, useState as useState11 } from "react";
2504
+ import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
2505
+ var Tick = () => /* @__PURE__ */ jsx16(Svg, { s: 14, children: /* @__PURE__ */ jsx16("path", { d: "M20 6 9 17l-5-5" }) });
2842
2506
  var FILTER_PAST = 8;
2843
2507
  var itemsOf = (groups) => groups.flatMap((g) => g.items);
2844
2508
  function CascadeMenu(props) {
@@ -2863,10 +2527,10 @@ function CascadeMenu(props) {
2863
2527
  value
2864
2528
  } = props;
2865
2529
  const rootRef = useRef9(null);
2866
- const [q, setQ] = useState13("");
2867
- const [activeId, setActiveId] = useState13(null);
2868
- const [stage, setStage] = useState13("items");
2869
- const [stacked, setStacked] = useState13(false);
2530
+ const [q, setQ] = useState11("");
2531
+ const [activeId, setActiveId] = useState11(null);
2532
+ const [stage, setStage] = useState11("items");
2533
+ const [stacked, setStacked] = useState11(false);
2870
2534
  const visible = useMemo3(() => {
2871
2535
  const needle = q.trim().toLowerCase();
2872
2536
  if (!needle) return groups.filter((g) => g.items.length > 0);
@@ -2876,7 +2540,7 @@ function CascadeMenu(props) {
2876
2540
  const active = flat.find((it) => it.id === activeId) || flat[0] || null;
2877
2541
  const options = useMemo3(() => active && optionsOf ? optionsOf(active) : [], [active, optionsOf]);
2878
2542
  const showFilter = filter === true || filter === "auto" && itemsOf(groups).length > FILTER_PAST;
2879
- useEffect10(() => {
2543
+ useEffect8(() => {
2880
2544
  if (!open) return void 0;
2881
2545
  setQ("");
2882
2546
  setActiveId(value?.item ?? null);
@@ -2942,7 +2606,7 @@ function CascadeMenu(props) {
2942
2606
  };
2943
2607
  const showItems = !stacked || stage === "items";
2944
2608
  const showOptions = !stacked || stage === "options";
2945
- return /* @__PURE__ */ jsx19(
2609
+ return /* @__PURE__ */ jsx16(
2946
2610
  Popover,
2947
2611
  {
2948
2612
  open,
@@ -2952,15 +2616,15 @@ function CascadeMenu(props) {
2952
2616
  width: stacked ? 320 : width,
2953
2617
  minHeight: 260,
2954
2618
  className: ["uic-cascade-pop", className || ""].filter(Boolean).join(" "),
2955
- children: /* @__PURE__ */ jsxs17("div", { ref: rootRef, className: "uic-cascade" + (stacked ? " is-stacked" : ""), onKeyDown: onKey, children: [
2956
- showItems && /* @__PURE__ */ jsxs17("div", { className: "uic-cascade-col uic-cascade-items", children: [
2957
- showFilter ? /* @__PURE__ */ jsx19(SearchField, { className: "uic-cascade-filter", value: q, onChange: setQ, placeholder: filterPlaceholder }) : null,
2958
- /* @__PURE__ */ jsxs17("div", { className: "uic-pop-list", children: [
2959
- visible.map((g, gi) => /* @__PURE__ */ jsxs17(Fragment8, { children: [
2960
- g.label ? /* @__PURE__ */ jsx19("div", { className: "uic-cascade-group", children: g.label }) : null,
2619
+ children: /* @__PURE__ */ jsxs15("div", { ref: rootRef, className: "uic-cascade" + (stacked ? " is-stacked" : ""), onKeyDown: onKey, children: [
2620
+ showItems && /* @__PURE__ */ jsxs15("div", { className: "uic-cascade-col uic-cascade-items", children: [
2621
+ showFilter ? /* @__PURE__ */ jsx16(SearchField, { className: "uic-cascade-filter", value: q, onChange: setQ, placeholder: filterPlaceholder }) : null,
2622
+ /* @__PURE__ */ jsxs15("div", { className: "uic-pop-list", children: [
2623
+ visible.map((g, gi) => /* @__PURE__ */ jsxs15(Fragment8, { children: [
2624
+ g.label ? /* @__PURE__ */ jsx16("div", { className: "uic-cascade-group", children: g.label }) : null,
2961
2625
  g.items.map((it) => {
2962
2626
  const on = active?.id === it.id;
2963
- return /* @__PURE__ */ jsxs17(
2627
+ return /* @__PURE__ */ jsxs15(
2964
2628
  "button",
2965
2629
  {
2966
2630
  type: "button",
@@ -2973,22 +2637,22 @@ function CascadeMenu(props) {
2973
2637
  enterOptions();
2974
2638
  },
2975
2639
  children: [
2976
- it.icon ? /* @__PURE__ */ jsx19("span", { className: "uic-cascade-ic", "aria-hidden": "true", children: it.icon }) : null,
2977
- /* @__PURE__ */ jsx19("span", { className: "uic-chip-t", children: it.label }),
2978
- it.note ? /* @__PURE__ */ jsx19("span", { className: "uic-cascade-note", children: it.note }) : null,
2979
- /* @__PURE__ */ jsx19("span", { className: "uic-cascade-chev", "aria-hidden": "true", children: /* @__PURE__ */ jsx19(Chevron, { dir: "right", size: 14 }) })
2640
+ it.icon ? /* @__PURE__ */ jsx16("span", { className: "uic-cascade-ic", "aria-hidden": "true", children: it.icon }) : null,
2641
+ /* @__PURE__ */ jsx16("span", { className: "uic-chip-t", children: it.label }),
2642
+ it.note ? /* @__PURE__ */ jsx16("span", { className: "uic-cascade-note", children: it.note }) : null,
2643
+ /* @__PURE__ */ jsx16("span", { className: "uic-cascade-chev", "aria-hidden": "true", children: /* @__PURE__ */ jsx16(Chevron, { dir: "right", size: 14 }) })
2980
2644
  ]
2981
2645
  },
2982
2646
  it.id
2983
2647
  );
2984
2648
  })
2985
2649
  ] }, g.label || gi)),
2986
- flat.length === 0 ? /* @__PURE__ */ jsx19("div", { className: "uic-pop-note", children: emptyText }) : null
2650
+ flat.length === 0 ? /* @__PURE__ */ jsx16("div", { className: "uic-pop-note", children: emptyText }) : null
2987
2651
  ] })
2988
2652
  ] }),
2989
- showOptions && /* @__PURE__ */ jsxs17("div", { className: "uic-cascade-col uic-cascade-options", role: "group", "aria-label": optionsLabel, children: [
2990
- /* @__PURE__ */ jsxs17("div", { className: "uic-cascade-head", children: [
2991
- stacked ? /* @__PURE__ */ jsx19(
2653
+ showOptions && /* @__PURE__ */ jsxs15("div", { className: "uic-cascade-col uic-cascade-options", role: "group", "aria-label": optionsLabel, children: [
2654
+ /* @__PURE__ */ jsxs15("div", { className: "uic-cascade-head", children: [
2655
+ stacked ? /* @__PURE__ */ jsx16(
2992
2656
  "button",
2993
2657
  {
2994
2658
  type: "button",
@@ -2998,16 +2662,16 @@ function CascadeMenu(props) {
2998
2662
  setStage("items");
2999
2663
  requestAnimationFrame(() => focusIn("items", flat.indexOf(active)));
3000
2664
  },
3001
- children: /* @__PURE__ */ jsx19(Chevron, { dir: "left", size: 14 })
2665
+ children: /* @__PURE__ */ jsx16(Chevron, { dir: "left", size: 14 })
3002
2666
  }
3003
2667
  ) : null,
3004
- active?.icon ? /* @__PURE__ */ jsx19("span", { className: "uic-cascade-ic", "aria-hidden": "true", children: active.icon }) : null,
3005
- /* @__PURE__ */ jsx19("span", { className: "uic-chip-t", children: active ? active.label : "" })
2668
+ active?.icon ? /* @__PURE__ */ jsx16("span", { className: "uic-cascade-ic", "aria-hidden": "true", children: active.icon }) : null,
2669
+ /* @__PURE__ */ jsx16("span", { className: "uic-chip-t", children: active ? active.label : "" })
3006
2670
  ] }),
3007
- /* @__PURE__ */ jsxs17("div", { className: "uic-pop-list", children: [
2671
+ /* @__PURE__ */ jsxs15("div", { className: "uic-pop-list", children: [
3008
2672
  options.map((o) => {
3009
2673
  const on = !!value && active?.id === value.item && o.id === value.option;
3010
- return /* @__PURE__ */ jsxs17(
2674
+ return /* @__PURE__ */ jsxs15(
3011
2675
  "button",
3012
2676
  {
3013
2677
  type: "button",
@@ -3016,16 +2680,16 @@ function CascadeMenu(props) {
3016
2680
  disabled: !!o.disabled,
3017
2681
  onClick: () => onPick?.(active, o),
3018
2682
  children: [
3019
- value ? /* @__PURE__ */ jsx19("span", { className: "uic-pop-check", "aria-hidden": "true", children: on ? /* @__PURE__ */ jsx19(Tick, {}) : null }) : null,
3020
- /* @__PURE__ */ jsx19("span", { className: "uic-chip-t", children: o.label }),
3021
- o.note ? /* @__PURE__ */ jsx19("span", { className: "uic-cascade-note", children: o.note }) : null,
2683
+ value ? /* @__PURE__ */ jsx16("span", { className: "uic-pop-check", "aria-hidden": "true", children: on ? /* @__PURE__ */ jsx16(Tick, {}) : null }) : null,
2684
+ /* @__PURE__ */ jsx16("span", { className: "uic-chip-t", children: o.label }),
2685
+ o.note ? /* @__PURE__ */ jsx16("span", { className: "uic-cascade-note", children: o.note }) : null,
3022
2686
  o.badge || null
3023
2687
  ]
3024
2688
  },
3025
2689
  o.id
3026
2690
  );
3027
2691
  }),
3028
- active && options.length === 0 ? /* @__PURE__ */ jsx19("div", { className: "uic-pop-note", children: noOptionsText }) : null
2692
+ active && options.length === 0 ? /* @__PURE__ */ jsx16("div", { className: "uic-pop-note", children: noOptionsText }) : null
3029
2693
  ] }),
3030
2694
  optionsFooter || null
3031
2695
  ] })
@@ -3035,15 +2699,15 @@ function CascadeMenu(props) {
3035
2699
  }
3036
2700
 
3037
2701
  // src/hooks/useTypewriter.js
3038
- import { useEffect as useEffect11, useRef as useRef10, useState as useState14 } from "react";
2702
+ import { useEffect as useEffect9, useRef as useRef10, useState as useState12 } from "react";
3039
2703
  var CHAR_MS = 26;
3040
2704
  var HOLD_MS = 2600;
3041
2705
  function useTypewriter(phrases, { active = true } = {}) {
3042
2706
  const list = phrases && phrases.length ? phrases : [""];
3043
- const [text, setText] = useState14(list[0]);
2707
+ const [text, setText] = useState12(list[0]);
3044
2708
  const listRef = useRef10(list);
3045
2709
  listRef.current = list;
3046
- useEffect11(() => {
2710
+ useEffect9(() => {
3047
2711
  if (!active) return void 0;
3048
2712
  if (typeof window === "undefined") return void 0;
3049
2713
  if (window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches) {
@@ -3074,7 +2738,7 @@ function useTypewriter(phrases, { active = true } = {}) {
3074
2738
  }
3075
2739
 
3076
2740
  // src/components/Panel.jsx
3077
- import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
2741
+ import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
3078
2742
  function Panel(props) {
3079
2743
  const {
3080
2744
  title,
@@ -3096,43 +2760,43 @@ function Panel(props) {
3096
2760
  classNames = {},
3097
2761
  children
3098
2762
  } = props;
3099
- const body = loading ? /* @__PURE__ */ jsxs18("div", { className: "uic-panel-load", children: [
3100
- /* @__PURE__ */ jsx20("span", { className: "uic-panel-load-bar" }),
3101
- /* @__PURE__ */ jsx20("span", { className: "uic-panel-load-bar" }),
3102
- /* @__PURE__ */ jsx20("span", { className: "uic-panel-load-bar" }),
3103
- /* @__PURE__ */ jsx20("span", { className: "uic-sr", children: loadingLabel })
3104
- ] }) : error ? /* @__PURE__ */ jsxs18("div", { className: "uic-panel-fail", children: [
3105
- /* @__PURE__ */ jsx20("p", { className: "uic-panel-fail-t", children: errorTitle }),
3106
- /* @__PURE__ */ jsx20("pre", { className: "uic-panel-fail-m", children: error }),
3107
- errorDetail ? /* @__PURE__ */ jsxs18("details", { className: "uic-panel-fail-d", children: [
3108
- /* @__PURE__ */ jsx20("summary", { children: detailLabel }),
3109
- /* @__PURE__ */ jsx20("div", { className: "uic-panel-fail-dd", children: errorDetail })
2763
+ const body = loading ? /* @__PURE__ */ jsxs16("div", { className: "uic-panel-load", children: [
2764
+ /* @__PURE__ */ jsx17("span", { className: "uic-panel-load-bar" }),
2765
+ /* @__PURE__ */ jsx17("span", { className: "uic-panel-load-bar" }),
2766
+ /* @__PURE__ */ jsx17("span", { className: "uic-panel-load-bar" }),
2767
+ /* @__PURE__ */ jsx17("span", { className: "uic-sr", children: loadingLabel })
2768
+ ] }) : error ? /* @__PURE__ */ jsxs16("div", { className: "uic-panel-fail", children: [
2769
+ /* @__PURE__ */ jsx17("p", { className: "uic-panel-fail-t", children: errorTitle }),
2770
+ /* @__PURE__ */ jsx17("pre", { className: "uic-panel-fail-m", children: error }),
2771
+ errorDetail ? /* @__PURE__ */ jsxs16("details", { className: "uic-panel-fail-d", children: [
2772
+ /* @__PURE__ */ jsx17("summary", { children: detailLabel }),
2773
+ /* @__PURE__ */ jsx17("div", { className: "uic-panel-fail-dd", children: errorDetail })
3110
2774
  ] }) : null,
3111
- onRetry ? /* @__PURE__ */ jsx20("div", { className: "uic-panel-fail-act", children: /* @__PURE__ */ jsx20(Button, { size: "sm", onClick: onRetry, children: retryLabel }) }) : null
2775
+ onRetry ? /* @__PURE__ */ jsx17("div", { className: "uic-panel-fail-act", children: /* @__PURE__ */ jsx17(Button, { size: "sm", onClick: onRetry, children: retryLabel }) }) : null
3112
2776
  ] }) : children;
3113
- return /* @__PURE__ */ jsxs18(
2777
+ return /* @__PURE__ */ jsxs16(
3114
2778
  "section",
3115
2779
  {
3116
2780
  className: ["uic-panel", className, classNames.root || ""].filter(Boolean).join(" "),
3117
2781
  "aria-busy": loading || busy || void 0,
3118
2782
  children: [
3119
- /* @__PURE__ */ jsxs18("header", { className: ["uic-panel-head", classNames.head || ""].filter(Boolean).join(" "), children: [
3120
- /* @__PURE__ */ jsxs18("div", { className: "uic-panel-titles", children: [
3121
- title ? /* @__PURE__ */ jsx20(Heading, { className: "uic-panel-title", children: title }) : null,
3122
- meta ? /* @__PURE__ */ jsx20("p", { className: "uic-panel-meta", children: meta }) : null
2783
+ /* @__PURE__ */ jsxs16("header", { className: ["uic-panel-head", classNames.head || ""].filter(Boolean).join(" "), children: [
2784
+ /* @__PURE__ */ jsxs16("div", { className: "uic-panel-titles", children: [
2785
+ title ? /* @__PURE__ */ jsx17(Heading, { className: "uic-panel-title", children: title }) : null,
2786
+ meta ? /* @__PURE__ */ jsx17("p", { className: "uic-panel-meta", children: meta }) : null
3123
2787
  ] }),
3124
- actions ? /* @__PURE__ */ jsx20("div", { className: "uic-panel-acts", children: actions }) : null
2788
+ actions ? /* @__PURE__ */ jsx17("div", { className: "uic-panel-acts", children: actions }) : null
3125
2789
  ] }),
3126
- busy ? /* @__PURE__ */ jsx20("div", { className: "uic-panel-busy", role: "status", "aria-label": busyLabel }) : null,
3127
- /* @__PURE__ */ jsx20("div", { className: ["uic-panel-body", classNames.body || ""].filter(Boolean).join(" "), children: body }),
3128
- footer ? /* @__PURE__ */ jsx20("footer", { className: "uic-panel-foot", children: footer }) : null
2790
+ busy ? /* @__PURE__ */ jsx17("div", { className: "uic-panel-busy", role: "status", "aria-label": busyLabel }) : null,
2791
+ /* @__PURE__ */ jsx17("div", { className: ["uic-panel-body", classNames.body || ""].filter(Boolean).join(" "), children: body }),
2792
+ footer ? /* @__PURE__ */ jsx17("footer", { className: "uic-panel-foot", children: footer }) : null
3129
2793
  ]
3130
2794
  }
3131
2795
  );
3132
2796
  }
3133
2797
 
3134
2798
  // src/grid/PanelGrid.jsx
3135
- import React11, { useCallback as useCallback7, useEffect as useEffect12, useLayoutEffect, useMemo as useMemo4, useRef as useRef11, useState as useState15 } from "react";
2799
+ import React11, { useCallback as useCallback7, useEffect as useEffect10, useLayoutEffect, useMemo as useMemo4, useRef as useRef11, useState as useState13 } from "react";
3136
2800
 
3137
2801
  // src/grid/layout.js
3138
2802
  function sortLayout(layout2) {
@@ -3205,10 +2869,10 @@ function sameLayout(a, b) {
3205
2869
  }
3206
2870
 
3207
2871
  // src/grid/PanelGrid.jsx
3208
- import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
2872
+ import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
3209
2873
  function useMeasuredWidth() {
3210
2874
  const ref = useRef11(null);
3211
- const [width, setWidth] = useState15(0);
2875
+ const [width, setWidth] = useState13(0);
3212
2876
  useLayoutEffect(() => {
3213
2877
  const el = ref.current;
3214
2878
  if (!el) return void 0;
@@ -3236,7 +2900,7 @@ function PanelGrid(props) {
3236
2900
  className = ""
3237
2901
  } = props;
3238
2902
  const [wrapRef, width] = useMeasuredWidth();
3239
- const [drag, setDrag] = useState15(null);
2903
+ const [drag, setDrag] = useState13(null);
3240
2904
  const dragRef = useRef11(null);
3241
2905
  const swallowClick = useRef11(false);
3242
2906
  const stacked = width > 0 && width < stackAt;
@@ -3262,7 +2926,7 @@ function PanelGrid(props) {
3262
2926
  if (onLayoutChange && !sameLayout(next, layout2)) onLayoutChange(next);
3263
2927
  }, [onLayoutChange, layout2]);
3264
2928
  const detach = useRef11(null);
3265
- useEffect12(() => () => detach.current?.(), []);
2929
+ useEffect10(() => () => detach.current?.(), []);
3266
2930
  const start = (id, mode) => (e) => {
3267
2931
  if (!arrangeable || e.button !== 0) return;
3268
2932
  const item = layout2.find((it) => it.i === id);
@@ -3327,7 +2991,7 @@ function PanelGrid(props) {
3327
2991
  const byId = new Map(live.map((it) => [it.i, it]));
3328
2992
  const ghost = drag && drag.mode === "move" && byId.has(drag.id) ? boxOf(byId.get(drag.id)) : null;
3329
2993
  const cls = ["uic-pg", arrangeable ? "is-editable" : "", stacked ? "is-stacked" : "", className].filter(Boolean).join(" ");
3330
- return /* @__PURE__ */ jsxs19(
2994
+ return /* @__PURE__ */ jsxs17(
3331
2995
  "div",
3332
2996
  {
3333
2997
  ref: wrapRef,
@@ -3338,7 +3002,7 @@ function PanelGrid(props) {
3338
3002
  swallowClick.current = false;
3339
3003
  },
3340
3004
  children: [
3341
- ghost ? /* @__PURE__ */ jsx21("div", { className: "uic-pg-ghost", "aria-hidden": "true", style: ghost }) : null,
3005
+ ghost ? /* @__PURE__ */ jsx18("div", { className: "uic-pg-ghost", "aria-hidden": "true", style: ghost }) : null,
3342
3006
  width > 0 && React11.Children.map(children, (child) => {
3343
3007
  if (!React11.isValidElement(child) || child.key == null) return null;
3344
3008
  const id = String(child.key).replace(/^\.\$/, "");
@@ -3346,7 +3010,7 @@ function PanelGrid(props) {
3346
3010
  if (!it) return null;
3347
3011
  const moving = drag && drag.id === id;
3348
3012
  const offset = moving && drag.mode === "move" ? { transform: `translate(${drag.dx}px, ${drag.dy}px)` } : null;
3349
- return /* @__PURE__ */ jsxs19(
3013
+ return /* @__PURE__ */ jsxs17(
3350
3014
  "div",
3351
3015
  {
3352
3016
  className: "uic-pg-item" + (moving ? " is-moving" : ""),
@@ -3354,7 +3018,7 @@ function PanelGrid(props) {
3354
3018
  onPointerDown: arrangeable ? start(id, "move") : void 0,
3355
3019
  children: [
3356
3020
  child,
3357
- arrangeable && !it.static ? /* @__PURE__ */ jsx21(
3021
+ arrangeable && !it.static ? /* @__PURE__ */ jsx18(
3358
3022
  "button",
3359
3023
  {
3360
3024
  type: "button",
@@ -3362,7 +3026,7 @@ function PanelGrid(props) {
3362
3026
  "aria-label": resizeLabel ? resizeLabel(id) : "Resize panel. Arrow keys resize it; shift with arrow keys moves it past its neighbours.",
3363
3027
  onPointerDown: start(id, "resize"),
3364
3028
  onKeyDown: onHandleKey(id),
3365
- children: /* @__PURE__ */ jsx21("svg", { width: "10", height: "10", viewBox: "0 0 10 10", "aria-hidden": "true", children: /* @__PURE__ */ jsx21("path", { d: "M9 1v8H1", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round" }) })
3029
+ children: /* @__PURE__ */ jsx18("svg", { width: "10", height: "10", viewBox: "0 0 10 10", "aria-hidden": "true", children: /* @__PURE__ */ jsx18("path", { d: "M9 1v8H1", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round" }) })
3366
3030
  }
3367
3031
  ) : null
3368
3032
  ]
@@ -3379,8 +3043,8 @@ function packLayout(layout2, cols = 12) {
3379
3043
  }
3380
3044
 
3381
3045
  // src/timeline/Timeline.jsx
3382
- import { useCallback as useCallback8, useEffect as useEffect13, useLayoutEffect as useLayoutEffect2, useMemo as useMemo5, useRef as useRef12, useState as useState16 } from "react";
3383
- import { Fragment as Fragment9, jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
3046
+ import { useCallback as useCallback8, useEffect as useEffect11, useLayoutEffect as useLayoutEffect2, useMemo as useMemo5, useRef as useRef12, useState as useState14 } from "react";
3047
+ import { Fragment as Fragment9, jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
3384
3048
  var TL_MIN_PPS = 4;
3385
3049
  var TL_MAX_PPS = 400;
3386
3050
  var TL_DEFAULT_PPS = 26;
@@ -3471,18 +3135,18 @@ function Timeline({
3471
3135
  }) {
3472
3136
  const scroller = useRef12(null);
3473
3137
  const innerRef = useRef12(null);
3474
- const [pps, setPps] = useState16(() => {
3138
+ const [pps, setPps] = useState14(() => {
3475
3139
  if (zoomStorageKey && typeof window !== "undefined") {
3476
3140
  const n = parseFloat(window.localStorage.getItem(zoomStorageKey) || "");
3477
3141
  if (Number.isFinite(n)) return clamp(n, TL_MIN_PPS, TL_MAX_PPS);
3478
3142
  }
3479
3143
  return TL_DEFAULT_PPS;
3480
3144
  });
3481
- const [snapping, setSnapping] = useState16(() => snapStorageKey && typeof window !== "undefined" ? window.localStorage.getItem(snapStorageKey) !== "0" : true);
3145
+ const [snapping, setSnapping] = useState14(() => snapStorageKey && typeof window !== "undefined" ? window.localStorage.getItem(snapStorageKey) !== "0" : true);
3482
3146
  const gesture = useRef12(null);
3483
- const [drag, setDrag] = useState16(null);
3147
+ const [drag, setDrag] = useState14(null);
3484
3148
  const anchor = useRef12(null);
3485
- const [dropAt, setDropAt] = useState16(null);
3149
+ const [dropAt, setDropAt] = useState14(null);
3486
3150
  const rows = useMemo5(
3487
3151
  () => tracks.map((t) => ({
3488
3152
  ...t,
@@ -3552,7 +3216,7 @@ function Timeline({
3552
3216
  anchor.current = null;
3553
3217
  scroller.current.scrollLeft = Math.max(0, TL_HEAD_W + a.t * pps - a.vx);
3554
3218
  }, [pps]);
3555
- useEffect13(() => {
3219
+ useEffect11(() => {
3556
3220
  const el = scroller.current;
3557
3221
  if (!el) return void 0;
3558
3222
  const onWheel = (e) => {
@@ -3663,9 +3327,9 @@ function Timeline({
3663
3327
  const laneW = Math.max(contentSeconds * pps + 140, 320);
3664
3328
  const ticks = [];
3665
3329
  for (let t = 0; t <= contentSeconds + major; t += major) ticks.push(t);
3666
- return /* @__PURE__ */ jsxs20("div", { className: `rui-tl ${className}`, onKeyDown, tabIndex: 0, children: [
3667
- /* @__PURE__ */ jsxs20("div", { className: "rui-tl-bar", children: [
3668
- onSplit && /* @__PURE__ */ jsxs20(
3330
+ return /* @__PURE__ */ jsxs18("div", { className: `rui-tl ${className}`, onKeyDown, tabIndex: 0, children: [
3331
+ /* @__PURE__ */ jsxs18("div", { className: "rui-tl-bar", children: [
3332
+ onSplit && /* @__PURE__ */ jsxs18(
3669
3333
  "button",
3670
3334
  {
3671
3335
  type: "button",
@@ -3674,7 +3338,7 @@ function Timeline({
3674
3338
  disabled: !splitTarget,
3675
3339
  title: splitTarget ? "Split at the playhead (B)" : "Move the playhead inside a clip to split it",
3676
3340
  children: [
3677
- /* @__PURE__ */ jsxs20(
3341
+ /* @__PURE__ */ jsxs18(
3678
3342
  "svg",
3679
3343
  {
3680
3344
  width: "13",
@@ -3686,19 +3350,19 @@ function Timeline({
3686
3350
  strokeLinecap: "round",
3687
3351
  "aria-hidden": "true",
3688
3352
  children: [
3689
- /* @__PURE__ */ jsx22("circle", { cx: "6", cy: "6", r: "3" }),
3690
- /* @__PURE__ */ jsx22("circle", { cx: "6", cy: "18", r: "3" }),
3691
- /* @__PURE__ */ jsx22("line", { x1: "20", y1: "4", x2: "8.12", y2: "15.88" }),
3692
- /* @__PURE__ */ jsx22("line", { x1: "14.47", y1: "14.48", x2: "20", y2: "20" }),
3693
- /* @__PURE__ */ jsx22("line", { x1: "8.12", y1: "8.12", x2: "12", y2: "12" })
3353
+ /* @__PURE__ */ jsx19("circle", { cx: "6", cy: "6", r: "3" }),
3354
+ /* @__PURE__ */ jsx19("circle", { cx: "6", cy: "18", r: "3" }),
3355
+ /* @__PURE__ */ jsx19("line", { x1: "20", y1: "4", x2: "8.12", y2: "15.88" }),
3356
+ /* @__PURE__ */ jsx19("line", { x1: "14.47", y1: "14.48", x2: "20", y2: "20" }),
3357
+ /* @__PURE__ */ jsx19("line", { x1: "8.12", y1: "8.12", x2: "12", y2: "12" })
3694
3358
  ]
3695
3359
  }
3696
3360
  ),
3697
- /* @__PURE__ */ jsx22("span", { children: "Split" })
3361
+ /* @__PURE__ */ jsx19("span", { children: "Split" })
3698
3362
  ]
3699
3363
  }
3700
3364
  ),
3701
- onDeleteClip && /* @__PURE__ */ jsx22(
3365
+ onDeleteClip && /* @__PURE__ */ jsx19(
3702
3366
  "button",
3703
3367
  {
3704
3368
  type: "button",
@@ -3709,7 +3373,7 @@ function Timeline({
3709
3373
  children: "Remove"
3710
3374
  }
3711
3375
  ),
3712
- /* @__PURE__ */ jsx22(
3376
+ /* @__PURE__ */ jsx19(
3713
3377
  "button",
3714
3378
  {
3715
3379
  type: "button",
@@ -3720,9 +3384,9 @@ function Timeline({
3720
3384
  children: "Snap"
3721
3385
  }
3722
3386
  ),
3723
- /* @__PURE__ */ jsx22("span", { className: "rui-tl-time", "aria-label": "Playhead position", children: exactLabel(currentTime) }),
3724
- /* @__PURE__ */ jsx22("span", { className: "rui-tl-spacer" }),
3725
- /* @__PURE__ */ jsx22(
3387
+ /* @__PURE__ */ jsx19("span", { className: "rui-tl-time", "aria-label": "Playhead position", children: exactLabel(currentTime) }),
3388
+ /* @__PURE__ */ jsx19("span", { className: "rui-tl-spacer" }),
3389
+ /* @__PURE__ */ jsx19(
3726
3390
  "button",
3727
3391
  {
3728
3392
  type: "button",
@@ -3734,7 +3398,7 @@ function Timeline({
3734
3398
  children: "\u2212"
3735
3399
  }
3736
3400
  ),
3737
- /* @__PURE__ */ jsx22(
3401
+ /* @__PURE__ */ jsx19(
3738
3402
  "button",
3739
3403
  {
3740
3404
  type: "button",
@@ -3746,7 +3410,7 @@ function Timeline({
3746
3410
  children: "+"
3747
3411
  }
3748
3412
  ),
3749
- /* @__PURE__ */ jsx22(
3413
+ /* @__PURE__ */ jsx19(
3750
3414
  "button",
3751
3415
  {
3752
3416
  type: "button",
@@ -3758,10 +3422,10 @@ function Timeline({
3758
3422
  }
3759
3423
  )
3760
3424
  ] }),
3761
- /* @__PURE__ */ jsx22("div", { className: "rui-tl-scroll", ref: scroller, children: /* @__PURE__ */ jsxs20("div", { className: "rui-tl-inner", ref: innerRef, style: { width: TL_HEAD_W + laneW }, children: [
3762
- /* @__PURE__ */ jsxs20("div", { className: "rui-tl-row rui-tl-rulerrow", children: [
3763
- /* @__PURE__ */ jsx22("div", { className: "rui-tl-head rui-tl-rulerhead", "aria-hidden": "true" }),
3764
- /* @__PURE__ */ jsx22(
3425
+ /* @__PURE__ */ jsx19("div", { className: "rui-tl-scroll", ref: scroller, children: /* @__PURE__ */ jsxs18("div", { className: "rui-tl-inner", ref: innerRef, style: { width: TL_HEAD_W + laneW }, children: [
3426
+ /* @__PURE__ */ jsxs18("div", { className: "rui-tl-row rui-tl-rulerrow", children: [
3427
+ /* @__PURE__ */ jsx19("div", { className: "rui-tl-head rui-tl-rulerhead", "aria-hidden": "true" }),
3428
+ /* @__PURE__ */ jsx19(
3765
3429
  "div",
3766
3430
  {
3767
3431
  className: "rui-tl-ruler",
@@ -3790,17 +3454,17 @@ function Timeline({
3790
3454
  onSeek(currentTime + step);
3791
3455
  }
3792
3456
  } : void 0,
3793
- children: ticks.map((t) => /* @__PURE__ */ jsx22("span", { className: "rui-tl-ticklbl", style: { left: t * pps }, children: tickLabel(t, major) }, t))
3457
+ children: ticks.map((t) => /* @__PURE__ */ jsx19("span", { className: "rui-tl-ticklbl", style: { left: t * pps }, children: tickLabel(t, major) }, t))
3794
3458
  }
3795
3459
  )
3796
3460
  ] }),
3797
- rows.length === 0 && /* @__PURE__ */ jsx22("p", { className: "rui-tl-empty", children: emptyLabel }),
3798
- rows.map((track) => /* @__PURE__ */ jsxs20("div", { className: "rui-tl-row", children: [
3799
- /* @__PURE__ */ jsxs20("div", { className: "rui-tl-head", title: track.title || track.label, children: [
3461
+ rows.length === 0 && /* @__PURE__ */ jsx19("p", { className: "rui-tl-empty", children: emptyLabel }),
3462
+ rows.map((track) => /* @__PURE__ */ jsxs18("div", { className: "rui-tl-row", children: [
3463
+ /* @__PURE__ */ jsxs18("div", { className: "rui-tl-head", title: track.title || track.label, children: [
3800
3464
  track.icon,
3801
- /* @__PURE__ */ jsx22("span", { className: "rui-tl-headlbl", children: track.label })
3465
+ /* @__PURE__ */ jsx19("span", { className: "rui-tl-headlbl", children: track.label })
3802
3466
  ] }),
3803
- /* @__PURE__ */ jsxs20(
3467
+ /* @__PURE__ */ jsxs18(
3804
3468
  "div",
3805
3469
  {
3806
3470
  className: "rui-tl-lane" + (dropAt?.trackId === track.id ? " is-dropping" : ""),
@@ -3831,8 +3495,8 @@ function Timeline({
3831
3495
  onDropClip(payload, { trackId: track.id, seconds: t, index });
3832
3496
  } : void 0,
3833
3497
  children: [
3834
- track.laid.length === 0 && track.emptyLabel && /* @__PURE__ */ jsx22("p", { className: "rui-tl-laneempty", children: track.emptyLabel }),
3835
- track.laid.map((l) => /* @__PURE__ */ jsx22(
3498
+ track.laid.length === 0 && track.emptyLabel && /* @__PURE__ */ jsx19("p", { className: "rui-tl-laneempty", children: track.emptyLabel }),
3499
+ track.laid.map((l) => /* @__PURE__ */ jsx19(
3836
3500
  Clip,
3837
3501
  {
3838
3502
  l,
@@ -3848,7 +3512,7 @@ function Timeline({
3848
3512
  },
3849
3513
  l.clip.id ?? l.i
3850
3514
  )),
3851
- dropAt?.trackId === track.id && /* @__PURE__ */ jsx22(
3515
+ dropAt?.trackId === track.id && /* @__PURE__ */ jsx19(
3852
3516
  "span",
3853
3517
  {
3854
3518
  className: "rui-tl-dropmark",
@@ -3856,7 +3520,7 @@ function Timeline({
3856
3520
  "aria-hidden": "true"
3857
3521
  }
3858
3522
  ),
3859
- laneAppend && /* @__PURE__ */ jsx22(
3523
+ laneAppend && /* @__PURE__ */ jsx19(
3860
3524
  "span",
3861
3525
  {
3862
3526
  className: "rui-tl-append",
@@ -3868,9 +3532,9 @@ function Timeline({
3868
3532
  }
3869
3533
  )
3870
3534
  ] }, track.id)),
3871
- onDropClip && newLaneLabel && /* @__PURE__ */ jsxs20("div", { className: "rui-tl-row", children: [
3872
- /* @__PURE__ */ jsx22("div", { className: "rui-tl-head rui-tl-newhead", "aria-hidden": "true" }),
3873
- /* @__PURE__ */ jsx22(
3535
+ onDropClip && newLaneLabel && /* @__PURE__ */ jsxs18("div", { className: "rui-tl-row", children: [
3536
+ /* @__PURE__ */ jsx19("div", { className: "rui-tl-head rui-tl-newhead", "aria-hidden": "true" }),
3537
+ /* @__PURE__ */ jsx19(
3874
3538
  "div",
3875
3539
  {
3876
3540
  className: "rui-tl-newlane" + (dropAt?.trackId === null ? " is-dropping" : ""),
@@ -3892,11 +3556,11 @@ function Timeline({
3892
3556
  e.preventDefault();
3893
3557
  onDropClip(payload, { trackId: null, seconds: timeAt(e.clientX), index: 0 });
3894
3558
  },
3895
- children: /* @__PURE__ */ jsx22("span", { className: "rui-tl-newlbl", children: newLaneLabel })
3559
+ children: /* @__PURE__ */ jsx19("span", { className: "rui-tl-newlbl", children: newLaneLabel })
3896
3560
  }
3897
3561
  )
3898
3562
  ] }),
3899
- drag?.guide != null && /* @__PURE__ */ jsx22(
3563
+ drag?.guide != null && /* @__PURE__ */ jsx19(
3900
3564
  "div",
3901
3565
  {
3902
3566
  className: "rui-tl-guide",
@@ -3904,16 +3568,16 @@ function Timeline({
3904
3568
  "aria-hidden": "true"
3905
3569
  }
3906
3570
  ),
3907
- Number.isFinite(currentTime) && /* @__PURE__ */ jsx22(
3571
+ Number.isFinite(currentTime) && /* @__PURE__ */ jsx19(
3908
3572
  "div",
3909
3573
  {
3910
3574
  className: "rui-tl-playhead",
3911
3575
  style: { left: TL_HEAD_W + currentTime * pps },
3912
3576
  "aria-hidden": "true",
3913
- children: /* @__PURE__ */ jsx22("span", { className: "rui-tl-playhead-grip" })
3577
+ children: /* @__PURE__ */ jsx19("span", { className: "rui-tl-playhead-grip" })
3914
3578
  }
3915
3579
  ),
3916
- drag?.annotation && /* @__PURE__ */ jsx22("div", { className: "rui-tl-annot", style: { left: TL_HEAD_W + (drag.annotAt || 0) * pps }, children: drag.annotation })
3580
+ drag?.annotation && /* @__PURE__ */ jsx19("div", { className: "rui-tl-annot", style: { left: TL_HEAD_W + (drag.annotAt || 0) * pps }, children: drag.annotation })
3917
3581
  ] }) })
3918
3582
  ] });
3919
3583
  }
@@ -3989,7 +3653,7 @@ function Clip({
3989
3653
  click: onSelect
3990
3654
  });
3991
3655
  };
3992
- return /* @__PURE__ */ jsxs20(
3656
+ return /* @__PURE__ */ jsxs18(
3993
3657
  "article",
3994
3658
  {
3995
3659
  className: "rui-tl-clip" + (clip.state ? ` is-${clip.state}` : "") + (known ? "" : " is-unmeasured") + (selected ? " is-selected" : "") + (live ? " is-live" : ""),
@@ -4004,10 +3668,10 @@ function Clip({
4004
3668
  }
4005
3669
  },
4006
3670
  children: [
4007
- clip.poster ? /* @__PURE__ */ jsx22("span", { className: "rui-tl-strip", style: {
3671
+ clip.poster ? /* @__PURE__ */ jsx19("span", { className: "rui-tl-strip", style: {
4008
3672
  backgroundImage: `url("${String(clip.poster).replace(/"/g, '\\"')}")`,
4009
3673
  backgroundSize: `${tileW}px 100%`
4010
- } }) : clip.video ? /* @__PURE__ */ jsx22(
3674
+ } }) : clip.video ? /* @__PURE__ */ jsx19(
4011
3675
  "video",
4012
3676
  {
4013
3677
  className: "rui-tl-frame",
@@ -4018,12 +3682,12 @@ function Clip({
4018
3682
  tabIndex: -1,
4019
3683
  "aria-hidden": "true"
4020
3684
  }
4021
- ) : /* @__PURE__ */ jsx22("span", { className: "rui-tl-blank", "aria-hidden": "true", children: clip.glyph }),
4022
- clip.badge && /* @__PURE__ */ jsx22("span", { className: "rui-tl-badge", children: clip.badge }),
4023
- known && width > 46 && /* @__PURE__ */ jsx22("span", { className: "rui-tl-dur", children: durationLabel(clip.duration) }),
4024
- clip.label && width > 104 && /* @__PURE__ */ jsx22("span", { className: "rui-tl-name", children: clip.label }),
4025
- onTrim && known && /* @__PURE__ */ jsxs20(Fragment9, { children: [
4026
- /* @__PURE__ */ jsx22(
3685
+ ) : /* @__PURE__ */ jsx19("span", { className: "rui-tl-blank", "aria-hidden": "true", children: clip.glyph }),
3686
+ clip.badge && /* @__PURE__ */ jsx19("span", { className: "rui-tl-badge", children: clip.badge }),
3687
+ known && width > 46 && /* @__PURE__ */ jsx19("span", { className: "rui-tl-dur", children: durationLabel(clip.duration) }),
3688
+ clip.label && width > 104 && /* @__PURE__ */ jsx19("span", { className: "rui-tl-name", children: clip.label }),
3689
+ onTrim && known && /* @__PURE__ */ jsxs18(Fragment9, { children: [
3690
+ /* @__PURE__ */ jsx19(
4027
3691
  "span",
4028
3692
  {
4029
3693
  className: "rui-tl-trim l",
@@ -4032,7 +3696,7 @@ function Clip({
4032
3696
  "aria-label": `Trim the start of ${clip.label || "this clip"}`
4033
3697
  }
4034
3698
  ),
4035
- /* @__PURE__ */ jsx22(
3699
+ /* @__PURE__ */ jsx19(
4036
3700
  "span",
4037
3701
  {
4038
3702
  className: "rui-tl-trim r",