@nordmanai/nif 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/README.md +18 -0
  2. package/bin/nif.mjs +196 -0
  3. package/dist/index.d.ts +30 -1
  4. package/dist/index.js +9661 -2499
  5. package/dist/styles.css +1 -1
  6. package/dist/tokens.css +4 -1
  7. package/dist/ui/components/nm-ai/nm-ai.d.ts +7 -7
  8. package/dist/ui/components/nm-brand-logo/nm-brand-logo.d.ts +10 -0
  9. package/dist/ui/components/nm-breadcrumb/nm-breadcrumb.d.ts +11 -0
  10. package/dist/ui/components/nm-button/nm-button.d.ts +2 -0
  11. package/dist/ui/components/nm-button-group/nm-button-group.d.ts +17 -0
  12. package/dist/ui/components/nm-calendar/nm-calendar.d.ts +3 -0
  13. package/dist/ui/components/nm-card/nm-card.d.ts +34 -0
  14. package/dist/ui/components/nm-chip/nm-chip.d.ts +38 -0
  15. package/dist/ui/components/nm-code-block/nm-code-block.d.ts +55 -0
  16. package/dist/ui/components/nm-color-picker/nm-color-picker.d.ts +15 -0
  17. package/dist/ui/components/nm-combobox/nm-combobox.d.ts +26 -0
  18. package/dist/ui/components/nm-command/nm-command.d.ts +37 -0
  19. package/dist/ui/components/nm-composer/nm-composer.d.ts +4 -0
  20. package/dist/ui/components/nm-context-menu/nm-context-menu.d.ts +9 -0
  21. package/dist/ui/components/nm-date-picker/nm-date-picker.d.ts +35 -0
  22. package/dist/ui/components/nm-dialog/nm-dialog.d.ts +13 -0
  23. package/dist/ui/components/nm-field/nm-field.d.ts +2 -0
  24. package/dist/ui/components/nm-form-field/nm-form-field.d.ts +18 -0
  25. package/dist/ui/components/nm-gallery/nm-gallery.d.ts +8 -0
  26. package/dist/ui/components/nm-input/nm-input.d.ts +5 -0
  27. package/dist/ui/components/nm-input-group/nm-input-group.d.ts +9 -0
  28. package/dist/ui/components/nm-label/nm-label.d.ts +2 -0
  29. package/dist/ui/components/nm-menubar/nm-menubar.d.ts +9 -0
  30. package/dist/ui/components/nm-native-select/nm-native-select.d.ts +5 -0
  31. package/dist/ui/components/nm-panel/nm-panel.d.ts +14 -0
  32. package/dist/ui/components/nm-prose/nm-prose.d.ts +6 -0
  33. package/dist/ui/components/nm-resize-handle/nm-resize-handle.d.ts +18 -0
  34. package/dist/ui/components/nm-select/nm-select.d.ts +22 -0
  35. package/dist/ui/components/nm-side-panel/nm-side-panel.d.ts +33 -0
  36. package/dist/ui/components/nm-slider/nm-slider.d.ts +5 -1
  37. package/dist/ui/components/nm-status-bar/nm-status-bar.d.ts +8 -0
  38. package/dist/ui/components/nm-table/nm-table.d.ts +38 -0
  39. package/dist/ui/components/nm-textarea/nm-textarea.d.ts +2 -0
  40. package/dist/ui/components/nm-toolbar/nm-toolbar.d.ts +21 -0
  41. package/dist/ui/config/nm-ai.d.ts +0 -3
  42. package/dist/ui/config/nm-appearance.d.ts +36 -1
  43. package/dist/ui/config/nm-button.d.ts +2 -1
  44. package/dist/ui/config/nm-composer.d.ts +1 -2
  45. package/dist/ui/config/nm-field.d.ts +2 -0
  46. package/dist/ui/config/nm-icons.d.ts +13 -1
  47. package/dist/ui/config/nm-radius.d.ts +4 -4
  48. package/dist/ui/config/nm-side-panel.d.ts +33 -0
  49. package/dist/ui/lib/appearance/appearanceState.d.ts +1 -0
  50. package/dist/ui/lib/appearance/deriveTokens.d.ts +2 -0
  51. package/package.json +12 -4
  52. package/registry/index.json +1634 -0
  53. package/registry/tokens.css +72 -0
  54. package/registry/ui/components/nm-ai/nm-ai.css +358 -0
  55. package/registry/ui/components/nm-ai/nm-ai.tsx +632 -0
  56. package/registry/ui/components/nm-app-panel/nm-app-panel.css +169 -0
  57. package/registry/ui/components/nm-ask/nm-ask.css +277 -0
  58. package/registry/ui/components/nm-avatar/nm-avatar.css +85 -0
  59. package/registry/ui/components/nm-avatar/nm-avatar.tsx +30 -0
  60. package/registry/ui/components/nm-bar-overflow/nm-bar-overflow.css +43 -0
  61. package/registry/ui/components/nm-bar-overflow/nm-bar-overflow.tsx +61 -0
  62. package/registry/ui/components/nm-bar-overflow/use-bar-overflow.ts +92 -0
  63. package/registry/ui/components/nm-brand-logo/nm-brand-logo.css +20 -0
  64. package/registry/ui/components/nm-brand-logo/nm-brand-logo.tsx +21 -0
  65. package/registry/ui/components/nm-breadcrumb/nm-breadcrumb.css +57 -0
  66. package/registry/ui/components/nm-breadcrumb/nm-breadcrumb.tsx +42 -0
  67. package/registry/ui/components/nm-button/nm-button.css +106 -0
  68. package/registry/ui/components/nm-button/nm-button.tsx +58 -0
  69. package/registry/ui/components/nm-button-group/nm-button-group.css +98 -0
  70. package/registry/ui/components/nm-button-group/nm-button-group.tsx +32 -0
  71. package/registry/ui/components/nm-calendar/nm-calendar.css +178 -0
  72. package/registry/ui/components/nm-calendar/nm-calendar.tsx +43 -0
  73. package/registry/ui/components/nm-card/nm-card.css +130 -0
  74. package/registry/ui/components/nm-card/nm-card.tsx +83 -0
  75. package/registry/ui/components/nm-chatbox/nm-chatbox-icon.tsx +39 -0
  76. package/registry/ui/components/nm-chatbox/nm-chatbox.css +682 -0
  77. package/registry/ui/components/nm-chatbox/nm-chatbox.tsx +101 -0
  78. package/registry/ui/components/nm-checkbox/nm-checkbox.css +61 -0
  79. package/registry/ui/components/nm-checkbox/nm-checkbox.tsx +14 -0
  80. package/registry/ui/components/nm-chip/nm-chip.css +112 -0
  81. package/registry/ui/components/nm-chip/nm-chip.tsx +86 -0
  82. package/registry/ui/components/nm-code-block/nm-code-block.css +240 -0
  83. package/registry/ui/components/nm-code-block/nm-code-block.tsx +196 -0
  84. package/registry/ui/components/nm-collection/nm-collection-bar.tsx +65 -0
  85. package/registry/ui/components/nm-collection/nm-collection-grid.tsx +69 -0
  86. package/registry/ui/components/nm-collection/nm-collection-query.tsx +99 -0
  87. package/registry/ui/components/nm-collection/nm-collection-row-menu.tsx +55 -0
  88. package/registry/ui/components/nm-collection/nm-collection-table.tsx +99 -0
  89. package/registry/ui/components/nm-collection/nm-collection-tile-actions.tsx +50 -0
  90. package/registry/ui/components/nm-collection/nm-collection-title.tsx +25 -0
  91. package/registry/ui/components/nm-collection/nm-collection.css +353 -0
  92. package/registry/ui/components/nm-collection/use-collection-scroll-reveal.ts +38 -0
  93. package/registry/ui/components/nm-color-picker/nm-color-picker.css +67 -0
  94. package/registry/ui/components/nm-color-picker/nm-color-picker.tsx +79 -0
  95. package/registry/ui/components/nm-combobox/nm-combobox.css +72 -0
  96. package/registry/ui/components/nm-combobox/nm-combobox.tsx +80 -0
  97. package/registry/ui/components/nm-command/nm-command.css +190 -0
  98. package/registry/ui/components/nm-command/nm-command.tsx +125 -0
  99. package/registry/ui/components/nm-composer/nm-composer.css +178 -0
  100. package/registry/ui/components/nm-composer/nm-composer.tsx +151 -0
  101. package/registry/ui/components/nm-context-menu/nm-context-menu.tsx +25 -0
  102. package/registry/ui/components/nm-date-picker/nm-date-picker.css +140 -0
  103. package/registry/ui/components/nm-date-picker/nm-date-picker.tsx +153 -0
  104. package/registry/ui/components/nm-dialog/nm-dialog.css +84 -0
  105. package/registry/ui/components/nm-dialog/nm-dialog.tsx +40 -0
  106. package/registry/ui/components/nm-dropdown/nm-dropdown-item.ts +68 -0
  107. package/registry/ui/components/nm-dropdown/nm-dropdown-options.tsx +242 -0
  108. package/registry/ui/components/nm-dropdown/nm-dropdown-panel.tsx +171 -0
  109. package/registry/ui/components/nm-dropdown/nm-dropdown-placement.ts +157 -0
  110. package/registry/ui/components/nm-dropdown/nm-dropdown.css +312 -0
  111. package/registry/ui/components/nm-dropdown/nm-dropdown.tsx +412 -0
  112. package/registry/ui/components/nm-dropdown-menu/nm-dropdown-menu.css +145 -0
  113. package/registry/ui/components/nm-dropdown-menu/nm-dropdown-menu.tsx +118 -0
  114. package/registry/ui/components/nm-field/nm-field.css +356 -0
  115. package/registry/ui/components/nm-field/nm-field.tsx +355 -0
  116. package/registry/ui/components/nm-form-field/nm-form-field.css +103 -0
  117. package/registry/ui/components/nm-form-field/nm-form-field.tsx +71 -0
  118. package/registry/ui/components/nm-gallery/nm-gallery.css +66 -0
  119. package/registry/ui/components/nm-gallery/nm-gallery.tsx +31 -0
  120. package/registry/ui/components/nm-hover-card/nm-hover-card.css +26 -0
  121. package/registry/ui/components/nm-hover-card/nm-hover-card.tsx +28 -0
  122. package/registry/ui/components/nm-icon/nm-icon.css +6 -0
  123. package/registry/ui/components/nm-icon/nm-icon.tsx +69 -0
  124. package/registry/ui/components/nm-icon/nm-lucide.tsx +180 -0
  125. package/registry/ui/components/nm-icon-border/nm-icon-border.tsx +56 -0
  126. package/registry/ui/components/nm-input/nm-input.css +75 -0
  127. package/registry/ui/components/nm-input/nm-input.tsx +7 -0
  128. package/registry/ui/components/nm-input-group/nm-input-group.css +66 -0
  129. package/registry/ui/components/nm-input-group/nm-input-group.tsx +20 -0
  130. package/registry/ui/components/nm-label/nm-label.css +11 -0
  131. package/registry/ui/components/nm-label/nm-label.tsx +6 -0
  132. package/registry/ui/components/nm-list-item/nm-list-item.css +177 -0
  133. package/registry/ui/components/nm-list-item/nm-list-item.tsx +112 -0
  134. package/registry/ui/components/nm-menubar/nm-menubar.css +32 -0
  135. package/registry/ui/components/nm-menubar/nm-menubar.tsx +19 -0
  136. package/registry/ui/components/nm-message/nm-message-actions.tsx +24 -0
  137. package/registry/ui/components/nm-message/nm-message-meta.tsx +49 -0
  138. package/registry/ui/components/nm-message/nm-message.css +686 -0
  139. package/registry/ui/components/nm-message/nm-text-shimmer.tsx +6 -0
  140. package/registry/ui/components/nm-message/nm-trace.tsx +219 -0
  141. package/registry/ui/components/nm-modal/nm-modal.css +763 -0
  142. package/registry/ui/components/nm-modal/nm-modal.tsx +497 -0
  143. package/registry/ui/components/nm-native-select/nm-native-select.css +47 -0
  144. package/registry/ui/components/nm-native-select/nm-native-select.tsx +23 -0
  145. package/registry/ui/components/nm-panel/nm-panel.css +73 -0
  146. package/registry/ui/components/nm-panel/nm-panel.tsx +35 -0
  147. package/registry/ui/components/nm-panel-bar/nm-panel-bar.css +20 -0
  148. package/registry/ui/components/nm-panel-bar/nm-panel-bar.tsx +48 -0
  149. package/registry/ui/components/nm-popover/nm-popover.css +43 -0
  150. package/registry/ui/components/nm-popover/nm-popover.tsx +40 -0
  151. package/registry/ui/components/nm-progress/nm-progress.css +21 -0
  152. package/registry/ui/components/nm-progress/nm-progress.tsx +14 -0
  153. package/registry/ui/components/nm-prose/nm-prose.css +81 -0
  154. package/registry/ui/components/nm-prose/nm-prose.tsx +10 -0
  155. package/registry/ui/components/nm-questionnaire/nm-questionnaire.css +182 -0
  156. package/registry/ui/components/nm-questionnaire/nm-questionnaire.tsx +221 -0
  157. package/registry/ui/components/nm-radio-group/nm-radio-group.css +48 -0
  158. package/registry/ui/components/nm-radio-group/nm-radio-group.tsx +15 -0
  159. package/registry/ui/components/nm-rail-icon/nm-rail-icon.css +6 -0
  160. package/registry/ui/components/nm-rail-icon/nm-rail-icon.tsx +28 -0
  161. package/registry/ui/components/nm-resize-handle/nm-resize-handle.css +45 -0
  162. package/registry/ui/components/nm-resize-handle/nm-resize-handle.tsx +102 -0
  163. package/registry/ui/components/nm-segmented/nm-segmented.css +104 -0
  164. package/registry/ui/components/nm-segmented/nm-segmented.tsx +77 -0
  165. package/registry/ui/components/nm-select/nm-select.css +78 -0
  166. package/registry/ui/components/nm-select/nm-select.tsx +64 -0
  167. package/registry/ui/components/nm-separator/nm-separator.css +14 -0
  168. package/registry/ui/components/nm-separator/nm-separator.tsx +6 -0
  169. package/registry/ui/components/nm-side-panel/nm-side-panel.css +93 -0
  170. package/registry/ui/components/nm-side-panel/nm-side-panel.tsx +86 -0
  171. package/registry/ui/components/nm-slider/nm-slider.css +53 -0
  172. package/registry/ui/components/nm-slider/nm-slider.tsx +40 -0
  173. package/registry/ui/components/nm-small-icon-button/nm-small-icon-button.tsx +66 -0
  174. package/registry/ui/components/nm-status-bar/nm-status-bar.css +50 -0
  175. package/registry/ui/components/nm-status-bar/nm-status-bar.tsx +28 -0
  176. package/registry/ui/components/nm-switch/nm-switch.css +45 -0
  177. package/registry/ui/components/nm-switch/nm-switch.tsx +10 -0
  178. package/registry/ui/components/nm-table/nm-table.css +155 -0
  179. package/registry/ui/components/nm-table/nm-table.tsx +95 -0
  180. package/registry/ui/components/nm-tabs/nm-tabs.css +28 -0
  181. package/registry/ui/components/nm-tabs/nm-tabs.tsx +32 -0
  182. package/registry/ui/components/nm-textarea/nm-textarea.css +41 -0
  183. package/registry/ui/components/nm-textarea/nm-textarea.tsx +6 -0
  184. package/registry/ui/components/nm-toggle/nm-toggle.css +55 -0
  185. package/registry/ui/components/nm-toggle/nm-toggle.tsx +16 -0
  186. package/registry/ui/components/nm-toolbar/nm-toolbar.css +42 -0
  187. package/registry/ui/components/nm-toolbar/nm-toolbar.tsx +54 -0
  188. package/registry/ui/components/nm-tooltip/nm-tooltip.css +37 -0
  189. package/registry/ui/components/nm-tooltip/nm-tooltip.tsx +35 -0
  190. package/registry/ui/components/nm-top-bar/nm-top-bar.css +29 -0
  191. package/registry/ui/components/nm-top-bar/nm-top-bar.tsx +34 -0
  192. package/registry/ui/components/nordman-icon-button/nordman-icon-button.css +119 -0
  193. package/registry/ui/components/nordman-icon-button/nordman-icon-button.tsx +185 -0
  194. package/registry/ui/components/nordman-login/nordman-login.css +195 -0
  195. package/registry/ui/components/nordman-login/nordman-login.tsx +136 -0
  196. package/registry/ui/components/nordman-login-field/nordman-login-field.tsx +55 -0
  197. package/registry/ui/components/nordman-login-forgot/nordman-login-forgot.tsx +56 -0
  198. package/registry/ui/components/nordman-login-google/nordman-login-google.tsx +28 -0
  199. package/registry/ui/components/nordman-login-hero/nordman-login-hero.tsx +38 -0
  200. package/registry/ui/components/nordman-login-register/nordman-login-register.tsx +70 -0
  201. package/registry/ui/components/nordman-login-reset/nordman-login-reset.tsx +71 -0
  202. package/registry/ui/components/nordman-login-reveal/nordman-login-reveal.tsx +41 -0
  203. package/registry/ui/components/nordman-login-sign-in/nordman-login-sign-in.tsx +69 -0
  204. package/registry/ui/components/nordman-toggle/nordman-toggle.css +28 -0
  205. package/registry/ui/components/nordman-toggle/nordman-toggle.tsx +35 -0
  206. package/registry/ui/config/nm-ai.ts +59 -0
  207. package/registry/ui/config/nm-appearance.ts +275 -0
  208. package/registry/ui/config/nm-bar-overflow.ts +10 -0
  209. package/registry/ui/config/nm-button.ts +38 -0
  210. package/registry/ui/config/nm-chatbox-icons.ts +67 -0
  211. package/registry/ui/config/nm-chatbox.ts +42 -0
  212. package/registry/ui/config/nm-collection.ts +101 -0
  213. package/registry/ui/config/nm-composer.ts +39 -0
  214. package/registry/ui/config/nm-dropdown.ts +62 -0
  215. package/registry/ui/config/nm-field.ts +43 -0
  216. package/registry/ui/config/nm-icon-button.ts +35 -0
  217. package/registry/ui/config/nm-icons.ts +417 -0
  218. package/registry/ui/config/nm-list-item.ts +14 -0
  219. package/registry/ui/config/nm-message.ts +106 -0
  220. package/registry/ui/config/nm-modal.ts +76 -0
  221. package/registry/ui/config/nm-panel-bar.ts +11 -0
  222. package/registry/ui/config/nm-questionnaire.ts +53 -0
  223. package/registry/ui/config/nm-radius.ts +56 -0
  224. package/registry/ui/config/nm-rail-icons.ts +27 -0
  225. package/registry/ui/config/nm-segmented.ts +19 -0
  226. package/registry/ui/config/nm-side-panel.ts +16 -0
  227. package/registry/ui/config/nm-site-palette.ts +30 -0
  228. package/registry/ui/config/nm-small-icon-button.ts +17 -0
  229. package/registry/ui/config/nm-tabs.ts +9 -0
  230. package/registry/ui/config/nm-top-bar.ts +4 -0
  231. package/registry/ui/config/nordman-chrome.ts +14 -0
  232. package/registry/ui/config/nordman-login.ts +28 -0
  233. package/registry/ui/content/nm-modal.ts +5 -0
  234. package/registry/ui/content/nordman-login.ts +85 -0
  235. package/registry/ui/kit-logger.ts +1 -0
  236. package/registry/ui/lib/appearance/appearanceState.ts +240 -0
  237. package/registry/ui/lib/appearance/applyAppearance.ts +36 -0
  238. package/registry/ui/lib/appearance/cloudOrbAppearance.ts +36 -0
  239. package/registry/ui/lib/appearance/color.ts +96 -0
  240. package/registry/ui/lib/appearance/deriveTokens.ts +218 -0
  241. package/registry/ui/lib/appearance/index.ts +6 -0
  242. package/registry/ui/lib/appearance/markTokens.ts +49 -0
  243. package/registry/ui/lib/appearance/readLayoutMetrics.ts +28 -0
  244. package/registry/ui/lib/bar-overflow.ts +41 -0
  245. package/registry/ui/lib/logger.ts +53 -0
  246. package/registry/ui/lib/menu-motion.ts +187 -0
  247. package/registry/ui/lib/nm-class.ts +4 -0
  248. package/registry/ui/lib/nordman-ui-locale.ts +43 -0
  249. package/registry/ui/styles/interface-theme.css +196 -0
  250. package/registry/ui/styles/light-appearance.css +72 -0
  251. package/registry/ui/styles/tokens.css +424 -0
  252. package/registry/ui/styles/utilities.css +12 -0
  253. package/dist/ui/components/nm-accordion/nm-accordion.d.ts +0 -6
