@nadicodeai/ui 8.1.0 → 8.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/LICENSES/SHADCN-HEATMAP-MIT.txt +21 -0
  2. package/NOTICE +9 -0
  3. package/dist/components/activity-calendar.d.ts +27 -0
  4. package/dist/components/activity-calendar.d.ts.map +1 -0
  5. package/dist/components/activity-calendar.js +56 -0
  6. package/dist/components/agent-orb.d.ts +22 -0
  7. package/dist/components/agent-orb.d.ts.map +1 -0
  8. package/dist/components/agent-orb.js +28 -0
  9. package/dist/components/chart-area-stacked.d.ts +1 -1
  10. package/dist/components/chart-area-stacked.d.ts.map +1 -1
  11. package/dist/components/chart-area-stacked.js +2 -2
  12. package/dist/components/chart-bar-multiple.d.ts +1 -1
  13. package/dist/components/chart-bar-multiple.d.ts.map +1 -1
  14. package/dist/components/chart-bar-multiple.js +2 -2
  15. package/dist/components/chart-bar-stacked.d.ts +1 -1
  16. package/dist/components/chart-bar-stacked.d.ts.map +1 -1
  17. package/dist/components/chart-bar-stacked.js +2 -2
  18. package/dist/components/chart-card.d.ts +24 -3
  19. package/dist/components/chart-card.d.ts.map +1 -1
  20. package/dist/components/chart-card.js +8 -3
  21. package/dist/components/heatmap/calendar-heatmap.d.ts +138 -0
  22. package/dist/components/heatmap/calendar-heatmap.d.ts.map +1 -0
  23. package/dist/components/heatmap/calendar-heatmap.js +449 -0
  24. package/dist/components/model-identity.d.ts +8 -0
  25. package/dist/components/model-identity.d.ts.map +1 -0
  26. package/dist/components/model-identity.js +8 -0
  27. package/dist/components/object-workspace.d.ts +36 -0
  28. package/dist/components/object-workspace.d.ts.map +1 -0
  29. package/dist/components/object-workspace.js +19 -0
  30. package/dist/components/progress.d.ts +2 -1
  31. package/dist/components/progress.d.ts.map +1 -1
  32. package/dist/components/progress.js +5 -4
  33. package/dist/components/settings-facts.d.ts +2 -1
  34. package/dist/components/settings-facts.d.ts.map +1 -1
  35. package/dist/components/settings-facts.js +6 -3
  36. package/dist/components/settings-section.d.ts +3 -1
  37. package/dist/components/settings-section.d.ts.map +1 -1
  38. package/dist/components/settings-section.js +2 -2
  39. package/dist/components/table-value.d.ts +7 -0
  40. package/dist/components/table-value.d.ts.map +1 -0
  41. package/dist/components/table-value.js +6 -0
  42. package/dist/components/table.d.ts +2 -1
  43. package/dist/components/table.d.ts.map +1 -1
  44. package/dist/components/table.js +4 -1
  45. package/dist/index.d.ts +5 -0
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +5 -0
  48. package/dist/internal/agent-orb-motion.d.ts +14 -0
  49. package/dist/internal/agent-orb-motion.d.ts.map +1 -0
  50. package/dist/internal/agent-orb-motion.js +120 -0
  51. package/dist/internal/agent-orb.d.ts +19 -0
  52. package/dist/internal/agent-orb.d.ts.map +1 -0
  53. package/dist/internal/agent-orb.js +151 -0
  54. package/dist/internal/object-identity-support.d.ts +6 -0
  55. package/dist/internal/object-identity-support.d.ts.map +1 -0
  56. package/dist/internal/object-identity-support.js +10 -0
  57. package/dist/lib/format-token-count.d.ts +4 -0
  58. package/dist/lib/format-token-count.d.ts.map +1 -0
  59. package/dist/lib/format-token-count.js +31 -0
  60. package/docs/activity.md +3 -1
  61. package/docs/agent-orb.md +82 -0
  62. package/docs/agent-visual.md +5 -0
  63. package/docs/contract.md +46 -3
  64. package/docs/model-identity.md +18 -0
  65. package/package.json +7 -2
