@innovatorved/code-lab 0.3.0 → 0.3.2

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 (57) hide show
  1. package/ARCHITECTURE.md +4 -2
  2. package/CHANGELOG.md +38 -0
  3. package/README.md +15 -5
  4. package/dist/code-lab.css +52 -2
  5. package/dist/code-lab.d.ts +1 -1
  6. package/dist/code-lab.esm.js +1533 -396
  7. package/dist/code-lab.js +1532 -395
  8. package/dist/diagnostics.d.ts +5 -0
  9. package/dist/extensions/cpp.d.ts +8 -0
  10. package/dist/extensions/cpp.esm.js +333 -10
  11. package/dist/extensions/cpp.js +333 -10
  12. package/dist/extensions/guided-lab.esm.js +1 -1
  13. package/dist/extensions/guided-lab.js +1 -1
  14. package/dist/extensions/python.esm.js +117 -104
  15. package/dist/extensions/python.js +117 -104
  16. package/dist/index.d.ts +1 -1
  17. package/dist/preview-sw.js +34 -17
  18. package/dist/runtime.esm.js +38 -31
  19. package/dist/runtime.js +38 -31
  20. package/dist/schemas.d.ts +4 -4
  21. package/dist/schemas.esm.js +1 -1
  22. package/dist/schemas.js +1 -1
  23. package/dist/scm.d.ts +13 -2
  24. package/dist/search.d.ts +5 -1
  25. package/dist/shell.esm.js +72 -16
  26. package/dist/shell.js +72 -16
  27. package/dist/terminal.esm.js +183 -54
  28. package/dist/terminal.js +183 -54
  29. package/dist/workbench/index.d.ts +1 -1
  30. package/dist/workbench/styles.d.ts +1 -1
  31. package/dist/zip.d.ts +4 -3
  32. package/package.json +1 -1
  33. package/src/code-lab.css +52 -2
  34. package/src/csp.ts +7 -10
  35. package/src/diagnostics.ts +42 -3
  36. package/src/extensions/cpp.ts +303 -9
  37. package/src/extensions/python.ts +128 -116
  38. package/src/index.ts +1 -1
  39. package/src/preview-sw.js +25 -5
  40. package/src/runtime.ts +36 -29
  41. package/src/schemas.ts +2 -2
  42. package/src/scm.ts +106 -19
  43. package/src/search.ts +71 -27
  44. package/src/shell.ts +70 -14
  45. package/src/terminal.ts +181 -52
  46. package/src/workbench/diff-editor.ts +41 -13
  47. package/src/workbench/drawer.ts +17 -8
  48. package/src/workbench/guided-pane.ts +12 -2
  49. package/src/workbench/share.ts +37 -8
  50. package/src/workbench/styles.ts +2 -1
  51. package/src/workbench/toolbar.ts +15 -4
  52. package/src/workbench.ts +484 -91
  53. package/src/zip.ts +29 -7
  54. package/dist/runtime/module-loader.d.ts +0 -11
  55. package/dist/runtime/vfs.d.ts +0 -31
  56. package/dist/runtime/wasi-host.d.ts +0 -33
  57. package/dist/shell/lexer-parser.d.ts +0 -26
package/ARCHITECTURE.md CHANGED
@@ -1,4 +1,4 @@
1
- # `@innovatorved/code-lab` Architecture (v0.3.0)
1
+ # `@innovatorved/code-lab` Architecture (v0.3.2)
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, 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
 
