@nadicodeai/ui 0.10.2 → 0.12.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 (100) hide show
  1. package/AGENTS.md +23 -135
  2. package/README.md +39 -110
  3. package/dist/components/action-band.d.ts +5 -3
  4. package/dist/components/action-band.d.ts.map +1 -1
  5. package/dist/components/action-band.js +35 -21
  6. package/dist/components/agent-chat.d.ts.map +1 -1
  7. package/dist/components/agent-chat.js +1 -1
  8. package/dist/components/agent-composer.d.ts.map +1 -1
  9. package/dist/components/agent-composer.js +1 -1
  10. package/dist/components/ai-elements/terminal.d.ts.map +1 -1
  11. package/dist/components/ai-elements/terminal.js +8 -8
  12. package/dist/components/artifact-panel.d.ts.map +1 -1
  13. package/dist/components/artifact-panel.js +5 -5
  14. package/dist/components/bento.d.ts +14 -3
  15. package/dist/components/bento.d.ts.map +1 -1
  16. package/dist/components/bento.js +26 -5
  17. package/dist/components/brand.d.ts.map +1 -1
  18. package/dist/components/brand.js +29 -3
  19. package/dist/components/contact.d.ts +22 -10
  20. package/dist/components/contact.d.ts.map +1 -1
  21. package/dist/components/contact.js +34 -12
  22. package/dist/components/diff-count.js +1 -1
  23. package/dist/components/faq-item.js +2 -2
  24. package/dist/components/faq.d.ts +4 -1
  25. package/dist/components/faq.d.ts.map +1 -1
  26. package/dist/components/faq.js +5 -2
  27. package/dist/components/feature-grid.d.ts +23 -0
  28. package/dist/components/feature-grid.d.ts.map +1 -0
  29. package/dist/components/feature-grid.js +33 -0
  30. package/dist/components/feature-rows.d.ts +23 -0
  31. package/dist/components/feature-rows.d.ts.map +1 -0
  32. package/dist/components/feature-rows.js +27 -0
  33. package/dist/components/footer.d.ts +18 -12
  34. package/dist/components/footer.d.ts.map +1 -1
  35. package/dist/components/footer.js +32 -20
  36. package/dist/components/hero.d.ts +28 -0
  37. package/dist/components/hero.d.ts.map +1 -0
  38. package/dist/components/hero.js +45 -0
  39. package/dist/components/integration-flow.d.ts +36 -0
  40. package/dist/components/integration-flow.d.ts.map +1 -0
  41. package/dist/components/integration-flow.js +36 -0
  42. package/dist/components/live-demo.d.ts +31 -0
  43. package/dist/components/live-demo.d.ts.map +1 -0
  44. package/dist/components/live-demo.js +30 -0
  45. package/dist/components/logo-band.d.ts +12 -2
  46. package/dist/components/logo-band.d.ts.map +1 -1
  47. package/dist/components/logo-band.js +16 -1
  48. package/dist/components/logo-tile.d.ts.map +1 -1
  49. package/dist/components/logo-tile.js +5 -2
  50. package/dist/components/nav-bar.d.ts +14 -8
  51. package/dist/components/nav-bar.d.ts.map +1 -1
  52. package/dist/components/nav-bar.js +19 -13
  53. package/dist/components/pricing-card.d.ts +10 -15
  54. package/dist/components/pricing-card.d.ts.map +1 -1
  55. package/dist/components/pricing-card.js +18 -29
  56. package/dist/components/pricing.d.ts +11 -14
  57. package/dist/components/pricing.d.ts.map +1 -1
  58. package/dist/components/pricing.js +5 -15
  59. package/dist/components/quote-card.d.ts +10 -2
  60. package/dist/components/quote-card.d.ts.map +1 -1
  61. package/dist/components/quote-card.js +15 -3
  62. package/dist/components/security-grid.d.ts +25 -0
  63. package/dist/components/security-grid.d.ts.map +1 -0
  64. package/dist/components/security-grid.js +31 -0
  65. package/dist/components/sidebar.js +5 -5
  66. package/dist/components/stat-block.d.ts +9 -5
  67. package/dist/components/stat-block.d.ts.map +1 -1
  68. package/dist/components/stat-block.js +12 -6
  69. package/dist/components/statement.d.ts +32 -0
  70. package/dist/components/statement.d.ts.map +1 -0
  71. package/dist/components/statement.js +40 -0
  72. package/dist/components/stats-band.d.ts +6 -2
  73. package/dist/components/stats-band.d.ts.map +1 -1
  74. package/dist/components/stats-band.js +10 -3
  75. package/dist/components/status-dot.js +4 -4
  76. package/dist/components/steps.d.ts +34 -0
  77. package/dist/components/steps.d.ts.map +1 -0
  78. package/dist/components/steps.js +40 -0
  79. package/dist/components/team-grid.d.ts +27 -0
  80. package/dist/components/team-grid.d.ts.map +1 -0
  81. package/dist/components/team-grid.js +30 -0
  82. package/dist/components/testimonials.d.ts +39 -12
  83. package/dist/components/testimonials.d.ts.map +1 -1
  84. package/dist/components/testimonials.js +46 -13
  85. package/dist/components/texture-strip.d.ts +22 -0
  86. package/dist/components/texture-strip.d.ts.map +1 -0
  87. package/dist/components/texture-strip.js +29 -0
  88. package/dist/index.d.ts +10 -0
  89. package/dist/index.d.ts.map +1 -1
  90. package/dist/index.js +10 -0
  91. package/dist/styles/globals.css +185 -300
  92. package/docs/agent-work-surfaces.md +6 -5
  93. package/docs/agents/nadicodeai-ui.md +42 -273
  94. package/docs/consuming-cross-repo.md +26 -33
  95. package/docs/contract.md +43 -0
  96. package/docs/migration/nadia-consumer-readiness.md +5 -10
  97. package/docs/terminal-tui-semantics.md +142 -181
  98. package/llms.txt +49 -84
  99. package/package.json +3 -4
  100. package/skills/nadicodeai-ui/SKILL.md +6 -34
package/AGENTS.md CHANGED
@@ -1,143 +1,31 @@
1
1
  # @nadicodeai/ui - Agent Rules
2
2
 
