@typespec/playground 0.1.0-alpha.4-dev.16 → 0.1.0-alpha.4-dev.18
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/dist/index.css +225 -0
- package/dist/index.js +1 -1
- package/dist/react/index.js +188 -138
- package/dist/react/index.js.map +1 -1
- package/dist/react/viewers/index.js +19 -0
- package/dist/react/viewers/index.js.map +1 -0
- package/dist/src/browser-host.d.ts +1 -1
- package/dist/src/browser-host.d.ts.map +1 -1
- package/dist/src/editor-command-bar/editor-command-bar.d.ts.map +1 -0
- package/dist/src/react/context/index.d.ts +2 -0
- package/dist/src/react/context/index.d.ts.map +1 -0
- package/dist/src/react/context/playground-context.d.ts +8 -0
- package/dist/src/react/context/playground-context.d.ts.map +1 -0
- package/dist/src/react/default-footer.d.ts +3 -0
- package/dist/src/react/default-footer.d.ts.map +1 -0
- package/dist/src/react/diagnostic-list/diagnostic-list.d.ts +8 -0
- package/dist/src/react/diagnostic-list/diagnostic-list.d.ts.map +1 -0
- package/dist/src/react/{file-output.d.ts → file-output/file-output.d.ts} +1 -1
- package/dist/src/react/file-output/file-output.d.ts.map +1 -0
- package/dist/src/react/footer/footer-item.d.ts +8 -0
- package/dist/src/react/footer/footer-item.d.ts.map +1 -0
- package/dist/src/react/footer/footer-version-item.d.ts +20 -0
- package/dist/src/react/footer/footer-version-item.d.ts.map +1 -0
- package/dist/src/react/footer/footer.d.ts +7 -0
- package/dist/src/react/footer/footer.d.ts.map +1 -0
- package/dist/src/react/footer/index.d.ts +4 -0
- package/dist/src/react/footer/index.d.ts.map +1 -0
- package/dist/src/react/index.d.ts +3 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/react/{output-tabs.d.ts → output-tabs/output-tabs.d.ts} +2 -8
- package/dist/src/react/output-tabs/output-tabs.d.ts.map +1 -0
- package/dist/src/react/{output-view.d.ts → output-view/output-view.d.ts} +2 -2
- package/dist/src/react/output-view/output-view.d.ts.map +1 -0
- package/dist/src/react/playground.d.ts +6 -2
- package/dist/src/react/playground.d.ts.map +1 -1
- package/dist/src/react/problem-pane/header.d.ts +9 -0
- package/dist/src/react/problem-pane/header.d.ts.map +1 -0
- package/dist/src/react/problem-pane/index.d.ts +2 -0
- package/dist/src/react/problem-pane/index.d.ts.map +1 -0
- package/dist/src/react/problem-pane/problem-pane.d.ts +11 -0
- package/dist/src/react/problem-pane/problem-pane.d.ts.map +1 -0
- package/dist/src/react/settings/compiler-settings-dialog-button.d.ts +8 -0
- package/dist/src/react/settings/compiler-settings-dialog-button.d.ts.map +1 -0
- package/dist/src/react/settings/compiler-settings.d.ts +6 -6
- package/dist/src/react/settings/compiler-settings.d.ts.map +1 -1
- package/dist/src/react/settings/emitter-options-form.d.ts +3 -3
- package/dist/src/react/settings/emitter-options-form.d.ts.map +1 -1
- package/dist/src/react/split-pane/pane.d.ts +1 -1
- package/dist/src/react/split-pane/pane.d.ts.map +1 -1
- package/dist/src/react/split-pane/sash.d.ts +1 -1
- package/dist/src/react/split-pane/sash.d.ts.map +1 -1
- package/dist/src/react/split-pane/split-pane.d.ts +2 -2
- package/dist/src/react/split-pane/split-pane.d.ts.map +1 -1
- package/dist/src/react/standalone.d.ts +3 -3
- package/dist/src/react/standalone.d.ts.map +1 -1
- package/dist/src/react/{viewers.d.ts → viewers/index.d.ts} +2 -2
- package/dist/src/react/viewers/index.d.ts.map +1 -0
- package/dist/src/react/{swagger-ui.d.ts → viewers/swagger-ui.d.ts} +1 -1
- package/dist/src/react/viewers/swagger-ui.d.ts.map +1 -0
- package/dist/src/services.d.ts +2 -2
- package/dist/src/services.d.ts.map +1 -1
- package/dist/src/state-storage.d.ts.map +1 -1
- package/dist/src/types.d.ts +2 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/vite/index.d.ts.map +1 -1
- package/dist/src/vite/types.d.ts +6 -7
- package/dist/src/vite/types.d.ts.map +1 -1
- package/dist/{state-storage-1ccb8536.js → state-storage-5b3bbcd1.js} +14 -6
- package/dist/state-storage-5b3bbcd1.js.map +1 -0
- package/dist/vite/index.js +1 -6
- package/dist/vite/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/react/viewers.js +0 -29
- package/dist/react/viewers.js.map +0 -1
- package/dist/src/react/diagnostic-list.d.ts +0 -11
- package/dist/src/react/diagnostic-list.d.ts.map +0 -1
- package/dist/src/react/editor-command-bar.d.ts.map +0 -1
- package/dist/src/react/error-tab.d.ts +0 -12
- package/dist/src/react/error-tab.d.ts.map +0 -1
- package/dist/src/react/file-output.d.ts.map +0 -1
- package/dist/src/react/footer.d.ts +0 -7
- package/dist/src/react/footer.d.ts.map +0 -1
- package/dist/src/react/output-tabs.d.ts.map +0 -1
- package/dist/src/react/output-view.d.ts.map +0 -1
- package/dist/src/react/swagger-ui.d.ts.map +0 -1
- package/dist/src/react/viewers.d.ts.map +0 -1
- package/dist/state-storage-1ccb8536.js.map +0 -1
- /package/dist/src/{react → editor-command-bar}/editor-command-bar.d.ts +0 -0
package/dist/react/index.js
CHANGED
|
@@ -1,18 +1,62 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createContext, useContext, memo, useCallback, useMemo, useRef, useEffect, useState, useId as useId$1 } from 'react';
|
|
2
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeClasses, Popover, PopoverTrigger, PopoverSurface, Title3, Table, TableHeader, TableRow, TableHeaderCell, TableBody, TableCell, Select, useId, Label, RadioGroup, Radio, Input, Switch, Checkbox, Divider, Dialog, DialogTrigger, ToolbarButton, DialogSurface, DialogBody, DialogTitle, DialogContent, Link, Toolbar, Tooltip, TabList, Tab, tokens, useToastController, Toast, ToastTitle, ToastBody, Toaster, FluentProvider, webLightTheme } from '@fluentui/react-components';
|
|
2
4
|
import debounce from 'debounce';
|
|
3
5
|
import { editor, Uri, MarkerSeverity, KeyMod, KeyCode } from 'monaco-editor';
|
|
4
|
-
import { useCallback, useMemo, useRef, useEffect, useState, useId as useId$1 } from 'react';
|
|
5
6
|
import { CompletionItemTag } from 'vscode-languageserver';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { Save16Regular, Broom16Filled, Settings24Regular, Bug16Regular } from '@fluentui/react-icons';
|
|
9
|
-
import { css } from '@emotion/react';
|
|
7
|
+
import { Settings24Regular, Save16Regular, Broom16Filled, Bug16Regular, ErrorCircle16Filled, Warning16Filled, ChevronDown16Regular } from '@fluentui/react-icons';
|
|
8
|
+
import { g as getMonacoRange, c as createBrowserHost, r as registerMonacoLanguage, a as createUrlStateStorage } from '../state-storage-5b3bbcd1.js';
|
|
10
9
|
import { ColorProvider, TypeSpecProgramViewer } from '@typespec/html-program-viewer';
|
|
10
|
+
import { getSourceLocation } from '@typespec/compiler';
|
|
11
11
|
import { createRoot } from 'react-dom/client';
|
|
12
|
-
import '@typespec/compiler';
|
|
13
12
|
import 'vscode-languageserver-textdocument';
|
|
14
13
|
import 'lzutf8';
|
|
15
14
|
|
|
15
|
+
const PlaygroundContext = createContext(undefined);
|
|
16
|
+
const PlaygroundContextProvider = PlaygroundContext.Provider;
|
|
17
|
+
function usePlaygroundContext() {
|
|
18
|
+
const context = useContext(PlaygroundContext);
|
|
19
|
+
if (context === undefined) {
|
|
20
|
+
throw new Error("usePlaygroundContext must be used within a PlaygroundContextProvider");
|
|
21
|
+
}
|
|
22
|
+
return context;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var style$b = {"footer":"footer-module_footer__QqUEE","footer-item":"footer-module_footer-item__7rhbZ"};
|
|
26
|
+
|
|
27
|
+
const FooterItem = ({ children, link, className }) => {
|
|
28
|
+
const resolvedClassName = mergeClasses(style$b["footer-item"], className);
|
|
29
|
+
return link ? (jsx("a", { className: resolvedClassName, href: link, target: "_blank", children: children })) : (jsx("div", { className: resolvedClassName, children: children }));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var style$a = {"version-item":"footer-version-item-module_version-item__pjuvV","button":"footer-version-item-module_button__70iqf"};
|
|
33
|
+
|
|
34
|
+
const FooterVersionItem = memo(({ versionSelector }) => {
|
|
35
|
+
var _a;
|
|
36
|
+
const { host } = usePlaygroundContext();
|
|
37
|
+
const latest = versionSelector === null || versionSelector === void 0 ? void 0 : versionSelector.latest;
|
|
38
|
+
const selected = (_a = versionSelector === null || versionSelector === void 0 ? void 0 : versionSelector.selected) !== null && _a !== void 0 ? _a : host.compiler.MANIFEST.version;
|
|
39
|
+
return (jsx(FooterItem, { className: style$a["version-item"], children: jsxs(Popover, { children: [jsx(PopoverTrigger, { disableButtonEnhancement: true, children: jsxs("div", { className: style$a["button"], children: [jsx("span", { children: "Version " }), jsx("span", { children: selected }), jsx("span", { children: latest ? (latest === selected ? " (latest)" : " (old)") : "" })] }) }), jsx(PopoverSurface, { children: jsx(VersionsPopup, { versionSelector: versionSelector }) })] }) }));
|
|
40
|
+
});
|
|
41
|
+
const VersionsPopup = memo(({ versionSelector }) => {
|
|
42
|
+
const { host } = usePlaygroundContext();
|
|
43
|
+
return (jsxs("div", { style: { maxWidth: "400px" }, children: [versionSelector && jsx(VersionSelector, { ...versionSelector }), jsxs("div", { children: [jsx(Title3, { children: "Loaded libraries" }), jsxs(Table, { size: "small", children: [jsx(TableHeader, { children: jsx(TableRow, { children: columns.map((column) => (jsx(TableHeaderCell, { children: column.label }, column.columnKey))) }) }), jsx(TableBody, { children: Object.values(host.libraries).map((item) => (jsxs(TableRow, { children: [jsx(TableCell, { children: item.name }), jsx(TableCell, { children: item.packageJson.version })] }, item.name))) })] })] })] }));
|
|
44
|
+
});
|
|
45
|
+
const columns = [
|
|
46
|
+
{ columnKey: "name", label: "Library" },
|
|
47
|
+
{ columnKey: "version", label: "Version" },
|
|
48
|
+
];
|
|
49
|
+
const VersionSelector = memo(({ versions, selected, latest, onChange }) => {
|
|
50
|
+
const changeVersion = useCallback((ev, data) => {
|
|
51
|
+
onChange(versions.find((x) => x.name === data.value));
|
|
52
|
+
}, [versions, onChange]);
|
|
53
|
+
return (jsxs("div", { children: [jsx(Title3, { children: "Select release" }), jsx(Select, { value: selected, onChange: changeVersion, children: versions.map((version) => (jsxs("option", { value: version.name, children: [version.label, " ", version.name === latest ? "(latest)" : ""] }, version.name))) })] }));
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const Footer = ({ className, children }) => {
|
|
57
|
+
return jsx("div", { className: mergeClasses(style$b.footer, className), children: children });
|
|
58
|
+
};
|
|
59
|
+
|
|
16
60
|
const EmitterDropdown = ({ emitters, onSelectedEmitterChange, selectedEmitter, }) => {
|
|
17
61
|
const options = emitters.map((emitterName) => {
|
|
18
62
|
return jsx("option", { children: emitterName }, emitterName);
|
|
@@ -35,6 +79,8 @@ const SamplesDropdown = ({ samples, selectedSampleName, onSelectedSampleNameChan
|
|
|
35
79
|
return (jsxs(Select, { className: "sample-dropdown", onChange: handleSelected, value: selectedSampleName !== null && selectedSampleName !== void 0 ? selectedSampleName : "", children: [jsx("option", { value: "", disabled: true, children: "Select sample..." }), options] }));
|
|
36
80
|
};
|
|
37
81
|
|
|
82
|
+
var style$9 = {"form":"emitter-options-form-module_form__dm2RP","item":"emitter-options-form-module_item__WocHP","switch":"emitter-options-form-module_switch__d4EQs"};
|
|
83
|
+
|
|
38
84
|
const EmitterOptionsForm = ({ library, options, optionsChanged, }) => {
|
|
39
85
|
var _a, _b, _c;
|
|
40
86
|
const emitterOptionsSchema = (_c = (_b = (_a = library.definition) === null || _a === void 0 ? void 0 : _a.emitter) === null || _b === void 0 ? void 0 : _b.options) === null || _c === void 0 ? void 0 : _c.properties;
|
|
@@ -51,9 +97,9 @@ const EmitterOptionsForm = ({ library, options, optionsChanged, }) => {
|
|
|
51
97
|
},
|
|
52
98
|
});
|
|
53
99
|
}, [options, optionsChanged]);
|
|
54
|
-
return (jsx("div", { children: entries.map(([key, value]) => {
|
|
100
|
+
return (jsx("div", { className: style$9["form"], children: entries.map(([key, value]) => {
|
|
55
101
|
var _a;
|
|
56
|
-
return (jsx("div", {
|
|
102
|
+
return (jsx("div", { className: style$9["form-item"], children: jsx(JsonSchemaPropertyInput, { emitterOptions: (_a = options[library.name]) !== null && _a !== void 0 ? _a : {}, name: key, prop: value, onChange: handleChange }) }, key));
|
|
57
103
|
}) }));
|
|
58
104
|
};
|
|
59
105
|
const JsonSchemaPropertyInput = ({ emitterOptions, name, prop, onChange, }) => {
|
|
@@ -64,10 +110,10 @@ const JsonSchemaPropertyInput = ({ emitterOptions, name, prop, onChange, }) => {
|
|
|
64
110
|
const handleChange = useCallback((_, data) => onChange({ name, value: "value" in data ? data.value : data.checked }), [onChange]);
|
|
65
111
|
switch (prop.type) {
|
|
66
112
|
case "boolean":
|
|
67
|
-
return jsx(Switch, { label: prettyName, checked: value, onChange: handleChange });
|
|
113
|
+
return (jsx(Switch, { className: style$9["switch"], label: prettyName, labelPosition: "above", checked: value, onChange: handleChange }));
|
|
68
114
|
case "string":
|
|
69
115
|
default:
|
|
70
|
-
return (jsxs("div", {
|
|
116
|
+
return (jsxs("div", { className: style$9["item"], children: [jsx(Label, { htmlFor: inputId, title: name, children: prettyName }), prop.enum ? (jsx(RadioGroup, { layout: "horizontal", id: inputId, value: value, onChange: handleChange, children: prop.enum.map((x) => (jsx(Radio, { value: x, label: x }, x))) })) : (jsx(Input, { id: inputId, value: value, onChange: handleChange }))] }));
|
|
71
117
|
}
|
|
72
118
|
};
|
|
73
119
|
|
|
@@ -117,19 +163,30 @@ const CompilerSettings = ({ selectedEmitter, host, options, onOptionsChanged, })
|
|
|
117
163
|
linterRuleSet,
|
|
118
164
|
});
|
|
119
165
|
}, [options]);
|
|
120
|
-
return (jsxs("div", {
|
|
166
|
+
return (jsxs("div", { children: [jsxs(Fragment, { children: ["Emitter: ", selectedEmitter] }), jsx(Divider, { style: { marginTop: 20 } }), jsx("h3", { children: "Options" }), library && (jsx(EmitterOptionsForm, { library: library, options: (_b = options.options) !== null && _b !== void 0 ? _b : {}, optionsChanged: emitterOptionsChanged })), jsx(Divider, { style: { marginTop: 20 } }), jsx("h3", { children: "Linter" }), jsx(LinterForm, { libraries: host.libraries, linterRuleSet: linterRuleSet, onLinterRuleSetChanged: linterRuleSetChanged })] }));
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
const CompilerSettingsDialogButton = ({ selectedEmitter, compilerOptions, onCompilerOptionsChange, }) => {
|
|
170
|
+
const { host } = usePlaygroundContext();
|
|
171
|
+
return (jsxs(Dialog, { children: [jsx(DialogTrigger, { children: jsx(ToolbarButton, { icon: jsx(Settings24Regular, {}) }) }), jsx(DialogSurface, { children: jsxs(DialogBody, { children: [jsx(DialogTitle, { children: "Settings" }), jsx(DialogContent, { children: jsx(CompilerSettings, { host: host, selectedEmitter: selectedEmitter, options: compilerOptions, onOptionsChanged: onCompilerOptionsChange }) })] }) })] }));
|
|
121
172
|
};
|
|
122
173
|
|
|
123
|
-
|
|
174
|
+
var style$8 = {"bar":"editor-command-bar-module_bar__5q4D5","divider":"editor-command-bar-module_divider__iDahk","spacer":"editor-command-bar-module_spacer__hlHE9"};
|
|
175
|
+
|
|
176
|
+
const EditorCommandBar = ({ documentationUrl, saveCode, formatCode, newIssue, host, selectedEmitter, onSelectedEmitterChange, compilerOptions, onCompilerOptionsChange, samples, selectedSampleName, onSelectedSampleNameChange, }) => {
|
|
124
177
|
const documentation = documentationUrl ? (jsx("label", { children: jsx(Link, { href: documentationUrl, target: "_blank", children: "Docs" }) })) : undefined;
|
|
125
178
|
const bugButton = newIssue ? jsx(FileBugButton, { onClick: newIssue }) : undefined;
|
|
126
179
|
const emitters = useMemo(() => Object.values(host.libraries)
|
|
127
180
|
.filter((x) => x.isEmitter)
|
|
128
181
|
.map((x) => x.name), [host.libraries]);
|
|
129
|
-
return (jsx("div", {
|
|
182
|
+
return (jsx("div", { className: style$8["bar"], children: jsxs(Toolbar, { children: [jsx(Tooltip, { content: "Save", relationship: "description", withArrow: true, children: jsx(ToolbarButton, { "aria-label": "Save", icon: jsx(Save16Regular, {}), onClick: saveCode }) }), jsx(Tooltip, { content: "Format", relationship: "description", withArrow: true, children: jsx(ToolbarButton, { "aria-label": "Format", icon: jsx(Broom16Filled, {}), onClick: formatCode }) }), samples && (jsxs(Fragment, { children: [jsx(SamplesDropdown, { samples: samples, selectedSampleName: selectedSampleName, onSelectedSampleNameChange: onSelectedSampleNameChange }), jsx("div", { className: style$8["spacer"] })] })), jsx(EmitterDropdown, { emitters: emitters, onSelectedEmitterChange: onSelectedEmitterChange, selectedEmitter: selectedEmitter }), documentation && (jsxs(Fragment, { children: [jsx("div", { className: style$8["spacer"] }), documentation] })), jsx("div", { className: style$8["divider"] }), bugButton, jsx(CompilerSettingsDialogButton, { compilerOptions: compilerOptions, onCompilerOptionsChange: onCompilerOptionsChange, selectedEmitter: selectedEmitter })] }) }));
|
|
130
183
|
};
|
|
131
184
|
const FileBugButton = ({ onClick }) => {
|
|
132
|
-
return (jsx(Tooltip, { content: "File Bug Report", relationship: "description", withArrow: true, children: jsx(ToolbarButton, { appearance: "subtle", "aria-label": "File Bug Report", icon: jsx(Bug16Regular, {}), onClick: onClick
|
|
185
|
+
return (jsx(Tooltip, { content: "File Bug Report", relationship: "description", withArrow: true, children: jsx(ToolbarButton, { appearance: "subtle", "aria-label": "File Bug Report", icon: jsx(Bug16Regular, {}), onClick: onClick }) }));
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
const DefaultFooter = () => {
|
|
189
|
+
return (jsx(Footer, { children: jsx(FooterVersionItem, {}) }));
|
|
133
190
|
};
|
|
134
191
|
|
|
135
192
|
const Editor = ({ model, options, actions, onMount }) => {
|
|
@@ -161,7 +218,7 @@ const Editor = ({ model, options, actions, onMount }) => {
|
|
|
161
218
|
editorRef.current.setModel(model);
|
|
162
219
|
}
|
|
163
220
|
}, [model]);
|
|
164
|
-
return (jsx("div", { className: "monaco-editor-container",
|
|
221
|
+
return (jsx("div", { className: "monaco-editor-container", style: { width: "100%", height: "100%", overflow: "hidden" }, ref: editorContainerRef }));
|
|
165
222
|
};
|
|
166
223
|
function useMonacoModel(uri, language) {
|
|
167
224
|
return useMemo(() => {
|
|
@@ -171,33 +228,6 @@ function useMonacoModel(uri, language) {
|
|
|
171
228
|
}, [uri, language]);
|
|
172
229
|
}
|
|
173
230
|
|
|
174
|
-
const Footer = ({ host }) => {
|
|
175
|
-
const { MANIFEST } = host.compiler;
|
|
176
|
-
const prItem = MANIFEST.pr ? (jsxs(FooterItem, { link: `https://github.com/microsoft/typespec/pull/${MANIFEST.pr}`, children: [jsx("span", { children: "PR " }), jsx("span", { children: MANIFEST.pr })] })) : (jsx(Fragment, {}));
|
|
177
|
-
return (jsxs("div", { css: [
|
|
178
|
-
{
|
|
179
|
-
gridArea: "footer",
|
|
180
|
-
gridRow: "3",
|
|
181
|
-
backgroundColor: "#007acc",
|
|
182
|
-
display: "flex",
|
|
183
|
-
fontSize: "14px",
|
|
184
|
-
},
|
|
185
|
-
MANIFEST.pr ? { backgroundColor: "#ce662a" } : {},
|
|
186
|
-
], children: [prItem, jsxs(FooterItem, { children: [jsx("span", { children: "TypeSpec Version " }), jsx("span", { children: MANIFEST.version })] }), jsxs(FooterItem, { link: `https://github.com/microsoft/typespec/commit/${MANIFEST.commit}`, children: [jsx("span", { children: "Commit " }), jsx("span", { children: MANIFEST.commit.slice(0, 6) })] })] }));
|
|
187
|
-
};
|
|
188
|
-
const FooterItem = ({ children, link }) => {
|
|
189
|
-
return link ? (jsx("a", { css: FooterItemStyles, href: link, target: "_blank", children: children })) : (jsx("div", { css: FooterItemStyles, children: children }));
|
|
190
|
-
};
|
|
191
|
-
const FooterItemStyles = css({
|
|
192
|
-
textDecoration: "none",
|
|
193
|
-
color: "#fefefe",
|
|
194
|
-
borderRight: "1px solid #d5d5d5",
|
|
195
|
-
padding: "0 5px",
|
|
196
|
-
"&:hover": {
|
|
197
|
-
backgroundColor: "#063a5c",
|
|
198
|
-
},
|
|
199
|
-
});
|
|
200
|
-
|
|
201
231
|
/**
|
|
202
232
|
* Hook to manage a value that could be either controlled or uncontrolled, such as a checked state or
|
|
203
233
|
* text box string.
|
|
@@ -247,36 +277,7 @@ function useAsyncMemo(callback, defaultValue, deps) {
|
|
|
247
277
|
return value;
|
|
248
278
|
}
|
|
249
279
|
|
|
250
|
-
|
|
251
|
-
if (diagnostics.length === 0) {
|
|
252
|
-
return jsx("div", { className: "center", children: "No errors" });
|
|
253
|
-
}
|
|
254
|
-
return (jsx("div", { css: { height: "100%", overflow: "auto" }, children: diagnostics.map((x, i) => {
|
|
255
|
-
return jsx(DiagnosticItem, { diagnostic: x }, i);
|
|
256
|
-
}) }));
|
|
257
|
-
};
|
|
258
|
-
const DiagnosticItem = ({ diagnostic }) => {
|
|
259
|
-
return (jsxs("div", { css: { display: "flex" }, children: [jsx("div", { css: [{ padding: "0 5px" }, diagnostic.severity === "error" ? errorColor : warningColor], children: diagnostic.severity }), jsx("div", { css: { padding: "0 5px", color: tokens.colorNeutralForeground2 }, children: diagnostic.code }), jsx("div", { css: { padding: "0 5px" }, children: diagnostic.message })] }));
|
|
260
|
-
};
|
|
261
|
-
const errorColor = css({ color: tokens.colorStatusDangerForeground1 });
|
|
262
|
-
const warningColor = css({ color: tokens.colorStatusWarningForeground1 });
|
|
263
|
-
|
|
264
|
-
const ErrorTab = ({ internalCompilerError, diagnostics, }) => {
|
|
265
|
-
return (jsxs(Fragment, { children: [internalCompilerError && jsx(InternalCompilerError, { error: internalCompilerError }), diagnostics && jsx(DiagnosticList, { diagnostics: diagnostics })] }));
|
|
266
|
-
};
|
|
267
|
-
const InternalCompilerError = ({ error }) => {
|
|
268
|
-
return (jsx("div", { css: { CenterStyles }, children: jsxs("div", { css: {
|
|
269
|
-
border: `1px solid ${tokens.colorStatusDangerBorder1}`,
|
|
270
|
-
padding: "10px",
|
|
271
|
-
margin: "20px",
|
|
272
|
-
}, children: [jsx("h3", { children: "Internal Compiler error" }), jsx("div", { children: "File issue at https://github.com/microsoft/typespec" }), jsx("hr", {}), jsx("div", { children: error.stack })] }) }));
|
|
273
|
-
};
|
|
274
|
-
const CenterStyles = css({
|
|
275
|
-
display: "flex",
|
|
276
|
-
height: "100%",
|
|
277
|
-
alignItems: "center",
|
|
278
|
-
justifyContent: "center",
|
|
279
|
-
});
|
|
280
|
+
var style$7 = {"file-output":"file-output-module_file-output__YBaE7","viewer-selector":"file-output-module_viewer-selector__fNWoo"};
|
|
280
281
|
|
|
281
282
|
/**
|
|
282
283
|
* Display a file output using different viewers.
|
|
@@ -296,36 +297,24 @@ const FileOutput = ({ filename, content, viewers }) => {
|
|
|
296
297
|
var _a;
|
|
297
298
|
return (_a = viewers.find((x) => x.key === selected)) === null || _a === void 0 ? void 0 : _a.render;
|
|
298
299
|
}, [selected, viewers]);
|
|
299
|
-
return (jsxs("div", {
|
|
300
|
+
return (jsxs("div", { className: style$7["file-output"], children: [jsx("div", { className: style$7["viewer-selector"], children: jsx(Select, { value: selected, onChange: handleSelected, children: viewers.map(({ key, label }) => (jsx("option", { value: key, children: label }, key))) }) }), selectedRender && selectedRender({ filename, content })] }));
|
|
300
301
|
};
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
position: "absolute",
|
|
304
|
-
"z-index": 1,
|
|
305
|
-
right: 0,
|
|
306
|
-
});
|
|
302
|
+
|
|
303
|
+
var style$6 = {"tabs":"output-tabs-module_tabs__MFCRl","tab-divider":"output-tabs-module_tab-divider__9Fv--","tab":"output-tabs-module_tab__FJ78k","tab--selected":"output-tabs-module_tab--selected__GjCZY"};
|
|
307
304
|
|
|
308
305
|
const OutputTabs = ({ tabs, selected, onSelect }) => {
|
|
309
306
|
const [leftTabs, rightTabs] = chunk(tabs, (x) => x.align === "left");
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
307
|
+
const onTabSelect = useCallback((event, data) => {
|
|
308
|
+
onSelect(data.value);
|
|
309
|
+
}, [onSelect]);
|
|
310
|
+
return (jsxs(TabList, { selectedValue: selected, onTabSelect: onTabSelect, className: style$6["tabs"], children: [leftTabs.map((tab) => {
|
|
311
|
+
return (jsx(OutputTabEl, { value: tab.id, className: tab.id === selected && style$6["tab--selected"], children: tab.name }, tab.id));
|
|
312
|
+
}), jsx("div", { className: style$6["tab-divider"] }), rightTabs.map((tab) => {
|
|
313
|
+
return (jsx(OutputTabEl, { value: tab.id, className: tab.id === selected && style$6["tab--selected"], children: tab.name }, tab.id));
|
|
314
314
|
})] }));
|
|
315
315
|
};
|
|
316
|
-
const
|
|
317
|
-
return
|
|
318
|
-
{
|
|
319
|
-
height: "26px",
|
|
320
|
-
padding: "0 5px",
|
|
321
|
-
borderRight: `1px solid ${tokens.colorNeutralStroke1}`,
|
|
322
|
-
borderTop: "none",
|
|
323
|
-
borderBottom: "none",
|
|
324
|
-
textDecoration: "none",
|
|
325
|
-
cursor: "pointer",
|
|
326
|
-
},
|
|
327
|
-
selected ? { fontWeight: "bold", backgroundColor: tokens.colorNeutralBackground5 } : {},
|
|
328
|
-
], onClick: () => onSelect(tab.id), children: tab.name }));
|
|
316
|
+
const OutputTabEl = (props) => {
|
|
317
|
+
return jsx(Tab, { ...props, className: mergeClasses(style$6["tab"], props.className) });
|
|
329
318
|
};
|
|
330
319
|
function chunk(items, condition) {
|
|
331
320
|
const match = [];
|
|
@@ -370,12 +359,14 @@ const OutputEditor = ({ filename, value, editorOptions }) => {
|
|
|
370
359
|
return jsx(Editor, { model: model, options: options });
|
|
371
360
|
};
|
|
372
361
|
|
|
362
|
+
var style$5 = {"output-view":"output-view-module_output-view__uT5Ae","output-content":"output-view-module_output-content__Lis-G","type-graph-viewer":"output-view-module_type-graph-viewer__tUDEV"};
|
|
363
|
+
|
|
373
364
|
const OutputView = ({ compilationState, viewers, editorOptions, }) => {
|
|
374
365
|
if (compilationState === undefined) {
|
|
375
366
|
return jsx(Fragment, {});
|
|
376
367
|
}
|
|
377
368
|
if ("internalCompilerError" in compilationState) {
|
|
378
|
-
return jsx(
|
|
369
|
+
return jsx(Fragment, {});
|
|
379
370
|
}
|
|
380
371
|
return (jsx(OutputViewInternal, { compilationResult: compilationState, viewers: viewers, editorOptions: editorOptions }));
|
|
381
372
|
};
|
|
@@ -410,25 +401,17 @@ const OutputViewInternal = ({ compilationResult, viewers, editorOptions }) => {
|
|
|
410
401
|
id: x,
|
|
411
402
|
})),
|
|
412
403
|
{ id: "type-graph", name: "Type Graph", align: "right" },
|
|
413
|
-
{
|
|
414
|
-
id: "errors",
|
|
415
|
-
name: jsx(ErrorTabLabel, { diagnostics: diagnostics }),
|
|
416
|
-
align: "right",
|
|
417
|
-
},
|
|
418
404
|
];
|
|
419
405
|
}, [outputFiles, diagnostics]);
|
|
420
406
|
const handleTabSelection = useCallback((tabId) => {
|
|
421
407
|
if (tabId === "type-graph") {
|
|
422
408
|
setViewSelection({ type: "type-graph" });
|
|
423
409
|
}
|
|
424
|
-
else if (tabId === "errors") {
|
|
425
|
-
setViewSelection({ type: "errors" });
|
|
426
|
-
}
|
|
427
410
|
else {
|
|
428
411
|
void loadOutputFile(tabId);
|
|
429
412
|
}
|
|
430
413
|
}, []);
|
|
431
|
-
return (jsxs(
|
|
414
|
+
return (jsxs("div", { className: style$5["output-view"], children: [jsx(OutputTabs, { tabs: tabs, selected: viewSelection.type === "file" ? viewSelection.filename : viewSelection.type, onSelect: handleTabSelection }), jsx("div", { className: style$5["output-content"], children: jsx(OutputContent, { viewSelection: viewSelection, editorOptions: editorOptions, program: program, viewers: viewers }) })] }));
|
|
432
415
|
};
|
|
433
416
|
function getRawFileViewer(editorOptions) {
|
|
434
417
|
return {
|
|
@@ -442,27 +425,12 @@ const OutputContent = ({ viewSelection, program, viewers, editorOptions, }) => {
|
|
|
442
425
|
switch (viewSelection.type) {
|
|
443
426
|
case "file":
|
|
444
427
|
return (jsx(FileOutput, { filename: viewSelection.filename, content: viewSelection.content, viewers: resolvedViewers }));
|
|
445
|
-
case "errors":
|
|
446
|
-
return jsx(ErrorTab, { diagnostics: program === null || program === void 0 ? void 0 : program.diagnostics });
|
|
447
428
|
default:
|
|
448
|
-
return
|
|
449
|
-
height: "100%",
|
|
450
|
-
overflow: "scroll",
|
|
451
|
-
}, children: program && jsx(TypeGraphViewer, { program: program }) }));
|
|
429
|
+
return program && jsx(TypeGraphViewer, { program: program });
|
|
452
430
|
}
|
|
453
431
|
};
|
|
454
|
-
const ErrorTabLabel = ({ diagnostics }) => {
|
|
455
|
-
const errorCount = diagnostics ? diagnostics.length : 0;
|
|
456
|
-
return (jsxs("div", { children: ["Errors ", errorCount > 0 ? jsx("span", { css: ErrorTabCountStyles, children: errorCount }) : ""] }));
|
|
457
|
-
};
|
|
458
|
-
const ErrorTabCountStyles = css({
|
|
459
|
-
backgroundColor: tokens.colorStatusDangerBackground3,
|
|
460
|
-
color: tokens.colorNeutralForegroundOnBrand,
|
|
461
|
-
padding: "0 5px",
|
|
462
|
-
borderRadius: "20px",
|
|
463
|
-
});
|
|
464
432
|
const TypeGraphViewer = ({ program }) => {
|
|
465
|
-
return (jsx(ColorProvider, { colors: TypeGraphColors, children: jsx(TypeSpecProgramViewer, { program: program }) }));
|
|
433
|
+
return (jsx("div", { className: style$5["type-graph-viewer"], children: jsx(ColorProvider, { colors: TypeGraphColors, children: jsx(TypeSpecProgramViewer, { program: program }) }) }));
|
|
466
434
|
};
|
|
467
435
|
const TypeGraphColors = {
|
|
468
436
|
background: tokens.colorNeutralBackground1,
|
|
@@ -475,6 +443,76 @@ const TypeGraphColors = {
|
|
|
475
443
|
property: tokens.colorPaletteMarigoldForeground2,
|
|
476
444
|
};
|
|
477
445
|
|
|
446
|
+
var style$4 = {"layout":"playground-module_layout__SCPgt"};
|
|
447
|
+
|
|
448
|
+
var style$3 = {"list":"diagnostic-list-module_list__6tVpz","item":"diagnostic-list-module_item__BE8Fr","item--error":"diagnostic-list-module_item--error__tnhWA","item--warning":"diagnostic-list-module_item--warning__J7vIN","item-code":"diagnostic-list-module_item-code__AgVjZ","item-loc":"diagnostic-list-module_item-loc__IeYnW"};
|
|
449
|
+
|
|
450
|
+
const DiagnosticList = ({ diagnostics, onDiagnosticSelected, }) => {
|
|
451
|
+
if (diagnostics.length === 0) {
|
|
452
|
+
return jsx("div", { className: style$3["list"], children: "No errors" });
|
|
453
|
+
}
|
|
454
|
+
const handleItemSelected = useCallback((diagnostic) => {
|
|
455
|
+
onDiagnosticSelected === null || onDiagnosticSelected === void 0 ? void 0 : onDiagnosticSelected(diagnostic);
|
|
456
|
+
}, [onDiagnosticSelected]);
|
|
457
|
+
return (jsx("div", { className: style$3["list"], children: diagnostics.map((x, i) => {
|
|
458
|
+
return jsx(DiagnosticItem, { diagnostic: x, onItemSelected: handleItemSelected }, i);
|
|
459
|
+
}) }));
|
|
460
|
+
};
|
|
461
|
+
const DiagnosticItem = ({ diagnostic, onItemSelected }) => {
|
|
462
|
+
const handleClick = useCallback(() => {
|
|
463
|
+
onItemSelected(diagnostic);
|
|
464
|
+
}, [diagnostic, onItemSelected]);
|
|
465
|
+
return (jsxs("div", { tabIndex: 0, className: style$3["item"], onClick: handleClick, children: [jsx("div", { className: mergeClasses((style$3["item-severity"],
|
|
466
|
+
style$3[diagnostic.severity === "error" ? "item--error" : "item--warning"])), children: diagnostic.severity }), jsx("div", { className: style$3["item-code"], children: diagnostic.code }), jsx("div", { className: style$3["item-message"], children: diagnostic.message }), jsx("div", { className: style$3["item-loc"], children: jsx(DiagnosticTargetLink, { target: diagnostic.target }) })] }));
|
|
467
|
+
};
|
|
468
|
+
const DiagnosticTargetLink = memo(({ target }) => {
|
|
469
|
+
if (typeof target === "symbol") {
|
|
470
|
+
return jsx("span", {});
|
|
471
|
+
}
|
|
472
|
+
const location = getSourceLocation(target);
|
|
473
|
+
const file = location.file.path === "/test/main.tsp" ? "" : `${location.file.path}:`;
|
|
474
|
+
const { line, character } = location.file.getLineAndCharacterOfPosition(location.pos);
|
|
475
|
+
return (jsxs("span", { children: [file, line + 1, ":", character + 1] }));
|
|
476
|
+
});
|
|
477
|
+
|
|
478
|
+
var style$2 = {"header":"header-module_header__LyUNg","header--error":"header-module_header--error__8MKzf","error-icon":"header-module_error-icon__gb-oB","header--warning":"header-module_header--warning__QPFEE","warning-icon":"header-module_warning-icon__u14P3","header-content":"header-module_header-content__Uc4HJ","header-chevron":"header-module_header-chevron__HXm6b","header-chevron--collapsed":"header-module_header-chevron--collapsed__wKyHV"};
|
|
479
|
+
|
|
480
|
+
const ProblemPaneHeader = memo(({ compilationState, ...props }) => {
|
|
481
|
+
const noProblem = (jsx(Container, { status: "none", ...props, children: "No problems" }));
|
|
482
|
+
if (compilationState === undefined) {
|
|
483
|
+
return noProblem;
|
|
484
|
+
}
|
|
485
|
+
if ("internalCompilerError" in compilationState) {
|
|
486
|
+
return (jsxs(Container, { status: "error", ...props, children: [jsx(ErrorCircle16Filled, {}), " Internal Compiler Error"] }));
|
|
487
|
+
}
|
|
488
|
+
const diagnostics = compilationState.program.diagnostics;
|
|
489
|
+
if (diagnostics.length === 0) {
|
|
490
|
+
return noProblem;
|
|
491
|
+
}
|
|
492
|
+
const errors = diagnostics.filter((x) => x.severity === "error");
|
|
493
|
+
const warnings = diagnostics.filter((x) => x.severity === "warning");
|
|
494
|
+
return (jsxs(Container, { status: errors.length > 0 ? "error" : "warning", ...props, children: [errors.length > 0 ? (jsxs(Fragment, { children: [jsx(ErrorCircle16Filled, { className: style$2["error-icon"] }), " ", errors.length, " errors"] })) : null, warnings.length > 0 ? (jsxs(Fragment, { children: [jsx(Warning16Filled, { className: style$2["warning-icon"] }), " ", warnings.length, " warnings"] })) : null] }));
|
|
495
|
+
});
|
|
496
|
+
const Container = ({ children, className, status, onClick, collaped }) => {
|
|
497
|
+
return (jsxs("div", { tabIndex: onClick === undefined ? undefined : 0, className: mergeClasses(style$2["header"], status === "error" && style$2["header--error"], status === "warning" && style$2["header--warning"], className), onClick: onClick, children: [jsx("div", { className: style$2["header-content"], children: children }), jsx(ChevronDown16Regular, { className: mergeClasses(style$2["header-chevron"], collaped && style$2["header-chevron--collapsed"]) })] }));
|
|
498
|
+
};
|
|
499
|
+
|
|
500
|
+
var style$1 = {"problem-pane":"problem-pane-module_problem-pane__GJKF4","problem-content":"problem-pane-module_problem-content__rYzbh","no-problems":"problem-pane-module_no-problems__Ub8R-","internal-compiler-error":"problem-pane-module_internal-compiler-error__laE4f"};
|
|
501
|
+
|
|
502
|
+
const ProblemPane = ({ collapsed, compilationState, onHeaderClick, onDiagnosticSelected, }) => {
|
|
503
|
+
return (jsxs("div", { className: style$1["problem-pane"], children: [jsx(ProblemPaneHeader, { compilationState: compilationState, onClick: onHeaderClick, collaped: collapsed }), jsx("div", { className: style$1["problem-content"], children: jsx(ProblemPaneContent, { compilationState: compilationState, onDiagnosticSelected: onDiagnosticSelected }) })] }));
|
|
504
|
+
};
|
|
505
|
+
const ProblemPaneContent = ({ compilationState, onDiagnosticSelected, }) => {
|
|
506
|
+
if (compilationState === undefined) {
|
|
507
|
+
return jsx(Fragment, {});
|
|
508
|
+
}
|
|
509
|
+
if ("internalCompilerError" in compilationState) {
|
|
510
|
+
return (jsx("pre", { className: style$1["internal-compiler-error"], children: compilationState.internalCompilerError.stack }));
|
|
511
|
+
}
|
|
512
|
+
const diagnostics = compilationState.program.diagnostics;
|
|
513
|
+
return diagnostics.length === 0 ? (jsx("div", { className: style$1["no-problems"], children: " No problems" })) : (jsx(DiagnosticList, { diagnostics: diagnostics, onDiagnosticSelected: onDiagnosticSelected }));
|
|
514
|
+
};
|
|
515
|
+
|
|
478
516
|
function Pane({ children, ...props }) {
|
|
479
517
|
return jsx("div", { ...props, children: children });
|
|
480
518
|
}
|
|
@@ -571,7 +609,9 @@ const SplitPane = ({ children, sizes: propSizes, initialSizes: defaultSizes, all
|
|
|
571
609
|
onDragStart(e);
|
|
572
610
|
}, [onDragStart, sizes, sashPosSizes]);
|
|
573
611
|
const resetPosition = useCallback(() => {
|
|
574
|
-
|
|
612
|
+
if (defaultSizes) {
|
|
613
|
+
updateSizes(defaultSizes);
|
|
614
|
+
}
|
|
575
615
|
}, [defaultSizes, updateSizes]);
|
|
576
616
|
const dragEnd = useCallback((e) => {
|
|
577
617
|
var _a, _b;
|
|
@@ -635,7 +675,7 @@ function assertsSize(size, sum, defaultValue = Infinity) {
|
|
|
635
675
|
}
|
|
636
676
|
|
|
637
677
|
const Playground = (props) => {
|
|
638
|
-
var _a, _b, _c, _d;
|
|
678
|
+
var _a, _b, _c, _d, _e;
|
|
639
679
|
const { host, onSave } = props;
|
|
640
680
|
const editorRef = useRef(undefined);
|
|
641
681
|
const [selectedEmitter, onSelectedEmitterChange] = useControllableValue(props.emitter, props.defaultEmitter, props.onEmitterChange);
|
|
@@ -656,7 +696,7 @@ const Playground = (props) => {
|
|
|
656
696
|
setCompilationState(state);
|
|
657
697
|
if ("program" in state) {
|
|
658
698
|
const markers = state.program.diagnostics.map((diag) => ({
|
|
659
|
-
...
|
|
699
|
+
...getMonacoRange(typespecCompiler, diag.target),
|
|
660
700
|
message: diag.message,
|
|
661
701
|
severity: diag.severity === "error" ? MarkerSeverity.Error : MarkerSeverity.Warning,
|
|
662
702
|
tags: diag.code === "deprecated" ? [CompletionItemTag.Deprecated] : undefined,
|
|
@@ -736,16 +776,26 @@ const Playground = (props) => {
|
|
|
736
776
|
const onTypeSpecEditorMount = useCallback(({ editor }) => {
|
|
737
777
|
editorRef.current = editor;
|
|
738
778
|
}, []);
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
779
|
+
const [verticalPaneSizes, setVerticalPaneSizes] = useState(verticalPaneSizesConst.collapsed);
|
|
780
|
+
const toggleProblemPane = useCallback(() => {
|
|
781
|
+
setVerticalPaneSizes((value) => {
|
|
782
|
+
return value === verticalPaneSizesConst.collapsed
|
|
783
|
+
? verticalPaneSizesConst.expanded
|
|
784
|
+
: verticalPaneSizesConst.collapsed;
|
|
785
|
+
});
|
|
786
|
+
}, [setVerticalPaneSizes]);
|
|
787
|
+
const onVerticalPaneSizeChange = useCallback((sizes) => {
|
|
788
|
+
setVerticalPaneSizes(sizes);
|
|
789
|
+
}, [setVerticalPaneSizes]);
|
|
790
|
+
const handleDiagnosticSelected = useCallback((diagnostic) => {
|
|
791
|
+
var _a;
|
|
792
|
+
(_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.setSelection(getMonacoRange(host.compiler, diagnostic.target));
|
|
793
|
+
}, [setVerticalPaneSizes]);
|
|
794
|
+
return (jsx(PlaygroundContextProvider, { value: { host }, children: jsxs("div", { className: style$4["layout"], children: [jsxs(SplitPane, { sizes: verticalPaneSizes, onChange: onVerticalPaneSizeChange, split: "horizontal", children: [jsx(Pane, { children: jsxs(SplitPane, { initialSizes: ["50%", "50%"], children: [jsxs(Pane, { children: [jsx(EditorCommandBar, { host: host, selectedEmitter: selectedEmitter, onSelectedEmitterChange: onSelectedEmitterChange, compilerOptions: compilerOptions, onCompilerOptionsChange: onCompilerOptionsChange, samples: props.samples, selectedSampleName: selectedSampleName, onSelectedSampleNameChange: onSelectedSampleNameChange, saveCode: saveCode, formatCode: formatCode, newIssue: ((_b = props === null || props === void 0 ? void 0 : props.links) === null || _b === void 0 ? void 0 : _b.githubIssueUrl) ? newIssue : undefined, documentationUrl: (_c = props.links) === null || _c === void 0 ? void 0 : _c.documentationUrl }), jsx(TypeSpecEditor, { model: typespecModel, actions: typespecEditorActions, options: props.editorOptions, onMount: onTypeSpecEditorMount })] }), jsx(Pane, { children: jsx(OutputView, { compilationState: compilationState, editorOptions: props.editorOptions, viewers: (_d = props.emitterViewers) === null || _d === void 0 ? void 0 : _d[selectedEmitter] }) })] }) }), jsx(Pane, { minSize: 30, children: jsx(ProblemPane, { collapsed: verticalPaneSizes[1] === verticalPaneSizesConst.collapsed[1], compilationState: compilationState, onHeaderClick: toggleProblemPane, onDiagnosticSelected: handleDiagnosticSelected }) })] }), (_e = props.footer) !== null && _e !== void 0 ? _e : jsx(DefaultFooter, {})] }) }));
|
|
795
|
+
};
|
|
796
|
+
const verticalPaneSizesConst = {
|
|
797
|
+
collapsed: [undefined, 30],
|
|
798
|
+
expanded: [undefined, 200],
|
|
749
799
|
};
|
|
750
800
|
const outputDir = "./tsp-output";
|
|
751
801
|
async function compile(host, content, selectedEmitter, options) {
|
|
@@ -886,5 +936,5 @@ function createStandalonePlaygroundStateStorage() {
|
|
|
886
936
|
};
|
|
887
937
|
}
|
|
888
938
|
|
|
889
|
-
export { Playground, StandalonePlayground, createReactPlayground, renderReactPlayground };
|
|
939
|
+
export { Footer, FooterItem, FooterVersionItem, Playground, StandalonePlayground, createReactPlayground, renderReactPlayground, usePlaygroundContext };
|
|
890
940
|
//# sourceMappingURL=index.js.map
|