@nuvin/components 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 (269) hide show
  1. package/dist/MarkdownBody-XBNXK6P4.js +121 -0
  2. package/dist/app/App.d.ts +24 -0
  3. package/dist/app/App.d.ts.map +1 -0
  4. package/dist/app/AppShell.d.ts +13 -0
  5. package/dist/app/AppShell.d.ts.map +1 -0
  6. package/dist/app/Header.d.ts +11 -0
  7. package/dist/app/Header.d.ts.map +1 -0
  8. package/dist/app/SessionSubHeader.d.ts +15 -0
  9. package/dist/app/SessionSubHeader.d.ts.map +1 -0
  10. package/dist/app/WorkspacePanel.d.ts +15 -0
  11. package/dist/app/WorkspacePanel.d.ts.map +1 -0
  12. package/dist/app/app-shell.styles.d.ts +11 -0
  13. package/dist/app/app-shell.styles.d.ts.map +1 -0
  14. package/dist/app/route-components.d.ts +46 -0
  15. package/dist/app/route-components.d.ts.map +1 -0
  16. package/dist/app/routes.d.ts +11 -0
  17. package/dist/app/routes.d.ts.map +1 -0
  18. package/dist/assets/fonts/inter-latin-400-normal.woff2 +0 -0
  19. package/dist/assets/fonts/inter-latin-500-normal.woff2 +0 -0
  20. package/dist/assets/fonts/inter-latin-600-normal.woff2 +0 -0
  21. package/dist/assets/fonts/inter-latin-700-normal.woff2 +0 -0
  22. package/dist/assets/fonts/jetbrains-mono-latin-400-normal.woff2 +0 -0
  23. package/dist/assets/fonts/jetbrains-mono-latin-500-normal.woff2 +0 -0
  24. package/dist/assets/fonts/jetbrains-mono-latin-600-normal.woff2 +0 -0
  25. package/dist/assets/fonts/jetbrains-mono-latin-700-normal.woff2 +0 -0
  26. package/dist/chunk-TLWTUPOJ.js +10 -0
  27. package/dist/features/account/auth-gate.d.ts +17 -0
  28. package/dist/features/account/auth-gate.d.ts.map +1 -0
  29. package/dist/features/account/index.d.ts +3 -0
  30. package/dist/features/account/index.d.ts.map +1 -0
  31. package/dist/features/composer/Composer.d.ts +39 -0
  32. package/dist/features/composer/Composer.d.ts.map +1 -0
  33. package/dist/features/composer/QuestionCard.d.ts +21 -0
  34. package/dist/features/composer/QuestionCard.d.ts.map +1 -0
  35. package/dist/features/composer/context-status.d.ts +6 -0
  36. package/dist/features/composer/context-status.d.ts.map +1 -0
  37. package/dist/features/composer/index.d.ts +2 -0
  38. package/dist/features/composer/index.d.ts.map +1 -0
  39. package/dist/features/config/CloudProviderSetup.d.ts +12 -0
  40. package/dist/features/config/CloudProviderSetup.d.ts.map +1 -0
  41. package/dist/features/config/OnboardingGate.d.ts +22 -0
  42. package/dist/features/config/OnboardingGate.d.ts.map +1 -0
  43. package/dist/features/config/ProviderManager.d.ts +15 -0
  44. package/dist/features/config/ProviderManager.d.ts.map +1 -0
  45. package/dist/features/config/WorkspaceManager.d.ts +13 -0
  46. package/dist/features/config/WorkspaceManager.d.ts.map +1 -0
  47. package/dist/features/config/config-client.d.ts +49 -0
  48. package/dist/features/config/config-client.d.ts.map +1 -0
  49. package/dist/features/config/index.d.ts +10 -0
  50. package/dist/features/config/index.d.ts.map +1 -0
  51. package/dist/features/config/protocol-config-client.d.ts +22 -0
  52. package/dist/features/config/protocol-config-client.d.ts.map +1 -0
  53. package/dist/features/config/rest-config-client.d.ts +4 -0
  54. package/dist/features/config/rest-config-client.d.ts.map +1 -0
  55. package/dist/features/config/use-provider-status.d.ts +8 -0
  56. package/dist/features/config/use-provider-status.d.ts.map +1 -0
  57. package/dist/features/daemon-switcher/DaemonAvatar.d.ts +16 -0
  58. package/dist/features/daemon-switcher/DaemonAvatar.d.ts.map +1 -0
  59. package/dist/features/daemon-switcher/DaemonRail.d.ts +18 -0
  60. package/dist/features/daemon-switcher/DaemonRail.d.ts.map +1 -0
  61. package/dist/features/daemon-switcher/DaemonSwitcher.d.ts +17 -0
  62. package/dist/features/daemon-switcher/DaemonSwitcher.d.ts.map +1 -0
  63. package/dist/features/daemon-switcher/index.d.ts +7 -0
  64. package/dist/features/daemon-switcher/index.d.ts.map +1 -0
  65. package/dist/features/diff/DiffView.d.ts +13 -0
  66. package/dist/features/diff/DiffView.d.ts.map +1 -0
  67. package/dist/features/diff/diff.d.ts +23 -0
  68. package/dist/features/diff/diff.d.ts.map +1 -0
  69. package/dist/features/diff/index.d.ts +4 -0
  70. package/dist/features/diff/index.d.ts.map +1 -0
  71. package/dist/features/launcher/SessionItem.d.ts +12 -0
  72. package/dist/features/launcher/SessionItem.d.ts.map +1 -0
  73. package/dist/features/launcher/SessionSidebar.d.ts +24 -0
  74. package/dist/features/launcher/SessionSidebar.d.ts.map +1 -0
  75. package/dist/features/launcher/index.d.ts +5 -0
  76. package/dist/features/launcher/index.d.ts.map +1 -0
  77. package/dist/features/launcher/session-sidebar-model.d.ts +77 -0
  78. package/dist/features/launcher/session-sidebar-model.d.ts.map +1 -0
  79. package/dist/features/launcher/session-status.d.ts +9 -0
  80. package/dist/features/launcher/session-status.d.ts.map +1 -0
  81. package/dist/features/launcher/use-daemon-history.d.ts +17 -0
  82. package/dist/features/launcher/use-daemon-history.d.ts.map +1 -0
  83. package/dist/features/new-session/StartScreen.d.ts +31 -0
  84. package/dist/features/new-session/StartScreen.d.ts.map +1 -0
  85. package/dist/features/new-session/index.d.ts +3 -0
  86. package/dist/features/new-session/index.d.ts.map +1 -0
  87. package/dist/features/new-session/start-screen.styles.d.ts +46 -0
  88. package/dist/features/new-session/start-screen.styles.d.ts.map +1 -0
  89. package/dist/features/picker/Picker.d.ts +23 -0
  90. package/dist/features/picker/Picker.d.ts.map +1 -0
  91. package/dist/features/picker/PickerSession.d.ts +8 -0
  92. package/dist/features/picker/PickerSession.d.ts.map +1 -0
  93. package/dist/features/picker/index.d.ts +6 -0
  94. package/dist/features/picker/index.d.ts.map +1 -0
  95. package/dist/features/picker/picker-model.d.ts +31 -0
  96. package/dist/features/picker/picker-model.d.ts.map +1 -0
  97. package/dist/features/tabs/Tab.d.ts +8 -0
  98. package/dist/features/tabs/Tab.d.ts.map +1 -0
  99. package/dist/features/tabs/TabBar.d.ts +7 -0
  100. package/dist/features/tabs/TabBar.d.ts.map +1 -0
  101. package/dist/features/tabs/index.d.ts +8 -0
  102. package/dist/features/tabs/index.d.ts.map +1 -0
  103. package/dist/features/tabs/tab-model.d.ts +39 -0
  104. package/dist/features/tabs/tab-model.d.ts.map +1 -0
  105. package/dist/features/tabs/tab.styles.d.ts +9 -0
  106. package/dist/features/tabs/tab.styles.d.ts.map +1 -0
  107. package/dist/features/theme/ThemeToggle.d.ts +8 -0
  108. package/dist/features/theme/ThemeToggle.d.ts.map +1 -0
  109. package/dist/features/theme/index.d.ts +5 -0
  110. package/dist/features/theme/index.d.ts.map +1 -0
  111. package/dist/features/theme/themes.d.ts +13 -0
  112. package/dist/features/theme/themes.d.ts.map +1 -0
  113. package/dist/features/theme/use-theme-mode.d.ts +3 -0
  114. package/dist/features/theme/use-theme-mode.d.ts.map +1 -0
  115. package/dist/features/transcript/components/AssistantMessage.d.ts +21 -0
  116. package/dist/features/transcript/components/AssistantMessage.d.ts.map +1 -0
  117. package/dist/features/transcript/components/ChildMessagesContext.d.ts +27 -0
  118. package/dist/features/transcript/components/ChildMessagesContext.d.ts.map +1 -0
  119. package/dist/features/transcript/components/CodeBlock.d.ts +5 -0
  120. package/dist/features/transcript/components/CodeBlock.d.ts.map +1 -0
  121. package/dist/features/transcript/components/MarkdownBody.d.ts +17 -0
  122. package/dist/features/transcript/components/MarkdownBody.d.ts.map +1 -0
  123. package/dist/features/transcript/components/MessageList.d.ts +24 -0
  124. package/dist/features/transcript/components/MessageList.d.ts.map +1 -0
  125. package/dist/features/transcript/components/NestedMessageListContext.d.ts +18 -0
  126. package/dist/features/transcript/components/NestedMessageListContext.d.ts.map +1 -0
  127. package/dist/features/transcript/components/ProcessingIndicator.d.ts +5 -0
  128. package/dist/features/transcript/components/ProcessingIndicator.d.ts.map +1 -0
  129. package/dist/features/transcript/components/styles-test-utils.d.ts +6 -0
  130. package/dist/features/transcript/components/styles-test-utils.d.ts.map +1 -0
  131. package/dist/features/transcript/components/tool-display/BareLine.d.ts +14 -0
  132. package/dist/features/transcript/components/tool-display/BareLine.d.ts.map +1 -0
  133. package/dist/features/transcript/components/tool-display/Card.d.ts +31 -0
  134. package/dist/features/transcript/components/tool-display/Card.d.ts.map +1 -0
  135. package/dist/features/transcript/components/tool-display/Turn.d.ts +15 -0
  136. package/dist/features/transcript/components/tool-display/Turn.d.ts.map +1 -0
  137. package/dist/features/transcript/components/tool-display/index.d.ts +3 -0
  138. package/dist/features/transcript/components/tool-display/index.d.ts.map +1 -0
  139. package/dist/features/transcript/components/tool-display/renderers/AskUserRenderer.d.ts +4 -0
  140. package/dist/features/transcript/components/tool-display/renderers/AskUserRenderer.d.ts.map +1 -0
  141. package/dist/features/transcript/components/tool-display/renderers/AssignTaskRenderer.d.ts +9 -0
  142. package/dist/features/transcript/components/tool-display/renderers/AssignTaskRenderer.d.ts.map +1 -0
  143. package/dist/features/transcript/components/tool-display/renderers/BareToolRenderer.d.ts +8 -0
  144. package/dist/features/transcript/components/tool-display/renderers/BareToolRenderer.d.ts.map +1 -0
  145. package/dist/features/transcript/components/tool-display/renderers/BashRenderer.d.ts +11 -0
  146. package/dist/features/transcript/components/tool-display/renderers/BashRenderer.d.ts.map +1 -0
  147. package/dist/features/transcript/components/tool-display/renderers/FileEditRenderer.d.ts +4 -0
  148. package/dist/features/transcript/components/tool-display/renderers/FileEditRenderer.d.ts.map +1 -0
  149. package/dist/features/transcript/components/tool-display/renderers/FileNewRenderer.d.ts +4 -0
  150. package/dist/features/transcript/components/tool-display/renderers/FileNewRenderer.d.ts.map +1 -0
  151. package/dist/features/transcript/components/tool-display/renderers/TodoWriteRenderer.d.ts +4 -0
  152. package/dist/features/transcript/components/tool-display/renderers/TodoWriteRenderer.d.ts.map +1 -0
  153. package/dist/features/transcript/components/tool-display/renderers/UnknownRenderer.d.ts +4 -0
  154. package/dist/features/transcript/components/tool-display/renderers/UnknownRenderer.d.ts.map +1 -0
  155. package/dist/features/transcript/components/tool-display/tool-icon.d.ts +4 -0
  156. package/dist/features/transcript/components/tool-display/tool-icon.d.ts.map +1 -0
  157. package/dist/features/transcript/components/tool-display/tool-meta.d.ts +9 -0
  158. package/dist/features/transcript/components/tool-display/tool-meta.d.ts.map +1 -0
  159. package/dist/features/transcript/components/tool-display/tool-variants.d.ts +8 -0
  160. package/dist/features/transcript/components/tool-display/tool-variants.d.ts.map +1 -0
  161. package/dist/features/transcript/components/tool-display/types.d.ts +11 -0
  162. package/dist/features/transcript/components/tool-display/types.d.ts.map +1 -0
  163. package/dist/features/transcript/hooks/use-live-tick.d.ts +8 -0
  164. package/dist/features/transcript/hooks/use-live-tick.d.ts.map +1 -0
  165. package/dist/features/transcript/hooks/use-revealed-text.d.ts +28 -0
  166. package/dist/features/transcript/hooks/use-revealed-text.d.ts.map +1 -0
  167. package/dist/features/transcript/index.d.ts +6 -0
  168. package/dist/features/transcript/index.d.ts.map +1 -0
  169. package/dist/features/transcript/lib/message-groups.d.ts +9 -0
  170. package/dist/features/transcript/lib/message-groups.d.ts.map +1 -0
  171. package/dist/features/transcript/lib/preview-lines.d.ts +27 -0
  172. package/dist/features/transcript/lib/preview-lines.d.ts.map +1 -0
  173. package/dist/features/transcript/lib/processing-state.d.ts +16 -0
  174. package/dist/features/transcript/lib/processing-state.d.ts.map +1 -0
  175. package/dist/features/transcript/lib/reasoning-label.d.ts +9 -0
  176. package/dist/features/transcript/lib/reasoning-label.d.ts.map +1 -0
  177. package/dist/features/transcript/lib/tool-format-utils.d.ts +29 -0
  178. package/dist/features/transcript/lib/tool-format-utils.d.ts.map +1 -0
  179. package/dist/features/transcript/lib/tool-formatters.d.ts +45 -0
  180. package/dist/features/transcript/lib/tool-formatters.d.ts.map +1 -0
  181. package/dist/features/transcript/lib/tool-status.d.ts +39 -0
  182. package/dist/features/transcript/lib/tool-status.d.ts.map +1 -0
  183. package/dist/features/transcript/lib/transcript-rows.d.ts +15 -0
  184. package/dist/features/transcript/lib/transcript-rows.d.ts.map +1 -0
  185. package/dist/features/transcript/lib/turn-groups.d.ts +20 -0
  186. package/dist/features/transcript/lib/turn-groups.d.ts.map +1 -0
  187. package/dist/features/transcript/lib/turn-summary.d.ts +11 -0
  188. package/dist/features/transcript/lib/turn-summary.d.ts.map +1 -0
  189. package/dist/features/workflows/WorkflowsPanel.d.ts +11 -0
  190. package/dist/features/workflows/WorkflowsPanel.d.ts.map +1 -0
  191. package/dist/features/workflows/index.d.ts +3 -0
  192. package/dist/features/workflows/index.d.ts.map +1 -0
  193. package/dist/index.d.ts +45 -0
  194. package/dist/index.d.ts.map +1 -0
  195. package/dist/index.js +7877 -0
  196. package/dist/session/client-commands.d.ts +26 -0
  197. package/dist/session/client-commands.d.ts.map +1 -0
  198. package/dist/session/commands.d.ts +9 -0
  199. package/dist/session/commands.d.ts.map +1 -0
  200. package/dist/session/directory-source.d.ts +101 -0
  201. package/dist/session/directory-source.d.ts.map +1 -0
  202. package/dist/session/directory-status.d.ts +8 -0
  203. package/dist/session/directory-status.d.ts.map +1 -0
  204. package/dist/session/directory.d.ts +41 -0
  205. package/dist/session/directory.d.ts.map +1 -0
  206. package/dist/session/index.d.ts +16 -0
  207. package/dist/session/index.d.ts.map +1 -0
  208. package/dist/session/snapshot.d.ts +11 -0
  209. package/dist/session/snapshot.d.ts.map +1 -0
  210. package/dist/session/store.d.ts +96 -0
  211. package/dist/session/store.d.ts.map +1 -0
  212. package/dist/session/tool-timing.d.ts +14 -0
  213. package/dist/session/tool-timing.d.ts.map +1 -0
  214. package/dist/session/transport.d.ts +187 -0
  215. package/dist/session/transport.d.ts.map +1 -0
  216. package/dist/session/types.d.ts +73 -0
  217. package/dist/session/types.d.ts.map +1 -0
  218. package/dist/session/use-directory.d.ts +54 -0
  219. package/dist/session/use-directory.d.ts.map +1 -0
  220. package/dist/session/use-session-transport.d.ts +10 -0
  221. package/dist/session/use-session-transport.d.ts.map +1 -0
  222. package/dist/shared/hooks/use-stick-to-bottom-sentinel.d.ts +64 -0
  223. package/dist/shared/hooks/use-stick-to-bottom-sentinel.d.ts.map +1 -0
  224. package/dist/shared/lib/navigation.d.ts +20 -0
  225. package/dist/shared/lib/navigation.d.ts.map +1 -0
  226. package/dist/shared/lib/toast.d.ts +35 -0
  227. package/dist/shared/lib/toast.d.ts.map +1 -0
  228. package/dist/shared/lib/utils.d.ts +3 -0
  229. package/dist/shared/lib/utils.d.ts.map +1 -0
  230. package/dist/shared/ui/CopyButton.d.ts +6 -0
  231. package/dist/shared/ui/CopyButton.d.ts.map +1 -0
  232. package/dist/shared/ui/avatar.d.ts +9 -0
  233. package/dist/shared/ui/avatar.d.ts.map +1 -0
  234. package/dist/shared/ui/badge.d.ts +8 -0
  235. package/dist/shared/ui/badge.d.ts.map +1 -0
  236. package/dist/shared/ui/button.d.ts +11 -0
  237. package/dist/shared/ui/button.d.ts.map +1 -0
  238. package/dist/shared/ui/command.d.ts +10 -0
  239. package/dist/shared/ui/command.d.ts.map +1 -0
  240. package/dist/shared/ui/confirm-dialog.d.ts +17 -0
  241. package/dist/shared/ui/confirm-dialog.d.ts.map +1 -0
  242. package/dist/shared/ui/dropdown-menu.d.ts +9 -0
  243. package/dist/shared/ui/dropdown-menu.d.ts.map +1 -0
  244. package/dist/shared/ui/input.d.ts +3 -0
  245. package/dist/shared/ui/input.d.ts.map +1 -0
  246. package/dist/shared/ui/kbd.d.ts +3 -0
  247. package/dist/shared/ui/kbd.d.ts.map +1 -0
  248. package/dist/shared/ui/popover.d.ts +7 -0
  249. package/dist/shared/ui/popover.d.ts.map +1 -0
  250. package/dist/shared/ui/scroll-area.d.ts +5 -0
  251. package/dist/shared/ui/scroll-area.d.ts.map +1 -0
  252. package/dist/shared/ui/tabs.d.ts +7 -0
  253. package/dist/shared/ui/tabs.d.ts.map +1 -0
  254. package/dist/shared/ui/toast.d.ts +7 -0
  255. package/dist/shared/ui/toast.d.ts.map +1 -0
  256. package/dist/shared/ui/tooltip.d.ts +7 -0
  257. package/dist/shared/ui/tooltip.d.ts.map +1 -0
  258. package/dist/styles/base.css +49 -0
  259. package/dist/styles/components.css +206 -0
  260. package/dist/styles/effects.css +76 -0
  261. package/dist/styles/fonts.css +49 -0
  262. package/dist/styles/index.css +14 -0
  263. package/dist/styles/styles.test.ts +45 -0
  264. package/dist/styles/themes.css +33 -0
  265. package/dist/styles/tokens.css +245 -0
  266. package/dist/styles/tokens.test.ts +113 -0
  267. package/dist/test-setup.d.ts +29 -0
  268. package/dist/test-setup.d.ts.map +1 -0
  269. package/package.json +71 -0