3
- The `@nadicodeai/ui` npm workspace: the shared NadicodeAI React UI package on brand tokens (Tailwind v4, semantic light/dark roles), per ADR 0007. It ships shadcn primitives backed by Base UI, AI Elements, React adapters over the design-system grammar, reusable marketing/section compositions, and plan-approved product components once their source/export/tests/docs exist. It is source-authored in `src/` and published from built `dist` JavaScript, declarations, and CSS. Read this file before working in the component library. For website page assembly, also read **`../../website/AGENTS.md`**; for portal screens, read **`../../portal/AGENTS.md`**.
4
-
5
- When this file is read from an installed package, use it as the consumer agent
6
- contract: import `@nadicodeai/ui/globals.css` and
7
- `@nadicodeai/design-system/css` once at the app root, import components from
8
- `@nadicodeai/ui/components/*` or `@nadicodeai/ui/ai-elements`, and keep all
9
- new UI token-only. Dark mode is a `.dark` selector remap: the design-system
10
- theme owns standard shadcn roles, while `globals.css` owns UI-local product
11
- aliases. Components must not add `dark:` utilities, OS dark-mode branching, or
12
- raw palette values. The package also ships `llms.txt`,
13
- `docs/agents/nadicodeai-ui.md`, `docs/migration/`, and
14
- `skills/nadicodeai-ui/SKILL.md` for agents that index package documentation or
15
- skills.
16
-
17
- ## Invariants
18
-
19
- - **Token-only, no raw literals.** Components style through brand tokens only — the `nadicode.theme.css` role vars bridged into Tailwind utilities (`bg-background`, `text-foreground`, `border-input`, …) plus UI-local product aliases defined in `globals.css` such as `--nc-app-surface`, `--nc-chat-tool-surface`, and `--nc-terminal-bg`. No raw `#hex` / `rgb()` / `hsl()` in any `.tsx`; a new source value goes to `design-system/DESIGN.md` first and flows through generated tokens. Enforced by `tests/guards/no-raw-literal.test.ts` and `tests/guards/token-reference-integrity.test.ts`.
20
- - **Dark-ready roles, no component `dark:` styling.** The generated design-system Tailwind theme owns the standard shadcn `:root` and `.dark` role maps; `globals.css` owns the Tailwind `@theme inline` bridge and UI-local product aliases. Components consume semantic utilities or product aliases such as `var(--nc-app-surface)`; they must not ship `dark:` Tailwind utilities, OS dark-mode branching, or raw dark palette utilities such as `dark:bg-slate-950` / `dark:text-white`. Enforced by `tests/guards/no-dark.test.ts`, `tests/guards/dark-semantic-roles.test.ts`, and `tests/guards/token-reference-integrity.test.ts`.
21
- - **Components inherit the brand theme.** Consumers import `@nadicodeai/ui/globals.css` (Tailwind + the generated brand `@theme` + semantic role/alias maps) and `@nadicodeai/design-system/css` (kept `nc-*` geometry, type scale, chat CSS components, motion, and display components). Components carry no theme of their own — they resolve every color/radius from bridged brand tokens, UI-local aliases, and design-system CSS.
22
- - **Source-authored, built package.** Components are authored as shadcn-style source in this workspace, then emitted to `dist/` for consumption by other apps. Package exports must point at built JS/declarations/CSS, not raw `src/*.tsx`, and `npm pack --dry-run` must include only intentional consumer artifacts.
23
- - **Public surface changes require a release decision.** Any change to exported components, `src/index.ts`, `src/ai-elements.ts`, package `exports`, `globals.css`, UI-local semantic aliases, theme behavior, package docs, package skills, or design-system token/CSS/theme output consumed by this package must end with an explicit npm release decision before handoff. If the change should reach external consumers, bump the relevant package version(s), run `npm pack --dry-run -w @nadicodeai/ui`, and follow `../../docs/agents/npm-publishing.md`. If it cannot affect npm consumers, include the literal `[no-publish]` marker in a commit message and explain why in that commit body; the pre-push gate requires one of these two decisions. When the UI change depends on modified `@nadicodeai/design-system` output, bump/publish `@nadicodeai/design-system` first, then update `@nadicodeai/ui`'s dependency and publish UI. Never claim a UI package change is shipped to npm until `npm view @nadicodeai/ui version` reports the intended published version.
24
- - **shadcn and AI Elements are package surface.** The installed shadcn source components under `src/components/` and all 48 Vercel AI Elements under `src/components/ai-elements/` are intentional ready-to-use exports. Keep `src/index.ts`, `src/ai-elements.ts`, package `exports`, README/agent docs, and `website/app/ui-check/elements` synchronized whenever this surface changes.
25
- - **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 should 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.
26
- - **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.
27
- - **Package surface is source-backed.** `src/components/` is intentionally flat shadcn-style source. Do not document folders or package namespaces that do not exist. Do not add top-level exports for recipes, blocks, agent, or terminal groupings unless a later package API decision adds concrete source, built files, docs, and tests in the same change.
28
- - **Auth routes are consumer-owned shadcn block work.** Login, signup, OTP, two-factor, magic-link, and provider-button flows start from the selected shadcn block/example in the consuming app, with app-owned Better Auth behavior. Do not ship generic auth, signup, OTP, federated-login, or provider abstractions from this package unless a later explicit boundary decision replaces the selected shadcn block.
29
- - **Standard components, not app-owned product features.** This package ships primitives, standard UI components, AI Elements, brand adapters, React adapters, reusable sections, and presentational product components such as settings, shells, plugin boundaries, installer states, agent chat, artifacts, files, diffs, and redacted terminal summaries. It must not ship app-specific feature/use-case screens or names such as operator-login, portal activation, customer credential control, customer management, or other product-domain use cases. Generic data tables, command palettes, and chart cards are app-owned shadcn registry adaptations, not NadicodeAI package abstractions. Those screens live in the consuming app and are built from `@nadicodeai/ui` components and first-party shadcn blocks/examples. The console chart kit (`chart-kpi-stat`, `chart-sparkline`, `chart-time-series`, `chart-bullet-bar`, `chart-breakdown-table`, `chart-delta`, `chart-entity-colors`, `chart-date-range`, `chart-date-range-control`) is plan-approved package surface per issue #166 and ADR 0010; chart *cards* — the app screens that arrange these widgets — remain app-owned. Every data-shaped chart names a data alternative (a visually hidden `<table>` twin for the time-series charts, a real `<table>` for `chart-breakdown-table`, an sr-only value list for a standalone `chart-sparkline`); `chart-bullet-bar` (data in `aria-valuetext` plus the visible value) and `chart-kpi-stat` (data in visible text) carry no separate table twin by design.
30
- - **Design-system geometry remains the foundation.** React components compose the kept `nc-*` page grammar and display CSS components; they do not redefine frame math, marker placement, token values, or raw CSS geometry. Use parent-paints-plus-gap for bordered cell grids and keep every visible seam single-owner.
31
- - **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 should pass data and media children into existing compositions instead of rebuilding layout locally.
32
- - **Brand renderers live here for React consumers.** `BrandMark` is the logo mark, and `BrandWordmark` is the text-only wordmark. A full lockup is exactly one `BrandMark` followed by one `BrandWordmark`; compact mark-only usage uses `BrandMark` alone. These adapters are the only place React code imports the raw `@nadicodeai/design-system/assets/*` logo SVG exports. Website, portal, and sibling routes use these adapters instead of importing logo assets directly, drawing brand SVG inline, masking/recoloring assets, or embedding the mark inside the wordmark.
33
- - **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.
34
- - **Tier-1 accessibility is tested, browser-free.** Every `src/components/**/*.test.tsx` renders its component through `tests/support/a11y.tsx` `expectAccessible(ui, ruleOverrides?)` — a `@testing-library/react` mount checked with raw `axe-core`, the helper owning the full mount/unmount lifecycle — and `tests/guards/a11y-axe-coverage.test.ts` fails the suite if any component test file omits the call (a justified ignore list covers non-rendering tests only). Component test files opt into jsdom per file with a `/** @vitest-environment jsdom */` pragma; the workspace default stays `environment: "node"`, and jsdom is not a browser session, so the browser-free gate rule holds unchanged. This tier is structural only: `color-contrast` and `region` are globally disabled because jsdom computes neither rendered color nor landmark context, and it exercises no runtime focus or keyboard behavior. Rendered contrast, landmark/region context, and focus/keyboard interaction are tier 2 (real-browser axe via Playwright) and are explicitly out of this suite. The library ESLint config (`createLibraryEslintConfig`) additionally enforces seven `eslint-plugin-jsx-a11y` rules at `error` (alt-text, aria-props, aria-proptypes, aria-unsupported-elements, role-has-required-aria-props, role-supports-aria-props, no-noninteractive-element-interactions) as a static complement to the render tier.
35
-
36
- ## Component Admission
37
-
38
- Agent work surfaces — chat, composer, tool approval, artifacts, threads,
39
- diffs, terminal/file preview, and the underlying agent state models — are
40
- NadicodeAI core domain. They belong in this package outright, not behind a
41
- named consumer. Any other new product composition (a shell, a settings
42
- surface, a generic section) is admitted only with a named consuming surface
43
- landing in the same change. Genuinely app-bespoke UI — window chrome,
44
- boot/install overlays, mascots, PTY/xterm embeds — stays in the consuming
45
- app; it never becomes a package abstraction. A component left unconsumed
46
- after its target migration ships gets removed.
47
-
48
- ## Reusable Section Vocabulary
49
-
50
- The soft-launch homepage relies on this reusable vocabulary, and future reusable
51
- marketing/product sections should extend the same model:
52
-
53
- - `PageFrame` / `PageRow` wrappers for the kept page system.
54
- - `SectionIntro` for section headers.
55
- - `Bento` compound components for bordered marketing grids.
56
- - `MediaMount` for image, video, poster, and artifact mounts.
57
- - `DemoSurface` for chat, artifact, approval, tool-trace, image, and video demos.
58
- - `ShiftBand`, `UseCaseBento`, `WatchItWorkBand`, `BenefitsBento`, and
59
- `ProofSlot` for homepage-level compositions.
60
- - Existing reusable sections/compositions such as `HeroSplit`, `ActionBand`, `Faq`, `Footer`, `NavBar`,
61
- `LogoBand`, `Testimonials`, and `StatsBand` when their proof/content is real.
62
-
63
- When a page needs a variation, extend these source components with a small,
64
- typed prop or slot. Do not fork the same layout in `website/`.
65
-
66
- ## shadcn / AI Elements Discovery
67
-
68
- Use live shadcn MCP or CLI discovery while maintaining this package. MCP/CLI is
69
- for browsing, searching, viewing docs, previewing diffs, and installing current
70
- registry source during implementation. `@nadicodeai/ui` does not maintain a
71
- committed upstream registry inventory, registry snapshot, or inventory update
72
- script.
73
-
74
- From `@nadicodeai/ui`, initialize Codex MCP only when the local runtime supports
75
- it:
76
-
77
- ```bash
78
- npx shadcn@latest mcp init --client codex
79
- ```
80
-
81
- CLI fallbacks:
82
-
83
- ```bash
84
- npx shadcn@latest info --json
85
- npx shadcn@latest search @shadcn -q "select" --json
86
- npx shadcn@latest search @ai-elements -q "message" --json
87
- npx shadcn@latest docs button select dialog --json
88
- npx shadcn@latest view @shadcn/button
89
- npx shadcn@latest add @shadcn/button --dry-run
90
- npx shadcn@latest add @ai-elements/message --dry-run
91
- ```
92
-
93
- Use `info --json` for project-aware aliases, Tailwind version, base primitive
94
- library, icon library, resolved source paths, and configured registries. Use
95
- `search`, `docs`, and `view` before adding source; use `add --dry-run` or
96
- `add --diff` before changing files. Do not use `--overwrite` unless the
97
- maintainer explicitly asks for an upstream refresh and the diff is reviewed.
98
-
99
- ## Product Components And Consumer Readiness
100
-
101
- Use public component subpaths for product UI:
102
-
103
- - `@nadicodeai/ui/components/agent-chat`
104
- - `@nadicodeai/ui/components/agent-composer`
105
- - `@nadicodeai/ui/components/agent-message`
106
- - `@nadicodeai/ui/components/agent-thread`
107
- - `@nadicodeai/ui/components/agent-tool-approval`
108
- - `@nadicodeai/ui/components/artifact-panel`
109
- - `@nadicodeai/ui/components/automation-section`
110
- - `@nadicodeai/ui/components/chart-breakdown-table`
111
- - `@nadicodeai/ui/components/chart-bullet-bar`
112
- - `@nadicodeai/ui/components/chart-date-range`
113
- - `@nadicodeai/ui/components/chart-date-range-control`
114
- - `@nadicodeai/ui/components/chart-delta`
115
- - `@nadicodeai/ui/components/chart-entity-colors`
116
- - `@nadicodeai/ui/components/chart-kpi-stat`
117
- - `@nadicodeai/ui/components/chart-sparkline`
118
- - `@nadicodeai/ui/components/chart-time-series`
119
- - `@nadicodeai/ui/components/confirm-dialog`
120
- - `@nadicodeai/ui/components/dashboard-shell`
121
- - `@nadicodeai/ui/components/desktop-shell`
122
- - `@nadicodeai/ui/components/feedback-state`
123
- - `@nadicodeai/ui/components/files-preview`
124
- - `@nadicodeai/ui/components/installer-shell`
125
- - `@nadicodeai/ui/components/plugin-slot-boundary`
126
- - `@nadicodeai/ui/components/settings-section`
127
-
128
- Consumers own routing, auth, app data, server actions, runtime adapters,
129
- permission decisions, analytics, and app-specific copy. The package owns the
130
- presentational structure and state vocabulary only. Follow
131
- `docs/migration/nadia-consumer-readiness.md`: validate a web/admin or portal
132
- slice first, installer second, desktop shell third, desktop chat last, and TUI
133
- through `docs/terminal-tui-semantics.md`.
3
+ The `@nadicodeai/ui` npm workspace: the shared NadicodeAI React UI package on brand tokens (Tailwind v4, semantic light/dark roles). It ships shadcn primitives backed by Base UI, AI Elements, React adapters over the design-system grammar, reusable marketing/section compositions, and plan-approved product components. Source-authored in `src/`, published from built `dist/`. The package's normative rules (styling and shape invariants, admission, accessibility tier, section vocabulary, consumer boundary) live in `docs/contract.md`; read it before changing the component library.
134
4
 
