@ramme-io/ui 4.0.1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/README.md +158 -7
  2. package/dist/blocks/ai/Actions.js +2 -2
  3. package/dist/blocks/ai/PromptInput.js +6 -6
  4. package/dist/component-registry.js +386 -359
  5. package/dist/components/ai/AIChatThread/AIChatThread.js +81 -73
  6. package/dist/components/ai/ArchitectureReferenceCard/ArchitectureReferenceCard.d.ts +28 -0
  7. package/dist/components/ai/ArchitectureReferenceCard/ArchitectureReferenceCard.js +70 -0
  8. package/dist/components/ai/ArchitectureReferenceCard/index.d.ts +2 -0
  9. package/dist/components/ai/CounterpartyGraphCard/CounterpartyGraphCard.d.ts +30 -0
  10. package/dist/components/ai/CounterpartyGraphCard/CounterpartyGraphCard.js +82 -0
  11. package/dist/components/ai/CounterpartyGraphCard/index.d.ts +2 -0
  12. package/dist/components/ai/DivergenceMetricsCard/DivergenceMetricsCard.d.ts +29 -0
  13. package/dist/components/ai/DivergenceMetricsCard/DivergenceMetricsCard.js +69 -0
  14. package/dist/components/ai/DivergenceMetricsCard/index.d.ts +2 -0
  15. package/dist/components/ai/KeyInjectionOverlay.d.ts +10 -0
  16. package/dist/components/ai/KeyInjectionOverlay.js +11 -11
  17. package/dist/components/auth/AuthLayout.js +4 -4
  18. package/dist/components/data-display/CodeBlock.d.ts +33 -7
  19. package/dist/components/data-display/CodeBlock.js +134 -41
  20. package/dist/components/data-display/Table.js +8 -8
  21. package/dist/components/feedback/EmptyState.js +9 -9
  22. package/dist/components/feedback/ToastProvider.js +4 -4
  23. package/dist/components/forms/Checkbox.js +5 -5
  24. package/dist/components/forms/Radio.js +6 -6
  25. package/dist/components/forms/SegmentedControl.d.ts +1 -1
  26. package/dist/components/forms/SegmentedControl.js +28 -11
  27. package/dist/components/forms/Textarea.js +9 -9
  28. package/dist/components/forms/ToggleSwitch.js +9 -9
  29. package/dist/components/layout/AboutRamme.d.ts +8 -0
  30. package/dist/components/layout/Accordion.js +13 -13
  31. package/dist/components/layout/AppShell.js +7 -7
  32. package/dist/components/layout/DetailDrawer.js +2 -2
  33. package/dist/components/layout/Drawer.js +50 -51
  34. package/dist/components/layout/List.js +9 -9
  35. package/dist/components/layout/Modal.js +5 -5
  36. package/dist/components/layout/PageHeader.js +7 -7
  37. package/dist/components/layout/SectionHeader.js +4 -4
  38. package/dist/components/layout/SettingsContainer.d.ts +12 -0
  39. package/dist/components/layout/SettingsContainer.js +20 -18
  40. package/dist/components/layout/Sidebar.js +1 -1
  41. package/dist/components/layout/UserNav.d.ts +13 -0
  42. package/dist/components/layout/UserNav.js +17 -17
  43. package/dist/components/molecular/ConnectorOverlay.d.ts +12 -0
  44. package/dist/components/navigation/Breadcrumbs.js +8 -8
  45. package/dist/components/navigation/Menu.js +6 -6
  46. package/dist/components/navigation/MobileNav.js +1 -1
  47. package/dist/components/navigation/Pagination.js +46 -41
  48. package/dist/components/navigation/Stepper.js +17 -17
  49. package/dist/components/navigation/Tabs.js +12 -12
  50. package/dist/components/theme/ThemeLab.d.ts +7 -1
  51. package/dist/components/theme/ThemeLab.js +175 -154
  52. package/dist/contexts/ThemeContext.js +111 -82
  53. package/dist/data/mockData.d.ts +0 -3
  54. package/dist/index.css +1 -1
  55. package/dist/index.d.ts +8 -0
  56. package/dist/index.js +203 -185
  57. package/dist/lib/hooks/useBodyScrollLock.d.ts +27 -0
  58. package/dist/lib/hooks/useBodyScrollLock.js +18 -0
  59. package/dist/lib/theme/themeUtils.d.ts +21 -0
  60. package/dist/lib/theme/themeUtils.js +31 -17
  61. package/dist/wizardManifest.js +234 -9
  62. package/package.json +2 -3
  63. package/src/wizardManifest.ts +234 -9
  64. package/tailwind.preset.js +98 -10
@@ -1,8 +1,8 @@
1
- import { jsx as n, jsxs as m } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
2
  import d, { useState as u, useCallback as f } from "react";