@@ -0,0 +1,113 @@
1
+ // @vitest-environment node
2
+ import { readFileSync } from "node:fs";
3
+ import { join } from "node:path";
4
+ import { describe, expect, it } from "vitest";
5
+
6
+ const tokens = readFileSync(join(process.cwd(), "src/styles/tokens.css"), "utf8");
7
+
8
+ function block(selector: string): string {
9
+ // Grab from the selector to the closing brace of that rule block.
10
+ const start = tokens.indexOf(selector);
11
+ expect(start, `${selector} present`).toBeGreaterThanOrEqual(0);
12
+ const rest = tokens.slice(start);
13
+ return rest.slice(0, rest.indexOf("\n}") + 2);
14
+ }
15
+
16
+ const CANONICAL = [
17
+ "--bg-base",
18
+ "--bg-raised",
19
+ "--bg-overlay",
20
+ "--bg-inset",
21
+ "--bg-sunken",
22
+ "--bg-hover",
23
+ "--fg-primary",
24
+ "--fg-secondary",
25
+ "--fg-tertiary",
26
+ "--fg-quaternary",
27
+ "--fg-on-accent",
28
+ "--border-subtle",
29
+ "--border-default",
30
+ "--border-strong",
31
+ "--border-focus",
32
+ "--accent",
33
+ "--accent-hover",
34
+ "--accent-subtle",
35
+ "--accent-border",
36
+ "--success",
37
+ "--danger",
38
+ "--warning",
39
+ ];
40
+
41
+ const SHADCN_ALIASES = [
42
+ "--background",
43
+ "--foreground",
44
+ "--card",
45
+ "--popover",
46
+ "--primary",
47
+ "--secondary",
48
+ "--muted",
49
+ "--destructive",
50
+ "--border",
51
+ "--input",
52
+ "--ring",
53
+ "--radius",
54
+ ];
55
+
56
+ describe("tokens.css", () => {
57
+ it("defines both theme blocks", () => {
58
+ expect(tokens).toContain('[data-theme="dark"]');
59
+ expect(tokens).toContain('[data-theme="light"]');
60
+ });
61
+
62
+ it("dark block defines the full canonical vocabulary", () => {
63
+ const dark = block(":root,");
64
+ for (const v of CANONICAL) expect(dark, `dark ${v}`).toContain(`${v}:`);
65
+ });
66
+
67
+ it("light block defines the full canonical vocabulary", () => {
68
+ const light = block('[data-theme="light"]');
69
+ for (const v of CANONICAL) expect(light, `light ${v}`).toContain(`${v}:`);
70
+ });
71
+
72
+ it("maps the shadcn alias names in both themes", () => {
73
+ const dark = block(":root,");
74
+ const light = block('[data-theme="light"]');
75
+ for (const v of SHADCN_ALIASES) {
76
+ expect(dark, `dark ${v}`).toContain(`${v}:`);
77
+ expect(light, `light ${v}`).toContain(`${v}:`);
78
+ }
79
+ });
80
+
81
+ it("aliases shadcn --primary onto the brand --accent", () => {
82
+ expect(tokens).toContain("--primary: var(--accent)");
83
+ });
84
+
85
+ it("does NOT alias shadcn --accent (brand collision avoidance)", () => {
86
+ // The canonical brand --accent IS defined; shadcn's --accent-foreground must NOT be.
87
+ expect(tokens).not.toContain("--accent-foreground");
88
+ });
89
+
90
+ it("exposes the @theme inline color map", () => {
91
+ expect(tokens).toContain("@theme inline");
92
+ expect(tokens).toContain("--color-surface-raised: var(--bg-raised)");
93
+ expect(tokens).toContain("--color-accent: var(--accent)");
94
+ });
95
+
96
+ it("exposes syntax + diff tokens as @theme inline color utilities", () => {
97
+ for (const name of [
98
+ "--color-syn-keyword",
99
+ "--color-syn-string",
100
+ "--color-syn-fn",
101
+ "--color-syn-var",
102
+ "--color-syn-comment",
103
+ "--color-syn-punct",
104
+ "--color-diff-add-bg",
105
+ "--color-diff-add-fg",
106
+ "--color-diff-del-bg",
107
+ "--color-diff-del-fg",
108
+ "--color-diff-line-num",
109
+ ]) {
110
+ expect(tokens).toContain(`${name}: var(${name.replace("--color-", "--")});`);
111
+ }
112
+ });
113
+ });
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Vitest setup file — jsdom measurement stubs for @tanstack/react-virtual.
3
+ *
4
+ * @tanstack/virtual-core@3.17.0 measurement facts (verified against source):
5
+ * - Viewport extent: reads scrollElement.offsetHeight (observeElementRect, lines 15-16)
6
+ * - Per-row size: reads rowElement.offsetHeight (default measureElement fallback, line 150)
7
+ * - borderBoxSize branch only fires when ResizeObserver delivers an entry;
8
+ * with a no-op ResizeObserver (below) no entry is ever delivered, so
9
+ * offsetHeight governs both paths unconditionally.
10
+ * - getBoundingClientRect is inert for both paths — do NOT stub it as the
11
+ * measurement source.
12
+ *
13
+ * The stubs establish a "full window renders" invariant for deterministic tests:
14
+ * - Viewport (scroll element): offsetHeight = 10000 → large enough to show all rows
15
+ * - Each row: offsetHeight = 48 (prototype getter) → small; rows count into window
16
+ *
17
+ * A blanket prototype getter returning 10000 would make ROWS also measure 10000,
18
+ * causing the virtualizer to window to ~1 item. The viewport must be identified
19
+ * separately. We key on the aria-label="Conversation" attribute that AppShell
20
+ * already places on the scroll <section> (see AppShell.tsx) — OR on a
21
+ * data-testid="scroll-viewport" attribute that tests can add to their container.
22
+ *
23
+ * Guard: each stub is gated on typeof HTMLElement !== "undefined" so this file
24
+ * is inert in node-environment test runs (e.g. mobile-layout.test.ts uses
25
+ * @vitest-environment node, but setup files run per-environment; the guard
26
+ * makes the jsdom-only stubs safe for that run too).
27
+ */
28
+ export {};
29
+ //# sourceMappingURL=test-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-setup.d.ts","sourceRoot":"","sources":["../src/test-setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG"}
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "@nuvin/components",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "type": "module",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "license": "Apache-2.0",
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js"
17
+ },
18
+ "./styles": "./dist/styles/index.css"
19
+ },
20
+ "scripts": {
21
+ "build": "tsup && tsc -p tsconfig.build.json --emitDeclarationOnly",
22
+ "dev": "tsup --watch",
23
+ "test": "vitest run",
24
+ "test:watch": "vitest"
25
+ },
26
+ "peerDependencies": {
27
+ "react": ">=19",
28
+ "react-dom": ">=19",
29
+ "react-router": "^7.17.0"
30
+ },
31
+ "dependencies": {
32
+ "@nuvin/session": "workspace:^",
33
+ "@radix-ui/react-avatar": "^1.2.0",
34
+ "@radix-ui/react-dropdown-menu": "^2.1.18",
35
+ "@radix-ui/react-popover": "^1.1.17",
36
+ "@radix-ui/react-scroll-area": "^1.2.12",
37
+ "@radix-ui/react-slot": "^1.3.0",
38
+ "@radix-ui/react-tabs": "^1.1.15",
39
+ "@radix-ui/react-toast": "^1.2.18",
40
+ "@radix-ui/react-tooltip": "^1.2.10",
41
+ "@tanstack/react-virtual": "^3.14.2",
42
+ "class-variance-authority": "^0.7.1",
43
+ "clsx": "^2.1.1",
44
+ "cmdk": "^1.1.1",
45
+ "katex": "^0.17.0",
46
+ "lucide-react": "^1.21.0",
47
+ "rehype-katex": "^7.0.1",
48
+ "remark-math": "^6.0.0",
49
+ "streamdown": "^2.5.0",
50
+ "tailwind-merge": "^3.6.0",
51
+ "zustand": "^5.0.0"
52
+ },
53
+ "devDependencies": {
54
+ "@clerk/clerk-react": "^5.59.0",
55
+ "@fontsource/inter": "^5.2.8",
56
+ "@fontsource/jetbrains-mono": "^5.2.8",
57
+ "@nuvin/agent-core": "workspace:^",
58
+ "@nuvin/daemon": "workspace:^",
59
+ "@tailwindcss/postcss": "^4.3.0",
60
+ "@types/node": "^24.10.1",
61
+ "@types/react": "^19.1.0",
62
+ "@types/react-dom": "^19.2.3",
63
+ "@types/ws": "^8.18.1",
64
+ "jsdom": "^29.0.1",
65
+ "tailwindcss": "^4.3.0",
66
+ "tsup": "^8.5.1",
67
+ "typescript": "^6.0.2",
68
+ "vitest": "^4.1.2",
69
+ "ws": "^8.20.0"
70
+ }
71
+ }