@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
|
@@ -7,5 +7,5 @@ export declare function resolveVirtualPath(path: string, ...paths: string[]): st
|
|
|
7
7
|
* @param importOptions Import configuration.
|
|
8
8
|
* @returns
|
|
9
9
|
*/
|
|
10
|
-
export declare function createBrowserHost(libsToLoad: string[], importOptions?: LibraryImportOptions): Promise<BrowserHost>;
|
|
10
|
+
export declare function createBrowserHost(libsToLoad: readonly string[], importOptions?: LibraryImportOptions): Promise<BrowserHost>;
|
|
11
11
|
//# sourceMappingURL=browser-host.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-host.d.ts","sourceRoot":"","sources":["../../src/browser-host.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAyC,MAAM,WAAW,CAAC;AACxF,OAAO,EAAE,WAAW,EAAwB,MAAM,YAAY,CAAC;AAE/D,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,UAElE;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"browser-host.d.ts","sourceRoot":"","sources":["../../src/browser-host.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAyC,MAAM,WAAW,CAAC;AACxF,OAAO,EAAE,WAAW,EAAwB,MAAM,YAAY,CAAC;AAE/D,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,UAElE;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,aAAa,GAAE,oBAAyB,GACvC,OAAO,CAAC,WAAW,CAAC,CA6ItB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-command-bar.d.ts","sourceRoot":"","sources":["../../../src/editor-command-bar/editor-command-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAInD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG5D,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACrC,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACtC,IAAI,EAAE,WAAW,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,eAAe,EAAE,eAAe,CAAC;IACjC,uBAAuB,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IAE5D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC3C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,0BAA0B,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1D;AACD,eAAO,MAAM,gBAAgB,EAAE,iBAAiB,CAAC,qBAAqB,CAyErE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
2
|
+
import { BrowserHost } from "../../types.js";
|
|
3
|
+
export interface PlaygroundContext {
|
|
4
|
+
host: BrowserHost;
|
|
5
|
+
}
|
|
6
|
+
export declare const PlaygroundContextProvider: import("react").Provider<PlaygroundContext | undefined>;
|
|
7
|
+
export declare function usePlaygroundContext(): PlaygroundContext;
|
|
8
|
+
//# sourceMappingURL=playground-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"playground-context.d.ts","sourceRoot":"","sources":["../../../../src/react/context/playground-context.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,WAAW,CAAC;CACnB;AAID,eAAO,MAAM,yBAAyB,yDAA6B,CAAC;AAEpE,wBAAgB,oBAAoB,IAAI,iBAAiB,CAMxD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-footer.d.ts","sourceRoot":"","sources":["../../../src/react/default-footer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI1C,eAAO,MAAM,aAAa,EAAE,iBAM3B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Diagnostic } from "@typespec/compiler";
|
|
2
|
+
import { FunctionComponent } from "react";
|
|
3
|
+
export interface DiagnosticListProps {
|
|
4
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
5
|
+
readonly onDiagnosticSelected?: (diagnostic: Diagnostic) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const DiagnosticList: FunctionComponent<DiagnosticListProps>;
|
|
8
|
+
//# sourceMappingURL=diagnostic-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostic-list.d.ts","sourceRoot":"","sources":["../../../../src/react/diagnostic-list/diagnostic-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,UAAU,EAGhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAqB,MAAM,OAAO,CAAC;AAG7D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;IAC5C,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;CAClE;AAED,eAAO,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,CAqBjE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-output.d.ts","sourceRoot":"","sources":["../../../../src/react/file-output/file-output.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAkC,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,gBAAgB,EAAE,CAAC;CAC7B;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CAkCzD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FunctionComponent, ReactNode } from "react";
|
|
2
|
+
export interface FooterItemProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
link?: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const FooterItem: FunctionComponent<FooterItemProps>;
|
|
8
|
+
//# sourceMappingURL=footer-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer-item.d.ts","sourceRoot":"","sources":["../../../../src/react/footer/footer-item.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CASzD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
2
|
+
export interface VersionSelectorVersion {
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export interface VersionSelectorProps {
|
|
7
|
+
versions: VersionSelectorVersion[];
|
|
8
|
+
/** Currently selected version , must match one of the version name. */
|
|
9
|
+
selected: string;
|
|
10
|
+
/** Latest released version, must match one of the version name. */
|
|
11
|
+
latest?: string;
|
|
12
|
+
/** Callback when a new version has been selected */
|
|
13
|
+
onChange: (version: VersionSelectorVersion) => void;
|
|
14
|
+
}
|
|
15
|
+
export interface FooterVersionItemProps {
|
|
16
|
+
/** Provide a way to change the version of packages in the playground */
|
|
17
|
+
versionSelector?: VersionSelectorProps;
|
|
18
|
+
}
|
|
19
|
+
export declare const FooterVersionItem: import("react").MemoExoticComponent<({ versionSelector }: FooterVersionItemProps) => import("react/jsx-runtime").JSX.Element>;
|
|
20
|
+
//# sourceMappingURL=footer-version-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer-version-item.d.ts","sourceRoot":"","sources":["../../../../src/react/footer/footer-version-item.tsx"],"names":[],"mappings":";AAmBA,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,sBAAsB,EAAE,CAAC;IAEnC,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAC;IAEjB,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,oDAAoD;IACpD,QAAQ,EAAE,CAAC,OAAO,EAAE,sBAAsB,KAAK,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,sBAAsB;IACrC,wEAAwE;IACxE,eAAe,CAAC,EAAE,oBAAoB,CAAC;CACxC;AAED,eAAO,MAAM,iBAAiB,4DAA8B,sBAAsB,6CAqBhF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../../src/react/footer/footer.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,MAAM,EAAE,iBAAiB,CAAC,WAAW,CAEjD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { FooterItem, FooterItemProps } from "./footer-item.js";
|
|
2
|
+
export { FooterVersionItem, FooterVersionItemProps, VersionSelectorProps, VersionSelectorVersion, } from "./footer-version-item.js";
|
|
3
|
+
export { Footer, FooterProps } from "./footer.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react/footer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export { usePlaygroundContext } from "./context/index.js";
|
|
2
|
+
export { Footer, FooterItem, FooterItemProps, FooterProps, FooterVersionItem, FooterVersionItemProps, VersionSelectorProps, VersionSelectorVersion, } from "./footer/index.js";
|
|
1
3
|
export { Playground } from "./playground.js";
|
|
2
4
|
export type { PlaygroundProps, PlaygroundSaveData } from "./playground.js";
|
|
3
5
|
export { StandalonePlayground, createReactPlayground, renderReactPlayground, } from "./standalone.js";
|
|
4
|
-
export * from "./types.js";
|
|
6
|
+
export type * from "./types.js";
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EACL,MAAM,EACN,UAAU,EACV,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,mBAAmB,YAAY,CAAC"}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import { FunctionComponent, ReactElement } from "react";
|
|
2
|
-
export interface
|
|
2
|
+
export interface OutputTab {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string | ReactElement<any, any>;
|
|
5
5
|
align: "left" | "right";
|
|
6
6
|
}
|
|
7
7
|
export interface OutputTabsProps {
|
|
8
|
-
tabs:
|
|
8
|
+
tabs: OutputTab[];
|
|
9
9
|
selected: string;
|
|
10
10
|
onSelect: (file: string) => void;
|
|
11
11
|
}
|
|
12
12
|
export declare const OutputTabs: FunctionComponent<OutputTabsProps>;
|
|
13
|
-
export interface OutputTabProps {
|
|
14
|
-
tab: Tab;
|
|
15
|
-
selected: boolean;
|
|
16
|
-
onSelect: (id: string) => void;
|
|
17
|
-
}
|
|
18
|
-
export declare const OutputTab: FunctionComponent<OutputTabProps>;
|
|
19
13
|
//# sourceMappingURL=output-tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-tabs.d.ts","sourceRoot":"","sources":["../../../../src/react/output-tabs/output-tabs.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAe,MAAM,OAAO,CAAC;AAGrE,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACtC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CACzB;AACD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CAqCzD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FunctionComponent } from "react";
|
|
2
|
-
import { PlaygroundEditorsOptions } from "
|
|
3
|
-
import { CompilationState, FileOutputViewer } from "
|
|
2
|
+
import { PlaygroundEditorsOptions } from "../playground.js";
|
|
3
|
+
import { CompilationState, FileOutputViewer } from "../types.js";
|
|
4
4
|
export interface OutputViewProps {
|
|
5
5
|
compilationState: CompilationState | undefined;
|
|
6
6
|
editorOptions?: PlaygroundEditorsOptions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output-view.d.ts","sourceRoot":"","sources":["../../../../src/react/output-view/output-view.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAA6C,MAAM,OAAO,CAAC;AAGrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAiB,gBAAgB,EAAe,MAAM,aAAa,CAAC;AAI7F,MAAM,WAAW,eAAe;IAC9B,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC/C,aAAa,CAAC,EAAE,wBAAwB,CAAC;IACzC,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAC9B;AAED,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CAkBzD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CompilerOptions } from "@typespec/compiler";
|
|
2
|
-
import { FunctionComponent } from "react";
|
|
2
|
+
import { FunctionComponent, ReactNode } from "react";
|
|
3
3
|
import { BrowserHost, PlaygroundSample } from "../types.js";
|
|
4
4
|
import { FileOutputViewer } from "./types.js";
|
|
5
5
|
export interface PlaygroundProps {
|
|
@@ -7,7 +7,7 @@ export interface PlaygroundProps {
|
|
|
7
7
|
/** Default emitter if leaving this unmanaged. */
|
|
8
8
|
defaultContent?: string;
|
|
9
9
|
/** List of available libraries */
|
|
10
|
-
libraries: string[];
|
|
10
|
+
readonly libraries: readonly string[];
|
|
11
11
|
/** Emitter to use */
|
|
12
12
|
emitter?: string;
|
|
13
13
|
/** Default emitter if leaving this unmanaged. */
|
|
@@ -34,6 +34,10 @@ export interface PlaygroundProps {
|
|
|
34
34
|
emitterViewers?: Record<string, FileOutputViewer[]>;
|
|
35
35
|
onSave?: (value: PlaygroundSaveData) => void;
|
|
36
36
|
editorOptions?: PlaygroundEditorsOptions;
|
|
37
|
+
/**
|
|
38
|
+
* Change the footer of the playground.
|
|
39
|
+
*/
|
|
40
|
+
footer?: ReactNode;
|
|
37
41
|
}
|
|
38
42
|
export interface PlaygroundEditorsOptions {
|
|
39
43
|
theme?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../../../src/react/playground.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../../../src/react/playground.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAc,MAAM,oBAAoB,CAAC;AAGjE,OAAO,EACL,iBAAiB,EACjB,SAAS,EAMV,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAU5D,OAAO,EAAoB,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGhE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,WAAW,CAAC;IAElB,iDAAiD;IACjD,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,kCAAkC;IAClC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAEtC,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mCAAmC;IACnC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAE5C,sBAAsB;IACtB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,yDAAyD;IACzD,sBAAsB,CAAC,EAAE,eAAe,CAAC;IACzC,2CAA2C;IAC3C,uBAAuB,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IAE7D,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAE3C,oBAAoB;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kCAAkC;IAClC,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAElD,uBAAuB;IACvB,KAAK,CAAC,EAAE,eAAe,CAAC;IAExB,uFAAuF;IACvF,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;IAEpD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAE7C,aAAa,CAAC,EAAE,wBAAwB,CAAC;IAEzC;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,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;IAC1B,iDAAiD;IACjD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CA0MzD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MouseEventHandler } from "react";
|
|
2
|
+
import { CompilationState } from "../types.js";
|
|
3
|
+
export interface ProblemPaneHeaderProps {
|
|
4
|
+
compilationState: CompilationState | undefined;
|
|
5
|
+
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
6
|
+
collaped: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const ProblemPaneHeader: import("react").MemoExoticComponent<({ compilationState, ...props }: ProblemPaneHeaderProps) => import("react/jsx-runtime").JSX.Element>;
|
|
9
|
+
//# sourceMappingURL=header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../src/react/problem-pane/header.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAmB,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC/C,OAAO,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAC5C,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,iBAAiB,uEAAyC,sBAAsB,6CAoC3F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react/problem-pane/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Diagnostic } from "@typespec/compiler";
|
|
2
|
+
import { FunctionComponent, MouseEventHandler } from "react";
|
|
3
|
+
import { CompilationState } from "../types.js";
|
|
4
|
+
export interface ProblemPaneProps {
|
|
5
|
+
readonly collapsed: boolean;
|
|
6
|
+
readonly compilationState: CompilationState | undefined;
|
|
7
|
+
readonly onHeaderClick?: MouseEventHandler<HTMLDivElement>;
|
|
8
|
+
readonly onDiagnosticSelected?: (diagnostic: Diagnostic) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const ProblemPane: FunctionComponent<ProblemPaneProps>;
|
|
11
|
+
//# sourceMappingURL=problem-pane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"problem-pane.d.ts","sourceRoot":"","sources":["../../../../src/react/problem-pane/problem-pane.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAI/C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACxD,QAAQ,CAAC,aAAa,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAC3D,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;CAClE;AACD,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,CAqB3D,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CompilerOptions } from "@typespec/compiler";
|
|
2
|
+
export interface CompilerSettingsDialogButtonProps {
|
|
3
|
+
selectedEmitter: string;
|
|
4
|
+
compilerOptions: CompilerOptions;
|
|
5
|
+
onCompilerOptionsChange: (options: CompilerOptions) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const CompilerSettingsDialogButton: ({ selectedEmitter, compilerOptions, onCompilerOptionsChange, }: CompilerSettingsDialogButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=compiler-settings-dialog-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiler-settings-dialog-button.d.ts","sourceRoot":"","sources":["../../../../src/react/settings/compiler-settings-dialog-button.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAI1D,MAAM,WAAW,iCAAiC;IAChD,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,eAAe,CAAC;IACjC,uBAAuB,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;CAC7D;AAED,eAAO,MAAM,4BAA4B,mEAItC,iCAAiC,4CAuBnC,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { CompilerOptions } from "@typespec/compiler";
|
|
2
2
|
import { FunctionComponent } from "react";
|
|
3
3
|
import { BrowserHost } from "../../types.js";
|
|
4
|
-
export
|
|
5
|
-
host: BrowserHost;
|
|
6
|
-
selectedEmitter: string;
|
|
7
|
-
options: CompilerOptions;
|
|
8
|
-
onOptionsChanged: (options: CompilerOptions) => void;
|
|
9
|
-
}
|
|
4
|
+
export interface CompilerSettingsProps {
|
|
5
|
+
readonly host: BrowserHost;
|
|
6
|
+
readonly selectedEmitter: string;
|
|
7
|
+
readonly options: CompilerOptions;
|
|
8
|
+
readonly onOptionsChanged: (options: CompilerOptions) => void;
|
|
9
|
+
}
|
|
10
10
|
export declare const CompilerSettings: FunctionComponent<CompilerSettingsProps>;
|
|
11
11
|
//# sourceMappingURL=compiler-settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compiler-settings.d.ts","sourceRoot":"","sources":["../../../../src/react/settings/compiler-settings.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compiler-settings.d.ts","sourceRoot":"","sources":["../../../../src/react/settings/compiler-settings.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAiB,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAe,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,gBAAgB,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;CAC/D;AAED,eAAO,MAAM,gBAAgB,EAAE,iBAAiB,CAAC,qBAAqB,CA+CrE,CAAC"}
|
|
@@ -2,9 +2,9 @@ import { FunctionComponent } from "react";
|
|
|
2
2
|
import { PlaygroundTspLibrary } from "../../types.js";
|
|
3
3
|
import { EmitterOptions } from "../types.js";
|
|
4
4
|
export interface EmitterOptionsFormProps {
|
|
5
|
-
library: PlaygroundTspLibrary;
|
|
6
|
-
options: EmitterOptions;
|
|
7
|
-
optionsChanged: (options: EmitterOptions) => void;
|
|
5
|
+
readonly library: PlaygroundTspLibrary;
|
|
6
|
+
readonly options: EmitterOptions;
|
|
7
|
+
readonly optionsChanged: (options: EmitterOptions) => void;
|
|
8
8
|
}
|
|
9
9
|
export declare const EmitterOptionsForm: FunctionComponent<EmitterOptionsFormProps>;
|
|
10
10
|
//# sourceMappingURL=emitter-options-form.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emitter-options-form.d.ts","sourceRoot":"","sources":["../../../../src/react/settings/emitter-options-form.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"emitter-options-form.d.ts","sourceRoot":"","sources":["../../../../src/react/settings/emitter-options-form.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;IACvC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,cAAc,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;CAC5D;AAED,eAAO,MAAM,kBAAkB,EAAE,iBAAiB,CAAC,uBAAuB,CAuCzE,CAAC"}
|
|
@@ -3,5 +3,5 @@ export interface PaneProps {
|
|
|
3
3
|
maxSize?: number | string;
|
|
4
4
|
minSize?: number | string;
|
|
5
5
|
}
|
|
6
|
-
export default function Pane({ children, ...props }: PropsWithChildren<HTMLAttributes<HTMLDivElement> & PaneProps>): import("
|
|
6
|
+
export default function Pane({ children, ...props }: PropsWithChildren<HTMLAttributes<HTMLDivElement> & PaneProps>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
//# sourceMappingURL=pane.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pane.d.ts","sourceRoot":"","sources":["../../../../src/react/split-pane/pane.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1D,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAC3B,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"pane.d.ts","sourceRoot":"","sources":["../../../../src/react/split-pane/pane.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1D,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAC3B,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,CAAC,2CAE/D"}
|
|
@@ -8,5 +8,5 @@ export interface SashProps {
|
|
|
8
8
|
onDragging: React.MouseEventHandler<HTMLDivElement>;
|
|
9
9
|
onDragEnd: React.MouseEventHandler<HTMLDivElement>;
|
|
10
10
|
}
|
|
11
|
-
export declare const Sash: ({ className, render, onDragStart, onDragging, onDragEnd, onReset, ...others }: SashProps) => import("
|
|
11
|
+
export declare const Sash: ({ className, render, onDragStart, onDragging, onDragEnd, onReset, ...others }: SashProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
//# sourceMappingURL=sash.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sash.d.ts","sourceRoot":"","sources":["../../../../src/react/split-pane/sash.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAG5C,MAAM,WAAW,SAAS;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC;IAC3B,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,SAAS,CAAC;IACzC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACrD,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACpD,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;CACpD;AAED,eAAO,MAAM,IAAI,kFAQd,SAAS,
|
|
1
|
+
{"version":3,"file":"sash.d.ts","sourceRoot":"","sources":["../../../../src/react/split-pane/sash.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAG5C,MAAM,WAAW,SAAS;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC;IAC3B,MAAM,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,SAAS,CAAC;IACzC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACrD,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACpD,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC;CACpD;AAED,eAAO,MAAM,IAAI,kFAQd,SAAS,4CA8BX,CAAC"}
|
|
@@ -3,8 +3,8 @@ export interface SplitPaneProps {
|
|
|
3
3
|
children: JSX.Element[];
|
|
4
4
|
allowResize?: boolean;
|
|
5
5
|
split?: "vertical" | "horizontal";
|
|
6
|
-
initialSizes
|
|
7
|
-
sizes?: (string | number)[];
|
|
6
|
+
initialSizes?: (string | number)[];
|
|
7
|
+
sizes?: (string | number | undefined)[];
|
|
8
8
|
sashRender?: (index: number, active: boolean) => React.ReactNode;
|
|
9
9
|
onChange?: (sizes: number[]) => void;
|
|
10
10
|
onDragStart?: (e: MouseEvent) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-pane.d.ts","sourceRoot":"","sources":["../../../../src/react/split-pane/split-pane.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,GAAG,EACH,UAAU,EAMX,MAAM,OAAO,CAAC;AAOf,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IAClC,YAAY,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"split-pane.d.ts","sourceRoot":"","sources":["../../../../src/react/split-pane/split-pane.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,GAAG,EACH,UAAU,EAMX,MAAM,OAAO,CAAC;AAOf,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IAClC,YAAY,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACnC,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC;IACxC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAC;IACjE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAYD,eAAO,MAAM,SAAS,EAAE,iBAAiB,CAAC,cAAc,CAkNvD,CAAC"}
|
|
@@ -3,11 +3,11 @@ import { LibraryImportOptions } from "../core.js";
|
|
|
3
3
|
import { StateStorage } from "../state-storage.js";
|
|
4
4
|
import { PlaygroundProps, PlaygroundSaveData } from "./playground.js";
|
|
5
5
|
export interface ReactPlaygroundConfig extends Partial<PlaygroundProps> {
|
|
6
|
-
libraries: string[];
|
|
7
|
-
importConfig?: LibraryImportOptions;
|
|
6
|
+
readonly libraries: readonly string[];
|
|
7
|
+
readonly importConfig?: LibraryImportOptions;
|
|
8
8
|
}
|
|
9
9
|
export declare const StandalonePlayground: FunctionComponent<ReactPlaygroundConfig>;
|
|
10
|
-
export declare function createReactPlayground(config: ReactPlaygroundConfig): Promise<import("
|
|
10
|
+
export declare function createReactPlayground(config: ReactPlaygroundConfig): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
11
11
|
export declare function renderReactPlayground(config: ReactPlaygroundConfig): Promise<void>;
|
|
12
12
|
export declare function createStandalonePlaygroundStateStorage(): StateStorage<PlaygroundSaveData>;
|
|
13
13
|
//# sourceMappingURL=standalone.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standalone.d.ts","sourceRoot":"","sources":["../../../src/react/standalone.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAoD,MAAM,OAAO,CAAC;AAG5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,EAAE,YAAY,EAAyB,MAAM,qBAAqB,CAAC;AAE1E,OAAO,EAAc,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAElF,MAAM,WAAW,qBAAsB,SAAQ,OAAO,CAAC,eAAe,CAAC;IACrE,SAAS,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"standalone.d.ts","sourceRoot":"","sources":["../../../src/react/standalone.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAoD,MAAM,OAAO,CAAC;AAG5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,EAAE,YAAY,EAAyB,MAAM,qBAAqB,CAAC;AAE1E,OAAO,EAAc,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAElF,MAAM,WAAW,qBAAsB,SAAQ,OAAO,CAAC,eAAe,CAAC;IACrE,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,YAAY,CAAC,EAAE,oBAAoB,CAAC;CAC9C;AAyBD,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,qBAAqB,CAmDzE,CAAC;AAEF,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,qBAAqB,oDAExE;AAED,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,qBAAqB,iBASxE;AAED,wBAAgB,sCAAsC,IAAI,YAAY,CAAC,kBAAkB,CAAC,CA0BzF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "swagger-ui-react/swagger-ui.css";
|
|
2
|
-
import { FileOutputViewer } from "
|
|
2
|
+
import { FileOutputViewer } from "../types.js";
|
|
3
3
|
export declare const SwaggerUIViewer: FileOutputViewer;
|
|
4
|
-
//# sourceMappingURL=
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react/viewers/index.tsx"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAe,MAAM,aAAa,CAAC;AAG5D,eAAO,MAAM,eAAe,EAAE,gBAI7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swagger-ui.d.ts","sourceRoot":"","sources":["../../../../src/react/viewers/swagger-ui.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAkB,MAAM,OAAO,CAAC;AAG1D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAID,eAAO,MAAM,SAAS,EAAE,iBAAiB,CAAC,cAAc,CAQvD,CAAC"}
|
package/dist/src/services.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DiagnosticTarget, NoTarget } from "@typespec/compiler";
|
|
2
|
-
import
|
|
2
|
+
import * as monaco from "monaco-editor";
|
|
3
3
|
import { BrowserHost } from "./types.js";
|
|
4
4
|
export declare function registerMonacoLanguage(host: BrowserHost): Promise<void>;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function getMonacoRange(typespecCompiler: typeof import("@typespec/compiler"), target: DiagnosticTarget | typeof NoTarget): monaco.IRange;
|
|
6
6
|
//# sourceMappingURL=services.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,QAAQ,EAGT,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../src/services.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,QAAQ,EAGT,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAmCzC,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,WAAW,iBA0T7D;AAED,wBAAgB,cAAc,CAC5B,gBAAgB,EAAE,cAAc,oBAAoB,CAAC,EACrD,MAAM,EAAE,gBAAgB,GAAG,OAAO,QAAQ,GACzC,MAAM,CAAC,MAAM,CAkBf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state-storage.d.ts","sourceRoot":"","sources":["../../src/state-storage.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,MAAM;IAC5C,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;IACnB,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;KAC/B,GAAG,IAAI,MAAM,CAAC,GAAG,cAAc;CACjC,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IAEnB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAE3B,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,WAAW,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,CAAC,CAAC,SAAS,MAAM,EAC1D,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC1B,YAAY,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"state-storage.d.ts","sourceRoot":"","sources":["../../src/state-storage.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,MAAM;IAC5C,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;IACnB,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;KAC/B,GAAG,IAAI,MAAM,CAAC,GAAG,cAAc;CACjC,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IAEnB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAE3B,8FAA8F;IAC9F,QAAQ,CAAC,EAAE,WAAW,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,CAAC,CAAC,SAAS,MAAM,EAC1D,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC1B,YAAY,CAAC,CAAC,CAAC,CAkFjB"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CompilerHost, CompilerOptions, TypeSpecLibrary } from "@typespec/compiler";
|
|
1
|
+
import { CompilerHost, CompilerOptions, NodePackage, TypeSpecLibrary } from "@typespec/compiler";
|
|
2
2
|
export interface PlaygroundSample {
|
|
3
3
|
filename: string;
|
|
4
4
|
preferredEmitter?: string;
|
|
@@ -10,6 +10,7 @@ export interface PlaygroundSample {
|
|
|
10
10
|
}
|
|
11
11
|
export interface PlaygroundTspLibrary {
|
|
12
12
|
name: string;
|
|
13
|
+
packageJson: NodePackage;
|
|
13
14
|
isEmitter: boolean;
|
|
14
15
|
definition?: TypeSpecLibrary<any>;
|
|
15
16
|
}
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEjG,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,WAAY,SAAQ,YAAY;IAC/C,QAAQ,EAAE,cAAc,oBAAoB,CAAC,CAAC;IAC9C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;CACjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vite/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0B,UAAU,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,oBAAoB,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vite/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0B,UAAU,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,oBAAoB,GAAG,UAAU,CAwCnF"}
|
package/dist/src/vite/types.d.ts
CHANGED
|
@@ -5,14 +5,13 @@ export interface PlaygroundUserConfig extends Omit<PlaygroundConfig, "samples">
|
|
|
5
5
|
/**
|
|
6
6
|
* If the bundle library plugin should be loaded.
|
|
7
7
|
*/
|
|
8
|
-
skipBundleLibraries?: boolean;
|
|
9
|
-
samples?: Record<string, PlaygroundSampleConfig>;
|
|
8
|
+
readonly skipBundleLibraries?: boolean;
|
|
9
|
+
readonly samples?: Record<string, PlaygroundSampleConfig>;
|
|
10
10
|
}
|
|
11
11
|
export interface PlaygroundConfig {
|
|
12
|
-
defaultEmitter: string;
|
|
13
|
-
libraries: string[];
|
|
14
|
-
samples: Record<string, PlaygroundSample>;
|
|
15
|
-
|
|
16
|
-
links?: PlaygroundLinks;
|
|
12
|
+
readonly defaultEmitter: string;
|
|
13
|
+
readonly libraries: readonly string[];
|
|
14
|
+
readonly samples: Record<string, PlaygroundSample>;
|
|
15
|
+
readonly links?: PlaygroundLinks;
|
|
17
16
|
}
|
|
18
17
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/vite/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC;IAC7E;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/vite/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC;IAC7E;;OAEG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;CAC3D;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACnD,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;CAClC"}
|
|
@@ -45,7 +45,12 @@ async function createBrowserHost(libsToLoad, importOptions = {}) {
|
|
|
45
45
|
const libraries = {};
|
|
46
46
|
for (const libName of libsToLoad) {
|
|
47
47
|
const { _TypeSpecLibrary_, $lib } = (await importLibrary(libName, importOptions));
|
|
48
|
-
libraries[libName] = {
|
|
48
|
+
libraries[libName] = {
|
|
49
|
+
name: libName,
|
|
50
|
+
isEmitter: $lib === null || $lib === void 0 ? void 0 : $lib.emitter,
|
|
51
|
+
definition: $lib,
|
|
52
|
+
packageJson: JSON.parse(_TypeSpecLibrary_.typespecSourceFiles["package.json"]),
|
|
53
|
+
};
|
|
49
54
|
for (const [key, value] of Object.entries(_TypeSpecLibrary_.typespecSourceFiles)) {
|
|
50
55
|
virtualFs.set(`/test/node_modules/${libName}/${key}`, value);
|
|
51
56
|
}
|
|
@@ -468,7 +473,7 @@ async function registerMonacoLanguage(host) {
|
|
|
468
473
|
releaseDocumentSemanticTokens() { },
|
|
469
474
|
});
|
|
470
475
|
}
|
|
471
|
-
function
|
|
476
|
+
function getMonacoRange(typespecCompiler, target) {
|
|
472
477
|
const loc = typespecCompiler.getSourceLocation(target);
|
|
473
478
|
if (loc === undefined || loc.file.path !== "/test/main.tsp") {
|
|
474
479
|
return {
|
|
@@ -539,13 +544,16 @@ function createUrlStateStorage(schema) {
|
|
|
539
544
|
}
|
|
540
545
|
}
|
|
541
546
|
function save(data) {
|
|
542
|
-
const params = new URLSearchParams();
|
|
547
|
+
const params = new URLSearchParams(location.search);
|
|
543
548
|
for (const [key, item] of Object.entries(schema)) {
|
|
544
549
|
const value = data[key];
|
|
545
550
|
if (value) {
|
|
546
551
|
const serialized = serialize(item, value);
|
|
547
552
|
const compressed = compress(item, serialized);
|
|
548
|
-
params.
|
|
553
|
+
params.set(item.queryParam, compressed);
|
|
554
|
+
}
|
|
555
|
+
else {
|
|
556
|
+
params.delete(item.queryParam);
|
|
549
557
|
}
|
|
550
558
|
}
|
|
551
559
|
history.pushState(null, "", window.location.pathname + "?" + params.toString());
|
|
@@ -568,5 +576,5 @@ function createUrlStateStorage(schema) {
|
|
|
568
576
|
}
|
|
569
577
|
}
|
|
570
578
|
|
|
571
|
-
export { createUrlStateStorage as a, createBrowserHost as c,
|
|
572
|
-
//# sourceMappingURL=state-storage-
|
|
579
|
+
export { createUrlStateStorage as a, createBrowserHost as c, getMonacoRange as g, registerMonacoLanguage as r };
|
|
580
|
+
//# sourceMappingURL=state-storage-5b3bbcd1.js.map
|