@nadicodeai/ui 0.22.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/AGENTS.md +4 -4
  2. package/LICENSES/PAPER-SHADERS-APACHE-2.0.txt +186 -0
  3. package/NOTICE +12 -0
  4. package/dist/agents.d.ts.map +1 -1
  5. package/dist/agents.js +1 -0
  6. package/dist/components/agent-card.d.ts +13 -0
  7. package/dist/components/agent-card.d.ts.map +1 -0
  8. package/dist/components/agent-card.js +15 -0
  9. package/dist/components/agent-visual.d.ts +17 -0
  10. package/dist/components/agent-visual.d.ts.map +1 -0
  11. package/dist/components/agent-visual.js +63 -0
  12. package/dist/components/alert-dialog.js +1 -1
  13. package/dist/components/badge.d.ts +1 -1
  14. package/dist/components/badge.d.ts.map +1 -1
  15. package/dist/components/badge.js +9 -0
  16. package/dist/components/card.d.ts +5 -3
  17. package/dist/components/card.d.ts.map +1 -1
  18. package/dist/components/card.js +7 -7
  19. package/dist/components/chart.js +1 -1
  20. package/dist/components/combobox.js +1 -1
  21. package/dist/components/context-menu.js +1 -1
  22. package/dist/components/dialog.js +1 -1
  23. package/dist/components/drawer.js +1 -1
  24. package/dist/components/dropdown-menu.js +1 -1
  25. package/dist/components/empty.d.ts +5 -2
  26. package/dist/components/empty.d.ts.map +1 -1
  27. package/dist/components/empty.js +3 -3
  28. package/dist/components/feedback-state.js +1 -1
  29. package/dist/components/glass-control.d.ts +7 -0
  30. package/dist/components/glass-control.d.ts.map +1 -0
  31. package/dist/components/glass-control.js +14 -0
  32. package/dist/components/hover-card.js +1 -1
  33. package/dist/components/label-system.d.ts +1 -10
  34. package/dist/components/label-system.d.ts.map +1 -1
  35. package/dist/components/label-system.js +1 -7
  36. package/dist/components/live-demo.js +1 -1
  37. package/dist/components/menubar.js +1 -1
  38. package/dist/components/nav-bar.d.ts +6 -8
  39. package/dist/components/nav-bar.d.ts.map +1 -1
  40. package/dist/components/nav-bar.js +8 -9
  41. package/dist/components/navigation-menu.js +2 -2
  42. package/dist/components/popover.js +1 -1
  43. package/dist/components/select.js +1 -1
  44. package/dist/components/sheet.js +1 -1
  45. package/dist/components/sidebar.js +1 -1
  46. package/dist/components/sonner.js +2 -2
  47. package/dist/components/testimonials.d.ts +1 -1
  48. package/dist/components/testimonials.js +2 -2
  49. package/dist/components/tooltip.js +1 -1
  50. package/dist/index.d.ts +3 -0
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +3 -0
  53. package/dist/internal/agent-visual/color.d.ts +4 -0
  54. package/dist/internal/agent-visual/color.d.ts.map +1 -0
  55. package/dist/internal/agent-visual/color.js +72 -0
  56. package/dist/internal/agent-visual/poster.d.ts +6 -0
  57. package/dist/internal/agent-visual/poster.d.ts.map +1 -0
  58. package/dist/internal/agent-visual/poster.js +35 -0
  59. package/dist/internal/agent-visual/recipes.d.ts +15 -0
  60. package/dist/internal/agent-visual/recipes.d.ts.map +1 -0
  61. package/dist/internal/agent-visual/recipes.js +72 -0
  62. package/dist/internal/agent-visual/renderer.d.ts +10 -0
  63. package/dist/internal/agent-visual/renderer.d.ts.map +1 -0
  64. package/dist/internal/agent-visual/renderer.js +112 -0
  65. package/dist/internal/agent-visual/shader.d.ts +2 -0
  66. package/dist/internal/agent-visual/shader.d.ts.map +1 -0
  67. package/dist/internal/agent-visual/shader.js +158 -0
  68. package/dist/internal/assistant-ui/thread.js +3 -3
  69. package/dist/styles/globals.css +21 -0
  70. package/docs/agents/nadicodeai-ui.md +4 -2
  71. package/docs/consuming-cross-repo.md +3 -1
  72. package/docs/contract.md +80 -2
  73. package/docs/migration/1.0.0.md +75 -0
  74. package/llms.txt +2 -0
  75. package/package.json +10 -4
  76. package/skills/nadicodeai-ui/SKILL.md +7 -1
@@ -0,0 +1,7 @@
1
+ import { useRender } from "@base-ui/react/use-render";
2
+ type GlassControlShape = "control" | "bar";
3
+ declare function GlassControl({ className, render, shape, ...props }: useRender.ComponentProps<"div"> & {
4
+ shape?: GlassControlShape;
5
+ }): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
6
+ export { GlassControl, type GlassControlShape };
7
+ //# sourceMappingURL=glass-control.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glass-control.d.ts","sourceRoot":"","sources":["../../src/components/glass-control.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAItD,KAAK,iBAAiB,GAAG,SAAS,GAAG,KAAK,CAAC;AAE3C,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,MAAM,EACN,KAAiB,EACjB,GAAG,KAAK,EACT,EAAE,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,iBAAiB,CAAA;CAAE,8FAiBjE;AAED,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { mergeProps } from "@base-ui/react/merge-props";
2
+ import { useRender } from "@base-ui/react/use-render";
3
+ import { cn } from "../lib/utils.js";
4
+ function GlassControl({ className, render, shape = "control", ...props }) {
5
+ return useRender({
6
+ defaultTagName: "div",
7
+ props: mergeProps({
8
+ className: cn("nc-glass-control flex items-center border-0 text-popover-foreground smooth-shadow-ring-xl focus-visible:outline focus-visible:outline-[length:var(--ring-width-focus)] focus-visible:outline-ring", shape === "control" && "rounded-3xl", shape === "bar" && "rounded-none", className),
9
+ }, props),
10
+ render,
11
+ state: { shape, slot: "glass-control" },
12
+ });
13
+ }
14
+ export { GlassControl };
@@ -10,6 +10,6 @@ function HoverCardTrigger({ ...props }) {
10
10
  return _jsx(PreviewCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props });
11
11
  }
