@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.
- package/dist/MarkdownBody-XBNXK6P4.js +121 -0
- package/dist/app/App.d.ts +24 -0
- package/dist/app/App.d.ts.map +1 -0
- package/dist/app/AppShell.d.ts +13 -0
- package/dist/app/AppShell.d.ts.map +1 -0
- package/dist/app/Header.d.ts +11 -0
- package/dist/app/Header.d.ts.map +1 -0
- package/dist/app/SessionSubHeader.d.ts +15 -0
- package/dist/app/SessionSubHeader.d.ts.map +1 -0
- package/dist/app/WorkspacePanel.d.ts +15 -0
- package/dist/app/WorkspacePanel.d.ts.map +1 -0
- package/dist/app/app-shell.styles.d.ts +11 -0
- package/dist/app/app-shell.styles.d.ts.map +1 -0
- package/dist/app/route-components.d.ts +46 -0
- package/dist/app/route-components.d.ts.map +1 -0
- package/dist/app/routes.d.ts +11 -0
- package/dist/app/routes.d.ts.map +1 -0
- package/dist/assets/fonts/inter-latin-400-normal.woff2 +0 -0
- package/dist/assets/fonts/inter-latin-500-normal.woff2 +0 -0
- package/dist/assets/fonts/inter-latin-600-normal.woff2 +0 -0
- package/dist/assets/fonts/inter-latin-700-normal.woff2 +0 -0
- package/dist/assets/fonts/jetbrains-mono-latin-400-normal.woff2 +0 -0
- package/dist/assets/fonts/jetbrains-mono-latin-500-normal.woff2 +0 -0
- package/dist/assets/fonts/jetbrains-mono-latin-600-normal.woff2 +0 -0
- package/dist/assets/fonts/jetbrains-mono-latin-700-normal.woff2 +0 -0
- package/dist/chunk-TLWTUPOJ.js +10 -0
- package/dist/features/account/auth-gate.d.ts +17 -0
- package/dist/features/account/auth-gate.d.ts.map +1 -0
- package/dist/features/account/index.d.ts +3 -0
- package/dist/features/account/index.d.ts.map +1 -0
- package/dist/features/composer/Composer.d.ts +39 -0
- package/dist/features/composer/Composer.d.ts.map +1 -0
- package/dist/features/composer/QuestionCard.d.ts +21 -0
- package/dist/features/composer/QuestionCard.d.ts.map +1 -0
- package/dist/features/composer/context-status.d.ts +6 -0
- package/dist/features/composer/context-status.d.ts.map +1 -0
- package/dist/features/composer/index.d.ts +2 -0
- package/dist/features/composer/index.d.ts.map +1 -0
- package/dist/features/config/CloudProviderSetup.d.ts +12 -0
- package/dist/features/config/CloudProviderSetup.d.ts.map +1 -0
- package/dist/features/config/OnboardingGate.d.ts +22 -0
- package/dist/features/config/OnboardingGate.d.ts.map +1 -0
- package/dist/features/config/ProviderManager.d.ts +15 -0
- package/dist/features/config/ProviderManager.d.ts.map +1 -0
- package/dist/features/config/WorkspaceManager.d.ts +13 -0
- package/dist/features/config/WorkspaceManager.d.ts.map +1 -0
- package/dist/features/config/config-client.d.ts +49 -0
- package/dist/features/config/config-client.d.ts.map +1 -0
- package/dist/features/config/index.d.ts +10 -0
- package/dist/features/config/index.d.ts.map +1 -0
- package/dist/features/config/protocol-config-client.d.ts +22 -0
- package/dist/features/config/protocol-config-client.d.ts.map +1 -0
- package/dist/features/config/rest-config-client.d.ts +4 -0
- package/dist/features/config/rest-config-client.d.ts.map +1 -0
- package/dist/features/config/use-provider-status.d.ts +8 -0
- package/dist/features/config/use-provider-status.d.ts.map +1 -0
- package/dist/features/daemon-switcher/DaemonAvatar.d.ts +16 -0
- package/dist/features/daemon-switcher/DaemonAvatar.d.ts.map +1 -0
- package/dist/features/daemon-switcher/DaemonRail.d.ts +18 -0
- package/dist/features/daemon-switcher/DaemonRail.d.ts.map +1 -0
- package/dist/features/daemon-switcher/DaemonSwitcher.d.ts +17 -0
- package/dist/features/daemon-switcher/DaemonSwitcher.d.ts.map +1 -0
- package/dist/features/daemon-switcher/index.d.ts +7 -0
- package/dist/features/daemon-switcher/index.d.ts.map +1 -0
- package/dist/features/diff/DiffView.d.ts +13 -0
- package/dist/features/diff/DiffView.d.ts.map +1 -0
- package/dist/features/diff/diff.d.ts +23 -0
- package/dist/features/diff/diff.d.ts.map +1 -0
- package/dist/features/diff/index.d.ts +4 -0
- package/dist/features/diff/index.d.ts.map +1 -0
- package/dist/features/launcher/SessionItem.d.ts +12 -0
- package/dist/features/launcher/SessionItem.d.ts.map +1 -0
- package/dist/features/launcher/SessionSidebar.d.ts +24 -0
- package/dist/features/launcher/SessionSidebar.d.ts.map +1 -0
- package/dist/features/launcher/index.d.ts +5 -0
- package/dist/features/launcher/index.d.ts.map +1 -0
- package/dist/features/launcher/session-sidebar-model.d.ts +77 -0
- package/dist/features/launcher/session-sidebar-model.d.ts.map +1 -0
- package/dist/features/launcher/session-status.d.ts +9 -0
- package/dist/features/launcher/session-status.d.ts.map +1 -0
- package/dist/features/launcher/use-daemon-history.d.ts +17 -0
- package/dist/features/launcher/use-daemon-history.d.ts.map +1 -0
- package/dist/features/new-session/StartScreen.d.ts +31 -0
- package/dist/features/new-session/StartScreen.d.ts.map +1 -0
- package/dist/features/new-session/index.d.ts +3 -0
- package/dist/features/new-session/index.d.ts.map +1 -0
- package/dist/features/new-session/start-screen.styles.d.ts +46 -0
- package/dist/features/new-session/start-screen.styles.d.ts.map +1 -0
- package/dist/features/picker/Picker.d.ts +23 -0
- package/dist/features/picker/Picker.d.ts.map +1 -0
- package/dist/features/picker/PickerSession.d.ts +8 -0
- package/dist/features/picker/PickerSession.d.ts.map +1 -0
- package/dist/features/picker/index.d.ts +6 -0
- package/dist/features/picker/index.d.ts.map +1 -0
- package/dist/features/picker/picker-model.d.ts +31 -0
- package/dist/features/picker/picker-model.d.ts.map +1 -0
- package/dist/features/tabs/Tab.d.ts +8 -0
- package/dist/features/tabs/Tab.d.ts.map +1 -0
- package/dist/features/tabs/TabBar.d.ts +7 -0
- package/dist/features/tabs/TabBar.d.ts.map +1 -0
- package/dist/features/tabs/index.d.ts +8 -0
- package/dist/features/tabs/index.d.ts.map +1 -0
- package/dist/features/tabs/tab-model.d.ts +39 -0
- package/dist/features/tabs/tab-model.d.ts.map +1 -0
- package/dist/features/tabs/tab.styles.d.ts +9 -0
- package/dist/features/tabs/tab.styles.d.ts.map +1 -0
- package/dist/features/theme/ThemeToggle.d.ts +8 -0
- package/dist/features/theme/ThemeToggle.d.ts.map +1 -0
- package/dist/features/theme/index.d.ts +5 -0
- package/dist/features/theme/index.d.ts.map +1 -0
- package/dist/features/theme/themes.d.ts +13 -0
- package/dist/features/theme/themes.d.ts.map +1 -0
- package/dist/features/theme/use-theme-mode.d.ts +3 -0
- package/dist/features/theme/use-theme-mode.d.ts.map +1 -0
- package/dist/features/transcript/components/AssistantMessage.d.ts +21 -0
- package/dist/features/transcript/components/AssistantMessage.d.ts.map +1 -0
- package/dist/features/transcript/components/ChildMessagesContext.d.ts +27 -0
- package/dist/features/transcript/components/ChildMessagesContext.d.ts.map +1 -0
- package/dist/features/transcript/components/CodeBlock.d.ts +5 -0
- package/dist/features/transcript/components/CodeBlock.d.ts.map +1 -0
- package/dist/features/transcript/components/MarkdownBody.d.ts +17 -0
- package/dist/features/transcript/components/MarkdownBody.d.ts.map +1 -0
- package/dist/features/transcript/components/MessageList.d.ts +24 -0
- package/dist/features/transcript/components/MessageList.d.ts.map +1 -0
- package/dist/features/transcript/components/NestedMessageListContext.d.ts +18 -0
- package/dist/features/transcript/components/NestedMessageListContext.d.ts.map +1 -0
- package/dist/features/transcript/components/ProcessingIndicator.d.ts +5 -0
- package/dist/features/transcript/components/ProcessingIndicator.d.ts.map +1 -0
- package/dist/features/transcript/components/styles-test-utils.d.ts +6 -0
- package/dist/features/transcript/components/styles-test-utils.d.ts.map +1 -0
- package/dist/features/transcript/components/tool-display/BareLine.d.ts +14 -0
- package/dist/features/transcript/components/tool-display/BareLine.d.ts.map +1 -0
- package/dist/features/transcript/components/tool-display/Card.d.ts +31 -0
- package/dist/features/transcript/components/tool-display/Card.d.ts.map +1 -0
- package/dist/features/transcript/components/tool-display/Turn.d.ts +15 -0
- package/dist/features/transcript/components/tool-display/Turn.d.ts.map +1 -0
- package/dist/features/transcript/components/tool-display/index.d.ts +3 -0
- package/dist/features/transcript/components/tool-display/index.d.ts.map +1 -0
- package/dist/features/transcript/components/tool-display/renderers/AskUserRenderer.d.ts +4 -0
- package/dist/features/transcript/components/tool-display/renderers/AskUserRenderer.d.ts.map +1 -0
- package/dist/features/transcript/components/tool-display/renderers/AssignTaskRenderer.d.ts +9 -0
- package/dist/features/transcript/components/tool-display/renderers/AssignTaskRenderer.d.ts.map +1 -0
- package/dist/features/transcript/components/tool-display/renderers/BareToolRenderer.d.ts +8 -0
- package/dist/features/transcript/components/tool-display/renderers/BareToolRenderer.d.ts.map +1 -0
- package/dist/features/transcript/components/tool-display/renderers/BashRenderer.d.ts +11 -0
- package/dist/features/transcript/components/tool-display/renderers/BashRenderer.d.ts.map +1 -0
- package/dist/features/transcript/components/tool-display/renderers/FileEditRenderer.d.ts +4 -0
- package/dist/features/transcript/components/tool-display/renderers/FileEditRenderer.d.ts.map +1 -0
- package/dist/features/transcript/components/tool-display/renderers/FileNewRenderer.d.ts +4 -0
- package/dist/features/transcript/components/tool-display/renderers/FileNewRenderer.d.ts.map +1 -0
- package/dist/features/transcript/components/tool-display/renderers/TodoWriteRenderer.d.ts +4 -0
- package/dist/features/transcript/components/tool-display/renderers/TodoWriteRenderer.d.ts.map +1 -0
- package/dist/features/transcript/components/tool-display/renderers/UnknownRenderer.d.ts +4 -0
- package/dist/features/transcript/components/tool-display/renderers/UnknownRenderer.d.ts.map +1 -0
- package/dist/features/transcript/components/tool-display/tool-icon.d.ts +4 -0
- package/dist/features/transcript/components/tool-display/tool-icon.d.ts.map +1 -0
- package/dist/features/transcript/components/tool-display/tool-meta.d.ts +9 -0
- package/dist/features/transcript/components/tool-display/tool-meta.d.ts.map +1 -0
- package/dist/features/transcript/components/tool-display/tool-variants.d.ts +8 -0
- package/dist/features/transcript/components/tool-display/tool-variants.d.ts.map +1 -0
- package/dist/features/transcript/components/tool-display/types.d.ts +11 -0
- package/dist/features/transcript/components/tool-display/types.d.ts.map +1 -0
- package/dist/features/transcript/hooks/use-live-tick.d.ts +8 -0
- package/dist/features/transcript/hooks/use-live-tick.d.ts.map +1 -0
- package/dist/features/transcript/hooks/use-revealed-text.d.ts +28 -0
- package/dist/features/transcript/hooks/use-revealed-text.d.ts.map +1 -0
- package/dist/features/transcript/index.d.ts +6 -0
- package/dist/features/transcript/index.d.ts.map +1 -0
- package/dist/features/transcript/lib/message-groups.d.ts +9 -0
- package/dist/features/transcript/lib/message-groups.d.ts.map +1 -0
- package/dist/features/transcript/lib/preview-lines.d.ts +27 -0
- package/dist/features/transcript/lib/preview-lines.d.ts.map +1 -0
- package/dist/features/transcript/lib/processing-state.d.ts +16 -0
- package/dist/features/transcript/lib/processing-state.d.ts.map +1 -0
- package/dist/features/transcript/lib/reasoning-label.d.ts +9 -0
- package/dist/features/transcript/lib/reasoning-label.d.ts.map +1 -0
- package/dist/features/transcript/lib/tool-format-utils.d.ts +29 -0
- package/dist/features/transcript/lib/tool-format-utils.d.ts.map +1 -0
- package/dist/features/transcript/lib/tool-formatters.d.ts +45 -0
- package/dist/features/transcript/lib/tool-formatters.d.ts.map +1 -0
- package/dist/features/transcript/lib/tool-status.d.ts +39 -0
- package/dist/features/transcript/lib/tool-status.d.ts.map +1 -0
- package/dist/features/transcript/lib/transcript-rows.d.ts +15 -0
- package/dist/features/transcript/lib/transcript-rows.d.ts.map +1 -0
- package/dist/features/transcript/lib/turn-groups.d.ts +20 -0
- package/dist/features/transcript/lib/turn-groups.d.ts.map +1 -0
- package/dist/features/transcript/lib/turn-summary.d.ts +11 -0
- package/dist/features/transcript/lib/turn-summary.d.ts.map +1 -0
- package/dist/features/workflows/WorkflowsPanel.d.ts +11 -0
- package/dist/features/workflows/WorkflowsPanel.d.ts.map +1 -0
- package/dist/features/workflows/index.d.ts +3 -0
- package/dist/features/workflows/index.d.ts.map +1 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7877 -0
- package/dist/session/client-commands.d.ts +26 -0
- package/dist/session/client-commands.d.ts.map +1 -0
- package/dist/session/commands.d.ts +9 -0
- package/dist/session/commands.d.ts.map +1 -0
- package/dist/session/directory-source.d.ts +101 -0
- package/dist/session/directory-source.d.ts.map +1 -0
- package/dist/session/directory-status.d.ts +8 -0
- package/dist/session/directory-status.d.ts.map +1 -0
- package/dist/session/directory.d.ts +41 -0
- package/dist/session/directory.d.ts.map +1 -0
- package/dist/session/index.d.ts +16 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/snapshot.d.ts +11 -0
- package/dist/session/snapshot.d.ts.map +1 -0
- package/dist/session/store.d.ts +96 -0
- package/dist/session/store.d.ts.map +1 -0
- package/dist/session/tool-timing.d.ts +14 -0
- package/dist/session/tool-timing.d.ts.map +1 -0
- package/dist/session/transport.d.ts +187 -0
- package/dist/session/transport.d.ts.map +1 -0
- package/dist/session/types.d.ts +73 -0
- package/dist/session/types.d.ts.map +1 -0
- package/dist/session/use-directory.d.ts +54 -0
- package/dist/session/use-directory.d.ts.map +1 -0
- package/dist/session/use-session-transport.d.ts +10 -0
- package/dist/session/use-session-transport.d.ts.map +1 -0
- package/dist/shared/hooks/use-stick-to-bottom-sentinel.d.ts +64 -0
- package/dist/shared/hooks/use-stick-to-bottom-sentinel.d.ts.map +1 -0
- package/dist/shared/lib/navigation.d.ts +20 -0
- package/dist/shared/lib/navigation.d.ts.map +1 -0
- package/dist/shared/lib/toast.d.ts +35 -0
- package/dist/shared/lib/toast.d.ts.map +1 -0
- package/dist/shared/lib/utils.d.ts +3 -0
- package/dist/shared/lib/utils.d.ts.map +1 -0
- package/dist/shared/ui/CopyButton.d.ts +6 -0
- package/dist/shared/ui/CopyButton.d.ts.map +1 -0
- package/dist/shared/ui/avatar.d.ts +9 -0
- package/dist/shared/ui/avatar.d.ts.map +1 -0
- package/dist/shared/ui/badge.d.ts +8 -0
- package/dist/shared/ui/badge.d.ts.map +1 -0
- package/dist/shared/ui/button.d.ts +11 -0
- package/dist/shared/ui/button.d.ts.map +1 -0
- package/dist/shared/ui/command.d.ts +10 -0
- package/dist/shared/ui/command.d.ts.map +1 -0
- package/dist/shared/ui/confirm-dialog.d.ts +17 -0
- package/dist/shared/ui/confirm-dialog.d.ts.map +1 -0
- package/dist/shared/ui/dropdown-menu.d.ts +9 -0
- package/dist/shared/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/shared/ui/input.d.ts +3 -0
- package/dist/shared/ui/input.d.ts.map +1 -0
- package/dist/shared/ui/kbd.d.ts +3 -0
- package/dist/shared/ui/kbd.d.ts.map +1 -0
- package/dist/shared/ui/popover.d.ts +7 -0
- package/dist/shared/ui/popover.d.ts.map +1 -0
- package/dist/shared/ui/scroll-area.d.ts +5 -0
- package/dist/shared/ui/scroll-area.d.ts.map +1 -0
- package/dist/shared/ui/tabs.d.ts +7 -0
- package/dist/shared/ui/tabs.d.ts.map +1 -0
- package/dist/shared/ui/toast.d.ts +7 -0
- package/dist/shared/ui/toast.d.ts.map +1 -0
- package/dist/shared/ui/tooltip.d.ts +7 -0
- package/dist/shared/ui/tooltip.d.ts.map +1 -0
- package/dist/styles/base.css +49 -0
- package/dist/styles/components.css +206 -0
- package/dist/styles/effects.css +76 -0
- package/dist/styles/fonts.css +49 -0
- package/dist/styles/index.css +14 -0
- package/dist/styles/styles.test.ts +45 -0
- package/dist/styles/themes.css +33 -0
- package/dist/styles/tokens.css +245 -0
- package/dist/styles/tokens.test.ts +113 -0
- package/dist/test-setup.d.ts +29 -0
- package/dist/test-setup.d.ts.map +1 -0
- 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
|
+
}
|