@innovatorved/code-lab 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/ARCHITECTURE.md +3 -3
  2. package/CHANGELOG.md +23 -0
  3. package/README.md +3 -3
  4. package/dist/code-lab-sql.css +87 -64
  5. package/dist/code-lab-sql.esm.js +109 -86
  6. package/dist/code-lab-sql.umd.js +110 -87
  7. package/dist/code-lab.css +32 -7273
  8. package/dist/code-lab.d.ts +1 -1
  9. package/dist/code-lab.esm.js +4966 -74622
  10. package/dist/code-lab.js +4974 -74631
  11. package/dist/code-lab.umd.js +4974 -74631
  12. package/dist/extensions/cpp.d.ts +2 -2
  13. package/dist/extensions/cpp.esm.js +1788 -14707
  14. package/dist/extensions/cpp.js +1788 -14707
  15. package/dist/extensions/guided-lab.esm.js +2938 -16127
  16. package/dist/extensions/guided-lab.js +2938 -16127
  17. package/dist/extensions/python.d.ts +2 -2
  18. package/dist/extensions/python.esm.js +1769 -14701
  19. package/dist/extensions/python.js +1769 -14701
  20. package/dist/index.d.ts +1 -1
  21. package/dist/packages/sql/src/styles.d.ts +1 -1
  22. package/dist/packages/ui/src/settings-dialog.d.ts +2 -0
  23. package/dist/preview-sw.js +4 -188
  24. package/dist/runtime.esm.js +109 -10284
  25. package/dist/runtime.js +107 -10284
  26. package/dist/schemas.d.ts +2 -2
  27. package/dist/schemas.esm.js +2938 -16127
  28. package/dist/schemas.js +2941 -16130
  29. package/dist/scm.d.ts +221 -20
  30. package/dist/shell.esm.js +811 -10002
  31. package/dist/shell.js +811 -10002
  32. package/dist/storage.d.ts +9 -0
  33. package/dist/terminal.esm.js +20 -1347
  34. package/dist/terminal.js +20 -1347
  35. package/dist/workbench/command-palette.d.ts +16 -1
  36. package/dist/workbench/diff-editor.d.ts +27 -1
  37. package/dist/workbench/icons.d.ts +6 -2
  38. package/dist/workbench/index.d.ts +33 -1
  39. package/dist/workbench/intellisense.d.ts +194 -0
  40. package/dist/workbench/styles.d.ts +1 -1
  41. package/dist/workbench/xterm-adapter.d.ts +122 -0
  42. package/package.json +7 -1
  43. package/packages/commands/package.json +1 -1
  44. package/packages/core/package.json +1 -1
  45. package/packages/editor/package.json +1 -1
  46. package/packages/fs/package.json +1 -1
  47. package/packages/preview/package.json +1 -1
  48. package/packages/runtime/package.json +1 -1
  49. package/packages/settings/package.json +1 -1
  50. package/packages/sql/package.json +1 -1
  51. package/packages/sql/src/styles.ts +87 -64
  52. package/packages/terminal/package.json +1 -1
  53. package/packages/ui/package.json +1 -1
  54. package/packages/ui/src/observability.ts +12 -14
  55. package/packages/ui/src/settings-dialog.ts +383 -47
  56. package/packages/ui/src/themes.ts +89 -23
  57. package/src/code-lab.css +1883 -578
  58. package/src/extensions/cpp.ts +304 -38
  59. package/src/extensions/python.ts +342 -43
  60. package/src/index.ts +1 -1
  61. package/src/runtime.ts +272 -43
  62. package/src/schemas.ts +2 -2
  63. package/src/scm.ts +1467 -92
  64. package/src/shell.ts +1075 -93
  65. package/src/storage.ts +66 -3
  66. package/src/terminal.ts +148 -12
  67. package/src/workbench/command-palette.ts +289 -48
  68. package/src/workbench/diff-editor.ts +244 -78
  69. package/src/workbench/drawer.ts +5 -5
  70. package/src/workbench/icons.ts +250 -53
  71. package/src/workbench/index.ts +7 -1
  72. package/src/workbench/intellisense.ts +1871 -0
  73. package/src/workbench/styles.ts +58 -54
  74. package/src/workbench/toolbar.ts +1 -1
  75. package/src/workbench/xterm-adapter.ts +1571 -0
  76. package/src/workbench.ts +1699 -324
