@cascivo/react 0.3.7 → 0.4.3

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.
Files changed (53) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +16 -3
  3. package/dist/alert/alert.css +1 -1
  4. package/dist/alert/alert.module.js +7 -7
  5. package/dist/avatar/avatar.js +3 -3
  6. package/dist/button/button.css +1 -1
  7. package/dist/button/button.module.js +1 -1
  8. package/dist/combobox/combobox.css +1 -1
  9. package/dist/combobox/combobox.js +46 -46
  10. package/dist/combobox/combobox.module.js +15 -15
  11. package/dist/data-table/data-table.css +1 -1
  12. package/dist/data-table/data-table.js +7 -5
  13. package/dist/data-table/data-table.module.js +29 -29
  14. package/dist/date-picker/date-picker.css +1 -1
  15. package/dist/date-picker/date-picker.module.js +19 -19
  16. package/dist/date-range-picker/date-range-picker.js +1 -0
  17. package/dist/dock/dock.js +21 -19
  18. package/dist/fab/fab.js +1 -1
  19. package/dist/file-uploader/file-uploader.css +1 -1
  20. package/dist/file-uploader/file-uploader.module.js +14 -14
  21. package/dist/header/header.js +2 -2
  22. package/dist/index.d.ts +109 -3
  23. package/dist/log-viewer/log-viewer.css +1 -0
  24. package/dist/log-viewer/log-viewer.js +184 -0
  25. package/dist/log-viewer/log-viewer.module.js +19 -0
  26. package/dist/menu/menu.css +1 -1
  27. package/dist/menu/menu.module.js +4 -4
  28. package/dist/multi-select/multi-select.js +3 -2
  29. package/dist/otp-input/otp-input.js +1 -1
  30. package/dist/password-input/password-input.js +4 -0
  31. package/dist/popover/popover.css +1 -1
  32. package/dist/popover/popover.module.js +2 -2
  33. package/dist/radial-progress/radial-progress.js +13 -10
  34. package/dist/react/src/index.js +47 -46
  35. package/dist/shell-header/shell-header.js +5 -4
  36. package/dist/side-nav/side-nav.js +4 -4
  37. package/dist/stat/stat.css +1 -1
  38. package/dist/stat/stat.module.js +6 -6
  39. package/dist/steps/steps.css +1 -1
  40. package/dist/steps/steps.js +19 -16
  41. package/dist/steps/steps.module.js +4 -4
  42. package/dist/styles.css +15 -13
  43. package/dist/swipe-item/swipe-item.js +2 -2
  44. package/dist/switcher/switcher.css +1 -1
  45. package/dist/switcher/switcher.js +3 -2
  46. package/dist/switcher/switcher.module.js +4 -4
  47. package/dist/tag/tag.css +1 -1
  48. package/dist/tag/tag.module.js +2 -2
  49. package/dist/tags-input/tags-input.css +1 -1
  50. package/dist/tags-input/tags-input.js +1 -0
  51. package/dist/tags-input/tags-input.module.js +4 -4
  52. package/package.json +3 -3
  53. package/readme.body.md +16 -3
@@ -114,6 +114,7 @@ function g({ value: g, defaultValue: _, onValueChange: te, min: v, max: y, disab
114
114
  role: "combobox",
115
115
  "aria-expanded": N.value,
116
116
  "aria-haspopup": "dialog",
117
+ "aria-label": T?.label ?? l(c.dateRangePicker.label),
117
118
  className: t.trigger,
118
119
  onClick: N.value ? V : B,
119
120
  children: [/* @__PURE__ */ u("span", {
package/dist/dock/dock.js CHANGED
@@ -1,32 +1,34 @@
1
1
  "use client";
2
2
 
3
3
  import e from "./dock.module.js";
4
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ import { useSignals as t } from "@cascivo/core";
5
+ import { builtin as n, t as r } from "@cascivo/i18n";
6
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
7
  //#region ../components/src/dock/dock.tsx
6
- function r({ items: r, activeIndex: i, className: a }) {
7
- return /* @__PURE__ */ t("nav", {
8
- "aria-label": "Main navigation",
9
- className: [e.dock, a].filter(Boolean).join(" "),
10
- children: r.map((r, a) => {
11
- let o = a === i;
12
- return /* @__PURE__ */ n(r.href ? "a" : "button", {
8
+ function o({ items: o, activeIndex: s, className: c, ariaLabel: l }) {
9
+ return t(), /* @__PURE__ */ i("nav", {
10
+ "aria-label": l ?? r(n.dock.nav),
11
+ className: [e.dock, c].filter(Boolean).join(" "),
12
+ children: o.map((t, n) => {
13
+ let r = n === s;
14
+ return /* @__PURE__ */ a(t.href ? "a" : "button", {
13
15
  className: e.item,
14
- "data-active": o || void 0,
15
- "aria-current": o ? "page" : void 0,
16
- ...r.href ? { href: r.href } : {},
17
- type: r.href ? void 0 : "button",
18
- onClick: r.onClick,
19
- children: [/* @__PURE__ */ t("span", {
16
+ "data-active": r || void 0,
17
+ "aria-current": r ? "page" : void 0,
18
+ ...t.href ? { href: t.href } : {},
19
+ type: t.href ? void 0 : "button",
20
+ onClick: t.onClick,
21
+ children: [/* @__PURE__ */ i("span", {
20
22
  className: e.icon,
21
23
  "aria-hidden": "true",
22
- children: r.icon
23
- }), /* @__PURE__ */ t("span", {
24
+ children: t.icon
25
+ }), /* @__PURE__ */ i("span", {
24
26
  className: e.label,
25
- children: r.label
27
+ children: t.label
26
28
  })]
27
- }, a);
29
+ }, n);
28
30
  })
29
31
  });
30
32
  }
31
33
  //#endregion
32
- export { r as Dock };
34
+ export { o as Dock };
package/dist/fab/fab.js CHANGED
@@ -78,7 +78,7 @@ function f({ children: f, label: p, onClick: m, actions: h, position: g = "botto
78
78
  children: t.icon
79
79
  })]
80
80
  })
81
- }, t.label);
81
+ }, t.id ?? n);
82
82
  })
83
83
  })
84
84
  }), A]
