@nordmanai/nif 0.1.0 → 0.2.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 (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 +110 -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 +87 -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,686 @@
1
+ .nm-message {
2
+ display: flex;
3
+ min-width: 0;
4
+ flex: 1 1 auto;
5
+ }
6
+
7
+ .nm-message--user {
8
+ justify-content: flex-end;
9
+ }
10
+
11
+ .nm-message--assistant {
12
+ justify-content: flex-start;
13
+ align-items: flex-start;
14
+ }
15
+
16
+ .nm-message__stack {
17
+ display: flex;
18
+ width: 100%;
19
+ flex-direction: column;
20
+ align-items: flex-start;
21
+ gap: var(--nm-space-12);
22
+ }
23
+
24
+ .nm-message__stack--user {
25
+ width: auto;
26
+ max-width: 100%;
27
+ align-items: flex-end;
28
+ }
29
+
30
+ .nm-message__bubble,
31
+ .nm-message__body,
32
+ .nm-message__think,
33
+ .nm-message-meta__label {
34
+ font-family: var(--nm-font);
35
+ font-size: var(--nm-type-body);
36
+ font-weight: var(--nm-weight-regular);
37
+ }
38
+
39
+ .nm-message__bubble {
40
+ display: flex;
41
+ width: fit-content;
42
+ max-width: 100%;
43
+ align-items: flex-start;
44
+ justify-content: flex-start;
45
+ padding: var(--nm-space-10) var(--nm-space-16);
46
+ border-radius: var(--nm-row-radius);
47
+ background: var(--nm-raised);
48
+ color: var(--nm-fg);
49
+ line-height: var(--nm-leading-normal);
50
+ text-align: start;
51
+ overflow-wrap: anywhere;
52
+ }
53
+
54
+ .nm-message__bubble .markdown,
55
+ .nm-message__body .markdown,
56
+ .nm-message__body .text-message {
57
+ font-family: var(--nm-font);
58
+ font-size: var(--nm-type-body);
59
+ font-weight: var(--nm-weight-regular);
60
+ color: var(--nm-fg);
61
+ }
62
+
63
+ .nm-message__body {
64
+ width: 100%;
65
+ min-width: 0;
66
+ max-width: 100%;
67
+ color: var(--nm-fg);
68
+ line-height: var(--nm-leading-relaxed);
69
+ overflow-wrap: anywhere;
70
+ }
71
+
72
+ .nm-message__body :where(a, button),
73
+ .nm-message__bubble :where(a, button),
74
+ .nm-message__body [data-sd-animate],
75
+ .nm-message__bubble [data-sd-animate],
76
+ .nm-message__body :not(pre) > code,
77
+ .nm-message__bubble :not(pre) > code {
78
+ white-space: normal;
79
+ overflow-wrap: anywhere;
80
+ word-break: break-word;
81
+ }
82
+
83
+ .nm-message__body pre,
84
+ .nm-message__bubble pre {
85
+ max-width: 100%;
86
+ overflow-x: auto;
87
+ }
88
+
89
+ .nm-message__flow {
90
+ display: flex;
91
+ width: 100%;
92
+ min-width: 0;
93
+ flex-direction: column;
94
+ align-items: stretch;
95
+ gap: var(--nm-space-16);
96
+ }
97
+
98
+ .nm-message__body .markdown.prose,
99
+ .nm-message__bubble .markdown.prose {
100
+ max-width: none;
101
+ color: var(--nm-fg);
102
+ font-size: var(--nm-type-body);
103
+ line-height: var(--nm-leading-relaxed);
104
+ --tw-prose-body: var(--nm-fg);
105
+ --tw-prose-headings: var(--nm-fg);
106
+ --tw-prose-bold: var(--nm-fg);
107
+ --tw-prose-quotes: var(--nm-fg-subtle);
108
+ --tw-prose-quote-borders: var(--nm-line);
109
+ --tw-prose-links: var(--nm-fg-subtle);
110
+ }
111
+
112
+ .nm-message__body .markdown.prose > :first-child,
113
+ .nm-message__bubble .markdown.prose > :first-child {
114
+ margin-top: 0;
115
+ }
116
+
117
+ .nm-message__body .markdown.prose > :last-child,
118
+ .nm-message__bubble .markdown.prose > :last-child {
119
+ margin-bottom: 0;
120
+ }
121
+
122
+ .nm-message__body .markdown.prose :where(p),
123
+ .nm-message__bubble .markdown.prose :where(p) {
124
+ margin-top: 0;
125
+ margin-bottom: 0.75em;
126
+ }
127
+
128
+ .nm-message__body .markdown.prose :where(h1),
129
+ .nm-message__bubble .markdown.prose :where(h1) {
130
+ font-size: 1.25rem;
131
+ font-weight: var(--nm-weight-semibold);
132
+ line-height: var(--nm-leading-snug);
133
+ margin: 1em 0 0.4em;
134
+ }
135
+
136
+ .nm-message__body .markdown.prose :where(h2),
137
+ .nm-message__bubble .markdown.prose :where(h2) {
138
+ font-size: 1.125rem;
139
+ font-weight: var(--nm-weight-semibold);
140
+ line-height: var(--nm-leading-snug);
141
+ margin: 0.9em 0 0.35em;
142
+ }
143
+
144
+ .nm-message__body .markdown.prose :where(h3),
145
+ .nm-message__body .markdown.prose :where(h4),
146
+ .nm-message__bubble .markdown.prose :where(h3),
147
+ .nm-message__bubble .markdown.prose :where(h4) {
148
+ font-size: 1rem;
149
+ font-weight: var(--nm-weight-semibold);
150
+ line-height: var(--nm-leading-snug);
151
+ margin: 0.85em 0 0.3em;
152
+ }
153
+
154
+ .nm-message__body .markdown.prose :where(ul, ol),
155
+ .nm-message__bubble .markdown.prose :where(ul, ol) {
156
+ margin-top: 0.35em;
157
+ margin-bottom: 0.75em;
158
+ padding-inline-start: 1.25em;
159
+ }
160
+
161
+ .nm-message__body .markdown.prose :where(li),
162
+ .nm-message__bubble .markdown.prose :where(li) {
163
+ margin-top: 0.2em;
164
+ margin-bottom: 0.2em;
165
+ }
166
+
167
+ .nm-message__body .markdown.prose :where(blockquote),
168
+ .nm-message__bubble .markdown.prose :where(blockquote) {
169
+ margin-top: 0.75em;
170
+ margin-bottom: 0.75em;
171
+ color: var(--nm-fg-subtle);
172
+ border-left-color: var(--nm-line);
173
+ font-weight: var(--nm-weight-regular);
174
+ }
175
+
176
+ .nm-message__body .markdown.prose :where(blockquote p:first-of-type)::before,
177
+ .nm-message__body .markdown.prose :where(blockquote p:last-of-type)::after,
178
+ .nm-message__bubble .markdown.prose :where(blockquote p:first-of-type)::before,
179
+ .nm-message__bubble .markdown.prose :where(blockquote p:last-of-type)::after {
180
+ content: none;
181
+ }
182
+
183
+ .nm-message__status {
184
+ margin: 0;
185
+ color: var(--nm-fg-subtle);
186
+ font-size: var(--nm-type-body);
187
+ line-height: var(--nm-leading-normal);
188
+ }
189
+
190
+ .nm-message__tools {
191
+ width: 100%;
192
+ min-width: 0;
193
+ color: var(--nm-fg-subtle);
194
+ }
195
+
196
+ .nm-message__tools button,
197
+ .nm-message__tool-line {
198
+ display: flex;
199
+ width: 100%;
200
+ align-items: flex-start;
201
+ gap: var(--nm-space-8);
202
+ margin: 0;
203
+ padding: var(--nm-icon-pad);
204
+ border: 0;
205
+ background: transparent;
206
+ color: inherit;
207
+ font: inherit;
208
+ font-size: var(--nm-type-spec);
209
+ line-height: var(--nm-leading-snug);
210
+ text-align: start;
211
+ }
212
+
213
+ .nm-message__tools button {
214
+ cursor: pointer;
215
+ }
216
+
217
+ .nm-message__tools button:hover {
218
+ color: var(--nm-fg);
219
+ }
220
+
221
+ .nm-message__tools button:focus-visible,
222
+ button.nm-message-meta:focus-visible {
223
+ outline: none;
224
+ }
225
+
226
+ .nm-message__tools button > span:not([class^='nm-trace']),
227
+ .nm-message__tool-line > span:not([class^='nm-trace']),
228
+ .nm-message__tools li > span:not([class^='nm-trace']) {
229
+ min-width: 0;
230
+ flex: 1;
231
+ overflow-wrap: anywhere;
232
+ }
233
+
234
+ .nm-message__tools svg {
235
+ width: var(--nm-icon-button);
236
+ height: var(--nm-icon-button);
237
+ flex: none;
238
+ }
239
+
240
+ .nm-message__tools button img,
241
+ .nm-message-meta__chevron {
242
+ width: var(--nm-icon-button);
243
+ height: var(--nm-icon-button);
244
+ flex: none;
245
+ transition: transform 160ms ease;
246
+ }
247
+
248
+ .nm-trace__icon img {
249
+ width: 0.875rem;
250
+ height: 0.875rem;
251
+ flex: none;
252
+ border-radius: 9999px;
253
+ }
254
+
255
+ .nm-message__tools button[aria-expanded='true'] img,
256
+ .nm-message-meta__chevron[data-open='true'] {
257
+ transform: rotate(90deg);
258
+ }
259
+
260
+ .nm-message__tools ul,
261
+ .nm-message__tools-body,
262
+ .nm-trace__content {
263
+ margin: 0;
264
+ padding: 0 0 var(--nm-space-4) var(--nm-space-24);
265
+ list-style: none;
266
+ }
267
+
268
+ .nm-message__tools ul:not([hidden]),
269
+ .nm-message__tools-body:not([hidden]),
270
+ .nm-trace__content:not([hidden]) {
271
+ display: flex;
272
+ flex-direction: column;
273
+ align-items: flex-start;
274
+ gap: var(--nm-space-2);
275
+ }
276
+
277
+ .nm-message__tools li {
278
+ display: flex;
279
+ align-items: flex-start;
280
+ gap: var(--nm-space-8);
281
+ padding: var(--nm-space-2) 0;
282
+ font-size: var(--nm-type-spec);
283
+ line-height: var(--nm-leading-snug);
284
+ }
285
+
286
+ .nm-trace {
287
+ display: flex;
288
+ flex-direction: column;
289
+ align-items: flex-start;
290
+ gap: var(--nm-space-2);
291
+ }
292
+
293
+ .nm-trace__collapsible {
294
+ display: flex;
295
+ width: 100%;
296
+ flex-direction: column;
297
+ align-items: flex-start;
298
+ }
299
+
300
+ .nm-trace__header {
301
+ display: flex;
302
+ width: fit-content;
303
+ max-width: 100%;
304
+ align-items: center;
305
+ gap: var(--nm-space-8);
306
+ }
307
+
308
+ .nm-trace__header > .nm-trace__trigger {
309
+ flex: 0 1 auto;
310
+ min-width: 0;
311
+ }
312
+
313
+ .nm-trace__action {
314
+ display: inline-flex;
315
+ flex: none;
316
+ align-items: center;
317
+ }
318
+
319
+ .nm-trace__trigger > .nm-trace__line {
320
+ padding: 0;
321
+ width: auto;
322
+ flex: 0 1 auto;
323
+ min-width: 0;
324
+ }
325
+
326
+ .nm-message__tools button.nm-trace__trigger {
327
+ display: flex;
328
+ width: fit-content;
329
+ max-width: 100%;
330
+ align-items: center;
331
+ gap: var(--nm-space-8);
332
+ }
333
+
334
+ .nm-message__tools li.nm-trace__line,
335
+ .nm-message__tools .nm-trace__line,
336
+ .nm-trace__line {
337
+ display: flex;
338
+ width: fit-content;
339
+ max-width: 100%;
340
+ min-width: 0;
341
+ align-items: center;
342
+ gap: var(--nm-space-8);
343
+ }
344
+
345
+ .nm-trace__line[data-status='running'] {
346
+ color: var(--nm-fg);
347
+ }
348
+
349
+ .nm-trace__line[data-status='pending'] {
350
+ color: var(--nm-stroke);
351
+ }
352
+
353
+ .nm-trace__line[data-status='error'] {
354
+ color: var(--nm-destructive);
355
+ }
356
+
357
+ .nm-message__tools .nm-trace__icon,
358
+ .nm-trace__icon {
359
+ display: inline-flex;
360
+ width: var(--nm-icon-button);
361
+ height: var(--nm-icon-button);
362
+ flex: 0 0 var(--nm-icon-button);
363
+ align-items: center;
364
+ justify-content: center;
365
+ }
366
+
367
+ /* A glyph drawn inside the icon box fills it, so the box is never taller than its icon. */
368
+ .nm-trace__icon > .nm-trace__icon {
369
+ display: block;
370
+ width: 100%;
371
+ height: 100%;
372
+ flex: none;
373
+ }
374
+
375
+ .nm-trace__icon--spin {
376
+ animation: nm-trace-spin 1s linear infinite;
377
+ }
378
+
379
+ @keyframes nm-trace-spin {
380
+ from {
381
+ transform: rotate(0deg);
382
+ }
383
+
384
+ to {
385
+ transform: rotate(360deg);
386
+ }
387
+ }
388
+
389
+ .nm-message__tools .nm-trace__title,
390
+ .nm-trace__title {
391
+ min-width: 0;
392
+ flex: 0 1 auto;
393
+ overflow: hidden;
394
+ text-overflow: ellipsis;
395
+ white-space: nowrap;
396
+ }
397
+
398
+ .nm-message__tools .nm-trace__description,
399
+ .nm-trace__description {
400
+ flex: 0 0 auto;
401
+ color: var(--nm-stroke);
402
+ font-size: var(--nm-type-ui-sm);
403
+ line-height: var(--nm-leading-snug);
404
+ white-space: nowrap;
405
+ }
406
+
407
+ .nm-message__tools .nm-trace__badges,
408
+ .nm-trace__badges {
409
+ display: inline-flex;
410
+ flex: 0 0 auto;
411
+ flex-wrap: wrap;
412
+ align-items: center;
413
+ gap: var(--nm-space-4);
414
+ }
415
+
416
+ .nm-message__tools .nm-trace__badge,
417
+ .nm-trace__badge {
418
+ display: inline-flex;
419
+ flex: 0 0 auto;
420
+ align-items: center;
421
+ gap: var(--nm-space-4);
422
+ height: var(--badge-h);
423
+ padding: 0 var(--badge-px);
424
+ border: 0;
425
+ border-radius: var(--badge-r);
426
+ background: var(--nm-panel);
427
+ color: var(--nm-fg);
428
+ font-family: var(--nm-font);
429
+ font-size: var(--badge-fs);
430
+ font-weight: var(--control-fw);
431
+ line-height: var(--nm-leading-none);
432
+ white-space: nowrap;
433
+ }
434
+
435
+ .nm-trace__badge img {
436
+ width: 0.75rem;
437
+ height: 0.75rem;
438
+ flex: 0 0 0.75rem;
439
+ border-radius: 9999px;
440
+ }
441
+
442
+ .nm-trace__link {
443
+ display: flex;
444
+ width: fit-content;
445
+ max-width: 100%;
446
+ min-width: 0;
447
+ padding: var(--nm-space-2) 0;
448
+ color: var(--nm-fg-subtle);
449
+ text-decoration: none;
450
+ font-size: var(--nm-type-spec);
451
+ line-height: var(--nm-leading-snug);
452
+ }
453
+
454
+ .nm-trace__link:hover,
455
+ .nm-trace__link:focus-visible {
456
+ color: var(--nm-fg);
457
+ outline: none;
458
+ }
459
+
460
+ .nm-trace__content[hidden] {
461
+ display: none;
462
+ }
463
+
464
+ .nm-message__think {
465
+ width: 100%;
466
+ max-height: 16rem;
467
+ overflow: auto;
468
+ color: var(--nm-fg-subtle);
469
+ font-size: var(--nm-type-spec);
470
+ line-height: var(--nm-leading-normal);
471
+ white-space: pre-wrap;
472
+ overflow-wrap: anywhere;
473
+ }
474
+
475
+ .nm-message__think:has(.nm-reasoning-markdown) {
476
+ white-space: normal;
477
+ }
478
+
479
+ .nm-message__work {
480
+ display: flex;
481
+ width: 100%;
482
+ flex-direction: column;
483
+ align-items: flex-start;
484
+ gap: var(--nm-space-4);
485
+ margin: 0;
486
+ padding: 0;
487
+ list-style: none;
488
+ }
489
+
490
+ .nm-message__work-item,
491
+ .nm-message__work-error {
492
+ font-family: var(--nm-font);
493
+ font-size: var(--nm-type-body);
494
+ font-weight: var(--nm-weight-regular);
495
+ line-height: normal;
496
+ word-break: break-word;
497
+ }
498
+
499
+ .nm-message__work-item {
500
+ color: var(--nm-stroke);
501
+ }
502
+
503
+ .nm-message__work-error {
504
+ color: var(--nm-fg);
505
+ }
506
+
507
+ .nm-message-meta {
508
+ display: flex;
509
+ align-items: flex-start;
510
+ gap: var(--nm-space-2);
511
+ margin: 0;
512
+ padding: 0;
513
+ border: 0;
514
+ background: transparent;
515
+ color: inherit;
516
+ font: inherit;
517
+ text-align: start;
518
+ }
519
+
520
+ button.nm-message-meta {
521
+ cursor: pointer;
522
+ }
523
+
524
+ button.nm-message-meta:hover .nm-message-meta__label {
525
+ color: var(--nm-fg);
526
+ }
527
+
528
+ .nm-message-meta__label {
529
+ margin: 0;
530
+ color: var(--nm-fg-subtle);
531
+ line-height: var(--nm-leading-snug);
532
+ }
533
+
534
+ .nm-text-shimmer {
535
+ display: inline-block;
536
+ color: transparent;
537
+ background-image:
538
+ linear-gradient(
539
+ 90deg,
540
+ transparent calc(50% - var(--nm-shimmer-spread)),
541
+ var(--nm-fg) 50%,
542
+ transparent calc(50% + var(--nm-shimmer-spread))
543
+ ),
544
+ linear-gradient(var(--nm-stroke), var(--nm-stroke));
545
+ background-size: var(--nm-shimmer-travel) 100%, auto;
546
+ background-repeat: no-repeat;
547
+ -webkit-background-clip: text;
548
+ background-clip: text;
549
+ animation: nm-text-shimmer var(--nm-shimmer-duration) linear infinite;
550
+ }
551
+
552
+ @keyframes nm-text-shimmer {
553
+ from {
554
+ background-position: 100% center, 0 0;
555
+ }
556
+
557
+ to {
558
+ background-position: 0% center, 0 0;
559
+ }
560
+ }
561
+
562
+ @media (prefers-reduced-motion: reduce) {
563
+ .nm-text-shimmer {
564
+ color: var(--nm-fg-subtle);
565
+ background: none;
566
+ animation: none;
567
+ }
568
+
569
+ .nm-trace__icon--spin {
570
+ animation: none;
571
+ }
572
+
573
+ .nm-message__tools button img,
574
+ .nm-message-meta__chevron {
575
+ transition: none;
576
+ }
577
+ }
578
+
579
+ .nm-message-actions {
580
+ display: flex;
581
+ align-items: center;
582
+ gap: 0;
583
+ }
584
+
585
+ @media (hover: hover) {
586
+ .message-render .nm-message-actions--reveal {
587
+ opacity: 0;
588
+ transition:
589
+ opacity var(--reveal) ease-out,
590
+ color var(--reveal) ease-out,
591
+ background-color var(--reveal) ease-out;
592
+ }
593
+
594
+ .message-render:hover .nm-message-actions--reveal,
595
+ .message-render:focus-visible .nm-message-actions--reveal,
596
+ .message-render:has(:focus-visible:not(:is(input, textarea, [contenteditable])))
597
+ .nm-message-actions--reveal {
598
+ opacity: 1;
599
+ }
600
+ }
601
+
602
+ @media (prefers-reduced-motion: reduce) {
603
+ .message-render .nm-message-actions--reveal {
604
+ transition: none;
605
+ }
606
+ }
607
+
608
+ .nm-approval {
609
+ display: flex;
610
+ flex-wrap: wrap;
611
+ align-items: center;
612
+ gap: var(--nm-space-10);
613
+ }
614
+
615
+ .nm-preview-card {
616
+ display: flex;
617
+ width: 100%;
618
+ flex-direction: column;
619
+ overflow: hidden;
620
+ border: 0;
621
+ border-radius: var(--nm-radius-lg);
622
+ background: var(--nm-raised);
623
+ }
624
+
625
+ .nm-preview-card--building {
626
+ animation: nm-preview-pulse var(--nm-knot-pulse) var(--ease) infinite;
627
+ }
628
+
629
+ .nm-preview-card--building .nm-preview-card__stage::after {
630
+ content: '';
631
+ position: absolute;
632
+ inset: 0;
633
+ pointer-events: none;
634
+ background: var(--nm-raised);
635
+ animation: nm-preview-pulse var(--nm-knot-pulse) var(--ease) infinite;
636
+ }
637
+
638
+ .nm-preview-card__bar {
639
+ display: flex;
640
+ align-items: center;
641
+ padding: var(--nm-space-12) var(--nm-space-16);
642
+ background: transparent;
643
+ }
644
+
645
+ .nm-preview-card__title {
646
+ margin: 0;
647
+ font-family: var(--nm-font);
648
+ font-size: var(--nm-type-body);
649
+ font-weight: var(--nm-weight-medium);
650
+ line-height: normal;
651
+ color: var(--nm-fg);
652
+ }
653
+
654
+ .nm-preview-card__stage {
655
+ position: relative;
656
+ aspect-ratio: 16 / 9;
657
+ background: var(--nm-canvas);
658
+ }
659
+
660
+ .nm-preview-card__frame {
661
+ display: block;
662
+ width: 100%;
663
+ height: 100%;
664
+ border: 0;
665
+ pointer-events: none;
666
+ background: var(--nm-canvas);
667
+ }
668
+
669
+ @keyframes nm-preview-pulse {
670
+ 0%,
671
+ 100% {
672
+ background-color: var(--nm-raised);
673
+ }
674
+
675
+ 50% {
676
+ background-color: var(--nm-panel);
677
+ }
678
+ }
679
+
680
+ @media (prefers-reduced-motion: reduce) {
681
+ .nm-preview-card--building,
682
+ .nm-preview-card--building .nm-preview-card__stage::after {
683
+ animation: none;
684
+ }
685
+ }
686
+
@@ -0,0 +1,6 @@
1
+ import type { ReactNode } from 'react';
2
+ import { NM_MESSAGE_CLASSES } from '../../config/nm-message.ts';
3
+
4
+ export function NmTextShimmer(props: { children: string }): ReactNode {
5
+ return <span className={NM_MESSAGE_CLASSES.shimmer}>{props.children}</span>;
6
+ }