package/ARCHITECTURE.md CHANGED
@@ -1,4 +1,4 @@
1
- # `@innovatorved/code-lab` Architecture (v0.5.0)
1
+ # `@innovatorved/code-lab` Architecture (v0.6.1)
2
2
 
3
3
  `@innovatorved/code-lab` is an embeddable, browser-native Node.js v22 + Bun v1.1 + WASI C++20 + Python 3.12 IDE, first-class SQL playground (`@innovatorved/code-lab/sql`), POSIX shell, PTY terminal, and virtual execution sandbox with self-contained browser bundles (zero runtime dependencies in `dist/*`; Zod schemas available under `@innovatorved/code-lab/schemas`; modular extensions under `@innovatorved/code-lab/extensions/{guided-lab,javascript,typescript,cpp,python}`).
4
4
 
@@ -29,7 +29,7 @@ It is designed around two strictly decoupled layers that can be used together (`
29
29
  │ src/terminal.ts) │ │ (src/runtime.ts) │
30
30
  │ • Recursive-descent AST parser │ │ • Web Worker pool + preemption │
31
31
  │ • Pipes (|), redirects (>, >>, 2>&1) │ │ • In-memory POSIX VFS (/tmp, …) │
32
- │ • 71 POSIX coreutils + git + jq │ │ • Node.js v22 (50 built-in mods)│
32
+ │ • 73 POSIX coreutils + git + jq │ │ • Node.js v22 (50 built-in mods)│
33
33
  │ • Interactive PTY ANSI/256-color │ │ • Bun v1.1 (serve, sqlite, test)│
34
34
  │ • Job table (ps, jobs, fg, bg, kill) │ │ • WASI Preview 1 + C++20 Clang │
35
35
  └───────────────────────────────────────┘ └──────────────────────────────────┘
@@ -71,7 +71,7 @@ It is designed around two strictly decoupled layers that can be used together (`
71
71
 
72
72
  `createPosixShell` implements a complete POSIX shell interpreter inside the browser:
73
73
  - **Lexer & Recursive-Descent AST Parser**: Supports single/double quotes, escape sequences, pipelines (`cmd1 | cmd2 | cmd3`), logical operators (`&&`, `||`, `;`), background execution (`&`), I/O redirection (`>`, `>>`, `<`, `<<<`, `2>`, `2>&1`, `&>`), environment variable expansion (`$VAR`, `${VAR:-default}`, `${VAR:=default}`, `${#VAR}`, `$?`, `$$`), command substitution (`$(...)`), arithmetic expansion (`$((...))`), brace expansion (`{a,b,c}`, `{1..5}`), and globbing (`*`, `?`, `**`).
74
- - **71 Built-in Coreutils**:
74
+ - **73 Built-in Coreutils**:
75
75
  - File & Directory: `ls`, `cat`, `head`, `tail`, `wc`, `cp`, `mv`, `rm`, `mkdir`, `rmdir`, `touch`, `ln`, `pwd`, `cd`, `find`, `tree`, `stat`, `file`, `du`, `df`, `chmod`, `chown`, `mktemp`, `basename`, `dirname`, `realpath`.
76
76
  - Text & Data Processing: `grep`, `sed`, `awk`, `sort`, `uniq`, `cut`, `tr`, `tee`, `xargs`, `diff`, `jq`, `xxd`, `hexdump`, `base64`, `md5sum`, `sha256sum`.
77
77
  - Networking, Load Testing, Chaos & Databases: `curl`, `hey` (`ab`, `wrk`), `chaos`, `sqlite3`, `redis-cli`, `nc`, `ping`, `dig`, `nslookup`, `lsof`, `netstat`, `ss`, `ps`, `top`, `kill`, `jobs`, `fg`, `bg`, `tar`, `gzip`, `gunzip`.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,29 @@ All notable changes to `@innovatorved/code-lab` are documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.6.1] - 2026-11-16
