@innovatorved/code-lab 0.7.0 → 0.7.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 +2 -2
- package/CHANGELOG.md +20 -0
- package/README.md +2 -2
- package/dist/apps/web/src/index.d.ts +0 -9
- package/dist/code-lab-sql.esm.js +19 -19
- package/dist/code-lab-sql.umd.js +20 -20
- package/dist/code-lab.css +1 -1
- package/dist/code-lab.d.ts +1 -1
- package/dist/code-lab.esm.js +679 -1439
- package/dist/code-lab.js +678 -1438
- package/dist/extensions/cpp.esm.js +132 -8760
- package/dist/extensions/cpp.js +124 -8770
- package/dist/extensions/guided-lab.esm.js +33 -6836
- package/dist/extensions/guided-lab.js +33 -6854
- package/dist/extensions/javascript.esm.js +1 -36
- package/dist/extensions/javascript.js +1 -58
- package/dist/extensions/python.esm.js +79 -8118
- package/dist/extensions/python.js +79 -8136
- package/dist/extensions/typescript.esm.js +1 -55
- package/dist/extensions/typescript.js +1 -77
- package/dist/modular-kernel.d.ts +0 -4
- package/dist/preview-sw.js +1 -1
- package/dist/runtime.esm.js +77 -77
- package/dist/runtime.js +77 -77
- package/dist/schemas.d.ts +9 -0
- package/dist/schemas.esm.js +33 -6815
- package/dist/schemas.js +33 -6831
- package/dist/shell.esm.js +33 -33
- package/dist/shell.js +33 -33
- package/dist/terminal.esm.js +8 -6
- package/dist/terminal.js +6 -6
- package/dist/workbench/command-palette.d.ts +0 -4
- package/dist/workbench/index.d.ts +0 -20
- package/dist/workbench/intellisense.d.ts +1 -7
- package/package.json +3 -10
- package/src/code-lab.css +4 -502
- package/src/extensions/cpp.ts +11 -29
- package/src/extensions/guided-lab.ts +6 -2
- package/src/extensions/python.ts +9 -3
- package/src/modular-kernel.ts +0 -4
- package/src/runtime.ts +124 -39
- package/src/schemas.ts +2 -2
- package/src/shell.ts +3 -0
- package/src/terminal.ts +4 -2
- package/src/workbench/command-palette.ts +22 -302
- package/src/workbench/diff-editor.ts +2 -0
- package/src/workbench/icons.ts +1 -1
- package/src/workbench/index.ts +0 -15
- package/src/workbench/intellisense.ts +17 -4
- package/src/workbench.ts +68 -375
- package/dist/code-lab.umd.js +0 -6117
- package/dist/packages/editor/src/index.d.ts +0 -118
- package/dist/packages/preview/src/index.d.ts +0 -34
- package/dist/packages/runtime/src/index.d.ts +0 -47
- package/dist/packages/terminal/src/index.d.ts +0 -54
- package/dist/workbench/drawer.d.ts +0 -18
- package/dist/workbench/file-tree.d.ts +0 -11
- package/dist/workbench/guided-pane.d.ts +0 -11
- package/dist/workbench/styles.d.ts +0 -4
- package/dist/workbench/toolbar.d.ts +0 -17
- package/packages/commands/README.md +0 -7
- package/packages/commands/package.json +0 -16
- package/packages/commands/src/index.ts +0 -467
- package/packages/commands/tsconfig.json +0 -22
- package/packages/core/README.md +0 -12
- package/packages/core/package.json +0 -13
- package/packages/core/src/di.ts +0 -147
- package/packages/core/src/disposable.ts +0 -112
- package/packages/core/src/errors.ts +0 -205
- package/packages/core/src/events.ts +0 -157
- package/packages/core/src/index.ts +0 -49
- package/packages/core/src/path.ts +0 -118
- package/packages/core/src/registry.ts +0 -61
- package/packages/core/tsconfig.json +0 -19
- package/packages/editor/README.md +0 -9
- package/packages/editor/package.json +0 -18
- package/packages/editor/src/index.ts +0 -344
- package/packages/editor/tsconfig.json +0 -24
- package/packages/fs/README.md +0 -7
- package/packages/fs/package.json +0 -16
- package/packages/fs/src/backends.ts +0 -301
- package/packages/fs/src/index.ts +0 -18
- package/packages/fs/src/types.ts +0 -44
- package/packages/fs/src/vfs-service.ts +0 -257
- package/packages/fs/tsconfig.json +0 -22
- package/packages/preview/README.md +0 -3
- package/packages/preview/package.json +0 -16
- package/packages/preview/src/index.ts +0 -125
- package/packages/preview/tsconfig.json +0 -22
- package/packages/runtime/README.md +0 -3
- package/packages/runtime/package.json +0 -17
- package/packages/runtime/src/index.ts +0 -134
- package/packages/runtime/tsconfig.json +0 -23
- package/packages/settings/README.md +0 -7
- package/packages/settings/package.json +0 -16
- package/packages/settings/src/builtin-schemas.ts +0 -262
- package/packages/settings/src/configuration-service.ts +0 -609
- package/packages/settings/src/index.ts +0 -38
- package/packages/settings/src/jsonc.ts +0 -189
- package/packages/settings/src/schema.ts +0 -164
- package/packages/settings/tsconfig.json +0 -22
- package/packages/sql/README.md +0 -12
- package/packages/sql/package.json +0 -13
- package/packages/sql/src/completions.ts +0 -359
- package/packages/sql/src/diagnostics.ts +0 -200
- package/packages/sql/src/formatter.ts +0 -271
- package/packages/sql/src/index.ts +0 -54
- package/packages/sql/src/sql-editor.ts +0 -802
- package/packages/sql/src/styles.ts +0 -524
- package/packages/sql/src/tokenizer.ts +0 -457
- package/packages/sql/src/types.ts +0 -148
- package/packages/sql/tsconfig.json +0 -19
- package/packages/terminal/README.md +0 -3
- package/packages/terminal/package.json +0 -16
- package/packages/terminal/src/index.ts +0 -183
- package/packages/terminal/tsconfig.json +0 -22
- package/packages/ui/README.md +0 -8
- package/packages/ui/package.json +0 -18
- package/packages/ui/src/index.ts +0 -40
- package/packages/ui/src/observability.ts +0 -173
- package/packages/ui/src/plugin-registry.ts +0 -289
- package/packages/ui/src/settings-dialog.ts +0 -939
- package/packages/ui/src/themes.ts +0 -333
- package/packages/ui/tsconfig.json +0 -24
- package/src/workbench/drawer.ts +0 -157
- package/src/workbench/file-tree.ts +0 -51
- package/src/workbench/guided-pane.ts +0 -43
- package/src/workbench/styles.ts +0 -211
- package/src/workbench/toolbar.ts +0 -182
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { type Event, type IDisposable } from '@code-lab/core';
|
|
2
|
-
import type { IConfigurationService } from '@code-lab/settings';
|
|
3
|
-
import { type SqlDialect, type SqlEditorInstance, type SqlSchema } from '@code-lab/sql';
|
|
4
|
-
export interface EditorMarker {
|
|
5
|
-
readonly line: number;
|
|
6
|
-
readonly column: number;
|
|
7
|
-
readonly message: string;
|
|
8
|
-
readonly severity: 'error' | 'warning' | 'info';
|
|
9
|
-
readonly hint?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface EditorDisplayOptions {
|
|
12
|
-
readonly fontSize?: number;
|
|
13
|
-
readonly tabSize?: number;
|
|
14
|
-
readonly wordWrap?: 'off' | 'on' | 'wordWrapColumn';
|
|
15
|
-
readonly minimap?: boolean;
|
|
16
|
-
readonly lineNumbers?: 'on' | 'off' | 'relative';
|
|
17
|
-
readonly readOnly?: boolean;
|
|
18
|
-
readonly theme?: 'dark' | 'light' | 'high-contrast';
|
|
19
|
-
}
|
|
20
|
-
export interface IEditorAdapter extends IDisposable {
|
|
21
|
-
readonly kind: 'monaco' | 'sql' | 'lightweight';
|
|
22
|
-
readonly onDidChangeValue: Event<string>;
|
|
23
|
-
getValue(): string;
|
|
24
|
-
setValue(value: string): void;
|
|
25
|
-
getSelection(): string;
|
|
26
|
-
insertAtCursor(text: string): void;
|
|
27
|
-
setLanguage(languageId: string): void;
|
|
28
|
-
setMarkers(markers: readonly EditorMarker[]): void;
|
|
29
|
-
applyOptions(options: EditorDisplayOptions): void;
|
|
30
|
-
focus(): void;
|
|
31
|
-
}
|
|
32
|
-
export interface MonacoEditorLike {
|
|
33
|
-
getValue(): string;
|
|
34
|
-
setValue(value: string): void;
|
|
35
|
-
getModel(): {
|
|
36
|
-
getValueInRange?: (range: unknown) => string;
|
|
37
|
-
} | null;
|
|
38
|
-
getSelection(): unknown;
|
|
39
|
-
executeEdits(source: string, edits: Array<{
|
|
40
|
-
range: unknown;
|
|
41
|
-
text: string;
|
|
42
|
-
}>): void;
|
|
43
|
-
updateOptions(opts: Record<string, unknown>): void;
|
|
44
|
-
focus(): void;
|
|
45
|
-
onDidChangeModelContent(cb: () => void): {
|
|
46
|
-
dispose(): void;
|
|
47
|
-
};
|
|
48
|
-
dispose(): void;
|
|
49
|
-
}
|
|
50
|
-
export declare class LightweightEditorAdapter implements IEditorAdapter {
|
|
51
|
-
readonly kind: "lightweight";
|
|
52
|
-
private readonly textarea;
|
|
53
|
-
private readonly changeEmitter;
|
|
54
|
-
private readonly cleanup;
|
|
55
|
-
constructor(container: HTMLElement, initialValue?: string);
|
|
56
|
-
get onDidChangeValue(): Event<string>;
|
|
57
|
-
getValue(): string;
|
|
58
|
-
setValue(value: string): void;
|
|
59
|
-
getSelection(): string;
|
|
60
|
-
insertAtCursor(text: string): void;
|
|
61
|
-
setLanguage(_languageId: string): void;
|
|
62
|
-
setMarkers(_markers: readonly EditorMarker[]): void;
|
|
63
|
-
applyOptions(options: EditorDisplayOptions): void;
|
|
64
|
-
focus(): void;
|
|
65
|
-
dispose(): void;
|
|
66
|
-
}
|
|
67
|
-
export declare class SqlEditorAdapter implements IEditorAdapter {
|
|
68
|
-
readonly kind: "sql";
|
|
69
|
-
private readonly sqlEditor;
|
|
70
|
-
private readonly changeEmitter;
|
|
71
|
-
constructor(container: HTMLElement, options?: {
|
|
72
|
-
value?: string;
|
|
73
|
-
dialect?: SqlDialect;
|
|
74
|
-
schema?: SqlSchema | null;
|
|
75
|
-
onRun?: (sql: string, effectiveSql: string) => void;
|
|
76
|
-
});
|
|
77
|
-
get onDidChangeValue(): Event<string>;
|
|
78
|
-
get underlying(): SqlEditorInstance;
|
|
79
|
-
getValue(): string;
|
|
80
|
-
setValue(value: string): void;
|
|
81
|
-
getSelection(): string;
|
|
82
|
-
insertAtCursor(text: string): void;
|
|
83
|
-
setLanguage(languageId: string): void;
|
|
84
|
-
setMarkers(markers: readonly EditorMarker[]): void;
|
|
85
|
-
applyOptions(options: EditorDisplayOptions): void;
|
|
86
|
-
focus(): void;
|
|
87
|
-
dispose(): void;
|
|
88
|
-
}
|
|
89
|
-
export declare class MonacoEditorAdapter implements IEditorAdapter {
|
|
90
|
-
readonly kind: "monaco";
|
|
91
|
-
private readonly editor;
|
|
92
|
-
private readonly changeEmitter;
|
|
93
|
-
private readonly modelSub;
|
|
94
|
-
constructor(editorInstance: MonacoEditorLike);
|
|
95
|
-
get onDidChangeValue(): Event<string>;
|
|
96
|
-
getValue(): string;
|
|
97
|
-
setValue(value: string): void;
|
|
98
|
-
getSelection(): string;
|
|
99
|
-
insertAtCursor(text: string): void;
|
|
100
|
-
setLanguage(_languageId: string): void;
|
|
101
|
-
setMarkers(_markers: readonly EditorMarker[]): void;
|
|
102
|
-
applyOptions(options: EditorDisplayOptions): void;
|
|
103
|
-
focus(): void;
|
|
104
|
-
dispose(): void;
|
|
105
|
-
}
|
|
106
|
-
export interface IEditorService extends IDisposable {
|
|
107
|
-
readonly activeAdapter: IEditorAdapter | undefined;
|
|
108
|
-
setActiveAdapter(adapter: IEditorAdapter): void;
|
|
109
|
-
syncFromConfiguration(config: IConfigurationService): void;
|
|
110
|
-
}
|
|
111
|
-
export declare const IEditorServiceId: import("@code-lab/core").ServiceId<IEditorService>;
|
|
112
|
-
export declare class EditorService implements IEditorService {
|
|
113
|
-
private current;
|
|
114
|
-
get activeAdapter(): IEditorAdapter | undefined;
|
|
115
|
-
setActiveAdapter(adapter: IEditorAdapter): void;
|
|
116
|
-
syncFromConfiguration(config: IConfigurationService): void;
|
|
117
|
-
dispose(): void;
|
|
118
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type Event, type IDisposable } from '@code-lab/core';
|
|
2
|
-
export declare const SAFE_IFRAME_SANDBOX = "allow-scripts allow-forms allow-modals";
|
|
3
|
-
export interface PreviewPolicyOptions {
|
|
4
|
-
readonly allowExternalNetwork?: boolean;
|
|
5
|
-
readonly allowedOrigins?: readonly string[];
|
|
6
|
-
}
|
|
7
|
-
export declare function buildPreviewCsp(options?: PreviewPolicyOptions): string;
|
|
8
|
-
export declare function sanitizePreviewUrl(rawUrl: string): string;
|
|
9
|
-
export interface PreviewState {
|
|
10
|
-
readonly instanceId: string;
|
|
11
|
-
readonly port: number;
|
|
12
|
-
readonly path: string;
|
|
13
|
-
readonly reloadNonce: number;
|
|
14
|
-
readonly csp: string;
|
|
15
|
-
}
|
|
16
|
-
export interface IPreviewService extends IDisposable {
|
|
17
|
-
readonly state: PreviewState;
|
|
18
|
-
readonly onDidChangePreview: Event<PreviewState>;
|
|
19
|
-
navigate(port: number, path?: string): void;
|
|
20
|
-
reload(): void;
|
|
21
|
-
updatePolicy(options: PreviewPolicyOptions): void;
|
|
22
|
-
}
|
|
23
|
-
export declare const IPreviewServiceId: import("@code-lab/core").ServiceId<IPreviewService>;
|
|
24
|
-
export declare class PreviewService implements IPreviewService {
|
|
25
|
-
private current;
|
|
26
|
-
private readonly emitter;
|
|
27
|
-
constructor(instanceId: string, initialPort?: number, policy?: PreviewPolicyOptions);
|
|
28
|
-
get state(): PreviewState;
|
|
29
|
-
get onDidChangePreview(): Event<PreviewState>;
|
|
30
|
-
navigate(port: number, path?: string): void;
|
|
31
|
-
reload(): void;
|
|
32
|
-
updatePolicy(options: PreviewPolicyOptions): void;
|
|
33
|
-
dispose(): void;
|
|
34
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { type Event, type IDisposable } from '@code-lab/core';
|
|
2
|
-
import type { IFileSystemService } from '@code-lab/fs';
|
|
3
|
-
export type RuntimeStatus = 'idle' | 'running' | 'stopped' | 'error';
|
|
4
|
-
export interface RuntimeExecutionRequest {
|
|
5
|
-
readonly entry: string;
|
|
6
|
-
readonly mode?: 'run' | 'test' | 'repl';
|
|
7
|
-
readonly cwd?: string;
|
|
8
|
-
readonly env?: Readonly<Record<string, string>>;
|
|
9
|
-
readonly stdin?: string;
|
|
10
|
-
readonly timeoutMs?: number;
|
|
11
|
-
}
|
|
12
|
-
export interface RuntimeExecutionResult {
|
|
13
|
-
readonly ok: boolean;
|
|
14
|
-
readonly exitCode: number;
|
|
15
|
-
readonly stdout: string;
|
|
16
|
-
readonly stderr: string;
|
|
17
|
-
readonly durationMs: number;
|
|
18
|
-
readonly timedOut?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export type RuntimeExecutorDelegate = (req: RuntimeExecutionRequest & {
|
|
21
|
-
files: Record<string, string>;
|
|
22
|
-
signal: AbortSignal;
|
|
23
|
-
}) => Promise<RuntimeExecutionResult>;
|
|
24
|
-
export interface IRuntimeService extends IDisposable {
|
|
25
|
-
readonly status: RuntimeStatus;
|
|
26
|
-
readonly activeRunCount: number;
|
|
27
|
-
readonly onDidChangeStatus: Event<RuntimeStatus>;
|
|
28
|
-
execute(request: RuntimeExecutionRequest): Promise<RuntimeExecutionResult>;
|
|
29
|
-
cancelAll(): void;
|
|
30
|
-
}
|
|
31
|
-
export declare const IRuntimeServiceId: import("@code-lab/core").ServiceId<IRuntimeService>;
|
|
32
|
-
export declare class WorkerHostSupervisor implements IRuntimeService {
|
|
33
|
-
private currentStatus;
|
|
34
|
-
private readonly activeControllers;
|
|
35
|
-
private readonly statusEmitter;
|
|
36
|
-
private readonly fs;
|
|
37
|
-
private readonly delegate;
|
|
38
|
-
private disposed;
|
|
39
|
-
constructor(fs: IFileSystemService, delegate: RuntimeExecutorDelegate);
|
|
40
|
-
get status(): RuntimeStatus;
|
|
41
|
-
get activeRunCount(): number;
|
|
42
|
-
get onDidChangeStatus(): Event<RuntimeStatus>;
|
|
43
|
-
private setStatus;
|
|
44
|
-
execute(request: RuntimeExecutionRequest): Promise<RuntimeExecutionResult>;
|
|
45
|
-
cancelAll(): void;
|
|
46
|
-
dispose(): void;
|
|
47
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { type Event, type IDisposable } from '@code-lab/core';
|
|
2
|
-
export interface AnsiSegment {
|
|
3
|
-
readonly text: string;
|
|
4
|
-
readonly fg?: string;
|
|
5
|
-
readonly bold?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare function parseAnsiSegments(input: string): AnsiSegment[];
|
|
8
|
-
export interface TerminalSession {
|
|
9
|
-
readonly id: string;
|
|
10
|
-
readonly title: string;
|
|
11
|
-
readonly cwd: string;
|
|
12
|
-
readonly lines: readonly string[];
|
|
13
|
-
write(chunk: string): void;
|
|
14
|
-
clear(): void;
|
|
15
|
-
}
|
|
16
|
-
export interface ITerminalService extends IDisposable {
|
|
17
|
-
readonly activeSessionId: string | undefined;
|
|
18
|
-
readonly onDidWrite: Event<{
|
|
19
|
-
sessionId: string;
|
|
20
|
-
chunk: string;
|
|
21
|
-
}>;
|
|
22
|
-
readonly onDidChangeSessions: Event<void>;
|
|
23
|
-
createSession(options?: {
|
|
24
|
-
title?: string;
|
|
25
|
-
cwd?: string;
|
|
26
|
-
maxScrollback?: number;
|
|
27
|
-
}): TerminalSession;
|
|
28
|
-
getSessions(): TerminalSession[];
|
|
29
|
-
setActiveSession(id: string): void;
|
|
30
|
-
closeSession(id: string): void;
|
|
31
|
-
}
|
|
32
|
-
export declare const ITerminalServiceId: import("@code-lab/core").ServiceId<ITerminalService>;
|
|
33
|
-
export declare class TerminalService implements ITerminalService {
|
|
34
|
-
private readonly sessions;
|
|
35
|
-
private currentSessionId;
|
|
36
|
-
private seq;
|
|
37
|
-
private readonly writeEmitter;
|
|
38
|
-
private readonly sessionsEmitter;
|
|
39
|
-
get activeSessionId(): string | undefined;
|
|
40
|
-
get onDidWrite(): Event<{
|
|
41
|
-
sessionId: string;
|
|
42
|
-
chunk: string;
|
|
43
|
-
}>;
|
|
44
|
-
get onDidChangeSessions(): Event<void>;
|
|
45
|
-
createSession(options?: {
|
|
46
|
-
title?: string;
|
|
47
|
-
cwd?: string;
|
|
48
|
-
maxScrollback?: number;
|
|
49
|
-
}): TerminalSession;
|
|
50
|
-
getSessions(): TerminalSession[];
|
|
51
|
-
setActiveSession(id: string): void;
|
|
52
|
-
closeSession(id: string): void;
|
|
53
|
-
dispose(): void;
|
|
54
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @innovatorved/code-lab — Resizable Bottom Drawer, Contextual Tabs & Telemetry HUD
|
|
3
|
-
*/
|
|
4
|
-
export interface DrawerTabOptions {
|
|
5
|
-
workbench: any;
|
|
6
|
-
drawerTab: string;
|
|
7
|
-
hasGuidedLab: boolean;
|
|
8
|
-
mode: string;
|
|
9
|
-
hasWebContent: boolean;
|
|
10
|
-
problemsCount: number;
|
|
11
|
-
testSuiteVisible: boolean;
|
|
12
|
-
lastDurationMs: number | null;
|
|
13
|
-
lastPeakMemoryBytes: number | null;
|
|
14
|
-
}
|
|
15
|
-
export declare function formatTelemetryHud(durationMs: number | null, memoryBytes: number | null, lang: string): string;
|
|
16
|
-
export declare function renderDrawerTabsHtml(opts: DrawerTabOptions): string;
|
|
17
|
-
export declare function renderProblemsPanelHtml(workbench: any): string;
|
|
18
|
-
export declare function renderStdinPanelHtml(workbench: any): string;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @innovatorved/code-lab — Explorer File Tree & CRUD Utilities
|
|
3
|
-
*/
|
|
4
|
-
export interface FileNode {
|
|
5
|
-
name: string;
|
|
6
|
-
fullPath: string;
|
|
7
|
-
isFolder: boolean;
|
|
8
|
-
children: FileNode[];
|
|
9
|
-
}
|
|
10
|
-
export declare function buildFileHierarchy(files: Record<string, string>, creatingItem?: any): FileNode;
|
|
11
|
-
export declare function getFileIcon(filename: string): string;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @innovatorved/code-lab — Guided Pane: Walkthrough Stepper, Hints & Verification
|
|
3
|
-
*/
|
|
4
|
-
export interface GuidedStepData {
|
|
5
|
-
id: string;
|
|
6
|
-
title: string;
|
|
7
|
-
instructions: string | string[];
|
|
8
|
-
hint?: string;
|
|
9
|
-
testNames?: string[];
|
|
10
|
-
}
|
|
11
|
-
export declare function renderStepPillsHtml(steps: GuidedStepData[], activeIndex: number, completedStepIds: Set<string>): string;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @innovatorved/code-lab — Workbench CSS Tokens, Themes & Styles
|
|
3
|
-
*/
|
|
4
|
-
export declare const WORKBENCH_STYLES = "\n/* \u2500\u2500 Split Run Button \u2500\u2500 */\n.codelab-btn-split {\n display: inline-flex;\n align-items: stretch;\n border-radius: var(--cl-radius-md, 6px);\n overflow: visible;\n position: relative;\n}\n.codelab-btn-split .codelab-btn-split__main {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right: 1px solid rgba(0, 0, 0, 0.18);\n}\n.codelab-btn-split .codelab-btn-split__trigger {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n padding: 0 6px;\n min-width: 24px;\n}\n.codelab-split-menu {\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n background: var(--cl-bg-panel, #18181a);\n border: 1px solid var(--cl-border-strong, var(--cl-border, #27272a));\n border-radius: var(--cl-radius-md, 6px);\n box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);\n z-index: 1200;\n min-width: 220px;\n padding: 4px;\n display: none;\n}\n.codelab-split-menu.open,\n.codelab-split-menu.active {\n display: block;\n}\n.codelab-split-menu__item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 6px 10px;\n border-radius: var(--cl-radius-sm, 4px);\n background: none;\n border: none;\n color: var(--cl-fg, #f4f4f5);\n font-family: var(--cl-font-sans);\n font-size: var(--cl-text-xs, 0.75rem);\n cursor: pointer;\n text-align: left;\n}\n.codelab-split-menu__item:hover,\n.codelab-split-menu__item:focus-visible {\n background: var(--cl-list-active, #28282b);\n color: var(--cl-list-active-fg, #f4f4f5);\n outline: none;\n}\n\n/* \u2500\u2500 Command Palette Trigger Pill \u2500\u2500 */\n.codelab-cmd-trigger {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 3px 12px;\n min-width: 200px;\n justify-content: center;\n border-radius: var(--cl-radius-md, 6px);\n background: var(--cl-input-bg, #141415);\n border: 1px solid var(--cl-border, #27272a);\n color: var(--cl-fg-muted, #a1a1aa);\n font-family: var(--cl-font-sans);\n font-size: var(--cl-text-xs, 0.75rem);\n cursor: pointer;\n transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;\n}\n.codelab-cmd-trigger:hover,\n.codelab-cmd-trigger:focus-visible {\n background: var(--cl-bg-hover, #1f1f22);\n color: var(--cl-fg, #f4f4f5);\n border-color: var(--cl-border-strong, #3a3a3e);\n outline: none;\n}\n\n/* \u2500\u2500 HUD Telemetry Pill \u2500\u2500 */\n.codelab-hud-pill {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n padding: 2px 10px;\n border-radius: 999px;\n background: var(--cl-bg-panel, #18181a);\n border: 1px solid var(--cl-border, #27272a);\n color: var(--cl-fg-muted, #a1a1aa);\n font-family: var(--cl-font-mono);\n font-size: var(--cl-text-2xs, 0.6875rem);\n font-variant-numeric: tabular-nums;\n font-weight: 500;\n margin-left: auto;\n user-select: none;\n}\n.codelab-hud-pill__metric {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n\n/* \u2500\u2500 Stdin / Custom Input Panel \u2500\u2500 */\n.codelab-stdin-panel {\n display: flex;\n flex-direction: column;\n height: 100%;\n padding: 8px 12px;\n background: var(--cl-bg-editor, #0f0f10);\n box-sizing: border-box;\n}\n.codelab-stdin-panel__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 6px;\n font-family: var(--cl-font-sans);\n font-size: var(--cl-text-xs, 0.75rem);\n color: var(--cl-fg-muted, #a1a1aa);\n font-weight: 500;\n}\n.codelab-stdin-panel__textarea {\n flex: 1;\n width: 100%;\n background: var(--cl-input-bg, #141415);\n border: 1px solid var(--cl-border, #27272a);\n border-radius: var(--cl-radius-md, 6px);\n color: var(--cl-fg, #f4f4f5);\n font-family: var(--cl-font-mono);\n font-size: var(--cl-text-xs, 0.75rem);\n line-height: 1.5;\n padding: 8px 10px;\n resize: none;\n outline: none;\n box-sizing: border-box;\n}\n.codelab-stdin-panel__textarea:focus {\n border-color: var(--cl-focus-border, #a1a1aa);\n}\n\n/* \u2500\u2500 Problems Drawer Tab \u2500\u2500 */\n.codelab-problems-list {\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n height: 100%;\n padding: 4px 0;\n}\n.codelab-problem-item {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 5px 12px;\n font-size: var(--cl-text-xs, 0.75rem);\n font-family: var(--cl-font-mono);\n cursor: pointer;\n border-bottom: 1px solid var(--cl-border-subtle, #1d1d20);\n}\n.codelab-problem-item:hover {\n background: var(--cl-bg-hover, #1f1f22);\n}\n.codelab-problem-item--error {\n color: var(--cl-red, #f87171);\n}\n.codelab-problem-item--warning {\n color: var(--cl-amber, #fbbf24);\n}\n.codelab-problem-item--info {\n color: var(--cl-fg, #f4f4f5);\n}\n.codelab-problem-item__location {\n color: var(--cl-fg-muted, #a1a1aa);\n font-size: var(--cl-text-2xs, 0.6875rem);\n font-variant-numeric: tabular-nums;\n margin-left: auto;\n}\n\n/* \u2500\u2500 Monaco Side-by-Side Diff Editor \u2500\u2500 */\n.codelab-diff-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background: var(--cl-bg-editor, #0f0f10);\n}\n.codelab-diff-toolbar {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n background: var(--cl-bg-elevated, #141415);\n border-bottom: 1px solid var(--cl-border, #27272a);\n font-family: var(--cl-font-sans);\n font-size: var(--cl-text-xs, 0.75rem);\n}\n.codelab-diff-host {\n flex: 1;\n width: 100%;\n height: calc(100% - 36px);\n position: relative;\n}\n";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @innovatorved/code-lab — Topbar Navigation & Contextual Execution Controls
|
|
3
|
-
*/
|
|
4
|
-
export interface ToolbarRenderOptions {
|
|
5
|
-
workbench: any;
|
|
6
|
-
title: string;
|
|
7
|
-
backLabel: string;
|
|
8
|
-
hasGuidedLab: boolean;
|
|
9
|
-
mode: string;
|
|
10
|
-
activeFile: string | null;
|
|
11
|
-
enabledLanguages: Set<string>;
|
|
12
|
-
currentLang: string;
|
|
13
|
-
hasWebContent: boolean;
|
|
14
|
-
activeServerCount: number;
|
|
15
|
-
}
|
|
16
|
-
export declare function renderLanguageSwitcherHtml(workbench: any): string;
|
|
17
|
-
export declare function renderToolbarHtml(opts: ToolbarRenderOptions): string;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# `@code-lab/commands`
|
|
2
|
-
|
|
3
|
-
Layer 1 (`platform`) command execution, `when`-clause context evaluation, and customizable keybinding dispatch:
|
|
4
|
-
|
|
5
|
-
- `ContextKeyService` — evaluates VS Code-style `when` expressions (`editorFocus && !editorReadonly && resourceLangId == 'sql'`).
|
|
6
|
-
- `CommandRegistry` — registers typed commands (`registerCommand` -> `IDisposable`) and dispatches `executeCommand`.
|
|
7
|
-
- `KeybindingService` — normalizes cross-platform `Mod`/`Cmd`/`Ctrl` chords, supports `.codelab/keybindings.json` overrides and `-command` unbinding rules.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@code-lab/commands",
|
|
3
|
-
"version": "0.7.0",
|
|
4
|
-
"description": "CommandRegistry, VS Code-style ContextKeyService (when-clause evaluator), and KeybindingService for CodeLab.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./src/index.ts",
|
|
7
|
-
"types": "./src/index.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": "./src/index.ts"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"@code-lab/core": "workspace:*"
|
|
13
|
-
},
|
|
14
|
-
"sideEffects": false,
|
|
15
|
-
"license": "MIT"
|
|
16
|
-
}
|