135
5
  ## Commands
136
6
 
137
7
  | Command | When |
138
8
  | --- | --- |
139
9
  | `npm run dev -w @nadicodeai/ui` | Watch `src/` and incrementally refresh `dist/` for local website or app iteration |
140
- | `npm run build:fast -w @nadicodeai/ui` | One-shot incremental `dist/` refresh for local development after the full package has already been built |
141
- | `npm run build -w @nadicodeai/ui` | Emit the consumable `dist/` package surface before packing or app builds |
142
- | `npm pack --dry-run -w @nadicodeai/ui` | Verify exactly what external npm consumers would receive after package surface, export, CSS, docs, or skill changes |
143
- | `npm run test -w @nadicodeai/ui` | Run this workspace's guards plus the per-file jsdom + axe-core tier-1 accessibility checks (browser-free; also runs inside the root `npm run test` gate) |
10
+ | `npm run build:fast -w @nadicodeai/ui` | One-shot incremental `dist/` refresh after a prior full build |
11
+ | `npm run build -w @nadicodeai/ui` | Emit the consumable `dist/` surface before packing or app builds |
12
+ | `npm pack --dry-run -w @nadicodeai/ui` | Verify exactly what npm consumers receive after surface, export, CSS, docs, or skill changes |
13
+ | `npm run lint -w @nadicodeai/ui` / `npm run typecheck -w @nadicodeai/ui` | ESLint / `tsc --noEmit` |
14
+ | `npm run test -w @nadicodeai/ui` | Workspace guards plus the jsdom + axe-core tier-1 accessibility checks (browser-free; also inside the root gate) |
15
+
16
+ ## Routing
17
+
18
+ | Task | Go to |
19
+ | --- | --- |
20
+ | Shared design-language terms | `../../design-system/CONTEXT.md` |
21
+ | Package invariants, component admission, section vocabulary, consumer boundary | `docs/contract.md` |
22
+ | React consumer installation and stylesheet setup | `docs/consuming-cross-repo.md` |
23
+ | Token, mode, theme, cascade, and public stylesheet architecture | `../../design-system/DESIGN.md` (this package does not own a second token map) |
24
+ | Which component subpaths exist | `package.json` `exports` (the `./components/*` wildcard over `src/components/` source is the whole surface; never maintain a hand-copied list) |
25
+ | shadcn / AI Elements discovery | Live shadcn MCP or CLI (`npx shadcn@latest info\|search\|docs\|view\|add --dry-run`, see `../../skills/shadcn/SKILL.md`); no committed registry inventory or snapshot exists, and `--overwrite` needs an explicit maintainer ask plus a reviewed diff |
26
+ | Releasing / publishing | `../../docs/internal/npm-publishing.md` (release decision enforced by the pre-push gate; detail in `docs/contract.md`) |
27
+ | Tokens, geometry, and the CSS the package composes | `../../design-system/AGENTS.md` and `design-system/DESIGN.md` |
28
+ | Website page assembly | `../../website/AGENTS.md` |
29
+ | Portal screens | `../../portal/AGENTS.md` |
30
+ | Product-component consumption order and TUI semantics | `docs/migration/nadia-consumer-readiness.md`, `docs/terminal-tui-semantics.md` |
31
+ | 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 |
package/README.md CHANGED
@@ -8,21 +8,18 @@ entry stylesheet needed by consuming apps. It is intentionally coupled to
8
8
  `@nadicodeai/design-system`: the design-system package owns brand tokens,