8
+
9
+ ### Changed
10
+ - **Unified Geist Monochrome Design System (`src/code-lab.css`, `packages/ui/src/themes.ts`, `packages/ui/src/settings-dialog.ts`, `packages/sql/src/styles.ts`, `src/workbench/`)**:
11
+ - Replaced all copied VS Code blue tokens (`#0078d4`, `#005fb8`, `#04395e`) with the unified **Charcoal Ink** (`#0f0f10` canvas, `#141415` chrome, `#18181a` surface, `#27272a` hairline border, `#f4f4f5` primary ink/CTA) and **Warm Paper** (`#ffffff` canvas, `#f7f7f5` chrome, `#f1f1ee` surface, `#e6e4df` hairline border, `#18181b` primary ink/CTA) design system shared across `system-design-in-depth`, `dsa-in-depth`, and `interview-copilot-admin`, with seamless `--ds-*` / `--*` host CSS custom-property inheritance.
12
+ - Standardized typography on **Geist** (`--cl-font-sans`) for UI chrome and **Geist Mono** (`--cl-font-mono`) for code editors, Monaco `DiffEditor`, `@xterm/xterm` terminal, and standalone SQL editor, backed by a tokenized type scale (`--cl-text-2xs` through `--cl-text-xl`).
13
+ - Refactored ad-hoc inline `style="..."` font sizes and colors across Settings UI (`@code-lab/ui`), Observability, modals, and workbench panels into reusable `.cl-ui-*` and `.cl-settings-*` component classes.
14
+
15
+ ## [0.6.0] - 2026-11-15
16
+
17
+ ### Added
18
+ - **Authentic VS Code Dark Modern & Light Modern Design System (`packages/ui/src/themes.ts`, `packages/ui/src/settings-dialog.ts`, `src/workbench/icons.ts`, `src/code-lab.css`)**:
19
+ - Upgraded built-in themes to authentic `vscode.dev` Dark Modern (`#1f1f1f` editor, `#181818` chrome, `#0078d4` accent) and Light Modern (`#ffffff` editor, `#f8f8f8` chrome, `#005fb8` accent) tokens, aligned Settings UI (`Cmd+,`) and all secondary panels, added uniform `24x24` Activity Bar Codicons and colored Seti file-type icons, added Explorer `OUTLINE` & `TIMELINE` sections, and strictly scoped all CSS rules under `.codelab` / `.cl-` with zero host-page style leakage.
20
+ - Added complete `0px` bottom-panel collapse (`display: none`) across Close (`×`), `Cmd+J` / `Ctrl+J` / `Ctrl+\``, Titlebar toggle, Status Bar toggle, and horizontal splitter drag-down (`< 56px` snap-to-collapse) while keeping right-side terminal actions pinned.
21
+ - Removed the `JS | TS | PY | C++` topbar switcher in IDE/Workbench mode (retaining it strictly in Guided Lab mode) and surfaced the active file's language mode dynamically in the `22px` Status Bar (`#cl-status-lang`).
22
+ - **Real `@xterm/xterm` PTY Terminal, Side-by-Side Split Panes & Worker `Ctrl+C` (`src/workbench/xterm-adapter.ts`, `src/terminal.ts`, `src/shell.ts`, `src/runtime.ts`)**:
23
+ - Integrated `@xterm/xterm`, `@xterm/addon-fit`, and `@xterm/addon-web-links` with clickable `file:line:col` diagnostic links, full `\x1b[2J` / `\x1b[3J` / `\x1bc` screen clearing, reverse-i-search (`Ctrl+R`), bracketed multiline paste, side-by-side Split Terminal (`[bash-1 | bash-2]`), and deferred headless evaluation so Node/Bun CLI imports stay zero-overhead.
24
+ - Propagated per-instance `instanceId` and interactive `onRequestStdin` hooks into `executeInWorker` and `createPosixShell` so `Ctrl+C` (`interruptTerminal()`) terminates infinite Worker loops in `< 200ms` (`exitCode: 130`) without affecting sibling instances, and POSIX `read` / Node `readline` / Python `input()` prompt interactively inside the terminal.
25
+ - **Real In-Browser Git (`isomorphic-git`) & Monaco Side-by-Side `DiffEditor` (`src/scm.ts`, `src/shell.ts`, `src/storage.ts`, `src/workbench/diff-editor.ts`)**:
26
+ - Integrated `isomorphic-git` with durable IndexedDB `/workspace/.git/**` binary persistence, `.gitignore` filtering, Myers 3-line context unified hunk diffs, real working-tree branch switching (`checkout` / `switch`), `stash push/pop/list/drop`, `reset --soft/--mixed/--hard`, `blame`, `tag`, `show`, live Monaco Git gutter decorations, Explorer `M/U/A/D` badges, and an interactive Monaco Side-by-Side / Inline `DiffEditor`.
27
+ - **100% Browser-Native Cross-File Language Intelligence (`src/workbench/intellisense.ts`, `src/extensions/python.ts`, `src/extensions/cpp.ts`, `src/workbench/command-palette.ts`)**:
28
+ - Enabled eager multi-file TypeScript/JavaScript worker sync (`file:///workspace/*` URIs), live `tsconfig.json` compiler-option sync, cross-file Go-to-Definition (`F12` / `Cmd+Click`), Automatic Type Acquisition (`.d.ts` caching), JSON schemas (`package.json`, `tsconfig.json`), HTML/JSX tag auto-closing, CSS custom-property completion, SQL schema completion, and fuzzy Command Palette (`Cmd+P`, `:line`, `@symbol`, `#workspaceSymbol`, `>`).
29
+
7
30
  ## [0.5.0] - 2026-11-14
