@brainpilot/web 0.0.4 → 0.0.5

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 (97) hide show
  1. package/dist/assets/index-C-8G4D4j.js +448 -0
  2. package/dist/assets/index-C501m5OS.css +1 -0
  3. package/dist/index.html +2 -2
  4. package/index.html +13 -0
  5. package/package.json +9 -3
  6. package/src/App.tsx +10 -0
  7. package/src/__tests__/api.test.ts +103 -0
  8. package/src/__tests__/messageGroups.test.ts +80 -0
  9. package/src/__tests__/newUiComponents.test.tsx +101 -0
  10. package/src/__tests__/newUiEvents.test.ts +236 -0
  11. package/src/components/chat/AskUserCard.tsx +123 -0
  12. package/src/components/chat/AutoRetryIndicator.tsx +71 -0
  13. package/src/components/chat/ComposerInput.tsx +73 -0
  14. package/src/components/chat/ComposerSendButton.tsx +26 -0
  15. package/src/components/chat/MarkdownMessage.tsx +24 -0
  16. package/src/components/chat/MessageStream.tsx +464 -0
  17. package/src/components/chat/PromptComposer.tsx +398 -0
  18. package/src/components/chat/SystemMessageBubble.tsx +46 -0
  19. package/src/components/demo/DemoFileTree.tsx +146 -0
  20. package/src/components/demo/DemoView.tsx +668 -0
  21. package/src/components/demo/TraceNodeModal.tsx +76 -0
  22. package/src/components/demo/demoBundle.ts +218 -0
  23. package/src/components/demo/demoCache.ts +42 -0
  24. package/src/components/files/FilePreviewView.tsx +153 -0
  25. package/src/components/files/FileSidebar.tsx +664 -0
  26. package/src/components/files/filePreview.ts +113 -0
  27. package/src/components/primitives/CustomSelect.tsx +200 -0
  28. package/src/components/primitives/IconButton.tsx +27 -0
  29. package/src/components/quota/DiskQuotaCriticalDialog.tsx +56 -0
  30. package/src/components/quota/DiskQuotaWarningDialog.tsx +65 -0
  31. package/src/components/quota/QuotaFileManager.tsx +197 -0
  32. package/src/components/search/SearchDialog.tsx +101 -0
  33. package/src/components/session/AgentNetwork.tsx +1240 -0
  34. package/src/components/session/AgentTraceViews.tsx +381 -0
  35. package/src/components/session/AnalyticsTab.tsx +386 -0
  36. package/src/components/session/GlobalOverview.tsx +108 -0
  37. package/src/components/session/NodeTooltip.tsx +127 -0
  38. package/src/components/session/TimelineTab.tsx +320 -0
  39. package/src/components/session/TraceGraphView.tsx +301 -0
  40. package/src/components/session/TraceNodeDetail.tsx +142 -0
  41. package/src/components/session/agentAnalytics.ts +397 -0
  42. package/src/components/session/agentNetworkShared.ts +329 -0
  43. package/src/components/session/traceLayout.ts +150 -0
  44. package/src/components/settings/SettingsDialog.tsx +719 -0
  45. package/src/components/shell/DesktopShell.tsx +236 -0
  46. package/src/components/shell/SandboxBuildingOverlay.tsx +73 -0
  47. package/src/components/shell/SandboxStatus.tsx +287 -0
  48. package/src/components/shell/TerminalDrawer.tsx +387 -0
  49. package/src/components/sidebar/Sidebar.tsx +187 -0
  50. package/src/config.ts +10 -0
  51. package/src/contexts/AppProviders.tsx +20 -0
  52. package/src/contexts/AuthContext.tsx +61 -0
  53. package/src/contexts/PreferencesContext.tsx +125 -0
  54. package/src/contexts/SSEContext.tsx +175 -0
  55. package/src/contexts/SandboxContext.tsx +310 -0
  56. package/src/contexts/SessionContext.tsx +608 -0
  57. package/src/contexts/draftStore.ts +103 -0
  58. package/src/contexts/messageFilters.ts +29 -0
  59. package/src/contexts/messageGroups.ts +77 -0
  60. package/src/contexts/messageReducer.ts +401 -0
  61. package/src/contexts/newUiEvents.ts +190 -0
  62. package/src/contracts/backend.ts +846 -0
  63. package/src/contracts/demoBundle.ts +83 -0
  64. package/src/i18n/messages/analytics.ts +96 -0
  65. package/src/i18n/messages/chat.ts +108 -0
  66. package/src/i18n/messages/contexts.ts +40 -0
  67. package/src/i18n/messages/demo.ts +80 -0
  68. package/src/i18n/messages/files.ts +82 -0
  69. package/src/i18n/messages/network.ts +186 -0
  70. package/src/i18n/messages/profile.ts +40 -0
  71. package/src/i18n/messages/quota.ts +36 -0
  72. package/src/i18n/messages/sandbox.ts +116 -0
  73. package/src/i18n/messages/search.ts +16 -0
  74. package/src/i18n/messages/settings.ts +184 -0
  75. package/src/i18n/messages/shell.ts +38 -0
  76. package/src/i18n/messages/sidebar.ts +52 -0
  77. package/src/i18n/messages/terminal.ts +22 -0
  78. package/src/i18n/messages/trace.ts +84 -0
  79. package/src/i18n/messages.ts +32 -0
  80. package/src/i18n/translate.ts +46 -0
  81. package/src/i18n/types.ts +15 -0
  82. package/src/i18n/useT.ts +15 -0
  83. package/src/main.tsx +13 -0
  84. package/src/mocks/backend.ts +722 -0
  85. package/src/styles/global.css +7429 -0
  86. package/src/styles/tokens.css +161 -0
  87. package/src/utils/api.ts +627 -0
  88. package/src/utils/download.ts +18 -0
  89. package/src/utils/format.ts +7 -0
  90. package/src/utils/zip.ts +119 -0
  91. package/src/vite-env.d.ts +1 -0
  92. package/tsconfig.app.json +22 -0
  93. package/tsconfig.json +7 -0
  94. package/tsconfig.node.json +13 -0
  95. package/vite.config.ts +13 -0
  96. package/dist/assets/index-Cd0Mi_WU.css +0 -1
  97. package/dist/assets/index-FGg-DeYR.js +0 -448
