@typespec/playground 0.12.0-dev.5 → 0.12.0-dev.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"editor-command-bar.d.ts","sourceRoot":"","sources":["../../../src/editor-command-bar/editor-command-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAW,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIxE,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGjE,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,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACrC,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,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,CA2ErE,CAAC"}
1
+ {"version":3,"file":"editor-command-bar.d.ts","sourceRoot":"","sources":["../../../src/editor-command-bar/editor-command-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAW,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIxE,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGjE,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,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACrC,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,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,CA0ErE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { SamplesDrawerTrigger, type SamplesDrawerProps } from './samples-drawer-trigger.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react/samples-drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { PlaygroundSample } from '../../types.js';
3
+ export interface SampleCardProps {
4
+ name: string;
5
+ sample: PlaygroundSample;
6
+ onSelect: (name: string) => void;
7
+ }
8
+ export declare const SampleCard: FunctionComponent<SampleCardProps>;
9
+ //# sourceMappingURL=sample-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sample-card.d.ts","sourceRoot":"","sources":["../../../../src/react/samples-drawer/sample-card.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIvD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CA6BzD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { FunctionComponent } from 'react';
2
+ export interface SampleIconProps {
3
+ name: string;
4
+ }
5
+ export declare const SampleIcon: FunctionComponent<SampleIconProps>;
6
+ //# sourceMappingURL=sample-icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sample-icon.d.ts","sourceRoot":"","sources":["../../../../src/react/samples-drawer/sample-icon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAgCxD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,CAqEzD,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent } from 'react';
2
+ import { PlaygroundSample } from '../../types.js';
3
+ export interface SamplesDrawerProps {
4
+ samples: Record<string, PlaygroundSample>;
5
+ onSelectedSampleNameChange: (sampleName: string) => void;
6
+ }
7
+ export declare const SamplesDrawerTrigger: FunctionComponent<SamplesDrawerProps>;
8
+ //# sourceMappingURL=samples-drawer-trigger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"samples-drawer-trigger.d.ts","sourceRoot":"","sources":["../../../../src/react/samples-drawer/samples-drawer-trigger.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAyB,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIvD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC1C,0BAA0B,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1D;AAED,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,CAAC,kBAAkB,CAwDtE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tooling/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD;;GAEG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,iBAyBhD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tooling/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD;;GAEG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,iBA0BhD"}
@@ -3,6 +3,10 @@ export interface PlaygroundSample {
3
3
  filename: string;
4
4
  preferredEmitter?: string;
5
5
  content: string;
6
+ /**
7
+ * A short description of what this sample demonstrates.
8
+ */
9
+ description?: string;
6
10
  /**
7
11
  * Compiler options for the sample.
8
12
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAE5B,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;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;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
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;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;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;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"}
package/dist/style.css CHANGED
@@ -175,6 +175,82 @@
175
175
  ._tree-row_16t0l_4 ._column_16t0l_44:last-child {
176
176
  margin-right: 5px;
177
177
  }
178
+ ._samples-grid_1dkte_1 {
179
+ display: grid;
180
+ grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
181
+ gap: 16px;
182
+ padding: 8px 0;
183
+ }
184
+
185
+ ._sample-card_1dkte_8 {
186
+ cursor: pointer;
187
+ padding: 16px;
188
+ transition:
189
+ box-shadow 0.2s ease,
190
+ border-color 0.2s ease;
191
+ min-height: 100px;
192
+ }
193
+
194
+ ._sample-card_1dkte_8:hover {
195
+ box-shadow: var(--shadow8);
196
+ }
197
+
198
+ ._sample-card_1dkte_8:focus-visible {
199
+ outline: 2px solid var(--colorBrandStroke1);
200
+ outline-offset: 2px;
201
+ }
202
+
203
+ ._sample-card-content_1dkte_26 {
204
+ display: flex;
205
+ gap: 16px;
206
+ align-items: flex-start;
207
+ }
208
+
209
+ ._sample-card-text_1dkte_32 {
210
+ display: flex;
211
+ flex-direction: column;
212
+ gap: 4px;
213
+ flex: 1;
214
+ min-width: 0;
215
+ }
216
+
217
+ ._sample-icon_1dkte_40 {
218
+ width: 48px;
219
+ height: 48px;
220
+ border-radius: 8px;
221
+ flex-shrink: 0;
222
+ position: relative;
223
+ display: flex;
224
+ align-items: center;
225
+ justify-content: center;
226
+ overflow: hidden;
227
+ user-select: none;
228
+ }
229
+
230
+ ._sample-icon-pattern_1dkte_53 {
231
+ position: absolute;
232
+ top: 0;
233
+ left: 0;
234
+ }
235
+
236
+ ._sample-icon-initials_1dkte_59 {
237
+ position: relative;
238
+ font-size: 16px;
239
+ font-weight: 600;
240
+ z-index: 1;
241
+ }
242
+
243
+ ._sample-title_1dkte_66 {
244
+ font-size: var(--fontSizeBase400);
245
+ margin: 0;
246
+ }
247
+
248
+ ._sample-description_1dkte_71 {
249
+ font-size: var(--fontSizeBase200);
250
+ color: var(--colorNeutralForeground2);
251
+ margin: 0;
252
+ line-height: 1.4;
253
+ }
178
254
  ._form_sqeas_1 {
179
255
  display: flex;
180
256
  flex-direction: column;
@@ -9,6 +9,7 @@ async function buildSamples_experimental(rootDir, output, samples) {
9
9
  filename: config.filename,
10
10
  content,
11
11
  preferredEmitter: config.preferredEmitter,
12
+ description: config.description,
12
13
  compilerOptions: config.compilerOptions
13
14
  };
14
15
  }
@@ -0,0 +1,3 @@
1
+ declare const _default: import('vite').UserConfig;
2
+ export default _default;
3
+ //# sourceMappingURL=vite.storybook.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.storybook.config.d.ts","sourceRoot":"","sources":["../vite.storybook.config.ts"],"names":[],"mappings":";AAIA,wBAWG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typespec/playground",
3
- "version": "0.12.0-dev.5",
3
+ "version": "0.12.0-dev.7",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec playground UI components.",
6
6
  "homepage": "https://typespec.io",
@@ -61,21 +61,21 @@
61
61
  "dependencies": {
62
62
  "@fluentui/react-components": "~9.72.3",
63
63
  "@fluentui/react-icons": "^2.0.292",
64
- "@typespec/bundler": "^0.4.6 || >=0.5.0-dev <0.5.0",
65
- "@typespec/compiler": "^1.7.1",
66
- "@typespec/html-program-viewer": "^0.77.0 || >=0.78.0-dev <0.78.0",
67
- "@typespec/http": "^1.7.0",
68
- "@typespec/openapi": "^1.7.0",
69
- "@typespec/openapi3": "^1.7.0",
70
- "@typespec/protobuf": "^0.77.0 || >=0.78.0-dev <0.78.0",
71
- "@typespec/rest": "^0.77.0 || >=0.78.0-dev <0.78.0",
72
- "@typespec/versioning": "^0.77.0 || >=0.78.0-dev <0.78.0",
64
+ "@typespec/bundler": "^0.4.7 || >=0.5.0-dev <0.5.0",
65
+ "@typespec/compiler": "^1.8.0",
66
+ "@typespec/html-program-viewer": "^0.78.0 || >=0.79.0-dev <0.79.0",
67
+ "@typespec/http": "^1.8.0",
68
+ "@typespec/openapi": "^1.8.0",
69
+ "@typespec/openapi3": "^1.8.0",
70
+ "@typespec/protobuf": "^0.78.0 || >=0.79.0-dev <0.79.0",
71
+ "@typespec/rest": "^0.78.0 || >=0.79.0-dev <0.79.0",
72
+ "@typespec/versioning": "^0.78.0 || >=0.79.0-dev <0.79.0",
73
73
  "clsx": "^2.1.1",
74
74
  "debounce": "~3.0.0",
75
75
  "lzutf8": "0.6.3",
76
76
  "monaco-editor": "~0.55.0",
77
- "react": "~18.3.1",
78
- "react-dom": "~18.3.1",
77
+ "react": "~19.2.3",
78
+ "react-dom": "~19.2.3",
79
79
  "react-error-boundary": "^6.0.0",
80
80
  "swagger-ui-dist": "^5.20.1",
81
81
  "vscode-languageserver": "~9.0.1",
@@ -91,11 +91,11 @@
91
91
  "@types/react": "~19.2.7",
92
92
  "@types/react-dom": "~19.2.2",
93
93
  "@types/swagger-ui-dist": "~3.30.5",
94
- "@typespec/bundler": "^0.4.6 || >=0.5.0-dev <0.5.0",
94
+ "@typespec/bundler": "^0.4.7 || >=0.5.0-dev <0.5.0",
95
95
  "@vitejs/plugin-react": "~5.1.2",
96
96
  "c8": "^10.1.3",
97
97
  "cross-env": "~10.1.0",
98
- "es-module-shims": "~2.7.0",
98
+ "es-module-shims": "~2.8.0",
99
99
  "rimraf": "~6.1.2",
100
100
  "storybook": "^10.1.8",
101
101
  "typescript": "~5.9.2",
@@ -1,4 +0,0 @@
1
- import { StorybookConfig } from '@storybook/react-vite';
2
- declare const config: StorybookConfig;
3
- export default config;
4
- //# sourceMappingURL=main.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../.storybook/main.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE/E,QAAA,MAAM,MAAM,EAAE,eAcb,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,4 +0,0 @@
1
- import { Preview } from '@storybook/react-vite';
2
- declare const preview: Preview;
3
- export default preview;
4
- //# sourceMappingURL=preview.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../.storybook/preview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD,QAAA,MAAM,OAAO,EAAE,OAUd,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1,9 +0,0 @@
1
- import { FunctionComponent } from 'react';
2
- import { PlaygroundSample } from '../types.js';
3
- export interface SamplesDropdownProps {
4
- samples: Record<string, PlaygroundSample>;
5
- selectedSampleName: string;
6
- onSelectedSampleNameChange: (sampleName: string) => void;
7
- }
8
- export declare const SamplesDropdown: FunctionComponent<SamplesDropdownProps>;
9
- //# sourceMappingURL=samples-dropdown.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"samples-dropdown.d.ts","sourceRoot":"","sources":["../../../src/react/samples-dropdown.tsx"],"names":[],"mappings":"AACA,OAAO,EAAe,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,0BAA0B,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1D;AAED,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,CA8BnE,CAAC"}