@typespec/playground 0.4.0-dev.0 → 0.4.0-dev.5

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 (35) hide show
  1. package/dist/manifest-DR4jWHsG-DR4jWHsG.js +6 -0
  2. package/dist/react/index.js +54265 -922
  3. package/dist/react/viewers/index.js +1 -1
  4. package/dist/{react-wrapper-CT3xxCSW.js → react-wrapper-BE4armyk.js} +1 -1
  5. package/dist/src/editor-command-bar/editor-command-bar.d.ts +2 -1
  6. package/dist/src/editor-command-bar/editor-command-bar.d.ts.map +1 -1
  7. package/dist/src/react/context/playground-context.d.ts +1 -0
  8. package/dist/src/react/context/playground-context.d.ts.map +1 -1
  9. package/dist/src/react/diagnostic-list/diagnostic-list.d.ts.map +1 -1
  10. package/dist/src/react/editor.d.ts.map +1 -1
  11. package/dist/src/react/file-output/file-output.d.ts.map +1 -1
  12. package/dist/src/react/footer/footer-version-item.d.ts +0 -1
  13. package/dist/src/react/footer/footer-version-item.d.ts.map +1 -1
  14. package/dist/src/react/index.d.ts +1 -0
  15. package/dist/src/react/index.d.ts.map +1 -1
  16. package/dist/src/react/output-view/file-viewer.d.ts.map +1 -1
  17. package/dist/src/react/output-view/output-view.d.ts.map +1 -1
  18. package/dist/src/react/output-view/type-graph-viewer.d.ts.map +1 -1
  19. package/dist/src/react/playground.d.ts +2 -0
  20. package/dist/src/react/playground.d.ts.map +1 -1
  21. package/dist/src/react/settings/emitter-options-form.d.ts.map +1 -1
  22. package/dist/style.css +374 -82
  23. package/package.json +23 -21
  24. package/dist/src/react/hooks.d.ts +0 -15
  25. package/dist/src/react/hooks.d.ts.map +0 -1
  26. package/dist/src/react/split-pane/index.d.ts +0 -2
  27. package/dist/src/react/split-pane/index.d.ts.map +0 -1
  28. package/dist/src/react/split-pane/pane.d.ts +0 -8
  29. package/dist/src/react/split-pane/pane.d.ts.map +0 -1
  30. package/dist/src/react/split-pane/sash-content.d.ts +0 -9
  31. package/dist/src/react/split-pane/sash-content.d.ts.map +0 -1
  32. package/dist/src/react/split-pane/sash.d.ts +0 -13
  33. package/dist/src/react/split-pane/sash.d.ts.map +0 -1
  34. package/dist/src/react/split-pane/split-pane.d.ts +0 -19
  35. package/dist/src/react/split-pane/split-pane.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typespec/playground",
3
- "version": "0.4.0-dev.0",
3
+ "version": "0.4.0-dev.5",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec playground UI components.",
6
6
  "homepage": "https://typespec.io",
@@ -55,8 +55,8 @@
55
55
  "!dist/test/**"
56
56
  ],
57
57
  "dependencies": {
58
- "@fluentui/react-components": "~9.52.0",
59
- "@fluentui/react-icons": "^2.0.240",
58
+ "@fluentui/react-components": "~9.54.2",
59
+ "@fluentui/react-icons": "^2.0.247",
60
60
  "@typespec/bundler": "~0.1.4 || >=0.2.0-dev <0.2.0",
61
61
  "@typespec/compiler": "~0.57.0 || >=0.58.0-dev <0.58.0",
62
62
  "@typespec/html-program-viewer": "~0.57.0 || >=0.58.0-dev <0.58.0",
@@ -67,39 +67,41 @@
67
67
  "@typespec/rest": "~0.57.0 || >=0.58.0-dev <0.58.0",
68
68
  "@typespec/versioning": "~0.57.0 || >=0.58.0-dev <0.58.0",
69
69
  "clsx": "^2.1.1",
70
- "debounce": "~2.0.0",
70
+ "debounce": "~2.1.0",
71
71
  "lzutf8": "0.6.3",
72
72
  "monaco-editor": "~0.46.0",
73
73
  "react": "~18.3.1",
74
74
  "react-dom": "~18.3.1",
75
- "swagger-ui-dist": "^5.17.10",
75
+ "react-error-boundary": "^4.0.13",
76
+ "swagger-ui-dist": "^5.17.14",
76
77
  "vscode-languageserver": "~9.0.1",
77
78
  "vscode-languageserver-textdocument": "~1.0.11"
78
79
  },
