@nordmanai/nif 0.0.0-stage → 0.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.
Files changed (167) hide show
  1. package/README.md +61 -2
  2. package/dist/index.d.ts +95 -0
  3. package/dist/index.js +5799 -0
  4. package/dist/styles.css +2 -0
  5. package/dist/tokens.css +69 -0
  6. package/dist/ui/components/nm-accordion/nm-accordion.d.ts +6 -0
  7. package/dist/ui/components/nm-ai/nm-ai.d.ts +222 -0
  8. package/dist/ui/components/nm-avatar/nm-avatar.d.ts +12 -0
  9. package/dist/ui/components/nm-bar-overflow/nm-bar-overflow.d.ts +15 -0
  10. package/dist/ui/components/nm-bar-overflow/use-bar-overflow.d.ts +7 -0
  11. package/dist/ui/components/nm-button/nm-button.d.ts +17 -0
  12. package/dist/ui/components/nm-chatbox/nm-chatbox-icon.d.ts +7 -0
  13. package/dist/ui/components/nm-chatbox/nm-chatbox.d.ts +19 -0
  14. package/dist/ui/components/nm-checkbox/nm-checkbox.d.ts +2 -0
  15. package/dist/ui/components/nm-collection/nm-collection-bar.d.ts +16 -0
  16. package/dist/ui/components/nm-collection/nm-collection-grid.d.ts +9 -0
  17. package/dist/ui/components/nm-collection/nm-collection-query.d.ts +18 -0
  18. package/dist/ui/components/nm-collection/nm-collection-row-menu.d.ts +7 -0
  19. package/dist/ui/components/nm-collection/nm-collection-table.d.ts +13 -0
  20. package/dist/ui/components/nm-collection/nm-collection-tile-actions.d.ts +7 -0
  21. package/dist/ui/components/nm-collection/nm-collection-title.d.ts +10 -0
  22. package/dist/ui/components/nm-collection/use-collection-scroll-reveal.d.ts +3 -0
  23. package/dist/ui/components/nm-composer/nm-composer.d.ts +29 -0
  24. package/dist/ui/components/nm-dropdown/nm-dropdown-item.d.ts +26 -0
  25. package/dist/ui/components/nm-dropdown/nm-dropdown-options.d.ts +12 -0
  26. package/dist/ui/components/nm-dropdown/nm-dropdown-panel.d.ts +16 -0
  27. package/dist/ui/components/nm-dropdown/nm-dropdown-placement.d.ts +55 -0
  28. package/dist/ui/components/nm-dropdown/nm-dropdown.d.ts +31 -0
  29. package/dist/ui/components/nm-dropdown-menu/nm-dropdown-menu.d.ts +30 -0
  30. package/dist/ui/components/nm-field/nm-field.d.ts +50 -0
  31. package/dist/ui/components/nm-hover-card/nm-hover-card.d.ts +5 -0
  32. package/dist/ui/components/nm-icon/nm-icon.d.ts +7 -0
  33. package/dist/ui/components/nm-icon/nm-lucide.d.ts +7 -0
  34. package/dist/ui/components/nm-icon-border/nm-icon-border.d.ts +21 -0
  35. package/dist/ui/components/nm-list-item/nm-list-item.d.ts +23 -0
  36. package/dist/ui/components/nm-message/nm-message-actions.d.ts +7 -0
  37. package/dist/ui/components/nm-message/nm-message-meta.d.ts +10 -0
  38. package/dist/ui/components/nm-message/nm-text-shimmer.d.ts +4 -0
  39. package/dist/ui/components/nm-message/nm-trace.d.ts +58 -0
  40. package/dist/ui/components/nm-modal/nm-modal.d.ts +35 -0
  41. package/dist/ui/components/nm-panel-bar/nm-panel-bar.d.ts +17 -0
  42. package/dist/ui/components/nm-popover/nm-popover.d.ts +8 -0
  43. package/dist/ui/components/nm-progress/nm-progress.d.ts +3 -0
  44. package/dist/ui/components/nm-questionnaire/nm-questionnaire.d.ts +17 -0
  45. package/dist/ui/components/nm-radio-group/nm-radio-group.d.ts +4 -0
  46. package/dist/ui/components/nm-rail-icon/nm-rail-icon.d.ts +6 -0
  47. package/dist/ui/components/nm-segmented/nm-segmented.d.ts +20 -0
  48. package/dist/ui/components/nm-separator/nm-separator.d.ts +2 -0
  49. package/dist/ui/components/nm-slider/nm-slider.d.ts +2 -0
  50. package/dist/ui/components/nm-small-icon-button/nm-small-icon-button.d.ts +21 -0
  51. package/dist/ui/components/nm-switch/nm-switch.d.ts +2 -0
  52. package/dist/ui/components/nm-tabs/nm-tabs.d.ts +9 -0
  53. package/dist/ui/components/nm-toggle/nm-toggle.d.ts +9 -0
  54. package/dist/ui/components/nm-tooltip/nm-tooltip.d.ts +5 -0
  55. package/dist/ui/components/nm-top-bar/nm-top-bar.d.ts +12 -0
  56. package/dist/ui/components/nordman-icon-button/nordman-icon-button.d.ts +29 -0
  57. package/dist/ui/components/nordman-login/nordman-login.d.ts +36 -0
  58. package/dist/ui/components/nordman-login-field/nordman-login-field.d.ts +13 -0
  59. package/dist/ui/components/nordman-login-forgot/nordman-login-forgot.d.ts +9 -0
  60. package/dist/ui/components/nordman-login-google/nordman-login-google.d.ts +6 -0
  61. package/dist/ui/components/nordman-login-hero/nordman-login-hero.d.ts +6 -0
  62. package/dist/ui/components/nordman-login-register/nordman-login-register.d.ts +11 -0
  63. package/dist/ui/components/nordman-login-reset/nordman-login-reset.d.ts +9 -0
  64. package/dist/ui/components/nordman-login-reveal/nordman-login-reveal.d.ts +6 -0
  65. package/dist/ui/components/nordman-login-sign-in/nordman-login-sign-in.d.ts +11 -0
  66. package/dist/ui/components/nordman-toggle/nordman-toggle.d.ts +12 -0
  67. package/dist/ui/config/nm-ai.d.ts +47 -0
  68. package/dist/ui/config/nm-app-panel.d.ts +36 -0
  69. package/dist/ui/config/nm-appearance.d.ts +65 -0
  70. package/dist/ui/config/nm-bar-overflow.d.ts +9 -0
  71. package/dist/ui/config/nm-button.d.ts +30 -0
  72. package/dist/ui/config/nm-chatbox-icons.d.ts +42 -0
  73. package/dist/ui/config/nm-chatbox.d.ts +40 -0
  74. package/dist/ui/config/nm-collection.d.ts +88 -0
  75. package/dist/ui/config/nm-composer.d.ts +43 -0
  76. package/dist/ui/config/nm-dropdown.d.ts +56 -0
  77. package/dist/ui/config/nm-fade.d.ts +6 -0
  78. package/dist/ui/config/nm-field.d.ts +36 -0
  79. package/dist/ui/config/nm-header-icons.d.ts +15 -0
  80. package/dist/ui/config/nm-icon-border.d.ts +3 -0
  81. package/dist/ui/config/nm-icon-button.d.ts +26 -0
  82. package/dist/ui/config/nm-icons.d.ts +359 -0
  83. package/dist/ui/config/nm-list-item.d.ts +14 -0
  84. package/dist/ui/config/nm-message.d.ts +87 -0
  85. package/dist/ui/config/nm-modal.d.ts +67 -0
  86. package/dist/ui/config/nm-panel-bar.d.ts +9 -0
  87. package/dist/ui/config/nm-questionnaire.d.ts +57 -0
  88. package/dist/ui/config/nm-radius.d.ts +49 -0
  89. package/dist/ui/config/nm-rail-icons.d.ts +14 -0
  90. package/dist/ui/config/nm-rail.d.ts +5 -0
  91. package/dist/ui/config/nm-segmented.d.ts +17 -0
  92. package/dist/ui/config/nm-site-palette.d.ts +30 -0
  93. package/dist/ui/config/nm-small-icon-button.d.ts +12 -0
  94. package/dist/ui/config/nm-tabs.d.ts +8 -0
  95. package/dist/ui/config/nm-top-bar.d.ts +4 -0
  96. package/dist/ui/config/nordman-chrome.d.ts +12 -0
  97. package/dist/ui/config/nordman-login.d.ts +23 -0
  98. package/dist/ui/content/nm-modal.d.ts +1 -0
  99. package/dist/ui/content/nordman-login.d.ts +38 -0
  100. package/dist/ui/kit-logger.d.ts +1 -0
  101. package/dist/ui/lib/appearance/appearanceState.d.ts +27 -0
  102. package/dist/ui/lib/appearance/applyAppearance.d.ts +5 -0
  103. package/dist/ui/lib/appearance/cloudOrbAppearance.d.ts +4 -0
  104. package/dist/ui/lib/appearance/color.d.ts +13 -0
  105. package/dist/ui/lib/appearance/deriveTokens.d.ts +4 -0
  106. package/dist/ui/lib/appearance/index.d.ts +6 -0
  107. package/dist/ui/lib/appearance/markTokens.d.ts +2 -0
  108. package/dist/ui/lib/appearance/readLayoutMetrics.d.ts +4 -0
  109. package/dist/ui/lib/bar-overflow.d.ts +13 -0
  110. package/dist/ui/lib/logger.d.ts +8 -0
  111. package/dist/ui/lib/menu-motion.d.ts +72 -0
  112. package/dist/ui/lib/nm-class.d.ts +2 -0
  113. package/dist/ui/lib/nordman-ui-locale.d.ts +9 -0
  114. package/interface/app-panel/code.svg +5 -0
  115. package/interface/app-panel/console.svg +5 -0
  116. package/interface/app-panel/copy.svg +5 -0
  117. package/interface/app-panel/ellipsis.svg +7 -0
  118. package/interface/app-panel/message.svg +5 -0
  119. package/interface/app-panel/network.svg +10 -0
  120. package/interface/app-panel/play.svg +5 -0
  121. package/interface/app-panel/plus.svg +5 -0
  122. package/interface/chatbox/app.svg +5 -0
  123. package/interface/chatbox/audio-lines.svg +5 -0
  124. package/interface/chatbox/check.svg +5 -0
  125. package/interface/chatbox/globe.svg +5 -0
  126. package/interface/chatbox/integration.svg +5 -0
  127. package/interface/chatbox/mic.svg +5 -0
  128. package/interface/chatbox/paperclip.svg +5 -0
  129. package/interface/chatbox/pointer.svg +5 -0
  130. package/interface/chatbox/send.svg +5 -0
  131. package/interface/chatbox/settings.svg +5 -0
  132. package/interface/chatbox/spreadsheet.svg +5 -0
  133. package/interface/chatbox/x.svg +5 -0
  134. package/interface/collection/audio.svg +5 -0
  135. package/interface/collection/download.svg +5 -0
  136. package/interface/collection/expand.svg +5 -0
  137. package/interface/collection/grid.svg +10 -0
  138. package/interface/collection/image.svg +5 -0
  139. package/interface/collection/spreadsheet.svg +5 -0
  140. package/interface/collection/video.svg +5 -0
  141. package/interface/header/app.svg +5 -0
  142. package/interface/header/bot.svg +5 -0
  143. package/interface/header/chat.svg +10 -0
  144. package/interface/header/folder.svg +5 -0
  145. package/interface/header/layers.svg +10 -0
  146. package/interface/header/panel.svg +5 -0
  147. package/interface/header/play.svg +3 -0
  148. package/interface/header/schedule.svg +8 -0
  149. package/interface/header/search.svg +5 -0
  150. package/interface/header/settings.svg +5 -0
  151. package/interface/header/users.svg +5 -0
  152. package/interface/message/chevron.svg +5 -0
  153. package/interface/message/copy.svg +5 -0
  154. package/interface/message/fork.svg +5 -0
  155. package/interface/message/refresh.svg +5 -0
  156. package/interface/message/volume.svg +5 -0
  157. package/interface/rail/app.svg +5 -0
  158. package/interface/rail/bot.svg +5 -0
  159. package/interface/rail/chats.svg +5 -0
  160. package/interface/rail/folder.svg +5 -0
  161. package/interface/rail/library.svg +5 -0
  162. package/interface/rail/plus-sm.svg +5 -0
  163. package/interface/rail/plus.svg +5 -0
  164. package/interface/rail/search.svg +5 -0
  165. package/interface/rail/settings.svg +8 -0
  166. package/interface/rail/spreadsheet.svg +5 -0
  167. package/package.json +71 -4