3
- const g = ({ id: e, header: r, children: i, isOpen: t, onToggle: a }) => {
4
- const [c, o] = u(t !== void 0 ? t : !1), s = t !== void 0, l = s ? t : c, h = f(() => {
5
- s && a ? a(e, !l) : o((v) => !v);
3
+ const x = ({ id: e, header: r, children: i, isOpen: n, onToggle: a }) => {
4
+ const [c, o] = u(n !== void 0 ? n : !1), s = n !== void 0, l = s ? n : c, h = f(() => {
5
+ s && a ? a(e, !l) : o((g) => !g);
6
6
  }, [e, l, s, a]), p = `transform transition-transform duration-300 ${l ? "rotate-180" : "rotate-0"}`;
7
7
  return /* @__PURE__ */ m("div", { className: "border border-border rounded-md overflow-hidden", children: [
8
8
  /* @__PURE__ */ m(
@@ -12,16 +12,16 @@ const g = ({ id: e, header: r, children: i, isOpen: t, onToggle: a }) => {
12
12
  "aria-expanded": l,
13
13
  "aria-controls": `accordion-panel-${e}`,
14
14
  onClick: h,
15
- className: "flex items-center justify-between w-full p-4 text-text bg-background hover:bg-background/80 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",
15
+ className: "flex items-center justify-between w-full p-4 text-foreground bg-background hover:bg-background/80 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",
16
16
  role: "heading",
17
17
  "aria-level": 3,
18
18
  children: [
19
- /* @__PURE__ */ n("span", { className: "text-xl font-semibold", children: r }),
20
- /* @__PURE__ */ n("svg", { className: `w-6 h-6 text-text ${p}`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ n("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })
19
+ /* @__PURE__ */ t("span", { className: "text-xl font-semibold", children: r }),
20
+ /* @__PURE__ */ t("svg", { className: `w-6 h-6 text-foreground ${p}`, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })
21
21
  ]
22
22
  }
23
23
  ),
24
- /* @__PURE__ */ n(
24
+ /* @__PURE__ */ t(
25
25
  "div",
26
26
  {
27
27
  id: `accordion-panel-${e}`,
@@ -33,20 +33,20 @@ const g = ({ id: e, header: r, children: i, isOpen: t, onToggle: a }) => {
33
33
  overflow: "hidden",
34
34
  transition: "max-height 0.3s ease-in-out"
35
35
  },
36
- children: /* @__PURE__ */ n("div", { className: "p-4 bg-card", children: i })
36
+ children: /* @__PURE__ */ t("div", { className: "p-4 bg-card", children: i })
37
37
  }
38
38
  )
39
39
  ] });
40
40
  }, w = ({ children: e, singleOpen: r = !1, className: i }) => {
41
- const [t, a] = u(null), c = f((o, s) => {
41
+ const [n, a] = u(null), c = f((o, s) => {
42
42
  r && a(s ? o : null);
43
43
  }, [r]);
44
- return /* @__PURE__ */ n("div", { className: `space-y-4 ${i || ""}`, children: d.Children.map(e, (o) => d.isValidElement(o) ? d.cloneElement(o, {
45
- isOpen: r ? o.props.id === t : void 0,
44
+ return /* @__PURE__ */ t("div", { className: `space-y-4 ${i || ""}`, children: d.Children.map(e, (o) => d.isValidElement(o) ? d.cloneElement(o, {
45
+ isOpen: r ? o.props.id === n : void 0,
46
46
  onToggle: r ? c : void 0
47
47
  }) : o) });
48
48
  };
49
49
  export {
50
50
  w as Accordion,
51
- g as AccordionItem
51
+ x as AccordionItem
52
52
  };
@@ -6,9 +6,9 @@ import { useIsMobile as A } from "../../lib/hooks/useMediaQuery.js";
6
6
  const M = D.forwardRef(({
7
7
  className: p,
8
8
  layoutPreset: s = "dashboard",
9
- sidebarSlot: c,
10
- headerSlot: a,
11
- toolbarSlot: i,
9
+ sidebarSlot: a,
10
+ headerSlot: i,
11
+ toolbarSlot: c,
12
12
  statusbarSlot: d,
13
13
  inspectorSlot: w,
14
14
  onLogoTrigger: o,
@@ -36,15 +36,15 @@ const M = D.forwardRef(({
36
36
  {
37
37
  ref: C,
38
38
  className: x(
39
- "flex h-screen w-screen overflow-hidden bg-background text-foreground text-sm font-sans transition-colors duration-300",
39
+ "flex h-dvh w-full overflow-hidden bg-background text-foreground text-sm font-sans transition-colors duration-300",
40
40
  p
41
41
  ),
42
42
  ...z,
43
43
  children: [
44
- !l && c && /* @__PURE__ */ e("aside", { className: "w-sidebar flex-shrink-0 flex flex-col border-r border-border bg-card shadow-sm z-20", children: c }),
44
+ !l && a && /* @__PURE__ */ e("aside", { className: "w-sidebar flex-shrink-0 flex flex-col border-r border-border bg-card shadow-sm z-20", children: a }),
45
45
  /* @__PURE__ */ b("div", { className: "flex flex-col flex-1 min-w-0 h-full relative z-10", children: [
46
- !l && a && /* @__PURE__ */ e("header", { className: "h-header flex-shrink-0 w-full border-b border-border bg-background/80 backdrop-blur-md sticky top-0 z-30 flex items-center px-4", children: a }),
47
- !l && i && /* @__PURE__ */ e("div", { className: "h-toolbar flex-shrink-0 w-full border-b border-border bg-muted/30 flex items-center px-4 shadow-sm z-20", children: i }),
46
+ !l && i && /* @__PURE__ */ e("header", { className: "h-header flex-shrink-0 w-full border-b border-border bg-background/80 backdrop-blur-md sticky top-0 z-30 flex items-center px-4", children: i }),
47
+ !l && c && /* @__PURE__ */ e("div", { className: "h-toolbar flex-shrink-0 w-full border-b border-border bg-muted/30 flex items-center px-4 shadow-sm z-20", children: c }),
48
48
  /* @__PURE__ */ e("main", { className: x(
49
49
  "flex-1 overflow-y-auto custom-scrollbar relative @container",
50
50
  E ? "p-0" : "p-fluid-md @md:p-fluid-lg"
@@ -41,7 +41,7 @@ const S = ({
41
41
  {
42
42
  className: h(
43
43
  "flex flex-col border-border bg-card shadow-2xl transition-transform duration-300",
44
- l ? `fixed inset-y-0 ${w} z-50 w-full sm:w-[420px] animate-in ${t === "right" ? "slide-in-from-right" : "slide-in-from-left"}` : `relative h-full flex-shrink-0 ${w}`
44
+ l ? `fixed inset-y-0 ${w} z-drawer w-full sm:w-[420px] animate-in ${t === "right" ? "slide-in-from-right" : "slide-in-from-left"}` : `relative h-full flex-shrink-0 ${w}`
45
45
  ),
46
46
  style: l ? void 0 : { width: `min(100vw, ${p}px)` },
47
47
  children: [
@@ -75,7 +75,7 @@ const S = ({
75
75
  /* @__PURE__ */ r(
76
76
  "div",
77
77
  {
78
- className: "fixed inset-0 z-40 bg-background/80 backdrop-blur-sm transition-opacity",
78
+ className: "fixed inset-0 z-scrim bg-background/80 backdrop-blur-sm transition-opacity",
79
79
  onClick: n
80
80
  }
81
81
  ),
@@ -1,27 +1,28 @@
1
- import { jsx as o, jsxs as b } from "react/jsx-runtime";
2
- import { useState as g, useRef as z, useCallback as s, useEffect as c } from "react";
3
- import { createPortal as F } from "react-dom";
4
- import { Icon as L } from "../ui/Icon.js";
5
- import { cn as p } from "../../utils/cn.js";
6
- const A = {
1
+ import { jsx as r, jsxs as b } from "react/jsx-runtime";
2
+ import { useState as p, useRef as L, useCallback as s, useEffect as y } from "react";
3
+ import { createPortal as z } from "react-dom";
4
+ import { Icon as F } from "../ui/Icon.js";
5
+ import { cn as g } from "../../utils/cn.js";
6
+ import { useBodyScrollLock as A } from "../../lib/hooks/useBodyScrollLock.js";
7
+ const P = {
7
8
  sm: "320px",
8
9
  md: "480px",
9
10
  lg: "640px",
10
11
  xl: "80vw",
11
12
  full: "100vw"
12
- }, V = ({
13
- isOpen: t,
14
- onClose: l,
13
+ }, W = ({
14
+ isOpen: o,
15
+ onClose: n,
15
16
  children: v,
16
- footer: f,
17
- position: n = "right",
18
- size: u = "md",
17
+ footer: d,
18
+ position: l = "right",
19
+ size: f = "md",
19
20
  title: m,
20
21
  className: k,
21
- overlayDismiss: h = !0
22
+ overlayDismiss: u = !0
22
23
  }) => {
23
- const [i, x] = g(!1), [w, y] = g(!1), d = z(null), C = (e) => A[e] || e, E = s(() => {
24
- switch (n) {
24
+ const [i, x] = p(!1), [h, w] = p(!1), c = L(null), S = (e) => P[e] || e, C = s(() => {
25
+ switch (l) {
25
26
  case "left":
26
27
  return { from: "-translate-x-full", to: "translate-x-0", positionClass: "left-0 top-0 h-full" };
27
28
  case "right":
@@ -33,62 +34,60 @@ const A = {
33
34
  default:
34
35
  return { from: "translate-x-full", to: "translate-x-0", positionClass: "right-0 top-0 h-full" };
35
36
  }
36
- }, [n]), S = s(() => {
37
- const e = {}, r = C(u);
38
- return n === "left" || n === "right" ? (e.width = r, e.maxWidth = "100dvw") : (e.height = r, e.maxHeight = "100dvh"), e;
39
- }, [n, u]), { from: N, to: T, positionClass: R } = E(), I = S();
40
- c(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
41
- document.body.style.overflow = "";
42
- }), [t]), c(() => {
43
- let e, r;
44
- return t ? (x(!0), e = requestAnimationFrame(() => {
45
- r = window.setTimeout(() => y(!0), 10);
46
- })) : (y(!1), r = window.setTimeout(() => x(!1), 500)), () => {
47
- cancelAnimationFrame(e), clearTimeout(r);
37
+ }, [l]), E = s(() => {
38
+ const e = {}, t = S(f);
39
+ return l === "left" || l === "right" ? (e.width = t, e.maxWidth = "100dvw") : (e.height = t, e.maxHeight = "100dvh"), e;
40
+ }, [l, f]), { from: N, to: T, positionClass: R } = C(), j = E();
41
+ A(o), y(() => {
42
+ let e, t;
43
+ return o ? (x(!0), e = requestAnimationFrame(() => {
44
+ t = window.setTimeout(() => w(!0), 10);
45
+ })) : (w(!1), t = window.setTimeout(() => x(!1), 500)), () => {
46
+ cancelAnimationFrame(e), clearTimeout(t);
48
47
  };
49
- }, [t]);
50
- const j = s((e) => {
51
- h && d.current && !d.current.contains(e.target) && l();
52
- }, [l, h]), a = s((e) => {
53
- e.key === "Escape" && t && l();
54
- }, [t, l]);
55
- return c(() => (i ? document.addEventListener("keydown", a) : document.removeEventListener("keydown", a), () => document.removeEventListener("keydown", a)), [i, a]), i ? F(
56
- /* @__PURE__ */ o(
48
+ }, [o]);
49
+ const I = s((e) => {
50
+ u && c.current && !c.current.contains(e.target) && n();
51
+ }, [n, u]), a = s((e) => {
52
+ e.key === "Escape" && o && n();
53
+ }, [o, n]);
54
+ return y(() => (i ? document.addEventListener("keydown", a) : document.removeEventListener("keydown", a), () => document.removeEventListener("keydown", a)), [i, a]), i ? z(
55
+ /* @__PURE__ */ r(
57
56
  "div",
58
57
  {
59
- className: p(
60
- "fixed inset-0 z-50 flex transition-opacity duration-500 ease-in-out",
61
- w ? "opacity-100" : "opacity-0",
58
+ className: g(
59
+ "fixed inset-0 z-drawer flex transition-opacity duration-500 ease-in-out",
60
+ h ? "opacity-100" : "opacity-0",
62
61
  "bg-black/50"
63
62
  ),
64
- onClick: j,
63
+ onClick: I,
65
64
  children: /* @__PURE__ */ b(
66
65
  "div",
67
66
  {
68
- ref: d,
69
- style: I,
70
- className: p(
67
+ ref: c,
68
+ style: j,
69
+ className: g(
71
70
  "fixed bg-card border-border text-foreground shadow-xl flex flex-col",
72
71
  "transform transition-transform duration-500 ease-out",
73
72
  R,
74
- w ? T : N,
73
+ h ? T : N,
75
74
  k
76
75
  ),
77
76
  children: [
78
77
  /* @__PURE__ */ b("div", { className: "flex justify-between items-center p-4 border-b border-border flex-shrink-0", children: [
79
- m && /* @__PURE__ */ o("h3", { className: "text-xl font-semibold", children: m }),
80
- /* @__PURE__ */ o(
78
+ m && /* @__PURE__ */ r("h3", { className: "text-xl font-semibold", children: m }),
79
+ /* @__PURE__ */ r(
81
80
  "button",
82
81
  {
83
- onClick: l,
84
- className: "text-muted-foreground hover:text-foreground transition-colors",
82
+ onClick: n,
83
+ className: "-mr-2 inline-flex min-h-11 min-w-11 items-center justify-center text-muted-foreground hover:text-foreground transition-colors",
85
84
  "aria-label": "Close drawer",
86
- children: /* @__PURE__ */ o(L, { name: "x", size: 24 })
85
+ children: /* @__PURE__ */ r(F, { name: "x", size: 24 })
87
86
  }
88
87
  )
89
88
  ] }),
90
- /* @__PURE__ */ o("div", { className: "flex-grow p-4 overflow-y-auto", children: v }),
91
- f && /* @__PURE__ */ o("div", { className: "p-4 border-t border-border flex-shrink-0 bg-card", children: f })
89
+ /* @__PURE__ */ r("div", { className: "flex-grow p-4 overflow-y-auto overscroll-contain", children: v }),
90
+ d && /* @__PURE__ */ r("div", { className: "p-4 border-t border-border flex-shrink-0 bg-card", children: d })
92
91
  ]
93
92
  }
94
93
  )
@@ -98,5 +97,5 @@ const A = {
98
97
  ) : null;
99
98
  };
100
99
  export {
101
- V as Drawer
100
+ W as Drawer
102
101
  };
@@ -1,16 +1,16 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import i from "react";
3
- const y = ({ children: t, className: e, ...s }) => /* @__PURE__ */ n("li", { className: `mb-1 last:mb-0 text-text ${e || ""}`, ...s, children: t }), b = ({ type: t = "ul", children: e, className: s, ...l }) => {
4
- const o = "space-y-1", a = "text-text", c = t === "ol" ? "ol" : "ul";
5
- return i.createElement(
6
- c,
7
- { className: `${o} ${a} ${s || ""}`, ...l },
8
- e
2
+ import c from "react";
3
+ const y = ({ children: e, className: t, ...s }) => /* @__PURE__ */ n("li", { className: `mb-1 last:mb-0 text-foreground ${t || ""}`, ...s, children: e }), b = ({ type: e = "ul", children: t, className: s, ...o }) => {
4
+ const l = "space-y-1", r = "text-foreground", a = e === "ol" ? "ol" : "ul";
5
+ return c.createElement(
6
+ a,
7
+ { className: `${l} ${r} ${s || ""}`, ...o },
8
+ t
9
9
  );
10
- }, S = ({ children: t, className: e, ...s }) => /* @__PURE__ */ n("dt", { className: `font-semibold text-text ${e || ""}`, ...s, children: t }), $ = ({ children: t, className: e, ...s }) => /* @__PURE__ */ n("dd", { className: `ml-4 text-text ${e || ""}`, ...s, children: t }), x = ({ children: t, className: e, ...s }) => /* @__PURE__ */ n("dl", { className: `space-y-2 ${e || ""}`, ...s, children: t });
10
+ }, S = ({ children: e, className: t, ...s }) => /* @__PURE__ */ n("dt", { className: `font-semibold text-foreground ${t || ""}`, ...s, children: e }), $ = ({ children: e, className: t, ...s }) => /* @__PURE__ */ n("dd", { className: `ml-4 text-foreground ${t || ""}`, ...s, children: e }), u = ({ children: e, className: t, ...s }) => /* @__PURE__ */ n("dl", { className: `space-y-2 ${t || ""}`, ...s, children: e });
11
11
  export {
12
12
  $ as DefinitionDescription,
13
- x as DefinitionList,
13
+ u as DefinitionList,
14
14
  S as DefinitionTerm,
15
15
  b as List,
16
16
  y as ListItem
@@ -1,16 +1,16 @@
1
- import { jsx as e, jsxs as a } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
2
  import { useRef as m, useCallback as f, useEffect as u } from "react";
3
3
  import { createPortal as b } from "react-dom";
4
4
  import { Icon as x } from "../ui/Icon.js";
5
5
  import { cn as v } from "../../utils/cn.js";
6
- const N = ({ isOpen: r, onClose: o, children: n, title: d, footer: t, className: i }) => {
6
+ const N = ({ isOpen: r, onClose: o, children: n, title: d, footer: a, className: i }) => {
7
7
  const s = m(null), l = f((c) => {
8
8
  c.key === "Escape" && r && o();
9
9
  }, [r, o]);
10
10
  return u(() => (document.addEventListener("keydown", l, !1), () => {
11
11
  document.removeEventListener("keydown", l, !1);
12
12
  }), [l]), r ? b(
13
- /* @__PURE__ */ e("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50", children: /* @__PURE__ */ a(
13
+ /* @__PURE__ */ e("div", { className: "fixed inset-0 z-drawer flex items-center justify-center p-4 bg-black/50", children: /* @__PURE__ */ t(
14
14
  "div",
15
15
  {
16
16
  ref: s,
@@ -23,7 +23,7 @@ const N = ({ isOpen: r, onClose: o, children: n, title: d, footer: t, className:
23
23
  "aria-modal": "true",
24
24
  "aria-labelledby": d ? "modal-title" : void 0,
25
25
  children: [
26
- /* @__PURE__ */ a("div", { className: "flex justify-between items-center p-4 border-b border-border", children: [
26
+ /* @__PURE__ */ t("div", { className: "flex justify-between items-center p-4 border-b border-border", children: [
27
27
  d && /* @__PURE__ */ e("h3", { id: "modal-title", className: "text-xl font-semibold", children: d }),
28
28
  /* @__PURE__ */ e(
29
29
  "button",
@@ -36,7 +36,7 @@ const N = ({ isOpen: r, onClose: o, children: n, title: d, footer: t, className:
36
36
  )
37
37
  ] }),
38
38
  /* @__PURE__ */ e("div", { className: "p-4", children: n }),
39
- t && /* @__PURE__ */ e("div", { className: "p-4 border-t border-border flex justify-end space-x-2", children: t })
39
+ a && /* @__PURE__ */ e("div", { className: "p-4 border-t border-border flex justify-end space-x-2", children: a })
40
40
  ]
41
41
  }
42
42
  ) }),
@@ -1,11 +1,11 @@
1
- import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
- const a = ({ title: d, description: r, actions: l, className: s }) => /* @__PURE__ */ t("div", { className: `flex flex-col @md:flex-row @md:items-center @md:justify-between gap-4 py-4 border-b border-border ${s || ""}`, children: [
3
- /* @__PURE__ */ t("div", { className: "flex-grow", children: [
4
- /* @__PURE__ */ e("h1", { className: "text-3xl font-bold text-text", children: d }),
5
- r && /* @__PURE__ */ e("p", { className: "mt-1 text-text-light", children: r })
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ const m = ({ title: s, description: r, actions: d, className: t }) => /* @__PURE__ */ l("div", { className: `flex flex-col @md:flex-row @md:items-center @md:justify-between gap-4 py-4 border-b border-border ${t || ""}`, children: [
3
+ /* @__PURE__ */ l("div", { className: "flex-grow", children: [
4
+ /* @__PURE__ */ e("h1", { className: "text-3xl font-bold text-foreground", children: s }),
5
+ r && /* @__PURE__ */ e("p", { className: "mt-1 text-muted-foreground", children: r })
6
6
  ] }),
7
- l && /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: l })
7
+ d && /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: d })
8
8
  ] });
9
9
  export {
10
- a as PageHeader
10
+ m as PageHeader
11
11
  };
@@ -1,7 +1,7 @@
1
- import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
- const m = ({ title: r, description: e, className: o }) => /* @__PURE__ */ s("div", { className: `pb-2 border-b border-border mb-6 ${o || ""}`, children: [
3
- /* @__PURE__ */ t("h2", { className: "text-xl font-semibold text-text", children: r }),
4
- e && /* @__PURE__ */ t("p", { className: "mt-1 text-sm text-muted-foreground opacity-70", children: e })
1
+ import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
+ const m = ({ title: t, description: e, className: o }) => /* @__PURE__ */ d("div", { className: `pb-2 border-b border-border mb-6 ${o || ""}`, children: [
3
+ /* @__PURE__ */ r("h2", { className: "text-xl font-semibold text-foreground", children: t }),
4
+ e && /* @__PURE__ */ r("p", { className: "mt-1 text-sm text-muted-foreground opacity-70", children: e })
5
5
  ] });
6
6
  export {
7
7
  m as SectionHeader
@@ -33,6 +33,18 @@ export interface SettingsContainerProps {
33
33
  * Override to inject custom about content.
34
34
  */
35
35
  aboutSlot?: React.ReactNode;
36
+ /**
37
+ * Which tab opens first. Defaults to 'general' so existing callers are
38
+ * unchanged; a theme-focused surface passes 'theme-lab' so the editor is not
39
+ * one click behind an app-name form.
40
+ */
41
+ defaultTab?: 'general' | 'ai-gateway' | 'theme-lab' | 'about';
42
+ /**
43
+ * Heading above the tabs. Pass `null` when the container that holds this
44
+ * already has a title — a drawer labelled "Theme Studio" does not need a
45
+ * second heading reading "Settings".
46
+ */
47
+ title?: React.ReactNode;
36
48
  /** Additional CSS classes for the outermost container. */
37
49
  className?: string;
38
50
  }
@@ -1,22 +1,24 @@
1
- import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import { Tabs as m, TabPanel as t } from "../navigation/Tabs.js";
3
- import { cn as d } from "../../utils/cn.js";
4
- import { AboutRamme as b } from "./AboutRamme.js";
5
- const g = ({
6
- generalSlot: l,
7
- aiGatewaySlot: r,
8
- themeLabSlot: i,
9
- aboutSlot: n = /* @__PURE__ */ e(b, {}),
10
- className: o
11
- }) => /* @__PURE__ */ a("div", { className: d("w-full p-4 md:p-6", o), children: [
12
- /* @__PURE__ */ e("h2", { className: "text-2xl font-bold tracking-tight text-foreground mb-4", children: "Settings" }),
13
- /* @__PURE__ */ a(m, { defaultActiveTab: "general", size: "sm", children: [
14
- /* @__PURE__ */ e(t, { id: "general", label: "General", children: l }),
15
- /* @__PURE__ */ e(t, { id: "ai-gateway", label: "AI Gateway", children: r }),
16
- /* @__PURE__ */ e(t, { id: "theme-lab", label: "Theme Lab", children: i }),
17
- /* @__PURE__ */ e(t, { id: "about", label: "About", children: n })
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { Tabs as b, TabPanel as l } from "../navigation/Tabs.js";
3
+ import { cn as c } from "../../utils/cn.js";
4
+ import { AboutRamme as s } from "./AboutRamme.js";
5
+ const p = ({
6
+ generalSlot: r,
7
+ aiGatewaySlot: i,
8
+ themeLabSlot: n,
9
+ aboutSlot: o = /* @__PURE__ */ e(s, {}),
10
+ defaultTab: m = "general",
11
+ title: a = "Settings",
12
+ className: d
13
+ }) => /* @__PURE__ */ t("div", { className: c("w-full p-4 md:p-6", d), children: [
14
+ a !== null && /* @__PURE__ */ e("h2", { className: "text-2xl font-bold tracking-tight text-foreground mb-4", children: a }),
15
+ /* @__PURE__ */ t(b, { defaultActiveTab: m, size: "sm", children: [
16
+ /* @__PURE__ */ e(l, { id: "general", label: "General", children: r }),
17
+ /* @__PURE__ */ e(l, { id: "ai-gateway", label: "AI Gateway", children: i }),
18
+ /* @__PURE__ */ e(l, { id: "theme-lab", label: "Theme Lab", children: n }),
19
+ /* @__PURE__ */ e(l, { id: "about", label: "About", children: o })
18
20
  ] })
19
21
  ] });
20
22
  export {
21
- g as SettingsContainer
23
+ p as SettingsContainer
22
24
  };
@@ -113,7 +113,7 @@ const F = z(void 0), P = ({ logo: e, collapsedLogo: t, title: n, collapsed: a })
113
113
  var y;
114
114
  (y = o.onClick) == null || y.call(o), u == null || u(o);
115
115
  } }, o.id || `item-${I}`)) }) }),
116
- /* @__PURE__ */ r("button", { onClick: g, className: m("absolute -right-3 z-50 rounded-full border border-border bg-background p-1 text-muted-foreground shadow-sm hover:text-foreground transition-all hover:scale-110", a || s ? "top-20" : "top-4"), children: /* @__PURE__ */ r(h, { name: c ? "chevron-right" : "chevron-left", className: "h-3 w-3" }) }),
116
+ /* @__PURE__ */ r("button", { onClick: g, className: m("absolute -right-3 z-drawer rounded-full border border-border bg-background p-1 text-muted-foreground shadow-sm hover:text-foreground transition-all hover:scale-110", a || s ? "top-20" : "top-4"), children: /* @__PURE__ */ r(h, { name: c ? "chevron-right" : "chevron-left", className: "h-3 w-3" }) }),
117
117
  /* @__PURE__ */ r(
118
118
  U,
119
119
  {
@@ -34,6 +34,19 @@ export interface UserNavProps {
34
34
  showThemeToggle?: boolean;
35
35
  children?: React.ReactNode;
36
36
  }
37
+ /**
38
+ * @wizard
39
+ * @name ButtonItem
40
+ * @description A single row inside a UserNav menu — icon, label, action. Strategic purpose: the sanctioned way to add an entry to the account menu, so extra actions match the built-in ones instead of arriving as a hand-styled button. Use `variant="destructive"` for anything that removes or signs out.
41
+ * @tags layout, navigation, menu, item, user-nav
42
+ * @category layout
43
+ * @id button-item
44
+ * @param {string} icon - Lucide icon name shown before the label.
45
+ * @param {string} label - The menu entry text.
46
+ * @param {function} onClick - Called when the entry is activated.
47
+ * @param {string} variant - 'default' | 'destructive'. Destructive tints the row for sign-out and delete.
48
+ * @param {string} className - Additional CSS classes.
49
+ */
37
50
  /**
38
51
  * 🟢 Component: ButtonItem
39
52
  * Extracted from main component for performance and clean scoping.
@@ -23,7 +23,7 @@ const R = () => {
23
23
  label: l,
24
24
  onClick: a,
25
25
  variant: r = "default",
26
- className: i
26
+ className: m
27
27
  }) => /* @__PURE__ */ n(
28
28
  "button",
29
29
  {
@@ -31,7 +31,7 @@ const R = () => {
31
31
  className: o(
32
32
  "relative flex w-full cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors",
33
33
  r === "destructive" ? "text-destructive hover:bg-destructive/10" : "text-foreground hover:bg-accent hover:text-accent-foreground",
34
- i
34
+ m
35
35
  ),
36
36
  children: [
37
37
  /* @__PURE__ */ e(O, { name: t, className: "mr-2 h-4 w-4" }),
@@ -43,20 +43,20 @@ const R = () => {
43
43
  trigger: l,
44
44
  align: a = "end",
45
45
  side: r = "bottom",
46
- className: i,
46
+ className: m,
47
47
  onLogout: h,
48
- onSettings: m,
48
+ onSettings: c,
49
49
  onProfile: u,
50
- showThemeToggle: w = !0,
50
+ showThemeToggle: k = !0,
51
51
  children: g
52
52
  }) => {
53
53
  var N;
54
54
  const [d, s] = z(!1), f = E(null);
55
55
  I(() => {
56
- const k = (T) => {
56
+ const w = (T) => {
57
57
  f.current && !f.current.contains(T.target) && s(!1);
58
58
  };
59
- return d && document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
59
+ return d && document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
60
60
  }, [d]);
61
61
  const x = {
62
62
  bottom: {
@@ -79,13 +79,13 @@ const R = () => {
79
79
  start: "left-auto right-full top-0 mr-2",
80
80
  center: "left-auto right-full top-1/2 -translate-y-1/2 mr-2"
81
81
  }
82
- }, y = ((N = x[r]) == null ? void 0 : N[a]) || x.bottom.end, c = !!(u || m), p = !!w, v = !!g, C = !!h;
83
- return /* @__PURE__ */ n("div", { className: o("relative", i), ref: f, children: [
82
+ }, y = ((N = x[r]) == null ? void 0 : N[a]) || x.bottom.end, i = !!(u || c), p = !!k, v = !!g, C = !!h;
83
+ return /* @__PURE__ */ n("div", { className: o("relative", m), ref: f, children: [
84
84
  /* @__PURE__ */ e(
85
85
  "button",
86
86
  {
87
87
  onClick: () => s(!d),
88
- className: "flex items-center w-full focus:outline-none",
88
+ className: "flex min-h-11 min-w-11 w-full items-center focus:outline-none",
89
89
  children: l || /* @__PURE__ */ e(
90
90
  L,
91
91
  {
@@ -101,7 +101,7 @@ const R = () => {
101
101
  {
102
102
  className: o(
103
103
  // 🟢 FIXED: Using card background with backdrop blur for high visibility
104
- "absolute z-50 w-56 rounded-md border border-border shadow-2xl",
104
+ "absolute z-popover w-56 rounded-md border border-border shadow-2xl",
105
105
  "bg-[rgb(var(--app-card-bg-color))] text-[rgb(var(--app-text-color))]",
106
106
  "backdrop-blur-md",
107
107
  // Ensures content behind doesn't make text unreadable
@@ -113,20 +113,20 @@ const R = () => {
113
113
  /* @__PURE__ */ e("p", { className: "text-sm font-medium leading-none text-foreground", children: t.name }),
114
114
  /* @__PURE__ */ e("p", { className: "text-xs leading-none text-muted-foreground truncate", children: t.email })
115
115
  ] }),
116
- c && /* @__PURE__ */ n("div", { className: "p-1 space-y-0.5", children: [
116
+ i && /* @__PURE__ */ n("div", { className: "p-1 space-y-0.5", children: [
117
117
  u && /* @__PURE__ */ e(b, { icon: "user", label: "Profile", onClick: () => {
118
118
  u(), s(!1);
119
119
  } }),
120
- m && /* @__PURE__ */ e(b, { icon: "settings", label: "Settings", onClick: () => {
121
- m(), s(!1);
120
+ c && /* @__PURE__ */ e(b, { icon: "settings", label: "Settings", onClick: () => {
121
+ c(), s(!1);
122
122
  } })
123
123
  ] }),
124
- p && /* @__PURE__ */ n("div", { className: o("p-2", c && "border-t border-border/50"), children: [
124
+ p && /* @__PURE__ */ n("div", { className: o("p-2", i && "border-t border-border/50"), children: [
125
125
  /* @__PURE__ */ e("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground mb-1", children: "Theme" }),
126
126
  /* @__PURE__ */ e(R, {})
127
127
  ] }),
128
- v && /* @__PURE__ */ e("div", { className: o("p-1 space-y-0.5", (c || p) && "border-t border-border/50"), children: g }),
129
- C && /* @__PURE__ */ e("div", { className: o("p-1", (c || p || v) && "border-t border-border/50"), children: /* @__PURE__ */ e(
128
+ v && /* @__PURE__ */ e("div", { className: o("p-1 space-y-0.5", (i || p) && "border-t border-border/50"), children: g }),
129
+ C && /* @__PURE__ */ e("div", { className: o("p-1", (i || p || v) && "border-t border-border/50"), children: /* @__PURE__ */ e(
130
130
  b,
131
131
  {
132
132
  icon: "log-out",
@@ -1,4 +1,16 @@
1
1
  import React from 'react';
2
+ /**
3
+ * @wizard
4
+ * @name ConnectorOverlay
5
+ * @description Covers a panel while its data source is connecting, and explains itself when the connection fails. Strategic purpose: the standard treatment for a live region that has no data yet — telemetry panels, market feeds, device dashboards — so every product says the same thing about a dead socket instead of inventing a spinner. Renders nothing once status is 'connected', so it can stay mounted.
6
+ * @tags feedback, overlay, connection, realtime, loading, error
7
+ * @category feedback
8
+ * @id connector-overlay
9
+ * @param {string} status - 'connecting' | 'connected' | 'error'. Renders null when connected.
10
+ * @param {ReactNode} message - Replaces the default copy for the current status.
11
+ * @param {function} onRetry - Shows a retry action in the error state when provided.
12
+ * @param {string} className - Additional CSS classes.
13
+ */
2
14
  export interface ConnectorOverlayProps {
3
15
  status: 'connecting' | 'connected' | 'error';
4
16
  message?: React.ReactNode;
@@ -1,20 +1,20 @@
1
- import { jsx as e, jsxs as a, Fragment as p } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as a, Fragment as f } from "react/jsx-runtime";
2
2
  import m from "react";
3
- import { Link as f } from "react-router-dom";
4
- const b = ({ label: s, to: t, isCurrent: n, className: c, icon: l }) => {
5
- const i = "inline-flex items-center text-sm font-medium", o = n ? "text-text" : "text-primary hover:text-secondary", d = "ml-2 text-muted-foreground", x = l && m.isValidElement(l) ? m.cloneElement(l, {
3
+ import { Link as p } from "react-router-dom";
4
+ const b = ({ label: r, to: t, isCurrent: n, className: c, icon: s }) => {
5
+ const i = "inline-flex items-center text-sm font-medium", o = n ? "text-foreground" : "text-primary hover:text-secondary", d = "ml-2 text-muted-foreground", x = s && m.isValidElement(s) ? m.cloneElement(s, {
6
6
  size: 14,
7
7
  // This is equivalent to Tailwind's h-3.5/w-3.5
8
8
  className: "mr-1.5"
9
- }) : null, r = /* @__PURE__ */ a(p, { children: [
9
+ }) : null, l = /* @__PURE__ */ a(f, { children: [
10
10
  x,
11
- s
11
+ r
12
12
  ] });
13
13
  return /* @__PURE__ */ a("li", { className: `${i} ${o} ${c || ""}`, "aria-current": n ? "page" : void 0, children: [
14
- t && !n ? /* @__PURE__ */ e(f, { to: t, className: "inline-flex items-center hover:underline", children: r }) : /* @__PURE__ */ e("span", { className: "inline-flex items-center", children: r }),
14
+ t && !n ? /* @__PURE__ */ e(p, { to: t, className: "inline-flex items-center hover:underline", children: l }) : /* @__PURE__ */ e("span", { className: "inline-flex items-center", children: l }),
15
15
  !n && /* @__PURE__ */ e("span", { className: d, children: "/" })
16
16
  ] });
17
- }, y = ({ children: s, className: t }) => /* @__PURE__ */ e("nav", { className: `flex ${t || ""}`, "aria-label": "Breadcrumb", children: /* @__PURE__ */ e("ol", { className: "inline-flex items-center space-x-1 md:space-x-2", children: s }) });
17
+ }, y = ({ children: r, className: t }) => /* @__PURE__ */ e("nav", { className: `flex ${t || ""}`, "aria-label": "Breadcrumb", children: /* @__PURE__ */ e("ol", { className: "inline-flex items-center space-x-1 md:space-x-2", children: r }) });
18
18
  export {
19
19
  b as BreadcrumbItem,
20
20
  y as Breadcrumbs