@nadicodeai/ui 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -4,7 +4,10 @@ The `@nadicodeai/ui` npm workspace: the shared NadicodeAI React UI package on br
4
4
 
5
5
  ## Commands
6
6
 
7
- Proof escalates by the ladder in the root `AGENTS.md` "Commands": `npm run check -w @nadicodeai/ui` and `npm run test -w @nadicodeai/ui` before pushing. `test` builds `dist` first, then runs the workspace guards and the browser-free jsdom + axe-core tier-1 accessibility checks.
7
+ Proof follows [the repository pipeline](../../docs/agents/develop.md#the-pipeline):
8
+ `npm run check -w @nadicodeai/ui` and `npm run test -w @nadicodeai/ui` before
9
+ pushing. `test` builds `dist` first, then runs the workspace guards and the
10
+ browser-free jsdom + axe-core tier-1 accessibility checks.
8
11
 
9
12
  | Command | When |
10
13
  | --- | --- |
@@ -26,7 +29,7 @@ Proof escalates by the ladder in the root `AGENTS.md` "Commands": `npm run check
26
29
  | Motion behavior | `../design-system/DESIGN.md` "Motion", `src/lib/motion.ts`, then the `product-design` skill for agent procedure |
27
30
  | Which component subpaths exist | `package.json` `exports` (the `./components/*` wildcard over `src/components/` source is the whole surface. Never maintain a hand-copied list) |
28
31
  | shadcn / assistant-ui discovery | Live shadcn and assistant-ui CLIs (`npx shadcn@latest info\|search\|docs\|view\|add --dry-run`, `npx assistant-ui@latest add --help`). No committed registry inventory or snapshot exists, and `--overwrite` needs an explicit maintainer ask plus a reviewed diff |
29
- | Releasing / publishing | `../../docs/agents/npm-publishing.md` (release decision enforced by the pre-push gate, detail in `docs/contract.md`) |
32
+ | Releasing / publishing | `../../docs/agents/publish.md` (release decision enforced by the pre-push gate, detail in `docs/contract.md`) |
30
33
  | Tokens, geometry, and the CSS the package composes | `../design-system/AGENTS.md` and `../design-system/DESIGN.md` |
31
34
  | Website page assembly | `../../apps/website/AGENTS.md` |
32
35
  | Portal screens | `../../apps/portal/AGENTS.md` |
@@ -58,6 +58,6 @@ function AgentVisual({ className, decorative = true, label, presentation = "card
58
58
  return () => observer.disconnect();
59
59
  }, []);
60
60
  const hasAmbientRenderer = canAnimate && isInViewport;
61
- return (_jsxs("div", { "aria-hidden": decorative || undefined, "aria-label": decorative ? undefined : label, className: cn("relative isolate size-full overflow-hidden rounded-xl bg-nc-campo-inchiostro", presentation === "card" && "min-h-20", presentation === "detail" && "min-h-48", className), "data-agent-visual-motion": hasAmbientRenderer ? "ambient" : "static", "data-agent-visual-presentation": presentation, "data-agent-visual-recipe": recipe, ref: hostRef, role: decorative ? undefined : "img", children: [_jsx(AgentVisualPoster, { recipe: recipe }), hasAmbientRenderer && hostRef.current ? (_jsx("div", { "aria-hidden": "true", className: cn("absolute inset-0 opacity-0 transition-opacity duration-[var(--nc-duration-close)] ease-[var(--nc-ease-out-strong)]", rendererReady && "opacity-100"), "data-agent-visual-renderer": "paper-metaballs", children: _jsx(AgentVisualErrorBoundary, { onUnavailable: handleUnavailable, children: _jsx(Suspense, { fallback: null, children: _jsx(LazyAgentVisualRenderer, { host: hostRef.current, onReady: handleReady, onUnavailable: handleUnavailable, recipe: recipe }) }) }) })) : null] }));
61
+ return (_jsxs("div", { "aria-hidden": decorative || undefined, "aria-label": decorative ? undefined : label, className: cn("relative isolate size-full overflow-hidden rounded-xl bg-nc-identity-ink", presentation === "card" && "min-h-20", presentation === "detail" && "min-h-48", className), "data-agent-visual-motion": hasAmbientRenderer ? "ambient" : "static", "data-agent-visual-presentation": presentation, "data-agent-visual-recipe": recipe, ref: hostRef, role: decorative ? undefined : "img", children: [_jsx(AgentVisualPoster, { recipe: recipe }), hasAmbientRenderer && hostRef.current ? (_jsx("div", { "aria-hidden": "true", className: cn("absolute inset-0 opacity-0 transition-opacity duration-[var(--nc-duration-close)] ease-[var(--nc-ease-out-strong)]", rendererReady && "opacity-100"), "data-agent-visual-renderer": "paper-metaballs", children: _jsx(AgentVisualErrorBoundary, { onUnavailable: handleUnavailable, children: _jsx(Suspense, { fallback: null, children: _jsx(LazyAgentVisualRenderer, { host: hostRef.current, onReady: handleReady, onUnavailable: handleUnavailable, recipe: recipe }) }) }) })) : null] }));
62
62
  }
63
63
  export { AgentVisual };
@@ -1,10 +1,10 @@
1
1
  import * as React from "react";
2
2
  /**
3
- * BrandField is the fixed bianco-on-inchiostro identity plane for composition.
3
+ * BrandField is the fixed white-on-ink identity plane for composition.
4
4
  *
5
- * It deliberately owns no interaction, state, or color variant: brand campi
6
- * are planes, not controls. Callers may add structural layout classes, while
7
- * the canonical black-and-white paint remains internal to the primitive.
5
+ * It deliberately owns no interaction, state, or color variant: an identity
6
+ * plane is a plane, not a control. Callers may add structural layout classes,
7
+ * while the canonical black-and-white paint remains internal to the primitive.
8
8
  */
9
9
  declare function BrandField({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
10
  export { BrandField };
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/utils.js";
3
3
  /**
4
- * BrandField is the fixed bianco-on-inchiostro identity plane for composition.
4
+ * BrandField is the fixed white-on-ink identity plane for composition.
5
5
  *
6
- * It deliberately owns no interaction, state, or color variant: brand campi
7
- * are planes, not controls. Callers may add structural layout classes, while
8
- * the canonical black-and-white paint remains internal to the primitive.
6
+ * It deliberately owns no interaction, state, or color variant: an identity
7
+ * plane is a plane, not a control. Callers may add structural layout classes,
8
+ * while the canonical black-and-white paint remains internal to the primitive.
9
9
  */
10
10
  function BrandField({ className, ...props }) {
11
- return (_jsx("div", { "data-slot": "brand-field", className: cn(className, "bg-nc-campo-inchiostro text-nc-campo-bianco"), ...props }));
11
+ return (_jsx("div", { "data-slot": "brand-field", className: cn(className, "bg-nc-identity-ink text-nc-identity-white"), ...props }));
12
12
  }
13
13
  export { BrandField };
@@ -9,8 +9,8 @@ const buttonVariants = cva("group/button inline-flex min-h-touch-target min-w-to
9
9
  outline: "border-input bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",
10
10
  secondary: "bg-secondary text-secondary-foreground hover:bg-accent aria-expanded:bg-accent aria-expanded:text-accent-foreground",
11
11
  ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",
12
- brandGhost: "text-nc-campo-bianco hover:bg-nc-campo-bianco/10 hover:text-nc-campo-bianco aria-expanded:bg-nc-campo-bianco/10 aria-expanded:text-nc-campo-bianco",
13
- brandSolid: "bg-nc-campo-bianco text-nc-campo-inchiostro hover:bg-nc-campo-bianco/90 hover:text-nc-campo-inchiostro active:bg-nc-campo-bianco/80 active:text-nc-campo-inchiostro",
12
+ brandGhost: "text-nc-identity-white hover:bg-nc-identity-white/10 hover:text-nc-identity-white aria-expanded:bg-nc-identity-white/10 aria-expanded:text-nc-identity-white",
13
+ brandSolid: "bg-nc-identity-white text-nc-identity-ink hover:bg-nc-identity-white/90 hover:text-nc-identity-ink active:bg-nc-identity-white/80 active:text-nc-identity-ink",
14
14
  destructive: "bg-[var(--nc-error-soft)] text-[var(--nc-error-deep)] hover:border-[var(--nc-error-deep)]",
15
15
  link: "text-primary underline-offset-4 hover:underline",
16
16
  onPrimary: "bg-primary-foreground text-primary hover:bg-primary-foreground/90",
@@ -1,4 +1,4 @@
1
1
  type ShaderColor = [number, number, number, number];
2
- export declare function resolveCampoColor(element: Element, variable: string): ShaderColor | null;
2
+ export declare function resolveIdentityColor(element: Element, variable: string): ShaderColor | null;
3
3
  export {};
4
4
  //# sourceMappingURL=color.d.ts.map
@@ -1 +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"}
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,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAG3F"}
@@ -66,7 +66,7 @@ function parseLab(value) {
66
66
  clamp(alpha),
67
67
  ];
68
68
  }
69
- export function resolveCampoColor(element, variable) {
69
+ export function resolveIdentityColor(element, variable) {
70
70
  const value = getComputedStyle(element).getPropertyValue(variable).trim();
71
71
  return parseOklch(value) ?? parseLab(value);
72
72
  }
@@ -1 +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"}
1
+ {"version":3,"file":"poster.d.ts","sourceRoot":"","sources":["../../../src/internal/agent-visual/poster.tsx"],"names":[],"mappings":"AAIA,OAAO,EAA+C,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAiHhG,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,MAAM,GACP,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,iBAAiB,CAAC;CAC3B,+BA0CA"}
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useId } from "react";
3
3
  import { cn } from "../../lib/utils.js";
4
- import { AGENT_VISUAL_RECIPE_SPECS, campoVariable } from "./recipes.js";
4
+ import { AGENT_VISUAL_RECIPE_SPECS, identityVariable } from "./recipes.js";
5
5
  function Gradient({ id, recipe }) {
6
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))) }));
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(${identityVariable(color)})` }, color))) }));
8
8
  }
9
9
  function Surface({ clipId, gradientId, patternId, recipe, }) {
10
10
  const { colors, material } = AGENT_VISUAL_RECIPE_SPECS[recipe];
@@ -12,17 +12,17 @@ function Surface({ clipId, gradientId, patternId, recipe, }) {
12
12
  return (_jsx("rect", { width: "160", height: "120", fill: `url(#${gradientId})`, clipPath: `url(#${clipId})` }));
13
13
  }
