@ttsc/playground 0.14.0-dev.20260529.2 → 0.14.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.
Files changed (79) hide show
  1. package/lib/src/compiler/DEFAULT_PLAYGROUND_COMPILER_OPTIONS.d.ts +4 -4
  2. package/lib/src/compiler/DEFAULT_PLAYGROUND_COMPILER_OPTIONS.js +4 -4
  3. package/lib/src/compiler/DEFAULT_TYPIA_PLUGIN_NAME.d.ts +2 -2
  4. package/lib/src/compiler/DEFAULT_TYPIA_PLUGIN_NAME.js +2 -2
  5. package/lib/src/compiler/createWorkerCompiler.js +3 -3
  6. package/lib/src/compiler/createWorkerCompiler.js.map +1 -1
  7. package/lib/src/compiler/installDependenciesIntoMemFS.d.ts +4 -4
  8. package/lib/src/compiler/installDependenciesIntoMemFS.js +4 -4
  9. package/lib/src/compiler/installTypiaSourcePack.d.ts +2 -2
  10. package/lib/src/compiler/installTypiaSourcePack.js +2 -2
  11. package/lib/src/compiler/internal/joinUnder.d.ts +4 -1
  12. package/lib/src/compiler/internal/joinUnder.js +4 -1
  13. package/lib/src/compiler/internal/joinUnder.js.map +1 -1
  14. package/lib/src/compiler/internal/parseLintDiagnostics.js +2 -2
  15. package/lib/src/compiler/internal/safeParseTypiaTransform.d.ts +3 -3
  16. package/lib/src/compiler/internal/safeParseTypiaTransform.js +3 -3
  17. package/lib/src/compiler/loadTypiaSourcePack.d.ts +4 -4
  18. package/lib/src/compiler/loadTypiaSourcePack.js +4 -4
  19. package/lib/src/compiler/pickEmittedJS.js +1 -6
  20. package/lib/src/compiler/pickEmittedJS.js.map +1 -1
  21. package/lib/src/index.d.ts +2 -2
  22. package/lib/src/index.js +2 -2
  23. package/lib/src/npm/BUILT_IN_PLAYGROUND_PACKAGES.d.ts +2 -2
  24. package/lib/src/npm/BUILT_IN_PLAYGROUND_PACKAGES.js +2 -2
  25. package/lib/src/npm/installPlaygroundDependencies.d.ts +2 -2
  26. package/lib/src/npm/installPlaygroundDependencies.js +2 -2
  27. package/lib/src/npm/internal/npmRegistry.js.map +1 -1
  28. package/lib/src/npm/packageNameFromSpecifier.d.ts +2 -2
  29. package/lib/src/npm/packageNameFromSpecifier.js +2 -2
  30. package/lib/src/react/createCompilerClient.d.ts +5 -5
  31. package/lib/src/react/createCompilerClient.js +5 -5
  32. package/lib/src/react/createCompilerClient.js.map +1 -1
  33. package/lib/src/sandbox/createSandboxRequire.d.ts +2 -2
  34. package/lib/src/sandbox/createSandboxRequire.js +2 -2
  35. package/lib/src/sandbox/loadTypiaRuntimePack.d.ts +3 -3
  36. package/lib/src/sandbox/loadTypiaRuntimePack.js +3 -3
  37. package/lib/src/structures/IBuildTsconfigOptions.d.ts +2 -2
  38. package/lib/src/structures/ICompilerService.d.ts +3 -2
  39. package/lib/src/structures/IConsoleMessage.d.ts +3 -3
  40. package/lib/src/structures/ICreateCompilerClientOptions.d.ts +4 -4
  41. package/lib/src/structures/ICreateWorkerCompilerOptions.d.ts +6 -6
  42. package/lib/src/structures/IInstallTypiaSourcePackOptions.d.ts +8 -5
  43. package/lib/src/structures/IOptionToggle.d.ts +2 -2
  44. package/lib/src/structures/IPlaygroundDependencyProgressPhase.d.ts +4 -1
  45. package/lib/src/structures/IPlaygroundExample.d.ts +3 -3
  46. package/lib/src/structures/IPlaygroundShellProps.d.ts +21 -15
  47. package/lib/src/structures/ISourceEditorProps.d.ts +4 -4
  48. package/lib/src/structures/ITypiaPluginConfig.d.ts +6 -6
  49. package/package.json +4 -4
  50. package/src/compiler/DEFAULT_PLAYGROUND_COMPILER_OPTIONS.ts +4 -4
  51. package/src/compiler/DEFAULT_TYPIA_PLUGIN_NAME.ts +2 -2
  52. package/src/compiler/createWorkerCompiler.ts +1 -2
  53. package/src/compiler/installDependenciesIntoMemFS.ts +4 -4
  54. package/src/compiler/installTypiaSourcePack.ts +2 -2
  55. package/src/compiler/internal/joinUnder.ts +4 -1
  56. package/src/compiler/internal/parseLintDiagnostics.ts +2 -2
  57. package/src/compiler/internal/safeParseTypiaTransform.ts +3 -3
  58. package/src/compiler/loadTypiaSourcePack.ts +4 -4
  59. package/src/compiler/pickEmittedJS.ts +1 -6
  60. package/src/index.ts +2 -2
  61. package/src/npm/BUILT_IN_PLAYGROUND_PACKAGES.ts +2 -2
  62. package/src/npm/installPlaygroundDependencies.ts +3 -3
  63. package/src/npm/internal/npmRegistry.ts +5 -1
  64. package/src/npm/packageNameFromSpecifier.ts +2 -2
  65. package/src/react/createCompilerClient.ts +9 -8
  66. package/src/sandbox/createSandboxRequire.ts +2 -2
  67. package/src/sandbox/loadTypiaRuntimePack.ts +3 -3
  68. package/src/structures/IBuildTsconfigOptions.ts +2 -2
  69. package/src/structures/ICompilerService.ts +3 -2
  70. package/src/structures/IConsoleMessage.ts +3 -3
  71. package/src/structures/ICreateCompilerClientOptions.ts +4 -4
  72. package/src/structures/ICreateWorkerCompilerOptions.ts +6 -6
  73. package/src/structures/IInstallTypiaSourcePackOptions.ts +8 -5
  74. package/src/structures/IOptionToggle.ts +2 -2
  75. package/src/structures/IPlaygroundDependencyProgressPhase.ts +4 -1
  76. package/src/structures/IPlaygroundExample.ts +3 -3
  77. package/src/structures/IPlaygroundShellProps.ts +21 -15
  78. package/src/structures/ISourceEditorProps.ts +4 -4
  79. package/src/structures/ITypiaPluginConfig.ts +6 -6
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Toggle metadata the OptionsPanel renders.
3
3
  *