@@ -0,0 +1,161 @@
1
+ /* ============================================================================
2
+ Design tokens — single source of truth for color, type, elevation, motion.
3
+ Monochrome-dominant (black / white / neutral gray) with ONE restrained accent.
4
+ Light is the default theme; dark is a full, independently-tuned override.
5
+ ============================================================================ */
6
+
7
+ :root {
8
+ color-scheme: light;
9
+
10
+ /* — Typography ----------------------------------------------------------- */
11
+ --font-sans:
12
+ "Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
13
+ "Segoe UI", sans-serif;
14
+ --font-mono:
15
+ "Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
16
+ monospace;
17
+
18
+ /* Type scale (px) — keep the UI on a consistent rhythm */
19
+ --fs-11: 11px;
20
+ --fs-12: 12px;
21
+ --fs-13: 13px;
22
+ --fs-14: 14px;
23
+ --fs-16: 16px;
24
+ --fs-20: 20px;
25
+ --fs-28: 28px;
26
+
27
+ /* — Neutral surfaces ----------------------------------------------------- */
28
+ --color-canvas: #ffffff;
29
+ --color-sidebar: #f6f7f8;
30
+ --color-surface: #ffffff;
31
+ --color-surface-soft: #f6f7f8;
32
+ --color-surface-raised: #ffffff;
33
+ --color-surface-elevated: #ffffff;
34
+ --color-code-bg: #f4f5f7;
35
+
36
+ /* — Text ----------------------------------------------------------------- */
37
+ --color-text: #141618;
38
+ --color-text-muted: #686c73;
39
+ --color-text-subtle: #9aa0a6;
40
+
41
+ /* — Borders & states ----------------------------------------------------- */
42
+ --color-border: #e6e7e9;
43
+ --color-border-strong: #d4d6d9;
44
+ --color-hover: #f0f1f2;
45
+ --color-active: #e8eaec;
46
+
47
+ /* — Single accent (the only chromatic identity color) -------------------- */
48
+ --color-accent: #4f46e5;
49
+ --color-accent-strong: #4338ca;
50
+ --color-accent-soft: #eef0fe;
51
+ --color-accent-contrast: #ffffff;
52
+ --color-accent-ring: rgb(79 70 229 / 0.32);
53
+
54
+ /* info is the historical name for the accent role — keep it pointed at accent
55
+ so existing var(--color-info) usages inherit the single-accent identity. */
56
+ --color-info: var(--color-accent);
57
+ --color-info-soft: var(--color-accent-soft);
58
+
59
+ /* — Functional semantic colors (kept, lightly desaturated) --------------- */
60
+ --color-danger: #c0362c;
61
+ --color-danger-soft: #fbeceb;
62
+ --color-success: #15924b;
63
+ --color-success-soft: #e8f5ed;
64
+ --color-warning: #c77d11;
65
+ --color-warning-soft: #fbf1e0;
66
+
67
+ /* — Overlays & scrims ---------------------------------------------------- */
68
+ --color-overlay: rgb(255 255 255 / 0.72);
69
+ --color-overlay-soft: rgb(250 250 250 / 0.58);
70
+ --color-overlay-strong: rgb(15 18 24 / 0.42);
71
+ --color-inset-highlight: rgb(255 255 255 / 0.72);
72
+
73
+ /* — Code syntax ---------------------------------------------------------- */
74
+ --color-code-keyword: #7c3aed;
75
+ --color-code-string: #047857;
76
+ --color-code-function: #2563eb;
77
+ --color-code-number: #d97706;
78
+
79
+ /* — Elevation (layered shadow scale) ------------------------------------- */
80
+ --color-shadow: rgb(15 23 42 / 0.08);
81
+ --color-shadow-strong: rgb(15 23 42 / 0.14);
82
+ --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.06);
83
+ --shadow-md: 0 4px 12px rgb(15 23 42 / 0.08);
84
+ --shadow-lg: 0 12px 32px rgb(15 23 42 / 0.1);
85
+ --shadow-xl: 0 24px 60px rgb(15 23 42 / 0.14);
86
+
87
+ /* — Layout --------------------------------------------------------------- */
88
+ --sidebar-width: 268px;
89
+ --file-sidebar-width: 420px;
90
+ --toolbar-height: 52px;
91
+ --composer-width: 720px;
92
+
93
+ /* — Radii ---------------------------------------------------------------- */
94
+ --radius-sm: 6px;
95
+ --radius-md: 8px;
96
+ --radius-lg: 14px;
97
+ --radius-xl: 18px;
98
+ --radius-pill: 999px;
99
+
100
+ /* — Motion --------------------------------------------------------------- */
101
+ --duration-fast: 120ms;
102
+ --duration-base: 200ms;
103
+ --ease-standard: 160ms ease;
104
+ --ease-layout: 260ms cubic-bezier(0.22, 1, 0.36, 1);
105
+ --ease-emphasized: 320ms cubic-bezier(0.2, 0, 0, 1);
106
+ --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
107
+ }
108
+
109
+ :root[data-theme="dark"] {
110
+ color-scheme: dark;
111
+
112
+ --color-canvas: #0c0d10;
113
+ --color-sidebar: #121317;
114
+ --color-surface: #16181d;
115
+ --color-surface-soft: #1b1d23;
116
+ --color-surface-raised: #1f222a;
117
+ --color-surface-elevated: #23262f;
118
+ --color-code-bg: #14161b;
119
+
120
+ --color-text: #f2f3f5;
121
+ --color-text-muted: #a4aab4;
122
+ --color-text-subtle: #6f7682;
123
+
124
+ --color-border: #2a2e37;
125
+ --color-border-strong: #3a3f4a;
126
+ --color-hover: #22262e;
127
+ --color-active: #2c313b;
128
+
129
+ --color-accent: #818cf8;
130
+ --color-accent-strong: #a5b4fc;
131
+ --color-accent-soft: rgb(99 102 241 / 0.18);
132
+ --color-accent-contrast: #0c0d10;
133
+ --color-accent-ring: rgb(129 140 248 / 0.45);
134
+
135
+ --color-info: var(--color-accent);
136
+ --color-info-soft: var(--color-accent-soft);
137
+
138
+ --color-danger: #ff8a80;
139
+ --color-danger-soft: rgb(255 138 128 / 0.16);
140
+ --color-success: #4ade80;
141
+ --color-success-soft: rgb(74 222 128 / 0.16);
142
+ --color-warning: #fbbf24;
143
+ --color-warning-soft: rgb(251 191 36 / 0.16);
144
+
145
+ --color-overlay: rgb(10 12 16 / 0.72);
146
+ --color-overlay-soft: rgb(10 12 16 / 0.6);
147
+ --color-overlay-strong: rgb(0 0 0 / 0.55);
148
+ --color-inset-highlight: rgb(255 255 255 / 0.06);
149
+
150
+ --color-code-keyword: #c4b5fd;
151
+ --color-code-string: #86efac;
152
+ --color-code-function: #60a5fa;
153
+ --color-code-number: #fbbf24;
154
+
155
+ --color-shadow: rgb(0 0 0 / 0.26);
156
+ --color-shadow-strong: rgb(0 0 0 / 0.42);
157
+ --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
158
+ --shadow-md: 0 4px 14px rgb(0 0 0 / 0.45);
159
+ --shadow-lg: 0 14px 36px rgb(0 0 0 / 0.5);
160
+ --shadow-xl: 0 26px 64px rgb(0 0 0 / 0.62);
161
+ }