@@ -0,0 +1,82 @@
1
+ # Agent orbs
2
+
3
+ `AgentOrb` is the abstract Agent identity family requested on 2026-09-19:
4
+ seven structures from `thinking-orbs` 0.3.1, each painted in one configurable
5
+ colour. These are persistent appearance choices, not activity states. They
6
+ apply equally to Nadia and other Agents; this family assigns no face or
7
+ special character to Nadia. Existing Forma consumers are not migrated by
8
+ this component slice.
9
+
10
+ | Form | Structure | Upstream preset |
11
+ | --- | --- | --- |
12
+ | `ribbon` | Flowing dotted bands | `composing` |
13
+ | `lattice` | Rotating particle bands | `solving` |
14
+ | `orbit` | Particles on tilted orbits | `working` |
15
+ | `globe` | Dotted globe and scanning meridian | `searching` |
16
+ | `network` | Connected constellation | `connecting` |
17
+ | `braid` | Interwoven strands | `weaving` |
18
+ | `morph` | Changing geometric contour | `shaping` |
19
+
20
+ The form does not select a job, tools or runtime status. Do not switch it when
21
+ an Agent starts searching or solving. Applications own the persisted form,
22
+ colour, name and status; names beside avatars provide exact identification.
23
+
24
+ ## Component
25
+
26
+ ```tsx
27
+ import { AgentOrb } from "@nadicodeai/ui/components/agent-orb";
28
+
29
+ <AgentOrb form="ribbon" color="var(--nc-identity-cobalto)" size={32} label="Nadia" />;
30
+ ```
31
+
32
+ `form` is required. `color` accepts one CSS colour, including a customer-chosen
33
+ colour or a canonical token. Omit it to inherit text colour. This configurable
34
+ artwork is not a new palette for controls or status. Every particle and line
35
+ uses the same pigment; opacity, not another colour, creates depth. Working
36
+ releases occasional coloured flourishes; Done repeats the same arcs,
37
+ arrowheads, rings and sparkles in a short celebration around
38
+ that single-colour identity, using the existing chart and warning tokens. Choose a
39
+ colour visible on the intended background. A deliberately black pigment on a
40
+ black surface is not automatically recoloured.
41
+
42
+ Sizes are 20, 24, 32, 40, 64, 96 and 160 CSS pixels. Menu sizes through 32 use
43
+ the upstream compact density; larger sizes use its detailed profile. `paused`
44
+ holds the current frame and resumes without resetting the appearance. An
45
+ accessible image requires `label`; use `decorative` beside an existing name.
46
+ The component is Canvas 2D, not WebGL. It reuses the vendor's portable geometry
47
+ API because the stock React component only offers monochrome light/dark ink,
48
+ not a configurable pigment.
49
+
50
+ Motion is limited to 30 painted frames per second. Offscreen and hidden orbs
51
+ stop scheduling animation. Reduced motion freezes the current frame and is
52
+ observed live. Unmount removes the frame request and observers. DPR is capped
53
+ at two. Without Canvas 2D, the accessible name remains available.
54
+
55
+ `state` accepts idle, working, waiting, blocked, thinking and done. Geometry
56
+ and state gestures have separate clocks: slowing a gesture must not make the
57
+ idle form appear frozen. Each form has its own geometry pace, shared across
58
+ avatar sizes; Morph holds a contour for about 1.6 seconds and changes it over
59
+ one second at idle. Working and Thinking keep the form's base pace.
60
+ Waiting holds its pose; Blocked makes one gentle interrupted effort and stops.
61
+ V7 keeps the material free-standing and intact:
62
+ no gear, thought bubble, pause, exclamation mark or check is cut into the form.
63
+ Working and Thinking preserve the native geometry: do not stretch, flatten,
64
+ fold or emit copies of the orb to convey either state. Working uses one open,
65
+ tapered multicoloured ribbon passing behind and in front of the orb on a
66
+ 7.2-second loop. Thinking uses three persistent coloured dots above the orb,
67
+ with sequential opacity and slight size pulses on a 3.6-second loop.
68
+ The distinct symbols remain visible throughout both cycles. Done repeats
69
+ the ribbon in three celebratory sweeps and then rests. Changing `motionKey`
70
+ replays it. These exterior cues use the celebration palette; the body keeps
71
+ its configured pigment. Reduced motion holds both cues still.
72
+ No state has an enclosing circle. Keep a nearby status label where exact
73
+ state identification matters, including reduced motion and compact sizes.
74
+ Reduced motion holds the state pose and skips the celebration.
75
+
76
+ The [Portal Agent workspace](../../../apps/portal/src/components/agent-workspace/agent-workspace.tsx)
77
+ uses the shared component. Inspect its Agent list and detail views in the
78
+ running local Portal for compact and full-size appearances. Development
79
+ profiles provide example orb choices; their preview edits do not change
80
+ stored Agent records.
81
+
82
+ [Upstream library and presets](https://libraries.dev/orbs), MIT licensed.
@@ -1,5 +1,10 @@
1
1
  # Agent Visual System
2
2
 
3
+ Legacy API for existing consumers. New Agent workspace surfaces use
4
+ [AgentOrb](agent-orb.md) and the shared
5
+ [product language](../../design-system/PRODUCT_LANGUAGE.md#agent-section-contract).
6
+ The multicolour recipes below do not govern new Portal agent representations.
7
+
3
8
  The Agent visual is the decorative identity for a persistent Agent in Nadia.
4
9
  It is a living, multicolour metaball form whose recipe is assigned by Agent
5
10
  type. It does not represent status, capability, runtime activity, or work
package/docs/contract.md CHANGED
@@ -152,7 +152,7 @@ states to the orb.
152
152
 
153
153
  ## Admission Rules
154
154
 
155
- Assistant conversation and runtime APIs enter through `@nadicodeai/ui/agents`; Agent identity enters through `@nadicodeai/ui/components/agent-card`, `@nadicodeai/ui/components/agent-visual`, and the Forma avatars in `@nadicodeai/ui/components/forma-avatar` (owned by [`forma-avatar.md`](forma-avatar.md)). The consuming application still constructs the runtime and owns transport, persistence, permissions, tools, approvals, and failure policy. Shared non-Agent product components (a shell, a settings surface, a generic section, a diff, or a file preview) are admitted only with a named consuming surface landing in the same change. App-bespoke UI and behavior (window chrome, PTY/xterm embeds, queues, approvals, and persistence) stay in the consuming app; they never become package abstractions. A component left unconsumed after its target migration ships gets removed.
155
+ Assistant conversation and runtime APIs enter through `@nadicodeai/ui/agents`; Agent identity enters through `@nadicodeai/ui/components/agent-card`, `@nadicodeai/ui/components/agent-orb`, `@nadicodeai/ui/components/agent-visual`, and the Forma avatars in `@nadicodeai/ui/components/forma-avatar` (owned by [`forma-avatar.md`](forma-avatar.md)). The consuming application still constructs the runtime and owns transport, persistence, permissions, tools, approvals, and failure policy. Shared non-Agent product components (a shell, a settings surface, a generic section, a diff, or a file preview) are admitted only with a named consuming surface landing in the same change. App-bespoke UI and behavior (window chrome, PTY/xterm embeds, queues, approvals, and persistence) stay in the consuming app; they never become package abstractions. A component left unconsumed after its target migration ships gets removed.
156
156
 
157
157
  ### Placement
158
158
 
@@ -166,6 +166,17 @@ where [`apps/nadia/docs/entry-screen.md`](../../../apps/nadia/docs/entry-screen.
166
166
  owns their contract. `packages/ui/tests/guards/product-placement.test.ts`
167
167
  refuses a product's name in either package.
168
168
 
169
+ ### Abstract Agent identities
170
+
171
+ `AgentOrb` is the seven-form, single-colour abstract family in
172
+ [`agent-orb.md`](agent-orb.md), exposed through
173
+ `@nadicodeai/ui/components/agent-orb`. Its consuming validation surface is
174
+ `examples/agent-orbs`: the built component at detail, menu and conversation
175
+ sizes, with independently editable colours. The application stores appearance;
176
+ upstream activity names select geometry only and never infer an Agent role or
177
+ change its identity with runtime work. Customer-selected artwork colours are
178
+ inputs, not component palette literals or interface colour roles.
179
+
169
180
  ### Agent identity presentation
170
181
 
171
182
  The visual system (the closed recipes, motion, fallbacks, and licensing) is
@@ -190,7 +201,6 @@ product-domain `agent` object prop in the shared package.
190
201
  - **Reusable sections and compositions live here after proof.** Bento grids, media mounts, demo surfaces, page frames, section intros, CTA bands, proof slots, benefits grids, generic shells, and homepage/use-case sections belong in `@nadicodeai/ui` when a second concrete consumer, a plan-approved shared component, or a named validation slice proves the package boundary. Website, portal, and sibling Nadia routes pass data and media children into existing compositions instead of rebuilding layout locally.
191
202
  - **Brand renderers live here for React consumers.** Logo geometry, asset generation, and usage semantics are owned by [`packages/design-system/DESIGN.md`, "Brand media authority"](../../design-system/DESIGN.md#brand-media-authority). `BrandLockup` supplies the approved horizontal lockup. `BrandMark` serves tight spaces and `BrandWordmark` serves placements where the name must read by itself. All three render the package's public neutral geometry seam with React-scoped SVG ids, dynamic theme paint, and accessible names. Consuming routes use these adapters; they never import raw logo assets, draw brand SVG inline, mask or recolor assets, or create another lockup rule.
192
203
  - **Third-party brand marks are generated, never hand-drawn and never hand-edited.** Other companies' marks live in `packages/ui/src/components/brand-icons/`, emitted from an explicit allow-list by `packages/ui/scripts/build-brand-icons.mjs` and exported through the `@nadicodeai/ui/components/brand-icons` subpath. They are identity images, not UI icons: a brand mark is exempt from the currentColor stroke system and from the raw-literal rule, it never stands in for a UI icon, and a UI icon never stands in for a brand. Marks drawn as one silhouette are stripped to `currentColor` by the generator; every other mark keeps its official colors verbatim. To add a brand, edit the generator's allow-list and run `npm run generate:brand-icons -w @nadicodeai/ui`; hand edits to the generated directory are lost and `packages/ui/tests/guards/brand-icons-codegen.test.ts` fails on them. Use is nominative only — naming a platform, an integration, or a provider — never adjacent to endorsement or partnership wording; that nominative posture is the licensing and trademark position, so a mark never appears where the copy implies endorsement.
193
-
194
204
  The one script reads two explicit allow-lists: platform marks out of the Iconify `logos` set (CC0-1.0), and model makers' marks out of the LobeHub icon set (MIT, `@lobehub/icons-static-svg`), both as `devDependencies`. The emitted components are plain SVG, so neither icon data package belongs in the runtime dependency set or reaches a consumer bundle. The artwork itself does ship, so every upstream whose licence asks for one travels with a notice in `LICENSES/` and `NOTICE`, and `tests/guards/brand-icons-codegen.test.ts` holds the allow-list to that: a new source cannot ship unattributed.
195
205
  - **No fake proof APIs.** Components may support future testimonials, logos, stats, and proof slots, but they must render nothing public when the proof is absent. Do not ship placeholder customer names, metrics, or logos.
196
206
 
@@ -230,7 +240,9 @@ comparison line and a note, both in the caller's language. There is no grouped o
230
240
  row of KPIs is a `CardRow` of `KpiCard`s, each its own card. Apps supply the
231
241
  figures and bind links through `render`. Charts expose `size` (`default` or
232
242
  `lg`), which selects a fixed plot height, so consumers never select internal
233
- chart elements.
243
+ chart elements. `ChartSummary` owns a chart's measured value, trend badge,
244
+ status and comparison line inside the chart card; consumers provide typed
245
+ content instead of rebuilding that presentation beside the plot.
234
246
 
235
247
  `CollectionToolbar` owns the collection-control layout: compact filters at the
236
248
  leading edge, a flexible search field, and trailing actions. Its slot order is
@@ -284,9 +296,24 @@ and status retain their column headers. Missing values retain their place.
284
296
  `standard` retains full columns at 768px of container width, `wide` at 1024px,
285
297
  and `spacious` at 1152px for schemas with additional operational columns.
286
298
  The same owner switches column visibility, detail visibility, and row boundaries.
299
+ `TableRecordGroup` wraps the primary row and its compact detail row in one
300
+ native row group, so hovering, focusing, expanding, or selecting either half
301
+ highlights one record. A consumer does not render the two rows as independent
302
+ siblings. Portal `DataTable` chooses a layout from its column count by default;
303
+ a comparison whose columns remain readable longer may select one of these
304
+ shared layouts instead of adding route-owned width rules.
287
305
  Two supporting facts use two columns; additional facts can use three when they fit.
288
306
  The cell renderer supplies the value, leaving the label to the detail row.
289
307
 
308
+ ### Missing table values
309
+
310
+ `TableValue` owns the [cross-product missing-value convention](../../design-system/PRODUCT_LANGUAGE.md#missing-values-in-collections).
311
+ Pass the actual scalar or rendered value and a required localized `missingLabel`.
312
+ Null, undefined and empty strings render a muted, visually fixed `—` plus
313
+ screen-reader text; zero and present values pass through unchanged. No custom
314
+ visible fallback is exposed. Do not prefill `value` with absence copy.
315
+ Loading, failure, permission and actionable states remain outside this component.
316
+
290
317
  ## Consumer Boundary
291
318
 
292
319
  Consumers own routing, auth, app data, server actions, runtime construction and adapters, permission decisions, analytics, and app-specific copy. The package owns reusable React presentation and the public Agent UI dependency boundary. Agent state and behavior come through the Agents interface; non-React and TUI contracts belong to their consuming products.
@@ -342,3 +369,19 @@ The identity row names who is signed in and carries one `DropdownMenuItem
342
369
  iconOnly` gear at its trailing edge, linking to the account section; the menu
343
370
  does not repeat that section's pages as commands. Consumers bind preference
344
371
  persistence, routing, and localized labels.
372
+
373
+ ## Object workspace compositions
374
+
375
+ `ObjectIdentity`, `ObjectOverview`, `ObjectSection` and `ObjectFacts` compose the
376
+ [shared IA patterns](../../design-system/PRODUCT_LANGUAGE.md#reusable-information-architecture)
377
+ from existing Card and typography foundations. They own identity/action alignment,
378
+ primary/supporting responsive columns, summary boundaries and semantic definition
379
+ pairs. They take slots and values, never domain stores, URLs, permissions or save
380
+ functions. Portal's agent workspace binds them to its scoped routes; Nadia may
381
+ reuse the same presentation within its own shell. Do not ship a second complete
382
+ Agent application inside this package.
383
+
384
+ `ObjectIdentity.support` adds a small set of stable, labelled context facts to
385
+ the identity header. The facts sit beside the identity when space allows and
386
+ collapse behind the caller's localized disclosure label on compact screens.
387
+ Operational warnings and changing report readings remain in the page body.
@@ -0,0 +1,18 @@
1
+ # Model identity compatibility adapter
2
+
3
+ `ModelIdentity` is a compatibility adapter for consumers that still pass one
4
+ `provider/model` string. It derives the author prefix and delegates all visual
5
+ rendering to the canonical `ModelMark`; it has no provider registry, generated
6
+ artwork, or presentation of its own. Unknown authors therefore receive the
7
+ same neutral tile as every other `ModelMark` consumer.
8
+
9
+ ```tsx
10
+ import { ModelIdentity } from "@nadicodeai/ui/components/model-identity";
11
+
12
+ <ModelIdentity model="anthropic/claude-sonnet-5" />;
13
+ ```
14
+
15
+ New consumers should import `ModelMark` and pass its `author` and `name`
16
+ properties directly. The adapter keeps the older `model`, `label`, and
17
+ `markSize` call shape while consumers migrate; a string `label` becomes the
18
+ canonical model name, otherwise the model segment after the slash is shown.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nadicodeai/ui",
3
- "version": "8.1.0",
3
+ "version": "8.2.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -36,6 +36,10 @@
36
36
  "types": "./dist/lib/theme-mode.d.ts",
37
37
  "import": "./dist/lib/theme-mode.js"
38
38
  },
39
+ "./lib/format-token-count": {
40
+ "types": "./dist/lib/format-token-count.d.ts",
41
+ "import": "./dist/lib/format-token-count.js"
42
+ },
39
43
  "./components/*": {
40
44
  "types": "./dist/components/*.d.ts",
41
45
  "import": "./dist/components/*.js"
@@ -66,11 +70,12 @@
66
70
  "@assistant-ui/react": "0.15.20",
67
71
  "@assistant-ui/react-markdown": "0.14.15",
68
72
  "@base-ui/react": "^1.8.0",
69
- "@nadicodeai/design-system": "8.1.0",
73
+ "@nadicodeai/design-system": "8.2.0",
70
74
  "@paper-design/shaders": "0.0.81",
71
75
  "class-variance-authority": "^0.7.1",
72
76
  "clsx": "^2.1.1",
73
77
  "cmdk": "^1.1.1",
78
+ "date-fns": "^4.4.0",
74
79
  "embla-carousel-react": "^8.6.0",
75
80
  "input-otp": "^1.5.0",
76
81
  "lucide-react": "1.47.0",