@typespec/playground 0.5.0-dev.4 → 0.5.0-dev.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/.storybook/main.d.ts +0 -1
  2. package/dist/.storybook/preview.d.ts +0 -1
  3. package/dist/manifest-onl5D1yL-onl5D1yL.js +6 -0
  4. package/dist/react/index.js +356 -333
  5. package/dist/src/browser-host.d.ts +0 -1
  6. package/dist/src/editor-command-bar/editor-command-bar.d.ts +0 -1
  7. package/dist/src/manifest.d.ts +0 -1
  8. package/dist/src/react/context/playground-context.d.ts +0 -1
  9. package/dist/src/react/default-footer.d.ts +0 -1
  10. package/dist/src/react/diagnostic-list/diagnostic-list.d.ts +0 -1
  11. package/dist/src/react/editor.d.ts +0 -1
  12. package/dist/src/react/emitter-dropdown.d.ts +0 -1
  13. package/dist/src/react/file-output/file-output.d.ts +0 -1
  14. package/dist/src/react/footer/footer-item.d.ts +0 -1
  15. package/dist/src/react/footer/footer.d.ts +0 -1
  16. package/dist/src/react/output-tabs/output-tabs.d.ts +0 -1
  17. package/dist/src/react/output-view/file-viewer.d.ts +0 -1
  18. package/dist/src/react/output-view/output-view.d.ts +0 -1
  19. package/dist/src/react/output-view/type-graph-viewer.d.ts +0 -1
  20. package/dist/src/react/playground.d.ts +0 -1
  21. package/dist/src/react/problem-pane/header.d.ts +0 -1
  22. package/dist/src/react/problem-pane/problem-pane.d.ts +0 -1
  23. package/dist/src/react/samples-dropdown.d.ts +0 -1
  24. package/dist/src/react/settings/compiler-settings-dialog-button.d.ts +0 -1
  25. package/dist/src/react/settings/compiler-settings.d.ts +0 -1
  26. package/dist/src/react/settings/emitter-options-form.d.ts +0 -1
  27. package/dist/src/react/settings/linter-form.d.ts +0 -1
  28. package/dist/src/react/standalone.d.ts +0 -1
  29. package/dist/src/react/types.d.ts +0 -1
  30. package/dist/src/react/typespec-editor.d.ts +0 -1
  31. package/dist/src/react/viewers/index.d.ts +0 -1
  32. package/dist/src/react/viewers/swagger-ui.d.ts +0 -1
  33. package/dist/src/services.d.ts +0 -1
  34. package/dist/src/tooling/index.d.ts +0 -1
  35. package/dist/src/tooling/types.d.ts +0 -1
  36. package/dist/src/types.d.ts +0 -1
  37. package/dist/src/vite/index.d.ts +0 -1
  38. package/dist/src/vite/types.d.ts +0 -1
  39. package/dist/stories/footer/footer-item.stories.d.ts +0 -1
  40. package/dist/stories/footer/footer-version-item.stories.d.ts +0 -1
  41. package/dist/stories/footer/footer.stories.d.ts +0 -1
  42. package/dist/stories/playground.stories.d.ts +0 -1
  43. package/dist/vite.config.d.ts +1 -1
  44. package/package.json +29 -35
  45. package/dist/manifest-Cewnx59A-Cewnx59A.js +0 -6
@@ -1,6 +1,5 @@
1
1
  import { LibraryImportOptions } from './core.js';
2
2
  import { BrowserHost } from './types.js';
3
-
4
3
  export declare function resolveVirtualPath(path: string, ...paths: string[]): string;