4
- * Sites declare these for whatever transform plugins their wasm registered;
5
- * the panel renders one row per entry and bubbles `onChange` with the merged
4
+ * Sites declare these for whatever transform plugins their wasm registered; the
5
+ * panel renders one row per entry and bubbles `onChange` with the merged
6
6
  * options object.
7
7
  */
8
8
  export interface IOptionToggle {
@@ -1,4 +1,7 @@
1
- /** Lifecycle phase of a single dependency install reported via the progress callback. */
1
+ /**
2
+ * Lifecycle phase of a single dependency install reported via the progress
3
+ * callback.
4
+ */
2
5
  export type IPlaygroundDependencyProgressPhase =
3
6
  | "queued"
4
7
  | "resolve"
@@ -1,7 +1,7 @@
1
1
  /**
2
- * One pre-canned source script the playground dropdown can load. Sites
3
- * provide their own list — typia's site lists `random/is/json/protobuf`,
4
- * the ttsc site lists `typia/lint/mixed`.
2
+ * One pre-canned source script the playground dropdown can load. Sites provide
3
+ * their own list — typia's site lists `random/is/json/protobuf`, the ttsc site
4
+ * lists `typia/lint/mixed`.
5
5
  */
6
6
  export interface IPlaygroundExample {
7
7
  id: string;
@@ -12,7 +12,10 @@ import type { ITransformOptions } from "./ITransformOptions";
12
12
  * defaults without a Provider in between.
13
13
  */
14
14
  export interface IPlaygroundShellProps {
15
- /** URL of the bundled worker script (rspack output of the site's worker entry). */
15
+ /**
16
+ * URL of the bundled worker script (rspack output of the site's worker
17
+ * entry).
18
+ */
16
19
  workerUrl: string;
17
20
 
18
21
  /** Source code shown on first mount (and on Reset). */
@@ -25,32 +28,35 @@ export interface IPlaygroundShellProps {
25
28
 
26
29
  /** Toggles rendered in the Options modal. Defaults to typia + lint. */
27
30
  optionToggles?: readonly IOptionToggle[];
28
- /** Initial values for the transform options. Defaults to `{typia: true, lint: true}`. */
31
+ /**
32
+ * Initial values for the transform options. Defaults to `{typia: true, lint:
33
+ * true}`.
34
+ */
29
35
  defaultOptions?: ITransformOptions;
30
36
 
31
37
  /**
32
- * Static extra .d.ts entries to mount in Monaco (e.g. a pre-packed typia
33
- * type pack). Merged with dependencies installed at runtime.
38
+ * Static extra .d.ts entries to mount in Monaco (e.g. a pre-packed typia type
39
+ * pack). Merged with dependencies installed at runtime.
34
40
  */
35
41
  staticEditorLibs?: Record<string, string>;
36
42
 
37
43
  /**
38
- * Packages the site has already pre-mounted into the wasm. These are
39
- * skipped by the runtime npm dependency installer.
44
+ * Packages the site has already pre-mounted into the wasm. These are skipped
45
+ * by the runtime npm dependency installer.
40
46
  */
41
47
  preinstalledPackages?: readonly string[];
42
48
 
43
49
  /**
44
50
  * Optional execute hook. When provided, the shell renders an "Execute"
45
- * button; on click it calls `service.bundle(...)` to get the JS and passes
46
- * it here. The returned messages are appended to the Console pane.
51
+ * button; on click it calls `service.bundle(...)` to get the JS and passes it
52
+ * here. The returned messages are appended to the Console pane.
47
53
  *
48
54
  * `sandbox.runtimeFiles` is the accumulated runtime-file map produced by
49
55
  * every `installPlaygroundDependencies` call so far in this session
50
56
  * (package-rooted keys like `uuid/dist/index.js`). The site's executeBundle
51
- * typically merges these on top of its own typia-runtime pack and feeds
52
- * the union to `createSandboxRequire` — without this channel the in-page
53
- * Execute sandbox cannot resolve any npm dependency the user installed.
57
+ * typically merges these on top of its own typia-runtime pack and feeds the
58
+ * union to `createSandboxRequire` — without this channel the in-page Execute
59
+ * sandbox cannot resolve any npm dependency the user installed.
54
60
  *
55
61
  * When omitted, the Execute UI is hidden.
56
62
  */
@@ -63,15 +69,15 @@ export interface IPlaygroundShellProps {
63
69
  ) => Promise<void>;
64
70
 
65
71
  /**
66
- * Brand slot in the toolbar (left side). Renders before the Playground
67
- * label. Sites typically pass `<a href="/">SiteName</a>`.
72
+ * Brand slot in the toolbar (left side). Renders before the Playground label.
73
+ * Sites typically pass `<a href="/">SiteName</a>`.
68
74
  */
69
75
  brand?: ReactNode;
70
76
 
71
77
  /**
72
78
  * Caption shown on the result pane when the active tab is "javascript".
73
- * Defaults to `"dist/playground.js"`. Receives the current transform
74
- * options so sites can append `· typia disabled` etc.
79
+ * Defaults to `"dist/playground.js"`. Receives the current transform options
80
+ * so sites can append `· typia disabled` etc.
75
81
  */
76
82
  resultCaption?: (options: ITransformOptions) => string;
77
83
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Props for the Monaco-based source editor. The site provides `extraLibs` —
3
- * typically the typia `.d.ts` pack and any installed npm package `.d.ts`
4
- * files — and the editor mounts them via
3
+ * typically the typia `.d.ts` pack and any installed npm package `.d.ts` files
4
+ * — and the editor mounts them via
5
5
  * `monaco.languages.typescript.typescriptDefaults.addExtraLib`.
6
6
  */
7
7
  export interface ISourceEditorProps {
@@ -9,8 +9,8 @@ export interface ISourceEditorProps {
9
9
  onChange: (value: string) => void;
10
10
  /**
11
11
  * Map of file path → declaration text. Mounted into Monaco's TypeScript
12
- * extra-libs registry. Hot-replaceable: the editor disposes the previous
13
- * libs and re-mounts when the map identity changes.
12
+ * extra-libs registry. Hot-replaceable: the editor disposes the previous libs
13
+ * and re-mounts when the map identity changes.
14
14
  */
15
15
  extraLibs?: Record<string, string>;
16
16
  /** Editor model URI. Defaults to `file:///src/playground.ts`. */
@@ -5,16 +5,16 @@ export interface ITypiaPluginConfig {
5
5
  /** Plugin id registered with `host.Expose` (default: `"typia"`). */
6
6
  name?: string;
7
7
  /**
8
- * Module specifier the typia transform receives via
9
- * `compilerOptions.plugins` (default: `"typia/lib/transform"`).
8
+ * Module specifier the typia transform receives via `compilerOptions.plugins`
9
+ * (default: `"typia/lib/transform"`).
10
10
  */
11
11
  transformModule?: string;
12
12
  /**
13
- * Optional hook to mount typia source files into the MemFS during boot.
14
- * The site fetches its pre-built typia pack and writes it under
13
+ * Optional hook to mount typia source files into the MemFS during boot. The
14
+ * site fetches its pre-built typia pack and writes it under
15
15
  * `<workDir>/node_modules/`. `workDir` is forwarded from
16
- * `createWorkerCompiler` so the mount can honor a non-default project
17
- * root without the site rewiring the URL.
16
+ * `createWorkerCompiler` so the mount can honor a non-default project root
17
+ * without the site rewiring the URL.
18
18
  */
19
19
  mount?: (host: IMemFSHost, workDir: string) => Promise<void>;
20
20
  }