@@ -1 +1 @@
1
- @layer cascivo.component{._uploader_1tk3e_2{gap:var(--cascivo-space-2);flex-direction:column;inline-size:100%;display:flex}._label_1tk3e_9{font-size:var(--cascivo-font-size-sm);font-weight:var(--cascivo-font-weight-medium);color:var(--cascivo-color-text)}._input_1tk3e_15{clip-path:inset(50%);white-space:nowrap;block-size:1px;inline-size:1px;position:absolute;overflow:hidden}._zone_1tk3e_24{padding:var(--cascivo-space-8) var(--cascivo-space-4);border:2px dashed var(--cascivo-color-border);border-radius:var(--cascivo-radius-surface);background:var(--cascivo-color-surface);color:var(--cascivo-color-text-muted);font-size:var(--cascivo-font-size-sm);cursor:pointer;transition:border-color var(--cascivo-duration-150) var(--cascivo-ease-out), background var(--cascivo-duration-150) var(--cascivo-ease-out);text-align:center;justify-content:center;align-items:center;inline-size:100%;display:flex}._zone_1tk3e_24:hover:not(:disabled),._zone_1tk3e_24[data-state=dragover]{border-color:var(--cascivo-color-accent);background:var(--cascivo-color-accent-subtle)}._zone_1tk3e_24:disabled{opacity:.5;cursor:not-allowed}._hint_1tk3e_57{font-size:var(--cascivo-font-size-xs);color:var(--cascivo-color-text-muted)}._list_1tk3e_62{gap:var(--cascivo-space-2);flex-direction:column;margin:0;padding:0;list-style:none;display:flex}._file_1tk3e_71{align-items:center;gap:var(--cascivo-space-2);padding:var(--cascivo-space-2) var(--cascivo-space-3);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-surface);background:var(--cascivo-color-surface);font-size:var(--cascivo-font-size-sm);grid-template-columns:auto 1fr auto auto;grid-template-areas:"status name size remove""status error error error";display:grid}._file_1tk3e_71[data-state=error]{border-color:var(--cascivo-color-danger)}._status_1tk3e_88{grid-area:status;align-items:center;display:flex}._glyph-complete_1tk3e_94{color:var(--cascivo-color-success)}._glyph-error_1tk3e_98{color:var(--cascivo-color-danger)}._name_1tk3e_102{text-overflow:ellipsis;white-space:nowrap;grid-area:name;overflow:hidden}._size_1tk3e_109{color:var(--cascivo-color-text-muted);font-size:var(--cascivo-font-size-xs);grid-area:size}._remove_1tk3e_115{padding:var(--cascivo-space-1);border-radius:var(--cascivo-radius-control);color:var(--cascivo-color-text-muted);cursor:pointer;font-size:var(--cascivo-font-size-xs);background:0 0;border:none;grid-area:remove;justify-content:center;align-items:center;line-height:1;display:flex}._remove_1tk3e_115:hover{color:var(--cascivo-color-danger);background:var(--cascivo-color-danger-subtle)}._error-message_1tk3e_135{font-size:var(--cascivo-font-size-xs);color:var(--cascivo-color-danger);grid-area:error}}
1
+ @layer cascivo.component{._uploader_bw6tn_2{gap:var(--cascivo-space-2);flex-direction:column;inline-size:100%;display:flex}._label_bw6tn_9{font-size:var(--cascivo-font-size-sm);font-weight:var(--cascivo-font-weight-medium);color:var(--cascivo-color-text)}._input_bw6tn_15{clip-path:inset(50%);white-space:nowrap;block-size:1px;inline-size:1px;position:absolute;overflow:hidden}._zone_bw6tn_24{padding:var(--cascivo-space-8) var(--cascivo-space-4);border:2px dashed var(--cascivo-color-border);border-radius:var(--cascivo-radius-surface);background:var(--cascivo-color-surface);color:var(--cascivo-color-text-muted);font-size:var(--cascivo-font-size-sm);cursor:pointer;transition:border-color var(--cascivo-duration-150) var(--cascivo-ease-out), background var(--cascivo-duration-150) var(--cascivo-ease-out);text-align:center;justify-content:center;align-items:center;inline-size:100%;display:flex}._zone_bw6tn_24:hover:not(:disabled),._zone_bw6tn_24[data-state=dragover]{border-color:var(--cascivo-color-accent);background:var(--cascivo-color-accent-subtle)}._zone_bw6tn_24:disabled{opacity:.5;cursor:not-allowed}._hint_bw6tn_57{font-size:var(--cascivo-font-size-xs);color:var(--cascivo-color-text-muted)}._list_bw6tn_62{gap:var(--cascivo-space-2);flex-direction:column;margin:0;padding:0;list-style:none;display:flex}._file_bw6tn_71{align-items:center;gap:var(--cascivo-space-2);padding:var(--cascivo-space-2) var(--cascivo-space-3);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-surface);background:var(--cascivo-color-surface);font-size:var(--cascivo-font-size-sm);grid-template-columns:auto 1fr auto auto;grid-template-areas:"status name size remove""status error error error";display:grid}._file_bw6tn_71[data-state=error]{border-color:var(--cascivo-color-danger)}._status_bw6tn_88{grid-area:status;align-items:center;display:flex}._glyph-complete_bw6tn_94{color:var(--cascivo-color-success-foreground)}._glyph-error_bw6tn_98{color:var(--cascivo-color-danger)}._name_bw6tn_102{text-overflow:ellipsis;white-space:nowrap;grid-area:name;overflow:hidden}._size_bw6tn_109{color:var(--cascivo-color-text-muted);font-size:var(--cascivo-font-size-xs);grid-area:size}._remove_bw6tn_115{padding:var(--cascivo-space-1);border-radius:var(--cascivo-radius-control);color:var(--cascivo-color-text-muted);cursor:pointer;font-size:var(--cascivo-font-size-xs);background:0 0;border:none;grid-area:remove;justify-content:center;align-items:center;line-height:1;display:flex}._remove_bw6tn_115:hover{color:var(--cascivo-color-danger);background:var(--cascivo-color-danger-subtle)}._error-message_bw6tn_135{font-size:var(--cascivo-font-size-xs);color:var(--cascivo-color-danger);grid-area:error}}
@@ -2,20 +2,20 @@
2
2
 
3
3
  import './file-uploader.css';
4
4
  var e = {
5
- uploader: "_uploader_1tk3e_2",
6
- label: "_label_1tk3e_9",
7
- input: "_input_1tk3e_15",
8
- zone: "_zone_1tk3e_24",
9
- hint: "_hint_1tk3e_57",
10
- list: "_list_1tk3e_62",
11
- file: "_file_1tk3e_71",
12
- status: "_status_1tk3e_88",
13
- "glyph-complete": "_glyph-complete_1tk3e_94",
14
- "glyph-error": "_glyph-error_1tk3e_98",
15
- name: "_name_1tk3e_102",
16
- size: "_size_1tk3e_109",
17
- remove: "_remove_1tk3e_115",
18
- "error-message": "_error-message_1tk3e_135"
5
+ uploader: "_uploader_bw6tn_2",
6
+ label: "_label_bw6tn_9",
7
+ input: "_input_bw6tn_15",
8
+ zone: "_zone_bw6tn_24",
9
+ hint: "_hint_bw6tn_57",
10
+ list: "_list_bw6tn_62",
11
+ file: "_file_bw6tn_71",
12
+ status: "_status_bw6tn_88",
13
+ "glyph-complete": "_glyph-complete_bw6tn_94",
14
+ "glyph-error": "_glyph-error_bw6tn_98",
15
+ name: "_name_bw6tn_102",
16
+ size: "_size_bw6tn_109",
17
+ remove: "_remove_bw6tn_115",
18
+ "error-message": "_error-message_bw6tn_135"
19
19
  };
20
20
  //#endregion
21
21
  export { e as default };
@@ -23,13 +23,13 @@ function s({ brand: s, links: c, actions: l, sticky: u = !1, labels: d, classNam
23
23
  className: e.nav,
24
24
  children: /* @__PURE__ */ a("ul", {
25
25
  className: e.list,
26
- children: c.map((t) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a("a", {
26
+ children: c.map((t, n) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a("a", {
27
27
  href: t.href,
28
28
  "aria-current": t.active ? "page" : void 0,
29
29
  "data-state": t.active ? "active" : void 0,
30
30
  className: e.link,
31
31
  children: t.label
32
- }) }, t.href))
32
+ }) }, t.id ?? `${n}-${t.href}`))
33
33
  })