12
12
  function HoverCardContent({ className, side = "bottom", sideOffset = 4, align = "center", alignOffset = 4, ...props }) {
13
- return (_jsx(PreviewCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: _jsx(PreviewCardPrimitive.Positioner, { align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, className: "isolate z-50", children: _jsx(PreviewCardPrimitive.Popup, { "data-slot": "hover-card-content", className: cn("z-50 w-64 rounded-2xl border border-border bg-popover p-control-padding-inline text-sm text-popover-foreground shadow-menu outline-hidden", anchoredOverlayMotion, className), ...props }) }) }));
13
+ return (_jsx(PreviewCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: _jsx(PreviewCardPrimitive.Positioner, { align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, className: "isolate z-50", children: _jsx(PreviewCardPrimitive.Popup, { "data-slot": "hover-card-content", className: cn("z-50 w-64 rounded-2xl border-0 bg-popover p-control-padding-inline text-sm text-popover-foreground smooth-shadow-ring-xl outline-hidden", anchoredOverlayMotion, className), ...props }) }) }));
14
14
  }
15
15
  export { HoverCard, HoverCardTrigger, HoverCardContent };
@@ -1,18 +1,9 @@
1
1
  import * as React from "react";
2
- type StateTagState = "ready" | "running" | "review" | "blocked" | "complete";
3
- type StatusTagTone = "gray" | "green" | "red" | "amber" | "blue";
4
2
  declare function MetaLabel({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
5
- declare function StateTag({ className, state, ...props }: React.ComponentProps<"span"> & {
6
- state: StateTagState;
7
- }): React.JSX.Element;
8
- declare function StatusTag({ className, tone, ...props }: React.ComponentProps<"span"> & {
9
- tone: StatusTagTone;
10
- }): React.JSX.Element;
11
3
  declare function CommandSuffix({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
12
4
  declare function FilterChip({ children, className, removeLabel, type, ...props }: Omit<React.ComponentProps<"button">, "children"> & {
13
5
  children: React.ReactNode;
14
6
  removeLabel: string;
15
7
  }): React.JSX.Element;
16
- export { CommandSuffix, FilterChip, MetaLabel, StateTag, StatusTag };
17
- export type { StateTagState, StatusTagTone };
8
+ export { CommandSuffix, FilterChip, MetaLabel };
18
9
  //# sourceMappingURL=label-system.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"label-system.d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ts","sourceRoot":"","sources":["../../src/components/label-system.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAWvE;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAW3E;AAED,iBAAS,UAAU,CAAC,EAClB,QAAQ,EACR,SAAS,EACT,WAAW,EACX,IAAe,EACf,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,GAAG;IACpD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;CACrB,qBAgBA;AAED,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC"}
@@ -4,16 +4,10 @@ import { cn } from "../lib/utils.js";
4
4
  function MetaLabel({ className, ...props }) {
5
5
  return (_jsx("span", { "data-slot": "meta-label", className: cn("inline-flex h-5 w-fit shrink-0 items-center justify-center rounded-md border border-border bg-muted/40 px-2 text-xs font-medium text-muted-foreground whitespace-nowrap", className), ...props }));
6
6
  }
7
- function StateTag({ className, state, ...props }) {
8
- return (_jsx("span", { "data-slot": "state-tag", "data-state": state, "data-variant": state, className: cn("nc-state-tag", className), ...props }));
9
- }
10
- function StatusTag({ className, tone, ...props }) {
11
- return (_jsx("span", { "data-slot": "status-tag", "data-tone": tone, className: cn("nc-status-tag", className), ...props }));
12
- }
13
7
  function CommandSuffix({ className, ...props }) {
14
8
  return (_jsx("span", { "data-slot": "command-suffix", className: cn("inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-md border border-border bg-muted px-1.5 font-mono text-xs font-medium text-muted-foreground tabular-nums whitespace-nowrap", className), ...props }));
15
9
  }
16
10
  function FilterChip({ children, className, removeLabel, type = "button", ...props }) {
17
11
  return (_jsxs("button", { type: type, "data-slot": "filter-chip", "aria-label": removeLabel, className: cn("nc-filter-chip max-w-full shrink-0 border-border bg-muted/40 text-xs font-medium text-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-[length:var(--ring-width-focus)] focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 whitespace-nowrap [&>svg]:size-3", className), ...props, children: [_jsx("span", { className: "min-w-0 truncate", children: children }), _jsx(XIcon, { "aria-hidden": "true", className: "shrink-0", "data-icon": "inline-end" })] }));
18
12
  }
19
- export { CommandSuffix, FilterChip, MetaLabel, StateTag, StatusTag };
13
+ export { CommandSuffix, FilterChip, MetaLabel };
@@ -18,7 +18,7 @@ import { cn } from "../lib/utils.js";
18
18
  * Token-only; no `dark:` styling.
19
19
  */
20
20
  function LiveDemoWindow({ title, live, children, className, ...props }) {
21
- return (_jsxs("div", { "data-slot": "live-demo-window", className: cn("flex flex-col overflow-hidden rounded-lg border border-border bg-card shadow-sm", className), ...props, children: [_jsxs("div", { "data-slot": "live-demo-bar", className: "flex items-center gap-3 border-b border-border px-4 py-2.5", children: [_jsx("span", { "data-slot": "live-demo-chrome", "aria-hidden": "true", className: "flex gap-1.5", children: [0, 1, 2].map((i) => (_jsx("span", { className: "size-2.5 rounded-full bg-muted-foreground/40" }, i))) }), title ? (_jsx("span", { "data-slot": "live-demo-title", className: "font-mono text-[10px] tracking-[0.08em] text-muted-foreground uppercase", children: title })) : null] }), live ? (_jsxs("div", { "data-slot": "live-demo-chip", className: "flex items-center gap-2 border-b border-border px-4 py-2.5 font-mono text-[9.5px] tracking-[0.08em] text-[var(--nc-link-deep)] uppercase", children: [_jsx("span", { "aria-hidden": "true", className: "size-1.5 rounded-full bg-primary motion-safe:animate-pulse" }), live] })) : null, _jsx("div", { "data-slot": "live-demo-rows", className: "flex flex-col", children: children })] }));
21
+ return (_jsxs("div", { "data-slot": "live-demo-window", className: cn("flex flex-col overflow-hidden rounded-lg border border-border bg-card", className), ...props, children: [_jsxs("div", { "data-slot": "live-demo-bar", className: "flex items-center gap-3 border-b border-border px-4 py-2.5", children: [_jsx("span", { "data-slot": "live-demo-chrome", "aria-hidden": "true", className: "flex gap-1.5", children: [0, 1, 2].map((i) => (_jsx("span", { className: "size-2.5 rounded-full bg-muted-foreground/40" }, i))) }), title ? (_jsx("span", { "data-slot": "live-demo-title", className: "font-mono text-[10px] tracking-[0.08em] text-muted-foreground uppercase", children: title })) : null] }), live ? (_jsxs("div", { "data-slot": "live-demo-chip", className: "flex items-center gap-2 border-b border-border px-4 py-2.5 font-mono text-[9.5px] tracking-[0.08em] text-[var(--nc-link-deep)] uppercase", children: [_jsx("span", { "aria-hidden": "true", className: "size-1.5 rounded-full bg-primary motion-safe:animate-pulse" }), live] })) : null, _jsx("div", { "data-slot": "live-demo-rows", className: "flex flex-col", children: children })] }));
22
22
  }
23
23
  const ROW_TINT = {
24
24
  done: "bg-[var(--nc-link-bg-soft)] text-[var(--nc-link-deep)]",
@@ -21,7 +21,7 @@ function MenubarTrigger({ className, ...props }) {
21
21
  return (_jsx(DropdownMenuTrigger, { "data-slot": "menubar-trigger", className: cn("flex min-h-touch-target items-center rounded-md px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted [@media(hover:hover)_and_(pointer:fine)]:min-h-0", className), ...props }));
22
22
  }
23
23
  function MenubarContent({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }) {
24
- return (_jsx(DropdownMenuContent, { "data-slot": "menubar-content", align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn("min-w-36 rounded-2xl border border-border bg-popover p-nadicode-xxs text-popover-foreground shadow-menu", className), ...props }));
24
+ return (_jsx(DropdownMenuContent, { "data-slot": "menubar-content", align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn("min-w-36 rounded-2xl border-0 bg-popover p-nadicode-xxs text-popover-foreground smooth-shadow-ring-xl", className), ...props }));
25
25
  }
26
26
  function MenubarItem({ className, inset, variant = "default", ...props }) {
27
27
  return (_jsx(DropdownMenuItem, { "data-slot": "menubar-item", "data-inset": inset, "data-variant": variant, className: cn("group/menubar-item min-h-touch-target gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-[var(--nc-error-deep)] data-[variant=destructive]:focus:bg-[var(--nc-error-soft)] data-[variant=destructive]:focus:text-[var(--nc-error-deep)] data-disabled:opacity-50 [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-[var(--nc-error-deep)]!", className), ...props }));
@@ -1,18 +1,16 @@
1
1
  import * as React from "react";
2
2
  /**
3
- * nav-bar — the fixed, always-dark glass navigation bar (V5).
3
+ * nav-bar — the fixed, always-dark glass navigation bar.
4
4
  *
5
5
  * A three-track grid (`1fr auto 1fr`): logo lockup leading, route links centered,
6
6
  * CTA cluster trailing. It is a PERMANENT dark glass bar regardless of the page
7
7
  * section it floats over, so the root carries its own `dark` ancestor class and
8
- * resolves every surface from semantic roles (`bg-background`, `text-foreground`,
9
- * `border-border`). The glass is the dark canvas at 70% plus a backdrop blur, so
10
- * the chrome reads as one continuous translucent bar.
8
+ * resolves every surface from semantic roles. `GlassControl` owns the complete
9
+ * glass material; this component contributes only navigation layout.
11
10
  *
12
- * SINGLE-OWNER SEAM: the only edge it owns is its bottom border
13
- * (`border-b border-border`). `position: fixed` pins it to the viewport top; the
14
- * consuming page owns the top padding that clears it. Below ~960px the centered
15
- * links slot hides and the grid collapses to logo + CTA.
11
+ * `position: fixed` pins it to the viewport top; the consuming page owns the top
12
+ * padding that clears it. Below ~960px the centered links slot hides and the grid
13
+ * collapses to logo + CTA.
16
14
  *
17
15
  * A11y: links/triggers expose a `--ring` focus outline; the consumer wraps this in
18
16
  * a `<nav aria-label>`. Token-only; the root sets its own `dark` class (an accepted
@@ -1 +1 @@
1
- {"version":3,"file":"nav-bar.d.ts","sourceRoot":"","sources":["../../src/components/nav-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;;;;;;;;;;GAkBG;AAEH,iBAAS,MAAM,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAYnE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAWrE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAgBxE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQtE;AAED,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"nav-bar.d.ts","sourceRoot":"","sources":["../../src/components/nav-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;;;;;;;;;GAgBG;AAEH,iBAAS,MAAM,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAYnE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAWrE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAgBxE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQtE;AAED,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC"}
@@ -1,26 +1,25 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { GlassControl } from "./glass-control.js";
2
3
  import { cn } from "../lib/utils.js";
3
4
  /**
4
- * nav-bar — the fixed, always-dark glass navigation bar (V5).
5
+ * nav-bar — the fixed, always-dark glass navigation bar.
5
6
  *
6
7
  * A three-track grid (`1fr auto 1fr`): logo lockup leading, route links centered,
7
8
  * CTA cluster trailing. It is a PERMANENT dark glass bar regardless of the page
8
9
  * section it floats over, so the root carries its own `dark` ancestor class and
9
- * resolves every surface from semantic roles (`bg-background`, `text-foreground`,
10
- * `border-border`). The glass is the dark canvas at 70% plus a backdrop blur, so
11
- * the chrome reads as one continuous translucent bar.
10
+ * resolves every surface from semantic roles. `GlassControl` owns the complete
11
+ * glass material; this component contributes only navigation layout.
12
12
  *
13
- * SINGLE-OWNER SEAM: the only edge it owns is its bottom border
14
- * (`border-b border-border`). `position: fixed` pins it to the viewport top; the
15
- * consuming page owns the top padding that clears it. Below ~960px the centered
16
- * links slot hides and the grid collapses to logo + CTA.
13
+ * `position: fixed` pins it to the viewport top; the consuming page owns the top
14
+ * padding that clears it. Below ~960px the centered links slot hides and the grid
15
+ * collapses to logo + CTA.
17
16
  *
18
17
  * A11y: links/triggers expose a `--ring` focus outline; the consumer wraps this in
19
18
  * a `<nav aria-label>`. Token-only; the root sets its own `dark` class (an accepted
20
19
  * ancestor-class remap), never `dark:` utilities.
21
20
  */
22
21
  function NavBar({ className, ...props }) {
23
- return (_jsx("div", { "data-slot": "nav-bar", className: cn("dark fixed inset-x-0 top-0 z-30 grid min-h-16 grid-cols-[1fr_auto] items-center gap-4 px-4 py-3 text-foreground sm:px-8 lg:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)]", "border-b border-border bg-background/70 backdrop-blur-[14px]", className), ...props }));
22
+ return (_jsx(GlassControl, { "data-slot": "nav-bar", shape: "bar", className: cn("dark fixed inset-x-0 top-0 z-30 grid min-h-16 grid-cols-[1fr_auto] items-center gap-4 px-4 py-3 text-foreground sm:px-8 lg:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)]", className), ...props }));
24
23
  }
25
24
  function NavBarLogo({ className, ...props }) {
26
25
  return (_jsx("a", { "data-slot": "nav-bar-logo", className: cn("inline-flex w-fit items-center gap-2.5 text-sm font-semibold text-foreground no-underline [&_img]:block [&_img]:h-7 [&_img]:w-auto [&_svg]:block [&_svg]:h-7 [&_svg]:w-auto", className), ...props }));
@@ -17,10 +17,10 @@ function NavigationMenuTrigger({ className, children, ...props }) {
17
17
  return (_jsxs(NavigationMenuPrimitive.Trigger, { "data-slot": "navigation-menu-trigger", className: cn(navigationMenuTriggerStyle(), "group", className), ...props, children: [children, " ", _jsx(ChevronDownIcon, { className: "nc-transition-transform relative top-px ml-1 size-3 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180", "aria-hidden": "true" })] }));
18
18
  }
19
19
  function NavigationMenuContent({ className, ...props }) {
20
- return (_jsx(NavigationMenuPrimitive.Content, { "data-slot": "navigation-menu-content", className: cn("h-full w-auto p-nadicode-xxs group-data-[viewport=false]/navigation-menu:origin-(--transform-origin) group-data-[viewport=false]/navigation-menu:rounded-2xl group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:border-border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow-menu group-data-[viewport=false]/navigation-menu:transition-[opacity,scale] group-data-[viewport=false]/navigation-menu:duration-[var(--nc-duration-close)] group-data-[viewport=false]/navigation-menu:ease-[var(--nc-ease-out-strong)] group-data-[viewport=false]/navigation-menu:data-open:duration-[var(--nc-duration-open)] group-data-[viewport=false]/navigation-menu:data-ending-style:opacity-0 group-data-[viewport=false]/navigation-menu:data-ending-style:scale-[0.98] group-data-[viewport=false]/navigation-menu:data-starting-style:opacity-0 group-data-[viewport=false]/navigation-menu:data-starting-style:scale-[0.98] motion-reduce:transition-none motion-reduce:data-ending-style:opacity-100 motion-reduce:data-ending-style:scale-100 motion-reduce:data-starting-style:opacity-100 motion-reduce:data-starting-style:scale-100 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none", className), ...props }));
20
+ return (_jsx(NavigationMenuPrimitive.Content, { "data-slot": "navigation-menu-content", className: cn("h-full w-auto p-nadicode-xxs group-data-[viewport=false]/navigation-menu:origin-(--transform-origin) group-data-[viewport=false]/navigation-menu:rounded-2xl group-data-[viewport=false]/navigation-menu:border-0 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:smooth-shadow-ring-xl group-data-[viewport=false]/navigation-menu:transition-[opacity,scale] group-data-[viewport=false]/navigation-menu:duration-[var(--nc-duration-close)] group-data-[viewport=false]/navigation-menu:ease-[var(--nc-ease-out-strong)] group-data-[viewport=false]/navigation-menu:data-open:duration-[var(--nc-duration-open)] group-data-[viewport=false]/navigation-menu:data-ending-style:opacity-0 group-data-[viewport=false]/navigation-menu:data-ending-style:scale-[0.98] group-data-[viewport=false]/navigation-menu:data-starting-style:opacity-0 group-data-[viewport=false]/navigation-menu:data-starting-style:scale-[0.98] motion-reduce:transition-none motion-reduce:data-ending-style:opacity-100 motion-reduce:data-ending-style:scale-100 motion-reduce:data-starting-style:opacity-100 motion-reduce:data-starting-style:scale-100 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none", className), ...props }));
21
21
  }
22
22
  function NavigationMenuPositioner({ className, side = "bottom", sideOffset = 8, align = "start", alignOffset = 0, ...props }) {
23
- return (_jsx(NavigationMenuPrimitive.Portal, { children: _jsx(NavigationMenuPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, className: cn("group/navigation-menu-positioner isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0", className), ...props, children: _jsx(NavigationMenuPrimitive.Popup, { className: "xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-2xl border border-border bg-popover text-popover-foreground shadow-menu transition-[opacity,scale] duration-[var(--nc-duration-close)] ease-[var(--nc-ease-out-strong)] outline-none data-open:duration-[var(--nc-duration-open)] group-data-instant/navigation-menu-positioner:transition-none data-ending-style:scale-[0.98] data-ending-style:opacity-0 data-starting-style:scale-[0.98] data-starting-style:opacity-0 motion-reduce:transition-none motion-reduce:data-ending-style:scale-100 motion-reduce:data-ending-style:opacity-100 motion-reduce:data-starting-style:scale-100 motion-reduce:data-starting-style:opacity-100", children: _jsx(NavigationMenuPrimitive.Viewport, { className: "relative size-full overflow-hidden" }) }) }) }));
23
+ return (_jsx(NavigationMenuPrimitive.Portal, { children: _jsx(NavigationMenuPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, className: cn("group/navigation-menu-positioner isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0", className), ...props, children: _jsx(NavigationMenuPrimitive.Popup, { className: "xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin) rounded-2xl border-0 bg-popover text-popover-foreground smooth-shadow-ring-xl transition-[opacity,scale] duration-[var(--nc-duration-close)] ease-[var(--nc-ease-out-strong)] outline-none data-open:duration-[var(--nc-duration-open)] group-data-instant/navigation-menu-positioner:transition-none data-ending-style:scale-[0.98] data-ending-style:opacity-0 data-starting-style:scale-[0.98] data-starting-style:opacity-0 motion-reduce:transition-none motion-reduce:data-ending-style:scale-100 motion-reduce:data-ending-style:opacity-100 motion-reduce:data-starting-style:scale-100 motion-reduce:data-starting-style:opacity-100", children: _jsx(NavigationMenuPrimitive.Viewport, { className: "relative size-full overflow-hidden" }) }) }) }));
24
24
  }
25
25
  function NavigationMenuLink({ className, ...props }) {
26
26
  return (_jsx(NavigationMenuPrimitive.Link, { "data-slot": "navigation-menu-link", className: cn("nc-transition-paint flex min-h-touch-target min-w-touch-target items-center gap-2 rounded-md p-2 text-sm outline-none hover:bg-muted focus:bg-muted focus-visible:ring-[length:var(--ring-width-focus)] focus-visible:ring-ring focus-visible:outline-1 data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [@media(hover:hover)_and_(pointer:fine)]:min-w-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
@@ -9,7 +9,7 @@ function PopoverTrigger({ ...props }) {
9
9
  return _jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
10
10
  }
11
11
  function PopoverContent({ className, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, ...props }) {
12
- return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Positioner, { align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, className: "isolate z-50", children: _jsx(PopoverPrimitive.Popup, { "data-slot": "popover-content", className: cn("z-50 flex w-72 flex-col gap-control-padding-inline rounded-2xl border border-border bg-popover p-control-padding-inline text-sm text-popover-foreground shadow-menu outline-hidden", anchoredOverlayMotion, className), ...props }) }) }));
12
+ return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Positioner, { align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, className: "isolate z-50", children: _jsx(PopoverPrimitive.Popup, { "data-slot": "popover-content", className: cn("z-50 flex w-72 flex-col gap-control-padding-inline rounded-2xl border-0 bg-popover p-control-padding-inline text-sm text-popover-foreground smooth-shadow-ring-xl outline-hidden", anchoredOverlayMotion, className), ...props }) }) }));
13
13
  }
14
14
  function PopoverHeader({ className, ...props }) {
15
15
  return (_jsx("div", { "data-slot": "popover-header", className: cn("flex flex-col gap-0.5 text-sm", className), ...props }));
@@ -15,7 +15,7 @@ function SelectTrigger({ className, size = "default", children, ...props }) {
15
15
  return (_jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, className: cn("flex h-control-height min-h-touch-target w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-background py-2 pr-2 pl-control-padding-inline text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-[length:var(--ring-width-focus)] focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[length:var(--ring-width-focus)] aria-invalid:ring-destructive data-placeholder:text-placeholder data-[size=sm]:h-7 [@media(hover:hover)_and_(pointer:fine)]:min-h-0 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { render: _jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })] }));
16
16
  }
17
17
  function SelectContent({ className, children, side = "bottom", sideOffset = 4, align = "center", alignOffset = 0, alignItemWithTrigger = true, ...props }) {
18
- return (_jsx(SelectPrimitive.Portal, { children: _jsx(SelectPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, alignItemWithTrigger: alignItemWithTrigger, className: "isolate z-50", children: _jsxs(SelectPrimitive.Popup, { "data-slot": "select-content", "data-align-trigger": alignItemWithTrigger, className: cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 overflow-x-hidden overflow-y-auto rounded-2xl border border-border bg-popover text-popover-foreground shadow-menu data-[align-trigger=true]:transition-none", anchoredOverlayMotion, className), ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.List, { children: children }), _jsx(SelectScrollDownButton, {})] }) }) }));
18
+ return (_jsx(SelectPrimitive.Portal, { children: _jsx(SelectPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, alignItemWithTrigger: alignItemWithTrigger, className: "isolate z-50", children: _jsxs(SelectPrimitive.Popup, { "data-slot": "select-content", "data-align-trigger": alignItemWithTrigger, className: cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 overflow-x-hidden overflow-y-auto rounded-2xl border-0 bg-popover text-popover-foreground smooth-shadow-ring-xl data-[align-trigger=true]:transition-none", anchoredOverlayMotion, className), ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.List, { children: children }), _jsx(SelectScrollDownButton, {})] }) }) }));
19
19
  }
20
20
  function SelectLabel({ className, ...props }) {
21
21
  return (_jsx(SelectPrimitive.GroupLabel, { "data-slot": "select-label", className: cn("px-1.5 py-1 text-xs text-muted-foreground", className), ...props }));
@@ -21,7 +21,7 @@ function SheetOverlay({ className, ...props }) {
21
21
  return (_jsx(SheetPrimitive.Backdrop, { "data-slot": "sheet-overlay", className: cn("fixed inset-0 z-50 bg-scrim/scrim", overlayBackdropMotion, className), ...props }));
22
22
  }
23
23
  function SheetContent({ className, children, side = "right", showCloseButton = true, closeLabel = "Close", ...props }) {
24
- return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Popup, { "data-slot": "sheet-content", "data-side": side, className: cn("fixed z-50 flex max-h-[calc(100%-var(--nc-lg))] flex-col gap-nadicode-md rounded-3xl border border-border bg-popover bg-clip-padding text-sm text-popover-foreground shadow-sheet transition-[opacity,translate] duration-[var(--nc-duration-close)] ease-[var(--nc-ease-out-strong)] data-open:duration-[var(--nc-duration-open)] data-ending-style:opacity-0 data-starting-style:opacity-0 motion-reduce:transition-none motion-reduce:data-ending-style:opacity-100 motion-reduce:data-starting-style:opacity-100 data-[side=bottom]:inset-x-nadicode-sm data-[side=bottom]:bottom-nadicode-sm data-[side=bottom]:h-auto data-[side=bottom]:data-ending-style:translate-y-nadicode-md data-[side=bottom]:data-starting-style:translate-y-nadicode-md motion-reduce:data-[side=bottom]:data-ending-style:translate-none motion-reduce:data-[side=bottom]:data-starting-style:translate-none data-[side=left]:inset-y-nadicode-sm data-[side=left]:left-nadicode-sm data-[side=left]:w-3/4 data-[side=left]:data-ending-style:-translate-x-nadicode-md data-[side=left]:data-starting-style:-translate-x-nadicode-md motion-reduce:data-[side=left]:data-ending-style:translate-none motion-reduce:data-[side=left]:data-starting-style:translate-none data-[side=right]:inset-y-nadicode-sm data-[side=right]:right-nadicode-sm data-[side=right]:w-3/4 data-[side=right]:data-ending-style:translate-x-nadicode-md data-[side=right]:data-starting-style:translate-x-nadicode-md motion-reduce:data-[side=right]:data-ending-style:translate-none motion-reduce:data-[side=right]:data-starting-style:translate-none data-[side=top]:inset-x-nadicode-sm data-[side=top]:top-nadicode-sm data-[side=top]:h-auto data-[side=top]:data-ending-style:-translate-y-nadicode-md data-[side=top]:data-starting-style:-translate-y-nadicode-md motion-reduce:data-[side=top]:data-ending-style:translate-none motion-reduce:data-[side=top]:data-starting-style:translate-none data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className), ...props, children: [children, showCloseButton && (_jsxs(SheetPrimitive.Close, { "data-slot": "sheet-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-nadicode-md right-nadicode-md", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: closeLabel })] }))] })] }));
24
+ return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Popup, { "data-slot": "sheet-content", "data-side": side, className: cn("fixed z-50 flex max-h-[calc(100%-var(--nc-lg))] flex-col gap-nadicode-md rounded-3xl border-0 bg-popover bg-clip-padding text-sm text-popover-foreground smooth-shadow-ring-2xl transition-[opacity,translate] duration-[var(--nc-duration-close)] ease-[var(--nc-ease-out-strong)] data-open:duration-[var(--nc-duration-open)] data-ending-style:opacity-0 data-starting-style:opacity-0 motion-reduce:transition-none motion-reduce:data-ending-style:opacity-100 motion-reduce:data-starting-style:opacity-100 data-[side=bottom]:inset-x-nadicode-sm data-[side=bottom]:bottom-nadicode-sm data-[side=bottom]:h-auto data-[side=bottom]:data-ending-style:translate-y-nadicode-md data-[side=bottom]:data-starting-style:translate-y-nadicode-md motion-reduce:data-[side=bottom]:data-ending-style:translate-none motion-reduce:data-[side=bottom]:data-starting-style:translate-none data-[side=left]:inset-y-nadicode-sm data-[side=left]:left-nadicode-sm data-[side=left]:w-3/4 data-[side=left]:data-ending-style:-translate-x-nadicode-md data-[side=left]:data-starting-style:-translate-x-nadicode-md motion-reduce:data-[side=left]:data-ending-style:translate-none motion-reduce:data-[side=left]:data-starting-style:translate-none data-[side=right]:inset-y-nadicode-sm data-[side=right]:right-nadicode-sm data-[side=right]:w-3/4 data-[side=right]:data-ending-style:translate-x-nadicode-md data-[side=right]:data-starting-style:translate-x-nadicode-md motion-reduce:data-[side=right]:data-ending-style:translate-none motion-reduce:data-[side=right]:data-starting-style:translate-none data-[side=top]:inset-x-nadicode-sm data-[side=top]:top-nadicode-sm data-[side=top]:h-auto data-[side=top]:data-ending-style:-translate-y-nadicode-md data-[side=top]:data-starting-style:-translate-y-nadicode-md motion-reduce:data-[side=top]:data-ending-style:translate-none motion-reduce:data-[side=top]:data-starting-style:translate-none data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className), ...props, children: [children, showCloseButton && (_jsxs(SheetPrimitive.Close, { "data-slot": "sheet-close", render: _jsx(Button, { variant: "ghost", className: "absolute top-nadicode-md right-nadicode-md", size: "icon-sm" }), children: [_jsx(XIcon, {}), _jsx("span", { className: "sr-only", children: closeLabel })] }))] })] }));
25
25
  }
26
26
  function SheetHeader({ className, ...props }) {
27
27
  return (_jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-0.5 p-nadicode-lg", className), ...props }));
@@ -94,7 +94,7 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
94
94
  // Adjust the padding for floating and inset variants.
95
95
  variant === "floating" || variant === "inset"
96
96
  ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+var(--nc-rounded-xs))]"
97
- : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className), ...props, children: _jsx("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-md group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-menu", children: children }) })] }));
97
+ : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className), ...props, children: _jsx("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-3xl group-data-[variant=floating]:border-0 group-data-[variant=floating]:bg-popover group-data-[variant=floating]:smooth-shadow-ring-xl", children: children }) })] }));
98
98
  }
99
99
  function SidebarTrigger({ className, onClick, ...props }) {
100
100
  const { toggleSidebar } = useSidebar();
@@ -14,11 +14,11 @@ const Toaster = ({ ...props }) => {
14
14
  }, style: {
15
15
  "--normal-bg": "var(--popover)",
16
16
  "--normal-text": "var(--popover-foreground)",
17
- "--normal-border": "var(--border)",
17
+ "--normal-border": "transparent",
18
18
  "--border-radius": "var(--radius)",
19
19
  }, toastOptions: {
20
20
  classNames: {
21
- toast: "cn-toast",
21
+ toast: "nc-toast smooth-shadow-ring-xl",
22
22
  },
23
23
  }, ...props }));
24
24
  };
@@ -36,7 +36,7 @@ declare function TestimonialRecord({ className, tag, children, ...props }: React
36
36
  /**
37
37
  * TestimonialRecordRow — one status line in the record card: a mono label with an
38
38
  * optional trailing state pill (done = green soft/deep, waiting = amber soft/deep —
39
- * the AA-clearing status-tag idiom, a deep-ink label on a soft same-hue ground). The
39
+ * the AA-clearing soft/deep idiom, a deep-ink label on a soft same-hue ground). The
40
40
  * inter-row hairline is owned here (`border-t`, dropped on the first row). No fake
41
41
  * proof: an absent `status` renders no pill.
42
42
  */
@@ -44,13 +44,13 @@ function TestimonialRecord({ className, tag, children, ...props }) {
44
44
  /**
45
45
  * TestimonialRecordRow — one status line in the record card: a mono label with an
46
46
  * optional trailing state pill (done = green soft/deep, waiting = amber soft/deep —
47
- * the AA-clearing status-tag idiom, a deep-ink label on a soft same-hue ground). The
47
+ * the AA-clearing soft/deep idiom, a deep-ink label on a soft same-hue ground). The
48
48
  * inter-row hairline is owned here (`border-t`, dropped on the first row). No fake
49
49
  * proof: an absent `status` renders no pill.
50
50
  */
51
51
  function TestimonialRecordRow({ className, state = "done", status, children, ...props }) {
52
52
  return (_jsxs("div", { "data-slot": "testimonial-record-row", "data-state": state, className: cn("flex items-center justify-between gap-3 border-t border-border py-2.5 font-mono text-[11.5px] first:border-t-0", className), ...props, children: [_jsx("span", { className: "min-w-0 text-muted-foreground", children: children }), status ? (_jsx("span", { className: cn("shrink-0 rounded-sm px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-[0.04em]",
53
- // Soft-ground + deep-ink feedback pairs (the status-tag / live-demo idiom):
53
+ // Soft-ground + deep-ink feedback pairs (the semantic tone idiom):
54
54
  // a solid hue on a same-hue 15% tint fails AA (≈2.5:1 / 1.4:1). success uses
55
55
  // the link family (there is no success-deep token), warning its own soft/deep.
56
56
  state === "done" && "bg-[var(--nc-link-bg-soft)] text-[var(--nc-link-deep)]", state === "waiting" && "bg-[var(--nc-warning-soft)] text-[var(--nc-warning-deep)]"), children: status })) : null] }));
@@ -12,6 +12,6 @@ function TooltipTrigger({ ...props }) {
12
12
  return _jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
13
13
  }
14
14
  function TooltipContent({ className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, ...props }) {
15
- return (_jsx(TooltipPrimitive.Portal, { children: _jsx(TooltipPrimitive.Positioner, { align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, className: "isolate z-50", children: _jsxs(TooltipPrimitive.Popup, { "data-slot": "tooltip-content", className: cn("z-50 inline-flex w-fit max-w-xs items-center gap-1.5 rounded-md border border-border bg-popover px-nadicode-sm py-nadicode-filter-chip-gap text-xs text-popover-foreground shadow-tooltip has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-md", anchoredOverlayMotion, className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-var(--nc-rounded-xs))] rotate-45 rounded-xs border border-border bg-popover fill-popover data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })] }) }) }));
15
+ return (_jsx(TooltipPrimitive.Portal, { children: _jsx(TooltipPrimitive.Positioner, { align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, className: "isolate z-50", children: _jsxs(TooltipPrimitive.Popup, { "data-slot": "tooltip-content", className: cn("z-50 inline-flex w-fit max-w-xs items-center gap-1.5 rounded-md border-0 bg-popover px-nadicode-sm py-nadicode-filter-chip-gap text-xs text-popover-foreground smooth-shadow-ring-xl has-data-[slot=kbd]:pr-1.5 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-md", anchoredOverlayMotion, className), ...props, children: [children, _jsx(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-var(--nc-rounded-xs))] rotate-45 rounded-xs border border-border bg-popover fill-popover data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })] }) }) }));
16
16
  }