79
80
  "devDependencies": {
80
- "@babel/core": "^7.24.5",
81
- "@playwright/test": "^1.44.0",
82
- "@storybook/addon-actions": "^8.1.2",
83
- "@storybook/cli": "^8.1.2",
84
- "@storybook/react": "^8.1.2",
85
- "@storybook/react-vite": "^8.1.2",
86
- "@storybook/test": "^8.1.2",
87
- "@storybook/types": "^8.1.2",
81
+ "@babel/core": "^7.24.7",
82
+ "@playwright/test": "^1.45.0",
83
+ "@storybook/addon-actions": "^8.1.11",
84
+ "@storybook/cli": "^8.1.11",
85
+ "@storybook/react-vite": "^8.1.11",
86
+ "@storybook/react": "^8.1.11",
87
+ "@storybook/test": "^8.1.11",
88
+ "@storybook/types": "^8.1.11",
88
89
  "@types/debounce": "~1.2.4",
89
90
  "@types/node": "~18.11.19",
90
- "@types/react": "~18.3.2",
91
91
  "@types/react-dom": "~18.3.0",
92
- "@types/swagger-ui-dist": "~3.30.4",
92
+ "@types/react": "~18.3.3",
93
+ "@types/swagger-ui-dist": "~3.30.5",
93
94
  "@typespec/bundler": "~0.1.4 || >=0.2.0-dev <0.2.0",
94
- "@vitejs/plugin-react": "~4.2.1",
95
- "c8": "^9.1.0",
95
+ "@vitejs/plugin-react": "~4.3.1",
96
+ "c8": "^10.1.2",
96
97
  "cross-env": "~7.0.3",
97
98
  "es-module-shims": "~1.10.0",
98
99
  "rimraf": "~5.0.7",
99
- "typescript": "~5.4.5",
100
- "vite": "^5.2.11",
101
- "vite-plugin-checker": "^0.6.4",
102
- "vite-plugin-dts": "^3.9.1"
100
+ "typescript": "~5.5.3",
101
+ "vite-plugin-checker": "^0.7.0",
102
+ "vite-plugin-dts": "^3.9.1",
103
+ "vite": "^5.3.2",
104
+ "@typespec/react-components": "~0.57.0"
103
105
  },
104
106
  "peerDependencies": {},