@@ -0,0 +1,38 @@
1
+ import type { ComponentProps } from 'react';
2
+ export declare const NM_TABLE_VARIANTS: readonly ['default', 'striped', 'lined', 'plain'];
3
+ export declare const NM_TABLE_SIZES: readonly ['default', 'sm'];
4
+ export type NmTableVariant = (typeof NM_TABLE_VARIANTS)[number];
5
+ export type NmTableSize = (typeof NM_TABLE_SIZES)[number];
6
+ type TableOptions = {
7
+ /** default has a line between rows. striped alternates the row fill. lined draws every cell. plain has no lines. */
8
+ variant?: NmTableVariant;
9
+ size?: NmTableSize;
10
+ /** Keeps the header in view while the body scrolls. Give the container a height with `maxHeight`. */
11
+ stickyHeader?: boolean;
12
+ /** The container's maximum height. The body scrolls past it. */
13
+ maxHeight?: string;
14
+ };
15
+ /** The shadcn Table composition, styled by NIF tokens. The container scrolls sideways when the table is wider than its space. */
16
+ export declare function NmTable({ className, variant, size, stickyHeader, maxHeight, ...props }: ComponentProps<'table'> & TableOptions): import("react").JSX.Element;
17
+ export declare function NmTableHeader({ className, ...props }: ComponentProps<'thead'>): import("react").JSX.Element;
18
+ export declare function NmTableBody({ className, ...props }: ComponentProps<'tbody'>): import("react").JSX.Element;
19
+ export declare function NmTableFooter({ className, ...props }: ComponentProps<'tfoot'>): import("react").JSX.Element;
20
+ /** A row. `selected` marks it chosen. `disabled` dims it and stops its hover. Give it `onClick` to make the whole row a target. */
21
+ export declare function NmTableRow({ className, selected, disabled, ...props }: ComponentProps<'tr'> & {
22
+ selected?: boolean;
23
+ disabled?: boolean;
24
+ }): import("react").JSX.Element;
25
+ export type NmSortDirection = 'asc' | 'desc' | 'none';
26
+ /** A column heading. Give it `sort` and `onSort` and it becomes a sort button. `textAlign="end"` is for numbers. */
27
+ export declare function NmTableHead({ className, textAlign, sort, onSort, children, ...props }: Omit<ComponentProps<'th'>, 'align'> & {
28
+ textAlign?: 'start' | 'center' | 'end';
29
+ sort?: NmSortDirection;
30
+ onSort?: () => void;
31
+ }): import("react").JSX.Element;
32
+ /** Cells stay on one line. Give `wrap` to a cell that holds a sentence, and it wraps and aligns to the top. */
33
+ export declare function NmTableCell({ className, textAlign, wrap, ...props }: Omit<ComponentProps<'td'>, 'align'> & {
34
+ textAlign?: 'start' | 'center' | 'end';
35
+ wrap?: boolean;
36
+ }): import("react").JSX.Element;
37
+ export declare function NmTableCaption({ className, ...props }: ComponentProps<'caption'>): import("react").JSX.Element;
38
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { ComponentProps } from 'react';
2
+ export declare function NmTextarea({ className, ...props }: ComponentProps<'textarea'>): import("react").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ import { Toolbar as ToolbarPrimitive } from '@base-ui/react/toolbar';
3
+ import type { NmIconId } from '../../config/nm-icons.ts';
4
+ import { type NmIconButtonTone } from '../../config/nm-icon-button.ts';
5
+ /** Base UI Toolbar, in the shadcn composition, styled by NIF tokens. One tab stop, arrow keys move between controls. */
6
+ export declare function NmToolbar({ className, ...props }: ToolbarPrimitive.Root.Props): import("react").JSX.Element;
7
+ export declare function NmToolbarGroup({ className, ...props }: ToolbarPrimitive.Group.Props): import("react").JSX.Element;
8
+ /** A vertical line between groups, such as between two panes. It follows the Contrast setting. */
9
+ export declare function NmToolbarSeparator({ className, ...props }: ToolbarPrimitive.Separator.Props): import("react").JSX.Element;
10
+ /** Takes the free space, pushing what follows to the end. */
11
+ export declare function NmToolbarSpacer({ className, ...props }: ComponentProps<'span'>): import("react").JSX.Element;
12
+ /** An icon button, or a button with text. `label` is its accessible name. */
13
+ export declare function NmToolbarButton({ icon, label, tone, pressed, className, children, ...props }: Omit<ToolbarPrimitive.Button.Props, 'children'> & {
14
+ icon?: NmIconId;
15
+ label: string;
16
+ tone?: NmIconButtonTone;
17
+ pressed?: boolean;
18
+ children?: ReactNode;
19
+ }): import("react").JSX.Element;
20
+ /** A field in the bar that takes the free width, such as an address. */
21
+ export declare function NmToolbarInput({ className, ...props }: ToolbarPrimitive.Input.Props): import("react").JSX.Element;
@@ -15,9 +15,6 @@ export declare const NM_AI_CLASSES: {
15
15
  readonly turnUser: 'nm-ai-turn--user';
16
16
  readonly turnBody: 'nm-ai-turn__body';
17
17
  readonly turnFooter: 'nm-ai-turn__footer';
18
- readonly code: 'nm-ai-code';
19
- readonly codeLabel: 'nm-ai-code__label';
20
- readonly badge: 'nm-ai-badge';
21
18
  readonly item: 'nm-ai-item';
22
19
  readonly itemMedia: 'nm-ai-item__media';
23
20
  readonly itemBody: 'nm-ai-item__body';
@@ -9,6 +9,40 @@ export declare const NM_UI_FONT_SIZE_PX: {
9
9
  readonly max: 16;
10
10
  readonly default: 14;
11
11
  };
12
+ /** Poppins ships nine weights. The setting is the Regular weight. Medium, semibold and bold step up from it. */
13
+ export declare const NM_FONT_WEIGHTS: readonly [{
14
+ readonly id: '100';
15
+ readonly label: 'Thin';
16
+ }, {
17
+ readonly id: '200';
18
+ readonly label: 'ExtraLight';
19
+ }, {
20
+ readonly id: '300';
21
+ readonly label: 'Light';
22
+ }, {
23
+ readonly id: '400';
24
+ readonly label: 'Regular';
25
+ }, {
26
+ readonly id: '500';
27
+ readonly label: 'Medium';
28
+ }, {
29
+ readonly id: '600';
30
+ readonly label: 'SemiBold';
31
+ }, {
32
+ readonly id: '700';
33
+ readonly label: 'Bold';
34
+ }, {
35
+ readonly id: '800';
36
+ readonly label: 'ExtraBold';
37
+ }, {
38
+ readonly id: '900';
39
+ readonly label: 'Black';
40
+ }];
41
+ export declare const NM_UI_FONT_WEIGHT: {
42
+ readonly min: 100;
43
+ readonly max: 900;
44
+ readonly default: 400;
45
+ };
12
46
  export declare const NM_UI_ICON_SIZE_PX: {
13
47
  readonly min: 14;
14
48
  readonly max: 24;
@@ -55,11 +89,12 @@ export declare const NM_APPEARANCE_DEFAULTS: {
55
89
  readonly backgroundHex: "#000000";
56
90
  readonly foregroundHex: "#ededed";
57
91
  readonly uiFontSizePx: 14;
92
+ readonly uiFontWeight: number;
58
93
  readonly uiIconSizePx: 18;
59
94
  readonly uiRadiusPercent: 100;
60
95
  readonly uiSpacePercent: 100;
61
96
  readonly contrast: 0;
62
97
  };
63
- export declare const NM_APPEARANCE_CSS_VARS: readonly ['--nm-canvas', '--nm-fg', '--nm-fg-muted', '--nm-fg-subtle', '--nm-stroke', '--nm-line', '--nm-line-strong', '--control-fs', '--nm-panel', '--nm-raised', '--nm-inset', '--nm-mark-primary', '--nm-mark-secondary', '--nm-mark-tertiary', '--nm-mark-surface', '--nm-canvas-rgb', '--nm-fg-rgb', '--nm-fg-muted-rgb', '--nm-fg-subtle-rgb', '--nm-stroke-rgb', '--nm-line-rgb', '--nm-panel-rgb', '--nm-raised-rgb', '--nm-inset-rgb', '--sand', '--nm-accent', '--nm-accent-rgb', '--orb-ui-cloud-appearance-deepColor', '--orb-ui-cloud-appearance-upperColor', '--orb-ui-cloud-appearance-lowerColor', '--orb-ui-cloud-appearance-highlightColor', '--orb-ui-cloud-appearance-launchColor', '--orb-ui-cloud-appearance-spinnerColor', '--nm-type-body', '--nm-type-ui', '--nm-type-ui-sm', '--nm-type-lede', '--nm-type-section', '--nm-type-card', '--nm-type-caption', '--markdown-font-size', '--font-size-base', '--font-size-sm', '--nm-icon-button', '--nm-icon-sm', '--nm-rail-icon', '--nm-ui-chip-min-height', '--nm-radius-scale', '--nm-space-scale', '--text-primary', '--text-secondary', '--text-tertiary', '--text-muted', '--presentation', '--surface-primary', '--surface-chat', '--surface-secondary', '--surface-secondary-alt', '--surface-tertiary', '--surface-primary-alt', '--surface-dialog', '--surface-hover', '--surface-active', '--border-light', '--border-medium', '--link', '--link-hover', '--link-visited', '--accent-primary', '--ring-primary', '--brand-purple', '--nordman-accent'];
98
+ export declare const NM_APPEARANCE_CSS_VARS: readonly ['--nm-canvas', '--nm-fg', '--nm-fg-muted', '--nm-fg-subtle', '--nm-stroke', '--nm-line', '--nm-line-strong', '--nm-divider', '--control-fs', '--nm-panel', '--nm-raised', '--nm-inset', '--nm-mark-primary', '--nm-mark-secondary', '--nm-mark-tertiary', '--nm-mark-surface', '--nm-canvas-rgb', '--nm-fg-rgb', '--nm-fg-muted-rgb', '--nm-fg-subtle-rgb', '--nm-stroke-rgb', '--nm-line-rgb', '--nm-panel-rgb', '--nm-raised-rgb', '--nm-inset-rgb', '--sand', '--nm-accent', '--nm-accent-rgb', '--orb-ui-cloud-appearance-deepColor', '--orb-ui-cloud-appearance-upperColor', '--orb-ui-cloud-appearance-lowerColor', '--orb-ui-cloud-appearance-highlightColor', '--orb-ui-cloud-appearance-launchColor', '--orb-ui-cloud-appearance-spinnerColor', '--nm-weight-light', '--nm-weight-regular', '--nm-weight-medium', '--nm-weight-semibold', '--nm-weight-bold', '--nm-type-body', '--nm-type-ui', '--nm-type-ui-sm', '--nm-type-lede', '--nm-type-section', '--nm-type-card', '--nm-type-caption', '--markdown-font-size', '--font-size-base', '--font-size-sm', '--nm-icon-button', '--nm-icon-sm', '--nm-rail-icon', '--nm-ui-chip-min-height', '--nm-radius-scale', '--nm-space-scale', '--text-primary', '--text-secondary', '--text-tertiary', '--text-muted', '--presentation', '--surface-primary', '--surface-chat', '--surface-secondary', '--surface-secondary-alt', '--surface-tertiary', '--surface-primary-alt', '--surface-dialog', '--surface-hover', '--surface-active', '--border-light', '--border-medium', '--link', '--link-hover', '--link-visited', '--accent-primary', '--ring-primary', '--brand-purple', '--nordman-accent'];
64
99
  export declare function findThemePreset(id: string): NmThemePresetDefinition | undefined;
65
100
  export declare function defaultThemePresetId(): string;
@@ -25,6 +25,7 @@ export declare const NM_BUTTON_CLASSES: {
25
25
  readonly chip: 'nm-button--chip';
26
26
  readonly large: 'nm-button--large';
27
27
  readonly block: 'nm-button--block';
28
+ readonly icon: 'nm-button--icon';
28
29
  };
29
30
  /** The button's class names, for triggers that must stay a Base UI part, such as a menu or popover trigger. */
30
- export declare function nmButtonClassName(tone: NmButtonTone, size?: NmButtonSize): string;
31
+ export declare function nmButtonClassName(tone: NmButtonTone, size?: NmButtonSize, iconOnly?: boolean): string;
@@ -16,14 +16,13 @@ export declare const NM_COMPOSER_COPY: {
16
16
  };
17
17
  export declare const NM_COMPOSER_CLASSES: {
18
18
  readonly root: 'nm-composer';
19
+ readonly stack: 'nm-composer-stack';
19
20
  readonly main: 'nm-composer__main';
20
21
  readonly queue: 'nm-composer__queue';
21
22
  readonly queued: 'nm-composer__queued';
22
23
  readonly queuedText: 'nm-composer__queued-text';
23
24
  readonly queuedActions: 'nm-composer__queued-actions';
24
25
  readonly attachments: 'nm-composer__attachments';
25
- readonly attachment: 'nm-composer__attachment';
26
- readonly remove: 'nm-composer__remove';
27
26
  readonly field: 'nm-composer__field';
28
27
  readonly bar: 'nm-composer__bar';
29
28
  readonly start: 'nm-composer__start';
@@ -15,6 +15,8 @@ export type NmFieldLayout = (typeof NM_FIELD_LAYOUT)[keyof typeof NM_FIELD_LAYOU
15
15
  export type NmFieldOption = {
16
16
  id: string;
17
17
  label: string;
18
+ /** Colours shown after the label, such as a theme's background, foreground and accent. */
19
+ swatches?: readonly string[];
18
20
  };
19
21
  export declare const NM_FIELD_CLASSES: {
20
22
  readonly root: 'nm-field';
@@ -1,4 +1,4 @@
1
- export declare const NM_ICON_IDS: readonly ['plus', 'user', 'paperclip', 'settings', 'globe', 'spreadsheet', 'pointer', 'mouse-pointer', 'mic', 'mic-off', 'audio-lines', 'send', 'chevron', 'check', 'circle-check', 'code', 'file-code', 'console', 'copy', 'volume', 'fork', 'chat', 'chat-dashed', 'folder', 'bot', 'app', 'layers', 'users', 'library', 'panel', 'ellipsis', 'camera', 'reload', 'expand', 'arrow-up-right', 'minimize', 'download', 'publish', 'share', 'pen', 'pin', 'archive', 'trash', 'folder-in', 'folder-out', 'duplicate', 'logout', 'table-properties', 'cable', 'menu', 'loader', 'monitor', 'server', 'filter', 'sliders', 'upload', 'image', 'image-plus', 'music', 'headphones', 'video', 'search', 'presentation', 'terminal', 'square-terminal', 'x', 'save', 'lock', 'mail', 'calendar', 'play', 'workflow', 'hard-drive', 'slack', 'github', 'building', 'file-text', 'wrench', 'file', 'brain', 'sun', 'moon', 'google'];
1
+ export declare const NM_ICON_IDS: readonly ['plus', 'user', 'paperclip', 'settings', 'globe', 'spreadsheet', 'pointer', 'mouse-pointer', 'mic', 'mic-off', 'audio-lines', 'send', 'chevron', 'check', 'circle-check', 'code', 'file-code', 'console', 'copy', 'volume', 'fork', 'chat', 'chat-dashed', 'folder', 'bot', 'app', 'layers', 'users', 'library', 'panel', 'ellipsis', 'camera', 'reload', 'expand', 'arrow-up-right', 'minimize', 'download', 'publish', 'share', 'pen', 'pin', 'archive', 'trash', 'folder-in', 'folder-out', 'duplicate', 'logout', 'table-properties', 'cable', 'menu', 'loader', 'monitor', 'server', 'filter', 'sliders', 'upload', 'image', 'image-plus', 'music', 'headphones', 'video', 'search', 'presentation', 'terminal', 'square-terminal', 'x', 'save', 'lock', 'mail', 'calendar', 'clock', 'gauge', 'minus', 'play', 'workflow', 'hard-drive', 'slack', 'github', 'building', 'file-text', 'wrench', 'file', 'brain', 'sun', 'moon', 'google', 'arrow-left', 'arrow-right', 'panel-left', 'rows'];
2
2
  export type NmIconId = (typeof NM_ICON_IDS)[number];
3
3
  export type NmIconSpec = {
4
4
  viewBox: string;
@@ -312,6 +312,18 @@ export declare const NM_ICONS: {
312
312
  readonly viewBox: '0 0 24 24';
313
313
  readonly path: 'M5 5h14v16H5zM5 10h14M8 3v4M16 3v4';
314
314
  };
315
+ readonly minus: {
316
+ readonly viewBox: '0 0 24 24';
317
+ readonly path: 'M5 12h14';
318
+ };
319
+ readonly gauge: {
320
+ readonly viewBox: '0 0 24 24';
321
+ readonly path: readonly ["M12 14l4-4", "M3.34 19a10 10 0 1 1 17.32 0"];
322
+ };
323
+ readonly clock: {
324
+ readonly viewBox: '0 0 24 24';
325
+ readonly path: readonly ["M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18z", "M12 7v5l3 2"];
326
+ };
315
327
  readonly play: {
316
328
  readonly viewBox: '0 0 24 24';
317
329
  readonly path: 'M6 4l14 8-14 8z';
@@ -25,10 +25,10 @@ export declare const NM_RADIUS_CSS_VARS: {
25
25
  /** Must match `tokens.css` — validated by `nm-radius.test.ts`. */
26
26
  export declare const NM_RADIUS_FORMULAS: {
27
27
  readonly control: 'calc(var(--nm-icon-control) / 2 * var(--nm-radius-scale))';
28
- readonly composer: 'calc((var(--nm-icon-control) / 2 + var(--nm-space-24)) * var(--nm-radius-scale))';
29
- readonly field: 'calc((var(--nm-icon-control) / 2 + var(--nm-space-12)) * var(--nm-radius-scale))';
30
- readonly menu: 'calc((var(--nm-icon-control) / 2 + var(--nm-space-8)) * var(--nm-radius-scale))';
31
- readonly row: 'calc((var(--nm-icon-control) / 2 + var(--nm-space-4)) * var(--nm-radius-scale))';
28
+ readonly composer: 'var(--nm-radius-lg)';
29
+ readonly field: 'var(--nm-control-r)';
30
+ readonly menu: 'var(--nm-radius-lg)';
31
+ readonly row: 'var(--nm-control-r)';
32
32
  };
33
33
  export declare const NM_RADIUS_PRIMITIVE_FORMULAS: {
34
34
  readonly sm: 'calc(4px * var(--nm-radius-scale))';
@@ -0,0 +1,33 @@
1
+ /** What the side panel can show. Each kind has an icon, so a toolbar can open it. */
2
+ export declare const NM_SIDE_PANEL_KINDS: readonly [{
3
+ readonly id: 'app';
4
+ readonly label: 'App';
5
+ readonly icon: 'app';
6
+ }, {
7
+ readonly id: 'code';
8
+ readonly label: 'Code';
9
+ readonly icon: 'code';
10
+ }, {
11
+ readonly id: 'files';
12
+ readonly label: 'Files';
13
+ readonly icon: 'folder';
14
+ }, {
15
+ readonly id: 'artifact';
16
+ readonly label: 'Artifact';
17
+ readonly icon: 'layers';
18
+ }, {
19
+ readonly id: 'media';
20
+ readonly label: 'Media';
21
+ readonly icon: 'image';
22
+ }, {
23
+ readonly id: 'docs';
24
+ readonly label: 'Docs';
25
+ readonly icon: 'file-text';
26
+ }, {
27
+ readonly id: 'markdown';
28
+ readonly label: 'Markdown';
29
+ readonly icon: 'file-code';
30
+ }];
31
+ export type NmSidePanelKind = (typeof NM_SIDE_PANEL_KINDS)[number]['id'];
32
+ export declare const NM_SIDE_PANEL_SIZES: readonly ['narrow', 'default', 'wide'];
33
+ export type NmSidePanelSize = (typeof NM_SIDE_PANEL_SIZES)[number];
@@ -7,6 +7,7 @@ export type NmAppearanceState = {
7
7
  backgroundHex: string;
8
8
  foregroundHex: string;
9
9
  uiFontSizePx: number;
10
+ uiFontWeight: number;
10
11
  uiIconSizePx: number;
11
12
  uiRadiusPercent: number;
12
13
  uiSpacePercent: number;
@@ -1,4 +1,6 @@
1
1
  import type { NmAppearanceState } from './appearanceState.ts';
2
2
  export type NmDerivedAppearanceTokens = Record<string, string>;
3
+ /** The accent colour that is in effect for these settings. */
4
+ export declare function resolveAccentHex(state: NmAppearanceState): string;
3
5
  export declare function deriveAppearanceTokens(state: NmAppearanceState, scheme: 'light' | 'dark'): NmDerivedAppearanceTokens;
4
6
  export declare function themeModeFromAppearance(mode: NmAppearanceState['mode']): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nordmanai/nif",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "Nordman Interface Framework: the one UI and UX system for every Nordman product. Base UI, in the shadcn composition, styled by NIF tokens.",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -22,18 +22,20 @@
22
22
  "files": [
23
23
  "dist",
24
24
  "interface",
25
+ "registry",
26
+ "bin",
25
27
  "README.md"
26
28
  ],
27
29
  "scripts": {
28
30
  "sync": "npm run ui:sync --prefix ..",
29
31
  "build": "node build.mjs",
30
- "prepublishOnly": "npm run build",
32
+ "prepublishOnly": "npm run build && npm run test:layout --prefix ../design",
31
33
  "prebuild": "node ../scripts/nif-check.mjs"
32
34
  },
33
35
  "peerDependencies": {
34
36
  "@base-ui/react": "^1.9.0",
35
37
  "framer-motion": ">=12.0.0",
36
- "lucide-react": ">=0.525.0",
38
+ "lucide-react": ">=0.525.0 <1",
37
39
  "orb-ui": "^0.10.0",
38
40
  "react": "^18.3.0 || ^19.0.0",
39
41
  "react-dom": "^18.3.0 || ^19.0.0"
@@ -68,6 +70,12 @@
68
70
  },
69
71
  "dependencies": {
70
72
  "@fontsource/geist-mono": "^5.2.0",
71
- "@fontsource/poppins": "^5.2.0"
73
+ "@fontsource/poppins": "^5.2.0",
74
+ "cmdk": "^1.1.1",
75
+ "react-colorful": "^5.8.1",
76
+ "react-day-picker": "^10.0.2"
77
+ },
78
+ "bin": {
79
+ "nif": "./bin/nif.mjs"
72
80
  }
73
81
  }