8
31
 
9
32
  ### Added
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @innovatorved/code-lab
2
2
 
3
- Modular browser-native IDE workbench (`v0.5.0`), Web Worker runtime for Node.js, Bun, TypeScript, C++20 WebAssembly, and Python 3.12 WebAssembly, POSIX shell with 71 UNIX coreutils, and lightweight SQL playground built with strict TypeScript and Zod schemas — zero backend servers or cross-origin isolation headers required.
3
+ Modular browser-native IDE workbench (`v0.6.1`), Web Worker runtime for Node.js, Bun, TypeScript, C++20 WebAssembly, and Python 3.12 WebAssembly, POSIX shell with 73 UNIX coreutils, and lightweight SQL playground built with strict TypeScript and Zod schemas — zero backend servers or cross-origin isolation headers required.
4
4
 
5
5
 
6
6
  ## Highlights
@@ -8,7 +8,7 @@ Modular browser-native IDE workbench (`v0.5.0`), Web Worker runtime for Node.js,
8
8
  - **Layered Modular Core**: Four-layer workspace architecture with dependency injection, workspace settings and custom keybindings, a visual Settings dialog, Dark, Light, and High-Contrast themes, and lazy-loaded plugins.
9
9
  - **SQL Editor & Playground (~16.5 KB gzipped)**: Standalone PostgreSQL 18 and SQLite 3 editor supporting inline lesson blocks, split-pane query studios, SQL formatting, schema-aware alias autocomplete, inline wavy diagnostics, and accessible keyboard navigation.
10
10
  - **Node.js, Bun & WebAssembly Toolchains**: Built-in JavaScript and JSX runtime with 50 built-in modules (50 Node.js built-ins) and native Bun APIs, plus opt-in TypeScript, Clang/LLVM C++20 WebAssembly, and Pyodide Python 3.12 extensions.