14
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))) }));
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(${identityVariable(color)})`, r: 1.45 + ((row + column + index) % 3) * 0.35 }, `${row}-${column}`)))) }, color))) }));
16
16
  }
17
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}`)))] }));
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(${identityVariable(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(${identityVariable(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(${identityVariable(colors[(index + 2) % colors.length])})`, strokeWidth: "0.8" }, `wire-c-${index}`)))] }));
19
19
  }
20
20
  return (_jsxs("g", { clipPath: `url(#${clipId})`, children: [_jsx("rect", { width: "160", height: "120", fill: `url(#${patternId})` }), Array.from({ length: 46 }, (_, index) => {
21
21
  const color = colors[index % colors.length];
22
22
  const x = 20 + ((index * 37) % 125);
23
23
  const y = 12 + ((index * 53) % 98);
24
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}`));
25
+ return (_jsx("circle", { cx: x, cy: y, fill: `var(${identityVariable(color)})`, opacity: 0.48 + (index % 5) * 0.12, r: radius }, `particle-${index}`));
26
26
  })] }));
27
27
  }
28
28
  export function AgentVisualPoster({ className, recipe, }) {
@@ -31,5 +31,5 @@ export function AgentVisualPoster({ className, recipe, }) {
31
31
  const gradientId = `${id}-gradient`;
32
32
  const patternId = `${id}-particles`;
33
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 })] }));
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(${identityVariable(colors[0])})` }), _jsx("circle", { cx: "10", cy: "8", r: "2.1", fill: `var(${identityVariable(colors[1] ?? colors[0])})` }), _jsx("circle", { cx: "5", cy: "12", r: "0.7", fill: `var(${identityVariable(colors[2] ?? colors[0])})` })] })] }), _jsx(Surface, { clipId: clipId, gradientId: gradientId, patternId: patternId, recipe: recipe })] }));
35
35
  }