105
107
  "scripts": {
@@ -1,15 +0,0 @@
1
- /// <reference types="react" resolution-mode="require"/>
2
- /**
3
- * Hook to manage a value that could be either controlled or uncontrolled, such as a checked state or
4
- * text box string.
5
- * @param controlledValue - The controlled value passed in the props. This value will always be used if provided,
6
- * and the internal state will be updated to reflect it.
7
- * @param defaultUncontrolledValue - Initial value for the internal state in the uncontrolled case.
8
- * @returns An array of the current value and an updater callback. Like `React.useState`, the updater
9
- * callback always has the same identity, and it can take either a new value, or a function which
10
- * is passed the previous value and returns the new value.
11
- * @see https://reactjs.org/docs/uncontrolled-components.html
12
- */
13
- export declare function useControllableValue<TValue>(controlledValue: TValue | undefined, defaultUncontrolledValue: TValue | undefined, onChange?: (value: TValue) => void | undefined): readonly [TValue, (update: TValue) => void];
14
- export declare function useAsyncMemo<T>(callback: () => Promise<T>, defaultValue: T, deps?: React.DependencyList): T;
15
- //# sourceMappingURL=hooks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/react/hooks.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EACzC,eAAe,EAAE,MAAM,GAAG,SAAS,EACnC,wBAAwB,EAAE,MAAM,GAAG,SAAS,EAC5C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,SAAS,GAC7C,SAAS,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,CAkC7C;AAED,wBAAgB,YAAY,CAAC,CAAC,EAC5B,QAAQ,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAC1B,YAAY,EAAE,CAAC,EACf,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,GAC1B,CAAC,CASH"}
@@ -1,2 +0,0 @@
1
- export { SplitPane, type SplitPaneProps } from './split-pane.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react/split-pane/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
@@ -1,8 +0,0 @@
1
- import { HTMLAttributes, PropsWithChildren } from 'react';
2
-
3
- export interface PaneProps {
4
- maxSize?: number | string;
5
- minSize?: number | string;
6
- }
7
- export default function Pane({ children, ...props }: PropsWithChildren<HTMLAttributes<HTMLDivElement> & PaneProps>): import("react/jsx-runtime").JSX.Element;
8
- //# sourceMappingURL=pane.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pane.d.ts","sourceRoot":"","sources":["../../../../src/react/split-pane/pane.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/D,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"}
@@ -1,9 +0,0 @@
1
- import { ReactNode } from 'react';
2
-
3
- export interface SashContentProps {
4
- className?: string;
5
- dragging?: boolean;
6
- children?: ReactNode;
7
- }
8
- export declare const SashContent: React.FunctionComponent<SashContentProps>;
9
- //# sourceMappingURL=sash-content.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sash-content.d.ts","sourceRoot":"","sources":["../../../../src/react/split-pane/sash-content.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAkBjE,CAAC"}
@@ -1,13 +0,0 @@
1
- import { ReactNode } from 'react';
2
-
3
- export interface SashProps {
4
- className?: string;
5
- style: React.CSSProperties;
6
- render: (dragging: boolean) => ReactNode;
7
- onReset: () => void;
8
- onDragStart: React.MouseEventHandler<HTMLDivElement>;
9
- onDragging: React.MouseEventHandler<HTMLDivElement>;
10
- onDragEnd: React.MouseEventHandler<HTMLDivElement>;
11
- }
12
- export declare const Sash: ({ className, render, onDragStart, onDragging, onDragEnd, onReset, ...others }: SashProps) => import("react/jsx-runtime").JSX.Element;
13
- //# sourceMappingURL=sash.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sash.d.ts","sourceRoot":"","sources":["../../../../src/react/split-pane/sash.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjD,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"}
@@ -1,19 +0,0 @@
1
- import { FunctionComponent, JSX, MouseEvent } from 'react';
2
-
3
- export interface SplitPaneProps {
4
- children: JSX.Element[];
5
- allowResize?: boolean;
6
- split?: "vertical" | "horizontal";
7
- initialSizes?: (string | number)[];
8
- sizes?: (string | number | undefined)[];
9
- sashRender?: (index: number, active: boolean) => React.ReactNode;
10
- onChange?: (sizes: number[]) => void;
11
- onDragStart?: (e: MouseEvent) => void;
12
- onDragEnd?: (e: MouseEvent) => void;
13
- className?: string;
14
- sashClassName?: string;
15
- performanceMode?: boolean;
16
- resizerSize?: number;
17
- }
18
- export declare const SplitPane: FunctionComponent<SplitPaneProps>;
19
- //# sourceMappingURL=split-pane.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"split-pane.d.ts","sourceRoot":"","sources":["../../../../src/react/split-pane/split-pane.tsx"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,iBAAiB,EACtB,KAAK,GAAG,EACR,KAAK,UAAU,EAChB,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"}