@@ -0,0 +1,69 @@
1
+ /* Nordman design tokens: the one source for every colour on every Nordman page.
2
+ The website sets the theme with data-theme, the apps with html.light and html.dark.
3
+ --nm-* are the app names for the same values. Apps set them inline for custom appearance. */
4
+ :root{
5
+ --bg:#ffffff; --bg-2:#fafafa; --bg-3:#f2f2f2;
6
+ --fg:#171717; --fg-2:#666666; --fg-3:#8f8f8f;
7
+ --line:#ebebeb; --line-2:#e0e0e0;
8
+ --btn:#171717; --btn-fg:#ffffff; --btn-2:#ffffff;
9
+ --glow:0,0,0; --glow-a:.16;
10
+ --ok:#16a34a; --focus:#0070f3;
11
+ --header:rgba(255,255,255,.85);
12
+ --nm-stroke:var(--fg-2);
13
+ --nm-canvas-rgb:255 255 255; --nm-fg-rgb:23 23 23;
14
+ --nm-fg-muted-rgb:102 102 102; --nm-fg-subtle-rgb:102 102 102; --nm-stroke-rgb:102 102 102;
15
+ --nm-line-rgb:235 235 235; --nm-panel-rgb:242 242 242; --nm-raised-rgb:250 250 250; --nm-inset-rgb:242 242 242;
16
+ color-scheme:light;
17
+ --nm-canvas:var(--bg); --nm-fg:var(--fg);
18
+ --nm-fg-muted:var(--fg-2); --nm-fg-subtle:var(--fg-2);
19
+ --nm-line:var(--line); --nm-line-strong:var(--line-2);
20
+ --nm-panel:var(--bg-3); --nm-raised:var(--bg-2); --nm-inset:var(--bg-3);
21
+
22
+ /* One geometry for controls on every page. */
23
+ --control-h:32px; --control-h-sm:28px; --control-h-lg:40px;
24
+ --control-r:6px; --control-px:calc(12px * var(--nm-space-scale, 1)); --control-gap:calc(8px * var(--nm-space-scale, 1));
25
+ --control-fs:14px; --control-fw:500; --btn-hover:.88;
26
+ --field-label-fs:13px; --field-label-gap:calc(6px * var(--nm-space-scale, 1)); --field-area-py:calc(10px * var(--nm-space-scale, 1));
27
+ --tab-py:calc(10px * var(--nm-space-scale, 1)); --tab-px:calc(14px * var(--nm-space-scale, 1)); --tab-rule:2px;
28
+ --toggle-pad:calc(3px * var(--nm-space-scale, 1)); --toggle-h:30px; --toggle-px:calc(14px * var(--nm-space-scale, 1)); --toggle-r:999px;
29
+ --badge-h:20px; --badge-px:calc(8px * var(--nm-space-scale, 1)); --badge-fs:11px; --badge-r:999px;
30
+ --table-fs:15px; --table-head-fs:13px; --table-head-py:calc(12px * var(--nm-space-scale, 1)); --table-cell-py:calc(16px * var(--nm-space-scale, 1)); --table-gap:calc(16px * var(--nm-space-scale, 1));
31
+ }
32
+ @media (prefers-color-scheme:dark){
33
+ :root:not([data-theme="light"]):not(.light){
34
+ --bg:#000000; --bg-2:#0a0a0a; --bg-3:#1a1a1a;
35
+ --fg:#ededed; --fg-2:#a1a1a1; --fg-3:#707070;
36
+ --line:#1f1f1f; --line-2:#2e2e2e;
37
+ --btn:#ededed; --btn-fg:#0a0a0a; --btn-2:#0a0a0a;
38
+ --glow:255,255,255; --glow-a:.5;
39
+ --ok:#3fcf75; --focus:#52a8ff;
40
+ --header:rgba(0,0,0,.8);
41
+ --nm-stroke:var(--fg-3);
42
+ --nm-canvas-rgb:0 0 0; --nm-fg-rgb:237 237 237;
43
+ --nm-fg-muted-rgb:161 161 161; --nm-fg-subtle-rgb:161 161 161; --nm-stroke-rgb:112 112 112;
44
+ --nm-line-rgb:31 31 31; --nm-panel-rgb:26 26 26; --nm-raised-rgb:10 10 10; --nm-inset-rgb:26 26 26;
45
+ color-scheme:dark;
46
+ }
47
+ }
48
+ :root[data-theme="dark"],:root.dark:not([data-theme="light"]){
49
+ --bg:#000000; --bg-2:#0a0a0a; --bg-3:#1a1a1a;
50
+ --fg:#ededed; --fg-2:#a1a1a1; --fg-3:#707070;
51
+ --line:#1f1f1f; --line-2:#2e2e2e;
52
+ --btn:#ededed; --btn-fg:#0a0a0a; --btn-2:#0a0a0a;
53
+ --glow:255,255,255; --glow-a:.5;
54
+ --ok:#3fcf75; --focus:#52a8ff;
55
+ --header:rgba(0,0,0,.8);
56
+ --nm-stroke:var(--fg-3);
57
+ --nm-canvas-rgb:0 0 0; --nm-fg-rgb:237 237 237;
58
+ --nm-fg-muted-rgb:161 161 161; --nm-fg-subtle-rgb:161 161 161; --nm-stroke-rgb:112 112 112;
59
+ --nm-line-rgb:31 31 31; --nm-panel-rgb:26 26 26; --nm-raised-rgb:10 10 10; --nm-inset-rgb:26 26 26;
60
+ color-scheme:dark;
61
+ }
62
+
63
+ /* Typeface. The one family every Nordman component and page sets its text in.
64
+ Poppins and Geist Mono are loaded by the app, or by @nordmanai/nif. Nothing may name another family. */
65
+ :root{
66
+ --nm-font:'Poppins',system-ui,-apple-system,'Segoe UI',sans-serif;
67
+ --nm-font-mono:'Geist Mono',ui-monospace,'SF Mono',Menlo,Consolas,monospace;
68
+ --nm-weight-light:300; --nm-weight-regular:400; --nm-weight-medium:500; --nm-weight-semibold:600; --nm-weight-bold:700;
69
+ }
@@ -0,0 +1,6 @@
1
+ import { Accordion as AccordionPrimitive } from '@base-ui/react/accordion';
2
+ /** Base UI Accordion, in the shadcn composition, styled by NIF tokens. */
3
+ export declare function NmAccordion({ className, ...props }: AccordionPrimitive.Root.Props): import("react").JSX.Element;
4
+ export declare function NmAccordionItem({ className, ...props }: AccordionPrimitive.Item.Props): import("react").JSX.Element;
5
+ export declare function NmAccordionTrigger({ className, children, ...props }: AccordionPrimitive.Trigger.Props): import("react").JSX.Element;
6
+ export declare function NmAccordionContent({ className, children, ...props }: AccordionPrimitive.Panel.Props): import("react").JSX.Element;
@@ -0,0 +1,222 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type NmAiBadgeTone, type NmAiStatus, type NmToolState } from '../../config/nm-ai.ts';
3
+ export declare function NmBubble(props: {
4
+ role: 'user' | 'assistant';
5
+ children: ReactNode;
6
+ }): ReactNode;
7
+ export declare function NmCodeBlock(props: {
8
+ children: string;
9
+ label?: string;
10
+ nowrap?: boolean;
11
+ maxHeight?: string;
12
+ }): ReactNode;
13
+ export declare function NmBadge(props: {
14
+ tone?: NmAiBadgeTone;
15
+ children: ReactNode;
16
+ }): ReactNode;
17
+ export declare function NmItem(props: {
18
+ media?: ReactNode;
19
+ title: ReactNode;
20
+ description?: ReactNode;
21
+ actions?: ReactNode;
22
+ }): ReactNode;
23
+ export declare function NmSheet(props: {
24
+ title: string;
25
+ description?: string;
26
+ onClose: () => void;
27
+ children: ReactNode;
28
+ }): ReactNode;
29
+ export type NmAiMessageAction = {
30
+ id: string;
31
+ label: string;
32
+ icon: 'copy' | 'reload' | 'pen' | 'check' | 'volume' | 'fork';
33
+ };
34
+ export declare function NmMessage(props: {
35
+ role: 'user' | 'assistant';
36
+ children: ReactNode;
37
+ actions?: readonly NmAiMessageAction[];
38
+ onAction?: (id: string) => void;
39
+ footer?: ReactNode;
40
+ }): ReactNode;
41
+ export declare function NmReasoning(props: {
42
+ text: string;
43
+ streaming?: boolean;
44
+ seconds?: number;
45
+ defaultOpen?: boolean;
46
+ }): ReactNode;
47
+ export type NmChainStep = {
48
+ id: string;
49
+ title: string;
50
+ status: NmAiStatus;
51
+ detail?: string;
52
+ results?: readonly string[];
53
+ };
54
+ export declare function NmChainOfThought(props: {
55
+ summary: string;
56
+ steps: readonly NmChainStep[];
57
+ defaultOpen?: boolean;
58
+ }): ReactNode;
59
+ export declare function NmCheckpoint(props: {
60
+ label: string;
61
+ restoreLabel?: string;
62
+ onRestore?: () => void;
63
+ }): ReactNode;
64
+ export type NmConfirmationState = 'requested' | 'approved' | 'denied';
65
+ export declare function NmConfirmation(props: {
66
+ title: string;
67
+ description?: string;
68
+ state: NmConfirmationState;
69
+ onApprove?: () => void;
70
+ onDeny?: () => void;
71
+ }): ReactNode;
72
+ export declare function NmContext(props: {
73
+ used: number;
74
+ max: number;
75
+ breakdown?: readonly {
76
+ label: string;
77
+ value: number;
78
+ }[];
79
+ }): ReactNode;
80
+ export type NmFileNode = {
81
+ name: string;
82
+ children?: readonly NmFileNode[];
83
+ };
84
+ export declare function NmFileTree(props: {
85
+ nodes: readonly NmFileNode[];
86
+ defaultOpen?: boolean;
87
+ }): ReactNode;
88
+ export declare function NmInlineCitation(props: {
89
+ label: string;
90
+ title: string;
91
+ url: string;
92
+ excerpt?: string;
93
+ }): ReactNode;
94
+ export declare function NmModelSelector(props: {
95
+ models: readonly {
96
+ id: string;
97
+ label: string;
98
+ }[];
99
+ model: string;
100
+ onModel: (id: string) => void;
101
+ efforts: readonly {
102
+ id: string;
103
+ label: string;
104
+ }[];
105
+ effort: string;
106
+ onEffort: (id: string) => void;
107
+ }): ReactNode;
108
+ export type NmPlanStep = {
109
+ id: string;
110
+ title: string;
111
+ status: NmAiStatus;
112
+ detail?: string;
113
+ };
114
+ export declare function NmPlan(props: {
115
+ title: string;
116
+ steps: readonly NmPlanStep[];
117
+ defaultOpen?: boolean;
118
+ }): ReactNode;
119
+ export type NmQueueItem = {
120
+ id: string;
121
+ title: string;
122
+ description?: string;
123
+ };
124
+ export declare function NmQueue(props: {
125
+ remaining: readonly NmQueueItem[];
126
+ completed: readonly NmQueueItem[];
127
+ defaultOpen?: boolean;
128
+ }): ReactNode;
129
+ export type NmTaskStep = {
130
+ id: string;
131
+ title: string;
132
+ status: NmAiStatus;
133
+ icon?: 'search' | 'file';
134
+ };
135
+ export declare function NmTask(props: {
136
+ title: string;
137
+ steps: readonly NmTaskStep[];
138
+ }): ReactNode;
139
+ export declare function NmSources(props: {
140
+ sources: readonly {
141
+ title: string;
142
+ url: string;
143
+ }[];
144
+ defaultOpen?: boolean;
145
+ }): ReactNode;
146
+ export declare function NmTerminal(props: {
147
+ command: string;
148
+ output?: string;
149
+ exitCode?: number;
150
+ running?: boolean;
151
+ defaultOpen?: boolean;
152
+ }): ReactNode;
153
+ export type NmStackFrame = {
154
+ fn: string;
155
+ file: string;
156
+ line: number;
157
+ internal?: boolean;
158
+ };
159
+ export declare function NmStackTrace(props: {
160
+ error: string;
161
+ frames: readonly NmStackFrame[];
162
+ defaultOpen?: boolean;
163
+ }): ReactNode;
164
+ export type NmTestStatus = 'passed' | 'failed' | 'skipped';
165
+ export type NmTestSuite = {
166
+ name: string;
167
+ tests: readonly {
168
+ name: string;
169
+ status: NmTestStatus;
170
+ error?: string;
171
+ }[];
172
+ };
173
+ export declare function NmTestResults(props: {
174
+ suites: readonly NmTestSuite[];
175
+ defaultOpen?: boolean;
176
+ }): ReactNode;
177
+ export declare function NmTool(props: {
178
+ name: string;
179
+ state: NmToolState;
180
+ input?: string;
181
+ output?: string;
182
+ error?: string;
183
+ onApprove?: () => void;
184
+ onDeny?: () => void;
185
+ defaultOpen?: boolean;
186
+ }): ReactNode;
187
+ export declare function NmSubagent(props: {
188
+ name: string;
189
+ task: string;
190
+ status: NmAiStatus;
191
+ tools?: readonly {
192
+ id: string;
193
+ title: string;
194
+ status: NmAiStatus;
195
+ }[];
196
+ result?: string;
197
+ defaultOpen?: boolean;
198
+ }): ReactNode;
199
+ export declare function NmSuggestions(props: {
200
+ items: readonly string[];
201
+ onPick: (text: string) => void;
202
+ disabled?: boolean;
203
+ }): ReactNode;
204
+ export type NmChatTurn = {
205
+ id: string;
206
+ role: 'user' | 'assistant';
207
+ text: string;
208
+ reasoning?: string;
209
+ tool?: {
210
+ name: string;
211
+ state: NmToolState;
212
+ output?: string;
213
+ };
214
+ };
215
+ export declare function NmChat(props: {
216
+ turns: readonly NmChatTurn[];
217
+ empty?: {
218
+ title: string;
219
+ description: string;
220
+ };
221
+ streaming?: boolean;
222
+ }): ReactNode;
@@ -0,0 +1,12 @@
1
+ import type { ComponentProps } from 'react';
2
+ import { Avatar as AvatarPrimitive } from '@base-ui/react/avatar';
3
+ export declare const NM_AVATAR_SIZES: readonly ['sm', 'default', 'lg'];
4
+ export type NmAvatarSize = (typeof NM_AVATAR_SIZES)[number];
5
+ export declare function NmAvatar({ className, size, ...props }: AvatarPrimitive.Root.Props & {
6
+ size?: NmAvatarSize;
7
+ }): import("react").JSX.Element;
8
+ export declare function NmAvatarImage({ className, ...props }: AvatarPrimitive.Image.Props): import("react").JSX.Element;
9
+ export declare function NmAvatarFallback({ className, ...props }: AvatarPrimitive.Fallback.Props): import("react").JSX.Element;
10
+ export declare function NmAvatarBadge({ className, ...props }: ComponentProps<'span'>): import("react").JSX.Element;
11
+ export declare function NmAvatarGroup({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
12
+ export declare function NmAvatarGroupCount({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { NmDropdownItem } from '../nm-dropdown/nm-dropdown-item';
3
+ import type { NmIconId } from '../../config/nm-icons.ts';
4
+ export type NmBarOverflowProps = {
5
+ menuLabel: string;
6
+ items: readonly NmDropdownItem[];
7
+ onSelect: (id: string) => void;
8
+ testId?: string;
9
+ className?: string;
10
+ hiddenOnNarrow?: boolean;
11
+ menuIcon?: NmIconId;
12
+ trailing?: ReactNode;
13
+ children: ReactNode;
14
+ };
15
+ export declare function NmBarOverflow(props: NmBarOverflowProps): ReactNode;
@@ -0,0 +1,7 @@
1
+ import { type RefObject } from 'react';
2
+ import { type BarOverflowMode } from '../../lib/bar-overflow.ts';
3
+ export declare function useBarOverflow(rootRef: RefObject<HTMLElement | null>, rowRef: RefObject<HTMLElement | null>): {
4
+ mode: BarOverflowMode;
5
+ open: boolean;
6
+ setOpen: (open: boolean) => void;
7
+ };
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { NmIconId } from '../../config/nm-icons.ts';
3
+ import { NM_BUTTON_SIZES, NM_BUTTON_TONES, type NmButtonSize, type NmButtonTone } from '../../config/nm-button.ts';
4
+ export type NmButtonProps = {
5
+ label: string;
6
+ tone: NmButtonTone;
7
+ size?: NmButtonSize;
8
+ block?: boolean;
9
+ type?: 'button' | 'submit';
10
+ disabled?: boolean;
11
+ pressed?: boolean;
12
+ icon?: NmIconId;
13
+ testId?: string;
14
+ onClick?: () => void;
15
+ };
16
+ export declare function NmButton(props: NmButtonProps): ReactNode;
17
+ export { NM_BUTTON_SIZES, NM_BUTTON_TONES };
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type NmChatboxIconId } from '../../config/nm-chatbox-icons.ts';
3
+ export declare const NM_CHATBOX_LUCIDE_MAP: Record<NmChatboxIconId, string>;
4
+ export declare function NmChatboxIcon({ id, className, }: {
5
+ id: NmChatboxIconId;
6
+ className?: string;
7
+ }): ReactNode;
@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from 'react';
2
+ export type NmChatboxProps = {
3
+ placeholder: string;
4
+ placeholderEmphasis?: string;
5
+ value: string;
6
+ sendLabel: string;
7
+ attachLabel: string;
8
+ micLabel: string;
9
+ fieldId?: string;
10
+ micPressed?: boolean;
11
+ disabled?: boolean;
12
+ testId?: string;
13
+ tools?: ReactNode;
14
+ onChange: (value: string) => void;
15
+ onSend: () => void;
16
+ onAttach?: () => void;
17
+ onMic?: () => void;
18
+ };
19
+ export declare function NmChatbox(props: NmChatboxProps): ReactNode;
@@ -0,0 +1,2 @@
1
+ import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';
2
+ export declare function NmCheckbox({ className, ...props }: CheckboxPrimitive.Root.Props): import("react").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { NmIconId } from '../../config/nm-icons.ts';
3
+ import { type NmCollectionView } from '../../config/nm-collection.ts';
4
+ export type NmCollectionBarProps = {
5
+ title: string;
6
+ titleSrc: string;
7
+ titleIcon?: NmIconId;
8
+ filterIcon?: NmIconId;
9
+ view: NmCollectionView;
10
+ gridLabel: string;
11
+ tableLabel: string;
12
+ switchLabel: string;
13
+ showSwitch?: boolean;
14
+ onView: (view: NmCollectionView) => void;
15
+ };
16
+ export declare function NmCollectionBar(props: NmCollectionBarProps): ReactNode;
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type NmCollectionItem, type NmCollectionItemActions } from '../../config/nm-collection.ts';
3
+ export type NmCollectionGridProps = {
4
+ items: readonly NmCollectionItem[];
5
+ label: string;
6
+ actions?: NmCollectionItemActions;
7
+ onSelect: (id: string) => void;
8
+ };
9
+ export declare function NmCollectionGrid(props: NmCollectionGridProps): ReactNode;
@@ -0,0 +1,18 @@
1
+ import type { ReactNode } from 'react';
2
+ export type NmCollectionQueryProps = {
3
+ imageLabel: string;
4
+ videoLabel: string;
5
+ audioLabel: string;
6
+ searchLabel: string;
7
+ imageOn: boolean;
8
+ videoOn: boolean;
9
+ audioOn: boolean;
10
+ query: string;
11
+ onImage: (on: boolean) => void;
12
+ onVideo: (on: boolean) => void;
13
+ onAudio: (on: boolean) => void;
14
+ onQuery: (query: string) => void;
15
+ filters?: boolean;
16
+ search?: boolean;
17
+ };
18
+ export declare function NmCollectionQuery(props: NmCollectionQueryProps): ReactNode;
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type NmCollectionItemActions } from '../../config/nm-collection.ts';
3
+ export declare function NmCollectionRowMenu(props: {
4
+ itemId: string;
5
+ title: string;
6
+ actions: NmCollectionItemActions;
7
+ }): ReactNode;
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { NmIconId } from '../../config/nm-icons.ts';
3
+ import { type NmCollectionColumn, type NmCollectionItem, type NmCollectionItemActions } from '../../config/nm-collection.ts';
4
+ export type NmCollectionTableProps = {
5
+ items: readonly NmCollectionItem[];
6
+ label: string;
7
+ nameLabel?: string;
8
+ columns?: readonly NmCollectionColumn[];
9
+ headerIcon?: NmIconId;
10
+ actions?: NmCollectionItemActions;
11
+ onSelect: (id: string) => void;
12
+ };
13
+ export declare function NmCollectionTable(props: NmCollectionTableProps): ReactNode;
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type NmCollectionItemActions } from '../../config/nm-collection.ts';
3
+ export declare function NmCollectionTileActions(props: {
4
+ itemId: string;
5
+ title: string;
6
+ actions: NmCollectionItemActions;
7
+ }): ReactNode;
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { NmIconId } from '../../config/nm-icons.ts';
3
+ export type NmCollectionTitleProps = {
4
+ /** Accessible name (icon-only; not shown as visible text). */
5
+ title: string;
6
+ titleSrc: string;
7
+ titleIcon?: NmIconId;
8
+ };
9
+ /** Collection header identity chip — icon only, raised background on hover. */
10
+ export declare function NmCollectionTitle(props: NmCollectionTitleProps): ReactNode;
@@ -0,0 +1,3 @@
1
+ import type { RefObject } from 'react';
2
+ /** Shows the collection scroll thumb only while the region is moving. */
3
+ export default function useCollectionScrollReveal(scrollableRef: RefObject<HTMLElement | null>): void;
@@ -0,0 +1,29 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type NmComposerAttachment, type NmComposerQueued } from '../../config/nm-composer.ts';
3
+ export type NmComposerProps = {
4
+ value: string;
5
+ onChange: (value: string) => void;
6
+ onSend: () => void;
7
+ /** While the agent answers, the send button becomes Stop. */
8
+ busy?: boolean;
9
+ onStop?: () => void;
10
+ placeholder?: string;
11
+ /** Messages waiting for the agent to finish. They stack above the text, oldest first. */
12
+ queue?: readonly NmComposerQueued[];
13
+ onEditQueued?: (id: string) => void;
14
+ onRemoveQueued?: (id: string) => void;
15
+ attachments?: readonly NmComposerAttachment[];
16
+ onRemoveAttachment?: (id: string) => void;
17
+ /** The add button on the left. Omit it to hide the button. */
18
+ onAdd?: () => void;
19
+ /** Dictation. Pressed while it listens. */
20
+ onMic?: () => void;
21
+ micActive?: boolean;
22
+ /** Voice mode. It shows while the box is empty. Typing swaps it for Send. */
23
+ onVoice?: () => void;
24
+ /** Controls beside the add button, such as the model selector. */
25
+ start?: ReactNode;
26
+ disabled?: boolean;
27
+ testId?: string;
28
+ };
29
+ export declare function NmComposer(props: NmComposerProps): ReactNode;
@@ -0,0 +1,26 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { NmIconId } from '../../config/nm-icons.ts';
3
+ export type NmDropdownItem = {
4
+ id: string;
5
+ label?: string;
6
+ detail?: string;
7
+ /** Keyboard hint, such as ⌘K. Display only; the binding lives with the command. */
8
+ shortcut?: string;
9
+ icon?: NmIconId;
10
+ imageSrc?: string;
11
+ leading?: ReactNode;
12
+ separator?: boolean;
13
+ danger?: boolean;
14
+ disabled?: boolean;
15
+ checked?: boolean;
16
+ /** Publish row state. The row stays inactive while busy or live. */
17
+ mark?: 'idle' | 'busy' | 'live';
18
+ children?: readonly NmDropdownItem[];
19
+ };
20
+ export declare function isNmDropdownSeparator(item: NmDropdownItem): boolean;
21
+ export declare function nmDropdownSeparator(id: string): NmDropdownItem;
22
+ export declare function dropdownBranchPath(items: readonly NmDropdownItem[], id: string, trail?: readonly string[]): string[] | null;
23
+ /** Hover and click open this branch. They do not close it again. */
24
+ export declare function openDropdownBranch(items: readonly NmDropdownItem[], id: string): string[];
25
+ /** Opening a branch keeps only that branch and its parents. Closing it keeps the parents. */
26
+ export declare function nextExpandedBranches(items: readonly NmDropdownItem[], expanded: readonly string[], id: string): string[];
@@ -0,0 +1,12 @@
1
+ import { type NmDropdownItem } from './nm-dropdown-item';
2
+ export declare function findDropdownItem(items: readonly NmDropdownItem[], selected?: string | null): NmDropdownItem | undefined;
3
+ export declare function NmDropdownOptions({ items, selected, focusedOptionId, expandedIds, selectionMark, onSelect, onOpenBranch, onCloseBranches, }: {
4
+ items: readonly NmDropdownItem[];
5
+ selected?: string | null;
6
+ focusedOptionId?: string | null;
7
+ expandedIds?: readonly string[];
8
+ selectionMark?: 'check' | 'none';
9
+ onSelect: (id: string) => void;
10
+ onOpenBranch: (id: string) => void;
11
+ onCloseBranches: () => void;
12
+ }): import("react").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { type ReactNode, type Ref, type RefObject } from 'react';
2
+ export declare function NmDropdownPanel({ open, placement, className, id, label, panelRef, children, }: {
3
+ open: boolean;
4
+ placement: string;
5
+ className: string;
6
+ id: string;
7
+ label: string;
8
+ panelRef: Ref<HTMLUListElement>;
9
+ children: ReactNode;
10
+ }): ReactNode;
11
+ export declare function NmDropdownBranch({ open, label, anchorRef, children, }: {
12
+ open: boolean;
13
+ label?: string;
14
+ anchorRef: RefObject<HTMLElement | null>;
15
+ children: ReactNode;
16
+ }): ReactNode;
@@ -0,0 +1,55 @@
1
+ import { NM_DROPDOWN_ALIGN } from '../../config/nm-dropdown.ts';
2
+ export type NmDropdownBox = {
3
+ top: number;
4
+ left: number;
5
+ right: number;
6
+ bottom: number;
7
+ width: number;
8
+ height: number;
9
+ };
10
+ export type NmDropdownViewport = {
11
+ width: number;
12
+ height: number;
13
+ };
14
+ export type NmDropdownPlacement = {
15
+ top: number;
16
+ left: number;
17
+ maxHeight?: number;
18
+ };
19
+ /** Scroll cap for a panel anchored at `panelTop`; only needed when content exceeds this. */
20
+ export declare function nmDropdownViewportMaxHeight(input: {
21
+ trigger: Pick<NmDropdownBox, 'top' | 'bottom'>;
22
+ viewport: NmDropdownViewport;
23
+ panelTop: number;
24
+ gap?: number;
25
+ edgePadding?: number;
26
+ }): number;
27
+ export declare function placeNmDropdownPanel({ trigger, panel, viewport, align, gap, }: {
28
+ trigger: NmDropdownBox;
29
+ panel: Pick<NmDropdownBox, 'width' | 'height'>;
30
+ viewport: NmDropdownViewport;
31
+ align: (typeof NM_DROPDOWN_ALIGN)[keyof typeof NM_DROPDOWN_ALIGN];
32
+ gap?: number;
33
+ }): NmDropdownPlacement;
34
+ /** Opens below (or above) a history row; panel width matches the row pill. */
35
+ export declare function placeNmDropdownRowPanel({ row, panel, viewport, gap, }: {
36
+ row: NmDropdownBox;
37
+ panel: Pick<NmDropdownBox, 'height'>;
38
+ viewport: NmDropdownViewport;
39
+ gap?: number;
40
+ }): NmDropdownPlacement & {
41
+ width: number;
42
+ };
43
+ /** Places a submenu beside its parent menu, with the same gap as the trigger. */
44
+ export declare function placeNmDropdownSubpanel({ rowTop, rowBottom, panelLeft, panelRight, submenuWidth, submenuHeight, viewportWidth, viewportHeight, gap, }: {
45
+ rowTop: number;
46
+ rowBottom: number;
47
+ panelLeft: number;
48
+ panelRight: number;
49
+ submenuWidth: number;
50
+ submenuHeight: number;
51
+ viewportWidth: number;
52
+ viewportHeight: number;
53
+ gap?: number;
54
+ }): NmDropdownPlacement;
55
+ export declare function dropdownPortalHost(explicit: HTMLElement | null | undefined, trigger: HTMLElement | null): HTMLElement;
@@ -0,0 +1,31 @@
1
+ import { type ReactNode, type Ref } from 'react';
2
+ import type { NmIconId } from '../../config/nm-icons.ts';
3
+ import { NM_DROPDOWN_ALIGN, NM_DROPDOWN_REVEAL, NM_DROPDOWN_TONE, NM_DROPDOWN_TRIGGER } from '../../config/nm-dropdown.ts';
4
+ import { type NmDropdownItem } from './nm-dropdown-item';
5
+ export type { NmDropdownItem };
6
+ export type NmDropdownProps = {
7
+ label: string;
8
+ items?: readonly NmDropdownItem[];
9
+ selected?: string | null;
10
+ testId?: string;
11
+ trigger?: (typeof NM_DROPDOWN_TRIGGER)[keyof typeof NM_DROPDOWN_TRIGGER];
12
+ tone?: (typeof NM_DROPDOWN_TONE)[keyof typeof NM_DROPDOWN_TONE];
13
+ align?: (typeof NM_DROPDOWN_ALIGN)[keyof typeof NM_DROPDOWN_ALIGN];
14
+ icon?: NmIconId;
15
+ imageSrc?: string;
16
+ displayLabel?: string;
17
+ /** Chip/text triggers show only the lead icon; `label` stays for accessibility. */
18
+ iconOnly?: boolean;
19
+ portal?: boolean;
20
+ portalRoot?: HTMLElement | null;
21
+ disabled?: boolean;
22
+ /** `hover` hides the trigger until the host with `data-nm-menu` is hovered or focused. */
23
+ reveal?: (typeof NM_DROPDOWN_REVEAL)[keyof typeof NM_DROPDOWN_REVEAL];
24
+ open?: boolean;
25
+ triggerClassName?: string;
26
+ triggerRef?: Ref<HTMLButtonElement>;
27
+ onOpenChange?: (open: boolean) => void;
28
+ onSelect?: (id: string) => void;
29
+ onBranchExpand?: (id: string) => void;
30
+ };
31
+ export declare function NmDropdown(props: NmDropdownProps): ReactNode;