@@ -1,8 +1,8 @@
1
1
  export type AgentVisualRecipe = "general" | "reasoning" | "coordination" | "communication" | "execution";
2
2
  export type AgentVisualMaterial = "solid" | "points" | "wire" | "particles";
3
- type Campo = "arancio" | "cobalto" | "giallo" | "inchiostro" | "rosso" | "verde";
3
+ type IdentityColor = "arancio" | "cobalto" | "giallo" | "ink" | "rosso" | "verde";
4
4
  export type AgentVisualRecipeSpec = {
5
- colors: readonly Campo[];
5
+ colors: readonly IdentityColor[];
6
6
  count: number;
7
7
  frame: number;
8
8
  material: AgentVisualMaterial;
@@ -10,6 +10,6 @@ export type AgentVisualRecipeSpec = {
10
10
  size: number;
11
11
  };
12
12
  export declare const AGENT_VISUAL_RECIPE_SPECS: Record<AgentVisualRecipe, AgentVisualRecipeSpec>;
13
- export declare function campoVariable(campo: Campo): string;
13
+ export declare function identityVariable(color: IdentityColor): string;
14
14
  export {};
15
15
  //# sourceMappingURL=recipes.d.ts.map
@@ -1 +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"}
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,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,CAAC;AAElF,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,SAAS,aAAa,EAAE,CAAC;IACjC,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,gBAAgB,CAAC,KAAK,EAAE,aAAa,UAEpD"}
@@ -67,6 +67,6 @@ export const AGENT_VISUAL_RECIPE_SPECS = {
67
67
  size: 0.92,
68
68
  },
69
69
  };
