@nadicodeai/ui 4.0.0 → 4.0.1
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 +20 -27
- package/README.md +7 -13
- package/dist/eslint/rules/no-unpinned-vercel-functions-import.js +3 -3
- package/docs/contract.md +4 -2
- package/package.json +3 -5
- package/docs/agents/nadicodeai-ui.md +0 -42
- package/llms.txt +0 -52
- package/skills/nadicodeai-ui/SKILL.md +0 -78
package/AGENTS.md
CHANGED
|
@@ -1,37 +1,30 @@
|
|
|
1
|
-
# @nadicodeai/ui
|
|
1
|
+
# @nadicodeai/ui
|
|
2
2
|
|
|
3
|
-
The `@nadicodeai/ui` npm workspace: the shared
|
|
3
|
+
The `@nadicodeai/ui` npm workspace: the shared React UI package, with shadcn primitives on Base UI, the `@nadicodeai/ui/agents` interface, section compositions and product components. Source in `src/`, published from `dist/`. Read `docs/contract.md` before changing the library.
|
|
4
4
|
|
|
5
5
|
## Commands
|
|
6
6
|
|
|
7
|
-
Proof follows [the repository pipeline](../../docs/agents/develop.md#the-pipeline):
|
|
8
|
-
`npm run check -w @nadicodeai/ui` and `npm run test -w @nadicodeai/ui` before
|
|
9
|
-
pushing. `test` builds `dist` first, then runs the workspace guards and the
|
|
10
|
-
browser-free jsdom + axe-core tier-1 accessibility checks.
|
|
11
|
-
|
|
12
7
|
| Command | When |
|
|
13
8
|
| --- | --- |
|
|
14
|
-
| `npm run
|
|
15
|
-
| `npm run
|
|
16
|
-
| `npm run build -w @nadicodeai/ui` |
|
|
17
|
-
| `npm run
|
|
18
|
-
| `npm
|
|
9
|
+
| `npm run check -w @nadicodeai/ui` then `npm run test -w @nadicodeai/ui` | Before pushing; `test` builds `dist`, then runs the guards and the jsdom accessibility tier |
|
|
10
|
+
| `npm run dev -w @nadicodeai/ui` | Watch `src/`, refresh `dist/` |
|
|
11
|
+
| `npm run build:dev -w @nadicodeai/ui` | One-shot incremental `dist/` refresh |
|
|
12
|
+
| `npm run build -w @nadicodeai/ui` | Emit `dist/` before packing or app builds |
|
|
13
|
+
| `npm run generate:brand-icons -w @nadicodeai/ui` | After editing the allow-list in `scripts/build-brand-icons.mjs` |
|
|
14
|
+
| `npm pack --dry-run -w @nadicodeai/ui` | What consumers receive, after a surface, export, CSS or docs change |
|
|
19
15
|
|
|
20
16
|
## Routing
|
|
21
17
|
|
|
22
|
-
|
|
|
18
|
+
| Topic | Path |
|
|
23
19
|
| --- | --- |
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
| Third-party brand marks
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
| Motion
|
|
30
|
-
| Which component subpaths exist | `package.json` `exports
|
|
31
|
-
| shadcn
|
|
32
|
-
| Releasing
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
| Portal screens | `../../apps/portal/AGENTS.md` |
|
|
36
|
-
| User-visible UI work | The `product-design` skill, loaded after this rulebook |
|
|
37
|
-
| Docs shipped to package consumers | `docs/contract.md` owns invariants, `docs/consuming-cross-repo.md` owns setup, and `llms.txt`, `docs/agents/nadicodeai-ui.md`, `docs/migration/`, and `skills/nadicodeai-ui/SKILL.md` map to those owners while documenting their own component or workflow surface |
|
|
20
|
+
| Design-language terms | `../design-system/CONTEXT.md` |
|
|
21
|
+
| Invariants, component admission, section vocabulary, consumer boundary | `docs/contract.md` |
|
|
22
|
+
| Third-party brand marks | [Admission Rules](docs/contract.md#admission-rules); the NadicodeAI logo is `BrandLockup`, `BrandMark`, `BrandWordmark` |
|
|
23
|
+
| Consumer installation and stylesheet setup | `docs/consuming-cross-repo.md` |
|
|
24
|
+
| Tokens, modes, themes, cascade, the public stylesheet | `../design-system/DESIGN.md` and `../design-system/AGENTS.md` |
|
|
25
|
+
| Motion | `../design-system/DESIGN.md`, `src/lib/motion.ts`, then the `product-design` skill |
|
|
26
|
+
| Which component subpaths exist | `package.json` `exports`; the `./components/*` wildcard over `src/components/` is the whole surface |
|
|
27
|
+
| shadcn and assistant-ui discovery | the live CLIs `npx shadcn@latest` and `npx assistant-ui@latest`; `--overwrite` needs a maintainer ask |
|
|
28
|
+
| Releasing and publishing | `../../docs/agents/publish.md` |
|
|
29
|
+
| Website page assembly | `../../apps/website/AGENTS.md`. Portal screens: `../../apps/portal/AGENTS.md` |
|
|
30
|
+
| User-visible UI work | the `product-design` skill, loaded after this file |
|
package/README.md
CHANGED
|
@@ -18,9 +18,8 @@ The package ships:
|
|
|
18
18
|
- React adapters over the design-system grammar and assets
|
|
19
19
|
- reusable marketing/section compositions
|
|
20
20
|
- presentational product components for shared application surfaces
|
|
21
|
-
- package-local agent guidance: `AGENTS.md`, `docs/contract.md`,
|
|
22
|
-
`docs/
|
|
23
|
-
`skills/nadicodeai-ui/SKILL.md`
|
|
21
|
+
- package-local agent guidance: `AGENTS.md`, `docs/contract.md`, and
|
|
22
|
+
`docs/migration/`
|
|
24
23
|
|
|
25
24
|
The package surface is source-backed and flat under `src/components/`. Reviewed
|
|
26
25
|
third-party registry source stays under `src/internal/` and is not a package
|
|
@@ -164,16 +163,11 @@ field primitive instead of creating a parallel form-control API.
|
|
|
164
163
|
|
|
165
164
|
## Agent instructions
|
|
166
165
|
|
|
167
|
-
The npm package
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
- `docs/agents/nadicodeai-ui.md` for detailed usage and maintenance guidance
|
|
173
|
-
- `skills/nadicodeai-ui/SKILL.md` when the agent runtime supports skills
|
|
174
|
-
|
|
175
|
-
These files are packaged through npm `files`; they are not runtime module
|
|
176
|
-
exports.
|
|
166
|
+
The npm package ships two agent-facing files on purpose: `AGENTS.md`, the
|
|
167
|
+
package map and its rules, and `docs/contract.md`, the package contract. A
|
|
168
|
+
consuming repository points its own agent map at
|
|
169
|
+
`node_modules/@nadicodeai/ui/AGENTS.md`. They are packaged through npm `files`;
|
|
170
|
+
they are not runtime module exports.
|
|
177
171
|
|
|
178
172
|
## Build
|
|
179
173
|
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
// incident and the remediation in its message.
|
|
13
13
|
//
|
|
14
14
|
// Static `import` declarations only. The rule's provenance is a real production
|
|
15
|
-
// crash
|
|
16
|
-
// route
|
|
15
|
+
// crash: `ipAddress()` duck-typed its input and threw on the device-authorize
|
|
16
|
+
// route, and
|
|
17
17
|
// that crash arrived through a plain named import, which is also the only form
|
|
18
18
|
// that can prove which symbols it binds. The rule used to also flag any string
|
|
19
19
|
// literal or template literal spelling the package name anywhere in a file,
|
|
@@ -64,7 +64,7 @@ export const noUnpinnedVercelFunctionsImport = {
|
|
|
64
64
|
},
|
|
65
65
|
messages: {
|
|
66
66
|
banned:
|
|
67
|
-
"@vercel/functions duck-types its inputs and ipAddress() crashed production once
|
|
67
|
+
"@vercel/functions duck-types its inputs and ipAddress() crashed production once on a headers-like object. Its use is pinned per module and per symbol; amend the allowlist deliberately or keep the dependency out (found {{value}}).",
|
|
68
68
|
},
|
|
69
69
|
schema: [],
|
|
70
70
|
},
|
package/docs/contract.md
CHANGED
|
@@ -97,7 +97,7 @@ gone, is [`packages/design-system/DESIGN.md`, "## Status Vocabulary"](../../desi
|
|
|
97
97
|
- **Agents is the client-only conversation interface.** `@nadicodeai/ui/agents` re-exports the complete `@assistant-ui/react` runtime and primitive API plus the reviewed, branded registry composition held under `src/internal/assistant-ui/`. Its built entry retains `"use client"`. Consumers receive Thread, attachments, Markdown, reasoning, tools, suggestions, providers, runtimes, hooks, and types from that one domain namespace. Agent identity components use their direct component subpaths so server compositions do not import the conversation runtime. The vendor name is not a public NadicodeAI subpath, and the package does not rename, wrap, or rebuild assistant-ui behavior.
|
|
98
98
|
- **Base UI is the active primitive base.** `components.json` must resolve through a Base style, currently `base-nova`, and `npx shadcn@latest info --json` must report `base: "base"`. Do not reintroduce `radix-ui`, `@radix-ui/*`, or `vaul` to package source, dependencies, or app optimizer configuration. Registry-owned shadcn primitives stay aligned with current `shadcn@latest` Base UI output; use Base UI `render` composition instead of Radix `asChild`. `cmdk` is allowed only for the stock shadcn Command component while the current `base-nova` registry declares that dependency; do not use it elsewhere or replace it without a shadcn/compatibility decision and tests.
|
|
99
99
|
- **Named shadcn blocks stay named.** When a user, plan, or issue selects a shadcn block/example such as `login-02`, `signup-02`, `dashboard-01`, or `sidebar-*`, use that registry item as the source of truth through shadcn CLI/MCP. Do not replace it with a package-authored abstraction unless the plan explicitly records the substitution, the reason, and the true consumer route that proves it.
|
|
100
|
-
- **
|
|
100
|
+
- **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`).
|
|
101
101
|
|
|
102
102
|
## Admission Rules
|
|
103
103
|
|
|
@@ -114,7 +114,9 @@ image opts into `decorative={false}` with a `label`. `AgentCard` composes the
|
|
|
114
114
|
fundamental `Card` with explicit `visual`, `name`, `job`, `status`, `meta`,
|
|
115
115
|
and `action` slots and owns presentation only; when it is the page identity,
|
|
116
116
|
the `name` slot carries the page's `h1`. The app owns Agent data, recipe
|
|
117
|
-
assignment, status grammar, routing, and actions
|
|
117
|
+
assignment, status grammar, routing, and actions; it assigns a recipe
|
|
118
|
+
explicitly and never infers or randomizes one from a free-form role, and an
|
|
119
|
+
Agent that is a recognizable content object renders through `AgentCard`. There is no `AgentGlyph`,
|
|
118
120
|
`AgentRow`, `KpiCard`, or product-domain `agent` object prop in the shared
|
|
119
121
|
package.
|
|
120
122
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -42,9 +42,7 @@
|
|
|
42
42
|
"NOTICE",
|
|
43
43
|
"README.md",
|
|
44
44
|
"AGENTS.md",
|
|
45
|
-
"
|
|
46
|
-
"docs",
|
|
47
|
-
"skills"
|
|
45
|
+
"docs"
|
|
48
46
|
],
|
|
49
47
|
"scripts": {
|
|
50
48
|
"dev": "node scripts/dev-build.mjs --watch",
|
|
@@ -63,7 +61,7 @@
|
|
|
63
61
|
"@assistant-ui/react": "0.15.1",
|
|
64
62
|
"@assistant-ui/react-markdown": "0.14.8",
|
|
65
63
|
"@base-ui/react": "^1.6.0",
|
|
66
|
-
"@nadicodeai/design-system": "4.0.
|
|
64
|
+
"@nadicodeai/design-system": "4.0.1",
|
|
67
65
|
"@paper-design/shaders": "0.0.78",
|
|
68
66
|
"class-variance-authority": "^0.7.1",
|
|
69
67
|
"clsx": "^2.1.1",
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# NadicodeAI UI Agent Guide
|
|
2
|
-
|
|
3
|
-
This map ships with `@nadicodeai/ui` so coding agents can find the package's
|
|
4
|
-
authoritative interfaces without carrying a second copy of them.
|
|
5
|
-
|
|
6
|
-
## Start here
|
|
7
|
-
|
|
8
|
-
- Consumer installation and stylesheet setup:
|
|
9
|
-
[`../consuming-cross-repo.md`](../consuming-cross-repo.md).
|
|
10
|
-
- Package/consumer boundary, styling invariants, admission rules, and
|
|
11
|
-
accessibility: [`../contract.md`](../contract.md).
|
|
12
|
-
- Current component modules and named exports: `src/components/`,
|
|
13
|
-
`src/index.ts` and `package.json` in a source checkout;
|
|
14
|
-
package exports and declarations in an installed package.
|
|
15
|
-
- Import examples, form-stack guidance, `SeamGrid` usage, and live shadcn and
|
|
16
|
-
assistant-ui discovery commands: [`../../README.md`](../../README.md).
|
|
17
|
-
|
|
18
|
-
Do not maintain component, chart, form, section, export, or registry inventories
|
|
19
|
-
in agent prose. Follow the owning source or document above.
|
|
20
|
-
|
|
21
|
-
## Product work
|
|
22
|
-
|
|
23
|
-
- Agent UI ownership: [`../contract.md`](../contract.md).
|
|
24
|
-
- Product compositions and sections:
|
|
25
|
-
[`../product-compositions.md`](../product-compositions.md) and
|
|
26
|
-
[`../product-sections.md`](../product-sections.md).
|
|
27
|
-
|
|
28
|
-
Routes, persistence, authentication, server state, runtime adapters,
|
|
29
|
-
permissions, analytics, and product-specific copy stay in the consuming app.
|
|
30
|
-
The package admits presentational structure according to its contract.
|
|
31
|
-
|
|
32
|
-
## Maintenance
|
|
33
|
-
|
|
34
|
-
Use shadcn MCP or the CLI live; never commit an upstream registry inventory.
|
|
35
|
-
`components.json` is the project configuration authority, and reviewed source is
|
|
36
|
-
the committed package surface. Preview upstream changes before applying them;
|
|
37
|
-
do not overwrite maintained source without explicit maintainer direction.
|
|
38
|
-
|
|
39
|
-
The package [`AGENTS.md`](../../AGENTS.md) maps scoped commands. Proof follows
|
|
40
|
-
[the repository pipeline](../../../../docs/agents/develop.md#the-pipeline): this workspace's
|
|
41
|
-
`check` and `test`, then the root `npm run check` and `npm run test` when the
|
|
42
|
-
diff reaches other workspaces.
|
package/llms.txt
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# @nadicodeai/ui
|
|
2
|
-
|
|
3
|
-
Shared NadicodeAI React UI package for website, portal, and sibling Nadia apps.
|
|
4
|
-
Use this file as a map; read the owning document before changing behavior.
|
|
5
|
-
|
|
6
|
-
## Sources of truth
|
|
7
|
-
|
|
8
|
-
- Consumer installation and the one public stylesheet:
|
|
9
|
-
`docs/consuming-cross-repo.md`.
|
|
10
|
-
- Component invariants, admission, accessibility, and package boundaries:
|
|
11
|
-
`docs/contract.md`.
|
|
12
|
-
- Current component modules: `src/components/**/*.tsx` in the repository.
|
|
13
|
-
- Current published subpaths: `package.json` `exports` plus the generated
|
|
14
|
-
`dist/components/**/*.d.ts` declarations in an installed package.
|
|
15
|
-
- Public Agent UI interface: `src/agents.ts`, exported as `@nadicodeai/ui/agents`.
|
|
16
|
-
- Material, Card, Empty, glass-control, AgentVisual, and AgentCard semantics:
|
|
17
|
-
`docs/contract.md`; 1.0 adoption steps: `docs/migration/1.0.0.md`; the 2.0
|
|
18
|
-
elevation-utility rename and DTCG paths: `docs/migration/2.0.0.md`.
|
|
19
|
-
- Maintained conversation implementation: `src/internal/assistant-ui/`.
|
|
20
|
-
- Product compositions and sections: `docs/product-compositions.md` and
|
|
21
|
-
`docs/product-sections.md`.
|
|
22
|
-
- Maintenance workflow and live shadcn or assistant-ui discovery:
|
|
23
|
-
`docs/agents/nadicodeai-ui.md`.
|
|
24
|
-
|
|
25
|
-
The component inventory is source-backed and is not repeated in prose. Use the
|
|
26
|
-
source tree while maintaining the package; use `package.json` and generated
|
|
27
|
-
declarations when consuming an installed package.
|
|
28
|
-
|
|
29
|
-
## Imports
|
|
30
|
-
|
|
31
|
-
Prefer explicit component subpaths:
|
|
32
|
-
|
|
33
|
-
```tsx
|
|
34
|
-
import { Button } from "@nadicodeai/ui/components/button";
|
|
35
|
-
import { AssistantRuntimeProvider, Thread } from "@nadicodeai/ui/agents";
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Use the root barrel when it is more useful:
|
|
39
|
-
|
|
40
|
-
```tsx
|
|
41
|
-
import { Button } from "@nadicodeai/ui";
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Read the generated declaration for the current export names and props. Do not
|
|
45
|
-
infer a component API from an upstream example or from this index.
|
|
46
|
-
|
|
47
|
-
## Package boundary
|
|
48
|
-
|
|
49
|
-
The package owns reusable presentational UI. Consuming apps own routes, auth,
|
|
50
|
-
persistence, server state, runtime adapters, permission decisions, analytics,
|
|
51
|
-
and app-specific copy. Use `docs/contract.md` to decide whether new UI belongs
|
|
52
|
-
in the package.
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: nadicodeai-ui
|
|
3
|
-
description: Use when building or modifying NadicodeAI React UI with @nadicodeai/ui, shadcn components, or assistant-ui.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# NadicodeAI UI
|
|
7
|
-
|
|
8
|
-
Use `@nadicodeai/ui` for shared NadicodeAI React UI. It ships built shadcn source components, the `@nadicodeai/ui/agents` interface, React adapters over design-system grammar, reusable NadicodeAI marketing/section compositions, presentational product components, package CSS, and agent instructions. Product components are package surface only when source, public subpath exports, tests, and docs exist together.
|
|
9
|
-
|
|
10
|
-
The package is a flat shadcn-style source surface. Do not create or document
|
|
11
|
-
folders or package namespaces that do not exist. Do not add top-level exports
|
|
12
|
-
for recipes, blocks, agent, or terminal groupings without concrete source, built
|
|
13
|
-
files, docs, and tests in the same package API decision.
|
|
14
|
-
Routes, persistence, auth behavior, runtime adapters, server state, and
|
|
15
|
-
app-owned product features/use cases stay in the consuming app. The complete
|
|
16
|
-
admission boundary lives in `docs/contract.md`.
|
|
17
|
-
|
|
18
|
-
## Required Setup
|
|
19
|
-
|
|
20
|
-
Read `docs/consuming-cross-repo.md` for the canonical React app setup and
|
|
21
|
-
`docs/contract.md` for component styling invariants. Do not reconstruct setup
|
|
22
|
-
from package exports or compose design-system CSS beside the UI stylesheet.
|
|
23
|
-
|
|
24
|
-
## Import Patterns
|
|
25
|
-
|
|
26
|
-
Prefer direct subpaths:
|
|
27
|
-
|
|
28
|
-
```tsx
|
|
29
|
-
import { Button } from "@nadicodeai/ui/components/button";
|
|
30
|
-
import { AssistantRuntimeProvider, Thread, useLocalRuntime } from "@nadicodeai/ui/agents";
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Use barrels when helpful:
|
|
34
|
-
|
|
35
|
-
```tsx
|
|
36
|
-
import { Button, PageFrame } from "@nadicodeai/ui";
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Product component imports:
|
|
40
|
-
|
|
41
|
-
```tsx
|
|
42
|
-
import { DashboardShell } from "@nadicodeai/ui/components/dashboard-shell";
|
|
43
|
-
import { AgentCard } from "@nadicodeai/ui/components/agent-card";
|
|
44
|
-
import { AgentVisual } from "@nadicodeai/ui/components/agent-visual";
|
|
45
|
-
import { Thread } from "@nadicodeai/ui/agents";
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Product Components
|
|
49
|
-
|
|
50
|
-
- Use `@nadicodeai/ui/agents` for assistant-ui conversation primitives, providers, hooks, runtimes, and types. It is a client-only entry; do not import assistant-ui packages directly or recreate their behavior.
|
|
51
|
-
- Import Agent identity from `@nadicodeai/ui/components/agent-card` and `@nadicodeai/ui/components/agent-visual`. Direct subpaths keep the Card composition server-compatible and the animated visual at a client leaf.
|
|
52
|
-
- Use `AgentVisual` with an explicit closed recipe and `registry`, `card`, or `detail` presentation; every role renders the living identity when motion and WebGL are available. The poster is first paint and fallback. Never infer or randomize identity from a free-form role. Compose it through `AgentCard` when the Agent is a recognizable content object. There is no `AgentGlyph` or `AgentRow`.
|
|
53
|
-
- `Card` defaults to the resting material. Select `surface="raised"` for physically raised/selected work and `surface="plain"` for an intentional structural/auth/website escape. Do not add border, ring, or shadow classes at call sites.
|
|
54
|
-
- Use `Empty scope="page|region|card"` so only the owning container draws a frame. Use `GlassControl shape="control"` for compact floating controls and `shape="bar"` for full-width header chrome, never content or modal bodies.
|
|
55
|
-
- Use first-party shadcn registry source in the consuming app for generic data tables, command palettes, and chart cards; do not import a NadicodeAI package abstraction for those patterns.
|
|
56
|
-
- Keep routes, data, auth, server actions, persistence, permission decisions, runtime adapters, analytics, and product-specific copy in the consuming app.
|
|
57
|
-
- Fixtures must be synthetic or redacted and cover provider, model, plugin, approval, diff, terminal, installer recovery, queued, streaming, and interrupted states. Do not use generic SaaS/card-grid filler, secrets, environment values, raw terminal output, hidden reasoning, user memory, fake customers, or fake proof metrics.
|
|
58
|
-
|
|
59
|
-
## Forms
|
|
60
|
-
|
|
61
|
-
- Use `Input`, `Textarea`, `Select`, `Checkbox`, and similar files for controls.
|
|
62
|
-
- Use `FieldGroup`, `Field`, `FieldLabel`, `FieldDescription`, and `FieldError` for field layout and label/error structure.
|
|
63
|
-
- Use `Form`, `FormField`, `FormItem`, `FormControl`, `FormLabel`, `FormDescription`, and `FormMessage` only when integrating React Hook Form.
|
|
64
|
-
- Do not create or import a separate `FormInput`/`FormTextarea` control family. Extend the canonical control or field primitive when the package needs a new size or behavior.
|
|
65
|
-
|
|
66
|
-
## Rules
|
|
67
|
-
|
|
68
|
-
- Read the Styling Invariants in `docs/contract.md` before changing or reviewing component styling. That contract is the sole authority for canonical token and role use, component mode behavior, and prohibited styling.
|
|
69
|
-
- Use `ThemeModeSwitcher` only as a controlled, app-agnostic control; do not import `next-themes` or app persistence into the UI package.
|
|
70
|
-
- Compose app pages/screens from existing package components; extract new shared UI only after a second concrete consumer, a plan-approved shared component, or a named validation slice proves the package boundary.
|
|
71
|
-
- For source maintenance, run shadcn commands with `--dry-run` before writing and do not use `--overwrite` without explicit maintainer approval.
|
|
72
|
-
|
|
73
|
-
## Verification
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
npm run build -w @nadicodeai/ui
|
|
77
|
-
npm run test -w @nadicodeai/ui
|
|
78
|
-
```
|