@ttsc/playground 0.19.0 → 0.19.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.
- package/README.md +1 -1
- package/lib/src/react/ConsoleViewer.js +17 -17
- package/lib/src/react/ConsoleViewer.js.map +1 -1
- package/lib/src/react/DependencyProgressModal.js +1 -1
- package/lib/src/react/DependencyProgressModal.js.map +1 -1
- package/lib/src/react/DiagnosticsPanel.js +2 -2
- package/lib/src/react/DiagnosticsPanel.js.map +1 -1
- package/lib/src/react/ExamplePicker.js +2 -2
- package/lib/src/react/ExamplePicker.js.map +1 -1
- package/lib/src/react/LintPane.js +3 -3
- package/lib/src/react/LintPane.js.map +1 -1
- package/lib/src/react/OptionsPanel.js +1 -1
- package/lib/src/react/OptionsPanel.js.map +1 -1
- package/lib/src/react/PlaygroundShell.js +14 -13
- package/lib/src/react/PlaygroundShell.js.map +1 -1
- package/lib/src/react/ResultViewer.d.ts +2 -2
- package/lib/src/react/ResultViewer.js +3 -3
- package/lib/src/react/ResultViewer.js.map +1 -1
- package/lib/src/react/SourceEditor.js +1 -1
- package/lib/src/react/SourceEditor.js.map +1 -1
- package/package.json +3 -3
- package/src/react/ConsoleViewer.tsx +18 -18
- package/src/react/DependencyProgressModal.tsx +11 -11
- package/src/react/DiagnosticsPanel.tsx +11 -11
- package/src/react/ExamplePicker.tsx +7 -7
- package/src/react/LintPane.tsx +5 -5
- package/src/react/OptionsPanel.tsx +10 -10
- package/src/react/PlaygroundShell.tsx +64 -74
- package/src/react/ResultViewer.tsx +4 -4
- package/src/react/SourceEditor.tsx +2 -3
|
@@ -9,8 +9,8 @@ interface ResultViewerProps {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
-
* Read-only Monaco pane used to render the compiled / transformed output
|
|
13
|
-
*
|
|
12
|
+
* Read-only Monaco pane used to render the compiled / transformed output with a
|
|
13
|
+
* copy button. Wraps `<Editor readOnly>` and adds the toast UI.
|
|
14
14
|
*/
|
|
15
15
|
export function ResultViewer({ language, value }: ResultViewerProps) {
|
|
16
16
|
const [copied, setCopied] = useState(false);
|
|
@@ -39,7 +39,7 @@ export function ResultViewer({ language, value }: ResultViewerProps) {
|
|
|
39
39
|
{value && (
|
|
40
40
|
<button
|
|
41
41
|
onClick={onCopy}
|
|
42
|
-
className="absolute top-2
|
|
42
|
+
className="absolute right-3 top-2 z-10 rounded-md border border-[#b9d5ee] bg-white/90 px-2 py-1 font-mono text-[10px] text-[#235a97] shadow-sm transition-colors hover:bg-[#eaf4ff]"
|
|
43
43
|
>
|
|
44
44
|
{copied ? "Copied ✓" : "Copy"}
|
|
45
45
|
</button>
|
|
@@ -47,7 +47,7 @@ export function ResultViewer({ language, value }: ResultViewerProps) {
|
|
|
47
47
|
<Editor
|
|
48
48
|
height="100%"
|
|
49
49
|
language={language}
|
|
50
|
-
theme="vs
|
|
50
|
+
theme="vs"
|
|
51
51
|
value={value}
|
|
52
52
|
path={`output.${
|
|
53
53
|
language === "typescript"
|
|
@@ -45,8 +45,7 @@ export function SourceEditor({
|
|
|
45
45
|
tsd.setCompilerOptions({
|
|
46
46
|
target: monaco.languages.typescript.ScriptTarget.ESNext,
|
|
47
47
|
module: monaco.languages.typescript.ModuleKind.ESNext,
|
|
48
|
-
moduleResolution:
|
|
49
|
-
monaco.languages.typescript.ModuleResolutionKind.NodeJs,
|
|
48
|
+
moduleResolution: monaco.languages.typescript.ModuleResolutionKind.NodeJs,
|
|
50
49
|
esModuleInterop: DEFAULT_PLAYGROUND_COMPILER_OPTIONS.esModuleInterop,
|
|
51
50
|
strict: DEFAULT_PLAYGROUND_COMPILER_OPTIONS.strict,
|
|
52
51
|
experimentalDecorators:
|
|
@@ -73,7 +72,7 @@ export function SourceEditor({
|
|
|
73
72
|
<Editor
|
|
74
73
|
height="100%"
|
|
75
74
|
defaultLanguage="typescript"
|
|
76
|
-
theme="vs
|
|
75
|
+
theme="vs"
|
|
77
76
|
value={value}
|
|
78
77
|
onChange={(v) => onChange(v ?? "")}
|
|
79
78
|
onMount={handleMount}
|