11
- - **POSIX Shell & 71 Coreutils**: Multi-session terminal with pipelines, stream redirection, background servers, public GitHub repository cloning, package installation, HTTP load testing, and 71 UNIX commands.
11
+ - **POSIX Shell & 73 Coreutils**: Multi-session terminal with pipelines, stream redirection, background servers, public GitHub repository cloning, package installation, HTTP load testing, and 73 UNIX commands.
12
12
  - **Guided Labs & Headless Grading**: Step-by-step coding and SQL challenges with progressive hints, side-by-side solution diffs, and zero-UI headless worker execution.
13
13
 
14
14
 
@@ -78,7 +78,7 @@ const sql = createSqlEditor(document.getElementById('sql')!, {
78
78
  | `@innovatorved/code-lab/sql` | Zero-dependency PostgreSQL 18 and SQLite 3 inline and playground editor (~16.5 KB gzipped) |
79
79
  | `@innovatorved/code-lab/sql.css` | Standalone SQL editor stylesheet |
80
80
  | `@innovatorved/code-lab/runtime` | Headless Web Worker runtime for programmatic code and test execution |
81
- | `@innovatorved/code-lab/shell` | Pure-JavaScript POSIX shell interpreter and 71 UNIX utilities |
81
+ | `@innovatorved/code-lab/shell` | Pure-JavaScript POSIX shell interpreter and 73 UNIX utilities |
82
82
  | `@innovatorved/code-lab/terminal` | 256-color PTY terminal emulator engine |
83
83
  | `@innovatorved/code-lab/schemas` | Zod runtime validation schemas and TypeScript types |
84
84
  | `@innovatorved/code-lab/extensions/*` | Opt-in extensions for Guided Labs, TypeScript, C++20 WebAssembly, and Python 3.12 WebAssembly |
@@ -1,26 +1,32 @@
1
1
  /* @innovatorved/code-lab/sql — Lightweight SQL Editor & Playground Styles */
2
2
  .cl-sql-root {
3
- --cl-bg: var(--code-bg, var(--surface, #0a0a0a));
4
- --cl-fg: var(--code-fg, var(--fg, #f5f5f5));
5
- --cl-accent: var(--accent, #0284c7);
6
- --cl-border: var(--border, #262626);
7
- --cl-font-mono: var(--font-mono, 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
8
- --cl-sql-gutter-bg: rgba(255, 255, 255, 0.025);
9
- --cl-sql-gutter-fg: #737373;
10
- --cl-sql-popup-bg: #141414;
11
- --cl-sql-popup-hover: rgba(2, 132, 199, 0.18);
12
- --cl-sql-kw: #38bdf8;
3
+ --cl-bg: var(--code-bg, var(--ds-canvas, var(--bg, #0f0f10)));
4
+ --cl-fg: var(--code-fg, var(--ds-ink, var(--fg, #f4f4f5)));
5
+ --cl-accent: var(--brand-accent, var(--accent, #f4f4f5));
6
+ --cl-accent-fg: var(--brand-accent-ink, var(--accent-fg, #0f0f10));
7
+ --cl-border: var(--ds-border, var(--border, #27272a));
8
+ --cl-font-sans: var(--ds-font-sans, var(--font-sans, "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif));
9
+ --cl-font-mono: var(--ds-font-mono, var(--font-mono, "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace));
10
+ --cl-text-2xs: var(--ds-text-2xs, 0.6875rem);
11
+ --cl-text-xs: var(--ds-text-xs, 0.75rem);
12
+ --cl-text-sm: var(--ds-text-sm, 0.8125rem);
13
+ --cl-sql-gutter-bg: var(--ds-canvas-subtle, var(--bg-alt, #141415));
14
+ --cl-sql-gutter-fg: var(--ds-ink-faint, #8e8e97);
15
+ --cl-sql-popup-bg: var(--ds-surface, #18181a);
16
+ --cl-sql-popup-hover: var(--ds-surface-active, #28282b);
17
+ --cl-sql-selection: rgba(244, 244, 245, 0.18);
18
+ --cl-sql-kw: #f87171;
13
19
  --cl-sql-fn: #c084fc;
14
- --cl-sql-type: #2dd4bf;
20
+ --cl-sql-type: #fb923c;
15
21
  --cl-sql-str: #86efac;
16
- --cl-sql-num: #fbbf24;
17
- --cl-sql-op: #f472b6;
18
- --cl-sql-param: #fb923c;
19
- --cl-sql-qident: #93c5fd;
20
- --cl-sql-comment: #737373;
21
- --cl-sql-error: #ef4444;
22
- --cl-sql-warn: #f59e0b;
23
- --cl-sql-font-size: 13.5px;
22
+ --cl-sql-num: #fcd34d;
23
+ --cl-sql-op: #d4d4d8;
24
+ --cl-sql-param: #fbbf24;
25
+ --cl-sql-qident: #e4e4e7;
26
+ --cl-sql-comment: #8e8e97;
27
+ --cl-sql-error: #f87171;
28
+ --cl-sql-warn: #fbbf24;
29
+ --cl-sql-font-size: 0.8125rem;
24
30
  --cl-sql-line-height: 1.55;
25
31
 
26
32
  color-scheme: dark;
@@ -34,29 +40,33 @@
34
40
  background: var(--cl-bg);
35
41
  color: var(--cl-fg);
36
42
  accent-color: var(--cl-accent);
37
- font-family: var(--cl-font-mono);
43
+ font-family: var(--cl-font-sans);
38
44
  container-type: inline-size;
39
45
  }
40
46
 
41
47
  .cl-sql-root[data-cl-sql-theme="light"],
42
48
  :root[data-theme="light"] .cl-sql-root:not([data-cl-sql-theme="dark"]) {
43
- --cl-bg: var(--code-bg, var(--surface, #ffffff));
44
- --cl-fg: var(--code-fg, var(--fg, #0f172a));
45
- --cl-accent: var(--accent, #0284c7);
46
- --cl-border: var(--border, #e2e8f0);
47
- --cl-sql-gutter-bg: #f8fafc;
48
- --cl-sql-gutter-fg: #64748b;
49
+ --cl-bg: var(--code-bg, var(--ds-surface, var(--surface, #ffffff)));
50
+ --cl-fg: var(--code-fg, var(--ds-ink, var(--fg, #18181b)));
51
+ --cl-accent: var(--brand-accent, var(--accent, #18181b));
52
+ --cl-accent-fg: var(--brand-accent-ink, var(--accent-fg, #ffffff));
53
+ --cl-border: var(--ds-border, var(--border, #e6e4df));
54
+ --cl-sql-gutter-bg: var(--ds-canvas, var(--bg, #f7f7f5));
55
+ --cl-sql-gutter-fg: var(--ds-ink-faint, #6e6a64);
49
56
  --cl-sql-popup-bg: #ffffff;
50
- --cl-sql-popup-hover: rgba(2, 132, 199, 0.12);
51
- --cl-sql-kw: #0369a1;
52
- --cl-sql-fn: #7e22ce;
53
- --cl-sql-type: #0f766e;
54
- --cl-sql-str: #15803d;
55
- --cl-sql-num: #b45309;
56
- --cl-sql-op: #be185d;
57
- --cl-sql-param: #c2410c;
58
- --cl-sql-qident: #1d4ed8;
59
- --cl-sql-comment: #64748b;
57
+ --cl-sql-popup-hover: #ecebe7;
58
+ --cl-sql-selection: rgba(24, 24, 27, 0.14);
59
+ --cl-sql-kw: #c2410c;
60
+ --cl-sql-fn: #6d28d9;
61
+ --cl-sql-type: #9a3412;
62
+ --cl-sql-str: #067647;
63
+ --cl-sql-num: #b54708;
64
+ --cl-sql-op: #3f3f46;
65
+ --cl-sql-param: #b54708;
66
+ --cl-sql-qident: #18181b;
67
+ --cl-sql-comment: #6e6a64;
68
+ --cl-sql-error: #b42318;
69
+ --cl-sql-warn: #b54708;
60
70
  color-scheme: light;
61
71
  background: var(--cl-bg);
62
72
  color: var(--cl-fg);
@@ -76,7 +86,7 @@
76
86
  gap: 8px;
77
87
  padding: 6px 10px;
78
88
  border-bottom: 1px solid var(--cl-border);
79
- font-size: 12px;
89
+ font-size: var(--cl-text-xs);
80
90
  background: var(--cl-sql-gutter-bg);
81
91
  border-radius: 7px 7px 0 0;
82
92
  }
@@ -92,13 +102,14 @@
92
102
  .cl-sql-dialect-pill {
93
103
  display: inline-flex;
94
104
  align-items: center;
95
- padding: 2px 7px;
105
+ padding: 2px 8px;
96
106
  border-radius: 999px;
97
- font-size: 11px;
107
+ font-family: var(--cl-font-mono);
108
+ font-size: var(--cl-text-2xs);
98
109
  font-weight: 600;
99
110
  letter-spacing: 0.02em;
100
111
  border: 1px solid var(--cl-border);
101
- color: var(--cl-accent);
112
+ color: var(--cl-fg);
102
113
  }
103
114
 
104
115
  .cl-sql-btn {
@@ -107,15 +118,16 @@
107
118
  align-items: center;
108
119
  gap: 5px;
109
120
  padding: 4px 10px;
110
- border-radius: 5px;
121
+ border-radius: 6px;
111
122
  border: 1px solid var(--cl-border);
112
123
  background: transparent;
113
124
  color: var(--cl-fg);
114
- font-family: inherit;
115
- font-size: 12px;
125
+ font-family: var(--cl-font-sans);
126
+ font-size: var(--cl-text-xs);
116
127
  font-weight: 500;
117
128
  cursor: pointer;
118
129
  touch-action: manipulation;
130
+ transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
119
131
  }
120
132
 
121
133
  .cl-sql-btn:hover {
@@ -125,11 +137,11 @@
125
137
  .cl-sql-btn-primary {
126
138
  background: var(--cl-accent);
127
139
  border-color: var(--cl-accent);
128
- color: #ffffff;
140
+ color: var(--cl-accent-fg);
129
141
  }
130
142
 
131
143
  .cl-sql-btn:focus-visible {
132
- outline: 2px solid var(--cl-accent);
144
+ outline: 1px solid var(--cl-accent);
133
145
  outline-offset: 2px;
134
146
  }
135
147
 
@@ -163,12 +175,12 @@
163
175
  border-left: 1px solid var(--cl-border);
164
176
  padding: 10px 12px;
165
177
  overflow: auto;
166
- font-size: 12.5px;
178
+ font-size: var(--cl-text-sm);
167
179
  }
168
180
 
169
181
  .cl-sql-ResultsEmpty {
170
182
  color: var(--cl-sql-gutter-fg);
171
- font-size: 12px;
183
+ font-size: var(--cl-text-xs);
172
184
  }
173
185
 
174
186
  .cl-sql-surface {
@@ -187,6 +199,8 @@
187
199
  background: var(--cl-sql-gutter-bg);
188
200
  border-right: 1px solid var(--cl-border);
189
201
  color: var(--cl-sql-gutter-fg);
202
+ font-family: var(--cl-font-mono);
203
+ font-variant-numeric: tabular-nums;
190
204
  font-size: var(--cl-sql-font-size);
191
205
  line-height: var(--cl-sql-line-height);
192
206
  overflow: hidden;
@@ -281,7 +295,7 @@
281
295
  }
282
296
 
283
297
  .cl-sql-textarea::selection {
284
- background: rgba(2, 132, 199, 0.32);
298
+ background: var(--cl-sql-selection);
285
299
  }
286
300
 
287
301
  .cl-sql-textarea:focus-visible {
@@ -326,11 +340,12 @@
326
340
 
327
341
  .cl-sql-diagnostics {
328
342
  display: none;
329
- padding: 7px 12px;
343
+ padding: 8px 12px;
330
344
  border-top: 1px solid var(--cl-border);
331
- font-size: 12px;
345
+ font-family: var(--cl-font-sans);
346
+ font-size: var(--cl-text-xs);
332
347
  line-height: 1.45;
333
- background: rgba(239, 68, 68, 0.09);
348
+ background: rgba(239, 68, 68, 0.08);
334
349
  color: var(--cl-fg);
335
350
  }
336
351
 
@@ -346,8 +361,9 @@
346
361
  }
347
362
 
348
363
  .cl-sql-diag-badge {
349
- font-size: 10.5px;
350
- font-weight: 700;
364
+ font-family: var(--cl-font-mono);
365
+ font-size: var(--cl-text-2xs);
366
+ font-weight: 600;
351
367
  text-transform: uppercase;
352
368
  padding: 1px 5px;
353
369
  border-radius: 4px;
@@ -357,14 +373,14 @@
357
373
 
358
374
  .cl-sql-diag-badge[data-severity="warning"] {
359
375
  background: var(--cl-sql-warn);
360
- color: #000000;
376
+ color: #09090b;
361
377
  }
362
378
 
363
379
  .cl-sql-diag-hint {
364
380
  width: 100%;
365
381
  margin-top: 2px;
366
382
  color: var(--cl-sql-gutter-fg);
367
- font-size: 11.5px;
383
+ font-size: var(--cl-text-xs);
368
384
  }
369
385
 
370
386
  /* Schema-aware completion popup */
@@ -381,10 +397,11 @@
381
397
  padding: 4px;
382
398
  list-style: none;
383
399
  border: 1px solid var(--cl-border);
384
- border-radius: 7px;
400
+ border-radius: 8px;
385
401
  background: var(--cl-sql-popup-bg);
386
- box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
387
- font-size: 12px;
402
+ box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
403
+ font-family: var(--cl-font-sans);
404
+ font-size: var(--cl-text-xs);
388
405
  }
389
406
 
390
407
  .cl-sql-completions[data-open="true"] {
@@ -397,7 +414,7 @@
397
414
  justify-content: space-between;
398
415
  gap: 8px;
399
416
  padding: 5px 8px;
400
- border-radius: 5px;
417
+ border-radius: 6px;
401
418
  cursor: pointer;
402
419
  touch-action: manipulation;
403
420
  }
@@ -421,14 +438,17 @@
421
438
  width: 18px;
422
439
  height: 18px;
423
440
  border-radius: 4px;
441
+ font-family: var(--cl-font-mono);
424
442
  font-size: 10px;
425
443
  font-weight: 700;
426
- background: rgba(2, 132, 199, 0.16);
427
- color: var(--cl-accent);
444
+ border: 1px solid var(--cl-border);
445
+ background: var(--cl-sql-gutter-bg);
446
+ color: var(--cl-fg);
428
447
  flex-shrink: 0;
429
448
  }
430
449
 
431
450
  .cl-sql-comp-label {
451
+ font-family: var(--cl-font-mono);
432
452
  font-weight: 600;
433
453
  overflow: hidden;
434
454
  text-overflow: ellipsis;
@@ -440,11 +460,12 @@
440
460
  align-items: center;
441
461
  gap: 5px;
442
462
  flex-shrink: 0;
443
- font-size: 11px;
463
+ font-size: var(--cl-text-2xs);
444
464
  color: var(--cl-sql-gutter-fg);
445
465
  }
446
466
 
447
467
  .cl-sql-comp-badge {
468
+ font-family: var(--cl-font-mono);
448
469
  padding: 1px 5px;
449
470
  border-radius: 4px;
450
471
  border: 1px solid var(--cl-border);
@@ -455,9 +476,11 @@
455
476
  display: flex;
456
477
  align-items: center;
457
478
  justify-content: space-between;
458
- padding: 3px 10px;
479
+ padding: 4px 10px;
459
480
  border-top: 1px solid var(--cl-border);
460
- font-size: 11px;
481
+ font-family: var(--cl-font-sans);
482
+ font-size: var(--cl-text-2xs);
483
+ font-variant-numeric: tabular-nums;
461
484
  color: var(--cl-sql-gutter-fg);
462
485
  }
463
486