17
17
  export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
package/dist/index.d.ts CHANGED
@@ -3,6 +3,8 @@ export * from "./components/action-band";
3
3
  export * from "./components/action-status";
4
4
  export * from "./components/alert";
5
5
  export * from "./components/alert-dialog";
6
+ export * from "./components/agent-card";
7
+ export * from "./components/agent-visual";
6
8
  export * from "./components/aspect-ratio";
7
9
  export * from "./components/automation-section";
8
10
  export * from "./components/avatar";
@@ -58,6 +60,7 @@ export * from "./components/file-type-icon";
58
60
  export * from "./components/footer";
59
61
  export * from "./components/form";
60
62
  export * from "./components/glyph-spinner";
63
+ export * from "./components/glass-control";
61
64
  export * from "./components/handoff-banner";
62
65
  export * from "./components/hero";
63
66
  export * from "./components/hero-split";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAA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,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC"}
package/dist/index.js CHANGED
@@ -3,6 +3,8 @@ export * from "./components/action-band.js";
3
3
  export * from "./components/action-status.js";
4
4
  export * from "./components/alert.js";
5
5
  export * from "./components/alert-dialog.js";
6
+ export * from "./components/agent-card.js";
7
+ export * from "./components/agent-visual.js";
6
8
  export * from "./components/aspect-ratio.js";
