@innovatorved/code-lab 0.6.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.
- package/ARCHITECTURE.md +1 -1
- package/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/code-lab-sql.css +87 -64
- package/dist/code-lab-sql.esm.js +109 -86
- package/dist/code-lab-sql.umd.js +110 -87
- package/dist/code-lab.css +1 -1
- package/dist/code-lab.d.ts +1 -1
- package/dist/code-lab.esm.js +601 -248
- package/dist/code-lab.js +600 -247
- package/dist/code-lab.umd.js +600 -247
- package/dist/index.d.ts +1 -1
- package/dist/packages/sql/src/styles.d.ts +1 -1
- package/dist/packages/ui/src/settings-dialog.d.ts +2 -0
- package/dist/preview-sw.js +1 -1
- package/dist/runtime.esm.js +1 -1
- package/dist/runtime.js +1 -1
- package/dist/schemas.d.ts +1 -1
- package/dist/shell.esm.js +1 -1
- package/dist/shell.js +1 -1
- package/dist/terminal.esm.js +1 -1
- package/dist/terminal.js +1 -1
- package/dist/workbench/index.d.ts +1 -1
- package/dist/workbench/intellisense.d.ts +1 -1
- package/dist/workbench/styles.d.ts +1 -1
- package/package.json +1 -1
- package/packages/commands/package.json +1 -1
- package/packages/core/package.json +1 -1
- package/packages/editor/package.json +1 -1
- package/packages/fs/package.json +1 -1
- package/packages/preview/package.json +1 -1
- package/packages/runtime/package.json +1 -1
- package/packages/settings/package.json +1 -1
- package/packages/sql/package.json +1 -1
- package/packages/sql/src/styles.ts +87 -64
- package/packages/terminal/package.json +1 -1
- package/packages/ui/package.json +1 -1
- package/packages/ui/src/observability.ts +12 -14
- package/packages/ui/src/settings-dialog.ts +379 -55
- package/packages/ui/src/themes.ts +78 -78
- package/src/code-lab.css +750 -309
- package/src/index.ts +1 -1
- package/src/schemas.ts +1 -1
- package/src/workbench/diff-editor.ts +5 -1
- package/src/workbench/drawer.ts +5 -5
- package/src/workbench/icons.ts +5 -5
- package/src/workbench/intellisense.ts +94 -82
- package/src/workbench/styles.ts +58 -54
- package/src/workbench/toolbar.ts +1 -1
- package/src/workbench/xterm-adapter.ts +61 -56
- package/src/workbench.ts +98 -92
package/src/index.ts
CHANGED
package/src/schemas.ts
CHANGED
|
@@ -206,6 +206,7 @@ export class CodeLabDiffEditorManager {
|
|
|
206
206
|
automaticLayout: true,
|
|
207
207
|
minimap: { enabled: false },
|
|
208
208
|
scrollBeyondLastLine: false,
|
|
209
|
+
fontFamily: '"Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace',
|
|
209
210
|
fontSize: Number(this.workbench._editorFontSize) || 13
|
|
210
211
|
});
|
|
211
212
|
|
|
@@ -288,6 +289,7 @@ export class CodeLabDiffEditorManager {
|
|
|
288
289
|
automaticLayout: true,
|
|
289
290
|
minimap: { enabled: false },
|
|
290
291
|
scrollBeyondLastLine: false,
|
|
292
|
+
fontFamily: '"Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace',
|
|
291
293
|
fontSize: Number(this.workbench?._editorFontSize) || 13
|
|
292
294
|
});
|
|
293
295
|
|
|
@@ -361,7 +363,9 @@ export class CodeLabDiffEditorManager {
|
|
|
361
363
|
renderSideBySide: true,
|
|
362
364
|
automaticLayout: true,
|
|
363
365
|
minimap: { enabled: false },
|
|
364
|
-
scrollBeyondLastLine: false
|
|
366
|
+
scrollBeyondLastLine: false,
|
|
367
|
+
fontFamily: '"Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace',
|
|
368
|
+
fontSize: Number(this.workbench._editorFontSize) || 13
|
|
365
369
|
});
|
|
366
370
|
|
|
367
371
|
const lang = getMonacoLanguageForFile(file, this.workbench.lang);
|
package/src/workbench/drawer.ts
CHANGED
|
@@ -64,7 +64,7 @@ export function renderDrawerTabsHtml(opts: DrawerTabOptions): string {
|
|
|
64
64
|
<button type="button" role="tab" aria-selected="${drawerTab === 'problems'}" class="codelab-drawer__tab ${drawerTab === 'problems' ? 'active' : ''}" data-cl-drawertab="problems" title="Compiler & Runtime Problems">
|
|
65
65
|
${CL_ICONS.warning}
|
|
66
66
|
<span>Problems</span>
|
|
67
|
-
<span class="codelab-badge ${problemsCount > 0 ? 'codelab-badge--warn' : ''}" id="cl-problems-count"
|
|
67
|
+
<span class="codelab-badge ${problemsCount > 0 ? 'codelab-badge--warn' : ''}" id="cl-problems-count">${problemsCount}</span>
|
|
68
68
|
</button>
|
|
69
69
|
|
|
70
70
|
<button type="button" role="tab" aria-selected="${drawerTab === 'tests'}" class="codelab-drawer__tab ${drawerTab === 'tests' ? 'active' : ''}" data-cl-drawertab="tests">
|
|
@@ -100,8 +100,8 @@ export function renderDrawerTabsHtml(opts: DrawerTabOptions): string {
|
|
|
100
100
|
|
|
101
101
|
${formatTelemetryHud(lastDurationMs, lastPeakMemoryBytes, workbench.lang || 'js')}
|
|
102
102
|
|
|
103
|
-
<div class="codelab-drawer__actions"
|
|
104
|
-
<button type="button" class="codelab-btn codelab-btn--icon" data-cl-action="toggle-drawer" title="Minimize/Expand Drawer" aria-label="Minimize or Expand Drawer"
|
|
103
|
+
<div class="codelab-drawer__actions">
|
|
104
|
+
<button type="button" class="codelab-btn codelab-btn--icon" data-cl-action="toggle-drawer" title="Minimize/Expand Drawer" aria-label="Minimize or Expand Drawer">
|
|
105
105
|
${CL_ICONS.chevronsUpDown}
|
|
106
106
|
</button>
|
|
107
107
|
</div>
|
|
@@ -115,7 +115,7 @@ export function renderProblemsPanelHtml(workbench: any): string {
|
|
|
115
115
|
|
|
116
116
|
if (items.length === 0) {
|
|
117
117
|
return `
|
|
118
|
-
<div
|
|
118
|
+
<div class="cl-ui-empty-center">
|
|
119
119
|
${CL_ICONS.check}
|
|
120
120
|
<span>No problems detected in workspace.</span>
|
|
121
121
|
</div>
|
|
@@ -149,7 +149,7 @@ export function renderStdinPanelHtml(workbench: any): string {
|
|
|
149
149
|
<div class="codelab-stdin-panel">
|
|
150
150
|
<div class="codelab-stdin-panel__header">
|
|
151
151
|
<span>Standard Input (std::cin / sys.stdin / process.stdin)</span>
|
|
152
|
-
<button type="button" class="codelab-btn codelab-btn--sm" id="cl-stdin-clear-btn"
|
|
152
|
+
<button type="button" class="codelab-btn codelab-btn--sm" id="cl-stdin-clear-btn">Clear</button>
|
|
153
153
|
</div>
|
|
154
154
|
<textarea class="codelab-stdin-panel__textarea" id="cl-stdin-textarea" placeholder="Paste custom input lines here for DSA / competitive programming...">${val}</textarea>
|
|
155
155
|
</div>
|
package/src/workbench/icons.ts
CHANGED
|
@@ -150,15 +150,15 @@ export const CL_ICONS: Record<string, string> = {
|
|
|
150
150
|
collapseAll:
|
|
151
151
|
'<svg aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"><rect x="2.5" y="3.5" width="9" height="9" rx="1"/><path d="M6.5 2h6a1 1 0 0 1 1 1v6"/><line x1="5" y1="8" x2="9" y2="8"/></svg>',
|
|
152
152
|
symbolFunction:
|
|
153
|
-
'<svg aria-hidden="true" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="#
|
|
153
|
+
'<svg aria-hidden="true" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="#c084fc" stroke-width="1.4"><rect x="2" y="2" width="12" height="12" rx="2"/><path d="M9.5 5.5H8a1 1 0 0 0-1 1v5M6 8h3.5"/></svg>',
|
|
154
154
|
symbolClass:
|
|
155
|
-
'<svg aria-hidden="true" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="#
|
|
155
|
+
'<svg aria-hidden="true" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="#fb923c" stroke-width="1.4"><circle cx="5" cy="8" r="2.2"/><circle cx="11.5" cy="5" r="1.8"/><circle cx="11.5" cy="11" r="1.8"/><line x1="7" y1="7" x2="9.8" y2="5.6"/><line x1="7" y1="9" x2="9.8" y2="10.4"/></svg>',
|
|
156
156
|
symbolVariable:
|
|
157
|
-
'<svg aria-hidden="true" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="#
|
|
157
|
+
'<svg aria-hidden="true" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="#a1a1aa" stroke-width="1.4"><rect x="2" y="3.5" width="12" height="9" rx="1.5"/><path d="M6 6.5l2 3 2-3"/></svg>'
|
|
158
158
|
};
|
|
159
159
|
|
|
160
160
|
function badgeSvg(bg: string, fg: string, text: string, fontSize = 7.2): string {
|
|
161
|
-
return `<svg class="codelab-seti-icon" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16"><rect x="1.5" y="1.5" width="13" height="13" rx="2.2" fill="${bg}"/><text x="8" y="11" text-anchor="middle" fill="${fg}" font-family="
|
|
161
|
+
return `<svg class="codelab-seti-icon" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16"><rect x="1.5" y="1.5" width="13" height="13" rx="2.2" fill="${bg}"/><text x="8" y="11" text-anchor="middle" fill="${fg}" font-family="'Geist',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif" font-size="${fontSize}" font-weight="700">${text}</text></svg>`;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
/**
|
|
@@ -199,7 +199,7 @@ export function getFileIconSvg(filename: string, isOpenFolder?: boolean): string
|
|
|
199
199
|
return `<svg class="codelab-seti-icon" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16" fill="none"><circle cx="8" cy="8" r="1.6" fill="#00d8ff"/><ellipse cx="8" cy="8" rx="6" ry="2.4" stroke="#00d8ff" stroke-width="1.1"/><ellipse cx="8" cy="8" rx="6" ry="2.4" stroke="#00d8ff" stroke-width="1.1" transform="rotate(60 8 8)"/><ellipse cx="8" cy="8" rx="6" ry="2.4" stroke="#00d8ff" stroke-width="1.1" transform="rotate(120 8 8)"/></svg>`;
|
|
200
200
|
case 'json':
|
|
201
201
|
case 'jsonc':
|
|
202
|
-
return `<svg class="codelab-seti-icon" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16"><text x="8" y="11.5" text-anchor="middle" fill="#cbcb41" font-family="monospace" font-size="11" font-weight="700">{}</text></svg>`;
|
|
202
|
+
return `<svg class="codelab-seti-icon" aria-hidden="true" width="16" height="16" viewBox="0 0 16 16"><text x="8" y="11.5" text-anchor="middle" fill="#cbcb41" font-family="'Geist Mono',ui-monospace,monospace" font-size="11" font-weight="700">{}</text></svg>`;
|
|
203
203
|
case 'py':
|
|
204
204
|
case 'pyi':
|
|
205
205
|
return badgeSvg('#3572a5', '#ffd43b', 'PY', 7);
|
|
@@ -419,7 +419,7 @@ const TSCONFIG_JSON_SCHEMA = {
|
|
|
419
419
|
const registeredMonacoInstances = new WeakSet<object>();
|
|
420
420
|
|
|
421
421
|
/**
|
|
422
|
-
* Registers
|
|
422
|
+
* Registers Charcoal Ink (Dark), Warm Paper (Light), and High Contrast themes on Monaco.
|
|
423
423
|
*/
|
|
424
424
|
export function registerCodeLabMonacoThemes(monaco: MonacoNamespaceLike | null | undefined): boolean {
|
|
425
425
|
if (!monaco || !monaco.editor || typeof monaco.editor.defineTheme !== 'function') {
|
|
@@ -430,61 +430,61 @@ export function registerCodeLabMonacoThemes(monaco: MonacoNamespaceLike | null |
|
|
|
430
430
|
base: 'vs-dark',
|
|
431
431
|
inherit: true,
|
|
432
432
|
rules: [
|
|
433
|
-
{ token: 'comment', foreground: '
|
|
434
|
-
{ token: 'keyword', foreground: '
|
|
435
|
-
{ token: 'keyword.control', foreground: '
|
|
436
|
-
{ token: 'keyword.operator', foreground: '
|
|
437
|
-
{ token: 'storage', foreground: '
|
|
438
|
-
{ token: 'type', foreground: '
|
|
439
|
-
{ token: 'type.identifier', foreground: '
|
|
440
|
-
{ token: 'class', foreground: '
|
|
441
|
-
{ token: 'interface', foreground: '
|
|
442
|
-
{ token: 'function', foreground: '
|
|
443
|
-
{ token: 'identifier.function', foreground: '
|
|
444
|
-
{ token: 'variable', foreground: '
|
|
445
|
-
{ token: 'variable.predefined', foreground: '
|
|
446
|
-
{ token: 'constant', foreground: '
|
|
447
|
-
{ token: 'string', foreground: '
|
|
448
|
-
{ token: 'string.key.json', foreground: '
|
|
449
|
-
{ token: 'string.value.json', foreground: '
|
|
450
|
-
{ token: 'number', foreground: '
|
|
451
|
-
{ token: 'regexp', foreground: '
|
|
452
|
-
{ token: 'tag', foreground: '
|
|
453
|
-
{ token: 'attribute.name', foreground: '
|
|
454
|
-
{ token: 'attribute.value', foreground: '
|
|
455
|
-
{ token: 'delimiter', foreground: '
|
|
433
|
+
{ token: 'comment', foreground: '8E8E97', fontStyle: 'italic' },
|
|
434
|
+
{ token: 'keyword', foreground: 'F87171' },
|
|
435
|
+
{ token: 'keyword.control', foreground: 'F87171' },
|
|
436
|
+
{ token: 'keyword.operator', foreground: 'D4D4D8' },
|
|
437
|
+
{ token: 'storage', foreground: 'F87171' },
|
|
438
|
+
{ token: 'type', foreground: 'FB923C' },
|
|
439
|
+
{ token: 'type.identifier', foreground: 'FB923C' },
|
|
440
|
+
{ token: 'class', foreground: 'FB923C' },
|
|
441
|
+
{ token: 'interface', foreground: 'FB923C' },
|
|
442
|
+
{ token: 'function', foreground: 'C084FC' },
|
|
443
|
+
{ token: 'identifier.function', foreground: 'C084FC' },
|
|
444
|
+
{ token: 'variable', foreground: 'E4E4E7' },
|
|
445
|
+
{ token: 'variable.predefined', foreground: '93C5FD' },
|
|
446
|
+
{ token: 'constant', foreground: '93C5FD' },
|
|
447
|
+
{ token: 'string', foreground: '86EFAC' },
|
|
448
|
+
{ token: 'string.key.json', foreground: 'E4E4E7' },
|
|
449
|
+
{ token: 'string.value.json', foreground: '86EFAC' },
|
|
450
|
+
{ token: 'number', foreground: 'FCD34D' },
|
|
451
|
+
{ token: 'regexp', foreground: 'FCA5A5' },
|
|
452
|
+
{ token: 'tag', foreground: 'F87171' },
|
|
453
|
+
{ token: 'attribute.name', foreground: 'FCD34D' },
|
|
454
|
+
{ token: 'attribute.value', foreground: '86EFAC' },
|
|
455
|
+
{ token: 'delimiter', foreground: 'A1A1AA' }
|
|
456
456
|
],
|
|
457
457
|
colors: {
|
|
458
|
-
'editor.background': '#
|
|
459
|
-
'editor.foreground': '#
|
|
460
|
-
'editorLineNumber.foreground': '#
|
|
461
|
-
'editorLineNumber.activeForeground': '#
|
|
462
|
-
'editorCursor.foreground': '#
|
|
463
|
-
'editor.selectionBackground': '#
|
|
464
|
-
'editor.inactiveSelectionBackground': '#
|
|
465
|
-
'editor.lineHighlightBackground': '#
|
|
458
|
+
'editor.background': '#0f0f10',
|
|
459
|
+
'editor.foreground': '#f4f4f5',
|
|
460
|
+
'editorLineNumber.foreground': '#6e6e77',
|
|
461
|
+
'editorLineNumber.activeForeground': '#f4f4f5',
|
|
462
|
+
'editorCursor.foreground': '#f4f4f5',
|
|
463
|
+
'editor.selectionBackground': '#28282b',
|
|
464
|
+
'editor.inactiveSelectionBackground': '#1f1f22',
|
|
465
|
+
'editor.lineHighlightBackground': '#18181a99',
|
|
466
466
|
'editor.lineHighlightBorder': '#00000000',
|
|
467
|
-
'editorGutter.background': '#
|
|
468
|
-
'editorGutter.modifiedBackground': '#
|
|
469
|
-
'editorGutter.addedBackground': '#
|
|
470
|
-
'editorGutter.deletedBackground': '#
|
|
471
|
-
'editorWidget.background': '#
|
|
472
|
-
'editorWidget.border': '#
|
|
473
|
-
'editorSuggestWidget.background': '#
|
|
474
|
-
'editorSuggestWidget.border': '#
|
|
475
|
-
'editorSuggestWidget.selectedBackground': '#
|
|
476
|
-
'editorSuggestWidget.highlightForeground': '#
|
|
477
|
-
'editorHoverWidget.background': '#
|
|
478
|
-
'editorHoverWidget.border': '#
|
|
479
|
-
'editorIndentGuide.background1': '#
|
|
480
|
-
'editorIndentGuide.activeBackground1': '#
|
|
481
|
-
'editorBracketMatch.background': '#
|
|
482
|
-
'editorBracketMatch.border': '#
|
|
483
|
-
'scrollbarSlider.background': '#
|
|
484
|
-
'scrollbarSlider.hoverBackground': '#
|
|
485
|
-
'scrollbarSlider.activeBackground': '#
|
|
486
|
-
'diffEditor.insertedTextBackground': '#
|
|
487
|
-
'diffEditor.removedTextBackground': '#
|
|
467
|
+
'editorGutter.background': '#0f0f10',
|
|
468
|
+
'editorGutter.modifiedBackground': '#fbbf24',
|
|
469
|
+
'editorGutter.addedBackground': '#34d399',
|
|
470
|
+
'editorGutter.deletedBackground': '#f87171',
|
|
471
|
+
'editorWidget.background': '#18181a',
|
|
472
|
+
'editorWidget.border': '#27272a',
|
|
473
|
+
'editorSuggestWidget.background': '#18181a',
|
|
474
|
+
'editorSuggestWidget.border': '#27272a',
|
|
475
|
+
'editorSuggestWidget.selectedBackground': '#28282b',
|
|
476
|
+
'editorSuggestWidget.highlightForeground': '#ffffff',
|
|
477
|
+
'editorHoverWidget.background': '#18181a',
|
|
478
|
+
'editorHoverWidget.border': '#27272a',
|
|
479
|
+
'editorIndentGuide.background1': '#27272a80',
|
|
480
|
+
'editorIndentGuide.activeBackground1': '#3a3a3e',
|
|
481
|
+
'editorBracketMatch.background': '#28282b80',
|
|
482
|
+
'editorBracketMatch.border': '#71717a',
|
|
483
|
+
'scrollbarSlider.background': '#3a3a3e66',
|
|
484
|
+
'scrollbarSlider.hoverBackground': '#52525b99',
|
|
485
|
+
'scrollbarSlider.activeBackground': '#71717acc',
|
|
486
|
+
'diffEditor.insertedTextBackground': '#10b98124',
|
|
487
|
+
'diffEditor.removedTextBackground': '#ef444424'
|
|
488
488
|
}
|
|
489
489
|
});
|
|
490
490
|
|
|
@@ -492,38 +492,50 @@ export function registerCodeLabMonacoThemes(monaco: MonacoNamespaceLike | null |
|
|
|
492
492
|
base: 'vs',
|
|
493
493
|
inherit: true,
|
|
494
494
|
rules: [
|
|
495
|
-
{ token: 'comment', foreground: '
|
|
496
|
-
{ token: 'keyword', foreground: '
|
|
497
|
-
{ token: 'keyword.control', foreground: '
|
|
498
|
-
{ token: 'type', foreground: '
|
|
499
|
-
{ token: 'type.identifier', foreground: '
|
|
500
|
-
{ token: 'function', foreground: '
|
|
501
|
-
{ token: '
|
|
502
|
-
{ token: '
|
|
503
|
-
{ token: '
|
|
504
|
-
{ token: '
|
|
505
|
-
{ token: '
|
|
506
|
-
{ token: '
|
|
495
|
+
{ token: 'comment', foreground: '6E6A64', fontStyle: 'italic' },
|
|
496
|
+
{ token: 'keyword', foreground: 'C2410C' },
|
|
497
|
+
{ token: 'keyword.control', foreground: 'C2410C' },
|
|
498
|
+
{ token: 'type', foreground: '9A3412' },
|
|
499
|
+
{ token: 'type.identifier', foreground: '9A3412' },
|
|
500
|
+
{ token: 'function', foreground: '6D28D9' },
|
|
501
|
+
{ token: 'identifier.function', foreground: '6D28D9' },
|
|
502
|
+
{ token: 'variable', foreground: '18181B' },
|
|
503
|
+
{ token: 'constant', foreground: '1D4ED8' },
|
|
504
|
+
{ token: 'string', foreground: '067647' },
|
|
505
|
+
{ token: 'string.key.json', foreground: '18181B' },
|
|
506
|
+
{ token: 'string.value.json', foreground: '067647' },
|
|
507
|
+
{ token: 'number', foreground: 'B54708' },
|
|
508
|
+
{ token: 'tag', foreground: 'C2410C' },
|
|
509
|
+
{ token: 'attribute.name', foreground: '9A3412' },
|
|
510
|
+
{ token: 'attribute.value', foreground: '067647' },
|
|
511
|
+
{ token: 'delimiter', foreground: '52525B' }
|
|
507
512
|
],
|
|
508
513
|
colors: {
|
|
509
514
|
'editor.background': '#ffffff',
|
|
510
|
-
'editor.foreground': '#
|
|
511
|
-
'editorLineNumber.foreground': '#
|
|
512
|
-
'editorLineNumber.activeForeground': '#
|
|
513
|
-
'editorCursor.foreground': '#
|
|
514
|
-
'editor.selectionBackground': '#
|
|
515
|
-
'editor.
|
|
515
|
+
'editor.foreground': '#18181b',
|
|
516
|
+
'editorLineNumber.foreground': '#8a8680',
|
|
517
|
+
'editorLineNumber.activeForeground': '#18181b',
|
|
518
|
+
'editorCursor.foreground': '#18181b',
|
|
519
|
+
'editor.selectionBackground': '#e6e4df',
|
|
520
|
+
'editor.inactiveSelectionBackground': '#f1f1ee',
|
|
521
|
+
'editor.lineHighlightBackground': '#f7f7f5',
|
|
516
522
|
'editor.lineHighlightBorder': '#00000000',
|
|
517
523
|
'editorGutter.background': '#ffffff',
|
|
518
|
-
'
|
|
519
|
-
'
|
|
520
|
-
'
|
|
521
|
-
'
|
|
522
|
-
'
|
|
523
|
-
'
|
|
524
|
-
'
|
|
525
|
-
'
|
|
526
|
-
'
|
|
524
|
+
'editorGutter.modifiedBackground': '#b54708',
|
|
525
|
+
'editorGutter.addedBackground': '#067647',
|
|
526
|
+
'editorGutter.deletedBackground': '#b42318',
|
|
527
|
+
'editorWidget.background': '#f7f7f5',
|
|
528
|
+
'editorWidget.border': '#e6e4df',
|
|
529
|
+
'editorSuggestWidget.background': '#f7f7f5',
|
|
530
|
+
'editorSuggestWidget.border': '#e6e4df',
|
|
531
|
+
'editorSuggestWidget.selectedBackground': '#ecebe7',
|
|
532
|
+
'editorSuggestWidget.highlightForeground': '#09090b',
|
|
533
|
+
'editorHoverWidget.background': '#f7f7f5',
|
|
534
|
+
'editorHoverWidget.border': '#e6e4df',
|
|
535
|
+
'editorIndentGuide.background1': '#e6e4df',
|
|
536
|
+
'editorIndentGuide.activeBackground1': '#d3d0c9',
|
|
537
|
+
'diffEditor.insertedTextBackground': '#0676471f',
|
|
538
|
+
'diffEditor.removedTextBackground': '#b423181a'
|
|
527
539
|
}
|
|
528
540
|
});
|
|
529
541
|
|
|
@@ -534,8 +546,8 @@ export function registerCodeLabMonacoThemes(monaco: MonacoNamespaceLike | null |
|
|
|
534
546
|
colors: {
|
|
535
547
|
'editor.background': '#000000',
|
|
536
548
|
'editor.foreground': '#ffffff',
|
|
537
|
-
'editor.selectionBackground': '#
|
|
538
|
-
'contrastBorder': '#
|
|
549
|
+
'editor.selectionBackground': '#3f3f46',
|
|
550
|
+
'contrastBorder': '#ffffff'
|
|
539
551
|
}
|
|
540
552
|
});
|
|
541
553
|
return true;
|
package/src/workbench/styles.ts
CHANGED
|
@@ -7,14 +7,14 @@ export const WORKBENCH_STYLES = `
|
|
|
7
7
|
.codelab-btn-split {
|
|
8
8
|
display: inline-flex;
|
|
9
9
|
align-items: stretch;
|
|
10
|
-
border-radius: var(--cl-radius, 6px);
|
|
10
|
+
border-radius: var(--cl-radius-md, 6px);
|
|
11
11
|
overflow: visible;
|
|
12
12
|
position: relative;
|
|
13
13
|
}
|
|
14
14
|
.codelab-btn-split .codelab-btn-split__main {
|
|
15
15
|
border-top-right-radius: 0;
|
|
16
16
|
border-bottom-right-radius: 0;
|
|
17
|
-
border-right: 1px solid rgba(0, 0, 0, 0.
|
|
17
|
+
border-right: 1px solid rgba(0, 0, 0, 0.18);
|
|
18
18
|
}
|
|
19
19
|
.codelab-btn-split .codelab-btn-split__trigger {
|
|
20
20
|
border-top-left-radius: 0;
|
|
@@ -26,13 +26,13 @@ export const WORKBENCH_STYLES = `
|
|
|
26
26
|
position: absolute;
|
|
27
27
|
top: calc(100% + 4px);
|
|
28
28
|
right: 0;
|
|
29
|
-
background: var(--cl-bg-
|
|
30
|
-
border: 1px solid var(--cl-border-strong, var(--cl-border, #
|
|
31
|
-
border-radius: var(--cl-radius, 6px);
|
|
32
|
-
box-shadow:
|
|
29
|
+
background: var(--cl-bg-panel, #18181a);
|
|
30
|
+
border: 1px solid var(--cl-border-strong, var(--cl-border, #27272a));
|
|
31
|
+
border-radius: var(--cl-radius-md, 6px);
|
|
32
|
+
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
|
|
33
33
|
z-index: 1200;
|
|
34
34
|
min-width: 220px;
|
|
35
|
-
padding: 4px
|
|
35
|
+
padding: 4px;
|
|
36
36
|
display: none;
|
|
37
37
|
}
|
|
38
38
|
.codelab-split-menu.open,
|
|
@@ -44,18 +44,20 @@ export const WORKBENCH_STYLES = `
|
|
|
44
44
|
align-items: center;
|
|
45
45
|
justify-content: space-between;
|
|
46
46
|
width: 100%;
|
|
47
|
-
padding: 6px
|
|
47
|
+
padding: 6px 10px;
|
|
48
|
+
border-radius: var(--cl-radius-sm, 4px);
|
|
48
49
|
background: none;
|
|
49
50
|
border: none;
|
|
50
|
-
color: var(--cl-fg, #
|
|
51
|
-
font-
|
|
51
|
+
color: var(--cl-fg, #f4f4f5);
|
|
52
|
+
font-family: var(--cl-font-sans);
|
|
53
|
+
font-size: var(--cl-text-xs, 0.75rem);
|
|
52
54
|
cursor: pointer;
|
|
53
55
|
text-align: left;
|
|
54
56
|
}
|
|
55
57
|
.codelab-split-menu__item:hover,
|
|
56
58
|
.codelab-split-menu__item:focus-visible {
|
|
57
|
-
background: var(--cl-
|
|
58
|
-
color: var(--cl-
|
|
59
|
+
background: var(--cl-list-active, #28282b);
|
|
60
|
+
color: var(--cl-list-active-fg, #f4f4f5);
|
|
59
61
|
outline: none;
|
|
60
62
|
}
|
|
61
63
|
|
|
@@ -67,19 +69,20 @@ export const WORKBENCH_STYLES = `
|
|
|
67
69
|
padding: 3px 12px;
|
|
68
70
|
min-width: 200px;
|
|
69
71
|
justify-content: center;
|
|
70
|
-
border-radius: var(--cl-radius, 6px);
|
|
71
|
-
background: var(--cl-bg
|
|
72
|
-
border: 1px solid var(--cl-border, #
|
|
73
|
-
color: var(--cl-fg-muted, #
|
|
74
|
-
font-
|
|
72
|
+
border-radius: var(--cl-radius-md, 6px);
|
|
73
|
+
background: var(--cl-input-bg, #141415);
|
|
74
|
+
border: 1px solid var(--cl-border, #27272a);
|
|
75
|
+
color: var(--cl-fg-muted, #a1a1aa);
|
|
76
|
+
font-family: var(--cl-font-sans);
|
|
77
|
+
font-size: var(--cl-text-xs, 0.75rem);
|
|
75
78
|
cursor: pointer;
|
|
76
79
|
transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
|
|
77
80
|
}
|
|
78
81
|
.codelab-cmd-trigger:hover,
|
|
79
82
|
.codelab-cmd-trigger:focus-visible {
|
|
80
|
-
background: var(--cl-bg-
|
|
81
|
-
color: var(--cl-fg, #
|
|
82
|
-
border-color: var(--cl-
|
|
83
|
+
background: var(--cl-bg-hover, #1f1f22);
|
|
84
|
+
color: var(--cl-fg, #f4f4f5);
|
|
85
|
+
border-color: var(--cl-border-strong, #3a3a3e);
|
|
83
86
|
outline: none;
|
|
84
87
|
}
|
|
85
88
|
|
|
@@ -89,14 +92,14 @@ export const WORKBENCH_STYLES = `
|
|
|
89
92
|
align-items: center;
|
|
90
93
|
gap: 8px;
|
|
91
94
|
padding: 2px 10px;
|
|
92
|
-
border-radius:
|
|
93
|
-
background: var(--cl-
|
|
94
|
-
border: 1px solid var(--cl-
|
|
95
|
-
color: var(--cl-
|
|
96
|
-
font-family: var(--cl-font-mono
|
|
97
|
-
font-size:
|
|
95
|
+
border-radius: 999px;
|
|
96
|
+
background: var(--cl-bg-panel, #18181a);
|
|
97
|
+
border: 1px solid var(--cl-border, #27272a);
|
|
98
|
+
color: var(--cl-fg-muted, #a1a1aa);
|
|
99
|
+
font-family: var(--cl-font-mono);
|
|
100
|
+
font-size: var(--cl-text-2xs, 0.6875rem);
|
|
101
|
+
font-variant-numeric: tabular-nums;
|
|
98
102
|
font-weight: 500;
|
|
99
|
-
letter-spacing: 0.3px;
|
|
100
103
|
margin-left: auto;
|
|
101
104
|
user-select: none;
|
|
102
105
|
}
|
|
@@ -112,7 +115,7 @@ export const WORKBENCH_STYLES = `
|
|
|
112
115
|
flex-direction: column;
|
|
113
116
|
height: 100%;
|
|
114
117
|
padding: 8px 12px;
|
|
115
|
-
background: var(--cl-bg-editor, #
|
|
118
|
+
background: var(--cl-bg-editor, #0f0f10);
|
|
116
119
|
box-sizing: border-box;
|
|
117
120
|
}
|
|
118
121
|
.codelab-stdin-panel__header {
|
|
@@ -120,29 +123,28 @@ export const WORKBENCH_STYLES = `
|
|
|
120
123
|
align-items: center;
|
|
121
124
|
justify-content: space-between;
|
|
122
125
|
margin-bottom: 6px;
|
|
123
|
-
font-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
letter-spacing: 0.5px;
|
|
126
|
+
font-family: var(--cl-font-sans);
|
|
127
|
+
font-size: var(--cl-text-xs, 0.75rem);
|
|
128
|
+
color: var(--cl-fg-muted, #a1a1aa);
|
|
129
|
+
font-weight: 500;
|
|
128
130
|
}
|
|
129
131
|
.codelab-stdin-panel__textarea {
|
|
130
132
|
flex: 1;
|
|
131
133
|
width: 100%;
|
|
132
|
-
background: var(--cl-input-bg, #
|
|
133
|
-
border: 1px solid var(--cl-border, #
|
|
134
|
-
border-radius: var(--cl-radius,
|
|
135
|
-
color: var(--cl-fg, #
|
|
136
|
-
font-family: var(--cl-font-mono
|
|
137
|
-
font-size:
|
|
134
|
+
background: var(--cl-input-bg, #141415);
|
|
135
|
+
border: 1px solid var(--cl-border, #27272a);
|
|
136
|
+
border-radius: var(--cl-radius-md, 6px);
|
|
137
|
+
color: var(--cl-fg, #f4f4f5);
|
|
138
|
+
font-family: var(--cl-font-mono);
|
|
139
|
+
font-size: var(--cl-text-xs, 0.75rem);
|
|
138
140
|
line-height: 1.5;
|
|
139
|
-
padding: 8px;
|
|
141
|
+
padding: 8px 10px;
|
|
140
142
|
resize: none;
|
|
141
143
|
outline: none;
|
|
142
144
|
box-sizing: border-box;
|
|
143
145
|
}
|
|
144
146
|
.codelab-stdin-panel__textarea:focus {
|
|
145
|
-
border-color: var(--cl-
|
|
147
|
+
border-color: var(--cl-focus-border, #a1a1aa);
|
|
146
148
|
}
|
|
147
149
|
|
|
148
150
|
/* ── Problems Drawer Tab ── */
|
|
@@ -158,26 +160,27 @@ export const WORKBENCH_STYLES = `
|
|
|
158
160
|
align-items: center;
|
|
159
161
|
gap: 8px;
|
|
160
162
|
padding: 5px 12px;
|
|
161
|
-
font-size:
|
|
162
|
-
font-family: var(--cl-font-mono
|
|
163
|
+
font-size: var(--cl-text-xs, 0.75rem);
|
|
164
|
+
font-family: var(--cl-font-mono);
|
|
163
165
|
cursor: pointer;
|
|
164
|
-
border-bottom: 1px solid var(--cl-border,
|
|
166
|
+
border-bottom: 1px solid var(--cl-border-subtle, #1d1d20);
|
|
165
167
|
}
|
|
166
168
|
.codelab-problem-item:hover {
|
|
167
|
-
background: var(--cl-bg-hover,
|
|
169
|
+
background: var(--cl-bg-hover, #1f1f22);
|
|
168
170
|
}
|
|
169
171
|
.codelab-problem-item--error {
|
|
170
|
-
color: var(--cl-
|
|
172
|
+
color: var(--cl-red, #f87171);
|
|
171
173
|
}
|
|
172
174
|
.codelab-problem-item--warning {
|
|
173
|
-
color: var(--cl-
|
|
175
|
+
color: var(--cl-amber, #fbbf24);
|
|
174
176
|
}
|
|
175
177
|
.codelab-problem-item--info {
|
|
176
|
-
color: var(--cl-
|
|
178
|
+
color: var(--cl-fg, #f4f4f5);
|
|
177
179
|
}
|
|
178
180
|
.codelab-problem-item__location {
|
|
179
|
-
color: var(--cl-fg-muted, #
|
|
180
|
-
font-size:
|
|
181
|
+
color: var(--cl-fg-muted, #a1a1aa);
|
|
182
|
+
font-size: var(--cl-text-2xs, 0.6875rem);
|
|
183
|
+
font-variant-numeric: tabular-nums;
|
|
181
184
|
margin-left: auto;
|
|
182
185
|
}
|
|
183
186
|
|
|
@@ -187,16 +190,17 @@ export const WORKBENCH_STYLES = `
|
|
|
187
190
|
flex-direction: column;
|
|
188
191
|
width: 100%;
|
|
189
192
|
height: 100%;
|
|
190
|
-
background: var(--cl-bg-editor, #
|
|
193
|
+
background: var(--cl-bg-editor, #0f0f10);
|
|
191
194
|
}
|
|
192
195
|
.codelab-diff-toolbar {
|
|
193
196
|
display: flex;
|
|
194
197
|
align-items: center;
|
|
195
198
|
gap: 8px;
|
|
196
199
|
padding: 6px 12px;
|
|
197
|
-
background: var(--cl-bg-
|
|
198
|
-
border-bottom: 1px solid var(--cl-border, #
|
|
199
|
-
font-
|
|
200
|
+
background: var(--cl-bg-elevated, #141415);
|
|
201
|
+
border-bottom: 1px solid var(--cl-border, #27272a);
|
|
202
|
+
font-family: var(--cl-font-sans);
|
|
203
|
+
font-size: var(--cl-text-xs, 0.75rem);
|
|
200
204
|
}
|
|
201
205
|
.codelab-diff-host {
|
|
202
206
|
flex: 1;
|
package/src/workbench/toolbar.ts
CHANGED
|
@@ -146,7 +146,7 @@ export function renderToolbarHtml(opts: ToolbarRenderOptions): string {
|
|
|
146
146
|
${hasWebContent ? `
|
|
147
147
|
<button type="button" class="codelab-btn codelab-btn--icon" id="cl-preview-app-btn" data-cl-action="preview-app" title="Run & Preview in Browser" aria-label="Run and Preview in Browser">
|
|
148
148
|
${CL_ICONS.globe}
|
|
149
|
-
${activeServerCount > 0 ? `<span class="codelab-port-badge"
|
|
149
|
+
${activeServerCount > 0 ? `<span class="codelab-port-badge">${activeServerCount}</span>` : ''}
|
|
150
150
|
</button>
|
|
151
151
|
` : ''}
|
|
152
152
|
|