@nadicodeai/ui 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +13 -13
- package/README.md +1 -1
- package/dist/agents.d.ts +8 -8
- package/dist/components/accordion.js +1 -1
- package/dist/components/action-band.js +1 -1
- package/dist/components/agent-card.d.ts +1 -1
- package/dist/components/agent-visual.d.ts +1 -1
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/automation-section.d.ts +2 -2
- package/dist/components/avatar.d.ts.map +1 -1
- package/dist/components/avatar.js +3 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/brand-icons/apple.d.ts +1 -1
- package/dist/components/brand-icons/linux.d.ts +1 -1
- package/dist/components/brand-icons/windows.d.ts +1 -1
- package/dist/components/brand-icons.d.ts +4 -4
- package/dist/components/button-group.d.ts +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/calendar.d.ts +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/card.js +2 -4
- package/dist/components/carousel.d.ts +1 -1
- package/dist/components/carousel.d.ts.map +1 -1
- package/dist/components/chart-breakdown-table.d.ts +2 -2
- package/dist/components/chart-bullet-bar.js +5 -5
- package/dist/components/chart-date-range-control.d.ts +1 -1
- package/dist/components/chart-kpi-stat.d.ts +1 -1
- package/dist/components/chart-time-series.d.ts +1 -1
- package/dist/components/chart-time-series.d.ts.map +1 -1
- package/dist/components/chart-time-series.js +10 -9
- package/dist/components/chart.d.ts.map +1 -1
- package/dist/components/chart.js +13 -3
- package/dist/components/checkbox.js +1 -1
- package/dist/components/combobox.js +2 -2
- package/dist/components/command.d.ts +1 -1
- package/dist/components/command.d.ts.map +1 -1
- package/dist/components/command.js +2 -2
- package/dist/components/context-menu.js +1 -1
- package/dist/components/dashboard-shell.d.ts +1 -1
- package/dist/components/disclosure-row.d.ts.map +1 -1
- package/dist/components/disclosure-row.js +1 -3
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/faq-item.d.ts +1 -1
- package/dist/components/faq-item.d.ts.map +1 -1
- package/dist/components/faq-item.js +2 -2
- package/dist/components/feedback-state.d.ts +1 -1
- package/dist/components/field.d.ts +1 -1
- package/dist/components/footer.d.ts.map +1 -1
- package/dist/components/footer.js +1 -1
- package/dist/components/form.d.ts +1 -1
- package/dist/components/glass-control.js +1 -1
- package/dist/components/hero.js +1 -1
- package/dist/components/input-group.d.ts +1 -1
- package/dist/components/input-group.js +3 -3
- package/dist/components/input-otp.d.ts.map +1 -1
- package/dist/components/input-otp.js +6 -3
- package/dist/components/input.js +1 -1
- package/dist/components/integration-flow.d.ts.map +1 -1
- package/dist/components/integration-flow.js +5 -5
- package/dist/components/item.d.ts +1 -1
- package/dist/components/item.js +1 -1
- package/dist/components/label-system.js +1 -1
- package/dist/components/live-demo.js +2 -2
- package/dist/components/menubar.d.ts +1 -1
- package/dist/components/menubar.js +1 -1
- package/dist/components/native-select.js +1 -1
- package/dist/components/nav-bar.d.ts.map +1 -1
- package/dist/components/nav-bar.js +1 -1
- package/dist/components/navigation-menu.d.ts.map +1 -1
- package/dist/components/navigation-menu.js +5 -5
- package/dist/components/pagination.d.ts +1 -1
- package/dist/components/plugin-slot-boundary.d.ts.map +1 -1
- package/dist/components/plugin-slot-boundary.js +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/radio-group.js +1 -1
- package/dist/components/resizable.d.ts.map +1 -1
- package/dist/components/resizable.js +4 -2
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/seam-grid.d.ts +1 -1
- package/dist/components/select.js +4 -4
- package/dist/components/settings-section.d.ts +1 -1
- package/dist/components/sidebar.d.ts +4 -4
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +6 -7
- package/dist/components/slider.js +1 -1
- package/dist/components/status-dot.js +2 -2
- package/dist/components/switch.js +1 -1
- package/dist/components/table.d.ts.map +1 -1
- package/dist/components/table.js +3 -3
- package/dist/components/tabs.js +1 -1
- package/dist/components/textarea.js +1 -1
- package/dist/components/texture-strip.d.ts.map +1 -1
- package/dist/components/texture-strip.js +3 -0
- package/dist/components/theme-mode-switcher.d.ts +2 -2
- package/dist/components/toggle-group.d.ts +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/eslint/index.js +23 -17
- package/dist/eslint/rules/confirm-destructive-action.js +177 -0
- package/dist/eslint/rules/jsx-class-utility.js +162 -176
- package/dist/eslint/rules/no-app-feature-component.js +100 -0
- package/dist/eslint/rules/no-deprecated-zod-api.js +63 -15
- package/dist/eslint/rules/no-elevated-edge.js +144 -0
- package/dist/eslint/rules/no-mono-title-register.js +73 -0
- package/dist/eslint/rules/no-native-visible-control.js +6 -3
- package/dist/eslint/rules/no-package-component-redefinition.js +175 -0
- package/dist/eslint/rules/no-paired-size-utility.js +66 -0
- package/dist/eslint/rules/no-repainted-focus.js +80 -0
- package/dist/eslint/rules/no-resting-settings-control.js +87 -0
- package/dist/eslint/rules/no-shadcn-appearance-override.js +30 -56
- package/dist/eslint/rules/no-unpinned-vercel-functions-import.js +25 -23
- package/dist/eslint/rules/server-action-discipline.js +182 -0
- package/dist/eslint/rules/shadcn-composition.js +131 -0
- package/dist/hooks/index.d.ts +3 -3
- package/dist/index.d.ts +132 -132
- package/dist/internal/agent-visual/poster.d.ts +1 -1
- package/dist/internal/agent-visual/renderer.d.ts +1 -1
- package/dist/internal/assistant-ui/attachment.js +1 -1
- package/dist/internal/assistant-ui/follow-up-suggestions.d.ts.map +1 -1
- package/dist/internal/assistant-ui/follow-up-suggestions.js +5 -1
- package/dist/internal/assistant-ui/reasoning.d.ts +1 -1
- package/dist/internal/assistant-ui/tool-fallback.d.ts +1 -1
- package/dist/internal/assistant-ui/tool-group.d.ts +1 -1
- package/dist/internal/assistant-ui/tooltip-icon-button.d.ts +1 -1
- package/dist/styles/globals.css +37 -12
- package/docs/consuming-cross-repo.md +2 -2
- package/docs/contract.md +38 -20
- package/docs/migration/base-ui-migration.md +2 -2
- package/package.json +7 -6
- package/dist/eslint/rules/no-design-system-src-import.js +0 -11
- package/dist/eslint/rules/no-raw-color-utility.js +0 -109
- package/dist/eslint/rules/no-raw-focus-ring-width.js +0 -30
- package/dist/eslint/rules/no-raw-logo-import.js +0 -41
- package/dist/eslint/rules/no-ui-src-import.js +0 -10
- package/dist/eslint/rules/src-import-boundary.js +0 -207
package/dist/index.d.ts
CHANGED
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
export * from "./components/accordion";
|
|
2
|
-
export * from "./components/action-band";
|
|
3
|
-
export * from "./components/action-status";
|
|
4
|
-
export * from "./components/alert";
|
|
5
|
-
export * from "./components/alert-dialog";
|
|
6
|
-
export * from "./components/agent-card";
|
|
7
|
-
export * from "./components/agent-visual";
|
|
8
|
-
export * from "./components/aspect-ratio";
|
|
9
|
-
export * from "./components/automation-section";
|
|
10
|
-
export * from "./components/avatar";
|
|
11
|
-
export * from "./components/badge";
|
|
12
|
-
export * from "./components/benefits-bento";
|
|
13
|
-
export * from "./components/bento";
|
|
14
|
-
export * from "./components/brand";
|
|
15
|
-
export * from "./components/brand-field";
|
|
16
|
-
export * from "./components/brand-icons";
|
|
17
|
-
export * from "./components/breadcrumb";
|
|
18
|
-
export * from "./components/button";
|
|
19
|
-
export * from "./components/button-group";
|
|
20
|
-
export * from "./components/calendar";
|
|
21
|
-
export * from "./components/card";
|
|
22
|
-
export * from "./components/card-marketing";
|
|
23
|
-
export * from "./components/carousel";
|
|
24
|
-
export * from "./components/chart";
|
|
25
|
-
export * from "./components/chart-breakdown-table";
|
|
26
|
-
export * from "./components/chart-bullet-bar";
|
|
27
|
-
export * from "./components/chart-date-range";
|
|
28
|
-
export * from "./components/chart-date-range-control";
|
|
29
|
-
export * from "./components/chart-delta";
|
|
30
|
-
export * from "./components/chart-entity-colors";
|
|
31
|
-
export * from "./components/chart-kpi-stat";
|
|
32
|
-
export * from "./components/chart-sparkline";
|
|
33
|
-
export * from "./components/chart-time-series";
|
|
34
|
-
export * from "./components/checkbox";
|
|
35
|
-
export * from "./components/code-editor-mockup";
|
|
36
|
-
export * from "./components/collapsible";
|
|
37
|
-
export * from "./components/combobox";
|
|
38
|
-
export * from "./components/command";
|
|
39
|
-
export * from "./components/confirm-dialog";
|
|
40
|
-
export * from "./components/contact";
|
|
41
|
-
export * from "./components/context-menu";
|
|
42
|
-
export * from "./components/dashboard-shell";
|
|
43
|
-
export * from "./components/desktop-shell";
|
|
44
|
-
export * from "./components/dialog";
|
|
45
|
-
export * from "./components/diff-count";
|
|
46
|
-
export * from "./components/direction";
|
|
47
|
-
export * from "./components/disclosure-row";
|
|
48
|
-
export * from "./components/drawer";
|
|
49
|
-
export * from "./components/dropdown-menu";
|
|
50
|
-
export * from "./components/empty";
|
|
51
|
-
export * from "./components/expandable-block";
|
|
52
|
-
export * from "./components/fact-cell";
|
|
53
|
-
export * from "./components/faq";
|
|
54
|
-
export * from "./components/faq-item";
|
|
55
|
-
export * from "./components/feature-grid";
|
|
56
|
-
export * from "./components/feature-rows";
|
|
57
|
-
export * from "./components/feedback-state";
|
|
58
|
-
export * from "./components/field";
|
|
59
|
-
export * from "./components/file-type-icon";
|
|
60
|
-
export * from "./components/footer";
|
|
61
|
-
export * from "./components/form";
|
|
62
|
-
export * from "./components/glyph-spinner";
|
|
63
|
-
export * from "./components/glass-control";
|
|
64
|
-
export * from "./components/handoff-banner";
|
|
65
|
-
export * from "./components/hero";
|
|
66
|
-
export * from "./components/hero-split";
|
|
67
|
-
export * from "./components/hover-card";
|
|
68
|
-
export * from "./components/input";
|
|
69
|
-
export * from "./components/input-group";
|
|
70
|
-
export * from "./components/input-otp";
|
|
71
|
-
export * from "./components/installer-shell";
|
|
72
|
-
export * from "./components/integration-flow";
|
|
73
|
-
export * from "./components/item";
|
|
74
|
-
export * from "./components/kbd";
|
|
75
|
-
export * from "./components/label";
|
|
76
|
-
export * from "./components/label-system";
|
|
77
|
-
export * from "./components/live-demo";
|
|
78
|
-
export * from "./components/logo-band";
|
|
79
|
-
export * from "./components/logo-tile";
|
|
80
|
-
export * from "./components/media-mount";
|
|
81
|
-
export * from "./components/memory-item";
|
|
82
|
-
export * from "./components/menubar";
|
|
83
|
-
export * from "./components/native-select";
|
|
84
|
-
export * from "./components/nav-bar";
|
|
85
|
-
export * from "./components/navigation-menu";
|
|
86
|
-
export * from "./components/newsletter";
|
|
87
|
-
export * from "./components/page-frame";
|
|
88
|
-
export * from "./components/pagination";
|
|
89
|
-
export * from "./components/plugin-slot-boundary";
|
|
90
|
-
export * from "./components/popover";
|
|
91
|
-
export * from "./components/pricing";
|
|
92
|
-
export * from "./components/pricing-card";
|
|
93
|
-
export * from "./components/progress";
|
|
94
|
-
export * from "./components/proof-slot";
|
|
95
|
-
export * from "./components/quote-card";
|
|
96
|
-
export * from "./components/radio-group";
|
|
97
|
-
export * from "./components/resizable";
|
|
98
|
-
export * from "./components/run-timeline";
|
|
99
|
-
export * from "./components/scroll-area";
|
|
100
|
-
export * from "./components/seam-grid";
|
|
101
|
-
export * from "./components/section-intro";
|
|
102
|
-
export * from "./components/security-grid";
|
|
103
|
-
export * from "./components/select";
|
|
104
|
-
export * from "./components/separator";
|
|
105
|
-
export * from "./components/settings-section";
|
|
106
|
-
export * from "./components/sheet";
|
|
107
|
-
export * from "./components/shift-band";
|
|
108
|
-
export * from "./components/sidebar";
|
|
109
|
-
export * from "./components/skeleton";
|
|
110
|
-
export * from "./components/slider";
|
|
111
|
-
export * from "./components/sonner";
|
|
112
|
-
export * from "./components/spinner";
|
|
113
|
-
export * from "./components/stat-block";
|
|
114
|
-
export * from "./components/statement";
|
|
115
|
-
export * from "./components/stats-band";
|
|
116
|
-
export * from "./components/status-dot";
|
|
117
|
-
export * from "./components/status-row";
|
|
118
|
-
export * from "./components/steps";
|
|
119
|
-
export * from "./components/switch";
|
|
120
|
-
export * from "./components/table";
|
|
121
|
-
export * from "./components/tabs";
|
|
122
|
-
export * from "./components/team-grid";
|
|
123
|
-
export * from "./components/testimonials";
|
|
124
|
-
export * from "./components/textarea";
|
|
125
|
-
export * from "./components/texture-strip";
|
|
126
|
-
export * from "./components/theme-mode-switcher";
|
|
127
|
-
export * from "./components/toggle";
|
|
128
|
-
export * from "./components/toggle-group";
|
|
129
|
-
export * from "./components/tool-icon";
|
|
130
|
-
export * from "./components/tooltip";
|
|
131
|
-
export * from "./components/usage-meter";
|
|
132
|
-
export * from "./components/use-case-bento";
|
|
1
|
+
export * from "./components/accordion.js";
|
|
2
|
+
export * from "./components/action-band.js";
|
|
3
|
+
export * from "./components/action-status.js";
|
|
4
|
+
export * from "./components/alert.js";
|
|
5
|
+
export * from "./components/alert-dialog.js";
|
|
6
|
+
export * from "./components/agent-card.js";
|
|
7
|
+
export * from "./components/agent-visual.js";
|
|
8
|
+
export * from "./components/aspect-ratio.js";
|
|
9
|
+
export * from "./components/automation-section.js";
|
|
10
|
+
export * from "./components/avatar.js";
|
|
11
|
+
export * from "./components/badge.js";
|
|
12
|
+
export * from "./components/benefits-bento.js";
|
|
13
|
+
export * from "./components/bento.js";
|
|
14
|
+
export * from "./components/brand.js";
|
|
15
|
+
export * from "./components/brand-field.js";
|
|
16
|
+
export * from "./components/brand-icons.js";
|
|
17
|
+
export * from "./components/breadcrumb.js";
|
|
18
|
+
export * from "./components/button.js";
|
|
19
|
+
export * from "./components/button-group.js";
|
|
20
|
+
export * from "./components/calendar.js";
|
|
21
|
+
export * from "./components/card.js";
|
|
22
|
+
export * from "./components/card-marketing.js";
|
|
23
|
+
export * from "./components/carousel.js";
|
|
24
|
+
export * from "./components/chart.js";
|
|
25
|
+
export * from "./components/chart-breakdown-table.js";
|
|
26
|
+
export * from "./components/chart-bullet-bar.js";
|
|
27
|
+
export * from "./components/chart-date-range.js";
|
|
28
|
+
export * from "./components/chart-date-range-control.js";
|
|
29
|
+
export * from "./components/chart-delta.js";
|
|
30
|
+
export * from "./components/chart-entity-colors.js";
|
|
31
|
+
export * from "./components/chart-kpi-stat.js";
|
|
32
|
+
export * from "./components/chart-sparkline.js";
|
|
33
|
+
export * from "./components/chart-time-series.js";
|
|
34
|
+
export * from "./components/checkbox.js";
|
|
35
|
+
export * from "./components/code-editor-mockup.js";
|
|
36
|
+
export * from "./components/collapsible.js";
|
|
37
|
+
export * from "./components/combobox.js";
|
|
38
|
+
export * from "./components/command.js";
|
|
39
|
+
export * from "./components/confirm-dialog.js";
|
|
40
|
+
export * from "./components/contact.js";
|
|
41
|
+
export * from "./components/context-menu.js";
|
|
42
|
+
export * from "./components/dashboard-shell.js";
|
|
43
|
+
export * from "./components/desktop-shell.js";
|
|
44
|
+
export * from "./components/dialog.js";
|
|
45
|
+
export * from "./components/diff-count.js";
|
|
46
|
+
export * from "./components/direction.js";
|
|
47
|
+
export * from "./components/disclosure-row.js";
|
|
48
|
+
export * from "./components/drawer.js";
|
|
49
|
+
export * from "./components/dropdown-menu.js";
|
|
50
|
+
export * from "./components/empty.js";
|
|
51
|
+
export * from "./components/expandable-block.js";
|
|
52
|
+
export * from "./components/fact-cell.js";
|
|
53
|
+
export * from "./components/faq.js";
|
|
54
|
+
export * from "./components/faq-item.js";
|
|
55
|
+
export * from "./components/feature-grid.js";
|
|
56
|
+
export * from "./components/feature-rows.js";
|
|
57
|
+
export * from "./components/feedback-state.js";
|
|
58
|
+
export * from "./components/field.js";
|
|
59
|
+
export * from "./components/file-type-icon.js";
|
|
60
|
+
export * from "./components/footer.js";
|
|
61
|
+
export * from "./components/form.js";
|
|
62
|
+
export * from "./components/glyph-spinner.js";
|
|
63
|
+
export * from "./components/glass-control.js";
|
|
64
|
+
export * from "./components/handoff-banner.js";
|
|
65
|
+
export * from "./components/hero.js";
|
|
66
|
+
export * from "./components/hero-split.js";
|
|
67
|
+
export * from "./components/hover-card.js";
|
|
68
|
+
export * from "./components/input.js";
|
|
69
|
+
export * from "./components/input-group.js";
|
|
70
|
+
export * from "./components/input-otp.js";
|
|
71
|
+
export * from "./components/installer-shell.js";
|
|
72
|
+
export * from "./components/integration-flow.js";
|
|
73
|
+
export * from "./components/item.js";
|
|
74
|
+
export * from "./components/kbd.js";
|
|
75
|
+
export * from "./components/label.js";
|
|
76
|
+
export * from "./components/label-system.js";
|
|
77
|
+
export * from "./components/live-demo.js";
|
|
78
|
+
export * from "./components/logo-band.js";
|
|
79
|
+
export * from "./components/logo-tile.js";
|
|
80
|
+
export * from "./components/media-mount.js";
|
|
81
|
+
export * from "./components/memory-item.js";
|
|
82
|
+
export * from "./components/menubar.js";
|
|
83
|
+
export * from "./components/native-select.js";
|
|
84
|
+
export * from "./components/nav-bar.js";
|
|
85
|
+
export * from "./components/navigation-menu.js";
|
|
86
|
+
export * from "./components/newsletter.js";
|
|
87
|
+
export * from "./components/page-frame.js";
|
|
88
|
+
export * from "./components/pagination.js";
|
|
89
|
+
export * from "./components/plugin-slot-boundary.js";
|
|
90
|
+
export * from "./components/popover.js";
|
|
91
|
+
export * from "./components/pricing.js";
|
|
92
|
+
export * from "./components/pricing-card.js";
|
|
93
|
+
export * from "./components/progress.js";
|
|
94
|
+
export * from "./components/proof-slot.js";
|
|
95
|
+
export * from "./components/quote-card.js";
|
|
96
|
+
export * from "./components/radio-group.js";
|
|
97
|
+
export * from "./components/resizable.js";
|
|
98
|
+
export * from "./components/run-timeline.js";
|
|
99
|
+
export * from "./components/scroll-area.js";
|
|
100
|
+
export * from "./components/seam-grid.js";
|
|
101
|
+
export * from "./components/section-intro.js";
|
|
102
|
+
export * from "./components/security-grid.js";
|
|
103
|
+
export * from "./components/select.js";
|
|
104
|
+
export * from "./components/separator.js";
|
|
105
|
+
export * from "./components/settings-section.js";
|
|
106
|
+
export * from "./components/sheet.js";
|
|
107
|
+
export * from "./components/shift-band.js";
|
|
108
|
+
export * from "./components/sidebar.js";
|
|
109
|
+
export * from "./components/skeleton.js";
|
|
110
|
+
export * from "./components/slider.js";
|
|
111
|
+
export * from "./components/sonner.js";
|
|
112
|
+
export * from "./components/spinner.js";
|
|
113
|
+
export * from "./components/stat-block.js";
|
|
114
|
+
export * from "./components/statement.js";
|
|
115
|
+
export * from "./components/stats-band.js";
|
|
116
|
+
export * from "./components/status-dot.js";
|
|
117
|
+
export * from "./components/status-row.js";
|
|
118
|
+
export * from "./components/steps.js";
|
|
119
|
+
export * from "./components/switch.js";
|
|
120
|
+
export * from "./components/table.js";
|
|
121
|
+
export * from "./components/tabs.js";
|
|
122
|
+
export * from "./components/team-grid.js";
|
|
123
|
+
export * from "./components/testimonials.js";
|
|
124
|
+
export * from "./components/textarea.js";
|
|
125
|
+
export * from "./components/texture-strip.js";
|
|
126
|
+
export * from "./components/theme-mode-switcher.js";
|
|
127
|
+
export * from "./components/toggle.js";
|
|
128
|
+
export * from "./components/toggle-group.js";
|
|
129
|
+
export * from "./components/tool-icon.js";
|
|
130
|
+
export * from "./components/tooltip.js";
|
|
131
|
+
export * from "./components/usage-meter.js";
|
|
132
|
+
export * from "./components/use-case-bento.js";
|
|
133
133
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -77,7 +77,7 @@ const AttachmentUI = () => {
|
|
|
77
77
|
const errorMessage = useAuiState((s) => s.attachment.status.type === "incomplete" && s.attachment.status.reason === "error"
|
|
78
78
|
? (s.attachment.status.message ?? "Upload failed")
|
|
79
79
|
: undefined);
|
|
80
|
-
return (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsxs(AttachmentPrimitive.Root, { className: cn("aui-attachment-root relative", isComposer && "nc-transition-opacity", isImage && !isComposer && "aui-attachment-root-message only:*:first:size-24"), children: [_jsx(AttachmentPreviewDialog, { children: _jsxs(TooltipTrigger, { render: _jsx("div", { className: cn("aui-attachment-tile nc-transition-transform relative size-14 cursor-pointer overflow-hidden rounded-[calc(var(--composer-radius)-var(--composer-padding))] bg-muted
|
|
80
|
+
return (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsxs(AttachmentPrimitive.Root, { className: cn("aui-attachment-root relative", isComposer && "nc-transition-opacity", isImage && !isComposer && "aui-attachment-root-message only:*:first:size-24"), children: [_jsx(AttachmentPreviewDialog, { children: _jsxs(TooltipTrigger, { render: _jsx("div", { className: cn("aui-attachment-tile nc-transition-transform relative size-14 cursor-pointer overflow-hidden rounded-[calc(var(--composer-radius)-var(--composer-padding))] bg-muted after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:ring-1 after:ring-border after:ring-inset hover:after:bg-foreground/10", isError && "after:ring-destructive/60"), role: "button", tabIndex: 0, "aria-label": `${typeLabel} attachment${isError ? ", upload failed" : isUploading ? ", uploading" : ""}` }), children: [_jsx(AttachmentThumb, {}), isUploading && (_jsx("div", { "aria-hidden": "true", className: "aui-attachment-tile-uploading nc-transition-opacity absolute inset-0 flex items-center justify-center bg-background/60 backdrop-blur-[2px]", children: _jsx(Loader2Icon, { className: "size-4 text-muted-foreground motion-safe:animate-spin motion-reduce:animate-pulse" }) })), isError && (_jsx("div", { "aria-hidden": "true", className: "aui-attachment-tile-error nc-transition-opacity absolute inset-0 flex items-center justify-center bg-background/70 backdrop-blur-[2px]", children: _jsx(AlertCircleIcon, { className: "text-destructive size-4" }) }))] }) }), isComposer && _jsx(AttachmentRemove, {})] }), _jsxs(TooltipContent, { side: "top", children: [_jsx(AttachmentPrimitive.Name, {}), errorMessage && _jsx("p", { className: "aui-attachment-error-message", children: errorMessage })] })] }) }));
|
|
81
81
|
};
|
|
82
82
|
const AttachmentRemove = () => {
|
|
83
83
|
return (_jsx(AttachmentPrimitive.Remove, { render: _jsx(TooltipIconButton, { tooltip: "Remove file", className: "aui-attachment-tile-remove absolute end-1 top-1 size-5 rounded-full bg-foreground/70! text-background! backdrop-blur-sm after:absolute after:-inset-1.5 hover:bg-foreground/85!", side: "top" }), children: _jsx(XIcon, { className: "aui-attachment-remove-icon size-3 stroke-[2.5]" }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"follow-up-suggestions.d.ts","sourceRoot":"","sources":["../../../src/internal/assistant-ui/follow-up-suggestions.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"follow-up-suggestions.d.ts","sourceRoot":"","sources":["../../../src/internal/assistant-ui/follow-up-suggestions.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AA2BhC,eAAO,MAAM,yBAAyB,EAAE,EAMvC,CAAC"}
|
|
@@ -3,6 +3,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { AuiIf, ThreadPrimitive, useAuiState } from "@assistant-ui/react";
|
|
4
4
|
const FollowupSuggestionsRow = () => {
|
|
5
5
|
const suggestions = useAuiState((s) => s.thread.suggestions);
|
|
6
|
-
return (_jsx("div", { className: "aui-thread-followup-suggestions -my-1 w-full overflow-x-auto py-1 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: _jsx("div", { className: "mx-auto flex min-h-8 w-max items-center gap-2 px-0.5", children: suggestions.map((suggestion, index) => (_jsx(ThreadPrimitive.Suggestion, { className: "aui-thread-followup-suggestion nc-transition-paint rounded-full border bg-background px-3 py-1 text-sm whitespace-nowrap hover:bg-muted/80", prompt: suggestion.prompt,
|
|
6
|
+
return (_jsx("div", { className: "aui-thread-followup-suggestions -my-1 w-full overflow-x-auto py-1 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: _jsx("div", { className: "mx-auto flex min-h-8 w-max items-center gap-2 px-0.5", children: suggestions.map((suggestion, index) => (_jsx(ThreadPrimitive.Suggestion, { className: "aui-thread-followup-suggestion nc-transition-paint rounded-full border bg-background px-3 py-1 text-sm whitespace-nowrap hover:bg-muted/80", prompt: suggestion.prompt,
|
|
7
|
+
// `method="replace"` + `autoSend` under their current names: the
|
|
8
|
+
// library renamed them to `clearComposer` + `send` and deprecated
|
|
9
|
+
// the old pair, with the same behaviour behind both.
|
|
10
|
+
send: true, clearComposer: true, children: suggestion.prompt }, index))) }) }));
|
|
7
11
|
};
|
|
8
12
|
export const ThreadFollowupSuggestions = () => (_jsx(AuiIf, { condition: (s) => !s.thread.isEmpty && !s.thread.isRunning && s.thread.suggestions.length > 0, children: _jsx(FollowupSuggestionsRow, {}) }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import { type ReasoningMessagePartComponent } from "@assistant-ui/react";
|
|
3
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../components/collapsible";
|
|
3
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../components/collapsible.js";
|
|
4
4
|
declare const reasoningVariants: (props?: ({
|
|
5
5
|
variant?: "outline" | "ghost" | "muted" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ToolCallMessagePartComponent } from "@assistant-ui/react";
|
|
2
|
-
import { Collapsible } from "../../components/collapsible";
|
|
2
|
+
import { Collapsible } from "../../components/collapsible.js";
|
|
3
3
|
export type ToolFallbackRootProps = Omit<React.ComponentProps<typeof Collapsible>, "open" | "onOpenChange"> & {
|
|
4
4
|
open?: boolean;
|
|
5
5
|
onOpenChange?: (open: boolean) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../components/collapsible";
|
|
2
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../components/collapsible.js";
|
|
3
3
|
declare const toolGroupVariants: (props?: ({
|
|
4
4
|
variant?: "outline" | "ghost" | "muted" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComponentPropsWithRef } from "react";
|
|
2
|
-
import { Button } from "../../components/button";
|
|
2
|
+
import { Button } from "../../components/button.js";
|
|
3
3
|
export type TooltipIconButtonProps = ComponentPropsWithRef<typeof Button> & {
|
|
4
4
|
tooltip: string;
|
|
5
5
|
side?: "top" | "bottom" | "left" | "right";
|
package/dist/styles/globals.css
CHANGED
|
@@ -42,6 +42,25 @@
|
|
|
42
42
|
@apply bg-background text-foreground;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
/*
|
|
46
|
+
* Keyboard focus has one owner. Every :focus-visible element takes the
|
|
47
|
+
* canonical offset ink outline (DESIGN.md "Focus ring"); components never
|
|
48
|
+
* repaint focus with their own ring, hue, or width. An invalid control
|
|
49
|
+
* carries the same geometry in the destructive hue, declared after focus so
|
|
50
|
+
* invalid wins when both apply. Intentional suppression stays a per-site
|
|
51
|
+
* utility (outline-hidden on highlight-driven menu items, outline-none on a
|
|
52
|
+
* control whose group proxies its focus).
|
|
53
|
+
*/
|
|
54
|
+
:focus-visible {
|
|
55
|
+
outline: var(--nc-focus-outline-width) solid var(--ring);
|
|
56
|
+
outline-offset: var(--nc-focus-outline-offset);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
[aria-invalid="true"] {
|
|
60
|
+
outline: var(--nc-focus-outline-width) solid var(--destructive);
|
|
61
|
+
outline-offset: var(--nc-focus-outline-offset);
|
|
62
|
+
}
|
|
63
|
+
|
|
45
64
|
/*
|
|
46
65
|
* lucide-react supplies glyph geometry; the shared house render owns only
|
|
47
66
|
* presentation. Keep this in the package stylesheet so every React consumer
|
|
@@ -54,23 +73,29 @@
|
|
|
54
73
|
}
|
|
55
74
|
}
|
|
56
75
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
76
|
+
/*
|
|
77
|
+
* The one glass material (DESIGN.md "Elevation & Depth"): floating chrome —
|
|
78
|
+
* menus, popovers, selects, comboboxes, the command palette, and bars — may
|
|
79
|
+
* carry it; content surfaces stay solid. Glass composites only over our own
|
|
80
|
+
* content, and its elevation falloff's edge ring stays its one separator.
|
|
81
|
+
* Declared as a utility so variant prefixes can gate it (navigation-menu's
|
|
82
|
+
* non-viewport popup). Reduced transparency falls back to the same solid
|
|
83
|
+
* surface at the same elevation.
|
|
84
|
+
*/
|
|
85
|
+
@utility nc-glass {
|
|
86
|
+
background: color-mix(in srgb, var(--popover) var(--nc-material-glass-opacity), transparent);
|
|
87
|
+
backdrop-filter: blur(var(--nc-material-glass-blur)) saturate(var(--nc-material-glass-saturation));
|
|
88
|
+
|
|
89
|
+
@media (prefers-reduced-transparency: reduce) {
|
|
90
|
+
background: var(--popover);
|
|
91
|
+
backdrop-filter: none;
|
|
62
92
|
}
|
|
93
|
+
}
|
|
63
94
|
|
|
95
|
+
@layer components {
|
|
64
96
|
.nc-toast {
|
|
65
97
|
border: 0 !important;
|
|
66
98
|
}
|
|
67
|
-
|
|
68
|
-
@media (prefers-reduced-transparency: reduce) {
|
|
69
|
-
.nc-glass-control {
|
|
70
|
-
background: var(--popover);
|
|
71
|
-
backdrop-filter: none;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
99
|
}
|
|
75
100
|
|
|
76
101
|
/*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Consuming `@nadicodeai/ui` Cross-Repo
|
|
2
2
|
|
|
3
|
-
This is the contract for an external repo —
|
|
3
|
+
This is the contract for an external repo — the Nadia repo, sibling Nadia web,
|
|
4
4
|
desktop, or any consumer outside this monorepo — installing `@nadicodeai/ui`
|
|
5
5
|
from published npm rather than the workspace source.
|
|
6
6
|
|
|
@@ -97,7 +97,7 @@ Use `BrandMark` where space is tight and `BrandWordmark` where the name must rea
|
|
|
97
97
|
by itself. Do not assemble a new lockup from those two components. Static
|
|
98
98
|
consumers that need files instead of React declare the design-system dependency
|
|
99
99
|
directly and use the documented SVG or PNG package routes in
|
|
100
|
-
`design-system/README.md`.
|
|
100
|
+
`packages/design-system/README.md`.
|
|
101
101
|
|
|
102
102
|
## Base UI API breaks (migrating from Radix-era components)
|
|
103
103
|
|
package/docs/contract.md
CHANGED
|
@@ -4,10 +4,10 @@ The normative invariants for the `@nadicodeai/ui` package: what may live here, h
|
|
|
4
4
|
|
|
5
5
|
## Styling Invariants
|
|
6
6
|
|
|
7
|
-
- **Token-only, no raw literals or shadow aliases.** Components style through semantic shadcn utilities (`bg-background`, `text-foreground`, `border-input`, and the rest), or a canonical generated design-system token when no standard role is precise enough. The UI package does not mint screen-, component-, or product-specific color aliases. No raw `#hex` / `rgb()` / `hsl()` may appear in `.tsx`; a new source value goes to `design-system/DESIGN.md` first and flows through generated output. A narrow protocol adapter may translate third-party classes directly to canonical tokens in `globals.css`, but it must not create another token vocabulary. Enforced by
|
|
8
|
-
- **Dark-ready semantics, no component dark implementation.** Components use the same semantic role or canonical mode-aware token in every mode. They must not ship Tailwind `dark:` color utilities, component-local `.dark` blocks, OS dark-mode branching, or raw dark palette utilities such as `dark:bg-slate-950` and `dark:text-white`. An intentionally fixed-presentation technology surface, such as the dark terminal console, selects canonical fixed-mode tokens as one coherent component treatment rather than branching by app theme. Enforced by
|
|
7
|
+
- **Token-only, no raw literals or shadow aliases.** Components style through semantic shadcn utilities (`bg-background`, `text-foreground`, `border-input`, and the rest), or a canonical generated design-system token when no standard role is precise enough. The UI package does not mint screen-, component-, or product-specific color aliases. No raw `#hex` / `rgb()` / `hsl()` may appear in `.tsx`; a new source value goes to `packages/design-system/DESIGN.md` first and flows through generated output. A narrow protocol adapter may translate third-party classes directly to canonical tokens in `globals.css`, but it must not create another token vocabulary. Enforced by the raw-colour `no-restricted-syntax` selectors in the library ESLint config, `packages/ui/tests/guards/dark-semantic-roles.test.ts`, and `packages/ui/tests/guards/token-reference-integrity.test.ts`.
|
|
8
|
+
- **Dark-ready semantics, no component dark implementation.** Components use the same semantic role or canonical mode-aware token in every mode. They must not ship Tailwind `dark:` color utilities, component-local `.dark` blocks, OS dark-mode branching, or raw dark palette utilities such as `dark:bg-slate-950` and `dark:text-white`. An intentionally fixed-presentation technology surface, such as the dark terminal console, selects canonical fixed-mode tokens as one coherent component treatment rather than branching by app theme. Enforced by `packages/ui/tests/guards/no-dark.test.ts`, `packages/ui/tests/guards/dark-semantic-roles.test.ts`, and `packages/ui/tests/guards/token-reference-integrity.test.ts`. The generated mode and theme architecture lives only in [`packages/design-system/DESIGN.md`](../../design-system/DESIGN.md#css-architecture--token-pipeline).
|
|
9
9
|
- **Components inherit one complete React style interface.** `@nadicodeai/ui/globals.css` composes every style dependency owned by this package, including the complete design-system CSS module. Components carry no theme of their own, and React callers do not compose design-system stylesheets or partials beside it. Installation and source-scanning setup live in the [consumer setup guide](consuming-cross-repo.md).
|
|
10
|
-
- **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 (doctrine home: `design-system/DESIGN.md` "## Layout").
|
|
10
|
+
- **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 (doctrine home: `packages/design-system/DESIGN.md` "## Layout").
|
|
11
11
|
|
|
12
12
|
### Material surfaces
|
|
13
13
|
|
|
@@ -30,20 +30,38 @@ Physical role, not content importance, chooses depth:
|
|
|
30
30
|
`smooth-shadow-ring-2xl` internally.
|
|
31
31
|
|
|
32
32
|
All solid surfaces use the one semantic fill. Dark mode therefore stays true
|
|
33
|
-
black; depth never comes from progressively greyer cards.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
black; depth never comes from progressively greyer cards.
|
|
34
|
+
|
|
35
|
+
Keyboard focus has one owner: the `globals.css` base layer draws the offset
|
|
36
|
+
ink outline on every `:focus-visible` element, and an invalid control takes
|
|
37
|
+
the same geometry in the destructive hue. A component never repaints focus
|
|
38
|
+
with a box-shadow ring, a raw width, or its own hue
|
|
39
|
+
(`nadicodeai/no-repainted-focus` enforces this). A component may only
|
|
40
|
+
suppress the outline where a proxy target carries it (`InputGroup` shows the
|
|
41
|
+
indicator for its inner control; the OTP active slot for its hidden input) or
|
|
42
|
+
where a highlight ground replaces it (menu and command items).
|
|
43
|
+
|
|
44
|
+
`nc-glass` is the one glass material, and glass is floating chrome: menu,
|
|
45
|
+
popover, select, combobox, and navigation-menu popups, the command palette,
|
|
46
|
+
and `GlassControl` bars carry it over our own content. Content surfaces stay
|
|
47
|
+
solid: cards, KPIs, tables, inspectors, and dialog, sheet, and drawer bodies.
|
|
48
|
+
Glass keeps exactly one separator, the elevation falloff's integrated edge
|
|
49
|
+
ring. Reduced transparency falls back to the same solid floating surface.
|
|
50
|
+
`GlassControl` remains the control-chrome form, using `shape="control"` for
|
|
51
|
+
compact floating controls and `shape="bar"` for full-width header chrome.
|
|
42
52
|
|
|
43
53
|
`Empty` makes containment explicit with `scope="page" | "region" | "card"`.
|
|
44
54
|
Page and region states own one opaque dashed boundary. A Card-scoped Empty is
|
|
45
55
|
transparent and unframed because the Card already owns containment.
|
|
46
56
|
|
|
57
|
+
### Tables
|
|
58
|
+
|
|
59
|
+
`Table` owns the native table structure, solid semantic background, horizontal
|
|
60
|
+
overflow, and one compact density: 36px header rows and 40px body rows. Consumers
|
|
61
|
+
compose `TableHeader`, `TableBody`, `TableRow`, `TableHead`, and `TableCell`; they
|
|
62
|
+
do not replace table layout with grid or flex, hide the header to create another
|
|
63
|
+
presentation, or reconstruct the native semantics with ARIA.
|
|
64
|
+
|
|
47
65
|
## Status Vocabulary
|
|
48
66
|
|
|
49
67
|
`Badge` is the product's only status carrier. It ships five semantic tone
|
|
@@ -55,14 +73,14 @@ a status clears AA in both modes without a call site painting anything. A status
|
|
|
55
73
|
badge carries a mark in the existing icon slot beside its word, because colour
|
|
56
74
|
must never be the only thing that says what the status is; the mark is
|
|
57
75
|
`aria-hidden`, and the word is the accessible status. The tones are variants,
|
|
58
|
-
not utilities, precisely so `nadicodeai/no-shadcn-appearance-override`
|
|
59
|
-
|
|
76
|
+
not utilities, precisely so `nadicodeai/no-shadcn-appearance-override` can keep
|
|
77
|
+
them here.
|
|
60
78
|
|
|
61
79
|
What this package does not own: which statuses exist, which tone and which mark
|
|
62
80
|
each value takes, and the words. Those are the consuming app's domain — the
|
|
63
81
|
Portal maps them in one kit module and nothing else picks a status colour. The
|
|
64
82
|
design-system side of the decision, and why the retired CSS status grammars are
|
|
65
|
-
gone, is [`design-system/DESIGN.md`, "## Status Vocabulary"](
|
|
83
|
+
gone, is [`packages/design-system/DESIGN.md`, "## Status Vocabulary"](../../design-system/DESIGN.md#status-vocabulary).
|
|
66
84
|
|
|
67
85
|
## Package Shape Invariants
|
|
68
86
|
|
|
@@ -71,7 +89,7 @@ gone, is [`design-system/DESIGN.md`, "## Status Vocabulary"](../../../design-sys
|
|
|
71
89
|
- **Agents is the client-only conversation interface.** `@nadicodeai/ui/agents` re-exports the complete `@assistant-ui/react` runtime and primitive API plus the reviewed, branded registry composition held under `src/internal/assistant-ui/`. Its built entry retains `"use client"`. Consumers receive Thread, attachments, Markdown, reasoning, tools, suggestions, providers, runtimes, hooks, and types from that one domain namespace. Agent identity components use their direct component subpaths so server compositions do not import the conversation runtime. The vendor name is not a public NadicodeAI subpath, and the package does not rename, wrap, or rebuild assistant-ui behavior.
|
|
72
90
|
- **Base UI is the active primitive base.** `components.json` must resolve through a Base style, currently `base-nova`, and `npx shadcn@latest info --json` must report `base: "base"`. Do not reintroduce `radix-ui`, `@radix-ui/*`, or `vaul` to package source, dependencies, or app optimizer configuration. Registry-owned shadcn primitives stay aligned with current `shadcn@latest` Base UI output; use Base UI `render` composition instead of Radix `asChild`. `cmdk` is allowed only for the stock shadcn Command component while the current `base-nova` registry declares that dependency; do not use it elsewhere or replace it without a shadcn/compatibility decision and tests.
|
|
73
91
|
- **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.
|
|
74
|
-
- **Public surface changes require a release decision.** Any change to exported components, `src/index.ts`, package `exports`, `globals.css`, 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: bump the relevant version(s) and run `npm pack --dry-run -w @nadicodeai/ui` per `../../../docs/
|
|
92
|
+
- **Public surface changes require a release decision.** Any change to exported components, `src/index.ts`, package `exports`, `globals.css`, 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: bump the relevant version(s) and run `npm pack --dry-run -w @nadicodeai/ui` per `../../../docs/agents/npm-publishing.md`, or include a `[no-publish]` commit marker with the reason in the commit body. The pre-push gate requires one of the two. When the UI change depends on modified `@nadicodeai/design-system` output, bump and publish `@nadicodeai/design-system` first, then update this package's dependency and publish UI. Never claim a UI package change is shipped until `npm view @nadicodeai/ui version` reports the intended version.
|
|
75
93
|
|
|
76
94
|
## Admission Rules
|
|
77
95
|
|
|
@@ -100,11 +118,11 @@ that page's `h1`.
|
|
|
100
118
|
There is no `AgentGlyph`, `AgentRow`, `KpiCard`, or product-domain `agent`
|
|
101
119
|
object prop in the shared package.
|
|
102
120
|
|
|
103
|
-
- **Standard components, not app-owned product features.** This package ships primitives, standard UI components, assistant-ui compositions, brand adapters, React adapters, reusable sections, and presentational product components. It must not ship app-specific feature/use-case screens or names such as operator-login, portal activation, customer credential control, or customer management. Generic data tables, command palettes, and chart cards are app-owned shadcn registry adaptations. The source-backed `chart-*` package surface is the plan-approved exception per issue #166
|
|
121
|
+
- **Standard components, not app-owned product features.** This package ships primitives, standard UI components, assistant-ui compositions, brand adapters, React adapters, reusable sections, and presentational product components. It must not ship app-specific feature/use-case screens or names such as operator-login, portal activation, customer credential control, or customer management. Generic data tables, command palettes, and chart cards are app-owned shadcn registry adaptations. The source-backed `chart-*` package surface is the plan-approved exception per issue #166; chart cards remain app-owned. Every data-shaped chart exposes an equivalent non-visual data alternative. A component whose complete value is already available in visible text or `aria-valuetext` does not add a redundant table.
|
|
104
122
|
- **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.
|
|
105
123
|
- **Reusable sections and compositions live here after proof.** Bento grids, media mounts, demo surfaces, page frames, section intros, CTA bands, proof slots, benefits grids, generic shells, and homepage/use-case sections belong in `@nadicodeai/ui` when a second concrete consumer, a plan-approved shared component, or a named validation slice proves the package boundary. Website, portal, and sibling Nadia routes pass data and media children into existing compositions instead of rebuilding layout locally.
|
|
106
|
-
- **Brand renderers live here for React consumers.** Logo geometry, asset generation, and usage semantics are owned by [`design-system/DESIGN.md`, "Brand media authority"](
|
|
107
|
-
- **Third-party brand marks are generated, never hand-drawn and never hand-edited.** Other companies' marks live in
|
|
124
|
+
- **Brand renderers live here for React consumers.** Logo geometry, asset generation, and usage semantics are owned by [`packages/design-system/DESIGN.md`, "Brand media authority"](../../design-system/DESIGN.md#brand-media-authority). `BrandLockup` supplies the approved horizontal lockup. `BrandMark` serves tight spaces and `BrandWordmark` serves placements where the name must read by itself. All three render the package's public neutral geometry seam with React-scoped SVG ids, dynamic theme paint, and accessible names. Consuming routes use these adapters; they never import raw logo assets, draw brand SVG inline, mask or recolor assets, or create another lockup rule.
|
|
125
|
+
- **Third-party brand marks are generated, never hand-drawn and never hand-edited.** Other companies' marks live in `packages/ui/src/components/brand-icons/`, emitted from an explicit allow-list by `packages/ui/scripts/build-brand-icons.mjs` and exported through the `@nadicodeai/ui/components/brand-icons` subpath. They are identity images, not UI icons: a brand mark is exempt from the currentColor stroke system and from the raw-literal rule, it never stands in for a UI icon, and a UI icon never stands in for a brand. Marks drawn as one silhouette are stripped to `currentColor` by the generator; every other mark keeps its official colors verbatim. To add a brand, edit the generator's allow-list and run `npm run generate:brand-icons -w @nadicodeai/ui`; hand edits to the generated directory are lost and `packages/ui/tests/guards/brand-icons-codegen.test.ts` fails on them. Use is nominative only — naming a platform, an integration, or a provider — never adjacent to endorsement or partnership wording; that nominative posture is the licensing and trademark position, so a mark never appears where the copy implies endorsement.
|
|
108
126
|
- **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.
|
|
109
127
|
|
|
110
128
|
## Accessibility Invariant
|
|
@@ -119,7 +137,7 @@ The source tree, barrels, and package exports own the current reusable section v
|
|
|
119
137
|
|
|
120
138
|
Consumers own routing, auth, app data, server actions, runtime construction and adapters, permission decisions, analytics, and app-specific copy. The package owns reusable React presentation and the public Agent UI dependency boundary. Agent state and behavior come through the Agents interface; non-React and TUI contracts belong to their consuming products.
|
|
121
139
|
|
|
122
|
-
App source composes layout, data, behavior, and semantic content around package components. It does not restyle an imported component root: appearance changes enter through the component's typed variant or are added to the owning package component. App `className` values on package components are limited to structural layout and sizing. App source uses semantic roles such as `bg-background` and `text-foreground`;
|
|
140
|
+
App source composes layout, data, behavior, and semantic content around package components. It does not restyle an imported component root: appearance changes enter through the component's typed variant or are added to the owning package component. App `className` values on package components are limited to structural layout and sizing. App source uses semantic roles such as `bg-background` and `text-foreground`; canonical `nc-*` color utilities stay behind package-owned primitives such as `BrandField`. Raw Tailwind palette colors are not available to anyone: the generated theme clears the `--color-*` namespace, so `bg-red-500` produces no CSS and `better-tailwindcss/no-unknown-classes` reports it. Visible controls come from `@nadicodeai/ui`, while hidden inputs remain valid form transport. The root ESLint rules `nadicodeai/no-shadcn-appearance-override` and `nadicodeai/no-native-visible-control` enforce the rest of this boundary; each takes a `packageOwnedPrimitives` option (`"exempt"` by default, `"lint"` to hold this package's own source to the same rule).
|
|
123
141
|
|
|
124
142
|
When this package is read from an installed npm package, follow the [consumer setup guide](consuming-cross-repo.md) for setup and public import paths. The styling invariant above remains the authority for component implementation.
|
|
125
143
|
|
|
@@ -7,7 +7,7 @@ Current invariants:
|
|
|
7
7
|
- `components.json` uses `base-nova`, and `npx shadcn@latest info --json` should report `base: "base"`.
|
|
8
8
|
- Package source must not import `radix-ui`, `@radix-ui/*`, or `vaul`.
|
|
9
9
|
- `cmdk` is allowed only for the stock shadcn Command component while the current `base-nova` registry declares it.
|
|
10
|
-
-
|
|
10
|
+
- `packages/ui/package.json` must not depend on `radix-ui`, `@radix-ui/react-use-controllable-state`, or `vaul`.
|
|
11
11
|
- Website and portal Next config must optimize `@base-ui/react`, not `radix-ui`.
|
|
12
12
|
- Public shadcn primitive usage follows the current Base UI registry API. Base UI composition uses `render`; do not add package-local `asChild` adapters for registry-owned primitives.
|
|
13
13
|
|
|
@@ -58,5 +58,5 @@ Verification:
|
|
|
58
58
|
```bash
|
|
59
59
|
npm run build -w @nadicodeai/ui
|
|
60
60
|
npm run test -w @nadicodeai/ui
|
|
61
|
-
rg 'radix-ui|@radix-ui|vaul'
|
|
61
|
+
rg 'radix-ui|@radix-ui|vaul' packages/ui/src packages/ui/package.json apps/website/next.config.ts apps/portal/next.config.ts
|
|
62
62
|
```
|