34
34
  }),
35
35
  /* @__PURE__ */ a("div", { className: e.spacer }),
package/dist/index.d.ts CHANGED
@@ -332,6 +332,12 @@ interface ToggleProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onC
332
332
  checked?: boolean;
333
333
  defaultChecked?: boolean;
334
334
  onChange?: (checked: boolean) => void;
335
+ /**
336
+ * Renders a **visible** text label beside the switch that also becomes its
337
+ * accessible name. When a visible heading already labels the control, omit
338
+ * `label` (it would duplicate that text) and pass `aria-label` instead —
339
+ * `aria-label` is forwarded to the underlying button.
340
+ */
335
341
  label?: string;
336
342
  size?: 'sm' | 'md';
337
343
  }
@@ -406,6 +412,18 @@ declare function ToastProvider({
406
412
  }: {
407
413
  children: ReactNode;
408
414
  }): import("react").JSX.Element;
415
+ /**
416
+ * Returns `{ toast }` — an object, not a callable. Destructure it and call
417
+ * `toast(...)`:
418
+ *
419
+ * ```tsx
420
+ * const { toast } = useToast()
421
+ * toast({ title: 'Saved' })
422
+ * ```
423
+ *
424
+ * (`useToast()(...)` is a type error — the hook returns the namespace object so
425
+ * more helpers can be added without changing its shape.)
426
+ */
409
427
  declare function useToast(): {
410
428
  toast: typeof enqueue;
411
429
  };
