@nadicodeai/ui 0.10.1 → 0.11.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 +23 -135
- package/README.md +39 -110
- package/dist/components/action-band.d.ts +5 -3
- package/dist/components/action-band.d.ts.map +1 -1
- package/dist/components/action-band.js +35 -21
- package/dist/components/agent-chat.d.ts.map +1 -1
- package/dist/components/agent-chat.js +1 -1
- package/dist/components/agent-composer.d.ts.map +1 -1
- package/dist/components/agent-composer.js +1 -1
- package/dist/components/ai-elements/code-block.d.ts.map +1 -1
- package/dist/components/ai-elements/code-block.js +9 -23
- package/dist/components/ai-elements/commit.d.ts.map +1 -1
- package/dist/components/ai-elements/commit.js +9 -23
- package/dist/components/ai-elements/environment-variables.d.ts.map +1 -1
- package/dist/components/ai-elements/environment-variables.js +4 -29
- package/dist/components/ai-elements/snippet.d.ts.map +1 -1
- package/dist/components/ai-elements/snippet.js +9 -23
- package/dist/components/ai-elements/stack-trace.d.ts.map +1 -1
- package/dist/components/ai-elements/stack-trace.js +8 -21
- package/dist/components/ai-elements/terminal.d.ts.map +1 -1
- package/dist/components/ai-elements/terminal.js +16 -29
- package/dist/components/alert-dialog.d.ts.map +1 -1
- package/dist/components/alert-dialog.js +3 -2
- package/dist/components/artifact-panel.d.ts.map +1 -1
- package/dist/components/artifact-panel.js +5 -5
- package/dist/components/badge.js +1 -1
- package/dist/components/bento.d.ts +14 -3
- package/dist/components/bento.d.ts.map +1 -1
- package/dist/components/bento.js +26 -5
- package/dist/components/brand.d.ts.map +1 -1
- package/dist/components/brand.js +29 -3
- package/dist/components/button.js +1 -1
- package/dist/components/chart-time-series.d.ts.map +1 -1
- package/dist/components/chart-time-series.js +2 -2
- package/dist/components/chart.js +1 -1
- package/dist/components/contact.d.ts +22 -10
- package/dist/components/contact.d.ts.map +1 -1
- package/dist/components/contact.js +34 -12
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +3 -2
- package/dist/components/diff-count.js +1 -1
- package/dist/components/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu.js +2 -1
- package/dist/components/faq-item.js +2 -2
- package/dist/components/faq.d.ts +4 -1
- package/dist/components/faq.d.ts.map +1 -1
- package/dist/components/faq.js +5 -2
- package/dist/components/feature-grid.d.ts +23 -0
- package/dist/components/feature-grid.d.ts.map +1 -0
- package/dist/components/feature-grid.js +33 -0
- package/dist/components/feature-rows.d.ts +23 -0
- package/dist/components/feature-rows.d.ts.map +1 -0
- package/dist/components/feature-rows.js +27 -0
- package/dist/components/footer.d.ts +18 -12
- package/dist/components/footer.d.ts.map +1 -1
- package/dist/components/footer.js +32 -20
- package/dist/components/hero.d.ts +28 -0
- package/dist/components/hero.d.ts.map +1 -0
- package/dist/components/hero.js +45 -0
- package/dist/components/input-otp.js +1 -1
- package/dist/components/integration-flow.d.ts +36 -0
- package/dist/components/integration-flow.d.ts.map +1 -0
- package/dist/components/integration-flow.js +36 -0
- package/dist/components/live-demo.d.ts +31 -0
- package/dist/components/live-demo.d.ts.map +1 -0
- package/dist/components/live-demo.js +30 -0
- package/dist/components/logo-band.d.ts +12 -2
- package/dist/components/logo-band.d.ts.map +1 -1
- package/dist/components/logo-band.js +16 -1
- package/dist/components/logo-tile.d.ts.map +1 -1
- package/dist/components/logo-tile.js +5 -2
- package/dist/components/nav-bar.d.ts +14 -8
- package/dist/components/nav-bar.d.ts.map +1 -1
- package/dist/components/nav-bar.js +19 -13
- package/dist/components/popover.d.ts.map +1 -1
- package/dist/components/popover.js +2 -1
- package/dist/components/pricing-card.d.ts +10 -15
- package/dist/components/pricing-card.d.ts.map +1 -1
- package/dist/components/pricing-card.js +18 -29
- package/dist/components/pricing.d.ts +11 -14
- package/dist/components/pricing.d.ts.map +1 -1
- package/dist/components/pricing.js +5 -15
- package/dist/components/quote-card.d.ts +10 -2
- package/dist/components/quote-card.d.ts.map +1 -1
- package/dist/components/quote-card.js +15 -3
- package/dist/components/security-grid.d.ts +25 -0
- package/dist/components/security-grid.d.ts.map +1 -0
- package/dist/components/security-grid.js +31 -0
- package/dist/components/select.d.ts.map +1 -1
- package/dist/components/select.js +2 -1
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +3 -2
- package/dist/components/sidebar.js +1 -1
- package/dist/components/stat-block.d.ts +9 -5
- package/dist/components/stat-block.d.ts.map +1 -1
- package/dist/components/stat-block.js +12 -6
- package/dist/components/statement.d.ts +32 -0
- package/dist/components/statement.d.ts.map +1 -0
- package/dist/components/statement.js +40 -0
- package/dist/components/stats-band.d.ts +6 -2
- package/dist/components/stats-band.d.ts.map +1 -1
- package/dist/components/stats-band.js +10 -3
- package/dist/components/status-dot.js +4 -4
- package/dist/components/steps.d.ts +34 -0
- package/dist/components/steps.d.ts.map +1 -0
- package/dist/components/steps.js +40 -0
- package/dist/components/team-grid.d.ts +27 -0
- package/dist/components/team-grid.d.ts.map +1 -0
- package/dist/components/team-grid.js +30 -0
- package/dist/components/testimonials.d.ts +39 -12
- package/dist/components/testimonials.d.ts.map +1 -1
- package/dist/components/testimonials.js +46 -13
- package/dist/components/texture-strip.d.ts +22 -0
- package/dist/components/texture-strip.d.ts.map +1 -0
- package/dist/components/texture-strip.js +29 -0
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip.js +2 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/lib/message-scroller-primitive/geometry.d.ts +1 -5
- package/dist/lib/message-scroller-primitive/geometry.d.ts.map +1 -1
- package/dist/lib/message-scroller-primitive/geometry.js +1 -1
- package/dist/lib/message-scroller-primitive/stores.d.ts +2 -3
- package/dist/lib/message-scroller-primitive/stores.d.ts.map +1 -1
- package/dist/lib/message-scroller-primitive/stores.js +1 -1
- package/dist/lib/message-scroller-primitive/types.d.ts +1 -2
- package/dist/lib/message-scroller-primitive/types.d.ts.map +1 -1
- package/dist/lib/message-scroller-primitive/types.js +1 -1
- package/dist/lib/motion.d.ts +12 -0
- package/dist/lib/motion.d.ts.map +1 -0
- package/dist/lib/motion.js +11 -0
- package/dist/lib/use-copy-to-clipboard.d.ts +11 -0
- package/dist/lib/use-copy-to-clipboard.d.ts.map +1 -0
- package/dist/lib/use-copy-to-clipboard.js +27 -0
- package/dist/styles/globals.css +175 -300
- package/docs/agent-work-surfaces.md +6 -5
- package/docs/agents/nadicodeai-ui.md +42 -273
- package/docs/consuming-cross-repo.md +26 -33
- package/docs/contract.md +43 -0
- package/docs/migration/nadia-consumer-readiness.md +5 -10
- package/docs/terminal-tui-semantics.md +142 -181
- package/llms.txt +49 -84
- package/package.json +2 -3
- package/skills/nadicodeai-ui/SKILL.md +6 -30
|
@@ -1,203 +1,165 @@
|
|
|
1
1
|
# Terminal/TUI Semantics
|
|
2
2
|
|
|
3
|
-
This document
|
|
4
|
-
TUI consumer
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
This document owns the serializable names that a terminal, React Ink, or other
|
|
4
|
+
TUI consumer may use to preserve the meaning of shared agent states. It does not
|
|
5
|
+
define CSS custom properties, color values, light/dark mappings, a terminal
|
|
6
|
+
runtime, or a package export.
|
|
7
|
+
|
|
8
|
+
The framework-free data contracts live in `src/lib/agent-contracts.ts` and
|
|
9
|
+
`src/lib/agent-state.ts`. Canonical visual tokens and mode behavior live only in
|
|
10
|
+
[`design-system/DESIGN.md`](../../../design-system/DESIGN.md). A real TUI
|
|
11
|
+
renderer may consume `@nadicodeai/design-system/tokens/dtcg` and implement its
|
|
12
|
+
own technology adapter, but it must not copy a UI-local palette or treat this
|
|
13
|
+
document as a second theme source.
|
|
13
14
|
|
|
14
15
|
Do not put raw terminal output, secrets, environment values, user memory, hidden
|
|
15
16
|
chain-of-thought, or provider content in package examples or fixtures. Use
|
|
16
17
|
synthetic summaries and explicit redaction fields.
|
|
17
18
|
|
|
18
|
-
## Naming
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
`
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
| Serializable token | UI-local alias | Meaning |
|
|
34
|
-
| --- | --- | --- |
|
|
35
|
-
| `terminal.foreground` | `--nc-terminal-fg` | Default terminal text. |
|
|
36
|
-
| `terminal.background` | `--nc-terminal-bg` | Default terminal canvas. |
|
|
37
|
-
| `terminal.muted` | `--nc-terminal-muted` | Dim output, timestamps, separators, and low-priority metadata. |
|
|
38
|
-
| `terminal.cursor` | `--nc-terminal-cursor` | Text cursor or focused prompt caret. |
|
|
39
|
-
| `terminal.selection` | `--nc-terminal-selection-bg` | Selected text background. |
|
|
40
|
-
| `terminal.selection.background` | `--nc-terminal-selection-bg` | Explicit background form for renderers that model selection as an object. |
|
|
41
|
-
|
|
42
|
-
## ANSI Palette
|
|
43
|
-
|
|
44
|
-
| Serializable token | UI-local alias |
|
|
19
|
+
## Naming rules
|
|
20
|
+
|
|
21
|
+
- Names use dot-case strings such as `terminal.foreground`, `tool.running`, and
|
|
22
|
+
`approval.session`.
|
|
23
|
+
- DOM and TUI state names carry the same meaning. A renderer chooses its own
|
|
24
|
+
glyph, spacing, ANSI escape, and interaction behavior.
|
|
25
|
+
- Run-state parity uses `ready`, `running`, `review`, `blocked`, and `complete`.
|
|
26
|
+
- Tool and command status uses `pending`, `running`, `success`, `warning`,
|
|
27
|
+
`error`, and `muted`.
|
|
28
|
+
- Adding a visual value or mode mapping is a design-system change, not a new
|
|
29
|
+
serializable state.
|
|
30
|
+
|
|
31
|
+
## Terminal and ANSI roles
|
|
32
|
+
|
|
33
|
+
| Serializable role | Meaning |
|
|
45
34
|
| --- | --- |
|
|
46
|
-
| `terminal.
|
|
47
|
-
| `terminal.
|
|
48
|
-
| `terminal.
|
|
49
|
-
| `terminal.
|
|
50
|
-
| `terminal.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
| `code.
|
|
68
|
-
| `code.
|
|
69
|
-
| `
|
|
70
|
-
| `
|
|
71
|
-
| `
|
|
72
|
-
| `
|
|
73
|
-
| `
|
|
74
|
-
| `diff.
|
|
75
|
-
| `diff.
|
|
76
|
-
| `diff.
|
|
77
|
-
| `diff.
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
| `diff.modified.file-header` | `--nc-diff-file-header` | Modified file header or file-level changed state. |
|
|
83
|
-
|
|
84
|
-
## Trace Severity And Command Status
|
|
85
|
-
|
|
86
|
-
Trace severity maps technical trails, logs, and diagnostic summaries. It is not a
|
|
35
|
+
| `terminal.foreground` | Default terminal text. |
|
|
36
|
+
| `terminal.background` | Default terminal canvas. |
|
|
37
|
+
| `terminal.muted` | Timestamps, separators, and low-priority metadata. |
|
|
38
|
+
| `terminal.cursor` | Text cursor or focused prompt caret. |
|
|
39
|
+
| `terminal.selection` | Selected text treatment. |
|
|
40
|
+
|
|
41
|
+
ANSI names follow the protocol vocabulary without inventing branded aliases:
|
|
42
|
+
|
|
43
|
+
- `terminal.ansi.<color>` where `<color>` is `black`, `red`, `green`, `yellow`,
|
|
44
|
+
`blue`, `magenta`, `cyan`, or `white`.
|
|
45
|
+
- `terminal.ansi.bright-<color>` for the corresponding bright foreground.
|
|
46
|
+
|
|
47
|
+
## Code and diff roles
|
|
48
|
+
|
|
49
|
+
| Serializable role | Meaning |
|
|
50
|
+
| --- | --- |
|
|
51
|
+
| `code.foreground` | Default code text. |
|
|
52
|
+
| `code.background` | Code block or inline-preview surface. |
|
|
53
|
+
| `code.border` | Code surface border or gutter divider. |
|
|
54
|
+
| `code.token.keyword` | Syntax keyword. |
|
|
55
|
+
| `code.token.string` | Syntax string. |
|
|
56
|
+
| `code.token.comment` | Syntax comment. |
|
|
57
|
+
| `code.token.function` | Syntax function. |
|
|
58
|
+
| `diff.added` | Added content. |
|
|
59
|
+
| `diff.added.line` | Added line. |
|
|
60
|
+
| `diff.added.word` | Added inline word span. |
|
|
61
|
+
| `diff.removed` | Removed content. |
|
|
62
|
+
| `diff.removed.line` | Removed line. |
|
|
63
|
+
| `diff.removed.word` | Removed inline word span. |
|
|
64
|
+
| `diff.modified` | Modified context. |
|
|
65
|
+
| `diff.modified.hunk` | Hunk marker or changed context. |
|
|
66
|
+
| `diff.modified.file-header` | Modified file header. |
|
|
67
|
+
|
|
68
|
+
## Trace and command status
|
|
69
|
+
|
|
70
|
+
Trace severity describes technical trails and diagnostic summaries. It is not a
|
|
87
71
|
license to store raw logs in package examples.
|
|
88
72
|
|
|
89
|
-
| Serializable state |
|
|
90
|
-
| --- | --- |
|
|
91
|
-
| `trace.info` |
|
|
92
|
-
| `trace.success` |
|
|
93
|
-
| `trace.warning` |
|
|
94
|
-
| `trace.error` |
|
|
95
|
-
| `trace.muted` |
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
| `command.
|
|
102
|
-
| `command.
|
|
103
|
-
| `command.
|
|
104
|
-
| `command.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
|
109
|
-
| `command.complete` | `--nc-status-complete` | Complete run-state parity with DOM work surfaces. |
|
|
110
|
-
|
|
111
|
-
## Provider And Model Status
|
|
112
|
-
|
|
113
|
-
Provider and model rows use the same serializable names in DOM pickers, terminal
|
|
114
|
-
model pickers, and future TUI overlays.
|
|
115
|
-
|
|
116
|
-
| Serializable state | UI-local alias | Meaning |
|
|
117
|
-
| --- | --- | --- |
|
|
118
|
-
| `provider.surface` | `--nc-model-provider-surface` | Provider row or provider group surface. |
|
|
119
|
-
| `provider.online` | `--nc-status-online` | Provider is available. |
|
|
120
|
-
| `provider.offline` | `--nc-status-offline` | Provider is unavailable. |
|
|
121
|
-
| `provider.degraded` | `--nc-status-warning` | Provider is available with degraded capacity. |
|
|
122
|
-
| `provider.error` | `--nc-status-error` | Provider cannot serve requests. |
|
|
123
|
-
| `model.available` | `--nc-model-capability-surface` | Model is available for selection. |
|
|
124
|
-
| `model.selected` | `--nc-model-capability-border` | Selected or focused model. |
|
|
125
|
-
| `model.context-warning` | `--nc-model-context-meter` | Context window is near a configured limit. |
|
|
126
|
-
| `model.cost-warning` | `--nc-model-cost-warning` | Cost warning or budget-sensitive model. |
|
|
127
|
-
| `model.rate-limited` | `--nc-model-rate-limit` | Rate limit active or likely. |
|
|
128
|
-
| `model.unavailable` | `--nc-status-offline` | Model cannot be selected. |
|
|
129
|
-
|
|
130
|
-
## Approval Choices
|
|
131
|
-
|
|
132
|
-
Approval choices are serializable strings. Consumers own behavior, keyboard
|
|
133
|
-
shortcuts, and persistence.
|
|
134
|
-
|
|
135
|
-
| Serializable choice | UI-local alias | Meaning |
|
|
136
|
-
| --- | --- | --- |
|
|
137
|
-
| `approval.run` | `--nc-tool-approval-run` | Run once. |
|
|
138
|
-
| `approval.deny` | `--nc-tool-approval-deny` | Deny this action. |
|
|
139
|
-
| `approval.session` | `--nc-tool-approval-session` | Allow for this session. |
|
|
140
|
-
| `approval.always` | `--nc-tool-approval-always` | Allow persistently where app policy permits. |
|
|
141
|
-
|
|
142
|
-
## Message And Tool States
|
|
143
|
-
|
|
144
|
-
Message roles map to the same meanings as DOM agent/chat surfaces.
|
|
145
|
-
|
|
146
|
-
| Serializable state | UI-local alias | Meaning |
|
|
147
|
-
| --- | --- | --- |
|
|
148
|
-
| `message.user` | `--nc-chat-user-surface` | Human-authored message. |
|
|
149
|
-
| `message.assistant` | `--nc-chat-assistant-surface` | Assistant-authored message. |
|
|
150
|
-
| `message.system` | `--nc-chat-system-surface` | System or policy summary visible to the user. |
|
|
151
|
-
| `message.reasoning` | `--nc-chat-reasoning-surface` | Reasoning summary disclosure, not hidden chain-of-thought. |
|
|
152
|
-
| `message.tool` | `--nc-chat-tool-surface` | Tool call summary or tool result summary. |
|
|
153
|
-
| `message.artifact` | `--nc-chat-artifact-surface` | Artifact reference, preview, or generated file summary. |
|
|
154
|
-
| `message.source` | `--nc-chat-inline-ref-surface` | Source or citation reference. |
|
|
155
|
-
| `message.queued` | `--nc-tool-pending` | Queued message. |
|
|
156
|
-
| `message.streaming` | `--nc-status-running` | Partial assistant output is streaming. |
|
|
157
|
-
| `message.interrupted` | `--nc-status-paused` | Message generation stopped before completion. |
|
|
158
|
-
| `message.retryable` | `--nc-status-warning` | Retry is available. |
|
|
159
|
-
| `message.permission-denied` | `--nc-status-blocked` | Blocked by user, policy, or permission. |
|
|
160
|
-
| `message.fatal` | `--nc-status-error` | Non-recoverable message failure. |
|
|
161
|
-
|
|
162
|
-
Tool states reuse command status meanings:
|
|
163
|
-
|
|
164
|
-
| Serializable state | UI-local alias | Meaning |
|
|
165
|
-
| --- | --- | --- |
|
|
166
|
-
| `tool.pending` | `--nc-tool-pending` | Waiting to start or waiting for approval. |
|
|
167
|
-
| `tool.running` | `--nc-tool-running` | Active tool call. |
|
|
168
|
-
| `tool.success` | `--nc-tool-success` | Tool call completed successfully. |
|
|
169
|
-
| `tool.warning` | `--nc-tool-warning` | Tool call completed with warning or degraded result. |
|
|
170
|
-
| `tool.error` | `--nc-tool-error` | Tool call failed. |
|
|
171
|
-
| `tool.muted` | `--nc-tool-muted` | Low-priority tool metadata. |
|
|
172
|
-
|
|
173
|
-
## Message Spacing And Prompt Glyphs
|
|
174
|
-
|
|
175
|
-
Spacing names are serializable layout hints, not CSS aliases:
|
|
176
|
-
|
|
177
|
-
| Serializable token | Meaning |
|
|
73
|
+
| Serializable state | Meaning |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| `trace.info` | Informational trace row. |
|
|
76
|
+
| `trace.success` | Completed trace row. |
|
|
77
|
+
| `trace.warning` | Recoverable warning. |
|
|
78
|
+
| `trace.error` | Failed trace row. |
|
|
79
|
+
| `trace.muted` | Low-priority diagnostic metadata. |
|
|
80
|
+
| `command.queued` | Queued but not started. |
|
|
81
|
+
| `command.pending` | Waiting for scheduler, input, or approval. |
|
|
82
|
+
| `command.running` | Currently executing. |
|
|
83
|
+
| `command.success` | Finished successfully. |
|
|
84
|
+
| `command.warning` | Finished with warnings or partial recovery. |
|
|
85
|
+
| `command.error` | Failed. |
|
|
86
|
+
| `command.paused` | Paused by a user or runtime. |
|
|
87
|
+
| `command.blocked` | Blocked by a missing permission, precondition, or input. |
|
|
88
|
+
| `command.complete` | Completed run. |
|
|
89
|
+
|
|
90
|
+
## Provider and model status
|
|
91
|
+
|
|
92
|
+
| Serializable state | Meaning |
|
|
178
93
|
| --- | --- |
|
|
179
|
-
| `
|
|
180
|
-
| `
|
|
181
|
-
| `
|
|
182
|
-
| `
|
|
183
|
-
| `
|
|
184
|
-
| `
|
|
94
|
+
| `provider.online` | Provider is available. |
|
|
95
|
+
| `provider.offline` | Provider is unavailable. |
|
|
96
|
+
| `provider.degraded` | Provider is available with degraded capacity. |
|
|
97
|
+
| `provider.error` | Provider cannot serve requests. |
|
|
98
|
+
| `model.available` | Model is available for selection. |
|
|
99
|
+
| `model.selected` | Model is selected or focused. |
|
|
100
|
+
| `model.context-warning` | Context window is near a configured limit. |
|
|
101
|
+
| `model.cost-warning` | Model is budget-sensitive. |
|
|
102
|
+
| `model.rate-limited` | Rate limiting is active or likely. |
|
|
103
|
+
| `model.unavailable` | Model cannot be selected. |
|
|
104
|
+
|
|
105
|
+
## Approval choices
|
|
106
|
+
|
|
107
|
+
Consumers own behavior, keyboard shortcuts, and persistence.
|
|
108
|
+
|
|
109
|
+
| Serializable choice | Meaning |
|
|
110
|
+
| --- | --- |
|
|
111
|
+
| `approval.run` | Run once. |
|
|
112
|
+
| `approval.deny` | Deny this action. |
|
|
113
|
+
| `approval.session` | Allow for this session. |
|
|
114
|
+
| `approval.always` | Allow persistently where app policy permits. |
|
|
185
115
|
|
|
186
|
-
|
|
116
|
+
## Message and tool states
|
|
187
117
|
|
|
188
|
-
| Serializable
|
|
118
|
+
| Serializable state | Meaning |
|
|
119
|
+
| --- | --- |
|
|
120
|
+
| `message.user` | Human-authored message. |
|
|
121
|
+
| `message.assistant` | Assistant-authored message. |
|
|
122
|
+
| `message.system` | User-visible system or policy summary. |
|
|
123
|
+
| `message.reasoning` | Reasoning summary disclosure, not hidden chain-of-thought. |
|
|
124
|
+
| `message.tool` | Tool call or result summary. |
|
|
125
|
+
| `message.artifact` | Artifact reference, preview, or generated-file summary. |
|
|
126
|
+
| `message.source` | Source or citation reference. |
|
|
127
|
+
| `message.queued` | Queued message. |
|
|
128
|
+
| `message.streaming` | Partial assistant output is streaming. |
|
|
129
|
+
| `message.interrupted` | Generation stopped before completion. |
|
|
130
|
+
| `message.retryable` | Retry is available. |
|
|
131
|
+
| `message.permission-denied` | Blocked by a user, policy, or permission. |
|
|
132
|
+
| `message.fatal` | Non-recoverable message failure. |
|
|
133
|
+
| `tool.pending` | Waiting to start or waiting for approval. |
|
|
134
|
+
| `tool.running` | Active tool call. |
|
|
135
|
+
| `tool.success` | Tool call completed successfully. |
|
|
136
|
+
| `tool.warning` | Tool call completed with a warning or degraded result. |
|
|
137
|
+
| `tool.error` | Tool call failed. |
|
|
138
|
+
| `tool.muted` | Low-priority tool metadata. |
|
|
139
|
+
|
|
140
|
+
## Layout hints and prompt glyphs
|
|
141
|
+
|
|
142
|
+
Layout hints are serializable meanings, not CSS aliases:
|
|
143
|
+
|
|
144
|
+
| Serializable role | Meaning |
|
|
189
145
|
| --- | --- |
|
|
146
|
+
| `message.spacing.compact` | Dense rows for active streams and tool trails. |
|
|
147
|
+
| `message.spacing.default` | Standard chat or TUI rhythm. |
|
|
148
|
+
| `message.spacing.loose` | Review, approval, or long-form summary rhythm. |
|
|
149
|
+
| `message.indent.user` | User-message indent. |
|
|
150
|
+
| `message.indent.assistant` | Assistant-message indent. |
|
|
151
|
+
| `message.indent.tool` | Tool-trail indent. |
|
|
190
152
|
| `promptGlyph.user` | Human prompt marker. |
|
|
191
153
|
| `promptGlyph.assistant` | Assistant prompt marker. |
|
|
192
154
|
| `promptGlyph.system` | System or notice marker. |
|
|
193
|
-
| `promptGlyph.tool` | Tool
|
|
155
|
+
| `promptGlyph.tool` | Tool-trail marker. |
|
|
194
156
|
| `promptGlyph.approval` | Approval prompt marker. |
|
|
195
|
-
| `promptGlyph.continuation` | Wrapped or continued
|
|
157
|
+
| `promptGlyph.continuation` | Wrapped or continued-line marker. |
|
|
196
158
|
|
|
197
|
-
## Serializable
|
|
159
|
+
## Serializable shape
|
|
198
160
|
|
|
199
|
-
The package does not export
|
|
200
|
-
|
|
161
|
+
The package does not export a TUI-specific type. A consumer can mirror the
|
|
162
|
+
framework-free state shape without importing React DOM components:
|
|
201
163
|
|
|
202
164
|
```json
|
|
203
165
|
{
|
|
@@ -208,4 +170,3 @@ can mirror without importing React DOM or product components:
|
|
|
208
170
|
"redactedSummary": "Synthetic action summary"
|
|
209
171
|
}
|
|
210
172
|
```
|
|
211
|
-
|
package/llms.txt
CHANGED
|
@@ -1,86 +1,51 @@
|
|
|
1
1
|
# @nadicodeai/ui
|
|
2
2
|
|
|
3
|
-
Shared NadicodeAI React UI package
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- Utility export: `@nadicodeai/ui/lib/utils`.
|
|
53
|
-
|
|
54
|
-
Package surface:
|
|
55
|
-
- `src/components/` is flat shadcn-style source. Do not document folders or package namespaces that do not exist.
|
|
56
|
-
- Do not add top-level exports for recipes, blocks, agent, or terminal groupings without concrete source, built files, docs, and tests in the same package API decision.
|
|
57
|
-
- App routes own routing, persistence, auth behavior, runtime adapters, server state, app-specific copy, and app-owned product features/use cases.
|
|
58
|
-
- Product-specific names such as `operator-login`, portal activation, and customer credential control stay out of package components.
|
|
59
|
-
- Generic data tables, command palettes, and chart cards are app-owned shadcn registry adaptations, not NadicodeAI package abstractions. The `chart-*` console chart kit subpaths are plan-approved package surface (issue #166, ADR 0010); chart cards that arrange them stay app-owned.
|
|
60
|
-
- The date-range URL codec (`encodeDateRange`/`decodeDateRange`) ships server-safe from `@nadicodeai/ui/components/chart-date-range`; the interactive picker is `@nadicodeai/ui/components/chart-date-range-control`.
|
|
61
|
-
- Consumer migration order: web admin or portal validation slice first, installer second, desktop shell third, desktop chat last, TUI through `docs/terminal-tui-semantics.md`.
|
|
62
|
-
- Read `docs/migration/nadia-consumer-readiness.md` before migrating a consumer; it records CSS requirements, public import paths, fixture rules, and readiness gates.
|
|
63
|
-
|
|
64
|
-
Forms:
|
|
65
|
-
- Use `Input`/`Textarea`/other controls for controls.
|
|
66
|
-
- Use `FieldGroup` + `Field` + `FieldLabel`/`FieldDescription`/`FieldError` for field layout.
|
|
67
|
-
- Use `Form` + `FormField`/`FormItem`/`FormControl`/`FormMessage` only for React Hook Form integration.
|
|
68
|
-
- Do not create or import a parallel `FormInput`/`FormTextarea` control family.
|
|
69
|
-
|
|
70
|
-
Rules:
|
|
71
|
-
- Dark-ready through globals only. The generated design-system theme (imported by `@nadicodeai/ui/globals.css`) owns the `:root`/`.dark` shadcn role maps and the root-only `:root.dark` raw `--nc-*` remaps (state/selection/cross/chart); `globals.css` owns the Tailwind bridge and UI-local product aliases such as `--nc-app-surface`, `--nc-chat-tool-surface`, and `--nc-terminal-bg`. The `dark` class must sit on the root element (next-themes `attribute="class"`). Components must not add Tailwind `dark:` utilities or OS dark-mode branching.
|
|
72
|
-
- Token-only. Use NadicodeAI/shadcn semantic utilities such as `bg-background`, `text-foreground`, `border-border`, `text-destructive`, UI-local aliases like `bg-[var(--nc-app-surface)]`, and brand token arbitrary values like `text-[var(--nc-link-deep)]`.
|
|
73
|
-
- Do not use raw `#hex`, `rgb()`, `hsl()`, or raw palette utilities such as `text-blue-600`, `bg-zinc-950`, `text-white`, or `bg-black/50`.
|
|
74
|
-
- App routes should compose existing reusable sections/compositions from this package. Extract new shared UI only after a second concrete consumer, a plan-approved shared component, or a named validation slice proves the package boundary.
|
|
75
|
-
|
|
76
|
-
shadcn / AI Elements discovery:
|
|
77
|
-
- Use live MCP/CLI discovery from `@nadicodeai/ui`; do not maintain a committed upstream registry inventory, snapshot, or inventory update script.
|
|
78
|
-
- Codex MCP setup when supported: `npx shadcn@latest mcp init --client codex`.
|
|
79
|
-
- CLI fallbacks: `npx shadcn@latest info --json`, `npx shadcn@latest search @shadcn -q "select" --json`, `npx shadcn@latest search @ai-elements -q "message" --json`, `npx shadcn@latest docs button select dialog --json`, `npx shadcn@latest view @shadcn/button`, `npx shadcn@latest add @shadcn/button --dry-run`, `npx shadcn@latest add @ai-elements/message --dry-run`.
|
|
80
|
-
- Use `info --json` for aliases, Tailwind version, base primitive library, icon library, source paths, and configured registries. It should report Base UI, not Radix. Use `search`, `docs`, and `view` before adding source; use `add --dry-run` or `add --diff` before changing files.
|
|
81
|
-
|
|
82
|
-
Agent references shipped in this package:
|
|
83
|
-
- `AGENTS.md`
|
|
84
|
-
- `docs/agents/nadicodeai-ui.md`
|
|
85
|
-
- `docs/migration/nadia-consumer-readiness.md`
|
|
86
|
-
- `skills/nadicodeai-ui/SKILL.md`
|
|
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
|
+
- Agent work surfaces: `docs/agent-work-surfaces.md`.
|
|
16
|
+
- Product compositions and sections: `docs/product-compositions.md` and
|
|
17
|
+
`docs/product-sections.md`.
|
|
18
|
+
- Consumer migration: `docs/migration/nadia-consumer-readiness.md`.
|
|
19
|
+
- Terminal and TUI semantics: `docs/terminal-tui-semantics.md`.
|
|
20
|
+
- Maintenance workflow and live shadcn or AI Elements discovery:
|
|
21
|
+
`docs/agents/nadicodeai-ui.md`.
|
|
22
|
+
|
|
23
|
+
The component inventory is source-backed and is not repeated in prose. Use the
|
|
24
|
+
source tree while maintaining the package; use `package.json` and generated
|
|
25
|
+
declarations when consuming an installed package.
|
|
26
|
+
|
|
27
|
+
## Imports
|
|
28
|
+
|
|
29
|
+
Prefer explicit component subpaths:
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { Button } from "@nadicodeai/ui/components/button";
|
|
33
|
+
import { Message } from "@nadicodeai/ui/components/ai-elements/message";
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Use the root or AI Elements barrel when a barrel is more useful:
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
import { Button } from "@nadicodeai/ui";
|
|
40
|
+
import { Message, PromptInput } from "@nadicodeai/ui/ai-elements";
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Read the generated declaration for the current export names and props. Do not
|
|
44
|
+
infer a component API from an upstream example or from this index.
|
|
45
|
+
|
|
46
|
+
## Package boundary
|
|
47
|
+
|
|
48
|
+
The package owns reusable presentational UI. Consuming apps own routes, auth,
|
|
49
|
+
persistence, server state, runtime adapters, permission decisions, analytics,
|
|
50
|
+
and app-specific copy. Use `docs/contract.md` to decide whether new UI belongs
|
|
51
|
+
in the package.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
"import": "./dist/index.js"
|
|
15
15
|
},
|
|
16
16
|
"./globals.css": "./dist/styles/globals.css",
|
|
17
|
-
"./styles.css": "./dist/styles/globals.css",
|
|
18
17
|
"./ai-elements": {
|
|
19
18
|
"types": "./dist/ai-elements.d.ts",
|
|
20
19
|
"import": "./dist/ai-elements.js"
|
|
@@ -63,7 +62,7 @@
|
|
|
63
62
|
},
|
|
64
63
|
"dependencies": {
|
|
65
64
|
"@base-ui/react": "^1.6.0",
|
|
66
|
-
"@nadicodeai/design-system": "0.
|
|
65
|
+
"@nadicodeai/design-system": "0.11.0",
|
|
67
66
|
"@rive-app/react-webgl2": "^4.29.1",
|
|
68
67
|
"@streamdown/cjk": "^1.0.3",
|
|
69
68
|
"@streamdown/code": "^1.1.1",
|
|
@@ -12,18 +12,14 @@ folders or package namespaces that do not exist. Do not add top-level exports
|
|
|
12
12
|
for recipes, blocks, agent, or terminal groupings without concrete source, built
|
|
13
13
|
files, docs, and tests in the same package API decision.
|
|
14
14
|
Routes, persistence, auth behavior, runtime adapters, server state, and
|
|
15
|
-
app-owned product features/use cases stay in the consuming app.
|
|
16
|
-
|
|
17
|
-
control stay out of package components.
|
|
15
|
+
app-owned product features/use cases stay in the consuming app. The complete
|
|
16
|
+
admission boundary lives in `docs/contract.md`.
|
|
18
17
|
|
|
19
18
|
## Required Setup
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
import "@nadicodeai/ui/globals.css";
|
|
25
|
-
import "@nadicodeai/design-system/css";
|
|
26
|
-
```
|
|
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.
|
|
27
23
|
|
|
28
24
|
## Import Patterns
|
|
29
25
|
|
|
@@ -65,31 +61,11 @@ import { AgentChat } from "@nadicodeai/ui/components/agent-chat";
|
|
|
65
61
|
|
|
66
62
|
## Rules
|
|
67
63
|
|
|
68
|
-
-
|
|
69
|
-
- Use UI-local product aliases when a product role is needed: `bg-[var(--nc-app-surface)]`, `ring-[var(--nc-composer-ring)]`.
|
|
70
|
-
- Use brand tokens through arbitrary values when needed: `text-[var(--nc-link-deep)]`.
|
|
71
|
-
- Dark mode uses generated design-system `:root` and `.dark` shadcn roles plus UI-local product aliases in `@nadicodeai/ui/globals.css`. Consuming apps own the runtime `.dark` class and persisted light/dark/system preference. Do not add component-level `dark:` utilities, `.dark` CSS outside package globals/theme files, OS dark-mode branching, raw color literals, or raw Tailwind palette utilities.
|
|
64
|
+
- 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.
|
|
72
65
|
- Use `ThemeModeSwitcher` only as a controlled, app-agnostic control; do not import `next-themes` or app persistence into the UI package.
|
|
73
66
|
- 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.
|
|
74
67
|
- For source maintenance, run shadcn commands with `--dry-run` before writing and do not use `--overwrite` without explicit maintainer approval.
|
|
75
68
|
|
|
76
|
-
## Motion
|
|
77
|
-
|
|
78
|
-
Importing `@nadicodeai/design-system/css` in Required Setup gives you the brand motion contract at the CSS layer: the tokens below plus the four sanctioned moves — **Settle** (entrance, once), **Type** (agent transcript rhythm), **Confirm** (state change, colour arrives with meaning), **Invite** (hover/press) — each honouring `prefers-reduced-motion`. That CSS is the guarantee. Individual React components are not all under the contract yet: a few still carry motion that predates it (for example the animated `Edge`'s indefinite loop and `Button`'s `transition-all`), so audit a component's motion against the rules below rather than assuming it already complies.
|
|
79
|
-
|
|
80
|
-
For any motion you add in your app, use the design-system tokens; never invent a `cubic-bezier` or a raw duration:
|
|
81
|
-
|
|
82
|
-
- Durations: `--nc-duration-confirm` (180ms, state feedback), `--nc-duration-open` (220ms) / `--nc-duration-close` (140ms, popover/dialog open vs dismiss), `--nc-duration-reflow` (250ms, medium-frequency UI — list reflow, rolling numbers), `--nc-duration-msg-in` (360ms, one-time entrance only).
|
|
83
|
-
- Easings: `--nc-ease-emphasized` (settle), `--nc-ease-out-strong` (feedback/press).
|
|
84
|
-
|
|
85
|
-
Rules for app-authored motion:
|
|
86
|
-
|
|
87
|
-
- **Animate only to carry meaning.** Motion a user meets repeatedly (product UI, keyboard actions) stays minimal — Confirm and Invite only. Save entrances and richer motion for rarely-seen surfaces.
|
|
88
|
-
- **Stay under 300ms** for UI feedback; open deliberate (`--nc-duration-open`) and close snappier (`--nc-duration-close`); popovers scale from their trigger, not screen-centre.
|
|
89
|
-
- **Compositor-only movement:** animate `transform`/`opacity`; a state change may transition `background-color`/`border-color`/`color` at `--nc-duration-confirm`; never `transition: all` or a layout-shifting property; gate hover behind `(hover: hover) and (pointer: fine)`.
|
|
90
|
-
- **The reduced-motion test:** under `prefers-reduced-motion: reduce` the surface must read identically motionless. If turning motion off changes what the user understands, cut the motion.
|
|
91
|
-
- Reach for a small library only for what the package doesn't cover, and keep it token-timed and reduced-motion-safe: rolling numbers → `@number-flow/react`; list/queue reflow → `@formkit/auto-animate`; route/tab transitions → the browser View Transitions API (on Next its `experimental.viewTransition` integration is flagged experimental and not recommended for production, so keep it to prototypes or gate it behind an explicit production decision with a no-transition fallback). Do not add parallax, scroll-jacking, gradient shimmer, staggered letter reveals, or a spinner/pulse for operational state.
|
|
92
|
-
|
|
93
69
|
## Verification
|
|
94
70
|
|
|
95
71
|
```bash
|