9
9
  framework-agnostic geometry, fonts, assets, and CSS components; this package owns
10
10
  React components and reusable section compositions on those tokens. Shared
11
- product compositions from
12
- `../../docs/plans/2026-06-23-001-feat-nadia-product-ui-package-plan.md` now ship
13
- when their source, public subpath export, docs, and tests exist.
11
+ product compositions ship when their source, public subpath export, contract,
12
+ and tests exist together.
14
13
 
15
14
  The package ships:
16
15
 
17
16
  - shadcn source components under `@nadicodeai/ui/components/*`, backed by Base UI primitives where a headless primitive is needed
18
- - all 48 Vercel AI Elements under `@nadicodeai/ui/components/ai-elements/*`
17
+ - Vercel AI Elements under `@nadicodeai/ui/components/ai-elements/*`
19
18
  - an AI Elements barrel at `@nadicodeai/ui/ai-elements`
20
19
  - React adapters over the design-system grammar and assets
21
20
  - reusable marketing/section compositions
22
- - presentational product components such as `SettingsSection`,
23
- `DashboardShell`, `AgentChat`, `InstallerShell`, `PluginSlotBoundary`, and
24
- `ThemeModeSwitcher`
25
- - package-local agent guidance: `AGENTS.md`, `llms.txt`,
21
+ - presentational product components for shared application surfaces
22
+ - package-local agent guidance: `AGENTS.md`, `docs/contract.md`, `llms.txt`,
26
23
  `docs/agents/nadicodeai-ui.md`, `docs/migration/`, and
27
24
  `skills/nadicodeai-ui/SKILL.md`
28
25
 
@@ -32,50 +29,26 @@ Do not add top-level exports for recipes, blocks, agent, or terminal groupings
32
29
  until a concrete package API decision adds source, built files, docs, and tests
33
30
  together. Routes, persistence, auth behavior, server state, runtime adapters,
34
31
  and app-owned product features/use cases stay in consuming apps such as
35
- `website/`, `portal/`, and sibling Nadia apps. Product-specific names such as
36
- `operator-login`, portal activation, and customer credential control stay out of
37
- package components.
32
+ `website/`, `portal/`, and sibling Nadia apps. The package contract owns the
33
+ admission boundary; this README does not maintain a second rule set.
38
34
 
39
35
  ## Install
40
36
 
41
- Install both NadicodeAI packages and the required peers in the consuming app:
42
-
43
- ```bash
44
- npm install @nadicodeai/design-system @nadicodeai/ui react react-dom tailwindcss @tailwindcss/postcss
45
- ```
46
-
47
- The package is scoped for public npm registry publishing.
37
+ Follow [`docs/consuming-cross-repo.md`](docs/consuming-cross-repo.md). It owns the
38
+ install command, exact-version policy, peer requirements, dependency boundary,
39
+ and separate-asset exception. The package is scoped for public npm registry
40
+ publishing.
48
41
 
49
42
  ## CSS
50
43
 
51
- Import the UI Tailwind entry and the design-system CSS once at the app root:
52
-
53
- ```tsx
54
- import "@nadicodeai/ui/globals.css";
55
- import "@nadicodeai/design-system/css";
56
- ```
44
+ The package exposes one complete React stylesheet. Follow
45
+ [`docs/consuming-cross-repo.md`](docs/consuming-cross-repo.md) for the complete
46
+ consumer setup contract.
57
47
 
58
- `@nadicodeai/ui/globals.css` imports Tailwind v4, the generated NadicodeAI
59
- Tailwind theme, the shadcn role bridge, and the package-local semantic
60
- `:root`/`.dark` product aliases. The design-system theme owns the standard
61
- shadcn light and dark role maps; the UI package owns app shell/surface,
62
- chat/tool/composer, approval, diff/code, terminal/ANSI, trace/status,
63
- provider/model, and plugin permission aliases. Those aliases reference
64
- generated `--nc-*` tokens or semantic roles; they are not a new source-token
65
- group. `@nadicodeai/design-system/css` provides the kept
66
- `nc-*` page grammar, type scale, geometry, chat CSS components, motion, and
67
- brand display components that many UI components compose.
68
-
69
- Components should consume semantic utilities such as `bg-background`,
70
- `text-foreground`, and `border-border`, or product aliases such as
71
- `var(--nc-app-surface)` and `var(--nc-terminal-bg)` where a product role is
72
- needed. Do not add component-level Tailwind `dark:` utilities, OS dark-mode
73
- branching, raw color literals, or raw palette utilities.
74
-
75
- For Next.js App Router apps, place both imports in the root layout. The app still
76
- owns its PostCSS setup, theme provider, and persisted light/dark/system
77
- preference. `ThemeModeSwitcher` is controlled and app-agnostic; the app decides
78
- how to set `.dark` on the document. This package does not export a PostCSS config.
48
+ Component styling rules live in [`docs/contract.md`](docs/contract.md). That
49
+ contract owns token-only styling, canonical role use, and the ban on
50
+ component-local dark implementations. This README does not
51
+ restate those rules.
79
52
 