@@ -590,6 +608,8 @@ interface UseTocFromRegionOptions {
590
608
  */
591
609
  declare function useTocFromRegion(ref: RefObject<HTMLElement | null>, options?: UseTocFromRegionOptions): Signal<TocItem[]>;
592
610
  interface HeaderLink {
611
+ /** Stable React key. Provide when `href`/`label` may repeat (e.g. placeholder `#` links). */
612
+ id?: string;
593
613
  label: string;
594
614
  href: string;
595
615
  active?: boolean;
@@ -616,6 +636,8 @@ declare function Header({
616
636
  type SideNavTone = 'default' | 'danger' | 'warning' | 'success';
617
637
  /** A selectable/navigable sub-item (link when `href` is set, action when `onSelect` is set). */
618
638
  interface SideNavLinkSubItem {
639
+ /** Stable React key. Provide when `label`/`href` may repeat (e.g. placeholder `#` links). */
640
+ id?: string;
619
641
  label: string;
620
642
  href?: string;
621
643
  icon?: ReactNode;
@@ -633,6 +655,8 @@ type SideNavSubItem = SideNavLinkSubItem | {
633
655
  label: string;
634
656
  };
635
657
  interface SideNavItem {
658
+ /** Stable React key. Provide when `label`/`href` may repeat (e.g. placeholder `#` links). */
659
+ id?: string;
636
660
  label: string;
637
661
  href?: string;
638
662
  icon?: ReactNode;
@@ -798,6 +822,8 @@ declare function EmptyState({
798
822
  ...props
799
823
  }: EmptyStateProps): import("react").JSX.Element;
800
824
  interface FabAction {
825
+ /** Stable React key. Provide when `label` may repeat across actions. */
826
+ id?: string;
801
827
  /** Accessible name and visible label for the speed-dial item. */
802
828
  label: string;
803
829
  icon: ReactNode;
@@ -953,6 +979,8 @@ interface DataTableLabels {
953
979
  selectRow?: string;
954
980
  itemsSelected?: (n: number) => string;
955
981
  expandRow?: string;
982
+ previousPage?: string;
983
+ nextPage?: string;
956
984
  }
957
985
  interface DataTableProps<Row> {
958
986
  columns: Column<Row>[];
@@ -973,6 +1001,7 @@ interface DataTableProps<Row> {
973
1001
  onChange?: (ids: string[]) => void;
974
1002
  };
975
1003
  batchActions?: {
1004
+ id?: string;
976
1005
  label: string;
977
1006
  onClick: (selectedIds: string[]) => void;
978
1007
  }[];
@@ -1138,6 +1167,7 @@ interface ComboboxLabels {
1138
1167
  placeholder?: string;
1139
1168
  empty?: string;
1140
1169
  clear?: string;
1170
+ search?: string;
1141
1171
  }
1142
1172
  interface ComboboxProps {
1143
1173
  options: ComboboxOption[];
@@ -1526,6 +1556,7 @@ interface MultiSelectOption {
1526
1556
  disabled?: boolean;
1527
1557
  }
1528
1558
  interface MultiSelectLabels {
1559
+ label?: string;
1529
1560
  placeholder?: string;
1530
1561
  selected?: (count: number) => string;
1531
1562
  search?: string;
@@ -1708,16 +1739,24 @@ interface ShellHeaderBrand {
1708
1739
  href?: string;
1709
1740
  }
1710
1741
  interface ShellHeaderNavLink {
1742
+ /** Stable React key. Provide when `href`/`label` may repeat (e.g. placeholder `#` links). */
1743
+ id?: string;
1711
1744
  label: string;
1712
1745
  href: string;
1713
1746
  active?: boolean;
1747
+ /** Intercept navigation (e.g. a SPA section switch). Forwarded to the `<a>`. */
1748
+ onClick?: ((e: MouseEvent<HTMLAnchorElement>) => void) | undefined;
1714
1749
  }
1715
1750
  interface ShellHeaderNavMenuItem {
1751
+ /** Stable React key. Provide when `href`/`label` may repeat (e.g. placeholder `#` links). */
1752
+ id?: string;
1716
1753
  label: string;
1717
1754
  href: string;
1718
1755
  active?: boolean;
1719
1756
  }
1720
1757
  interface ShellHeaderNavMenu {
1758
+ /** Stable React key. Provide when `label` may repeat across menus. */
1759
+ id?: string;
1721
1760
  label: string;
1722
1761
  items: ShellHeaderNavMenuItem[];
1723
1762
  }
@@ -1984,6 +2023,64 @@ declare function ListItem({
1984
2023
  children,
1985
2024
  ...props
1986
2025
  }: ListItemProps): import("react").JSX.Element;
2026
+ type LogLevel = 'info' | 'warn' | 'error' | 'debug';
2027
+ interface LogLine {
2028
+ /** Stable identity for the line (e.g. a sequence number). */
2029
+ id: string | number;
2030
+ /** The line text. May contain ANSI SGR escapes when `ansi` is set. */
2031
+ text: string;
2032
+ /** Semantic level driving the row color when `ansi` is off. */
2033
+ level?: LogLevel;
2034
+ }
2035
+ interface LogViewerLabels {
2036
+ searchPlaceholder?: string;
2037
+ follow?: string;
2038
+ paused?: string;
2039
+ copy?: string;
2040
+ copied?: string;
2041
+ empty?: string;
2042
+ matchCount?: (count: number) => string;
2043
+ lineCount?: (count: number) => string;
2044
+ }
2045
+ interface LogViewerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
2046
+ /** The log lines — a signal (for live streams) or a plain array. */
2047
+ lines: {
2048
+ readonly value: readonly LogLine[];
2049
+ } | readonly LogLine[];
2050
+ /** Pixel height of one row. Default 20. */
2051
+ rowHeight?: number;
2052
+ /** Extra rows rendered above/below the viewport. Default 8. */
2053
+ overscan?: number;
2054
+ /** Controlled pin-to-bottom. Omit for uncontrolled (defaults to following). */
2055
+ follow?: boolean;
2056
+ onFollowChange?: (follow: boolean) => void;
2057
+ /** Parse ANSI SGR color escapes. Default false (use `level` instead). */
2058
+ ansi?: boolean;
2059
+ /** Seed the search/highlight box. */
2060
+ search?: string;
2061
+ /** Max block size of the scroll region (CSS length). Default '24rem'. */
2062
+ maxHeight?: string;
2063
+ labels?: LogViewerLabels;
2064
+ }
2065
+ /**
2066
+ * A virtualized monospace console for high-frequency log/stream output. Only the
2067
+ * visible rows mount (windowed DOM), so a 100k-line buffer stays responsive.
2068
+ * Auto-follows the tail and releases when the user scrolls up. Pairs with
2069
+ * `createStreamBuffer` from `@cascivo/core`. No `useState`/`useEffect`.
2070
+ */
2071
+ declare function LogViewer({
2072
+ lines,
2073
+ rowHeight,
2074
+ overscan,
2075
+ follow,
2076
+ onFollowChange,
2077
+ ansi,
2078
+ search,
2079
+ maxHeight,
2080
+ labels,
2081
+ className,
2082
+ ...props
2083
+ }: LogViewerProps): import("react").JSX.Element;
1987
2084
  type ProseProps = HTMLAttributes<HTMLDivElement>;
1988
2085
  declare function Prose({
1989
2086
  className,
@@ -2596,6 +2693,7 @@ interface DateRangePreset {
2596
2693
  range: DateRange;
2597
2694
  }
2598
2695
  interface DateRangePickerLabels {
2696
+ label?: string;
2599
2697
  placeholder?: string;
2600
2698
  start?: string;
2601
2699
  end?: string;
@@ -2719,11 +2817,14 @@ interface DockProps {
2719
2817
  items: DockItem[];
2720
2818
  activeIndex?: number;
2721
2819
  className?: string;
2820
+ /** Accessible label for the nav landmark */
2821
+ ariaLabel?: string;
2722
2822
  }
2723
2823
  declare function Dock({
2724
2824
  items,
2725
2825
  activeIndex,
2726
- className
2826
+ className,
2827
+ ariaLabel
2727
2828
  }: DockProps): import("react").JSX.Element;
2728
2829
  interface DrawerProps {
2729
2830
  /** Controlled open state. */
@@ -2856,12 +2957,15 @@ interface StepsProps {
2856
2957
  activeStep?: number;
2857
2958
  orientation?: 'horizontal' | 'vertical';
2858
2959
  className?: string;
2960
+ /** Accessible label for the steps list */
2961
+ ariaLabel?: string;
2859
2962
  }
2860
2963
  declare function Steps({
2861
2964
  steps,
2862
2965
  activeStep: controlledActiveStep,
2863
2966
  orientation,
2864
- className
2967
+ className,
2968
+ ariaLabel
2865
2969
  }: StepsProps): import("react").JSX.Element;
2866
2970
  interface TileProps {
2867
2971
  /** Identifies this tile within a group. */
@@ -3031,6 +3135,8 @@ declare function Swap({
3031
3135
  ...aria
3032
3136
  }: SwapProps): import("react").JSX.Element;
3033
3137
  interface SwipeAction {
3138
+ /** Stable React key. Provide when `label` may repeat across actions. */
3139
+ id?: string;
3034
3140
  /** Accessible name and visible label. */
3035
3141
  label: string;
3036
3142
  icon?: ReactNode;
@@ -3060,4 +3166,4 @@ declare function SwipeItem({
3060
3166
  trailingActions,
3061
3167
  className
3062
3168
  }: SwipeItemProps): import("react").JSX.Element;
3063
- export { Accordion, AccordionContent, AccordionItem, AccordionItemProps, AccordionProps, AccordionTrigger, ActionSheet, ActionSheetAction, ActionSheetProps, Alert, AlertDialog, AlertDialogLabels, AlertDialogProps, AlertProps, AppShell, AppShellProps, AspectRatio, AspectRatioProps, Avatar, AvatarGroup, AvatarGroupLabels, AvatarGroupProps, AvatarProps, Badge, BadgeProps, Blockquote, BlockquoteProps, BottomSheet, BottomSheetProps, Breadcrumb, BreadcrumbItem, BreadcrumbProps, Button, ButtonGroup, ButtonGroupProps, ButtonProps, Calendar, CalendarLabels, CalendarProps, Card, CardContent, CardContentProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps, Carousel, CarouselLabels, CarouselProps, ChatBubble, ChatBubbleProps, ChatBubbleSide, Checkbox, CheckboxCard, CheckboxCardProps, CheckboxProps, Code, type CodeLang, CodeProps, CodeSnippet, CodeSnippetProps, Collapsible, CollapsibleProps, ColorPicker, ColorPickerLabels, ColorPickerProps, Column, Combobox, ComboboxLabels, ComboboxOption, ComboboxProps, CommandGroup, CommandItem, CommandMenu, CommandMenuProps, CommandPage, Comparison, ComparisonProps, ContainedList, ContainedListItem, ContainedListItemProps, ContainedListProps, ContextMenu, ContextMenuItem, ContextMenuItemProps, ContextMenuProps, CopyButton, CopyButtonProps, DataList, DataListItem, DataListProps, DataTable, DataTableLabels, DataTableProps, DatePicker, DatePickerLabels, DatePickerProps, DateRange, DateRangePicker, DateRangePickerLabels, DateRangePickerProps, DateRangePreset, Dock, DockItem, DockProps, Drawer, DrawerProps, Dropdown, DropdownItem, DropdownProps, Editable, EditableProps, EmptyState, EmptyStateProps, ErrorBoundary, Fab, FabAction, FabProps, Field, FieldProps, FileUploader, FileUploaderLabels, FileUploaderProps, Filter, FilterOption, FilterProps, FilterVariant, FocusScope, Form, FormConfig, FormProps, FormStore, Header, HeaderLabels, HeaderLink, HeaderPanel, HeaderPanelLabels, HeaderPanelProps, HeaderProps, Heading, HeadingLevel, HeadingProps, HeadingSize, HoverCard, HoverCardContent, HoverCardContentProps, HoverCardProps, HoverCardTrigger, HoverCardTriggerProps, IconButton, IconButtonProps, Image, ImageProps, Indicator, IndicatorPlacement, IndicatorProps, InlineLoading, InlineLoadingProps, InlineLoadingStatus, Input, InputGroup, InputGroupAddon, type InputGroupAddonProps, type InputGroupProps, InputProps, Item, ItemActions, ItemActionsProps, ItemContent, ItemContentProps, ItemDescription, ItemDescriptionProps, ItemMedia, ItemMediaProps, ItemProps, ItemTitle, ItemTitleProps, Join, JoinOrientation, JoinProps, Kbd, KbdProps, Label, LabelProps, Link, LinkProps, List, ListItem, ListItemProps, ListProps, Menu, MenuButton, MenuButtonItem, MenuButtonProps, MenuItem, MenuItemProps, MenuProps, MenuSeparator, MenuTrigger, MenuTriggerProps, Menubar, MenubarItem, MenubarMenu, MenubarProps, Modal, ModalProps, MultiSelect, MultiSelectLabels, MultiSelectOption, MultiSelectProps, NativeSelect, NativeSelectOption, NativeSelectProps, NavigationMenu, NavigationMenuItem, NavigationMenuProps, Notification, NotificationProps, NotificationVariant, NumberInput, NumberInputProps, OtpInput, OtpInputProps, OverflowMenu, OverflowMenuItem, OverflowMenuProps, Pagination, PaginationLabels, PaginationProps, PasswordInput, PasswordInputLabels, PasswordInputProps, Popover, PopoverContent, PopoverContentProps, PopoverProps, PopoverTrigger, PopoverTriggerProps, Portal, Progress, ProgressBar, ProgressBarProps, ProgressCircle, ProgressCircleProps, ProgressIndicator, ProgressIndicatorProps, ProgressProps, ProgressSize, ProgressStep, ProgressVariant, Prose, ProseProps, PullToRefresh, PullToRefreshProps, QrCode, QrCodeProps, RadialProgress, RadialProgressProps, RadialProgressSize, RadialProgressVariant, Radio, RadioCard, RadioCardGroup, RadioCardGroupProps, RadioCardProps, RadioGroup, RadioGroupProps, RadioProps, RatingGroup, RatingGroupLabels, RatingGroupProps, RelativeTime, RelativeTimeProps, Resizable, ResizableProps, ScrollArea, ScrollAreaProps, Search, SearchProps, SegmentedControl, SegmentedControlOption, SegmentedControlProps, Select, SelectOption, SelectProps, Separator, SeparatorProps, Sheet, SheetProps, ShellHeader, ShellHeaderAction, ShellHeaderBrand, ShellHeaderLabels, ShellHeaderNavItem, ShellHeaderNavLink, ShellHeaderNavMenu, ShellHeaderNavMenuItem, ShellHeaderProps, SideNav, SideNavGroup, SideNavItem, SideNavLinkSubItem, SideNavProps, SideNavSubItem, SideNavTone, Skeleton, SkeletonProps, SkipNavLink, SkipNavLinkProps, SkipNavTarget, SkipNavTargetProps, Slider, SliderProps, SortDirection, SortState, Spinner, SpinnerProps, Stack, StackProps, type StandardSchemaV1, Stat, StatProps, Status, StatusProps, Step, StepState, Steps, StepsProps, StructuredList, StructuredListItem, StructuredListProps, SuspenseBoundary, Swap, SwapMode, SwapProps, SwipeAction, SwipeItem, SwipeItemProps, Switcher, SwitcherEntry, SwitcherLink, SwitcherProps, Tabs, TabsContent, TabsContentProps, TabsList, TabsProps, TabsTrigger, TabsTriggerProps, Tag$1 as Tag, TagProps, TagsInput, TagsInputProps, Text, TextProps, Textarea, TextareaProps, Tile, TileProps, TimePicker, TimePickerProps, Timeline, TimelineItem, TimelineProps, ToastOptions, ToastProvider, ToastVariant, Toc, TocItem, TocProps, Toggle, ToggleGroup, ToggleGroupItem, ToggleGroupProps, ToggleProps, Toggletip, ToggletipPlacement, ToggletipProps, Tooltip, TooltipProps, TreeNode, TreeView, TreeViewProps, UploaderFile, type UsePopoverOptions, type UsePopoverReturn, type UseTocFromRegionOptions, User, UserProps, VisuallyHidden, VisuallyHiddenProps, createForm, dismissAllToasts, fuzzyScore, treeViewMessages, useForm, usePopover, useToast, useTocFromRegion };
3169
+ export { Accordion, AccordionContent, AccordionItem, AccordionItemProps, AccordionProps, AccordionTrigger, ActionSheet, ActionSheetAction, ActionSheetProps, Alert, AlertDialog, AlertDialogLabels, AlertDialogProps, AlertProps, AppShell, AppShellProps, AspectRatio, AspectRatioProps, Avatar, AvatarGroup, AvatarGroupLabels, AvatarGroupProps, AvatarProps, Badge, BadgeProps, Blockquote, BlockquoteProps, BottomSheet, BottomSheetProps, Breadcrumb, BreadcrumbItem, BreadcrumbProps, Button, ButtonGroup, ButtonGroupProps, ButtonProps, Calendar, CalendarLabels, CalendarProps, Card, CardContent, CardContentProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps, Carousel, CarouselLabels, CarouselProps, ChatBubble, ChatBubbleProps, ChatBubbleSide, Checkbox, CheckboxCard, CheckboxCardProps, CheckboxProps, Code, type CodeLang, CodeProps, CodeSnippet, CodeSnippetProps, Collapsible, CollapsibleProps, ColorPicker, ColorPickerLabels, ColorPickerProps, Column, Combobox, ComboboxLabels, ComboboxOption, ComboboxProps, CommandGroup, CommandItem, CommandMenu, CommandMenuProps, CommandPage, Comparison, ComparisonProps, ContainedList, ContainedListItem, ContainedListItemProps, ContainedListProps, ContextMenu, ContextMenuItem, ContextMenuItemProps, ContextMenuProps, CopyButton, CopyButtonProps, DataList, DataListItem, DataListProps, DataTable, DataTableLabels, DataTableProps, DatePicker, DatePickerLabels, DatePickerProps, DateRange, DateRangePicker, DateRangePickerLabels, DateRangePickerProps, DateRangePreset, Dock, DockItem, DockProps, Drawer, DrawerProps, Dropdown, DropdownItem, DropdownProps, Editable, EditableProps, EmptyState, EmptyStateProps, ErrorBoundary, Fab, FabAction, FabProps, Field, FieldProps, FileUploader, FileUploaderLabels, FileUploaderProps, Filter, FilterOption, FilterProps, FilterVariant, FocusScope, Form, FormConfig, FormProps, FormStore, Header, HeaderLabels, HeaderLink, HeaderPanel, HeaderPanelLabels, HeaderPanelProps, HeaderProps, Heading, HeadingLevel, HeadingProps, HeadingSize, HoverCard, HoverCardContent, HoverCardContentProps, HoverCardProps, HoverCardTrigger, HoverCardTriggerProps, IconButton, IconButtonProps, Image, ImageProps, Indicator, IndicatorPlacement, IndicatorProps, InlineLoading, InlineLoadingProps, InlineLoadingStatus, Input, InputGroup, InputGroupAddon, type InputGroupAddonProps, type InputGroupProps, InputProps, Item, ItemActions, ItemActionsProps, ItemContent, ItemContentProps, ItemDescription, ItemDescriptionProps, ItemMedia, ItemMediaProps, ItemProps, ItemTitle, ItemTitleProps, Join, JoinOrientation, JoinProps, Kbd, KbdProps, Label, LabelProps, Link, LinkProps, List, ListItem, ListItemProps, ListProps, LogLevel, LogLine, LogViewer, LogViewerLabels, LogViewerProps, Menu, MenuButton, MenuButtonItem, MenuButtonProps, MenuItem, MenuItemProps, MenuProps, MenuSeparator, MenuTrigger, MenuTriggerProps, Menubar, MenubarItem, MenubarMenu, MenubarProps, Modal, ModalProps, MultiSelect, MultiSelectLabels, MultiSelectOption, MultiSelectProps, NativeSelect, NativeSelectOption, NativeSelectProps, NavigationMenu, NavigationMenuItem, NavigationMenuProps, Notification, NotificationProps, NotificationVariant, NumberInput, NumberInputProps, OtpInput, OtpInputProps, OverflowMenu, OverflowMenuItem, OverflowMenuProps, Pagination, PaginationLabels, PaginationProps, PasswordInput, PasswordInputLabels, PasswordInputProps, Popover, PopoverContent, PopoverContentProps, PopoverProps, PopoverTrigger, PopoverTriggerProps, Portal, Progress, ProgressBar, ProgressBarProps, ProgressCircle, ProgressCircleProps, ProgressIndicator, ProgressIndicatorProps, ProgressProps, ProgressSize, ProgressStep, ProgressVariant, Prose, ProseProps, PullToRefresh, PullToRefreshProps, QrCode, QrCodeProps, RadialProgress, RadialProgressProps, RadialProgressSize, RadialProgressVariant, Radio, RadioCard, RadioCardGroup, RadioCardGroupProps, RadioCardProps, RadioGroup, RadioGroupProps, RadioProps, RatingGroup, RatingGroupLabels, RatingGroupProps, RelativeTime, RelativeTimeProps, Resizable, ResizableProps, ScrollArea, ScrollAreaProps, Search, SearchProps, SegmentedControl, SegmentedControlOption, SegmentedControlProps, Select, SelectOption, SelectProps, Separator, SeparatorProps, Sheet, SheetProps, ShellHeader, ShellHeaderAction, ShellHeaderBrand, ShellHeaderLabels, ShellHeaderNavItem, ShellHeaderNavLink, ShellHeaderNavMenu, ShellHeaderNavMenuItem, ShellHeaderProps, SideNav, SideNavGroup, SideNavItem, SideNavLinkSubItem, SideNavProps, SideNavSubItem, SideNavTone, Skeleton, SkeletonProps, SkipNavLink, SkipNavLinkProps, SkipNavTarget, SkipNavTargetProps, Slider, SliderProps, SortDirection, SortState, Spinner, SpinnerProps, Stack, StackProps, type StandardSchemaV1, Stat, StatProps, Status, StatusProps, Step, StepState, Steps, StepsProps, StructuredList, StructuredListItem, StructuredListProps, SuspenseBoundary, Swap, SwapMode, SwapProps, SwipeAction, SwipeItem, SwipeItemProps, Switcher, SwitcherEntry, SwitcherLink, SwitcherProps, Tabs, TabsContent, TabsContentProps, TabsList, TabsProps, TabsTrigger, TabsTriggerProps, Tag$1 as Tag, TagProps, TagsInput, TagsInputProps, Text, TextProps, Textarea, TextareaProps, Tile, TileProps, TimePicker, TimePickerProps, Timeline, TimelineItem, TimelineProps, ToastOptions, ToastProvider, ToastVariant, Toc, TocItem, TocProps, Toggle, ToggleGroup, ToggleGroupItem, ToggleGroupProps, ToggleProps, Toggletip, ToggletipPlacement, ToggletipProps, Tooltip, TooltipProps, TreeNode, TreeView, TreeViewProps, UploaderFile, type UsePopoverOptions, type UsePopoverReturn, type UseTocFromRegionOptions, User, UserProps, VisuallyHidden, VisuallyHiddenProps, createForm, dismissAllToasts, fuzzyScore, treeViewMessages, useForm, usePopover, useToast, useTocFromRegion };
@@ -0,0 +1 @@
1
+ @layer cascivo.component{._root_1mutf_2{border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-surface);background-color:var(--cascivo-color-surface);flex-direction:column;display:flex;overflow:clip}._toolbar_1mutf_11{align-items:center;gap:var(--cascivo-space-2);padding-block:var(--cascivo-space-2);padding-inline:var(--cascivo-space-3);border-block-end:1px solid var(--cascivo-color-border);display:flex}._search_1mutf_20{min-inline-size:0;font:inherit;font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface-raised);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-field);padding-block:var(--cascivo-space-1);padding-inline:var(--cascivo-space-2);flex:0 16rem}._count_1mutf_33{font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-muted)}._spacer_1mutf_38{flex:auto}._toggle_1mutf_42,._copy_1mutf_43{font:inherit;font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface-raised);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-button);padding-block:var(--cascivo-space-1);padding-inline:var(--cascivo-space-3);cursor:pointer}:is(._toggle_1mutf_42,._copy_1mutf_43):hover{background-color:var(--cascivo-color-surface)}:is(._toggle_1mutf_42,._copy_1mutf_43):focus-visible{outline:2px solid var(--cascivo-color-accent);outline-offset:2px}._toggle_1mutf_42[aria-pressed=true]{color:var(--cascivo-color-accent-content,var(--cascivo-color-text-on-accent));background-color:var(--cascivo-color-accent);border-color:var(--cascivo-color-accent)}@media (pointer:coarse){._toggle_1mutf_42,._copy_1mutf_43,._search_1mutf_20{min-block-size:var(--cascivo-target-min-coarse,2.75rem)}}._scroll_1mutf_81{font-family:var(--cascivo-font-mono);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface);line-height:1.45;position:relative;overflow:auto}._scroll_1mutf_81:focus-visible{outline:2px solid var(--cascivo-color-accent);outline-offset:-2px}._sizer_1mutf_96{inline-size:100%;position:relative}._line_1mutf_101{padding-inline:var(--cascivo-space-3);white-space:pre;align-items:center;display:flex;position:absolute;inset-inline:0}._line_1mutf_101[data-level=warn]{color:var(--cascivo-color-warning-foreground)}._line_1mutf_101[data-level=error]{color:var(--cascivo-color-destructive-foreground)}._line_1mutf_101[data-level=debug]{color:var(--cascivo-color-text-subtle)}._line_1mutf_101 mark{color:inherit;background-color:var(--cascivo-color-warning-subtle);border-radius:var(--cascivo-radius-indicator)}._ansi_1mutf_128[data-ansi=red]{color:var(--cascivo-color-error)}._ansi_1mutf_128[data-ansi=green]{color:var(--cascivo-color-success)}._ansi_1mutf_128[data-ansi=yellow]{color:var(--cascivo-color-warning)}._ansi_1mutf_128[data-ansi=blue],._ansi_1mutf_128[data-ansi=cyan]{color:var(--cascivo-color-info)}._ansi_1mutf_128[data-ansi=magenta]{color:var(--cascivo-color-accent)}._ansi_1mutf_128[data-ansi=black],._ansi_1mutf_128[data-ansi=bright-black]{color:var(--cascivo-color-text-muted)}._empty_1mutf_149{padding-block:var(--cascivo-space-6);padding-inline:var(--cascivo-space-3);text-align:center;color:var(--cascivo-color-text-muted)}}
@@ -0,0 +1,184 @@
1
+ "use client";
2
+
3
+ import e from "./log-viewer.module.js";
4
+ import { VisuallyHidden as t, cn as n, useClipboard as r, useComputed as i, useControllableSignal as a, useResizeObserver as o, useSignal as s, useSignalEffect as c, useSignals as l } from "@cascivo/core";
5
+ import { builtin as u, t as d } from "@cascivo/i18n";
6
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
7
+ import { Fragment as m } from "react";
8
+ //#region ../components/src/log-viewer/log-viewer.tsx
9
+ var h = {
10
+ 30: "black",
11
+ 31: "red",
12
+ 32: "green",
13
+ 33: "yellow",
14
+ 34: "blue",
15
+ 35: "magenta",
16
+ 36: "cyan",
17
+ 37: "white",
18
+ 90: "bright-black",
19
+ 91: "red",
20
+ 92: "green",
21
+ 93: "yellow",
22
+ 94: "blue",
23
+ 95: "magenta",
24
+ 96: "cyan",
25
+ 97: "white"
26
+ };
27
+ function g(e) {
28
+ if (!e.includes("\x1B[")) return [{ text: e }];
29
+ try {
30
+ let t = [], n = /\[([0-9;]*)m/g, r = 0, i, a = !1, o;
31
+ for (; (o = n.exec(e)) !== null;) {
32
+ o.index > r && t.push({
33
+ text: e.slice(r, o.index),
34
+ color: i,
35
+ bold: a
36
+ });
37
+ for (let e of o[1].split(";")) {
38
+ let t = Number(e || "0");
39
+ t === 0 ? (i = void 0, a = !1) : t === 1 ? a = !0 : t === 22 ? a = !1 : h[t] && (i = h[t]);
40
+ }
41
+ r = n.lastIndex;
42
+ }
43
+ return r < e.length && t.push({
44
+ text: e.slice(r),
45
+ color: i,
46
+ bold: a
47
+ }), t.length > 0 ? t : [{ text: e }];
48
+ } catch {
49
+ return [{ text: e }];
50
+ }
51
+ }
52
+ function _(e, t, n) {
53
+ if (!t) return e;
54
+ let r = e.toLowerCase(), i = t.toLowerCase(), a = [], o = 0, s = r.indexOf(i, o), c = 0;
55
+ for (; s !== -1;) s > o && a.push(e.slice(o, s)), a.push(/* @__PURE__ */ f("mark", { children: e.slice(s, s + i.length) }, `${n}-${c++}`)), o = s + i.length, s = r.indexOf(i, o);
56
+ return o < e.length && a.push(e.slice(o)), a;
57
+ }
58
+ function v(t, n, r) {
59
+ return (n ? g(t.text) : [{ text: t.text }]).map((n, i) => /* @__PURE__ */ f("span", {
60
+ "data-ansi": n.color,
61
+ style: n.bold ? { fontWeight: 700 } : void 0,
62
+ className: n.color ? e.ansi : void 0,
63
+ children: _(n.text, r, `${String(t.id)}-${i}`)
64
+ }, i));
65
+ }
66
+ function y({ lines: h, rowHeight: g = 20, overscan: _ = 8, follow: y, onFollowChange: b, ansi: x = !1, search: S, maxHeight: C = "24rem", labels: w, className: T, ...E }) {
67
+ l();
68
+ let D = {
69
+ searchPlaceholder: w?.searchPlaceholder ?? d(u.logViewer.search),
70
+ follow: w?.follow ?? d(u.logViewer.follow),
71
+ paused: w?.paused ?? d(u.logViewer.paused),
72
+ copy: w?.copy ?? d(u.logViewer.copy),
73
+ copied: w?.copied ?? d(u.logViewer.copied),
74
+ empty: w?.empty ?? d(u.logViewer.empty),
75
+ label: d(u.logViewer.label)
76
+ }, O = s(Array.isArray(h) ? h : []);
77
+ Array.isArray(h) && (O.value = h);
78
+ let k = Array.isArray(h) ? O : h, { ref: A, size: j } = o(), M = s(0), [N, P] = a({
79
+ value: y,
80
+ defaultValue: !0,
81
+ onChange: b
82
+ }), F = s(S ?? ""), { copied: I, copy: L } = r(), R = i(() => {
83
+ let e = k.value, t = e.length, n = j.value?.height ?? 320, r = Math.max(0, t * g - n), i = N.value ? r : M.value, a = Math.floor(i / g), o = Math.ceil(n / g) + _ * 2, s = Math.max(0, a - _), c = Math.min(t, s + o);
84
+ return {
85
+ total: t,
86
+ start: s,
87
+ end: c,
88
+ rows: e.slice(s, c)
89
+ };
90
+ }), z = i(() => {
91
+ let e = F.value.trim().toLowerCase();
92
+ if (!e) return 0;
93
+ let t = 0;
94
+ for (let n of k.value) n.text.toLowerCase().includes(e) && t++;
95
+ return t;
96
+ });
97
+ c(() => {
98
+ if (k.value, !N.value) return;
99
+ let e = A.current;
100
+ e && (e.scrollTop = e.scrollHeight);
101
+ });
102
+ let B = (e) => {
103
+ let t = e.currentTarget;
104
+ M.value = t.scrollTop, P(t.scrollHeight - t.clientHeight - t.scrollTop <= g);
105
+ }, V = R.value, H = F.value.trim();
106
+ return /* @__PURE__ */ p("div", {
107
+ className: n(e.root, T),
108
+ ...E,
109
+ children: [
110
+ /* @__PURE__ */ p("div", {
111
+ className: e.toolbar,
112
+ children: [
113
+ /* @__PURE__ */ f("input", {
114
+ type: "search",
115
+ className: e.search,
116
+ placeholder: D.searchPlaceholder,
117
+ "aria-label": D.searchPlaceholder,
118
+ value: F.value,
119
+ onInput: (e) => {
120
+ F.value = e.currentTarget.value;
121
+ }
122
+ }),
123
+ H ? /* @__PURE__ */ f("span", {
124
+ className: e.count,
125
+ "aria-live": "polite",
126
+ children: d(u.logViewer.matches, { count: z.value })
127
+ }) : null,
128
+ /* @__PURE__ */ f("span", { className: e.spacer }),
129
+ /* @__PURE__ */ f("button", {
130
+ type: "button",
131
+ className: e.toggle,
132
+ "aria-pressed": N.value,
133
+ onClick: () => {
134
+ let e = !N.value;
135
+ if (P(e), e) {
136
+ let e = A.current;
137
+ e && (e.scrollTop = e.scrollHeight);
138
+ }
139
+ },
140
+ children: N.value ? D.follow : D.paused
141
+ }),
142
+ /* @__PURE__ */ f("button", {
143
+ type: "button",
144
+ className: e.copy,
145
+ onClick: () => void L(k.value.map((e) => e.text).join("\n")),
146
+ children: I.value ? D.copied : D.copy
147
+ })
148
+ ]
149
+ }),
150
+ /* @__PURE__ */ f("div", {
151
+ ref: A,
152
+ className: e.scroll,
153
+ role: "log",
154
+ "aria-live": "polite",
155
+ "aria-label": D.label,
156
+ tabIndex: 0,
157
+ style: { maxBlockSize: C },
158
+ onScroll: B,
159
+ children: V.total === 0 ? /* @__PURE__ */ f("div", {
160
+ className: e.empty,
161
+ children: D.empty
162
+ }) : /* @__PURE__ */ f("div", {
163
+ className: e.sizer,
164
+ style: { blockSize: V.total * g },
165
+ children: V.rows.map((t, n) => /* @__PURE__ */ f(m, { children: /* @__PURE__ */ f("div", {
166
+ className: e.line,
167
+ "data-level": t.level,
168
+ style: {
169
+ insetBlockStart: (V.start + n) * g,
170
+ blockSize: g
171
+ },
172
+ children: v(t, x, H)
173
+ }) }, t.id))
174
+ })
175
+ }),
176
+ /* @__PURE__ */ f(t, {
177
+ "aria-live": "polite",
178
+ children: d(u.logViewer.lines, { count: V.total })
179
+ })
180
+ ]
181
+ });
182
+ }
183
+ //#endregion
184
+ export { y as LogViewer };
@@ -0,0 +1,19 @@
1
+ "use client";
2
+
3
+ import './log-viewer.css';
4
+ var e = {
5
+ root: "_root_1mutf_2",
6
+ toolbar: "_toolbar_1mutf_11",
7
+ search: "_search_1mutf_20",
8
+ count: "_count_1mutf_33",
9
+ spacer: "_spacer_1mutf_38",
10
+ toggle: "_toggle_1mutf_42",
11
+ copy: "_copy_1mutf_43",
12
+ scroll: "_scroll_1mutf_81",
13
+ sizer: "_sizer_1mutf_96",
14
+ line: "_line_1mutf_101",
15
+ ansi: "_ansi_1mutf_128",
16
+ empty: "_empty_1mutf_149"
17
+ };
18
+ //#endregion
19
+ export { e as default };
@@ -1 +1 @@
1
- @layer cascivo.component{._trigger_1eutv_2{padding:var(--cascivo-space-1);border-radius:var(--cascivo-radius-control);color:inherit;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;display:inline-flex}._trigger_1eutv_2:hover{background:var(--cascivo-color-active-bg)}._trigger_1eutv_2:focus-visible{outline:var(--cascivo-focus-ring);outline-offset:2px}._panel_1eutv_23{padding:var(--cascivo-space-1);background:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-overlay);min-width:10rem;box-shadow:var(--cascivo-shadow-md);margin:0;position:fixed;inset:auto}@supports (anchor-name:--a){._panel_1eutv_23{position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;inset-block-start:anchor(end);inset-inline-start:anchor(start)}}._panel_1eutv_23{opacity:1;transition:opacity var(--cascivo-motion-enter), translate var(--cascivo-motion-enter), display var(--cascivo-motion-enter) allow-discrete, overlay var(--cascivo-motion-enter) allow-discrete;translate:0}@starting-style{._panel_1eutv_23{opacity:0;translate:0 calc(-1 * var(--cascivo-space-2))}}._panel_1eutv_23[data-state=closed]{opacity:0;translate:0 calc(-1 * var(--cascivo-space-2));transition:opacity var(--cascivo-motion-exit), translate var(--cascivo-motion-exit), display var(--cascivo-motion-exit) allow-discrete, overlay var(--cascivo-motion-exit) allow-discrete}._item_1eutv_67{align-items:center;gap:var(--cascivo-space-2);padding:var(--cascivo-space-2) var(--cascivo-space-3);border-radius:var(--cascivo-radius-item);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);cursor:pointer;-webkit-user-select:none;user-select:none;outline:none;display:flex}._item_1eutv_67:hover,._item_1eutv_67:focus-visible{background:var(--cascivo-color-bg-subtle)}._item_1eutv_67[aria-disabled=true]{opacity:.5;cursor:not-allowed}._separator_1eutv_90{height:1px;margin-block:var(--cascivo-space-1);background:var(--cascivo-color-border)}}
1
+ @layer cascivo.component{._trigger_11vpw_2{min-block-size:1.5rem;min-inline-size:1.5rem;padding:var(--cascivo-space-1);border-radius:var(--cascivo-radius-control);color:inherit;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;display:inline-flex}._trigger_11vpw_2:hover{background:var(--cascivo-color-active-bg)}._trigger_11vpw_2:focus-visible{outline:var(--cascivo-focus-ring);outline-offset:2px}._panel_11vpw_25{padding:var(--cascivo-space-1);background:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-overlay);min-width:10rem;box-shadow:var(--cascivo-shadow-md);margin:0;position:fixed;inset:auto}@supports (anchor-name:--a){._panel_11vpw_25{position-try-fallbacks:flip-block, flip-inline, flip-block flip-inline;inset-block-start:anchor(end);inset-inline-start:anchor(start)}}._panel_11vpw_25{opacity:1;transition:opacity var(--cascivo-motion-enter), translate var(--cascivo-motion-enter), display var(--cascivo-motion-enter) allow-discrete, overlay var(--cascivo-motion-enter) allow-discrete;translate:0}@starting-style{._panel_11vpw_25{opacity:0;translate:0 calc(-1 * var(--cascivo-space-2))}}._panel_11vpw_25[data-state=closed]{opacity:0;translate:0 calc(-1 * var(--cascivo-space-2));transition:opacity var(--cascivo-motion-exit), translate var(--cascivo-motion-exit), display var(--cascivo-motion-exit) allow-discrete, overlay var(--cascivo-motion-exit) allow-discrete}._item_11vpw_69{align-items:center;gap:var(--cascivo-space-2);padding:var(--cascivo-space-2) var(--cascivo-space-3);border-radius:var(--cascivo-radius-item);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);cursor:pointer;-webkit-user-select:none;user-select:none;outline:none;display:flex}._item_11vpw_69:hover,._item_11vpw_69:focus-visible{background:var(--cascivo-color-bg-subtle)}._item_11vpw_69[aria-disabled=true]{opacity:.5;cursor:not-allowed}._separator_11vpw_92{height:1px;margin-block:var(--cascivo-space-1);background:var(--cascivo-color-border)}}
@@ -2,10 +2,10 @@
2
2
 
3
3
  import './menu.css';
4
4
  var e = {
5
- trigger: "_trigger_1eutv_2",
6
- panel: "_panel_1eutv_23",
7
- item: "_item_1eutv_67",
8
- separator: "_separator_1eutv_90"
5
+ trigger: "_trigger_11vpw_2",
6
+ panel: "_panel_11vpw_25",
7
+ item: "_item_11vpw_69",
8
+ separator: "_separator_11vpw_92"
9
9
  };
10
10
  //#endregion
11
11
  export { e as default };
@@ -55,8 +55,6 @@ function f({ options: f, value: p, onValueChange: m, placeholder: h, disabled: g
55
55
  }), /* @__PURE__ */ u("div", {
56
56
  ref: b.popoverRef,
57
57
  popover: "auto",
58
- role: "listbox",
59
- "aria-multiselectable": "true",
60
58
  className: t.panel,
61
59
  style: { positionAnchor: b.anchorName },
62
60
  tabIndex: -1,
@@ -74,6 +72,9 @@ function f({ options: f, value: p, onValueChange: m, placeholder: h, disabled: g
74
72
  })
75
73
  }), /* @__PURE__ */ l("div", {
76
74
  ref: C,
75
+ role: "listbox",
76
+ "aria-multiselectable": "true",
77
+ "aria-label": _?.label ?? c(s.multiSelect.label),
77
78
  className: t.options,
78
79
  children: T.value.length === 0 ? /* @__PURE__ */ l("div", {
79
80
  className: t["no-results"],