@@ -81,8 +81,10 @@ It is designed around two strictly decoupled layers that can be used together (`
81
81
  ## 3. PTY Terminal Engine (`src/terminal.ts`)
82
82
 
83
83
  `PTYTerminalEngine` provides an interactive terminal UI and ANSI/VT100 escape sequence parser:
84
+ - **Foreground Command Execution Lock**: Tracks `isBusy` / `isCommandRunning()` across synchronous and asynchronous `onCommand` promises plus external `isRunning()` callbacks. While a foreground command is running, the active prompt line (`#cl-pty-active-line`) is hidden (`data-busy="true"`), the submitted command is echoed immediately before output streams, and new keystrokes/submissions are blocked until completion (while `Ctrl+C` remains active to dispatch `SIGINT`).
85
+ - **Background Job Isolation (`&`)**: Background jobs spawned via `cmd &` in `PosixShell` receive an independent per-job `AbortController` linked to the job table (`jobs`, `fg`, `bg`, `kill %1`), ensuring foreground `Ctrl+C` interrupts only the foreground pipeline without killing background servers or jobs.
84
86
  - Supports SGR 16-color, 256-color (`38;5;n`), and 24-bit TrueColor (`38;2;r;g;b`) foreground/background attributes, bold, dim, italic, underline, and partial SGR resets (`22`, `23`, `24`, `39`, `49`).
85
- - Supports readline shortcuts (`Ctrl+A`, `Ctrl+E`, `Ctrl+U`, `Ctrl+K`, `Ctrl+L`, `Ctrl+C`, `Ctrl+D`, `Ctrl+R` reverse-i-search), command history (`ArrowUp`/`ArrowDown`), interactive `readLine()` stdin prompts, and context-aware `Tab` autocompletion for commands and VFS file paths.
87
+ - Supports readline shortcuts (`Ctrl+A`, `Ctrl+E`, `Ctrl+U`, `Ctrl+K`, `Ctrl+L`, `Ctrl+C`, `Ctrl+D`, `Ctrl+R` reverse-i-search), cursor movement (`ArrowLeft`, `ArrowRight`, `Home`, `End`), command history (`ArrowUp`/`ArrowDown`), interactive `readLine()` stdin prompts, and context-aware `Tab` autocompletion for commands and VFS file paths.
86
88
 
87
89
  ---
88
90
 
package/CHANGELOG.md CHANGED
@@ -4,6 +4,44 @@ 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.3.2] - 2026-10-26
8
+
9
+ ### Added
10
+ - **Terminal Foreground Command Locking & Background Job Isolation (`src/terminal.ts`, `src/workbench.ts`, `src/shell.ts`)**:
11
+ - `PTYTerminalEngine` and `CodeLabWorkbench._handleReplCommand()` now lock the terminal while a foreground command is running (`isBusy` / `isCommandRunning()`), immediately echoing the command, hiding the active prompt line and blinking cursor (`data-busy="true"`), and blocking concurrent command submission until the active command completes or is interrupted via `Ctrl+C`.
12
+ - Background shell jobs (`cmd &`) now run with an independent per-job `AbortController` registered in the shell job table, surviving foreground `Ctrl+C` (`SIGINT`) interrupts while remaining controllable via `jobs`, `fg`, `bg`, and `kill %1`.
13
+ - **Interactive Modals & Multi-Session Terminal Switcher (`src/workbench.ts`, `src/code-lab.css`)**:
14
+ - **Workspace Search & Replace Modal**: Added live search-as-you-type, a **Replace All** button wired to `replaceInWorkspace()`, dark-theme input styling, and 1-click jump to matched `file:line:column`.
15
+ - **Interactive Git Source Control Modal**: Added **Stage**, **Unstage**, **Stage All**, and **Commit** controls (`stageGitFile`, `unstageGitFile`, `stageAllGitFiles`, `commitGitChanges`) plus click-to-open file navigation.
16
+ - **Multi-Session Terminal Bar**: Added a session switcher pill bar (`bash-1`, `+`, `×`) in the terminal drawer header and fixed terminal clearing (`Ctrl+L`, `clear`, Clear button) so session log arrays remain bound across session switches.
17
+
18
+ ### Fixed
19
+ - **UI & Workbench Polish**:
20
+ - Fixed Split-Run dropdown menu (`#cl-split-run-menu`) not opening on click due to `.open` vs `.active` CSS class mismatch.
21
+ - Fixed terminal visual cursor synchronization on `ArrowLeft`, `ArrowRight`, `Home`, `End`, and mouse click.
22
+ - Fixed uncaught `ReferenceError: testTab is not defined` in `_refreshDrawerTabs()` when dynamically inserting the `stdin` drawer tab.
23
+ - Fixed `showProblemsModal()` and `problems` drawer tab click/keyboard navigation and column attribute normalization.
24
+ - Fixed `#cl-diff-apply-btn` and `#cl-diff-revert-btn` in `src/workbench/diff-editor.ts` to properly apply reference solutions and starter files.
25
+ - **Security, Runtime & Infrastructure Hardening**:
26
+ - Enforced origin and controlled-client (`self.clients.get`) verification in `src/preview-sw.js` and decoded binary (`Uint8Array` / `ArrayBuffer`) HTML bodies before CSP injection.
27
+ - Sanitized custom CSP policies against newline/`"`/`<`/`>` injection in `src/csp.ts`.
28
+ - Added 5 MB decompression stream limit for `#codelab=` URL snapshots, 100 MB / 10,000-entry ZIP bomb caps in `src/zip.ts`, and prototype-pollution path filtering across `src/zip.ts`, `src/search.ts`, `src/scm.ts`, and `src/workbench.ts`.
29
+ - Hardened Python (`src/extensions/python.ts`) and C++ (`src/extensions/cpp.ts`) extensions with singleton Pyodide loading locks, `json.dumps` safe path injection, `sys.stdin` restoration in `finally`, bounded AST regex checks, and `IndexedDB` connection closing on transaction completion.
30
+ - Added `src/workbench/*.ts` modular controllers to `tsconfig.strict.json` (12 strict TypeScript modules).
31
+
32
+ ## [0.3.1] - 2026-10-26
33
+
34
+ ### Added
35
+ - **C++ WASI Toolchain Resilient Fallback (`@innovatorved/code-lab/extensions/cpp`)**:
36
+ - Offline and network-resilient compilation fallback when remote WASI assets or sysroot (`sysroot.tar`) return HTTP 404 or cannot be downloaded.
37
+ - Exported `buildWasiPrintWasm(stdoutText, exitCode, stderrText)` generating minimal, deterministic WASI binaries for immediate execution without remote toolchain dependencies.
38
+ - Virtual syntax simulation compiler (`_compileVirtualFallback`) in `CppToolchainManager` for AST checks and standard competitive programming DSA solutions.
39
+ - Added `'error'` stage support in `CppToolchainProgressSchema`.
40
+
41
+ ### Fixed
42
+ - **Node 20 Runtime Compatibility**: Guarded `navigator.clipboard` access in `shareSnapshot()` against environments where `navigator` global is undefined.
43
+ - **Workbench Drawer Navigation**: Stabilized drawer tabs so primary panels (`tests`, `preview`, `terminal`, `stdin`, `ports`, `network`, `inspector`) remain consistently accessible during user navigation.
44
+
7
45
  ## [0.3.0] - 2026-10-24