5
4
  /**
6
5
  * Create the browser host from the list of libraries.
@@ -1,7 +1,6 @@
1
1
  import { CompilerOptions } from '@typespec/compiler';
2
2
  import { FunctionComponent, ReactNode } from 'react';
3
3
  import { BrowserHost, PlaygroundSample } from '../types.js';
4
-
5
4
  export interface EditorCommandBarProps {
6
5
  documentationUrl?: string;
7
6
  saveCode: () => Promise<void> | void;
@@ -1,5 +1,4 @@
1
1
  import { PlaygroundConfig } from '../src/vite/types.js';
2
-
3
2
  declare const config: PlaygroundConfig;
4
3
  export default config;
5
4
  //# sourceMappingURL=manifest.d.ts.map
@@ -1,5 +1,4 @@
1
1
  import { BrowserHost } from '../../types.js';
2
-
3
2
  export interface PlaygroundContext {
4
3
  readonly host: BrowserHost;
5
4
  readonly setContent: (content: string) => void;
@@ -1,4 +1,3 @@
1
1
  import { FunctionComponent } from 'react';
2
-
3
2
  export declare const DefaultFooter: FunctionComponent;
4
3
  //# sourceMappingURL=default-footer.d.ts.map
@@ -1,6 +1,5 @@
1
1
  import { Diagnostic } from '@typespec/compiler';
2
2
  import { FunctionComponent } from 'react';
3
-
4
3
  export interface DiagnosticListProps {
5
4
  readonly diagnostics: readonly Diagnostic[];
6
5
  readonly onDiagnosticSelected?: (diagnostic: Diagnostic) => void;
@@ -1,6 +1,5 @@
1
1
  import { editor } from 'monaco-editor';
2
2
  import { FunctionComponent } from 'react';
3
-
4
3
  export interface EditorProps {
5
4
  model: editor.IModel;
6
5
  actions?: editor.IActionDescriptor[];
@@ -1,5 +1,4 @@
1
1
  import { FunctionComponent } from 'react';
2
-
3
2
  export type EmitterDropdownProps = {
4
3
  emitters: string[];
5
4
  selectedEmitter: string;
@@ -1,6 +1,5 @@
1
1
  import { FunctionComponent } from 'react';
2
2
  import { FileOutputViewer } from '../types.js';
3
-
4
3
  export interface FileOutputProps {
5
4
  readonly filename: string;
6
5
  readonly content: string;
@@ -1,5 +1,4 @@
1
1
  import { FunctionComponent, ReactNode } from 'react';
2
-
3
2
  export interface FooterItemProps {
4
3
  className?: string;
5
4
  link?: string;
@@ -1,5 +1,4 @@
1
1
  import { FunctionComponent, ReactNode } from 'react';
2
-
3
2
  export interface FooterProps {
4
3
  className?: string;
5
4
  children: ReactNode;
@@ -1,5 +1,4 @@
1
1
  import { FunctionComponent } from 'react';
2
-
3
2
  export interface OutputTabsProps {
4
3
  filenames: string[];
5
4
  selected: string;
@@ -1,4 +1,3 @@
1
1
  import { FileOutputViewer, ProgramViewer } from '../types.js';
2
-
3
2
  export declare function createFileViewer(fileViewers: FileOutputViewer[]): ProgramViewer;
4
3
  //# sourceMappingURL=file-viewer.d.ts.map
@@ -1,7 +1,6 @@
1
1
  import { FunctionComponent } from 'react';
2
2
  import { PlaygroundEditorsOptions } from '../playground.js';
3
3
  import { CompilationState, FileOutputViewer, ProgramViewer } from '../types.js';
4
-
5
4
  export interface OutputViewProps {
6
5
  compilationState: CompilationState | undefined;
7
6
  editorOptions?: PlaygroundEditorsOptions;
@@ -1,4 +1,3 @@
1
1
  import { ProgramViewer } from '../types.js';
2
-
3
2
  export declare const TypeGraphViewer: ProgramViewer;
4
3
  //# sourceMappingURL=type-graph-viewer.d.ts.map
@@ -2,7 +2,6 @@ import { CompilerOptions } from '@typespec/compiler';
2
2
  import { FunctionComponent, ReactNode } from 'react';
3
3
  import { BrowserHost, PlaygroundSample } from '../types.js';
4
4
  import { FileOutputViewer, ProgramViewer } from './types.js';
5
-
6
5
  export interface PlaygroundProps {
7
6
  host: BrowserHost;
8
7
  /** Default emitter if leaving this unmanaged. */
@@ -1,6 +1,5 @@
1
1
  import { MouseEventHandler } from 'react';
2
2
  import { CompilationState } from '../types.js';
