code-playpad 0.5.0 → 0.5.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.
@@ -1,9 +1,9 @@
1
- <!-- GENERATED by scripts/sync-java.mjs from java-online-compiler@0.27.0 (5ad78d01e8516969bd4d501fdf0f4857cedb49ad). Do not edit. -->
1
+ <!-- GENERATED by scripts/sync-java.mjs from java-online-compiler@0.27.1 (dc8d7197f6a9ec7b0855b93648079b85c317ba3f). Do not edit. -->
2
2
 
3
- > This is the compatibility table of the Java engine that code-playpad ships (engine 0.27.0).
3
+ > This is the compatibility table of the Java engine that code-playpad ships (engine 0.27.1).
4
4
  > Paths such as `tests/…`, `SPEC.md` and `docs/…` refer to the engine's source (`java-engine/` in code-playpad's repository), which is not part of the package.
5
5
 
6
- # Compatibility — engine 0.27.0 (Stage A, compact source files, objects, numbers and control flow, collections, lambdas, practice mode, String, format, regex, Math, Random, System, Scanner and IO.readln, inheritance, interfaces, Object, instanceof, enums, records, exceptions, hash order, fixed collections, TreeMap, TreeSet, LinkedList, Stack, lambdas, method references, generic classes and methods, var, annotations, varargs, anonymous classes, streams, subList, local classes, raw types, float, byte and short, pattern matching, sealed classes, BigInteger, BigDecimal, EnumMap, EnumSet, fast I/O, static imports, initializer blocks, text blocks, enum constant bodies, Interface.super)
6
+ # Compatibility — engine 0.27.1 (Stage A, compact source files, objects, numbers and control flow, collections, lambdas, practice mode, String, format, regex, Math, Random, System, Scanner and IO.readln, inheritance, interfaces, Object, instanceof, enums, records, exceptions, hash order, fixed collections, TreeMap, TreeSet, LinkedList, Stack, lambdas, method references, generic classes and methods, var, annotations, varargs, anonymous classes, streams, subList, local classes, raw types, float, byte and short, pattern matching, sealed classes, BigInteger, BigDecimal, EnumMap, EnumSet, fast I/O, static imports, initializer blocks, text blocks, enum constant bodies, Interface.super)
7
7
 
8
8
  This document records what the engine accepts, what it rejects, and the evidence that it behaves like Java. Every method of every library class, with its status and the tests that call it, is in docs/feature-manifest.json (`npm run manifest`). The reference is Java SE 25 (SPEC.md §4), and what the engine implements is **a documented subset of Java 25**, not "Java 25".
9
9
 
@@ -15,7 +15,7 @@ Every feature has one status:
15
15
 
16
16
  > **Evidence:** everything below is checked against the pinned JDK, Temurin 25.0.4.1 (docs/reference-jdk.md).
17
17
  > - **Golden programs:** all 47 in `tests/programs` (the SPEC.md §4.1 Stage A corpus among them) match byte for byte: stdout, stderr, and exit code.