8
46
 
9
47
  ### Added
package/README.md CHANGED
@@ -11,7 +11,7 @@ Browser-native code IDE workbench, modular guided challenge engine (`@innovatorv
11
11
 
12
12
  ## Features
13
13
 
14
- - **Modular Architecture (`v0.3.0`)**: Pure, general-purpose browser IDE (`code-lab`) by default with File Explorer, Monaco Editor, PTY Terminal, and zero-dependency **JavaScript + Node.js/Bun** execution out of the box. Additional languages (`@innovatorved/code-lab/extensions/typescript`, `@innovatorved/code-lab/extensions/cpp`, and `@innovatorved/code-lab/extensions/python`) and curriculum features (`@innovatorved/code-lab/extensions/guided-lab`) are opt-in modular extensions.
14
+ - **Modular Architecture (`v0.3.2`)**: Pure, general-purpose browser IDE (`code-lab`) by default with File Explorer, Monaco Editor, PTY Terminal, and zero-dependency **JavaScript + Node.js/Bun** execution out of the box. Additional languages (`@innovatorved/code-lab/extensions/typescript`, `@innovatorved/code-lab/extensions/cpp`, and `@innovatorved/code-lab/extensions/python`) and curriculum features (`@innovatorved/code-lab/extensions/guided-lab`) are opt-in modular extensions.
15
15
  - **Real C++20 in WebAssembly (`@innovatorved/code-lab/extensions/cpp`)**: Compile and run real C++17/C++20/C++23 code natively in the browser via a WebAssembly Clang/LLVM + LLD (`wasm-ld`) + WASI `libc++` sysroot toolchain (~35 MB downloaded on demand only when the C++ extension is used and cached in `IndexedDB`). Features rich VS Code-style Monaco IntelliSense with auto-completions, header hovers, debounced static AST linting (`analyzeCppSource`), and live Clang compiler stderr error-squiggles (`applyClangStderrDiagnostics`). Includes `<bits/stdc++.h>`, `<codelab/dsa.hpp>` (`ListNode`, `TreeNode`, `buildLinkedList`, `buildBinaryTree`), and `<codelab/test.hpp>` (`DESCRIBE`, `TEST`, `ASSERT_EQ`) wired directly into the Test Suite drawer and Guided Lab step verification.
16
16
  - **Python 3.12 WebAssembly Extension (`@innovatorved/code-lab/extensions/python`)**: Run pure CPython 3.12 WebAssembly via Pyodide with lazy-loaded CDN binaries and IndexedDB caching. Features bidirectional VFS sync, pre-seeded `/usr/lib/python/` standard DSA helpers (`codelab_dsa.py` with `ListNode`, `TreeNode`, `MinHeap`, `MaxHeap`) and structured test framework (`codelab_test.py` with `describe`, `it`, `assert_equal`), Monaco completion/hover intelligence, traceback-to-squiggle mapping (`applyPythonTracebackDiagnostics`), static linting (`analyzePythonSource`), and formatting (`formatPythonSource`).
17
17
  - **Contextual Execution UI & Smooth Workbench**: Guided Challenge mode features a prominent primary `[✓ Verify Step (⌘↵)]` button with the `Test Suite` drawer tab visible by default. Normal/Sandbox mode provides a clean VS Code-style split button `[▶ Run Code (⌘↵) | ▾]` with dropdown options (`Run Entry`, `Run Active File`, `Run Tests`, `Configure Stdin`), with the drawer defaulting to `Terminal & REPL`. The topbar `Web Preview` globe button and bottom `Web Preview` drawer tab are contextual and stay neatly hidden unless the project contains web files or an active HTTP server.
@@ -25,7 +25,11 @@ Browser-native code IDE workbench, modular guided challenge engine (`@innovatorv
25
25
  - **End-to-End TypeScript & Zod Type Safety**: Written in TypeScript with strict runtime schemas and inferred types (`z.infer<typeof ...>`) for workbench options, guided labs, C++ toolchain options, runtime execution, and git cloning.
26
26
  - **Public GitHub Repository Cloning (`git clone`)**: Clone any public GitHub repository (`git clone https://github.com/owner/repo` or `git clone owner/repo --branch main` in the terminal, or `await lab.cloneRepo('owner/repo')` via the SDK) directly into `/workspace` with zero authentication required (automatic GitHub Trees API + jsDelivr unlimited fallback). Clone progress (`remote: Enumerating objects…`, `Receiving objects: n%…`) streams into the terminal in real time as it downloads.
27
27
  - **Interactive IDE Workbench**: Multi-file Monaco editor, collapsible hierarchical file tree with drag-and-drop, a workspace **folder switcher** (breadcrumb dropdown that scopes the explorer to any subfolder), decoupled editor tabs, Command Palette (`Cmd+Shift+P`), Quick Open (`Cmd+P`), breadcrumbs, and line-by-line solution diff viewer.
28
- - **Interactive PTY Terminal**: Inline prompt (`codelab:/workspace$ `), cursor navigation, history (`Up`/`Down`), `Ctrl+R` reverse-i-search, `Tab` auto-completion, `Ctrl+C` interrupt, `Ctrl+L` clear, and 256-color / TrueColor ANSI support.
28
+ - **Interactive PTY Terminal & Multi-Session Tabs**: Real-time streaming stdout/stderr with **foreground command locking** (hiding the active prompt and blocking concurrent input until the running foreground command finishes or is interrupted via `Ctrl+C`), isolated background jobs (`cmd &`) that survive foreground `SIGINT`, multi-session terminal tabs (`createTerminalSession`, `switchTerminalSession`, `closeTerminalSession`), inline prompt (`codelab:/workspace$ `), cursor navigation (`ArrowLeft`/`ArrowRight`/`Home`/`End`), history (`Up`/`Down`), `Ctrl+R` reverse-i-search, `Tab` auto-completion, `Ctrl+L` clear, and 256-color / TrueColor ANSI support.
29
+ - **Interactive Workspace Search, Git SCM & ZIP Export/Import**:
30
+ - **Workspace Search & Replace Modal (`Cmd+Shift+F`)**: Live regex/literal search across all workspace files with 1-click **Replace All** (`replaceInWorkspace`) and instant line/column navigation.
31
+ - **Interactive Git Source Control Modal**: View modified/staged/untracked files (`getGitStatus`), stage/unstage individual files or **Stage All** (`stageGitFile`, `unstageGitFile`, `stageAllGitFiles`), and create commits (`commitGitChanges`) directly from the UI or POSIX `git` CLI.
32
+ - **ZIP Archive & IndexedDB Persistence**: Export and import full workspaces as standard `.zip` archives (`exportZip`, `importZip`) with ZIP-bomb guards, and persist projects in `IndexedDB` (`saveProjectToStorage`, `loadProjectFromStorage`).
29
33
  - **POSIX Shell & 71 Coreutils**: Full pure-JS AST interpreter supporting pipelines (`|`), redirects (`>`, `>>`, `<`, `2>&1`, `<<<`, `<<EOF`), control flow (`if`/`for`/`while`/`case`), functions, arithmetic `$((...))`, brace expansion `{1..5}`, and 71 UNIX commands (`g++`, `clang++`, `c++`, `python`, `python3`, `pytest`, `pip`, `git`, `ls`, `cat`, `grep`, `find`, `sed`, `awk`, `jq`, `tar`, `curl`, `hey`, `ab`, `wrk`, `chaos`, `sqlite3`, `redis-cli`, `nc`, `lsof`, `tsc`, etc.) plus direct `./a.out` WASI binary execution.
30
34
  - **Dual Runtime Engines (Node.js v22 & Bun v1.1)**:
31
35
  - **Node.js**: 50 built-in modules (`fs`, `fs/promises`, `http`, `https`, `net`, `stream`, `events`, `crypto`, `zlib`, `vm`, `worker_threads`, `readline`, `module`, `node:test`, `assert`, etc.) with full Node.js built-ins support.
@@ -123,23 +127,25 @@ const res = await executeInWorker({
123
127
  console.log(res.ok, res.testResults);
124
128
  ```
125
129
 
126
- ### 4. Modular Language Extensions (TypeScript & Real C++20 in WebAssembly)
130
+ ### 4. Modular Language Extensions (TypeScript, Real C++20 & Python 3.12 in WebAssembly)
127
131
 
128
- JavaScript (`node` and `bun` zero-dependency browser runtime) is enabled out of the box. You can opt into TypeScript (`@innovatorved/code-lab/extensions/typescript`) and/or Real C++20 in WebAssembly (`@innovatorved/code-lab/extensions/cpp`):
132
+ JavaScript (`node` and `bun` zero-dependency browser runtime) is enabled out of the box. You can opt into TypeScript (`@innovatorved/code-lab/extensions/typescript`), Real C++20 in WebAssembly (`@innovatorved/code-lab/extensions/cpp`), and/or Python 3.12 in WebAssembly (`@innovatorved/code-lab/extensions/python`):
129
133
 
130
134
  ```js
131
135
  import CodeLab from '@innovatorved/code-lab';
132
136
  import { typescriptExtension } from '@innovatorved/code-lab/extensions/typescript';
133
137
  import { cppExtension } from '@innovatorved/code-lab/extensions/cpp';
138
+ import { pythonExtension } from '@innovatorved/code-lab/extensions/python';
134
139
  import { guidedLabExtension } from '@innovatorved/code-lab/extensions/guided-lab';
135
140
 
136
141
  const lab = CodeLab.mount('#editor', {
137
142
  id: 'dsa-binary-search',
138
- title: 'Binary Search (JS / TS / C++20)',
143
+ title: 'Binary Search (JS / TS / C++20 / Python 3.12)',
139
144
  language: 'cpp'
140
145
  })
141
146
  .use(typescriptExtension)
142
147
  .use((wb) => cppExtension(wb, { std: 'c++20', cacheInIndexedDB: true }))
148
+ .use((wb) => pythonExtension(wb, { cacheInIndexedDB: true }))
143
149
  .use((wb) =>
144
150
  guidedLabExtension(wb, {
145
151
  starterFiles: { 'src/solution.js': 'module.exports = { search: () => -1 };\n' },
@@ -148,6 +154,10 @@ const lab = CodeLab.mount('#editor', {
148
154
  'src/solution.hpp': '#pragma once\n#include <bits/stdc++.h>\nint search(const std::vector<int>& nums, int target) { return -1; }\n',
149
155
  'src/test.cpp': '#include <codelab/test.hpp>\n#include "solution.hpp"\nint main() {\n DESCRIBE("Binary Search", {\n TEST("finds target", {\n ASSERT_EQ(search({-1, 0, 3, 5, 9, 12}, 9), 4);\n });\n });\n return CODELAB_TEST_EXIT_CODE();\n}\n'
150
156
  },
157
+ pyStarterFiles: {
158
+ 'src/solution.py': 'def search(nums: list[int], target: int) -> int:\n return -1\n',
159
+ 'src/test_solution.py': 'from codelab_test import describe, it, assert_equal\nfrom solution import search\n\nwith describe("Binary Search"):\n with it("finds target"):\n assert_equal(search([-1, 0, 3, 5, 9, 12], 9), 4)\n'
160
+ },
151
161
  steps: [
152
162
  {
153
163
  id: 'step-1',
package/dist/code-lab.css CHANGED
@@ -3027,6 +3027,10 @@ code-lab,
3027
3027
  padding: 2px 0;
3028
3028
  }
3029
3029
 
3030
+ .codelab-pty__active-line[data-busy="true"] {
3031
+ display: none !important;
3032
+ }
3033
+
3030
3034
  .codelab-pty__prompt {
3031
3035
  color: var(--cl-green);
3032
3036
  font-weight: 600;
@@ -5357,7 +5361,8 @@ code-lab,
5357
5361
  padding: 4px 0;
5358
5362
  display: none;
5359
5363
  }
5360
- .codelab-split-menu.open {
5364
+ .codelab-split-menu.open,
5365
+ .codelab-split-menu.active {
5361
5366
  display: block;
5362
5367
  }
5363
5368
  .codelab-split-menu__item {
@@ -5490,12 +5495,57 @@ code-lab,
5490
5495
  .codelab-problem-item--info {
5491
5496
  color: #3794ff;
5492
5497
  }
5493
- .codelab-problem-item__location {
5498
+ .codelab-problem-item__location,
5499
+ .codelab-problem-item__loc {
5494
5500
  color: var(--cl-fg-muted, #858585);
5495
5501
  font-size: 11px;
5496
5502
  margin-left: auto;
5497
5503
  }
5498
5504
 
5505
+ /* ── Search, SCM & Terminal Session UI Polish ── */
5506
+ .codelab-modal-input {
5507
+ flex: 1;
5508
+ padding: 6px 10px;
5509
+ background: var(--cl-input-bg, #252526);
5510
+ color: var(--cl-fg, #cccccc);
5511
+ border: 1px solid var(--cl-border, #3c3c3c);
5512
+ border-radius: var(--cl-radius, 4px);
5513
+ font-family: var(--cl-font-mono, monospace);
5514
+ font-size: 12px;
5515
+ outline: none;
5516
+ }
5517
+ .codelab-modal-input:focus {
5518
+ border-color: var(--cl-accent, #007acc);
5519
+ }
5520
+ .codelab-search-match:hover,
5521
+ .codelab-problem-entry:hover,
5522
+ .codelab-scm-entry:hover {
5523
+ background: var(--cl-tree-hover, rgba(255, 255, 255, 0.06));
5524
+ }
5525
+ .codelab-terminal-sessions {
5526
+ display: inline-flex;
5527
+ align-items: center;
5528
+ gap: 4px;
5529
+ }
5530
+ .codelab-session-pill {
5531
+ display: inline-flex;
5532
+ align-items: center;
5533
+ gap: 4px;
5534
+ padding: 1px 7px;
5535
+ font-size: 11px;
5536
+ font-family: var(--cl-font-mono, monospace);
5537
+ border-radius: 4px;
5538
+ border: 1px solid var(--cl-border, #3c3c3c);
5539
+ background: transparent;
5540
+ color: var(--cl-fg-muted, #858585);
5541
+ cursor: pointer;
5542
+ }
5543
+ .codelab-session-pill.active {
5544
+ background: var(--cl-hud-bg, rgba(0, 122, 204, 0.18));
5545
+ border-color: var(--cl-accent, #007acc);
5546
+ color: var(--cl-fg, #ffffff);
5547
+ }
5548
+
5499
5549
  /* ── Monaco Side-by-Side Diff Editor ── */
5500
5550
  .codelab-diff-container {
5501
5551
  display: flex;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TypeScript Definitions for @innovatorved/code-lab v0.3.0
2
+ * TypeScript Definitions for @innovatorved/code-lab v0.3.2
3
3
  */
4
4
 
5
5
  export interface CodeLabStep {