70
- export function campoVariable(campo) {
71
- return `--nc-campo-${campo}`;
70
+ export function identityVariable(color) {
71
+ return `--nc-identity-${color}`;
72
72
  }
@@ -1 +1 @@
1
- {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../src/internal/agent-visual/renderer.tsx"],"names":[],"mappings":"AAYA,OAAO,EAA4C,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAU7F,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,MAAM,EAAE,iBAAiB,CAAC;CAC3B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,IAAI,EACJ,OAAO,EACP,aAAa,EACb,MAAM,GACP,EAAE,wBAAwB,+BA8G1B"}
1
+ {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../../src/internal/agent-visual/renderer.tsx"],"names":[],"mappings":"AAYA,OAAO,EAA+C,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAUhG,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,MAAM,EAAE,iBAAiB,CAAC;CAC3B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,IAAI,EACJ,OAAO,EACP,aAAa,EACb,MAAM,GACP,EAAE,wBAAwB,+BA8G1B"}
@@ -2,8 +2,8 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { defaultObjectSizing, getShaderNoiseTexture, metaballsFragmentShader, ShaderFitOptions, ShaderMount as PaperShaderMount, } from "@paper-design/shaders";
4
4
  import { useEffect, useRef } from "react";
5
- import { resolveCampoColor } from "./color.js";
6
- import { AGENT_VISUAL_RECIPE_SPECS, campoVariable } from "./recipes.js";
5
+ import { resolveIdentityColor } from "./color.js";
6
+ import { AGENT_VISUAL_RECIPE_SPECS, identityVariable } from "./recipes.js";
7
7
  import { AGENT_VISUAL_SHADER } from "./shader.js";
8
8
  const MATERIAL_INDEX = {
9
9
  particles: 3,
@@ -19,8 +19,8 @@ export default function AgentVisualRenderer({ host, onReady, onUnavailable, reci
19
19
  return;
20
20
  const spec = AGENT_VISUAL_RECIPE_SPECS[recipe];
21
21
  const isSolid = spec.material === "solid";
22
- const colors = spec.colors.map((color) => resolveCampoColor(host, campoVariable(color)));
23
- const colorBack = resolveCampoColor(host, campoVariable("inchiostro"));
22
+ const colors = spec.colors.map((color) => resolveIdentityColor(host, identityVariable(color)));
23
+ const colorBack = resolveIdentityColor(host, identityVariable("ink"));
24
24
  const hasPalette = colors.every((color) => color !== null) && colorBack !== null;
25
25
  if (!hasPalette) {
26
26
  onUnavailable();
@@ -13,8 +13,10 @@ role-specific Agents that a company operates inside Nadia.
13
13
  ## Approved form
14
14
 
15
15
  - One connected metaball entity sits on a true-black field.
16
- - The entity is always multicolour and uses only the five NadicodeAI campi:
17
- Cobalto, Verde, Arancio, Giallo, and Rosso.
16
+ - The entity is always multicolour and draws its five hues from the Agent
17
+ identity palette: Cobalto, Verde, Arancio, Giallo, and Rosso. That palette
18
+ is owned by `packages/design-system/DESIGN.md`, which holds the token names
19
+ and values; this document holds the recipes that arrange them.
18
20
  - The entity itself carries the surface. Texture never paints the background.
19
21
  - The four approved surfaces are solid, ordered points, borderless triangular
20
22
  wire, and irregular living particles.
@@ -36,7 +36,7 @@ Use shadcn MCP or the CLI live; never commit an upstream registry inventory.
36
36
  the committed package surface. Preview upstream changes before applying them;
37
37
  do not overwrite maintained source without explicit maintainer direction.
38
38
 
39
- The package [`AGENTS.md`](../../AGENTS.md) maps scoped commands. Proof escalates
40
- by the ladder in the repository's root `AGENTS.md` "Commands": this workspace's
39
+ The package [`AGENTS.md`](../../AGENTS.md) maps scoped commands. Proof follows
40
+ [the repository pipeline](../../../../docs/agents/develop.md#the-pipeline): this workspace's
41
41
  `check` and `test`, then the root `npm run check` and `npm run test` when the
42
42
  diff reaches other workspaces.
package/docs/contract.md CHANGED
@@ -97,7 +97,7 @@ gone, is [`packages/design-system/DESIGN.md`, "## Status Vocabulary"](../../desi
97
97
  - **Agents is the client-only conversation interface.** `@nadicodeai/ui/agents` re-exports the complete `@assistant-ui/react` runtime and primitive API plus the reviewed, branded registry composition held under `src/internal/assistant-ui/`. Its built entry retains `"use client"`. Consumers receive Thread, attachments, Markdown, reasoning, tools, suggestions, providers, runtimes, hooks, and types from that one domain namespace. Agent identity components use their direct component subpaths so server compositions do not import the conversation runtime. The vendor name is not a public NadicodeAI subpath, and the package does not rename, wrap, or rebuild assistant-ui behavior.
98
98
  - **Base UI is the active primitive base.** `components.json` must resolve through a Base style, currently `base-nova`, and `npx shadcn@latest info --json` must report `base: "base"`. Do not reintroduce `radix-ui`, `@radix-ui/*`, or `vaul` to package source, dependencies, or app optimizer configuration. Registry-owned shadcn primitives stay aligned with current `shadcn@latest` Base UI output; use Base UI `render` composition instead of Radix `asChild`. `cmdk` is allowed only for the stock shadcn Command component while the current `base-nova` registry declares that dependency; do not use it elsewhere or replace it without a shadcn/compatibility decision and tests.
99
99
  - **Named shadcn blocks stay named.** When a user, plan, or issue selects a shadcn block/example such as `login-02`, `signup-02`, `dashboard-01`, or `sidebar-*`, use that registry item as the source of truth through shadcn CLI/MCP. Do not replace it with a package-authored abstraction unless the plan explicitly records the substitution, the reason, and the true consumer route that proves it.
100
- - **Public surface changes require a release decision.** Any change to exported components, `src/index.ts`, package `exports`, `globals.css`, theme behavior, package docs, package skills, or design-system token/CSS/theme output consumed by this package must end with an explicit npm release decision before handoff: bump the relevant version(s) and run `npm pack --dry-run -w @nadicodeai/ui` per `../../../docs/agents/npm-publishing.md`, or include a `[no-publish]` commit marker with the reason in the commit body. The pre-push gate requires one of the two. When the UI change depends on modified `@nadicodeai/design-system` output, bump and publish `@nadicodeai/design-system` first, then update this package's dependency and publish UI. Never claim a UI package change is shipped until `npm view @nadicodeai/ui version` reports the intended version.
100
+ - **Public surface changes require a release decision.** Any change to exported components, `src/index.ts`, package `exports`, `globals.css`, theme behavior, package docs, package skills, or design-system token/CSS/theme output consumed by this package must end with an explicit npm release decision before handoff: bump the relevant version(s) and run `npm pack --dry-run -w @nadicodeai/ui` per `../../../docs/agents/publish.md`, or include a `[no-publish]` commit marker with the reason in the commit body. The pre-push gate requires one of the two. When the UI change depends on modified `@nadicodeai/design-system` output, bump and publish `@nadicodeai/design-system` first, then update this package's dependency and publish UI. Never claim a UI package change is shipped until `npm view @nadicodeai/ui version` reports the intended version.
101
101
 
102
102
  ## Admission Rules
103
103
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nadicodeai/ui",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -63,7 +63,7 @@
63
63
  "@assistant-ui/react": "0.15.1",
64
64
  "@assistant-ui/react-markdown": "0.14.8",
65
65
  "@base-ui/react": "^1.6.0",
66
- "@nadicodeai/design-system": "2.0.0",
66
+ "@nadicodeai/design-system": "3.0.0",
67
67
  "@paper-design/shaders": "0.0.78",
68
68
  "class-variance-authority": "^0.7.1",
69
69
  "clsx": "^2.1.1",