3
-
4
3
  export interface ProblemPaneHeaderProps {
5
4
  compilationState: CompilationState | undefined;
6
5
  onClick?: MouseEventHandler<HTMLDivElement>;
@@ -1,7 +1,6 @@
1
1
  import { Diagnostic } from '@typespec/compiler';
2
2
  import { FunctionComponent, MouseEventHandler } from 'react';
3
3
  import { CompilationState } from '../types.js';
4
-
5
4
  export interface ProblemPaneProps {
6
5
  readonly collapsed: boolean;
7
6
  readonly compilationState: CompilationState | undefined;
@@ -1,6 +1,5 @@
1
1
  import { FunctionComponent } from 'react';
2
2
  import { PlaygroundSample } from '../types.js';
3
-
4
3
  export interface SamplesDropdownProps {
5
4
  samples: Record<string, PlaygroundSample>;
6
5
  selectedSampleName: string;
@@ -1,5 +1,4 @@
1
1
  import { CompilerOptions } from '@typespec/compiler';
2
-
3
2
  export interface CompilerSettingsDialogButtonProps {
4
3
  selectedEmitter: string;
5
4
  compilerOptions: CompilerOptions;
@@ -1,7 +1,6 @@
1
1
  import { CompilerOptions } from '@typespec/compiler';
2
2
  import { FunctionComponent } from 'react';
3
3
  import { BrowserHost } from '../../types.js';
4
-
5
4
  export interface CompilerSettingsProps {
6
5
  readonly host: BrowserHost;
7
6
  readonly selectedEmitter: string;
@@ -1,7 +1,6 @@
1
1
  import { FunctionComponent } from 'react';
2
2
  import { PlaygroundTspLibrary } from '../../types.js';
3
3
  import { EmitterOptions } from '../types.js';
4
-
5
4
  export interface EmitterOptionsFormProps {
6
5
  readonly library: PlaygroundTspLibrary;
7
6
  readonly options: EmitterOptions;
@@ -1,7 +1,6 @@
1
1
  import { LinterRuleSet } from '@typespec/compiler';
2
2
  import { FunctionComponent } from 'react';
3
3
  import { PlaygroundTspLibrary } from '../../types.js';
4
-
5
4
  export interface LinterFormProps {
6
5
  libraries: Record<string, PlaygroundTspLibrary>;
7
6
  linterRuleSet: LinterRuleSet;
@@ -2,7 +2,6 @@ import { FunctionComponent, ReactNode } from 'react';
2
2
  import { LibraryImportOptions } from '../core.js';
3
3
  import { UrlStateStorage } from '../state-storage.js';
4
4
  import { PlaygroundProps, PlaygroundSaveData } from './playground.js';
5
-
6
5
  export interface ReactPlaygroundConfig extends Partial<PlaygroundProps> {
7
6
  readonly libraries: readonly string[];
8
7
  readonly importConfig?: LibraryImportOptions;
@@ -1,6 +1,5 @@
1
1
  import { Program } from '@typespec/compiler';
2
2
  import { ReactNode } from 'react';
3
-
4
3
  export type CompilationCrashed = {
5
4
  readonly internalCompilerError: any;
6
5
  };
@@ -2,7 +2,6 @@ import { editor } from 'monaco-editor';
2
2
  import { FunctionComponent } from 'react';
3
3
  import { EditorProps } from './editor.js';
4
4
  import { PlaygroundEditorsOptions } from './playground.js';
5
-
6
5
  export interface TypeSpecEditorProps extends Omit<EditorProps, "options"> {
7
6
  options?: editor.IStandaloneEditorConstructionOptions;
8
7
  }
@@ -1,4 +1,3 @@
1
1
  import { FileOutputViewer } from '../types.js';
2
-
3
2
  export declare const SwaggerUIViewer: FileOutputViewer;
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,4 @@
1
1
  import { FunctionComponent } from 'react';
2
-
3
2
  export interface SwaggerUIProps {
4
3
  readonly spec: string;
5
4
  }
@@ -1,6 +1,5 @@
1
1
  import { DiagnosticTarget, NoTarget } from '@typespec/compiler';
2
2
  import { BrowserHost } from './types.js';
3
-
4
3
  import * as monaco from "monaco-editor";
5
4
  export declare function registerMonacoLanguage(host: BrowserHost): Promise<void>;
6
5
  export declare function getMonacoRange(typespecCompiler: typeof import("@typespec/compiler"), target: DiagnosticTarget | typeof NoTarget): monaco.IRange;
@@ -1,5 +1,4 @@
1
1
  import { PlaygroundSampleConfig } from './types.js';
2
-
3
2
  /**
4
3
  * @experimental This API is experimental
5
4
  */
@@ -1,4 +1,3 @@
1
1
  import { PlaygroundSample } from '../types.js';
2
-
3
2
  export type PlaygroundSampleConfig = Omit<PlaygroundSample, "content">;
4
3
  //# sourceMappingURL=types.d.ts.map
@@ -1,5 +1,4 @@
1
1
  import { CompilerHost, CompilerOptions, LinterDefinition, NodePackage, TypeSpecLibrary } from '@typespec/compiler';
2
-
3
2
  export interface PlaygroundSample {
4
3
  filename: string;
5
4
  preferredEmitter?: string;
@@ -1,5 +1,4 @@
1
1
  import { UserConfig } from 'vite';
2
2
  import { PlaygroundUserConfig } from './types.js';
3
-
4
3
  export declare function definePlaygroundViteConfig(config: PlaygroundUserConfig): UserConfig;
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,6 @@
1
1
  import { PlaygroundLinks } from '../react/playground.js';
2
2
  import { PlaygroundSampleConfig } from '../tooling/types.js';
3
3
  import { PlaygroundSample } from '../types.js';
4
-
5
4
  export interface PlaygroundUserConfig extends Omit<PlaygroundConfig, "samples"> {
6
5
  /**
7
6
  * If the bundle library plugin should be loaded.
@@ -1,6 +1,5 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
2
  import { FooterItem } from '../../src/react/footer/index.js';
3
-
4
3
  declare const meta: Meta<typeof FooterItem>;
5
4
  export default meta;
6
5
  type Story = StoryObj<typeof FooterItem>;
@@ -1,6 +1,5 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
2
  import { FooterVersionItem } from '../../src/react/footer/index.js';
3
-
4
3
  declare const meta: Meta<typeof FooterVersionItem>;
5
4
  export default meta;
6
5
  type Story = StoryObj<typeof FooterVersionItem>;
@@ -1,6 +1,5 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
2
  import { Footer } from '../../src/react/footer/index.js';
3
-
4
3
  declare const meta: Meta<typeof Footer>;
5
4
  export default meta;
6
5
  type Story = StoryObj<typeof Footer>;
@@ -1,6 +1,5 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
2
  import { Playground } from '../src/react/playground.js';
3
-
4
3
  declare const meta: Meta<typeof Playground>;
5
4
  export default meta;
6
5
  type Story = StoryObj<typeof Playground>;
@@ -1,3 +1,3 @@
1
- declare const _default: any;
1
+ declare const _default: import('vite').UserConfig;
2
2
  export default _default;
3
3
  //# sourceMappingURL=vite.config.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typespec/playground",
3
- "version": "0.5.0-dev.4",
3
+ "version": "0.5.0-dev.6",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec playground UI components.",
6
6
  "homepage": "https://typespec.io",
@@ -20,32 +20,26 @@
20
20
  "main": "dist/src/index.js",
21
21
  "exports": {
22
22
  ".": {
23
- "development": "./src/index.ts",
24
23
  "types": "./dist/src/index.d.ts",
25
24
  "default": "./dist/index.js"
26
25
  },
27
26
  "./vite": {
28
- "development": "./src/vite/index.ts",
29
27
  "types": "./dist/src/vite/index.d.ts",
30
28
  "default": "./dist/vite/index.js"
31
29
  },
32
30
  "./tooling": {
33
- "development": "./src/tooling/index.ts",
34
31
  "types": "./dist/src/tooling/index.d.ts",
35
32
  "default": "./dist/tooling/index.js"
36
33
  },
37
34
  "./manifest": {
38
- "development": "./src/manifest.ts",
39
35
  "types": "./dist/src/manifest.d.ts",
40
36
  "default": "./dist/manifest.js"
41
37
  },
42
38
  "./react": {
43
- "development": "./src/react/index.ts",
44
39
  "types": "./dist/src/react/index.d.ts",
45
40
  "default": "./dist/react/index.js"
46
41
  },
47
42
  "./react/viewers": {
48
- "development": "./src/react/viewers/index.tsx",
49
43
  "types": "./dist/src/react/viewers/index.d.ts",
50
44
  "default": "./dist/react/viewers/index.js"
51
45
  },
@@ -61,19 +55,19 @@
61
55
  "!dist/test/**"
62
56
  ],
63
57
  "dependencies": {
64
- "@fluentui/react-components": "~9.54.5",
65
- "@fluentui/react-icons": "^2.0.249",
66
- "@typespec/bundler": "~0.1.6 || >=0.2.0-dev <0.2.0",
67
- "@typespec/compiler": "~0.59.1 || >=0.60.0-dev <0.60.0",
68
- "@typespec/html-program-viewer": "~0.59.0 || >=0.60.0-dev <0.60.0",
69
- "@typespec/http": "~0.59.1 || >=0.60.0-dev <0.60.0",
70
- "@typespec/openapi": "~0.59.0 || >=0.60.0-dev <0.60.0",
71
- "@typespec/openapi3": "~0.59.1 || >=0.60.0-dev <0.60.0",
72
- "@typespec/protobuf": "~0.59.0 || >=0.60.0-dev <0.60.0",
73
- "@typespec/rest": "~0.59.1 || >=0.60.0-dev <0.60.0",
74
- "@typespec/versioning": "~0.59.0 || >=0.60.0-dev <0.60.0",
58
+ "@fluentui/react-components": "~9.54.16",
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",
75
69
  "clsx": "^2.1.1",
76
- "debounce": "~2.1.0",
70
+ "debounce": "~2.1.1",
77
71
  "lzutf8": "0.6.3",
78
72
  "monaco-editor": "~0.46.0",
79
73
  "react": "~18.3.1",
@@ -81,32 +75,32 @@
81
75
  "react-error-boundary": "^4.0.13",
82
76
  "swagger-ui-dist": "^5.17.14",
83
77
  "vscode-languageserver": "~9.0.1",
84
- "vscode-languageserver-textdocument": "~1.0.11"
78
+ "vscode-languageserver-textdocument": "~1.0.12"
85
79
  },
86
80
  "devDependencies": {
87
- "@babel/core": "^7.24.9",
88
- "@playwright/test": "^1.45.3",
89
- "@storybook/addon-actions": "^8.2.5",
90
- "@storybook/cli": "^8.2.5",
91
- "@storybook/react": "^8.2.5",
92
- "@storybook/react-vite": "^8.2.5",
93
- "@storybook/test": "^8.2.5",
94
- "@storybook/types": "^8.2.5",
81
+ "@babel/core": "^7.25.2",
82
+ "@playwright/test": "^1.47.2",
83
+ "@storybook/addon-actions": "^8.3.3",
84
+ "@storybook/cli": "^8.3.3",
85
+ "@storybook/react": "^8.3.3",
86
+ "@storybook/react-vite": "^8.3.3",
87
+ "@storybook/test": "^8.3.3",
88
+ "@storybook/types": "^8.3.3",
95
89
  "@types/debounce": "~1.2.4",
96
- "@types/node": "~18.11.19",
97
- "@types/react": "~18.3.3",
90
+ "@types/node": "~22.7.1",
91
+ "@types/react": "~18.3.9",
98
92
  "@types/react-dom": "~18.3.0",
99
93
  "@types/swagger-ui-dist": "~3.30.5",
100
- "@typespec/bundler": "~0.1.6 || >=0.2.0-dev <0.2.0",
94
+ "@typespec/bundler": "~0.1.7 || >=0.2.0-dev <0.2.0",
101
95
  "@vitejs/plugin-react": "~4.3.1",
102
96
  "c8": "^10.1.2",
103
97
  "cross-env": "~7.0.3",
104
98
  "es-module-shims": "~1.10.0",
105
99
  "rimraf": "~6.0.1",
106
- "typescript": "~5.5.4",
107
- "vite": "^5.3.4",
108
- "vite-plugin-checker": "^0.7.2",
109
- "vite-plugin-dts": "4.0.0-beta.1",
100
+ "typescript": "~5.6.2",
101
+ "vite": "^5.4.8",
102
+ "vite-plugin-checker": "^0.8.0",
103
+ "vite-plugin-dts": "4.2.2",
110
104
  "@typespec/react-components": "~0.57.0"
111
105
  },
112
106
  "peerDependencies": {},
@@ -1,6 +0,0 @@
1
- const manifest = {
2
- "version": "0.59.1",
3
- "commit": "1c2154cbda982179c5e5d4950003ae266c3baa47"
4
- };
5
-
6
- export { manifest as default };