@innovatorved/code-lab 0.1.5 → 0.1.7
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/README.md +1 -1
- package/dist/code-lab.d.ts +3 -1
- package/dist/code-lab.esm.js +811 -74
- package/dist/code-lab.js +801 -73
- package/dist/extensions/guided-lab.esm.js +3 -0
- package/dist/extensions/guided-lab.js +3 -0
- package/dist/index.d.ts +1 -1
- package/dist/preview-sw.js +56 -8
- package/dist/runtime.d.ts +7 -27
- package/dist/runtime.esm.js +458 -16
- package/dist/runtime.js +415 -5
- package/dist/schemas.d.ts +10 -1
- package/dist/schemas.esm.js +4194 -0
- package/dist/schemas.js +4210 -0
- package/dist/shell.d.ts +18 -47
- package/dist/shell.esm.js +139 -29
- package/dist/shell.js +139 -29
- package/dist/terminal.d.ts +11 -87
- package/dist/terminal.esm.js +10 -2
- package/dist/terminal.js +3 -1
- package/package.json +12 -5
- package/src/index.ts +1 -1
- package/src/preview-sw.js +56 -8
- package/src/runtime.ts +478 -79
- package/src/schemas.ts +4 -1
- package/src/shell.ts +412 -359
- package/src/terminal.ts +885 -919
- package/src/workbench.ts +244 -40
- package/src/runtime.js +0 -7821
- package/src/shell.js +0 -7166
- package/src/terminal.js +0 -1046
- package/src/workbench.js +0 -7353
package/ARCHITECTURE.md
CHANGED
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 (`
|
|
14
|
+
- **Modular Architecture (`v0.1.7`)**: Pure, general-purpose browser IDE (`code-lab`) by default with File Explorer, Monaco Editor, and PTY Terminal. Curriculum features (Guided Steps, Mode Switcher, and JS/TS switcher) are encapsulated in an opt-in modular extension (`@innovatorved/code-lab/extensions/guided-lab`).
|
|
15
15
|
- **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, runtime execution, and git cloning.
|
|
16
16
|
- **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.
|
|
17
17
|
- **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.
|
package/dist/code-lab.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* TypeScript Definitions for @innovatorved/code-lab
|
|
2
|
+
* TypeScript Definitions for @innovatorved/code-lab v0.1.7
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
export interface CodeLabStep {
|
|
@@ -276,6 +276,7 @@ export interface CodeLabRuntimeAPI {
|
|
|
276
276
|
preloadNpmPackages(files?: Record<string, string>, onProgress?: (pkg: string) => void): Promise<Record<string, string>>;
|
|
277
277
|
preloadNpmPackages(files: Record<string, string> | undefined, existingCache: Map<string, string>, onProgress?: (pkg: string) => void): Promise<Record<string, string>>;
|
|
278
278
|
transpileTS(source: string, filename?: string): string;
|
|
279
|
+
transpileForBrowser(source: string, filename?: string): string;
|
|
279
280
|
createVirtualFs(initialFiles?: Record<string, string>): any;
|
|
280
281
|
createVirtualHttp(resourceTracker?: any, sharedTrace?: any[], activePortTable?: any): any;
|
|
281
282
|
createVirtualNet(resourceTracker?: any, sharedTrace?: any[], activePortTable?: any): any;
|
|
@@ -288,6 +289,7 @@ export declare const executeInWorker: CodeLabRuntimeAPI['executeInWorker'];
|
|
|
288
289
|
export declare const cancelWorkerExecution: CodeLabRuntimeAPI['cancelWorkerExecution'];
|
|
289
290
|
export declare const preloadNpmPackages: CodeLabRuntimeAPI['preloadNpmPackages'];
|
|
290
291
|
export declare const transpileTS: CodeLabRuntimeAPI['transpileTS'];
|
|
292
|
+
export declare const transpileForBrowser: CodeLabRuntimeAPI['transpileForBrowser'];
|
|
291
293
|
export declare const createVirtualFs: CodeLabRuntimeAPI['createVirtualFs'];
|
|
292
294
|
export declare const createVirtualHttp: CodeLabRuntimeAPI['createVirtualHttp'];
|
|
293
295
|
export declare const createVirtualNet: CodeLabRuntimeAPI['createVirtualNet'];
|