code-playpad 0.10.1 → 0.12.0
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/README.md +222 -17
- package/dist/THIRD-PARTY-NOTICES.txt +223 -0
- package/dist/cdn.js +2 -2
- package/dist/compiler-B408qd3N.js +151 -0
- package/dist/{config-CT3H6Oum.js → config-DB58UVsk.js} +1 -1
- package/dist/{cpp-Cs32J8JC.js → cpp-Bhr_Zgfk.js} +1 -1
- package/dist/{cpp-CO2abWii.js → cpp-xLJOrOXX.js} +1 -1
- package/dist/dist-3xj9-ylK.js +6 -0
- package/dist/{dist-BIgiGgKu.js → dist-7CHy0evE.js} +1 -1
- package/dist/dist-BDifu2bQ.js +6 -0
- package/dist/dist-BwlTZqCY.js +28 -0
- package/dist/dist-C41hAfPr.js +6 -0
- package/dist/dist-CRXZcpYD.js +14 -0
- package/dist/dist-CTLX4tws.js +8 -0
- package/dist/dist-CjnVq6q1.js +10 -0
- package/dist/{dist-Vr-fb58P.js → dist-D4P7t1AU.js} +4 -4
- package/dist/dist-DHeVjdBc.js +6 -0
- package/dist/dist-IFh_mUXG.js +7 -0
- package/dist/dist-UbI3_a5S.js +6 -0
- package/dist/dist-_fde-E8H.js +6 -0
- package/dist/dist-g8djAEMH.js +6 -0
- package/dist/dist-ixcYRC9x.js +6 -0
- package/dist/editor.d.ts +3 -1
- package/dist/element-Dzhksh6_.js +596 -0
- package/dist/element.d.ts +26 -0
- package/dist/element.js +1 -1
- package/dist/hints-DpBIeoeG.js +6 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +1 -1
- package/dist/{java-8qjVCjsN.js → java-DFiOVxDN.js} +1 -1
- package/dist/{java-DeBiVPXO.js → java-DjuG1fCk.js} +1 -1
- package/dist/{javascript-DLPaJJzf.js → javascript-BBiCDtZ3.js} +2 -2
- package/dist/{javascript-B1tVx7AD.js → javascript-CLaHCZ8o.js} +1 -1
- package/dist/languages.d.ts +1 -1
- package/dist/{pyodide-C8ImkXdD.js → pyodide-Cs-Kwccb.js} +1 -1
- package/dist/{pyodide-BOoYEfX1.js → pyodide-QurAOd7j.js} +2 -2
- package/dist/react-ALhWeEZ5.js +9 -0
- package/dist/react-DmuIc3qw.js +4 -0
- package/dist/react-runtime-19.2.8.js +240 -0
- package/dist/react-vendor.generated-DMxIoCMn.js +6 -0
- package/dist/react-version.generated-BNNJmf7J.js +6 -0
- package/dist/react.d.ts +9 -1
- package/dist/react.js +1 -1
- package/dist/rolldown-runtime-DK3Fl9T5.js +6 -0
- package/dist/runtime/config.d.ts +15 -1
- package/dist/runtime/react/boot.d.ts +9 -0
- package/dist/runtime/react/compiler.d.ts +30 -0
- package/dist/runtime/react-vendor.generated.d.ts +5 -0
- package/dist/runtime/react-version.generated.d.ts +3 -0
- package/dist/runtime/react.d.ts +2 -0
- package/dist/standalone.js +289 -17
- package/dist/styles.d.ts +0 -2
- package/dist/theme.d.ts +48 -0
- package/dist/{hints-CCMgezw9.js → types-CfcYqU2K.js} +1 -1
- package/dist/types.d.ts +23 -0
- package/dist/worker-runtime-DvpugeXD.js +9 -0
- package/dist/{worker-runtime-sUPz1J56.js → worker-runtime-tSXm-pPB.js} +1 -1
- package/package.json +23 -6
- package/dist/dist--J_vhCIU.js +0 -14
- package/dist/dist-BNvM_BAY.js +0 -6
- package/dist/dist-BkpKCrXQ.js +0 -6
- package/dist/dist-CJxiVI4a.js +0 -6
- package/dist/dist-CNOK8CHE.js +0 -6
- package/dist/dist-D25hs99E.js +0 -10
- package/dist/dist-D2igTc4m.js +0 -6
- package/dist/dist-D7jBL3Ib.js +0 -28
- package/dist/dist-DXjodKfp.js +0 -6
- package/dist/dist-DfFrsBkU.js +0 -8
- package/dist/element-CQGYVEF7.js +0 -324
- package/dist/worker-runtime-DfYet3xy.js +0 -9
package/dist/element.d.ts
CHANGED
|
@@ -16,6 +16,22 @@ export interface ErrorEventDetail {
|
|
|
16
16
|
/** Plain-language guidance, when the runtime could work out the cause. */
|
|
17
17
|
hint?: string;
|
|
18
18
|
language: string;
|
|
19
|
+
/** React: where the error is, when known. */
|
|
20
|
+
file?: string;
|
|
21
|
+
line?: number;
|
|
22
|
+
column?: number;
|
|
23
|
+
}
|
|
24
|
+
/** React: one line of the preview's console. */
|
|
25
|
+
export interface ConsoleEventDetail {
|
|
26
|
+
level: 'log' | 'info' | 'warn' | 'error';
|
|
27
|
+
text: string;
|
|
28
|
+
language: string;
|
|
29
|
+
}
|
|
30
|
+
/** React: the text of the preview's #root, after it changes. Learner code can
|
|
31
|
+
* forge this, so it is a lesson check, not proof of completion. */
|
|
32
|
+
export interface RenderEventDetail {
|
|
33
|
+
rootText: string;
|
|
34
|
+
language: string;
|
|
19
35
|
}
|
|
20
36
|
/**
|
|
21
37
|
* `class X extends HTMLElement` is evaluated when the module loads, so importing
|
|
@@ -64,6 +80,16 @@ export declare class CodePlayPadElement extends ElementBase {
|
|
|
64
80
|
* The runtime is shared, so a bare runtime.stop() would kill whichever
|
|
65
81
|
* widget happens to be running. */
|
|
66
82
|
stop(): void;
|
|
83
|
+
/**
|
|
84
|
+
* Moves the project to a separate window that the reader can resize, and runs
|
|
85
|
+
* it there. The widget in that window is this page's code, so the page keeps
|
|
86
|
+
* getting its events. Edits come back when the window closes, or with
|
|
87
|
+
* closeWindow(). Call it from a click: browsers block other popups. Returns
|
|
88
|
+
* false when the browser blocked it.
|
|
89
|
+
*/
|
|
90
|
+
openWindow(): boolean;
|
|
91
|
+
/** Closes the separate window, and brings its edits back to this widget. */
|
|
92
|
+
closeWindow(): void;
|
|
67
93
|
/** Boot the runtime without running anything. Safe to call repeatedly. */
|
|
68
94
|
prewarm(): Promise<Runtime>;
|
|
69
95
|
connectedCallback(): void;
|
package/dist/element.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{t as CodePlayPadElement,n as defineCodePlayPad}from"./element-
|
|
1
|
+
export{t as CodePlayPadElement,n as defineCodePlayPad}from"./element-Dzhksh6_.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export { CodePlayPadElement, defineCodePlayPad } from './element.js';
|
|
2
|
-
export type { ErrorEventDetail, OutputEventDetail, RunEventDetail } from './element.js';
|
|
2
|
+
export type { ConsoleEventDetail, ErrorEventDetail, OutputEventDetail, RenderEventDetail, RunEventDetail } from './element.js';
|
|
3
|
+
export { EDITOR_THEMES, getThemePreference, onThemePreferenceChange, setThemePreference } from './theme.js';
|
|
4
|
+
export type { EditorTheme, EditorThemeColors, ThemeMode, ThemePreference } from './theme.js';
|
|
3
5
|
export { createEditor } from './editor.js';
|
|
4
6
|
export type { EditorHandle, EditorOptions } from './editor.js';
|
|
5
7
|
export { getRuntime, listRuntimes, registerRuntime } from './runtime/registry.js';
|
|
6
|
-
export { configurePython, configureCpp, configureTypeScript, pyodideAssetUrls, PYODIDE_VERSION } from './runtime/config.js';
|
|
8
|
+
export { configurePython, configureCpp, configureReact, REACT_VERSION, configureTypeScript, pyodideAssetUrls, PYODIDE_VERSION } from './runtime/config.js';
|
|
7
9
|
export { RunStopped, WorkerUnavailable } from './types.js';
|
|
8
|
-
export type { CaseResult, CaseStatus, Files, LoadProgress, PracticeCase, PracticeSpec, PracticeValue, Result, Runtime, RunOptions, Table } from './types.js';
|
|
10
|
+
export type { CaseResult, CaseStatus, Files, LoadProgress, PreviewBinding, PracticeCase, PracticeSpec, PracticeValue, Result, Runtime, RunOptions, Table } from './types.js';
|
|
9
11
|
export { allProgress, clearSnippet, getProgress, loadSnippet, saveSnippet, setProgress } from './progress.js';
|
|
10
12
|
export type { ProgressRecord } from './progress.js';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{_ as e,a as t,c as n,d as r,f as i,g as a,h as o,i as s,m as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h,v as g,y as _}from"./element-Dzhksh6_.js";import{t as v}from"./react-version.generated-BNNJmf7J.js";import{a as y,i as b,n as x,r as S,t as C,u as w}from"./config-DB58UVsk.js";export{m as CodePlayPadElement,a as EDITOR_THEMES,C as PYODIDE_VERSION,v as REACT_VERSION,h as RunStopped,r as WorkerUnavailable,f as allProgress,s as clearSnippet,x as configureCpp,S as configurePython,b as configureReact,y as configureTypeScript,o as createEditor,l as defineCodePlayPad,t as getProgress,i as getRuntime,e as getThemePreference,d as listRuntimes,u as loadSnippet,g as onThemePreferenceChange,w as pyodideAssetUrls,c as registerRuntime,p as saveSnippet,n as setProgress,_ as setThemePreference};
|