@nadicodeai/ui 6.1.0 → 6.3.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.
@@ -1 +1 @@
1
- {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/components/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,aAAa;;8EAiBlB,CAAC;AAEF,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,qBASlE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7E;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAIxE;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/components/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,aAAa;;8EAiBlB,CAAC;AAEF,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,qBASlE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7E;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWxE;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cva } from "class-variance-authority";
3
3
  import { cn } from "../lib/utils.js";
4
- const alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-md border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
4
+ const alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-md border px-2.5 py-2 text-left text-sm sm:has-data-[slot=alert-action]:grid-cols-[minmax(0,1fr)_auto] sm:has-[>svg]:has-data-[slot=alert-action]:grid-cols-[auto_minmax(0,1fr)_auto] has-[>svg]:grid-cols-[auto_minmax(0,1fr)] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
5
5
  variants: {
6
6
  variant: {
7
7
  default: "bg-card text-card-foreground",
@@ -24,6 +24,6 @@ function AlertDescription({ className, ...props }) {
24
24
  return (_jsx("div", { "data-slot": "alert-description", className: cn("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className), ...props }));
25
25
  }
26
26
  function AlertAction({ className, ...props }) {
27
- return (_jsx("div", { "data-slot": "alert-action", className: cn("absolute top-2 right-2", className), ...props }));
27
+ return (_jsx("div", { "data-slot": "alert-action", className: cn("mt-2 group-has-[>svg]/alert:col-start-2 sm:col-start-2 sm:row-span-2 sm:row-start-1 sm:mt-0 sm:ml-4 sm:self-center sm:group-has-[>svg]/alert:col-start-3", className), ...props }));
28
28
  }
29
29
  export { Alert, AlertTitle, AlertDescription, AlertAction };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The stored appearance, reachable from a server. `forma-avatar.tsx` is a
3
+ * `"use client"` module, and under React Server Components every export of one
4
+ * becomes a client reference — a re-exported pure function included, which a
5
+ * server caller can only fail to invoke. A product whose server resolves an
6
+ * Agent's look before it renders the avatar (the Portal builds its rows that
7
+ * way) imports the resolver from here, and so does every other consumer: the
8
+ * avatar comes from `@nadicodeai/ui/components/forma-avatar`, the stored
9
+ * spelling from this module, and neither re-exports the other.
10
+ */
11
+ export { type StoredAppearance, defaultShape, formaColorValues, resolveAppearance, shapeFor, } from "../internal/forma/stored-appearance.js";
12
+ export { type FormaChoice, type FormaColor, type FormaForm, type FormaState, } from "../internal/forma/model.js";
13
+ //# sourceMappingURL=forma-appearance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forma-appearance.d.ts","sourceRoot":"","sources":["../../src/components/forma-appearance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,KAAK,gBAAgB,EACrB,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,GACT,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,UAAU,GAChB,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The stored appearance, reachable from a server. `forma-avatar.tsx` is a
3
+ * `"use client"` module, and under React Server Components every export of one
4
+ * becomes a client reference — a re-exported pure function included, which a
5
+ * server caller can only fail to invoke. A product whose server resolves an
6
+ * Agent's look before it renders the avatar (the Portal builds its rows that
7
+ * way) imports the resolver from here, and so does every other consumer: the
8
+ * avatar comes from `@nadicodeai/ui/components/forma-avatar`, the stored
9
+ * spelling from this module, and neither re-exports the other.
10
+ */
11
+ export { defaultShape, formaColorValues, resolveAppearance, shapeFor, } from "../internal/forma/stored-appearance.js";
@@ -0,0 +1,15 @@
1
+ import type { ComponentProps, ReactElement, ReactNode } from "react";
2
+ export type NoticeBannerTone = "neutral" | "info" | "warning";
3
+ export type NoticeBannerLiveRegion = "off" | "polite";
4
+ export type NoticeBannerProps = {
5
+ action?: ReactElement;
6
+ className?: string;
7
+ description?: ReactNode;
8
+ detail?: ReactNode;
9
+ liveRegion: NoticeBannerLiveRegion;
10
+ title: ReactNode;
11
+ tone: NoticeBannerTone;
12
+ } & Omit<ComponentProps<"div">, "children" | "title">;
13
+ /** Non-blocking operational, stale-data, replacement, and read-only guidance. */
14
+ export declare function NoticeBanner({ action, className, description, detail, liveRegion, title, tone, ...props }: NoticeBannerProps): import("react").JSX.Element;
15
+ //# sourceMappingURL=notice-banner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notice-banner.d.ts","sourceRoot":"","sources":["../../src/components/notice-banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKrE,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAC9D,MAAM,MAAM,sBAAsB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEtD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,UAAU,EAAE,sBAAsB,CAAC;IACnC,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,gBAAgB,CAAC;CACxB,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC;AAEtD,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,SAAS,EACT,WAAW,EACX,MAAM,EACN,UAAU,EACV,KAAK,EACL,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,iBAAiB,+BAyBnB"}
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Info, TriangleAlert } from "lucide-react";
3
+ import { Alert, AlertAction, AlertDescription, AlertTitle } from "./alert.js";
4
+ /** Non-blocking operational, stale-data, replacement, and read-only guidance. */
5
+ export function NoticeBanner({ action, className, description, detail, liveRegion, title, tone, ...props }) {
6
+ const Icon = tone === "warning" ? TriangleAlert : Info;
7
+ const isLive = liveRegion === "polite";
8
+ return (_jsxs(Alert, { "aria-atomic": isLive ? "true" : undefined, "aria-live": isLive ? "polite" : undefined, className: className, "data-live-region": liveRegion, "data-notice-banner": true, "data-tone": tone, role: isLive ? "status" : "note", variant: tone === "neutral" ? "default" : tone, ...props, children: [_jsx(Icon, { "aria-hidden": "true" }), _jsx(AlertTitle, { children: title }), _jsxs(AlertDescription, { className: "min-w-0 flex flex-col gap-2", children: [description ? _jsx("div", { "data-notice-description": true, children: description }) : null, detail ? _jsx("div", { "data-notice-detail": true, children: detail }) : null] }), action ? _jsx(AlertAction, { "data-notice-action": true, children: action }) : null] }));
9
+ }
package/dist/index.d.ts CHANGED
@@ -88,6 +88,7 @@ export * from "./components/native-select.js";
88
88
  export * from "./components/nav-bar.js";
89
89
  export * from "./components/navigation-menu.js";
90
90
  export * from "./components/newsletter.js";
91
+ export * from "./components/notice-banner.js";
91
92
  export * from "./components/page-frame.js";
92
93
  export * from "./components/pagination.js";
93
94
  export * from "./components/plugin-slot-boundary.js";
@@ -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,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,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,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc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,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
@@ -88,6 +88,7 @@ export * from "./components/native-select.js";
88
88
  export * from "./components/nav-bar.js";
89
89
  export * from "./components/navigation-menu.js";
90
90
  export * from "./components/newsletter.js";
91
+ export * from "./components/notice-banner.js";
91
92
  export * from "./components/page-frame.js";
92
93
  export * from "./components/pagination.js";
93
94
  export * from "./components/plugin-slot-boundary.js";
@@ -0,0 +1,29 @@
1
+ import { type FormaChoice, type FormaColor } from "./model.js";
2
+ /** What Hermes stores for an Agent's look. Both may be absent or unknown. */
3
+ export interface StoredAppearance {
4
+ shape?: string | null;
5
+ color?: string | null;
6
+ }
7
+ /** The `shape` value a chosen form is stored as. */
8
+ export declare const shapeFor: (form: FormaChoice) => string;
9
+ /** The stored shape of the form an Agent wears until a customer chooses one. */
10
+ export declare const defaultShape: string;
11
+ /**
12
+ * The hex each palette colour is stored as. Hermes keeps an Agent's colour as
13
+ * a CSS colour for its own surfaces, so the stored spelling is a value rather
14
+ * than a token reference; `stored-appearance.test.ts` holds this table to the
15
+ * shipped design-system tokens, and the ESLint colour-literal exemption in the
16
+ * root config names this file.
17
+ */
18
+ export declare const formaColorValues: Record<FormaColor, string>;
19
+ /**
20
+ * Resolve the stored strings to what `FormaAvatar` draws. An unknown shape is
21
+ * the default form and an unknown colour is undefined, which leaves the form
22
+ * its own pigment. The root Agent is the caller's business: a caller that owns
23
+ * one passes `form="nadia"` instead of asking here.
24
+ */
25
+ export declare function resolveAppearance(stored: StoredAppearance): {
26
+ form: FormaChoice;
27
+ color: FormaColor | undefined;
28
+ };
29
+ //# sourceMappingURL=stored-appearance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stored-appearance.d.ts","sourceRoot":"","sources":["../../../src/internal/forma/stored-appearance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAA0C,MAAM,SAAS,CAAC;AAEpG,6EAA6E;AAC7E,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,oDAAoD;AACpD,eAAO,MAAM,QAAQ,GAAI,MAAM,WAAW,KAAG,MAAyB,CAAC;AAEvE,gFAAgF;AAChF,eAAO,MAAM,YAAY,EAAE,MAA8B,CAAC;AAc1D;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAOvD,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,GAAG;IAC3D,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,UAAU,GAAG,SAAS,CAAC;CAC/B,CAEA"}
@@ -0,0 +1,53 @@
1
+ import { defaultForm, formaChoices, formaColors } from "./model.js";
2
+ /** The `shape` value a chosen form is stored as. */
3
+ export const shapeFor = (form) => `forma:${form}`;
4
+ /** The stored shape of the form an Agent wears until a customer chooses one. */
5
+ export const defaultShape = shapeFor(defaultForm);
6
+ /**
7
+ * The five role names the launch Agents were stored under, each kept at the
8
+ * form it wore. Forms are shapes, never roles: nothing new is stored this way.
9
+ */
10
+ const legacyShapes = new Map([
11
+ ["forma:research", "uovo"],
12
+ ["forma:build", "goccia"],
13
+ ["forma:design", "nuvola"],
14
+ ["forma:operate", "quadrato"],
15
+ ["forma:review", "esagono"],
16
+ ]);
17
+ /**
18
+ * The hex each palette colour is stored as. Hermes keeps an Agent's colour as
19
+ * a CSS colour for its own surfaces, so the stored spelling is a value rather
20
+ * than a token reference; `stored-appearance.test.ts` holds this table to the
21
+ * shipped design-system tokens, and the ESLint colour-literal exemption in the
22
+ * root config names this file.
23
+ */
24
+ export const formaColorValues = {
25
+ verde: "#00a85a",
26
+ cobalto: "#1e3cff",
27
+ rosso: "#d3302f",
28
+ arancio: "#ff5a1f",
29
+ giallo: "#ffc220",
30
+ avorio: "#e9e7db",
31
+ };
32
+ /**
33
+ * Resolve the stored strings to what `FormaAvatar` draws. An unknown shape is
34
+ * the default form and an unknown colour is undefined, which leaves the form
35
+ * its own pigment. The root Agent is the caller's business: a caller that owns
36
+ * one passes `form="nadia"` instead of asking here.
37
+ */
38
+ export function resolveAppearance(stored) {
39
+ return { form: formFor(stored.shape), color: colorFor(stored.color) };
40
+ }
41
+ function formFor(shape) {
42
+ if (!shape)
43
+ return defaultForm;
44
+ // A Map, not an object: the shape is a stored string from a machine, and an
45
+ // object lookup would hand back `toString` or `constructor` for those spellings.
46
+ return (formaChoices.find((form) => shape === shapeFor(form)) ?? legacyShapes.get(shape) ?? defaultForm);
47
+ }
48
+ function colorFor(color) {
49
+ if (!color)
50
+ return undefined;
51
+ const stored = color.toLowerCase();
52
+ return formaColors.find((name) => stored === formaColorValues[name] || color === name);
53
+ }
package/docs/contract.md CHANGED
@@ -9,6 +9,16 @@ The normative invariants for the `@nadicodeai/ui` package: what may live here, h
9
9
  - **Components inherit one complete React style interface.** `@nadicodeai/ui/globals.css` composes every style dependency owned by this package, including the complete design-system CSS module. Components carry no theme of their own, and React callers do not compose design-system stylesheets or partials beside it. Installation and source-scanning setup live in the [consumer setup guide](consuming-cross-repo.md). `@nadicodeai/ui/threshold.css` is the one stylesheet outside it, because the surface that needs it most loads no Tailwind layer at all: the Nadia desktop shell takes that file and the design system's token artifact and nothing else. A React caller imports it beside globals.css, never instead of it.
10
10
  - **Design-system geometry remains the foundation.** React components compose the kept `nc-*` page grammar and display CSS components; they do not redefine frame math, marker placement, token values, or raw CSS geometry. Use parent-paints-plus-gap for bordered cell grids and keep every visible seam single-owner (doctrine home: `packages/design-system/DESIGN.md` "## Layout").
11
11
 
12
+ ### Persistent notices
13
+
14
+ `NoticeBanner` composes Alert's icon, title, description and optional action.
15
+ Use it for persistent guidance in the affected section or page container;
16
+ transient action feedback uses Toast, and field validation stays with its field.
17
+ The component owns wrapping, typography and the responsive action placement.
18
+ Consumers supply the condition, localized impact and recovery action. Internal
19
+ error codes stay in diagnostics, not notice content. Portal's operational,
20
+ read-only and stale-data notices use this shared composition directly.
21
+
12
22
  ### Material surfaces
13
23
 
14
24
  `globals.css` declares the four elevation utilities, `nc-elevation-resting`,
@@ -88,5 +88,23 @@ exposes `data-forma-avatar`, `data-state`, `data-color` on its host and
88
88
  `defaultForm`) are exported beside it for pickers and stored-appearance
89
89
  mapping; the geometry, rig and frame computation are internal.
90
90
 
91
+ The stored appearance resolves in this package too, so every product draws one
92
+ Agent the same way. `StoredAppearance` is the pair of strings a product stores, `shape`
93
+ and `color`, either of which may be absent or unknown. `resolveAppearance`
94
+ answers the `form` and `color` the avatar takes: an unknown shape is
95
+ `defaultForm`, the five retired role shapes keep the form each one wore, and an
96
+ unknown colour is `undefined`, which leaves the form its own pigment. A stored
97
+ colour matches a palette hex in any case or the bare colour name.
98
+ The resolver lives in `@nadicodeai/ui/components/forma-appearance`, which
99
+ carries no `"use client"`: `FormaAvatar` is a client component, and a pure
100
+ function re-exported from a client module becomes a client reference a server
101
+ cannot call, so the two entry points do not re-export each other and every
102
+ consumer imports the look from one and the avatar from the other.
103
+ `shapeFor(form)` writes the stored spelling of a chosen form, `defaultShape` is
104
+ `shapeFor(defaultForm)`, and `formaColorValues` is the hex each palette colour
105
+ is stored as, held to the shipped design-system tokens by a test beside the
106
+ resolver. The root Agent is the product's decision, not the resolver's: a
107
+ product that owns one passes `form="nadia"` itself.
108
+
91
109
  Additions to the family go through this document and the design-system
92
110
  token contract, never through an ad-hoc visual.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nadicodeai/ui",
3
- "version": "6.1.0",
3
+ "version": "6.3.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -70,7 +70,7 @@
70
70
  "@assistant-ui/react": "0.15.18",
71
71
  "@assistant-ui/react-markdown": "0.14.14",
72
72
  "@base-ui/react": "^1.8.0",
73
- "@nadicodeai/design-system": "6.1.0",
73
+ "@nadicodeai/design-system": "6.3.0",
74
74
  "@paper-design/shaders": "0.0.80",
75
75
  "class-variance-authority": "^0.7.1",
76
76
  "clsx": "^2.1.1",