@typespec/playground 0.5.0-dev.8 → 0.5.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.
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as createBrowserHost, a as createUrlStateStorage, r as registerMonacoLanguage } from './state-storage-
|
|
1
|
+
export { c as createBrowserHost, a as createUrlStateStorage, r as registerMonacoLanguage } from './state-storage-DqG2VXgn.js';
|
|
2
2
|
|
|
3
3
|
function registerMonacoDefaultWorkersForVite() {
|
|
4
4
|
self.MonacoEnvironment = {
|
package/dist/react/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { mergeClasses, Popover, PopoverTrigger, PopoverSurface, Title3, Table, T
|
|
|
5
5
|
import { Settings24Regular, Save16Regular, Broom16Filled, Bug16Regular, FolderListRegular, DataLineRegular, ErrorCircle16Filled, Warning16Filled, ChevronDown16Regular } from '@fluentui/react-icons';
|
|
6
6
|
import debounce from 'debounce';
|
|
7
7
|
import { CompletionItemTag } from 'vscode-languageserver';
|
|
8
|
-
import { g as getMonacoRange, a as createUrlStateStorage, c as createBrowserHost, r as registerMonacoLanguage } from '../state-storage-
|
|
8
|
+
import { b as resolveVirtualPath, g as getMonacoRange, a as createUrlStateStorage, c as createBrowserHost, r as registerMonacoLanguage } from '../state-storage-DqG2VXgn.js';
|
|
9
9
|
import { ErrorBoundary } from 'react-error-boundary';
|
|
10
10
|
import { TypeGraph } from '@typespec/html-program-viewer/react';
|
|
11
11
|
import '@typespec/html-program-viewer/style.css';
|
|
@@ -2804,22 +2804,22 @@ const verticalPaneSizesConst = {
|
|
|
2804
2804
|
collapsed: [void 0, 30],
|
|
2805
2805
|
expanded: [void 0, 200]
|
|
2806
2806
|
};
|
|
2807
|
-
const outputDir = "
|
|
2807
|
+
const outputDir = resolveVirtualPath("tsp-output");
|
|
2808
2808
|
async function compile(host, content, selectedEmitter, options) {
|
|
2809
2809
|
await host.writeFile("main.tsp", content);
|
|
2810
2810
|
await emptyOutputDir(host);
|
|
2811
2811
|
try {
|
|
2812
2812
|
const typespecCompiler = host.compiler;
|
|
2813
|
-
const program = await typespecCompiler.compile(host, "main.tsp", {
|
|
2813
|
+
const program = await typespecCompiler.compile(host, resolveVirtualPath("main.tsp"), {
|
|
2814
2814
|
...options,
|
|
2815
2815
|
options: {
|
|
2816
2816
|
...options.options,
|
|
2817
2817
|
[selectedEmitter]: {
|
|
2818
2818
|
...options.options?.[selectedEmitter],
|
|
2819
|
-
"emitter-output-dir":
|
|
2819
|
+
"emitter-output-dir": outputDir
|
|
2820
2820
|
}
|
|
2821
2821
|
},
|
|
2822
|
-
outputDir
|
|
2822
|
+
outputDir,
|
|
2823
2823
|
emit: selectedEmitter ? [selectedEmitter] : []
|
|
2824
2824
|
});
|
|
2825
2825
|
const outputFiles = await findOutputFiles(host);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../../../src/react/playground.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAc,MAAM,oBAAoB,CAAC;AAEtE,OAAO,sCAAsC,CAAC;AAG9C,OAAO,EAML,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../../../src/react/playground.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAc,MAAM,oBAAoB,CAAC;AAEtE,OAAO,sCAAsC,CAAC;AAG9C,OAAO,EAML,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAOjE,OAAO,KAAK,EAAoB,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGpF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,WAAW,CA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ED,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAEhB,oBAAoB;IACpB,OAAO,EAAE,MAAM,CAAC;IAEhB,uBAAuB;IACvB,OAAO,CAAC,EAAE,eAAe,CAAC;IAE1B,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,4BAA4B;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CA4NzD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createSourceFile, getSourceFileKindFromExt,
|
|
1
|
+
import { resolvePath, createSourceFile, getSourceFileKindFromExt, TypeSpecLanguageConfiguration } from '@typespec/compiler';
|
|
2
2
|
import * as monaco from 'monaco-editor';
|
|
3
3
|
import * as lsp from 'vscode-languageserver';
|
|
4
4
|
import { DiagnosticSeverity, FormattingOptions, DocumentHighlightKind } from 'vscode-languageserver';
|
|
@@ -655,4 +655,4 @@ function createUrlStateStorage(schema) {
|
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
657
|
|
|
658
|
-
export { createUrlStateStorage as a, createBrowserHost as c, getMonacoRange as g, registerMonacoLanguage as r };
|
|
658
|
+
export { createUrlStateStorage as a, resolveVirtualPath as b, createBrowserHost as c, getMonacoRange as g, registerMonacoLanguage as r };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/playground",
|
|
3
|
-
"version": "0.5.0
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec playground UI components.",
|
|
6
6
|
"homepage": "https://typespec.io",
|
|
@@ -57,15 +57,6 @@
|
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@fluentui/react-components": "~9.54.16",
|
|
59
59
|
"@fluentui/react-icons": "^2.0.258",
|
|
60
|
-
"@typespec/bundler": "~0.1.7 || >=0.2.0-dev <0.2.0",
|
|
61
|
-
"@typespec/compiler": "~0.60.1 || >=0.61.0-dev <0.61.0",
|
|
62
|
-
"@typespec/html-program-viewer": "~0.60.0 || >=0.61.0-dev <0.61.0",
|
|
63
|
-
"@typespec/http": "~0.60.0 || >=0.61.0-dev <0.61.0",
|
|
64
|
-
"@typespec/openapi": "~0.60.0 || >=0.61.0-dev <0.61.0",
|
|
65
|
-
"@typespec/openapi3": "~0.60.0 || >=0.61.0-dev <0.61.0",
|
|
66
|
-
"@typespec/protobuf": "~0.60.0 || >=0.61.0-dev <0.61.0",
|
|
67
|
-
"@typespec/rest": "~0.60.0 || >=0.61.0-dev <0.61.0",
|
|
68
|
-
"@typespec/versioning": "~0.60.0 || >=0.61.0-dev <0.61.0",
|
|
69
60
|
"clsx": "^2.1.1",
|
|
70
61
|
"debounce": "~2.1.1",
|
|
71
62
|
"lzutf8": "0.6.3",
|
|
@@ -75,7 +66,16 @@
|
|
|
75
66
|
"react-error-boundary": "^4.0.13",
|
|
76
67
|
"swagger-ui-dist": "^5.17.14",
|
|
77
68
|
"vscode-languageserver": "~9.0.1",
|
|
78
|
-
"vscode-languageserver-textdocument": "~1.0.12"
|
|
69
|
+
"vscode-languageserver-textdocument": "~1.0.12",
|
|
70
|
+
"@typespec/bundler": "~0.1.8",
|
|
71
|
+
"@typespec/html-program-viewer": "~0.61.0",
|
|
72
|
+
"@typespec/compiler": "~0.61.0",
|
|
73
|
+
"@typespec/openapi": "~0.61.0",
|
|
74
|
+
"@typespec/http": "~0.61.0",
|
|
75
|
+
"@typespec/openapi3": "~0.61.0",
|
|
76
|
+
"@typespec/protobuf": "~0.61.0",
|
|
77
|
+
"@typespec/rest": "~0.61.0",
|
|
78
|
+
"@typespec/versioning": "~0.61.0"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@babel/core": "^7.25.2",
|
|
@@ -91,7 +91,6 @@
|
|
|
91
91
|
"@types/react": "~18.3.9",
|
|
92
92
|
"@types/react-dom": "~18.3.0",
|
|
93
93
|
"@types/swagger-ui-dist": "~3.30.5",
|
|
94
|
-
"@typespec/bundler": "~0.1.7 || >=0.2.0-dev <0.2.0",
|
|
95
94
|
"@vitejs/plugin-react": "~4.3.1",
|
|
96
95
|
"c8": "^10.1.2",
|
|
97
96
|
"cross-env": "~7.0.3",
|
|
@@ -101,9 +100,9 @@
|
|
|
101
100
|
"vite": "^5.4.8",
|
|
102
101
|
"vite-plugin-checker": "^0.8.0",
|
|
103
102
|
"vite-plugin-dts": "4.2.2",
|
|
103
|
+
"@typespec/bundler": "~0.1.8",
|
|
104
104
|
"@typespec/react-components": "~0.57.0"
|
|
105
105
|
},
|
|
106
|
-
"peerDependencies": {},
|
|
107
106
|
"scripts": {
|
|
108
107
|
"clean": "rimraf ./dist ./dist-dev ./temp ./typespecContents.json",
|
|
109
108
|
"build": "vite build",
|