18
- > - **Recorded snippets:** all 1558 cases in `tests/jdk-cases` match. 1537 match byte for byte (once the JDK's own stack frames are removed, as *Known divergences* explains); the other 21 are listed under *Known divergences*, each with the narrower comparison the tests apply to it.
18
+ > - **Recorded snippets:** all 1559 cases in `tests/jdk-cases` match. 1538 match byte for byte (once the JDK's own stack frames are removed, as *Known divergences* explains); the other 21 are listed under *Known divergences*, each with the narrower comparison the tests apply to it.
19
19
  > - **Practice corpus:** all 10 Stage 4 programs in `tests/corpus` (docs/practice-corpus.md) run and match.
20
20
  > - **Field corpus:** 212 of 223 programs written as learners and solvers write Java, kept whether or not the engine supports them, match the JDK exactly. None runs differently; 10 are rejected as unsupported, 1 stops on an engine limitation and none on the instruction limit (`corpus/REPORT.md`, docs/corpus-harness.md).
21
21
 
@@ -41,7 +41,7 @@ Every feature has one status:
41
41
  | **Enums** (JLS 8.9) | Supported with limits | Nested or top-level, with fields, constructors (with the hidden name and ordinal, so NPE messages say `<parameter3>`), methods, static members, and `implements`. `values()` (a new array each time), `valueOf(String)` (`IllegalArgumentException: No enum constant Main.Color.PURPLE`, `NullPointerException: Name is null`, with the enum's own frame), `name()`, `ordinal()`, `compareTo` (by ordinal), `toString()` (overridable), `getDeclaringClass()`, `equals` and `hashCode` (identity). The constants are made when the enum initializes, before its other static fields; an exception there is `ExceptionInInitializerError`. `switch` on an enum, with simple or qualified labels (`case RED`, `case Color.RED`); a switch expression naming every constant needs no `default`; a null selector fails as the JDK's does (`Cannot invoke "Main$Color.ordinal()"`). Enums are Comparable, so they sort and queue in declaration order. javac's errors: `enum classes may not be instantiated`, `modifier public not allowed here`, `name() in E cannot override name() in Enum`. `EnumMap` and `EnumSet` are supported (see *Library*). Constants with a class body (`PLUS { int apply(int a, int b) { return a + b; } }`): each is an anonymous subclass of the enum (`Main$Op$1`, numbered with the anonymous classes of the constants' arguments, before the members'), with its own fields, methods, `super` calls and initializer blocks; `getClass()` is the body's class and `getDeclaringClass()` the enum, also in EnumMap and EnumSet. An enum may leave abstract methods to its constants' bodies. javac's errors: `<anonymous Main$Op$2> is not abstract and does not override abstract method apply(int,int) in Op`, `Op is abstract; cannot be instantiated` (a constant without a body), `non-static variable symbol cannot be referenced from a static context` (the enum's private members are not inherited by a body), `equals(Object) in <anonymous Main$Op$1> cannot override equals(Object) in Enum`. |
42
42
  | **Records** (JLS 8.10) | Supported with limits | Nested or top-level, with components, accessors (generated, or declared: `invalid accessor method in record R`), the canonical constructor (generated, compact `R { ... }` with the fields assigned after its body, or explicit), other constructors (which must call another: `constructor is not canonical, so it must invoke another constructor of class R`), static fields and methods, instance methods, and `implements`. `toString()` (`Point[x=1, y=2]`, components as String.valueOf shows them, with the record's own frame when one fails), `equals` (doubles compared as `Double.compare` does) and `hashCode` (`31 * h + hash(component)`) as the JDK computes them, unless declared. javac's errors: `field declaration must be static`, `cannot assign a value to final variable v`. Generic records (`record Pair<A, B>(A first, B second)`) are supported; so are local records and record patterns (see *Pattern matching*). |
43
43
  | `getClass()`, `X.class` | Supported with limits | A `Class` value per class: `getName()` (`Main$Node`, `[I`), `getSimpleName()` (`Node`, `int[]`), `isInterface()`, `isArray()`, printing as `class Main$Node`, and `==` between classes, as `equals` methods use it. `X.class` is a `Class<X>` (so `new EnumMap<>(Day.class)` infers its key type); `Class<?>` may be declared. The reflection methods are unsupported. |
44
- | Running a file, and programs in several files (JEP 458) | Supported with limits | Behaves like `java <entry>` in source-file mode. The program's other `.java` files (`Session.java` beside `Main.java`) are compiled as the JDK's launcher compiles them: a file when the program first names the class it is named after, so a file nothing names is never compiled, and its errors never reported. Each file has its own imports. A class of the entry file wins over another file's of the same name. Errors and stack traces name each file (`Session.java:2: error: …`, `at Session.describe(Session.java:5)`); where the JDK prints another file's absolute path on disk, the engine prints its name. A file's warnings print again when the program first uses one of its classes, as the launcher's second compilation prints them (a class literal, `Helper.class`, is not counted as a use). Limits: 32 files, 500,000 characters per file and 1,000,000 together. Unsupported: `package` declarations, folders, another compact source file with a `main`, and using another file's secondary class (one not named after its file) from outside that file, which the JDK finds only if that file happened to be compiled first. |
44
+ | Running a file, and programs in several files (JEP 458) | Supported with limits | Behaves like `java <entry>` in source-file mode. The program's other `.java` files (`Session.java` beside `Main.java`) are compiled as the JDK's launcher compiles them: a file when the program first names the class it is named after, so a file nothing names is never compiled, and its errors never reported. Each file has its own imports. A class of the entry file wins over another file's of the same name. Errors and stack traces name each file (`Session.java:2: error: …`, `at Session.describe(Session.java:5)`); where the JDK prints another file's absolute path on disk, the engine prints its name. A file's warnings print again when the program first uses one of its classes, as the launcher's second compilation prints them (a class literal, `Helper.class`, is not counted as a use). Limits: 32 files, 500,000 characters per file and 1,000,000 together. A requested entry that is not among the files fails as `java Missing.java` does (`Error: Could not find or load main class Missing.java`); another file never runs in its place. A `.java` file in a folder (`src/Session.java`, `lib\\Session.java`) is reported by name as not supported, an engine rule for its source sets rather than the JDK's, instead of being left out. Unsupported: `package` declarations, folders, another compact source file with a `main`, and using another file's secondary class (one not named after its file) from outside that file, which the JDK finds only if that file happened to be compiled first. |
45
45
  | No class / no usable main | Supported | `error: no class declared in source file`; `error: can't find main(String[]) or main() method in class: Main`; `error: can't find class: Main`; for a compact file, `compact source file does not have main method in the form of void main() or void main(String[] args)` |
46
46
  | `import`: single-type and on-demand | Supported with limits | `import java.util.List;` and `import java.util.*;` for the supported java.util classes (see *Library*); the java.lang ones need no import. A compact source file sees java.util without imports, as Java 25's implicit `import module java.base` gives it. A wrong name gets javac's error: `package java.utill does not exist`, or `cannot find symbol` with `location: package java.util`. Real JDK classes outside the subset (`BitSet`, `LocalDate`, …) are unsupported where they are used. Classes of java.io, java.math, java.util.function and java.util.stream that the subset has are imported the same way. |
47
47
  | `import static`: single and on-demand (JLS 7.5.3, 7.5.4) | Supported | Methods and fields of the supported classes: `import static java.lang.Math.*;`, `import static java.lang.System.out;`, `import static java.util.stream.Collectors.*;`, `import static java.util.Map.entry;`, and member types (`import static java.util.Map.Entry;`). A simple name means the program's own local, field or method first, then a single import, then an on-demand one (JLS 6.4.1). A method of the class or an enclosing one, Object's included, hides every import of that name, so `toString(a)` with `Arrays.*` imported is javac's `method toString in class Object cannot be applied`. Overloads from several on-demand imports are resolved together (`sort(int[])` from Arrays, `sort(List)` from Collections). javac's errors: `reference to MAX_VALUE is ambiguous` (fields, and methods equally specific in two classes), `cannot find symbol` with `symbol: static foo`, a missing class or package, `static import only from classes and interfaces`. Imported constants are constants (switch labels). Importing from a JDK class outside the subset (`TimeUnit`) is fine until a name from it is used, which is unsupported. |
package/README.md CHANGED
@@ -9,7 +9,7 @@ entirely in the reader's browser. No backend, no iframe, no sign-up.
9
9
  **[Live demo →](https://code-playpad.swengr.com)**
10
10
 
11
11
  ```html
12
- <script type="module" src="https://cdn.jsdelivr.net/npm/code-playpad@0.5.0/dist/standalone.js"></script>
12
+ <script type="module" src="https://cdn.jsdelivr.net/npm/code-playpad@0.5.2/dist/standalone.js"></script>
13
13
 
14
14
  <code-playpad height="auto">
15
15
  print("hello from a static page")
@@ -29,7 +29,7 @@ entirely in the reader's browser. No backend, no iframe, no sign-up.
29
29
  | --- | --- | --- |
30
30
  | `python` (default) | Python 3.14 via Pyodide — full standard library, `input()`, real tracebacks, `numpy` on demand | ~6 MB (13.5 MB unpacked), once, cached |
31
31
  | `javascript` | The browser's own engine, in a Worker | nothing |
32
- | `typescript` | Same engine, types stripped before running | ~70 KB, once, cached |
32
+ | `typescript` | Same engine, types stripped before running | nothing from another service: a ~47 KB (gzipped) transform chunk of this package, loaded the first time a widget needs it |
33
33
  | `java` | A documented subset of Java 25, compiled and interpreted in a Worker by an engine built for this package — see [Java](#java) | nothing: the engine is a ~105 KB (gzipped) chunk of this package, loaded with the first Java widget, and its library a ~75 KB chunk loaded the first time a program uses it |
34
34
 
35
35
  ```html
@@ -170,10 +170,10 @@ actually sent.
170
170
  | --- | --- | --- | --- |
171
171
  | Python | **166.3 KB** | Pyodide, about **6.0 MB** (a 3.3 MB wasm file and a 2.4 MB standard library) | 165.8 KB |
172
172
  | JavaScript | **180.4 KB** | nothing | 179.9 KB |
173
- | TypeScript | **180.4 KB** | Sucrase, 72 KB (≈ 252 KB in total) | 179.9 KB |
173
+ | TypeScript | **227.3 KB** (0.5.2: with the 46.9 KB transform) | nothing (before 0.5.2: Sucrase from esm.sh, 72 KB) | 179.9 KB |
174
174
  | Java | **267.8 KB** | nothing | 216.4 KB |
175
175
  | Java, with collections | **342.4 KB** | nothing | 233.2 KB |
176
- | All four | 399.9 KB | Pyodide and Sucrase | 273.9 KB |
176
+ | All four | 446.8 KB (0.5.2: with the transform) | Pyodide | 273.9 KB |
177
177
 
178
178
  - **Every row includes a 144.5 KB shared base:** the editor (CodeMirror) and
179
179
  the widget, the same as in 0.3.0.
@@ -192,8 +192,12 @@ actually sent.
192
192
  - **Languages load lazily.** A Java page never fetches the Python or
193
193
  JavaScript runtimes, and Python and JavaScript pages never fetch Java. As a
194
194
  result, Python-only and JavaScript-only pages are the same size as in 0.3.0.
195
- - **Java needs no CDN:** it is self-contained, while Python's first run
196
- downloads about 6 MB of Pyodide (cached after that).
195
+ - **Java and TypeScript need no other service:** both are self-contained.
196
+ Since 0.5.2 the TypeScript transform (Sucrase) is a 46.9 KB chunk of this
197
+ package, loaded the first time a widget needs it (TypeScript, JSX, or
198
+ JavaScript modules across several files); the TypeScript rows are the
199
+ measured JavaScript page plus that chunk. Python's first run downloads about
200
+ 6 MB of Pyodide (cached after that).
197
201
  - **With npm and a bundler,** you already ship CodeMirror yourself.
198
202
  code-playpad's own code then costs about 9 KB, plus the runtime chunk for
199
203
  each language used. Java's chunk is 104 KB, and 74 KB more for its library
@@ -204,7 +208,7 @@ actually sent.
204
208
  ### From a CDN — nothing to install
205
209
 
206
210
  ```html
207
- <script type="module" src="https://cdn.jsdelivr.net/npm/code-playpad@0.5.0/dist/standalone.js"></script>
211
+ <script type="module" src="https://cdn.jsdelivr.net/npm/code-playpad@0.5.2/dist/standalone.js"></script>
208
212
  ```
209
213
 
210
214
  This is the `standalone` build: CodeMirror is bundled in, so a static blog post
@@ -265,7 +269,7 @@ Next.js, Astro and SvelteKit need no dynamic import or `client:only` guard.
265
269
  | `autorun` | runs once, on its own, when scrolled into view |
266
270
  | `stdin` | shows the standard-input box up front |
267
271
  | `persist` | key under which edits are saved (see [Saving work](#saving-work)) |
268
- | `entry` | which file Run executes, for multi-file widgets |
272
+ | `entry` | which file Run executes, for multi-file widgets. It must name one of the widget's files: a wrong name is an error, and no other file runs in its place. An inline snippet takes this name |
269
273
  | `practice` | Java only: test cases for one method, as JSON (see [Practice mode](#practice-mode-java)) |
270
274
 
271
275
  ```html
@@ -371,8 +375,10 @@ JavaScript and TypeScript work the same way, including `.json` imported as data:
371
375
  Java compiles the other files as `java Main.java` does (JDK 25's source
372
376
  launcher): `Main.java` runs, and `Session.java` is compiled when `Main` first
373
377
  uses `Session`. Each file is named after its class and has its own imports, and
374
- errors and stack traces name the file. Write `<` as `&lt;` inside the markup
375
- (`List&lt;String&gt;`), since it is HTML:
378
+ errors and stack traces name the file. Java files must be flat: a `.java` tab in
379
+ a folder (`src/Session.java`) is reported as not supported, since packages are
380
+ not supported yet. Write `<` as `&lt;` inside the markup (`List&lt;String&gt;`),
381
+ since it is HTML:
376
382
 
377
383
  ```html
378
384
  <code-playpad language="java" entry="Main.java" height="auto">
@@ -804,8 +810,11 @@ configurePython({ indexURL: '/pyodide/' }); // before the first run
804
810
  pyodideAssetUrls(); // the files worth <link rel=preload>-ing
805
811
  ```
806
812
 
807
- `configureTypeScript({ sucraseURL })` does the same for the TypeScript
808
- transform. Give those files a long `Cache-Control`: one page's download then
813
+ The TypeScript transform needs no configuration: it ships in the package (since
814
+ 0.5.2) and loads from wherever the package is served. `configureTypeScript({
815
+ sucraseURL })` loads it from a URL of your own instead (an absolute URL of a
816
+ self-contained ES module exporting `transform`), set before the first
817
+ JavaScript or TypeScript widget starts its runtime. Give those files a long `Cache-Control`: one page's download then
809
818
  warms every other page on the site.
810
819
 
811
820
  ## Worth knowing
@@ -830,8 +839,47 @@ warms every other page on the site.
830
839
 
831
840
  ## Version history
832
841
 
833
- No breaking changes so far: markup and API written against 0.1.3 still work on
834
- 0.5.0.
842
+ Markup and API written against 0.1.3 still work on 0.5.2, with one exception, in
843
+ 0.5.1: an `entry` that names none of a widget's files is now an error.
844
+
845
+ ### 0.5.2
846
+
847
+ - **TypeScript no longer depends on esm.sh.** Before, the first TypeScript
848
+ run (and JSX, and JavaScript modules across several files) imported Sucrase,
849
+ the transform that strips types, from `esm.sh`. If esm.sh was blocked or
850
+ failed, TypeScript could not run (`Failed to fetch dynamically imported
851
+ module`). Sucrase 3.35.1 now ships in the package as its own chunk (46.9 KB
852
+ gzipped, about a third smaller than what esm.sh sent). It loads from wherever
853
+ code-playpad is served: the same CDN, or your app's bundle. It is still
854
+ loaded only when a widget first needs it, so JavaScript-only, Python and
855
+ Java pages never download it.
856
+ - **A failed transform load can be retried, and says what it is.** Before, one
857
+ failed load kept every later run failing until the page was reloaded, and
858
+ the error looked like one in the learner's code. Now the message is *Could
859
+ not load the TypeScript transform (Sucrase)*, with a hint that it is not an
860
+ error in the code, and the next Run tries again.
861
+ - **Types are still erased, not checked.** This changes where the transform
862
+ comes from, not what it does.
863
+ - `configureTypeScript({ sucraseURL })` still works, and is now optional.
864
+
865
+ ### 0.5.1
866
+
867
+ - **A wrong `entry` is an error, in every language.** Before, a widget whose
868
+ `entry` named none of its files quietly ran another file (`main.py`,
869
+ `Main.java`, or the first one). Now Run shows *This widget's entry is
870
+ "mian.py", but it has no file of that name (its files: main.py, util.py)*.
871
+ `playpad-error` fires, `playpad-output` arrives with `failed: true`, and nothing
872
+ runs. If your page has such a typo, the error shows you where. An inline
873
+ snippet (no `<playpad-file>` children) is now named after `entry` when it is
874
+ set, so `entry="App.java"` on an inline Java class keeps working. Saved work
875
+ (`persist`) from earlier versions comes back under the new name.
876
+ - **Java: a `.java` file in a folder is reported** (engine 0.27.1). Before, it
877
+ was left out, so `src/Session.java` gave `cannot find symbol` and an old
878
+ `old/Session.java` tab was silently ignored. Now the error names the file and
879
+ explains that Java files must be flat, since packages are not supported yet.
880
+ - **Java engine API:** `compile` and `runProgram` with an `entry` missing from
881
+ the files fail as `java Missing.java` does on JDK 25, instead of running
882
+ `Main.java`.
835
883
 
836
884
  ### 0.5.0
837
885
 
@@ -253,6 +253,98 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
253
253
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
254
254
  THE SOFTWARE.
255
255
 
256
+ ==============================================================================
257
+ @jridgewell/gen-mapping 0.3.13 — MIT
258
+
259
+ Copyright 2024 Justin Ridgewell <justin@ridgewell.name>
260
+
261
+ Permission is hereby granted, free of charge, to any person obtaining a copy
262
+ of this software and associated documentation files (the "Software"), to deal
263
+ in the Software without restriction, including without limitation the rights
264
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
265
+ copies of the Software, and to permit persons to whom the Software is
266
+ furnished to do so, subject to the following conditions:
267
+
268
+ The above copyright notice and this permission notice shall be included in
269
+ all copies or substantial portions of the Software.
270
+
271
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
272
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
273
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
274
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
275
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
276
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
277
+ SOFTWARE.
278
+
279
+ ==============================================================================
280
+ @jridgewell/resolve-uri 3.1.2 — MIT
281
+
282
+ Copyright 2019 Justin Ridgewell <jridgewell@google.com>
283
+
284
+ Permission is hereby granted, free of charge, to any person obtaining a copy
285
+ of this software and associated documentation files (the "Software"), to deal
286
+ in the Software without restriction, including without limitation the rights
287
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
288
+ copies of the Software, and to permit persons to whom the Software is
289
+ furnished to do so, subject to the following conditions:
290
+
291
+ The above copyright notice and this permission notice shall be included in
292
+ all copies or substantial portions of the Software.
293
+
294
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
295
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
296
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
297
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
298
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
299
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
300
+ SOFTWARE.
301
+
302
+ ==============================================================================
303
+ @jridgewell/sourcemap-codec 1.6.0 — MIT
304
+
305
+ Copyright 2024 Justin Ridgewell <justin@ridgewell.name>
306
+
307
+ Permission is hereby granted, free of charge, to any person obtaining a copy
308
+ of this software and associated documentation files (the "Software"), to deal
309
+ in the Software without restriction, including without limitation the rights
310
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
311
+ copies of the Software, and to permit persons to whom the Software is
312
+ furnished to do so, subject to the following conditions:
313
+
314
+ The above copyright notice and this permission notice shall be included in
315
+ all copies or substantial portions of the Software.
316
+
317
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
318
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
319
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
320
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
321
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
322
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
323
+ SOFTWARE.
324
+
325
+ ==============================================================================
326
+ @jridgewell/trace-mapping 0.3.31 — MIT
327
+
328
+ Copyright 2024 Justin Ridgewell <justin@ridgewell.name>
329
+
330
+ Permission is hereby granted, free of charge, to any person obtaining a copy
331
+ of this software and associated documentation files (the "Software"), to deal
332
+ in the Software without restriction, including without limitation the rights
333
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
334
+ copies of the Software, and to permit persons to whom the Software is
335
+ furnished to do so, subject to the following conditions:
336
+
337
+ The above copyright notice and this permission notice shall be included in
338
+ all copies or substantial portions of the Software.
339
+
340
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
341
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
342
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
343
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
344
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
345
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
346
+ SOFTWARE.
347
+
256
348
  ==============================================================================
257
349
  @lezer/common 1.5.2 — MIT
258
350
 
@@ -476,6 +568,31 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
476
568
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
477
569
  THE SOFTWARE.
478
570
 
571
+ ==============================================================================
572
+ lines-and-columns 1.2.4 — MIT
573
+
574
+ The MIT License (MIT)
575
+
576
+ Copyright (c) 2015 Brian Donovan
577
+
578
+ Permission is hereby granted, free of charge, to any person obtaining a copy
579
+ of this software and associated documentation files (the "Software"), to deal
580
+ in the Software without restriction, including without limitation the rights
581
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
582
+ copies of the Software, and to permit persons to whom the Software is
583
+ furnished to do so, subject to the following conditions:
584
+
585
+ The above copyright notice and this permission notice shall be included in
586
+ all copies or substantial portions of the Software.
587
+
588
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
589
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
590
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
591
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
592
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
593
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
594
+ THE SOFTWARE.
595
+
479
596
  ==============================================================================
480
597
  style-mod 4.1.3 — MIT
481
598
 
@@ -499,6 +616,236 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
499
616
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
500
617
  THE SOFTWARE.
501
618
 
619
+ ==============================================================================
620
+ sucrase 3.35.1 — MIT
621
+
622
+ The MIT License (MIT)
623
+
624
+ Copyright (c) 2012-2018 various contributors (see AUTHORS)
625
+
626
+ Permission is hereby granted, free of charge, to any person obtaining a copy
627
+ of this software and associated documentation files (the "Software"), to deal
628
+ in the Software without restriction, including without limitation the rights
629
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
630
+ copies of the Software, and to permit persons to whom the Software is
631
+ furnished to do so, subject to the following conditions:
632
+
633
+ The above copyright notice and this permission notice shall be included in all
634
+ copies or substantial portions of the Software.
635
+
636
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
637
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
638
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
639
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
640
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
641
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
642
+ SOFTWARE.
643
+
644
+ ==============================================================================
645
+ ts-interface-checker 0.1.13 — Apache-2.0
646
+
647
+ Apache License
648
+ Version 2.0, January 2004
649
+ http://www.apache.org/licenses/
650
+
651
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
652
+
653
+ 1. Definitions.
654
+
655
+ "License" shall mean the terms and conditions for use, reproduction,
656
+ and distribution as defined by Sections 1 through 9 of this document.
657
+
658
+ "Licensor" shall mean the copyright owner or entity authorized by
659
+ the copyright owner that is granting the License.
660
+
661
+ "Legal Entity" shall mean the union of the acting entity and all
662
+ other entities that control, are controlled by, or are under common
663
+ control with that entity. For the purposes of this definition,
664
+ "control" means (i) the power, direct or indirect, to cause the
665
+ direction or management of such entity, whether by contract or
666
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
667
+ outstanding shares, or (iii) beneficial ownership of such entity.
668
+
669
+ "You" (or "Your") shall mean an individual or Legal Entity
670
+ exercising permissions granted by this License.
671
+
672
+ "Source" form shall mean the preferred form for making modifications,
673
+ including but not limited to software source code, documentation
674
+ source, and configuration files.
675
+
676
+ "Object" form shall mean any form resulting from mechanical
677
+ transformation or translation of a Source form, including but
678
+ not limited to compiled object code, generated documentation,
679
+ and conversions to other media types.
680
+
681
+ "Work" shall mean the work of authorship, whether in Source or
682
+ Object form, made available under the License, as indicated by a
683
+ copyright notice that is included in or attached to the work
684
+ (an example is provided in the Appendix below).
685
+
686
+ "Derivative Works" shall mean any work, whether in Source or Object
687
+ form, that is based on (or derived from) the Work and for which the
688
+ editorial revisions, annotations, elaborations, or other modifications
689
+ represent, as a whole, an original work of authorship. For the purposes
690
+ of this License, Derivative Works shall not include works that remain
691
+ separable from, or merely link (or bind by name) to the interfaces of,
692
+ the Work and Derivative Works thereof.
693
+
694
+ "Contribution" shall mean any work of authorship, including
695
+ the original version of the Work and any modifications or additions
696
+ to that Work or Derivative Works thereof, that is intentionally
697
+ submitted to Licensor for inclusion in the Work by the copyright owner
698
+ or by an individual or Legal Entity authorized to submit on behalf of
699
+ the copyright owner. For the purposes of this definition, "submitted"
700
+ means any form of electronic, verbal, or written communication sent
701
+ to the Licensor or its representatives, including but not limited to
702
+ communication on electronic mailing lists, source code control systems,
703
+ and issue tracking systems that are managed by, or on behalf of, the
704
+ Licensor for the purpose of discussing and improving the Work, but
705
+ excluding communication that is conspicuously marked or otherwise
706
+ designated in writing by the copyright owner as "Not a Contribution."
707
+
708
+ "Contributor" shall mean Licensor and any individual or Legal Entity
709
+ on behalf of whom a Contribution has been received by Licensor and
710
+ subsequently incorporated within the Work.
711
+
712
+ 2. Grant of Copyright License. Subject to the terms and conditions of
713
+ this License, each Contributor hereby grants to You a perpetual,
714
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
715
+ copyright license to reproduce, prepare Derivative Works of,
716
+ publicly display, publicly perform, sublicense, and distribute the
717
+ Work and such Derivative Works in Source or Object form.
718
+
719
+ 3. Grant of Patent License. Subject to the terms and conditions of
720
+ this License, each Contributor hereby grants to You a perpetual,
721
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
722
+ (except as stated in this section) patent license to make, have made,
723
+ use, offer to sell, sell, import, and otherwise transfer the Work,
724
+ where such license applies only to those patent claims licensable
725
+ by such Contributor that are necessarily infringed by their
726
+ Contribution(s) alone or by combination of their Contribution(s)
727
+ with the Work to which such Contribution(s) was submitted. If You
728
+ institute patent litigation against any entity (including a
729
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
730
+ or a Contribution incorporated within the Work constitutes direct
731
+ or contributory patent infringement, then any patent licenses
732
+ granted to You under this License for that Work shall terminate
733
+ as of the date such litigation is filed.
734
+
735
+ 4. Redistribution. You may reproduce and distribute copies of the
736
+ Work or Derivative Works thereof in any medium, with or without
737
+ modifications, and in Source or Object form, provided that You
738
+ meet the following conditions:
739
+
740
+ (a) You must give any other recipients of the Work or
741
+ Derivative Works a copy of this License; and
742
+
743
+ (b) You must cause any modified files to carry prominent notices
744
+ stating that You changed the files; and
745
+
746
+ (c) You must retain, in the Source form of any Derivative Works
747
+ that You distribute, all copyright, patent, trademark, and
748
+ attribution notices from the Source form of the Work,
749
+ excluding those notices that do not pertain to any part of
750
+ the Derivative Works; and
751
+
752
+ (d) If the Work includes a "NOTICE" text file as part of its
753
+ distribution, then any Derivative Works that You distribute must
754
+ include a readable copy of the attribution notices contained
755
+ within such NOTICE file, excluding those notices that do not
756
+ pertain to any part of the Derivative Works, in at least one
757
+ of the following places: within a NOTICE text file distributed
758
+ as part of the Derivative Works; within the Source form or
759
+ documentation, if provided along with the Derivative Works; or,
760
+ within a display generated by the Derivative Works, if and
761
+ wherever such third-party notices normally appear. The contents
762
+ of the NOTICE file are for informational purposes only and
763
+ do not modify the License. You may add Your own attribution
764
+ notices within Derivative Works that You distribute, alongside
765
+ or as an addendum to the NOTICE text from the Work, provided
766
+ that such additional attribution notices cannot be construed
767
+ as modifying the License.
768
+
769
+ You may add Your own copyright statement to Your modifications and
770
+ may provide additional or different license terms and conditions
771
+ for use, reproduction, or distribution of Your modifications, or
772
+ for any such Derivative Works as a whole, provided Your use,
773
+ reproduction, and distribution of the Work otherwise complies with
774
+ the conditions stated in this License.
775
+
776
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
777
+ any Contribution intentionally submitted for inclusion in the Work
778
+ by You to the Licensor shall be under the terms and conditions of
779
+ this License, without any additional terms or conditions.
780
+ Notwithstanding the above, nothing herein shall supersede or modify
781
+ the terms of any separate license agreement you may have executed
782
+ with Licensor regarding such Contributions.
783
+
784
+ 6. Trademarks. This License does not grant permission to use the trade
785
+ names, trademarks, service marks, or product names of the Licensor,
786
+ except as required for reasonable and customary use in describing the
787
+ origin of the Work and reproducing the content of the NOTICE file.
788
+
789
+ 7. Disclaimer of Warranty. Unless required by applicable law or
790
+ agreed to in writing, Licensor provides the Work (and each
791
+ Contributor provides its Contributions) on an "AS IS" BASIS,
792
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
793
+ implied, including, without limitation, any warranties or conditions
794
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
795
+ PARTICULAR PURPOSE. You are solely responsible for determining the
796
+ appropriateness of using or redistributing the Work and assume any
797
+ risks associated with Your exercise of permissions under this License.
798
+
799
+ 8. Limitation of Liability. In no event and under no legal theory,
800
+ whether in tort (including negligence), contract, or otherwise,
801
+ unless required by applicable law (such as deliberate and grossly
802
+ negligent acts) or agreed to in writing, shall any Contributor be
803
+ liable to You for damages, including any direct, indirect, special,
804
+ incidental, or consequential damages of any character arising as a
805
+ result of this License or out of the use or inability to use the
806
+ Work (including but not limited to damages for loss of goodwill,
807
+ work stoppage, computer failure or malfunction, or any and all
808
+ other commercial damages or losses), even if such Contributor
809
+ has been advised of the possibility of such damages.
810
+
811
+ 9. Accepting Warranty or Additional Liability. While redistributing
812
+ the Work or Derivative Works thereof, You may choose to offer,
813
+ and charge a fee for, acceptance of support, warranty, indemnity,
814
+ or other liability obligations and/or rights consistent with this
815
+ License. However, in accepting such obligations, You may act only
816
+ on Your own behalf and on Your sole responsibility, not on behalf
817
+ of any other Contributor, and only if You agree to indemnify,
818
+ defend, and hold each Contributor harmless for any liability
819
+ incurred by, or claims asserted against, such Contributor by reason
820
+ of your accepting any such warranty or additional liability.
821
+
822
+ END OF TERMS AND CONDITIONS
823
+
824
+ APPENDIX: How to apply the Apache License to your work.
825
+
826
+ To apply the Apache License to your work, attach the following
827
+ boilerplate notice, with the fields enclosed by brackets "{}"
828
+ replaced with your own identifying information. (Don't include
829
+ the brackets!) The text should be enclosed in the appropriate
830
+ comment syntax for the file format. We also recommend that a
831
+ file or class name and description of purpose be included on the
832
+ same "printed page" as the copyright notice for easier
833
+ identification within third-party archives.
834
+
835
+ Copyright {yyyy} {name of copyright owner}
836
+
837
+ Licensed under the Apache License, Version 2.0 (the "License");
838
+ you may not use this file except in compliance with the License.
839
+ You may obtain a copy of the License at
840
+
841
+ http://www.apache.org/licenses/LICENSE-2.0
842
+
843
+ Unless required by applicable law or agreed to in writing, software
844
+ distributed under the License is distributed on an "AS IS" BASIS,
845
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
846
+ See the License for the specific language governing permissions and
847
+ limitations under the License.
848
+
502
849
  ==============================================================================
503
850
  w3c-keyname 2.2.8 — MIT
504
851
 
package/dist/cdn.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! code-playpad 0.5.0: CDN entry, loads dist/standalone.js of this exact version */
2
- export * from "https://cdn.jsdelivr.net/npm/code-playpad@0.5.0/dist/standalone.js";
1
+ /*! code-playpad 0.5.2: CDN entry, loads dist/standalone.js of this exact version */
2
+ export * from "https://cdn.jsdelivr.net/npm/code-playpad@0.5.2/dist/standalone.js";
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * code-playpad — MIT © 2026 Seung Hun Lee
3
+ * Bundles CodeMirror 6 and Lezer (MIT) © Marijn Haverbeke and others.
4
+ * Full third-party licences: THIRD-PARTY-NOTICES.txt in this package.
5
+ */
6
+ var e=`314.0.5`,t=`https://cdn.jsdelivr.net/pyodide/v${e}/full/`,n=null;function r(e){t=e.indexURL.endsWith(`/`)?e.indexURL:e.indexURL+`/`}function i(e){n=e.sucraseURL}function a(){return t}function o(){return n}function s(){return[{url:t+`pyodide.js`,as:`script`},{url:t+`pyodide.asm.wasm`,as:`fetch`},{url:t+`python_stdlib.zip`,as:`fetch`}]}export{o as a,a as i,r as n,s as o,i as r,e as t};