@ttsc/playground 0.19.2 → 0.20.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.
Files changed (44) hide show
  1. package/README.md +6 -0
  2. package/lib/src/npm/collectExternalPackageNames.js +436 -73
  3. package/lib/src/npm/collectExternalPackageNames.js.map +1 -1
  4. package/lib/src/npm/installPlaygroundDependencies.d.ts +5 -3
  5. package/lib/src/npm/installPlaygroundDependencies.js +230 -27
  6. package/lib/src/npm/installPlaygroundDependencies.js.map +1 -1
  7. package/lib/src/npm/internal/npmRegistry.d.ts +13 -2
  8. package/lib/src/npm/internal/npmRegistry.js +73 -50
  9. package/lib/src/npm/internal/npmRegistry.js.map +1 -1
  10. package/lib/src/npm/packageNameFromSpecifier.js +17 -4
  11. package/lib/src/npm/packageNameFromSpecifier.js.map +1 -1
  12. package/lib/src/react/PlaygroundShell.js +68 -61
  13. package/lib/src/react/PlaygroundShell.js.map +1 -1
  14. package/lib/src/react/createCompilerClient.d.ts +3 -3
  15. package/lib/src/react/createCompilerClient.js +32 -54
  16. package/lib/src/react/createCompilerClient.js.map +1 -1
  17. package/lib/src/sandbox/createSandboxRequire.js +117 -54
  18. package/lib/src/sandbox/createSandboxRequire.js.map +1 -1
  19. package/lib/src/structures/IPlaygroundDependencyInstallOptions.d.ts +13 -1
  20. package/lib/src/structures/IPlaygroundDependencyInstallResult.d.ts +4 -0
  21. package/lib/src/structures/IPlaygroundDependencyPackage.d.ts +2 -0
  22. package/lib/src/structures/IPlaygroundDependencyRequest.d.ts +9 -0
  23. package/lib/src/structures/IPlaygroundDependencyRequest.js +3 -0
  24. package/lib/src/structures/IPlaygroundDependencyRequest.js.map +1 -0
  25. package/lib/src/structures/IPlaygroundInstalledDependency.d.ts +12 -0
  26. package/lib/src/structures/IPlaygroundInstalledDependency.js +3 -0
  27. package/lib/src/structures/IPlaygroundInstalledDependency.js.map +1 -0
  28. package/lib/src/structures/index.d.ts +2 -0
  29. package/lib/src/structures/index.js +2 -0
  30. package/lib/src/structures/index.js.map +1 -1
  31. package/package.json +6 -4
  32. package/src/npm/collectExternalPackageNames.ts +503 -68
  33. package/src/npm/installPlaygroundDependencies.ts +288 -29
  34. package/src/npm/internal/npmRegistry.ts +99 -38
  35. package/src/npm/packageNameFromSpecifier.ts +16 -3
  36. package/src/react/PlaygroundShell.tsx +86 -72
  37. package/src/react/createCompilerClient.ts +37 -51
  38. package/src/sandbox/createSandboxRequire.ts +140 -49
  39. package/src/structures/IPlaygroundDependencyInstallOptions.ts +13 -1
  40. package/src/structures/IPlaygroundDependencyInstallResult.ts +4 -0
  41. package/src/structures/IPlaygroundDependencyPackage.ts +2 -0
  42. package/src/structures/IPlaygroundDependencyRequest.ts +9 -0
  43. package/src/structures/IPlaygroundInstalledDependency.ts +13 -0
  44. package/src/structures/index.ts +2 -0
@@ -27,7 +27,9 @@ __exportStar(require("./IPlaygroundDependencyInstallResult"), exports);
27
27
  __exportStar(require("./IPlaygroundDependencyPackage"), exports);
28
28
  __exportStar(require("./IPlaygroundDependencyProgress"), exports);
29
29
  __exportStar(require("./IPlaygroundDependencyProgressPhase"), exports);
30
+ __exportStar(require("./IPlaygroundDependencyRequest"), exports);
30
31
  __exportStar(require("./IPlaygroundExample"), exports);
32
+ __exportStar(require("./IPlaygroundInstalledDependency"), exports);
31
33
  __exportStar(require("./IPlaygroundShellProps"), exports);
32
34
  __exportStar(require("./ISourceEditorProps"), exports);
33
35
  __exportStar(require("./ITransformOptions"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/structures/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,qDAAmC;AACnC,oDAAkC;AAClC,iEAA+C;AAC/C,iEAA+C;AAC/C,mEAAiD;AACjD,sDAAoC;AACpC,kDAAgC;AAChC,wEAAsD;AACtD,uEAAqD;AACrD,iEAA+C;AAC/C,kEAAgD;AAChD,uEAAqD;AACrD,uDAAqC;AACrC,0DAAwC;AACxC,uDAAqC;AACrC,sDAAoC;AACpC,uDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/structures/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,qDAAmC;AACnC,oDAAkC;AAClC,iEAA+C;AAC/C,iEAA+C;AAC/C,mEAAiD;AACjD,sDAAoC;AACpC,kDAAgC;AAChC,wEAAsD;AACtD,uEAAqD;AACrD,iEAA+C;AAC/C,kEAAgD;AAChD,uEAAqD;AACrD,iEAA+C;AAC/C,uDAAqC;AACrC,mEAAiD;AACjD,0DAAwC;AACxC,uDAAqC;AACrC,sDAAoC;AACpC,uDAAqC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttsc/playground",
3
- "version": "0.19.2",
3
+ "version": "0.20.0",
4
4
  "description": "Reusable React + Web Worker scaffolding for in-browser ttsc playgrounds built on @ttsc/wasm.",
5
5
  "main": "lib/src/index.js",
6
6
  "types": "lib/src/index.d.ts",
@@ -30,7 +30,8 @@
30
30
  },
31
31
  "homepage": "https://ttsc.dev",
32
32
  "dependencies": {
33
- "lz-string": "^1.5.0"
33
+ "lz-string": "^1.5.0",
34
+ "semver": "^7.8.1"
34
35
  },
35
36
  "peerDependencies": {
36
37
  "@monaco-editor/react": "^4.6.0",
@@ -38,10 +39,11 @@
38
39
  "react": "^18.0.0",
39
40
  "react-dom": "^18.0.0",
40
41
  "tgrid": "^1.0.3",
41
- "@ttsc/wasm": "^0.19.2"
42
+ "@ttsc/wasm": "^0.20.0"
42
43
  },
43
44
  "devDependencies": {
44
45
  "@monaco-editor/react": "^4.6.0",
46
+ "@types/semver": "^7.7.1",
45
47
  "@types/node": "^25.3.0",
46
48
  "@types/react": "^18.3.1",
47
49
  "monaco-editor": "^0.52.0",
@@ -50,7 +52,7 @@
50
52
  "rimraf": "^6.1.2",
51
53
  "tgrid": "^1.0.3",
52
54
  "typescript": "^7.0.2",
53
- "@ttsc/wasm": "^0.19.2"
55
+ "@ttsc/wasm": "^0.20.0"
54
56
  },
55
57
  "keywords": [
56
58
  "ttsc",