80
53
  ## Imports
81
54
 
@@ -103,64 +76,25 @@ import { DashboardShell } from "@nadicodeai/ui/components/dashboard-shell";
103
76
  import { AgentChat } from "@nadicodeai/ui/components/agent-chat";
104
77
  ```
105
78
 
79
+ ## Discover components
80
+
81
+ The component inventory is generated from source instead of maintained in
82
+ prose. In this repository, `src/components/**/*.tsx` owns the module set;
83
+ `src/index.ts` and `src/ai-elements.ts` own the barrels. `package.json` exposes
84
+ that source-backed surface through `./components/*`, and the build writes the
85
+ consumer view to `dist/components/**/*.d.ts`.
86
+
87
+ Use the source tree while maintaining this package. In an installed package,
88
+ use its `package.json` exports and generated declarations for current subpaths,
89
+ exports, and prop types.
90
+
106
91
  ## Product components
107
92
 
108
- Product components are presentational. The package owns shared layout,
109
- state-display, shell, plugin-boundary, installer, settings, chat, artifact,
110
- diff, and redacted terminal summary UI. Consuming apps own
111
- routes, app data, auth, server actions, persistence, permission decisions,
112
- runtime adapters, analytics, and product-specific copy.
113
-
114
- Generic product widgets that shadcn already ships as first-party registry
115
- source, such as data tables, command palettes, and chart cards, are app-owned
116
- shadcn block/example adaptations. Do not add a second package abstraction over
117
- those registry items. The console chart kit subpaths (`chart-*`) are the
118
- plan-approved exception (issue #166, ADR 0010): they mechanize the
119
- design-system dataviz grammar on the Recharts chart foundation, while chart
120
- cards — the app screens that arrange those widgets — stay app-owned. Every
121
- data-shaped chart names a data alternative (a visually hidden `<table>` twin for
122
- the time-series charts, a real `<table>` for `BreakdownTable`, an sr-only value
123
- list for a standalone `Sparkline`); `BulletBar` and `KpiStat` carry their data
124
- fully in `aria-valuetext`/visible text and so have no separate table twin by
125
- design.
126
-
127
- Current product subpaths:
128
-
129
- - `@nadicodeai/ui/components/agent-chat`
130
- - `@nadicodeai/ui/components/agent-composer`
131
- - `@nadicodeai/ui/components/agent-message`
132
- - `@nadicodeai/ui/components/agent-thread`
133
- - `@nadicodeai/ui/components/agent-tool-approval`
134
- - `@nadicodeai/ui/components/artifact-panel`
135
- - `@nadicodeai/ui/components/automation-section`
136
- - `@nadicodeai/ui/components/chart-breakdown-table`
137
- - `@nadicodeai/ui/components/chart-bullet-bar`
138
- - `@nadicodeai/ui/components/chart-date-range`
139
- - `@nadicodeai/ui/components/chart-date-range-control`
140
- - `@nadicodeai/ui/components/chart-delta`
141
- - `@nadicodeai/ui/components/chart-entity-colors`
142
- - `@nadicodeai/ui/components/chart-kpi-stat`
143
- - `@nadicodeai/ui/components/chart-sparkline`
144
- - `@nadicodeai/ui/components/chart-time-series`
145
- - `@nadicodeai/ui/components/confirm-dialog`
146
- - `@nadicodeai/ui/components/dashboard-shell`
147
- - `@nadicodeai/ui/components/desktop-shell`
148
- - `@nadicodeai/ui/components/feedback-state`
149
- - `@nadicodeai/ui/components/files-preview`
150
- - `@nadicodeai/ui/components/installer-shell`
151
- - `@nadicodeai/ui/components/plugin-slot-boundary`
152
- - `@nadicodeai/ui/components/settings-section`
153
- - `@nadicodeai/ui/components/theme-mode-switcher`
154
-
155
- `StateNotice` (`@nadicodeai/ui/components/state-notice`) is the supported
156
- low-level state-banner primitive behind `AgentMessageStateNotice` and
157
- `AgentThreadStateBanner`. It owns the shared icon, required `title`, optional
158
- description, and actions skeleton with `role="status"`/`role="alert"` semantics.
159
-
160
- Recommended migration order is documented in
161
- `docs/migration/nadia-consumer-readiness.md`: web admin or portal first,
162
- installer second, desktop shell third, desktop chat last, and terminal/TUI
163
- consumers through `docs/terminal-tui-semantics.md`.
93
+ [`docs/contract.md`](docs/contract.md) owns the package/consumer boundary,
94
+ admission rules, and accessibility invariants. Current modules are discovered
95
+ from source and package exports, not from prose. Agent work-surface behavior,
96
+ terminal semantics, and migration readiness each live in the linked package
97
+ docs; this README does not summarize them.
164
98
 
165
99
  ## Layout primitives
166
100
 
@@ -239,7 +173,8 @@ field primitive instead of creating a parallel form-control API.
239
173
 
240
174
  The npm package includes agent-facing files on purpose. Agents should read:
241
175
 
242
- - `AGENTS.md` for the package contract
176
+ - `AGENTS.md` for the package map and scoped rules
177
+ - `docs/contract.md` for the package contract
243
178
  - `llms.txt` for a concise import/setup index
244
179
  - `docs/agents/nadicodeai-ui.md` for detailed usage and maintenance guidance
245
180
  - `docs/migration/nadia-consumer-readiness.md` for consumer migration order
@@ -255,11 +190,5 @@ exports.
255
190
  npm run build -w @nadicodeai/ui
256
191
  ```
257
192
 
258
- The build emits:
259
-
260
- - `dist/**/*.js`
261
- - `dist/**/*.d.ts`
262
- - `dist/styles/globals.css`
263
-
264
- `dist`, this README, package docs, and the package agent-instruction files are
265
- packed.
193
+ `package.json` owns the build and packed-file surface. Use `npm pack --dry-run`
194
+ to inspect the consumer artifact rather than maintaining an output list here.
@@ -1,10 +1,12 @@
1
1
  import * as React from "react";