7
9
  export * from "./components/automation-section.js";
8
10
  export * from "./components/avatar.js";
@@ -58,6 +60,7 @@ export * from "./components/file-type-icon.js";
58
60
  export * from "./components/footer.js";
59
61
  export * from "./components/form.js";
60
62
  export * from "./components/glyph-spinner.js";
63
+ export * from "./components/glass-control.js";
61
64
  export * from "./components/handoff-banner.js";
62
65
  export * from "./components/hero.js";
63
66
  export * from "./components/hero-split.js";
@@ -0,0 +1,4 @@
1
+ type ShaderColor = [number, number, number, number];
2
+ export declare function resolveCampoColor(element: Element, variable: string): ShaderColor | null;
3
+ export {};
4
+ //# sourceMappingURL=color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../src/internal/agent-visual/color.ts"],"names":[],"mappings":"AAAA,KAAK,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AA4EpD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAGxF"}
@@ -0,0 +1,72 @@
1
+ const clamp = (value) => Math.min(Math.max(value, 0), 1);
2
+ function linearToSrgb(value) {
3
+ const channel = clamp(value);
4
+ return channel <= 0.0031308 ? channel * 12.92 : 1.055 * channel ** (1 / 2.4) - 0.055;
5
+ }
6
+ function parseOklch(value) {
7
+ if (!value.startsWith("oklch"))
8
+ return null;
9
+ const start = value.indexOf("(");
10
+ const end = value.lastIndexOf(")");
11
+ if (start < 0 || end <= start)
12
+ return null;
13
+ const [channels, alphaValue] = value.slice(start + 1, end).split("/");
14
+ const [lightnessValue, chromaValue, hueValue] = channels?.trim().split(/\s+/) ?? [];
15
+ const lightness = Number.parseFloat(lightnessValue ?? "");
16
+ const chroma = Number.parseFloat(chromaValue ?? "");
17
+ const hue = Number.parseFloat(hueValue ?? "");
18
+ const alpha = alphaValue ? Number.parseFloat(alphaValue.trim()) : 1;
19
+ if (![lightness, chroma, hue, alpha].every(Number.isFinite))
20
+ return null;
21
+ const radians = (hue * Math.PI) / 180;
22
+ const a = chroma * Math.cos(radians);
23
+ const b = chroma * Math.sin(radians);
24
+ const lPrime = lightness + 0.3963377774 * a + 0.2158037573 * b;
25
+ const mPrime = lightness - 0.1055613458 * a - 0.0638541728 * b;
26
+ const sPrime = lightness - 0.0894841775 * a - 1.291485548 * b;
27
+ const l = lPrime ** 3;
28
+ const m = mPrime ** 3;
29
+ const s = sPrime ** 3;
30
+ return [
31
+ linearToSrgb(4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s),
32
+ linearToSrgb(-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s),
33
+ linearToSrgb(-0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s),
34
+ clamp(alpha),
35
+ ];
36
+ }
37
+ function parseLab(value) {
38
+ if (!value.startsWith("lab"))
39
+ return null;
40
+ const start = value.indexOf("(");
41
+ const end = value.lastIndexOf(")");
42
+ if (start < 0 || end <= start)
43
+ return null;
44
+ const [channels, alphaValue] = value.slice(start + 1, end).split("/");
45
+ const [lightnessValue, aValue, bValue] = channels?.trim().split(/\s+/) ?? [];
46
+ const lightness = Number.parseFloat(lightnessValue ?? "");
47
+ const a = Number.parseFloat(aValue ?? "");
48
+ const b = Number.parseFloat(bValue ?? "");
49
+ const alpha = alphaValue ? Number.parseFloat(alphaValue.trim()) : 1;
50
+ if (![lightness, a, b, alpha].every(Number.isFinite))
51
+ return null;
52
+ const delta = 6 / 29;
53
+ const inverseLab = (channel) => channel > delta ? channel ** 3 : 3 * delta ** 2 * (channel - 4 / 29);
54
+ const f1 = (lightness + 16) / 116;
55
+ const x50 = 0.96422 * inverseLab(f1 + a / 500);
56
+ const y50 = inverseLab(f1);
57
+ const z50 = 0.82521 * inverseLab(f1 - b / 200);
58
+ // CSS Lab uses D50; WebGL colors use sRGB's D65 white point.
59
+ const x65 = 0.9555766 * x50 - 0.0230393 * y50 + 0.0631636 * z50;
60
+ const y65 = -0.0282895 * x50 + 1.0099416 * y50 + 0.0210077 * z50;
61
+ const z65 = 0.0122982 * x50 - 0.020483 * y50 + 1.3299098 * z50;
62
+ return [
63
+ linearToSrgb(3.2404542 * x65 - 1.5371385 * y65 - 0.4985314 * z65),
64
+ linearToSrgb(-0.969266 * x65 + 1.8760108 * y65 + 0.041556 * z65),
65
+ linearToSrgb(0.0556434 * x65 - 0.2040259 * y65 + 1.0572252 * z65),
66
+ clamp(alpha),
67
+ ];
68
+ }
69
+ export function resolveCampoColor(element, variable) {
70
+ const value = getComputedStyle(element).getPropertyValue(variable).trim();
71
+ return parseOklch(value) ?? parseLab(value);
72
+ }
@@ -0,0 +1,6 @@
1
+ import { type AgentVisualRecipe } from "./recipes";
2
+ export declare function AgentVisualPoster({ className, recipe, }: {
3
+ className?: string;
4
+ recipe: AgentVisualRecipe;
5
+ }): import("react").JSX.Element;
6
+ //# sourceMappingURL=poster.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"poster.d.ts","sourceRoot":"","sources":["../../../src/internal/agent-visual/poster.tsx"],"names":[],"mappings":"AAIA,OAAO,EAA4C,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAiH7F,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,MAAM,GACP,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,iBAAiB,CAAC;CAC3B,+BAgCA"}
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useId } from "react";
3
+ import { cn } from "../../lib/utils.js";
4
+ import { AGENT_VISUAL_RECIPE_SPECS, campoVariable } from "./recipes.js";
5
+ function Gradient({ id, recipe }) {
6
+ const colors = AGENT_VISUAL_RECIPE_SPECS[recipe].colors;
7
+ return (_jsx("linearGradient", { id: id, x1: "0", x2: "1", y1: "0", y2: "1", children: colors.map((color, index) => (_jsx("stop", { offset: `${(index / Math.max(colors.length - 1, 1)) * 100}%`, stopColor: `var(${campoVariable(color)})` }, color))) }));
8
+ }
9
+ function Surface({ clipId, gradientId, patternId, recipe, }) {
10
+ const { colors, material } = AGENT_VISUAL_RECIPE_SPECS[recipe];
11
+ if (material === "solid") {
12
+ return (_jsx("rect", { width: "160", height: "120", fill: `url(#${gradientId})`, clipPath: `url(#${clipId})` }));
13
+ }
14
+ if (material === "points") {
15
+ return (_jsx("g", { clipPath: `url(#${clipId})`, children: colors.map((color, index) => (_jsx("g", { transform: `translate(${index * 3} ${index * 2})`, children: Array.from({ length: 8 }, (_, row) => Array.from({ length: 11 }, (__, column) => (_jsx("circle", { cx: column * 16, cy: row * 16, fill: `var(${campoVariable(color)})`, r: 1.45 + ((row + column + index) % 3) * 0.35 }, `${row}-${column}`)))) }, color))) }));
16
+ }
17
+ if (material === "wire") {
18
+ return (_jsxs("g", { clipPath: `url(#${clipId})`, fill: "none", children: [Array.from({ length: 14 }, (_, index) => (_jsx("path", { d: `M ${-28 + index * 14} 0 L ${42 + index * 14} 120`, stroke: `var(${campoVariable(colors[index % colors.length])})`, strokeWidth: "1" }, `wire-a-${index}`))), Array.from({ length: 14 }, (_, index) => (_jsx("path", { d: `M ${-28 + index * 14} 120 L ${42 + index * 14} 0`, stroke: `var(${campoVariable(colors[(index + 1) % colors.length])})`, strokeWidth: "1" }, `wire-b-${index}`))), Array.from({ length: 9 }, (_, index) => (_jsx("path", { d: `M 0 ${index * 15} H 160`, stroke: `var(${campoVariable(colors[(index + 2) % colors.length])})`, strokeWidth: "0.8" }, `wire-c-${index}`)))] }));
19
+ }
20
+ return (_jsxs("g", { clipPath: `url(#${clipId})`, children: [_jsx("rect", { width: "160", height: "120", fill: `url(#${patternId})` }), Array.from({ length: 46 }, (_, index) => {
21
+ const color = colors[index % colors.length];
22
+ const x = 20 + ((index * 37) % 125);
23
+ const y = 12 + ((index * 53) % 98);
24
+ const radius = 0.8 + ((index * 7) % 8) * 0.28;
25
+ return (_jsx("circle", { cx: x, cy: y, fill: `var(${campoVariable(color)})`, opacity: 0.48 + (index % 5) * 0.12, r: radius }, `particle-${index}`));
26
+ })] }));
27
+ }
28
+ export function AgentVisualPoster({ className, recipe, }) {
29
+ const id = useId().replaceAll(":", "");
30
+ const clipId = `${id}-clip`;
31
+ const gradientId = `${id}-gradient`;
32
+ const patternId = `${id}-particles`;
33
+ const colors = AGENT_VISUAL_RECIPE_SPECS[recipe].colors;
34
+ return (_jsxs("svg", { "aria-hidden": "true", className: cn("size-full", className), "data-agent-visual-poster": "true", focusable: "false", preserveAspectRatio: "xMidYMid meet", viewBox: "0 0 160 120", children: [_jsxs("defs", { children: [_jsx("clipPath", { id: clipId, children: AGENT_VISUAL_RECIPE_SPECS[recipe].posterForm.map(([cx, cy, radius], index) => (_jsx("circle", { cx: cx, cy: cy, r: radius }, index))) }), _jsx(Gradient, { id: gradientId, recipe: recipe }), _jsxs("pattern", { id: patternId, width: "14", height: "14", patternUnits: "userSpaceOnUse", children: [_jsx("circle", { cx: "2", cy: "3", r: "1.1", fill: `var(${campoVariable(colors[0])})` }), _jsx("circle", { cx: "10", cy: "8", r: "2.1", fill: `var(${campoVariable(colors[1] ?? colors[0])})` }), _jsx("circle", { cx: "5", cy: "12", r: "0.7", fill: `var(${campoVariable(colors[2] ?? colors[0])})` })] })] }), _jsx(Surface, { clipId: clipId, gradientId: gradientId, patternId: patternId, recipe: recipe })] }));
35
+ }
@@ -0,0 +1,15 @@
1
+ export type AgentVisualRecipe = "general" | "reasoning" | "coordination" | "communication" | "execution";
2
+ export type AgentVisualMaterial = "solid" | "points" | "wire" | "particles";
3
+ type Campo = "arancio" | "cobalto" | "giallo" | "inchiostro" | "rosso" | "verde";
4
+ export type AgentVisualRecipeSpec = {
5
+ colors: readonly Campo[];
6
+ count: number;
7
+ frame: number;
8
+ material: AgentVisualMaterial;
9
+ posterForm: readonly (readonly [number, number, number])[];
10
+ size: number;
11
+ };
12
+ export declare const AGENT_VISUAL_RECIPE_SPECS: Record<AgentVisualRecipe, AgentVisualRecipeSpec>;
13
+ export declare function campoVariable(campo: Campo): string;
14
+ export {};
15
+ //# sourceMappingURL=recipes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recipes.d.ts","sourceRoot":"","sources":["../../../src/internal/agent-visual/recipes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,WAAW,GACX,cAAc,GACd,eAAe,GACf,WAAW,CAAC;AAEhB,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;AAE5E,KAAK,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,GAAG,OAAO,CAAC;AAEjF,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,UAAU,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;IAC3D,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,iBAAiB,EAAE,qBAAqB,CAoEtF,CAAC;AAEF,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,UAEzC"}