@nadicodeai/ui 12.1.30 → 12.1.32

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 (34) hide show
  1. package/dist/components/agent-card.d.ts +2 -1
  2. package/dist/components/agent-card.d.ts.map +1 -1
  3. package/dist/components/agent-card.js +2 -1
  4. package/dist/components/app-mark.d.ts +1 -1
  5. package/dist/components/app-mark.d.ts.map +1 -1
  6. package/dist/components/app-mark.js +1 -1
  7. package/dist/components/item.d.ts +10 -1
  8. package/dist/components/item.d.ts.map +1 -1
  9. package/dist/components/item.js +13 -3
  10. package/dist/components/model-identity.d.ts +4 -6
  11. package/dist/components/model-identity.d.ts.map +1 -1
  12. package/dist/components/model-identity.js +14 -5
  13. package/dist/components/model-mark.d.ts +1 -1
  14. package/dist/components/model-mark.d.ts.map +1 -1
  15. package/dist/components/model-mark.js +1 -1
  16. package/dist/components/object-workspace.d.ts +2 -1
  17. package/dist/components/object-workspace.d.ts.map +1 -1
  18. package/dist/components/object-workspace.js +1 -1
  19. package/dist/components/picture-label.d.ts +21 -0
  20. package/dist/components/picture-label.d.ts.map +1 -0
  21. package/dist/components/picture-label.js +17 -0
  22. package/dist/components/table-card.d.ts +14 -2
  23. package/dist/components/table-card.d.ts.map +1 -1
  24. package/dist/components/table-card.js +9 -3
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +1 -1
  28. package/package.json +2 -6
  29. package/dist/components/absence-note.d.ts +0 -23
  30. package/dist/components/absence-note.d.ts.map +0 -1
  31. package/dist/components/absence-note.js +0 -19
  32. package/dist/lib/absence-note.d.ts +0 -11
  33. package/dist/lib/absence-note.d.ts.map +0 -1
  34. package/dist/lib/absence-note.js +0 -16
@@ -6,7 +6,8 @@ type AgentCardProps = Omit<React.ComponentProps<typeof Card>, "children"> & {
6
6
  meta?: ReactNode;
7
7
  name: ReactNode;
8
8
  status?: ReactNode;
9
- visual: ReactNode;
9
+ /** The object's picture: an Agent's orb, an app's mark. A skill, which is text, has none. */
10
+ visual?: ReactNode;
10
11
  };
11
12
  declare function AgentCard({ action, className, job, meta, name, status, visual, ...props }: AgentCardProps): import("react").JSX.Element;
12
13
  export { AgentCard, type AgentCardProps };