2
- type ActionBandProps = React.ComponentProps<"div"> & {
2
+ type ActionBandProps = React.ComponentProps<"section"> & {
3
+ /** Retained for consumer compatibility; the V5 band has a single fixed layout. */
3
4
  active?: "inset" | "full";
4
5
  };
5
- declare function ActionBand({ active, className, children, style, ...props }: ActionBandProps): React.JSX.Element;
6
+ declare function ActionBand({ active, className, children, ...props }: ActionBandProps): React.JSX.Element;
6
7
  declare function ActionBandContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
7
8
  declare function ActionBandCopy({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
9
+ declare function ActionBandHeading({ className, ...props }: React.ComponentProps<"h2">): React.JSX.Element;
8
10
  declare function ActionBandVisual({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
9
- export { ActionBand, ActionBandContent, ActionBandCopy, ActionBandVisual };
11
+ export { ActionBand, ActionBandContent, ActionBandCopy, ActionBandHeading, ActionBandVisual };
10
12
  //# sourceMappingURL=action-band.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"action-band.d.ts","sourceRoot":"","sources":["../../src/components/action-band.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmC/B,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACnD,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC3B,CAAC;AAEF,iBAAS,UAAU,CAAC,EAAE,MAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,qBAsB9F;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ9E;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW3E;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW7E;AAED,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"action-band.d.ts","sourceRoot":"","sources":["../../src/components/action-band.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA8C/B,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,GAAG;IACvD,kFAAkF;IAClF,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC3B,CAAC;AAEF,iBAAS,UAAU,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,qBA0B7E;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW9E;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAE3E;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAW7E;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ7E;AAED,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1,34 +1,48 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/utils.js";
3
- import { SeamGrid } from "./seam-grid.js";
4
3
  /**
5
- * action-band — full-lane conversion stage for a final CTA or page-level ask.
4
+ * action-band — the full-bleed on-verde conversion band (V5 · B19).
6
5
  *
7
- * Replaces the retired recipe-specific `action-stage` CSS with the kept stage
8
- * grammar: `nc-stage-frame`, `nc-stage-fill`, `nc-stage-grid`,
9
- * `nc-stage-active`, and connector strips. The component owns the conversion
10
- * band structure, while the page supplies copy, controls, and media. The outer
11
- * stage spans the full lane; the active band is a bounded 12-column cell grid
12
- * with a single internal seam owner (`bg-border` + `gap-px`). The page/frame/rail
13
- * geometry owns the perimeter. Token-only; no
14
- * raw color values and no `dark:` styling.
6
+ * A solid brand-verde field (`bg-primary`) carrying one statement and one action,
7
+ * per the founder rule "one statement, one button". The band bleeds full width; a
8
+ * centred rail (`max-w-[1200px]`, left/right hairlines) holds the content, and a
9
+ * crosshair marks the STRUCTURAL intersection of the rail's top edge and left edge
10
+ * it is never decorative. A fractal-noise overlay adds grain TEXTURE only (an
11
+ * inline feTurbulence data-URI, carrying no colour value), layered under the copy.
12
+ *
13
+ * Every mark on the verde field — text, heading, crosshair, and rail hairlines
14
+ * is the ink primary-foreground role, NOT `text-foreground`. `foreground` flips to
15
+ * near-white under a dark ancestor while `bg-primary` stays a bright verde field, so
16
+ * ink text would turn near-white-on-verde (≈1.7:1). `primary-foreground` is ink in
17
+ * both modes and the build gate guarantees it clears on the primary field. Token-only;
18
+ * no raw colour values, no gradients, and no `dark:` styling.
19
+ *
20
+ * COMPAT: the `active` prop and the `ActionBand{Content,Copy,Visual}` parts are kept
21
+ * so existing consumers still compile; their roles are re-cut for the V5 band
22
+ * (Content = padded stack, Copy = rich-content wrapper, Visual = the trailing
23
+ * action/media slot). `ActionBandHeading` owns the simple V5 statement treatment.
24
+ * The prior two-cell ink stage is retired.
15
25
  */
16
- function ActionBandConnector({ edge }) {
17
- return (_jsx("div", { className: "nc-stage-grid nc-connector-strip", "data-edge": edge, "aria-hidden": "true", children: _jsxs("div", { className: "nc-stage-active nc-connector-track", children: [_jsx("div", { children: _jsx("svg", { width: "1", height: "100%", focusable: "false", children: _jsx("line", { x1: "0.5", y1: "0", x2: "0.5", y2: "100%" }) }) }), _jsx("svg", { width: "1", height: "100%", focusable: "false", children: _jsx("line", { x1: "0.5", y1: "0", x2: "0.5", y2: "100%" }) })] }) }));
26
+ // Grain texture only — feTurbulence fractal noise, no colour literal (`#` encoded
27
+ // as `%23`), so the no-raw-literal guard sees no hex/rgb/color-function.
28
+ const GRAIN_TEXTURE = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E\")";
29
+ function ActionBandCrosshair() {
30
+ return (_jsxs("span", { "data-slot": "action-band-crosshair", "aria-hidden": "true", className: "pointer-events-none absolute left-0 top-0 z-20 size-4 -translate-x-1/2 -translate-y-1/2", children: [_jsx("span", { className: "absolute left-1/2 top-0 h-full w-px -translate-x-1/2 bg-primary-foreground" }), _jsx("span", { className: "absolute left-0 top-1/2 h-px w-full -translate-y-1/2 bg-primary-foreground" })] }));
18
31
  }
19
- function ActionBand({ active = "inset", className, children, style, ...props }) {
20
- return (_jsxs("div", { "data-slot": "action-band", "data-frame-lines": "true", className: cn("nc-stage-frame relative", className), style: {
21
- ...(active === "full" ? { "--nc-stage-active-column": "1 / -1" } : {}),
22
- ...style,
23
- }, ...props, children: [_jsx("div", { className: "nc-stage-fill", "aria-hidden": "true" }), _jsx(ActionBandConnector, { edge: "start" }), _jsx("div", { className: "nc-stage-grid", children: _jsx("div", { className: "nc-stage-active", children: children }) }), _jsx(ActionBandConnector, { edge: "end" })] }));
32
+ function ActionBand({ active, className, children, ...props }) {
33
+ void active;
34
+ return (_jsxs("section", { "data-slot": "action-band", className: cn("relative isolate overflow-hidden bg-primary text-primary-foreground", className), ...props, children: [_jsx("span", { "aria-hidden": "true", className: "pointer-events-none absolute inset-0 z-0 opacity-20", style: { backgroundImage: GRAIN_TEXTURE } }), _jsxs("div", { "data-slot": "action-band-rail", className: "relative z-10 mx-auto w-full max-w-[1200px] border-x border-primary-foreground/15", children: [_jsx(ActionBandCrosshair, {}), children] })] }));
24
35
  }
25
36
  function ActionBandContent({ className, ...props }) {
26
- return (_jsx(SeamGrid, { "data-slot": "action-band-content", className: cn("min-w-0 lg:h-[var(--nc-h-action-band)] lg:grid-cols-12", className), ...props }));
37
+ return (_jsx("div", { "data-slot": "action-band-content", className: cn("flex flex-col items-start gap-6 px-[clamp(24px,5vw,64px)] py-[clamp(64px,10vw,144px)]", className), ...props }));
27
38
  }
28
39
  function ActionBandCopy({ className, ...props }) {
29
- return (_jsx("div", { "data-slot": "action-band-copy", className: cn("nc-panel-cell relative overflow-hidden !bg-[var(--nc-ink)] !text-[var(--nc-canvas)] lg:col-span-6", className), ...props }));
40
+ return _jsx("div", { "data-slot": "action-band-copy", className: cn("min-w-0", className), ...props });
41
+ }
42
+ function ActionBandHeading({ className, ...props }) {
43
+ return (_jsx("h2", { "data-slot": "action-band-heading", className: cn("nc-type-display-md max-w-[24ch] text-balance text-primary-foreground", className), ...props }));
30
44
  }
31
45
  function ActionBandVisual({ className, ...props }) {
32
- return (_jsx("div", { "data-slot": "action-band-visual", className: cn("nc-panel-cell items-stretch !p-0 ![align-content:stretch] ![grid-template-rows:minmax(0,1fr)] lg:col-span-6", className), ...props }));
46
+ return (_jsx("div", { "data-slot": "action-band-visual", className: cn("flex flex-wrap items-center gap-3", className), ...props }));
33
47
  }
34
- export { ActionBand, ActionBandContent, ActionBandCopy, ActionBandVisual };
48
+ export { ActionBand, ActionBandContent, ActionBandCopy, ActionBandHeading, ActionBandVisual };
@@ -1 +1 @@
1
- {"version":3,"file":"agent-chat.d.ts","sourceRoot":"","sources":["../../src/components/agent-chat.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACrF,OAAO,EAAe,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gCAAgC,EACrC,KAAK,cAAc,EACpB,MAAM,4BAA4B,CAAC;AAGpC,iBAAS,SAAS,CAAC,EACjB,QAAQ,EACR,KAAc,EACd,SAAS,EACT,UAAU,EACV,QAAQ,EACR,aAAa,EACb,WAAW,EACX,WAAW,EACX,oBAAoB,EACpB,WAAW,EACX,MAAM,EACN,SAAS,EACT,eAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,GAAG;IACnC,QAAQ,EAAE,iBAAiB,EAAE,CA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AAiB,EAAE,CAAC;IAC9B,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC;IACnF,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC9C,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,oBAAoB,CAAC,EAAE,gCAAgC,CAAC;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,qBA6BA;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -4,7 +4,7 @@ import { AgentComposer } from "./agent-composer.js";
4
4
  import { AgentThread } from "./agent-thread.js";
5
5
  import { cn } from "../lib/utils.js";
6
6
  function AgentChat({ messages, state = "idle", stateCopy, emptyState, composer, composerProps, toolActions, retryAction, onToolApprovalChoice, maxMessages, header, className, threadClassName, ...props }) {
7
- return (_jsxs("section", { "data-slot": "agent-chat", "data-agent-state": state, className: cn("flex min-h-0 flex-col gap-4 rounded-lg border bg-[var(--nc-app-surface-panel)] p-3", className), ...props, children: [header && _jsx("div", { "data-slot": "agent-chat-header", children: header }), _jsx(AgentThread, { messages: messages, state: state, stateCopy: stateCopy, emptyState: emptyState, toolActions: toolActions, retryAction: retryAction, onToolApprovalChoice: onToolApprovalChoice, maxMessages: maxMessages, className: cn("flex-1", threadClassName) }), composer ??
7
+ return (_jsxs("section", { "data-slot": "agent-chat", "data-agent-state": state, className: cn("flex min-h-0 flex-col gap-4 rounded-lg border bg-card p-3", className), ...props, children: [header && _jsx("div", { "data-slot": "agent-chat-header", children: header }), _jsx(AgentThread, { messages: messages, state: state, stateCopy: stateCopy, emptyState: emptyState, toolActions: toolActions, retryAction: retryAction, onToolApprovalChoice: onToolApprovalChoice, maxMessages: maxMessages, className: cn("flex-1", threadClassName) }), composer ??
8
8
  (composerProps ? (_jsx(AgentComposer, { ...composerProps, state: state === "streaming" ? "streaming" : composerProps.state })) : null)] }));
9
9
  }
10
10
  export { AgentChat };
@@ -1 +1 @@
1
- {"version":3,"file":"agent-composer.d.ts","sourceRoot":"","sources":["../../src/components/agent-composer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EACL,WAAW,EAOZ,MAAM,uCAAuC,CAAC;AAa/C,OAAO,EAAyB,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAG7F,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAIvE,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,CAAC;AAE5F,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,aAAa,CAAC;AAE7F,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACrC,SAAS,CAAC,EAAE,kBAAkB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,m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CAAC,EAChC,WAAW,EACX,kBAAkB,GACnB,EAAE;IACD,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACrC,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,oBAAoB,KAAK,IAAI,CAAC;CACjE,4BA0BA;AAED,iBAAS,eAAe,CAAC,EACvB,KAAK,EACL,OAAO,EACP,SAAS,GACV,EAAE;IACD,KAAK,EAAE,eAAe,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,4BA8CA;AAED,iBAAS,aAAa,CAAC,EACrB,KAAK,EACL,YAAY,EACZ,WAA4C,EAC5C,WAAgB,EAChB,KAAK,EACL,KAAc,EACd,QAAgB,EAChB,SAAS,EACT,WAAW,EACX,KAAK,EACL,WAAsB,EACtB,SAAkB,EAClB,aAAa,EACb,QAAQ,EACR,MAAM,EACN,kBAAkB,EAClB,YAAY,EACZ,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,qBA0FpB;AAED,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"agent-composer.d.ts","sourceRoot":"","sources":["../../src/components/agent-composer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EACL,WAAW,EAOZ,MAAM,uCAAuC,CAAC;AAa/C,OAAO,EAAyB,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAG7F,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAIvE,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,WAAW,GAAG,OAAO,CAAC;AAE5F,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,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QueuePanel({ queue, actions, className, }) {
47
47
  function AgentComposer({ value, defaultValue, placeholder = "Ask Nadia to work on this...", attachments = [], queue, state = "idle", disabled = false, slashMenu, mentionMenu, tools, submitLabel = "Submit", stopLabel = "Stop", onValueChange, onSubmit, onStop, onRemoveAttachment, queueActions, footer, className, ...props }) {
48
48
  const isDisabled = disabled || state === "disabled" || state === "submitting";
49
49
  const isStreaming = state === "streaming";
50
- return (_jsxs("div", { "data-slot": "agent-composer-shell", "data-composer-state": state, "data-disabled": isDisabled ? true : undefined, className: "grid gap-3", children: [queue && _jsx(AgentQueuePanel, { queue: queue, actions: queueActions }), _jsxs(PromptInput, { "data-slot": "agent-composer", className: cn("rounded-lg border bg-[var(--nc-composer-surface)] text-[var(--nc-composer-foreground)]", className), onSubmit: (message, event) => onSubmit?.({
50
+ return (_jsxs("div", { "data-slot": "agent-composer-shell", "data-composer-state": state, "data-disabled": isDisabled ? true : undefined, className: "grid gap-3", children: [queue && _jsx(AgentQueuePanel, { queue: queue, actions: queueActions }), _jsxs(PromptInput, { "data-slot": "agent-composer", className: cn("rounded-lg border bg-popover text-popover-foreground", className), onSubmit: (message, event) => onSubmit?.({
51
51
  attachments,
52
52
  queue,
53
53
  value: message.text,
@@ -1 +1 @@
1
- {"version":3,"file":"terminal.d.ts","sourceRoot":"","sources":["../../../src/components/ai-elements/terminal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAK7C,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAgB5D,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEjE,eAAO,MAAM,cAAc,GAAI,mCAAmC,mBAAmB,gCAUpF,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEhE,eAAO,MAAM,aAAa,GAAI,mCAAmC,kBAAkB,gCAQlF,CAAC;AAEF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AAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,6EAQtB,aAAa,gCAkCf,CAAC"}
@@ -11,14 +11,14 @@ const TerminalContext = createContext({
11
11
  isStreaming: false,
12
12
  output: "",
13
13
  });
14
- export const TerminalHeader = ({ className, children, ...props }) => (_jsx("div", { className: cn("flex items-center justify-between border-primary-foreground/20 border-b px-4 py-2", className), ...props, children: children }));
15
- export const TerminalTitle = ({ className, children, ...props }) => (_jsxs("div", { className: cn("flex items-center gap-2 text-sm text-primary-foreground/70", className), ...props, children: [_jsx(TerminalIcon, { className: "size-4" }), children ?? "Terminal"] }));
14
+ export const TerminalHeader = ({ className, children, ...props }) => (_jsx("div", { className: cn("flex items-center justify-between border-[var(--nc-dark-line)] border-b px-4 py-2", className), ...props, children: children }));
15
+ export const TerminalTitle = ({ className, children, ...props }) => (_jsxs("div", { className: cn("flex items-center gap-2 text-sm text-[var(--nc-dark-muted)]", className), ...props, children: [_jsx(TerminalIcon, { className: "size-4" }), children ?? "Terminal"] }));
16
16
  export const TerminalStatus = ({ className, children, ...props }) => {
17
17
  const { isStreaming } = useContext(TerminalContext);
18
- if (!isStreaming) {
18
+ if (!isStreaming && children == null) {
19
19
  return null;
20
20
  }
21
- return (_jsx("div", { className: cn("flex items-center gap-2 text-xs text-primary-foreground/70", className), ...props, children: children }));
21
+ return (_jsx("div", { className: cn("flex items-center gap-2 text-xs text-[var(--nc-dark-muted)]", className), ...props, children: children }));
22
22
  };
23
23
  export const TerminalActions = ({ className, children, ...props }) => (_jsx("div", { className: cn("flex items-center gap-1", className), ...props, children: children }));
24
24
  export const TerminalCopyButton = ({ onCopy, onError, timeout = 2000, children, className, ...props }) => {
@@ -30,14 +30,14 @@ export const TerminalCopyButton = ({ onCopy, onError, timeout = 2000, children,
30
30
  timeout,
31
31
  });
32
32
  const Icon = isCopied ? CheckIcon : CopyIcon;
33
- return (_jsx(Button, { className: cn("size-7 shrink-0 text-primary-foreground/70 hover:bg-primary-foreground/10 hover:text-primary-foreground", className), onClick: copyToClipboard, size: "icon", variant: "ghost", ...props, children: children ?? _jsx(Icon, { size: 14 }) }));
33
+ return (_jsx(Button, { className: cn("size-7 shrink-0 text-[var(--nc-dark-muted)] hover:bg-[var(--nc-dark-canvas-soft-2)] hover:text-[var(--nc-dark-ink)]", className), onClick: copyToClipboard, size: "icon", variant: "ghost", ...props, children: children ?? _jsx(Icon, { size: 14 }) }));
34
34
  };
35
35
  export const TerminalClearButton = ({ children, className, ...props }) => {
36
36
  const { onClear } = useContext(TerminalContext);
37
37
  if (!onClear) {
38
38
  return null;
39
39
  }
40
- return (_jsx(Button, { className: cn("size-7 shrink-0 text-primary-foreground/70 hover:bg-primary-foreground/10 hover:text-primary-foreground", className), onClick: onClear, size: "icon", variant: "ghost", ...props, children: children ?? _jsx(Trash2Icon, { size: 14 }) }));
40
+ return (_jsx(Button, { className: cn("size-7 shrink-0 text-[var(--nc-dark-muted)] hover:bg-[var(--nc-dark-canvas-soft-2)] hover:text-[var(--nc-dark-ink)]", className), onClick: onClear, size: "icon", variant: "ghost", ...props, children: children ?? _jsx(Trash2Icon, { size: 14 }) }));
41
41
  };
42
42
  export const TerminalContent = ({ className, children, ...props }) => {
43
43
  const { output, isStreaming, autoScroll } = useContext(TerminalContext);
@@ -47,9 +47,9 @@ export const TerminalContent = ({ className, children, ...props }) => {
47
47
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
48
48
  }
49
49
  }, [output, autoScroll]);
50
- return (_jsx("div", { className: cn("max-h-96 overflow-auto p-4 font-mono text-sm leading-relaxed", className), ref: containerRef, ...props, children: children ?? (_jsxs("pre", { className: "whitespace-pre-wrap break-words", children: [_jsx(Ansi, { children: output }), isStreaming && (_jsx("span", { className: "ml-0.5 inline-block h-4 w-2 animate-pulse bg-primary-foreground" }))] })) }));
50
+ return (_jsx("div", { className: cn("max-h-96 overflow-auto p-4 font-mono text-sm leading-relaxed", className), ref: containerRef, ...props, children: children ?? (_jsxs("pre", { className: "whitespace-pre-wrap break-words", children: [_jsx(Ansi, { useClasses: true, children: output }), isStreaming && (_jsx("span", { className: "ml-0.5 inline-block h-4 w-2 animate-pulse bg-[var(--nc-dark-cyan)]" }))] })) }));
51
51
  };
52
52
  export const Terminal = ({ output, isStreaming = false, autoScroll = true, onClear, className, children, ...props }) => {
53
53
  const contextValue = useMemo(() => ({ autoScroll, isStreaming, onClear, output }), [autoScroll, isStreaming, onClear, output]);
54
- return (_jsx(TerminalContext.Provider, { value: contextValue, children: _jsx("div", { className: cn("flex flex-col overflow-hidden rounded-lg border bg-primary text-primary-foreground", className), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsxs(TerminalHeader, { children: [_jsx(TerminalTitle, {}), _jsxs("div", { className: "flex items-center gap-1", children: [_jsx(TerminalStatus, {}), _jsxs(TerminalActions, { children: [_jsx(TerminalCopyButton, {}), onClear && _jsx(TerminalClearButton, {})] })] })] }), _jsx(TerminalContent, {})] })) }) }));
54
+ return (_jsx(TerminalContext.Provider, { value: contextValue, children: _jsx("div", { "data-slot": "terminal", className: cn("flex flex-col overflow-hidden rounded-lg border border-[var(--nc-dark-line)] bg-[var(--nc-dark-canvas-soft)] text-[var(--nc-dark-ink)] selection:bg-[var(--nc-dark-cyan)] selection:text-[var(--nc-dark-canvas)]", className), ...props, children: children ?? (_jsxs(_Fragment, { children: [_jsxs(TerminalHeader, { children: [_jsx(TerminalTitle, {}), _jsxs("div", { className: "flex items-center gap-1", children: [_jsx(TerminalStatus, {}), _jsxs(TerminalActions, { children: [_jsx(TerminalCopyButton, {}), onClear && _jsx(TerminalClearButton, {})] })] })] }), _jsx(TerminalContent, {})] })) }) }));
55
55
  };