@nadicodeai/ui 7.0.0 → 7.1.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 +2 -1
- package/LICENSES/LOBEHUB-ICONS-MIT.txt +21 -0
- package/NOTICE +14 -0
- package/dist/components/brand-icons/claude.d.ts +18 -0
- package/dist/components/brand-icons/claude.d.ts.map +1 -0
- package/dist/components/brand-icons/claude.js +22 -0
- package/dist/components/brand-icons/deepseek.d.ts +18 -0
- package/dist/components/brand-icons/deepseek.d.ts.map +1 -0
- package/dist/components/brand-icons/deepseek.js +22 -0
- package/dist/components/brand-icons/gemini.d.ts +18 -0
- package/dist/components/brand-icons/gemini.d.ts.map +1 -0
- package/dist/components/brand-icons/gemini.js +25 -0
- package/dist/components/brand-icons/grok.d.ts +18 -0
- package/dist/components/brand-icons/grok.d.ts.map +1 -0
- package/dist/components/brand-icons/grok.js +22 -0
- package/dist/components/brand-icons/meta.d.ts +18 -0
- package/dist/components/brand-icons/meta.d.ts.map +1 -0
- package/dist/components/brand-icons/meta.js +25 -0
- package/dist/components/brand-icons/mistral.d.ts +18 -0
- package/dist/components/brand-icons/mistral.d.ts.map +1 -0
- package/dist/components/brand-icons/mistral.js +22 -0
- package/dist/components/brand-icons/moonshot.d.ts +18 -0
- package/dist/components/brand-icons/moonshot.d.ts.map +1 -0
- package/dist/components/brand-icons/moonshot.js +22 -0
- package/dist/components/brand-icons/openai.d.ts +18 -0
- package/dist/components/brand-icons/openai.d.ts.map +1 -0
- package/dist/components/brand-icons/openai.js +22 -0
- package/dist/components/brand-icons/qwen.d.ts +18 -0
- package/dist/components/brand-icons/qwen.d.ts.map +1 -0
- package/dist/components/brand-icons/qwen.js +25 -0
- package/dist/components/brand-icons.d.ts +9 -0
- package/dist/components/brand-icons.d.ts.map +1 -1
- package/dist/components/brand-icons.js +9 -0
- package/dist/components/chart-breakdown-table.d.ts +26 -6
- package/dist/components/chart-breakdown-table.d.ts.map +1 -1
- package/dist/components/chart-breakdown-table.js +4 -4
- package/dist/components/chart-time-series.d.ts +68 -2
- package/dist/components/chart-time-series.d.ts.map +1 -1
- package/dist/components/chart-time-series.js +112 -11
- package/dist/components/chart.d.ts +2 -1
- package/dist/components/chart.d.ts.map +1 -1
- package/dist/components/chart.js +11 -2
- package/dist/components/model-mark.d.ts +19 -0
- package/dist/components/model-mark.d.ts.map +1 -0
- package/dist/components/model-mark.js +66 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/docs/contract.md +33 -1
- package/package.json +3 -2
package/docs/contract.md
CHANGED
|
@@ -102,6 +102,8 @@ page, not in repeated panels surrounding identical child tables.
|
|
|
102
102
|
`BreakdownTable` owns its responsive comparison layout: identity and value stay
|
|
103
103
|
in the main row; share moves into a labeled detail row when space is tight.
|
|
104
104
|
Its caption names the table. Callers supply data and labels, not column-hiding CSS.
|
|
105
|
+
An entity's optional `mark` prints between its color dot and its label, so a
|
|
106
|
+
ranked model row shows the maker's mark beside the name.
|
|
105
107
|
|
|
106
108
|
### Record action menus
|
|
107
109
|
|
|
@@ -145,7 +147,7 @@ states to the orb.
|
|
|
145
147
|
- **Package surface is source-backed.** Public components stay flat under `src/components/`. Reviewed registry source under `src/internal/` is implementation, not a package namespace. Do not add top-level exports for recipes, blocks, agent, terminal, or vendor groupings unless a later package API decision adds concrete public source, built files, docs, and tests in the same change.
|
|
146
148
|
- **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.
|
|
147
149
|
- **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.
|
|
148
|
-
- **Charts are shadcn charts.** `chart.tsx` is shadcn's `chart` component over Recharts (`ChartContainer`, `ChartTooltip`, `ChartLegend`, theme-keyed `ChartConfig`), and the chart kit (`chart-time-series`, `chart-breakdown-table`, `chart-sparkline`, `chart-bullet-bar`, `chart-kpi-stat`, `chart-delta`, `chart-date-range-control`, `chart-entity-colors`) is built on it. An app composes these and never imports `recharts` or draws SVG charts of its own; `recharts` is declared by this package alone. A chart the kit lacks is first looked up in the shadcn registry through the CLI or MCP, then added to the kit with NadicodeAI tokens and the chart accessibility contract. What a chart shows is decided by the product; how it is drawn comes from here.
|
|
150
|
+
- **Charts are shadcn charts.** `chart.tsx` is shadcn's `chart` component over Recharts (`ChartContainer`, `ChartTooltip`, `ChartLegend`, theme-keyed `ChartConfig`), and the chart kit (`chart-time-series`, `chart-breakdown-table`, `chart-sparkline`, `chart-bullet-bar`, `chart-kpi-stat`, `chart-delta`, `chart-date-range-control`, `chart-entity-colors`) is built on it. An app composes these and never imports `recharts` or draws SVG charts of its own; `recharts` is declared by this package alone. A chart the kit lacks is first looked up in the shadcn registry through the CLI or MCP, then added to the kit with NadicodeAI tokens and the chart accessibility contract. What a chart shows is decided by the product; how it is drawn comes from here. `TimeSeriesComposed` is that lookup performed: the registry holds no composed item, so the bars-plus-line composition for a rate over its measures is Recharts' `ComposedChart` through this same foundation, with the second axis existing only for a series that names it.
|
|
149
151
|
- **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.
|
|
150
152
|
- **A change to what the package ships bumps the version.** Any change to exported components, `src/index.ts`, package `exports`, `globals.css`, theme behavior, package docs, or design-system token, CSS, or theme output this package consumes bumps both package versions in lockstep before handoff, and `npm pack --dry-run -w @nadicodeai/ui` shows exactly what consumers receive (procedure: `../../../docs/agents/publish.md`).
|
|
151
153
|
|
|
@@ -190,8 +192,38 @@ package.
|
|
|
190
192
|
- **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
193
|
- **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
194
|
- **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.
|
|
195
|
+
|
|
196
|
+
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.
|
|
193
197
|
- **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.
|
|
194
198
|
|
|
199
|
+
### Model identity
|
|
200
|
+
|
|
201
|
+
`ModelMark` is a model's identity: its maker's mark, plus the model's name and
|
|
202
|
+
author when a caller supplies them. It takes `author` — the slug a usage read
|
|
203
|
+
reports — and resolves it against the generated model-maker marks (rule
|
|
204
|
+
`model-shown-with-logo`). An author off that allow-list gets the neutral tile,
|
|
205
|
+
so a model never falls back to a bare colour swatch. The tile owns the box and
|
|
206
|
+
scales the artwork inside it; `size` states that box, and the author slug prints
|
|
207
|
+
as reported.
|
|
208
|
+
|
|
209
|
+
One component has two readings: with `name`, the row a table cell or ranked
|
|
210
|
+
list reads; without one, the bare mark that stands in a chart legend beside that
|
|
211
|
+
legend's own text. `BreakdownTable` entities and the `chart-time-series` series
|
|
212
|
+
(`TimeSeriesBars`, `TimeSeriesArea`, `TimeSeriesComposed`) take an optional
|
|
213
|
+
`mark` for that second reading, placed beside the entity's or series' name. A
|
|
214
|
+
chart places it on each surface itself: the legend through the explicit `marks`
|
|
215
|
+
path on `ChartLegendContent`, and the tooltip row through the kit's own row
|
|
216
|
+
renderer, because `rule/model-shown-with-logo` names tooltips among the places a
|
|
217
|
+
model appears. A series' mark never travels through `ChartConfig`, whose label
|
|
218
|
+
the legend and the default tooltip item both read, so an identity parked there
|
|
219
|
+
would appear on a surface that never asked for it. No legend is forked. A mark is
|
|
220
|
+
decoration beside the label that already names it; one standing alone takes
|
|
221
|
+
`label` (`role="img"` with an accessible name) or stays hidden.
|
|
222
|
+
|
|
223
|
+
What this package does not own: which authors exist, which mark a maker gets
|
|
224
|
+
(the generator's allow-list), or what a surface shows a model for. The consuming
|
|
225
|
+
app supplies the author slug, the name, and the colors it pairs with them.
|
|
226
|
+
|
|
195
227
|
## Accessibility Invariant
|
|
196
228
|
|
|
197
229
|
**Tier-1 accessibility is tested, browser-free.** Rendering component tests use the package `expectAccessible` helper to check the rendered DOM. The jsdom tier is structural: rendered contrast, landmark context, focus, and keyboard behavior belong to real-browser Playwright coverage. The shared library ESLint configuration is the executable authority for static JSX accessibility rules, and the repository quality doctrine owns their policy; this contract does not copy the rule inventory.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@assistant-ui/react": "0.15.18",
|
|
66
66
|
"@assistant-ui/react-markdown": "0.14.14",
|
|
67
67
|
"@base-ui/react": "^1.8.0",
|
|
68
|
-
"@nadicodeai/design-system": "7.
|
|
68
|
+
"@nadicodeai/design-system": "7.1.0",
|
|
69
69
|
"@paper-design/shaders": "0.0.80",
|
|
70
70
|
"class-variance-authority": "^0.7.1",
|
|
71
71
|
"clsx": "^2.1.1",
|
|
@@ -96,6 +96,7 @@
|
|
|
96
96
|
"devDependencies": {
|
|
97
97
|
"@iconify-json/logos": "^1.2.14",
|
|
98
98
|
"@iconify/utils": "^3.1.7",
|
|
99
|
+
"@lobehub/icons-static-svg": "^1.95.0",
|
|
99
100
|
"@nadicodeai/eslint-plugin": "*",
|
|
100
101
|
"@stryker-mutator/core": "10.0.0",
|
|
101
102
|
"@stryker-mutator/vitest-runner": "10.0.0",
|