@@ -1 +1 @@
1
- {"version":3,"file":"agent-card.d.ts","sourceRoot":"","sources":["../../src/components/agent-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,IAAI,EAA0C,MAAM,mBAAmB,CAAC;AAGjF,KAAK,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,UAAU,CAAC,GAAG;IAC1E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,GAAG,EAAE,SAAS,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;AAMF,iBAAS,SAAS,CAAC,EACjB,MAAM,EACN,SAAS,EACT,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,MAAM,EACN,GAAG,KAAK,EACT,EAAE,cAAc,+BA8ChB;AAED,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"agent-card.d.ts","sourceRoot":"","sources":["../../src/components/agent-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,IAAI,EAA0C,MAAM,mBAAmB,CAAC;AAGjF,KAAK,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,UAAU,CAAC,GAAG;IAC1E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,GAAG,EAAE,SAAS,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,6FAA6F;IAC7F,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAMF,iBAAS,SAAS,CAAC,EACjB,MAAM,EACN,SAAS,EACT,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,MAAM,EACN,GAAG,KAAK,EACT,EAAE,cAAc,+BAsDhB;AAED,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,CAAC"}
@@ -8,6 +8,7 @@ function AgentCard({ action, className, job, meta, name, status, visual, ...prop
8
8
  const hasStatus = hasSlotContent(status);
9
9
  const hasMeta = hasSlotContent(meta);
10
10
  const hasAction = hasSlotContent(action);
11
- return (_jsxs(Card, { className: cn("h-full", className), ...props, children: [_jsxs("div", { className: "grid grid-cols-[auto_minmax(0,1fr)] items-start gap-(--card-spacing) px-(--card-spacing)", children: [_jsx("div", { className: "grid size-24 place-items-center overflow-hidden", "data-slot": "agent-card-visual", children: visual }), _jsxs("div", { className: "grid min-w-0 content-start gap-nadicode-xs", children: [_jsx(CardTitle, { className: "leading-tight font-semibold", children: name }), _jsx(CardDescription, { className: "leading-snug", children: job }), hasStatus ? (_jsx("div", { className: "flex flex-wrap items-center gap-nadicode-xxs pt-nadicode-xxs", "data-slot": "agent-card-status", children: status })) : null] })] }), hasMeta || hasAction ? (_jsxs(CardFooter, { className: "mt-auto gap-nadicode-sm border-t py-nadicode-sm", children: [hasMeta ? (_jsx("div", { className: "min-w-0 flex-1 text-xs text-muted-foreground", "data-slot": "agent-card-meta", children: meta })) : null, hasAction ? (_jsx("div", { className: "ml-auto shrink-0", "data-slot": "agent-card-action", children: action })) : null] })) : null] }));
11
+ const hasVisual = hasSlotContent(visual);
12
+ return (_jsxs(Card, { className: cn("h-full", className), ...props, children: [_jsxs("div", { className: cn("grid items-start gap-(--card-spacing) px-(--card-spacing)", hasVisual && "grid-cols-[auto_minmax(0,1fr)]"), children: [hasVisual ? (_jsx("div", { className: "grid size-24 place-items-center overflow-hidden", "data-slot": "agent-card-visual", children: visual })) : null, _jsxs("div", { className: "grid min-w-0 content-start gap-nadicode-xs", children: [_jsx(CardTitle, { className: "leading-tight font-semibold", children: name }), _jsx(CardDescription, { className: "leading-snug", children: job }), hasStatus ? (_jsx("div", { className: "flex flex-wrap items-center gap-nadicode-xxs pt-nadicode-xxs", "data-slot": "agent-card-status", children: status })) : null] })] }), hasMeta || hasAction ? (_jsxs(CardFooter, { className: "mt-auto gap-nadicode-sm border-t py-nadicode-sm", children: [hasMeta ? (_jsx("div", { className: "min-w-0 flex-1 text-xs text-muted-foreground", "data-slot": "agent-card-meta", children: meta })) : null, hasAction ? (_jsx("div", { className: "ml-auto shrink-0", "data-slot": "agent-card-action", children: action })) : null] })) : null] }));
12
13
  }
13
14
  export { AgentCard };
@@ -11,7 +11,7 @@ declare function appInitial(app: string): string;
11
11
  type AppMarkProps = Omit<React.ComponentProps<"span">, "children"> & {
12
12
  /** The connector's slug, id or display name, e.g. `"google-calendar"`. */
13
13
  app: string;
14
- /** The tile's box in CSS pixels; the glyph scales with it. Defaults to 28. */
14
+ /** The tile's box in CSS pixels; the glyph scales with it. Defaults to 24, the row size. */
15
15
  size?: number;
16
16
  /**
17
17
  * The mark's accessible name. Beside the app's name it needs none, and a
@@ -1 +1 @@
1
- {"version":3,"file":"app-mark.d.ts","sourceRoot":"","sources":["../../src/components/app-mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EA0CL,KAAK,cAAc,EACpB,MAAM,0BAA0B,CAAC;AAElC,KAAK,SAAS,GAAG,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;AAoDrD;;;GAGG;AACH,iBAAS,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAGtD;AAED,sGAAsG;AACtG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AIG;AACH,iBAAS,OAAO,CAAC,EAAE,GAAG,EAAE,IAAoB,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,qBAuC9F;AAED,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AAC3C,YAAY,EAAE,YAAY,EAAE,CAAC"}
@@ -66,7 +66,7 @@ function appInitial(app) {
66
66
  .match(/[a-z0-9]/i)?.[0]
67
67
  ?.toUpperCase() ?? "?");
68
68
  }
69
- const APP_MARK_SIZE = 28;
69
+ const APP_MARK_SIZE = 24;
70
70
  /** The glyph's share of the tile, the same ratio as `ModelMark`. */
71
71
  const APP_MARK_GLYPH_RATIO = 0.62;
72
72
  /**
@@ -2,7 +2,16 @@ import * as React from "react";
2
2
  import { useRender } from "@base-ui/react/use-render";
3
3
  import { type VariantProps } from "class-variance-authority";
4
4
  import { Separator } from "./separator.js";
5
- declare function ItemGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
5
+ declare function ItemGroup({ className, divided, render, ...props }: useRender.ComponentProps<"div"> & {
6
+ /**
7
+ * Records inside a card: no gap, one hairline between records like a table's,
8
+ * and no outline on a row. The hairline is drawn on the group's children at a
9
+ * specificity a row's own border classes cannot beat, because an `Item`'s
10
+ * `border-transparent` hides a `divide-border` line. Off, the group is
11
+ * shadcn's spaced list of items.
12
+ */
13
+ divided?: boolean;
14
+ }): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
6
15
  declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
7
16
  declare const itemVariants: (props?: ({
8
17
  variant?: "default" | "outline" | "muted" | null | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../src/components/item.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACt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AAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,qBAStE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWxE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWtE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAW1E;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAIxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,OAAO,EACL,IAAI,EACJ,SAAS,EACT,WAAW,EACX,WAAW,EACX,SAAS,EACT,aAAa,EACb,SAAS,EACT,eAAe,EACf,UAAU,EACV,UAAU,GACX,CAAC"}
@@ -4,13 +4,23 @@ import { useRender } from "@base-ui/react/use-render";
4
4
  import { cva } from "class-variance-authority";
5
5
  import { cn } from "../lib/utils.js";
6
6
  import { Separator } from "./separator.js";
7
- function ItemGroup({ className, ...props }) {
8
- return (_jsx("div", { role: "list", "data-slot": "item-group", className: cn("group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2", className), ...props }));
7
+ function ItemGroup({ className, divided = false, render, ...props }) {
8
+ return useRender({
9
+ defaultTagName: "div",
10
+ props: mergeProps({
11
+ role: "list",
12
+ className: cn("group/item-group flex w-full flex-col", divided
13
+ ? "[&>*:not(:last-child)]:border-b [&>*:not(:last-child)]:border-b-border"
14
+ : "gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2", className),
15
+ }, props),
16
+ render,
17
+ state: { slot: "item-group", divided },
18
+ });
9
19
  }
10
20
  function ItemSeparator({ className, ...props }) {
11
21
  return (_jsx(Separator, { "data-slot": "item-separator", orientation: "horizontal", className: cn("my-2", className), ...props, "aria-hidden": "true", role: "presentation" }));
12
22
  }
13
- const itemVariants = cva("nc-transition-paint group/item flex w-full flex-wrap items-center rounded-md border text-sm [a]:transition-colors [a]:hover:bg-accent", {
23
+ const itemVariants = cva("nc-transition-paint group/item flex w-full flex-wrap items-center rounded-md border text-sm in-data-divided:rounded-none in-data-divided:border-0 [a]:transition-colors [a]:hover:bg-accent", {
14
24
  variants: {
15
25
  variant: {
16
26
  default: "border-transparent",
@@ -6,14 +6,12 @@ import type { ComponentPropsWithoutRef } from "react";
6
6
  */
7
7
  export declare function modelAuthor(model: string): string;
8
8
  /**
9
- * The one name form a model is read by: the id without its maker prefix, since
10
- * the mark beside it already says who made it and the muted maker repeats it in
11
- * words. A product that knows the maker's own spelling passes it as `label`.
9
+ * The one name form a model is read by: the maker's own spelling when the
10
+ * table has it, otherwise the id without its maker prefix, since the mark
11
+ * beside it already says who made it and the muted maker repeats it in words.
12
12
  */
13
13
  export declare function modelDisplayName(model: string): string;
14
14
  export type ModelIdentityProps = Omit<ComponentPropsWithoutRef<"span">, "children"> & {
15
- /** The maker's own spelling of the name, when the product knows it. */
16
- label?: string;
17
15
  model: string;
18
16
  markSize?: number;
19
17
  };
@@ -23,5 +21,5 @@ export type ModelIdentityProps = Omit<ComponentPropsWithoutRef<"span">, "childre
23
21
  * name form and the mark all belong here, so a ranked list, a routing table and
24
22
  * a settings row cannot drift into three readings of the same model.
25
23
  */
26
- export declare function ModelIdentity({ label, model, markSize, ...props }: ModelIdentityProps): import("react").JSX.Element;
24
+ export declare function ModelIdentity({ model, markSize, ...props }: ModelIdentityProps): import("react").JSX.Element;
27
25
  //# sourceMappingURL=model-identity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-identity.d.ts","sourceRoot":"","sources":["../../src/components/model-identity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGjD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACpF,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,+BASrF"}
1
+ {"version":3,"file":"model-identity.d.ts","sourceRoot":"","sources":["../../src/components/model-identity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGjD;AAUD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAItD;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACpF,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,+BAS9E"}
@@ -9,12 +9,21 @@ export function modelAuthor(model) {
9
9
  const separator = model.indexOf("/");
10
10
  return separator === -1 ? "" : model.slice(0, separator);
11
11
  }
12
+ const MODEL_NAMES = Object.freeze({
13
+ "anthropic/claude-opus-5": "Claude Opus 5",
14
+ "anthropic/claude-sonnet-5": "Claude Sonnet 5",
15
+ "google/gemini-3.1-flash-lite": "Gemini 3.1 Flash Lite",
16
+ "openai/gpt-5.6-sol": "GPT-5.6 Sol",
17
+ "x-ai/grok-4.5": "Grok 4.5",
18
+ });
12
19
  /**
13
- * The one name form a model is read by: the id without its maker prefix, since
14
- * the mark beside it already says who made it and the muted maker repeats it in
15
- * words. A product that knows the maker's own spelling passes it as `label`.
20
+ * The one name form a model is read by: the maker's own spelling when the
21
+ * table has it, otherwise the id without its maker prefix, since the mark
22
+ * beside it already says who made it and the muted maker repeats it in words.
16
23
  */
17
24
  export function modelDisplayName(model) {
25
+ if (Object.hasOwn(MODEL_NAMES, model))
26
+ return MODEL_NAMES[model];
18
27
  const separator = model.indexOf("/");
19
28
  return separator === -1 ? model : model.slice(separator + 1);
20
29
  }
@@ -24,6 +33,6 @@ export function modelDisplayName(model) {
24
33
  * name form and the mark all belong here, so a ranked list, a routing table and
25
34
  * a settings row cannot drift into three readings of the same model.
26
35
  */
27
- export function ModelIdentity({ label, model, markSize, ...props }) {
28
- return (_jsx(ModelMark, { author: modelAuthor(model), name: label ?? modelDisplayName(model), ...(markSize === undefined ? {} : { size: markSize }), ...props }));
36
+ export function ModelIdentity({ model, markSize, ...props }) {
37
+ return (_jsx(ModelMark, { author: modelAuthor(model), name: modelDisplayName(model), ...(markSize === undefined ? {} : { size: markSize }), ...props }));
29
38
  }
@@ -4,7 +4,7 @@ type ModelMarkProps = Omit<React.ComponentProps<"span">, "children"> & {
4
4
  author: string;
5
5
  /** The model's name. Omitted, the mark renders the maker's logo alone. */
6
6
  name?: string;
7
- /** The tile's box in CSS pixels; the glyph scales with it. Defaults to 28. */
7
+ /** The tile's box in CSS pixels; the glyph scales with it. Defaults to 24, the row size. */
8
8
  size?: number;
9
9
  /**
10
10
  * The mark's accessible name. A model named beside it needs none — the text
@@ -1 +1 @@
1
- {"version":3,"file":"model-mark.d.ts","sourceRoot":"","sources":["../../src/components/model-mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0J/B,KAAK,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACrE,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,iBAAS,SAAS,CAAC,EACjB,MAAM,EACN,IAAI,EACJ,IAAsB,EACtB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,qBAgEhB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"model-mark.d.ts","sourceRoot":"","sources":["../../src/components/model-mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0J/B,KAAK,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACrE,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4FAA4F;IAC5F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,iBAAS,SAAS,CAAC,EACjB,MAAM,EACN,IAAI,EACJ,IAAsB,EACtB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,qBAgEhB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
@@ -63,7 +63,7 @@ const MODEL_AUTHOR_MARKS = {
63
63
  xiaomi: identity(XiaomiMimoIcon),
64
64
  "z-ai": identity(ZaiIcon),
65
65
  };
66
- const MODEL_MARK_SIZE = 28;
66
+ const MODEL_MARK_SIZE = 24;
67
67
  /** The glyph's share of the tile, the ratio the boards' generator derived. */
68
68
  const MODEL_MARK_GLYPH_RATIO = 0.62;
69
69
  /**
@@ -14,7 +14,8 @@ export type ObjectIdentitySupportFacts = {
14
14
  label: string;
15
15
  };
16
16
  export declare function ObjectIdentity({ visual, title, description, metadata, action, editAction, layout, support, }: {
17
- visual: ReactNode;
17
+ /** The object's picture: an Agent's orb, an app's mark. A skill, which is text, has none. */
18
+ visual?: ReactNode;
18
19
  title: ReactNode;
19
20
  description?: ReactNode;
20
21
  metadata?: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"object-workspace.d.ts","sourceRoot":"","sources":["../../src/components/object-workspace.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,KAAK,EACL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,UAAU,EACV,MAAiB,EACjB,OAAO,GACR,EAAE;IACD,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,0BAA0B,CAAC;CACtC,+BAsCA;AAED,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,UAAU,GACX,EAAE;IACD,OAAO,EAAE,SAAS,CAAC;IACnB,UAAU,EAAE,SAAS,CAAC;CACvB,+BAUA;AAED,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,WAAW,EACX,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,YAAgB,GACjB,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;IACpB,sFAAsF;IACtF,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CAC1B,+BAkBA;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAmB,GACpB,EAAE;IACD,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC,+BAkCA"}
1
+ {"version":3,"file":"object-workspace.d.ts","sourceRoot":"","sources":["../../src/components/object-workspace.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,MAAM,MAAM,UAAU,G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BA;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAmB,GACpB,EAAE;IACD,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC,+BAkCA"}
@@ -5,7 +5,7 @@ import { ObjectIdentitySupport } from "../internal/object-identity-support.js";
5
5
  export function ObjectIdentity({ visual, title, description, metadata, action, editAction, layout = "inline", support, }) {
6
6
  return (_jsxs(Card, { className: layout === "inline" && support
7
7
  ? "min-w-0 lg:grid lg:grid-cols-[minmax(0,1fr)_minmax(0,1.25fr)] lg:items-center"
8
- : "min-w-0", render: _jsx("header", { "data-slot": "object-identity" }), size: "sm", children: [_jsxs(CardHeader, { children: [_jsxs("div", { className: "flex min-w-0 items-center gap-4", children: [_jsx("div", { className: "shrink-0", children: visual }), _jsxs("div", { className: "grid min-w-0 gap-1.5", children: [_jsx(CardTitle, { className: "break-words", children: title }), description ? _jsx(CardDescription, { children: description }) : null, metadata ? (_jsx("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground", children: metadata })) : null] })] }), editAction ? _jsx(CardAction, { children: editAction }) : null] }), support || action ? (_jsxs(CardContent, { className: "flex min-w-0 flex-wrap items-start gap-4", children: [support ? (_jsx(ObjectIdentitySupport, { label: support.label, children: _jsx(ObjectFacts, { density: "compact", facts: support.facts }) })) : null, action ? _jsx("div", { className: "min-w-0 flex-1 basis-full", children: action }) : null] })) : null] }));
8
+ : "min-w-0", render: _jsx("header", { "data-slot": "object-identity" }), size: "sm", children: [_jsxs(CardHeader, { children: [_jsxs("div", { className: "flex min-w-0 items-center gap-4", children: [visual ? _jsx("div", { className: "shrink-0", children: visual }) : null, _jsxs("div", { className: "grid min-w-0 gap-1.5", children: [_jsx(CardTitle, { className: "break-words", children: title }), description ? _jsx(CardDescription, { children: description }) : null, metadata ? (_jsx("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground", children: metadata })) : null] })] }), editAction ? _jsx(CardAction, { children: editAction }) : null] }), support || action ? (_jsxs(CardContent, { className: "flex min-w-0 flex-wrap items-start gap-4", children: [support ? (_jsx(ObjectIdentitySupport, { label: support.label, children: _jsx(ObjectFacts, { density: "compact", facts: support.facts }) })) : null, action ? _jsx("div", { className: "min-w-0 flex-1 basis-full", children: action }) : null] })) : null] }));
9
9
  }
10
10
  export function ObjectOverview({ primary, supporting, }) {
11
11
  return (_jsxs("div", { "data-slot": "object-overview", className: "grid min-w-0 items-start gap-6 xl:grid-cols-[minmax(0,1.6fr)_minmax(0,1fr)]", children: [_jsx("div", { className: "grid min-w-0 gap-6", children: primary }), _jsx("div", { className: "grid min-w-0 gap-6", children: supporting })] }));
@@ -0,0 +1,21 @@
1
+ import type { ReactNode } from "react";
2
+ /**
3
+ * A failure page's picture with its label
4
+ * ([Failure surfaces](../../../design-system/DESIGN.md#failure-surfaces)): the
5
+ * way a museum labels a work, the title says what the picture is doing, which
6
+ * is the page's joke, and the second line gives its materials and year. From
7
+ * `lg` the label stands beside the picture's base, with an empty column of the
8
+ * same width on the other side so the picture stays on the page's centre line;
9
+ * below that it stands centred under the picture.
10
+ */
11
+ export declare function LabelledPicture({ children, label, className, }: {
12
+ children: ReactNode;
13
+ /** The `PictureLabel`, or a boundary that streams it in. */
14
+ label: ReactNode;
15
+ className?: string;
16
+ }): import("react").JSX.Element;
17
+ export declare function PictureLabel({ title, details }: {
18
+ title: string;
19
+ details: string;
20
+ }): import("react").JSX.Element;
21
+ //# sourceMappingURL=picture-label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"picture-label.d.ts","sourceRoot":"","sources":["../../src/components/picture-label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,KAAK,EACL,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,4DAA4D;IAC5D,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAeA;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,+BAOlF"}
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../lib/utils.js";
3
+ /**
4
+ * A failure page's picture with its label
5
+ * ([Failure surfaces](../../../design-system/DESIGN.md#failure-surfaces)): the
6
+ * way a museum labels a work, the title says what the picture is doing, which
7
+ * is the page's joke, and the second line gives its materials and year. From
8
+ * `lg` the label stands beside the picture's base, with an empty column of the
9
+ * same width on the other side so the picture stays on the page's centre line;
10
+ * below that it stands centred under the picture.
11
+ */
12
+ export function LabelledPicture({ children, label, className, }) {
13
+ return (_jsxs("figure", { className: cn("m-0 grid w-full max-w-4xl justify-items-center gap-4 lg:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] lg:items-end lg:gap-8", className), "data-slot": "labelled-picture", children: [_jsx("div", { className: "lg:col-start-2 lg:row-start-1", children: children }), _jsx("figcaption", { className: "max-w-72 text-center lg:col-start-3 lg:row-start-1 lg:justify-self-start lg:pb-6 lg:text-start", children: label })] }));
14
+ }
15
+ export function PictureLabel({ title, details }) {
16
+ return (_jsxs("span", { className: "grid gap-1", children: [_jsx("span", { className: "nc-type-body-sm text-balance font-medium", children: title }), _jsx("span", { className: "nc-type-label-mono text-balance text-muted-foreground", children: details })] }));
17
+ }
@@ -1,10 +1,22 @@
1
1
  import * as React from "react";
2
2
  import { type CardSurface } from "./card.js";
3
- /** The Portal's registry tables draw the same frame. */
4
- declare function TableCard({ title, description, actions, footer, footerHint, children, className, surface, ...props }: Omit<React.ComponentProps<"section">, "title"> & {
3
+ /**
4
+ * The frame a collection's table sits in: a heading, the collection's own
5
+ * toolbar under it, the table, a labelled total, and the recessed footer
6
+ * strip. The Portal's DataTable and Nadia's record sections draw this one
7
+ * frame, so a registry card ends the same way in both products.
8
+ */
9
+ declare function TableCard({ title, description, actions, toolbar, summary, footer, footerHint, children, className, surface, ...props }: Omit<React.ComponentProps<"section">, "title"> & {
5
10
  title?: React.ReactNode;
6
11
  description?: React.ReactNode;
7
12
  actions?: React.ReactNode;
13
+ /** The collection's search, filters and actions, under the heading and above the table. */
14
+ toolbar?: React.ReactNode;
15
+ /** A labelled total under the table. */
16
+ summary?: {
17
+ label: React.ReactNode;
18
+ value: React.ReactNode;
19
+ };
8
20
  footer?: React.ReactNode;
9
21
  footerHint?: React.ReactNode;
10
22
  surface?: CardSurface;
@@ -1 +1 @@
1
- {"version":3,"file":"table-card.d.ts","sourceRoot":"","sources":["../../src/components/table-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAA4D,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAC;AAGpG,wDAAwD;AACxD,iBAAS,SAAS,CAAC,EACjB,KAAK,EACL,WAAW,EACX,OAAO,EACP,MAAM,EACN,UAAU,EACV,QAAQ,EACR,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,GAAG;IAClD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,qBA6BA;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"table-card.d.ts","sourceRoot":"","sources":["../../src/components/table-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAA4D,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAC;AAGpG;;;;;GAKG;AACH,iBAAS,SAAS,CAAC,EACjB,KAAK,EACL,WAAW,EACX,OAAO,EACP,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,QAAQ,EACR,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,GAAG;IAClD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,2FAA2F;IAC3F,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,wCAAwC;IACxC,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,CAAC;IAC7D,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,qBA8CA;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -3,8 +3,14 @@ import { cn } from "../lib/utils.js";
3
3
  import { FooterStrip } from "../internal/footer-strip.js";
4
4
  import { Card, CardAction, CardDescription, CardHeader, CardTitle } from "./card.js";
5
5
  import { Separator } from "./separator.js";
6
- /** The Portal's registry tables draw the same frame. */
7
- function TableCard({ title, description, actions, footer, footerHint, children, className, surface = "resting", ...props }) {
8
- return (_jsxs(Card, { render: _jsx("section", { ...props, "data-slot": "table-card" }), surface: surface, className: cn("min-w-0 gap-0 py-0", className), children: [(title || description || actions) && (_jsxs(_Fragment, { children: [_jsxs(CardHeader, { className: "py-(--card-spacing)", children: [title && (_jsx(CardTitle, { children: _jsx("h2", { children: title }) })), description && _jsx(CardDescription, { children: description }), actions && _jsx(CardAction, { children: actions })] }), _jsx(Separator, {})] })), _jsx("div", { "data-slot": "table-card-body", className: "min-w-0", children: children }), _jsx(FooterStrip, { hint: footerHint, hintSlot: "table-card-hint", children: footer })] }));
6
+ /**
7
+ * The frame a collection's table sits in: a heading, the collection's own
8
+ * toolbar under it, the table, a labelled total, and the recessed footer
9
+ * strip. The Portal's DataTable and Nadia's record sections draw this one
10
+ * frame, so a registry card ends the same way in both products.
11
+ */
12
+ function TableCard({ title, description, actions, toolbar, summary, footer, footerHint, children, className, surface = "resting", ...props }) {
13
+ const heading = title || description || actions;
14
+ return (_jsxs(Card, { render: _jsx("section", { ...props, "data-slot": "table-card" }), surface: surface, className: cn("min-w-0 gap-0 py-0", className), children: [(heading || toolbar) && (_jsxs(_Fragment, { children: [heading && (_jsxs(CardHeader, { className: cn("pt-(--card-spacing)", !toolbar && "pb-(--card-spacing)"), children: [title && (_jsx(CardTitle, { children: _jsx("h2", { children: title }) })), description && _jsx(CardDescription, { children: description }), actions && _jsx(CardAction, { children: actions })] })), toolbar && (_jsx("div", { "data-slot": "table-card-toolbar", className: "px-(--card-spacing) pt-(--card-spacing)", children: toolbar })), _jsx(Separator, {})] })), _jsx("div", { "data-slot": "table-card-body", className: "min-w-0", children: children }), summary && (_jsxs("dl", { "data-slot": "table-card-summary", className: "flex min-w-0 items-start justify-between gap-4 border-t border-border px-4 py-3 text-sm font-medium", children: [_jsx("dt", { children: summary.label }), _jsx("dd", { className: "text-right tabular-nums", children: summary.value })] })), _jsx(FooterStrip, { hint: footerHint, hintSlot: "table-card-hint", children: footer })] }));
9
15
  }
10
16
  export { TableCard };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export * from "./components/absence-note.js";
2
1
  export * from "./components/accordion.js";
3
2
  export * from "./components/account-menu.js";
4
3
  export * from "./components/action-menu.js";
@@ -80,6 +79,7 @@ export * from "./components/navigation-menu.js";
80
79
  export * from "./components/notice-banner.js";
81
80
  export * from "./components/pagination.js";
82
81
  export * from "./components/pending-label.js";
82
+ export * from "./components/picture-label.js";
83
83
  export * from "./components/plugin-slot-boundary.js";
84
84
  export * from "./components/popover.js";
85
85
  export * from "./components/progress.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,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,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCA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AAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,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,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
- export * from "./components/absence-note.js";
2
1
  export * from "./components/accordion.js";
3
2
  export * from "./components/account-menu.js";
4
3
  export * from "./components/action-menu.js";
@@ -80,6 +79,7 @@ export * from "./components/navigation-menu.js";
80
79
  export * from "./components/notice-banner.js";
81
80
  export * from "./components/pagination.js";
82
81
  export * from "./components/pending-label.js";
82
+ export * from "./components/picture-label.js";
83
83
  export * from "./components/plugin-slot-boundary.js";
84
84
  export * from "./components/popover.js";
85
85
  export * from "./components/progress.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nadicodeai/ui",
3
- "version": "12.1.30",
3
+ "version": "12.1.32",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -36,10 +36,6 @@
36
36
  "types": "./dist/lib/theme-mode.d.ts",
37
37
  "import": "./dist/lib/theme-mode.js"
38
38
  },
39
- "./lib/absence-note": {
40
- "types": "./dist/lib/absence-note.d.ts",
41
- "import": "./dist/lib/absence-note.js"
42
- },
43
39
  "./lib/format-token-count": {
44
40
  "types": "./dist/lib/format-token-count.d.ts",
45
41
  "import": "./dist/lib/format-token-count.js"
@@ -76,7 +72,7 @@
76
72
  "@assistant-ui/react": "0.15.21",
77
73
  "@assistant-ui/react-markdown": "0.14.16",
78
74
  "@base-ui/react": "^1.8.0",
79
- "@nadicodeai/design-system": "12.1.30",
75
+ "@nadicodeai/design-system": "12.1.32",
80
76
  "class-variance-authority": "^0.7.1",
81
77
  "clsx": "^2.1.1",
82
78
  "cmdk": "^1.1.1",
@@ -1,23 +0,0 @@
1
- /**
2
- * What stands where a missing page or record would have been
3
- * ([Failure surfaces](../../../design-system/DESIGN.md#failure-surfaces)): a
4
- * short note signed by Nadia, one line at a time so the stanza breathes on the
5
- * spacing ladder rather than on a private leading.
6
- *
7
- * The note is written copy signed by Nadia, not a report of anything she did,
8
- * so the orb takes ambient motion and claims no activity. `orb` is false where
9
- * the surface's picture already gives Nadia a place to turn in, which is where
10
- * she belongs when there is one. `scale` is the register the surface reads in:
11
- * a product screen sets the note one step below a page title, the website one
12
- * step above it.
13
- */
14
- export declare function AbsenceNote({ note, byline, scale, align, orb, className, }: {
15
- /** The piece, one line per newline. */
16
- note: string;
17
- byline: string;
18
- scale?: "product" | "site";
19
- align?: "center" | "start";
20
- orb?: boolean;
21
- className?: string;
22
- }): import("react").JSX.Element;
23
- //# sourceMappingURL=absence-note.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"absence-note.d.ts","sourceRoot":"","sources":["../../src/components/absence-note.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,MAAM,EACN,KAAiB,EACjB,KAAgB,EAChB,GAAU,EACV,SAAS,GACV,EAAE;IACD,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC3B,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC3B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BA4BA"}
@@ -1,19 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { AgentOrb } from "./agent-orb.js";
3
- import { cn } from "../lib/utils.js";
4
- /**
5
- * What stands where a missing page or record would have been
6
- * ([Failure surfaces](../../../design-system/DESIGN.md#failure-surfaces)): a
7
- * short note signed by Nadia, one line at a time so the stanza breathes on the
8
- * spacing ladder rather than on a private leading.
9
- *
10
- * The note is written copy signed by Nadia, not a report of anything she did,
11
- * so the orb takes ambient motion and claims no activity. `orb` is false where
12
- * the surface's picture already gives Nadia a place to turn in, which is where
13
- * she belongs when there is one. `scale` is the register the surface reads in:
14
- * a product screen sets the note one step below a page title, the website one
15
- * step above it.
16
- */
17
- export function AbsenceNote({ note, byline, scale = "product", align = "center", orb = true, className, }) {
18
- return (_jsxs("div", { className: cn("grid gap-6", align === "center" ? "justify-items-center text-center" : "justify-items-start text-start", className), children: [orb ? (_jsx(AgentOrb, { decorative: true, form: "nadia", motion: "ambient", size: scale === "site" ? 160 : 96 })) : null, _jsx("blockquote", { className: "grid gap-3", children: note.split("\n").map((line) => (_jsx("p", { className: cn("text-balance font-normal", scale === "site" ? "nc-type-heading-lg" : "nc-type-heading-md"), children: line }, line))) }), _jsx("p", { className: "nc-type-label-mono text-muted-foreground", children: byline })] }));
19
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Which of a surface's absence notes an address gets.
3
- *
4
- * The choice is a hash of the address, not a draw: the same address always
5
- * shows the same note, so a reader who reloads is not handed a different one,
6
- * two readers comparing the same broken link see the same thing, and a test can
7
- * name the note it expects. FNV-1a over the path, 32-bit, through `Math.imul`
8
- * so the multiply stays integer.
9
- */
10
- export declare function absenceNoteFor<Note>(path: string, notes: readonly [Note, ...Note[]]): Note;
11
- //# sourceMappingURL=absence-note.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"absence-note.d.ts","sourceRoot":"","sources":["../../src/lib/absence-note.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,CAM1F"}
@@ -1,16 +0,0 @@
1
- /**
2
- * Which of a surface's absence notes an address gets.
3
- *
4
- * The choice is a hash of the address, not a draw: the same address always
5
- * shows the same note, so a reader who reloads is not handed a different one,
6
- * two readers comparing the same broken link see the same thing, and a test can
7
- * name the note it expects. FNV-1a over the path, 32-bit, through `Math.imul`
8
- * so the multiply stays integer.
9
- */
10
- export function absenceNoteFor(path, notes) {
11
- let hash = 0x811c9dc5;
12
- for (let index = 0; index < path.length; index += 1) {
13
- hash = Math.imul(hash ^ path.charCodeAt(index), 0x01000193) >>> 0;
14
- }
15
- return notes[hash % notes.length];
16
- }