@vscode/component-explorer 0.2.1-58 → 0.2.1-59
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/README.md +39 -27
- package/dist/components/ExplorerModel.d.ts +5 -1
- package/dist/components/ExplorerModel.d.ts.map +1 -1
- package/dist/components/FixturePreviewItem.d.ts +2 -0
- package/dist/components/FixturePreviewItem.d.ts.map +1 -1
- package/dist/components/PreviewArea.d.ts.map +1 -1
- package/dist/components/RightSidebar.d.ts +8 -2
- package/dist/components/RightSidebar.d.ts.map +1 -1
- package/dist/core/ComponentRenderer.d.ts.map +1 -1
- package/dist/core/FixtureInputStore.d.ts +32 -0
- package/dist/core/FixtureInputStore.d.ts.map +1 -0
- package/dist/core/FixtureNode.d.ts.map +1 -1
- package/dist/core/fixtureApi.d.ts +70 -51
- package/dist/core/fixtureApi.d.ts.map +1 -1
- package/dist/core/fixtureApiConsumer.d.ts +15 -1
- package/dist/core/fixtureApiConsumer.d.ts.map +1 -1
- package/dist/core/index.d.ts +6 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/inputAggregation.d.ts +31 -0
- package/dist/core/inputAggregation.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{runtimeVersion-BTFY-Rus.js → runtimeVersion-pC8-qlOA.js} +47 -39
- package/dist/runtimeVersion-pC8-qlOA.js.map +1 -0
- package/dist/viewer.js +1416 -1241
- package/dist/viewer.js.map +1 -1
- package/package.json +3 -2
- package/dist/core/PropertySchema.d.ts +0 -40
- package/dist/core/PropertySchema.d.ts.map +0 -1
- package/dist/runtimeVersion-BTFY-Rus.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @vscode/component-explorer
|
|
2
2
|
|
|
3
|
-
Core library for the [Component Explorer](../../README.md). Contains the fixture API,
|
|
3
|
+
Core library for the [Component Explorer](../../README.md). Contains the fixture API, input schemas, fixture registry, and the Explorer React UI.
|
|
4
4
|
|
|
5
5
|
## Fixture API
|
|
6
6
|
|
|
@@ -10,46 +10,54 @@ Defines a single component fixture.
|
|
|
10
10
|
|
|
11
11
|
```tsx
|
|
12
12
|
import { defineFixture } from '@vscode/component-explorer';
|
|
13
|
+
import { z } from 'zod';
|
|
13
14
|
|
|
14
15
|
export default defineFixture({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
render: (container,
|
|
16
|
+
inputSchema: z.object({
|
|
17
|
+
label: z.string().default('Click me'),
|
|
18
|
+
disabled: z.boolean().default(false),
|
|
19
|
+
}),
|
|
20
|
+
render: (container, { input }) => {
|
|
20
21
|
const root = createRoot(container);
|
|
21
|
-
root.render(<Button label={
|
|
22
|
+
root.render(<Button label={input.label} disabled={input.disabled} />);
|
|
22
23
|
return { dispose: () => root.unmount() };
|
|
23
24
|
},
|
|
24
25
|
});
|
|
25
26
|
```
|
|
26
27
|
|
|
28
|
+
The `inputSchema` is a [zod](https://zod.dev) schema. It is converted to JSON Schema at define
|
|
29
|
+
time, and `input` (typed as `z.infer<typeof schema>`) is populated with the schema's defaults
|
|
30
|
+
plus any overrides set in the explorer's properties panel.
|
|
31
|
+
|
|
27
32
|
Options:
|
|
28
33
|
|
|
29
34
|
| Option | Type | Default | Description |
|
|
30
35
|
|---|---|---|---|
|
|
31
|
-
| `render` | `(container,
|
|
32
|
-
| `
|
|
36
|
+
| `render` | `(container, context) => Disposable` | **(required)** | Renders the component. Must return `{ dispose() }` for cleanup. |
|
|
37
|
+
| `inputSchema` | `z.ZodType` | — | Zod schema describing `input`. Drives the properties panel controls. |
|
|
33
38
|
| `isolation` | `'shadow-dom' \| 'iframe'` | `'shadow-dom'` | Component isolation strategy. |
|
|
34
39
|
| `displayMode` | `DisplayMode` | `{ type: 'component' }` | `'component'` for natural size, or `'page'` with viewport presets. |
|
|
35
40
|
| `styles` | `StyleDefinition[]` | — | Stylesheets injected into the shadow root (shadow-dom isolation only). |
|
|
36
41
|
| `background` | `'light' \| 'dark'` | `'light'` | Preview canvas background pattern. |
|
|
37
42
|
| `description` | `string` | — | Documentation description. |
|
|
38
43
|
|
|
39
|
-
### `defineFixtureGroup(entries)`
|
|
44
|
+
### `defineFixtureGroup(entries)` / `defineFixtureGroup(options, entries)`
|
|
40
45
|
|
|
41
|
-
Groups multiple fixtures (supports nesting)
|
|
46
|
+
Groups multiple fixtures (supports nesting). An optional first argument can declare an
|
|
47
|
+
`inputSchema` shared by — and merged into — every descendant fixture, so common input (e.g. a
|
|
48
|
+
`theme` switch) is declared once for the whole group:
|
|
42
49
|
|
|
43
50
|
```tsx
|
|
44
51
|
import { defineFixture, defineFixtureGroup } from '@vscode/component-explorer';
|
|
52
|
+
import { z } from 'zod';
|
|
45
53
|
|
|
46
|
-
export default defineFixtureGroup(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
54
|
+
export default defineFixtureGroup(
|
|
55
|
+
{ inputSchema: z.object({ theme: z.enum(['light', 'dark']).default('dark') }) },
|
|
56
|
+
{
|
|
57
|
+
Primary: defineFixture({ render: (c) => { /* ... */ } }),
|
|
58
|
+
Secondary: defineFixture({ render: (c) => { /* ... */ } }),
|
|
59
|
+
},
|
|
60
|
+
);
|
|
53
61
|
```
|
|
54
62
|
|
|
55
63
|
### `defineFixtureVariants(variants)`
|
|
@@ -66,16 +74,21 @@ defineFixtureVariants({
|
|
|
66
74
|
});
|
|
67
75
|
```
|
|
68
76
|
|
|
69
|
-
##
|
|
77
|
+
## Input Schemas
|
|
78
|
+
|
|
79
|
+
Fixture `input` is described with a [zod](https://zod.dev) schema (`inputSchema`). The explorer
|
|
80
|
+
converts it to JSON Schema and renders a control per property in the properties panel:
|
|
70
81
|
|
|
71
|
-
|
|
|
72
|
-
|
|
73
|
-
| `boolean` |
|
|
74
|
-
| `string` |
|
|
75
|
-
| `number`
|
|
76
|
-
| `enum` |
|
|
82
|
+
| Zod type | Control |
|
|
83
|
+
|---|---|
|
|
84
|
+
| `z.boolean()` | Toggle checkbox |
|
|
85
|
+
| `z.string()` | Text input |
|
|
86
|
+
| `z.number()` / `z.int()` | Number input |
|
|
87
|
+
| `z.enum([...])` | Dropdown select |
|
|
77
88
|
|
|
78
|
-
|
|
89
|
+
Use `.default(...)` to set the initial value and `.describe(...)` to document a property. When
|
|
90
|
+
multiple rendered fixtures share a property of the same name and schema, the panel exposes a
|
|
91
|
+
single control that edits them all at once.
|
|
79
92
|
|
|
80
93
|
## Explorer UI Components
|
|
81
94
|
|
|
@@ -96,7 +109,6 @@ The package exports the full Explorer UI as React components:
|
|
|
96
109
|
|---|---|
|
|
97
110
|
| `FixtureRegistry` | Observable registry of discovered fixtures. |
|
|
98
111
|
| `createFixtureTree` | Builds a `FixtureNode` tree from registered fixtures. |
|
|
99
|
-
| `getDefaultPropertyValues` | Extracts default values from a `PropertySchema[]`. |
|
|
100
112
|
| `VIEWPORT_SIZES` | Built-in viewport preset dimensions (`mobile`, `tablet`, `desktop`). |
|
|
101
113
|
|
|
102
114
|
## Styles
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IReader } from '@vscode/observables';
|
|
2
|
-
import { FixtureRegistry, ComponentDefinition } from '../core/index.js';
|
|
2
|
+
import { FixtureRegistry, ComponentDefinition, FixtureInputStore } from '../core/index.js';
|
|
3
3
|
import { ExplorerTreeNode } from './types.js';
|
|
4
4
|
import { DaemonModel } from '../daemon/index.js';
|
|
5
5
|
import { ReportModel } from '../report/ReportModel.js';
|
|
@@ -72,6 +72,10 @@ export declare class ExplorerModel extends ExplorerModel_base {
|
|
|
72
72
|
readonly selectedNode: import('@vscode/observables').IObservableWithChange<ExplorerTreeNode | undefined, void>;
|
|
73
73
|
/** List of preview rows to render based on current selection and view mode */
|
|
74
74
|
readonly selectedFixtures: import('@vscode/observables').IObservableWithChange<readonly PreviewRow[], void>;
|
|
75
|
+
/** Shared store of per-fixture `input` overrides, edited via the properties panel. */
|
|
76
|
+
readonly inputStore: FixtureInputStore;
|
|
77
|
+
/** Flattened list of the live fixtures currently shown in the preview area. */
|
|
78
|
+
readonly renderedFixtures: import('@vscode/observables').IObservableWithChange<readonly FixtureItem[], void>;
|
|
75
79
|
setViewMode: (mode: ViewMode) => void;
|
|
76
80
|
navigateToSession: (sessionName: string) => void;
|
|
77
81
|
toggleLeftSidebar: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExplorerModel.d.ts","sourceRoot":"","sources":["../../src/components/ExplorerModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAExE,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ExplorerModel.d.ts","sourceRoot":"","sources":["../../src/components/ExplorerModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAExE,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,KAAK,gBAAgB,EAAkB,MAAM,YAAY,CAAC;AAInE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MA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@
|
|
|
1
|
+
import { FixtureInputStore } from '../core/index.js';
|
|
1
2
|
import { FixtureItem } from './ExplorerModel.js';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
export declare const FixturePreviewItem: React.ComponentType<{
|
|
4
5
|
fixture: FixtureItem;
|
|
5
6
|
compact: boolean | undefined;
|
|
6
7
|
onSelect: ((nodeId: string) => void) | undefined;
|
|
8
|
+
inputStore: FixtureInputStore | undefined;
|
|
7
9
|
} & {} & {} & {}>;
|
|
8
10
|
//# sourceMappingURL=FixturePreviewItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FixturePreviewItem.d.ts","sourceRoot":"","sources":["../../src/components/FixturePreviewItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FixturePreviewItem.d.ts","sourceRoot":"","sources":["../../src/components/FixturePreviewItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AA6HtD,eAAO,MAAM,kBAAkB;;;wBA1GE,MAAM,KAAK,IAAI;;iBA0J/C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreviewArea.d.ts","sourceRoot":"","sources":["../../src/components/PreviewArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"PreviewArea.d.ts","sourceRoot":"","sources":["../../src/components/PreviewArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,oBAAoB,CAAC;AAsbpE,eAAO,MAAM,WAAW;;iBAmGvB,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExplorerModel } from './ExplorerModel.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Properties panel: aggregates the input schemas of every fixture currently rendered in the
|
|
5
|
+
* preview area and presents one control per shared property. Editing a control updates the
|
|
6
|
+
* `input` of all fixtures that declare that property (same name + schema), so common values
|
|
7
|
+
* like a theme can be switched across the whole view at once.
|
|
8
|
+
*/
|
|
3
9
|
export declare const RightSidebar: React.ComponentType<import('@vscode/observables-react').PropsIn<{
|
|
4
|
-
|
|
10
|
+
model: import('@vscode/observables-react').IPropertyTransformerFactory<ExplorerModel, ExplorerModel>;
|
|
5
11
|
}>>;
|
|
6
12
|
//# sourceMappingURL=RightSidebar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RightSidebar.d.ts","sourceRoot":"","sources":["../../src/components/RightSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"RightSidebar.d.ts","sourceRoot":"","sources":["../../src/components/RightSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAiJxD;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;GAqCxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentRenderer.d.ts","sourceRoot":"","sources":["../../src/core/ComponentRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ComponentRenderer.d.ts","sourceRoot":"","sources":["../../src/core/ComponentRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAsB,MAAM,yBAAyB,CAAC;AAClF,OAAO,KAAK,EAAe,UAAU,EAAE,YAAY,EAAmB,MAAM,iBAAiB,CAAC;AAC9F,OAAO,KAAK,EAAE,cAAc,EAAmB,MAAM,gBAAgB,CAAC;AAItE,8EAA8E;AAC9E,eAAO,MAAM,iBAAiB,OAAO,CAAC;AA8CtC,qBAAa,kBAAkB;IAa7B,QAAQ,CAAC,SAAS,EAAE,mBAAmB;IACvC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;IAdzB,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAQ;IACjD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAyB;IAC1D,OAAO,CAAC,eAAe,CAAuD;IAC9E,OAAO,CAAC,iBAAiB,CAAqB;IAC9C,OAAO,CAAC,cAAc,CAAuB;IAC7C,OAAO,CAAC,YAAY,CAAmC;IACvD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAClD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoC;gBAG7D,IAAI,EAAE,WAAW,EACR,SAAS,EAAE,mBAAmB,EACtB,WAAW,GAAE,UAAqD,EAClE,MAAM,CAAC,EAAE,OAAO,YAAA;IA8H5B,gBAAgB,IAAI,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAmB3D,OAAO,IAAI,OAAO,CAAC,SAAS,cAAc,EAAE,CAAC;CA8C7C"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IObservable, IReader } from '@vscode/observables';
|
|
2
|
+
import { IJsonSchema } from './fixtureApi.js';
|
|
3
|
+
/** A fixture's input override object (only the keys the user explicitly changed). */
|
|
4
|
+
export type FixtureInputOverride = Record<string, unknown>;
|
|
5
|
+
/**
|
|
6
|
+
* Central store of `input` overrides for the explorer UI.
|
|
7
|
+
*
|
|
8
|
+
* Values are keyed by **property identity** (name + structural schema), not by fixture, so a
|
|
9
|
+
* value chosen on one fixture is automatically reused by every other fixture that declares the
|
|
10
|
+
* same input — navigating between fixtures keeps the shared value instead of resetting it.
|
|
11
|
+
* The whole map is persisted to `localStorage` so choices survive reloads. Schema defaults are
|
|
12
|
+
* applied at render time (see `applyInputDefaults`); only explicit overrides are stored here.
|
|
13
|
+
*/
|
|
14
|
+
export declare class FixtureInputStore {
|
|
15
|
+
/** Shared values keyed by `inputPropertyKey(name, schema)`. */
|
|
16
|
+
private readonly _values;
|
|
17
|
+
/** Cache of derived per-fixture override observables. */
|
|
18
|
+
private readonly _byFixture;
|
|
19
|
+
constructor();
|
|
20
|
+
/**
|
|
21
|
+
* Returns a derived observable of `fixtureId`'s input overrides, mapped from the shared
|
|
22
|
+
* per-property store. Only properties the user explicitly set (across any fixture) appear.
|
|
23
|
+
*/
|
|
24
|
+
getInput(fixtureId: string, schema: IJsonSchema | undefined): IObservable<FixtureInputOverride>;
|
|
25
|
+
/** The currently effective value of a shared property: explicit override, else schema default. */
|
|
26
|
+
readValue(reader: IReader, name: string, schema: IJsonSchema): unknown;
|
|
27
|
+
/** Sets a shared input property (applies to every fixture that declares it) and persists. */
|
|
28
|
+
setValue(name: string, schema: IJsonSchema, value: unknown): void;
|
|
29
|
+
private _load;
|
|
30
|
+
private _persist;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=FixtureInputStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FixtureInputStore.d.ts","sourceRoot":"","sources":["../../src/core/FixtureInputStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsD,KAAK,WAAW,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACzH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGnD,qFAAqF;AACrF,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAI3D;;;;;;;;GAQG;AACH,qBAAa,iBAAiB;IAC1B,+DAA+D;IAC/D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA+C;IACvE,yDAAyD;IACzD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAwD;;IAMnF;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,WAAW,CAAC,oBAAoB,CAAC;IAuB/F,kGAAkG;IAClG,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO;IAStE,6FAA6F;IAC7F,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAOjE,OAAO,CAAC,KAAK;IAeb,OAAO,CAAC,QAAQ;CAOnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FixtureNode.d.ts","sourceRoot":"","sources":["../../src/core/FixtureNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"FixtureNode.d.ts","sourceRoot":"","sources":["../../src/core/FixtureNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAe,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAML,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AA8C/C;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,WAAW,CAAC;IAEzB,mBAAmB;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,kGAAkG;IAClG,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,WAAW,CAAC;IAEnD,0CAA0C;IAC1C,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;IAE3C,sDAAsD;IACtD,QAAQ,CAAC,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAEzC,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAEnC,0GAA0G;IAC1G,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,WAAW,CA8BnF;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC,GAC5D,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAYrC;AAyID;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,WAAW,GAAG,SAAS,CAezF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,mBAAmB,EAAE,CAU1E"}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Public Fixture API
|
|
3
|
-
*
|
|
4
|
-
* This module is the public API for defining fixtures.
|
|
5
|
-
* It's designed to be stable across versions - projects can use a different
|
|
6
|
-
* @vscode/component-explorer version than the explorer viewer uses.
|
|
7
|
-
*
|
|
8
|
-
* Use Symbol.for() instead of Symbol() so the same symbol is shared across
|
|
9
|
-
* different versions of this package.
|
|
10
|
-
*
|
|
11
|
-
* @module fixtureApi
|
|
12
|
-
*/
|
|
1
|
+
import { z } from 'zod';
|
|
13
2
|
/**
|
|
14
3
|
* Disposable resource that can be cleaned up.
|
|
15
4
|
* `dispose` may be sync or async; the framework awaits the returned promise (if any)
|
|
@@ -56,8 +45,11 @@ export interface RenderResult {
|
|
|
56
45
|
export type RenderReturn = RenderResult | undefined | void | Promise<RenderResult | undefined | void>;
|
|
57
46
|
/**
|
|
58
47
|
* Context passed to the render function.
|
|
48
|
+
*
|
|
49
|
+
* @typeParam TInput - Shape of `input`, inferred from the fixture's zod `inputSchema`
|
|
50
|
+
* (defaults to `unknown` when no schema is declared).
|
|
59
51
|
*/
|
|
60
|
-
export interface RenderContext {
|
|
52
|
+
export interface RenderContext<TInput = unknown> {
|
|
61
53
|
/**
|
|
62
54
|
* Unique identifier of the fixture being rendered.
|
|
63
55
|
* Stable across renders of the same fixture; useful for keying caches,
|
|
@@ -74,14 +66,16 @@ export interface RenderContext {
|
|
|
74
66
|
*/
|
|
75
67
|
readonly host: RenderHost;
|
|
76
68
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
69
|
+
* Data passed in by the caller (CLI/MCP screenshot tool, explorer UI). Use this to
|
|
70
|
+
* parameterize the fixture: e.g. switch theme, vary props, select a scenario.
|
|
71
|
+
*
|
|
72
|
+
* When the fixture declares a zod `inputSchema`, this is typed as `z.infer<typeof schema>`
|
|
73
|
+
* and populated with the schema's defaults for any keys the caller omitted. Without a
|
|
74
|
+
* schema it is `unknown` (and `undefined` when no input was provided).
|
|
79
75
|
*
|
|
80
76
|
* Symmetric with `RenderResult.output` (which flows back out to the caller).
|
|
81
|
-
* `undefined` when no input was provided (e.g. when rendered in the explorer UI without
|
|
82
|
-
* an explicit input).
|
|
83
77
|
*/
|
|
84
|
-
readonly input
|
|
78
|
+
readonly input: TInput;
|
|
85
79
|
}
|
|
86
80
|
/**
|
|
87
81
|
* Describes the environment a fixture is rendered in.
|
|
@@ -144,13 +138,14 @@ export type ViewportPresetName = 'mobile' | 'tablet' | 'desktop';
|
|
|
144
138
|
/**
|
|
145
139
|
* Minimal JSON Schema interface used to describe a fixture's expected `input` shape.
|
|
146
140
|
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
141
|
+
* This is the *derived* form: fixtures declare their input with a zod schema
|
|
142
|
+
* (`DefineFixtureOptions.inputSchema`) and the framework converts it to this JSON Schema
|
|
143
|
+
* at define time. Tools (CLI/MCP/explorer UI) read it for validation, autocompletion, or
|
|
144
|
+
* to generate input-editing controls.
|
|
151
145
|
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
146
|
+
* Intentionally a structural, recursive type covering the subset of JSON Schema we
|
|
147
|
+
* actually surface to tools — the index signature lets any additional standard JSON Schema
|
|
148
|
+
* keywords (`format`, `pattern`, `oneOf`, `$ref`, …) flow through without changing this interface.
|
|
154
149
|
*/
|
|
155
150
|
export interface IJsonSchema {
|
|
156
151
|
readonly type?: 'object' | 'array' | 'string' | 'number' | 'integer' | 'boolean' | 'null';
|
|
@@ -178,8 +173,10 @@ export declare const fixtureGroupBrand: unique symbol;
|
|
|
178
173
|
export declare const fixtureVariantsBrand: unique symbol;
|
|
179
174
|
/**
|
|
180
175
|
* Options for defining a single component fixture.
|
|
176
|
+
*
|
|
177
|
+
* @typeParam TInput - Shape of the fixture's `input`, inferred from `inputSchema`.
|
|
181
178
|
*/
|
|
182
|
-
export interface DefineFixtureOptions {
|
|
179
|
+
export interface DefineFixtureOptions<TInput = unknown> {
|
|
183
180
|
/**
|
|
184
181
|
* Path in the explorer tree.
|
|
185
182
|
* - `undefined` (default): use fixture filename only
|
|
@@ -204,33 +201,34 @@ export interface DefineFixtureOptions {
|
|
|
204
201
|
/** Human/AI-readable description(s) of expected visual appearance. Inherited from parent group/variants and accumulated into a string[]. */
|
|
205
202
|
expectedVisualDescriptions?: string | readonly string[];
|
|
206
203
|
/**
|
|
207
|
-
*
|
|
204
|
+
* Zod schema describing the expected shape of `RenderContext.input`.
|
|
208
205
|
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
206
|
+
* Declaring it gives two things:
|
|
207
|
+
* 1. **Type safety** — `render`'s `context.input` is typed as `z.infer<typeof schema>`.
|
|
208
|
+
* 2. **Tooling** — the framework converts the schema to JSON Schema at define time so the
|
|
209
|
+
* CLI/MCP/explorer UI can validate, autocomplete, or render input-editing controls.
|
|
211
210
|
*
|
|
212
|
-
*
|
|
211
|
+
* The schema must describe an object (`z.object({...})`) — `input` is always a JSON object
|
|
212
|
+
* (or `undefined`). Property-level `.default(...)` values are surfaced to tooling and used
|
|
213
|
+
* to populate omitted keys before `render` runs.
|
|
213
214
|
*
|
|
214
215
|
* @example
|
|
215
216
|
* ```ts
|
|
216
|
-
* inputSchema: {
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
* count: { type: 'integer', default: 1 },
|
|
221
|
-
* },
|
|
222
|
-
* }
|
|
217
|
+
* inputSchema: z.object({
|
|
218
|
+
* theme: z.enum(['light', 'dark']).default('light'),
|
|
219
|
+
* count: z.number().int().default(1),
|
|
220
|
+
* })
|
|
223
221
|
* ```
|
|
224
222
|
*/
|
|
225
|
-
inputSchema?:
|
|
223
|
+
inputSchema?: z.ZodType<TInput>;
|
|
226
224
|
/**
|
|
227
225
|
* Render the component into the container.
|
|
228
226
|
*
|
|
229
227
|
* @param container - The DOM element to render into
|
|
230
|
-
* @param context - Render context containing
|
|
228
|
+
* @param context - Render context containing input and abort signal
|
|
231
229
|
* @returns Optional RenderResult, or a Promise that resolves to one
|
|
232
230
|
*/
|
|
233
|
-
render: (container: HTMLElement, context: RenderContext) => RenderReturn;
|
|
231
|
+
render: (container: HTMLElement, context: RenderContext<TInput>) => RenderReturn;
|
|
234
232
|
}
|
|
235
233
|
/** @deprecated Use DefineFixtureOptions instead */
|
|
236
234
|
export type DefineComponentOptions = DefineFixtureOptions;
|
|
@@ -241,6 +239,8 @@ export interface SingleFixtureExport {
|
|
|
241
239
|
readonly [singleFixtureBrand]: true;
|
|
242
240
|
readonly _options: DefineFixtureOptions;
|
|
243
241
|
readonly _path?: string;
|
|
242
|
+
/** JSON Schema derived from `_options.inputSchema` at define time (cross-version safe). */
|
|
243
|
+
readonly _inputSchemaJson?: IJsonSchema;
|
|
244
244
|
}
|
|
245
245
|
/**
|
|
246
246
|
* Group entry: either a single fixture, a nested group, or variants.
|
|
@@ -257,6 +257,8 @@ export interface FixtureGroupExport {
|
|
|
257
257
|
readonly _path?: string;
|
|
258
258
|
readonly _labels?: readonly string[];
|
|
259
259
|
readonly _expectedVisualDescriptions?: string | readonly string[];
|
|
260
|
+
/** JSON Schema derived from the group's `inputSchema`; merged into every descendant fixture. */
|
|
261
|
+
readonly _inputSchemaJson?: IJsonSchema;
|
|
260
262
|
}
|
|
261
263
|
/**
|
|
262
264
|
* A fixture variants export created by defineFixtureVariants().
|
|
@@ -269,6 +271,8 @@ export interface FixtureVariantsExport {
|
|
|
269
271
|
readonly _path?: string;
|
|
270
272
|
readonly _labels?: readonly string[];
|
|
271
273
|
readonly _expectedVisualDescriptions?: string | readonly string[];
|
|
274
|
+
/** JSON Schema derived from the variants group's `inputSchema`; merged into every variant. */
|
|
275
|
+
readonly _inputSchemaJson?: IJsonSchema;
|
|
272
276
|
}
|
|
273
277
|
/**
|
|
274
278
|
* Fixture export type - a single fixture, a group, or variants.
|
|
@@ -295,6 +299,13 @@ export interface DefineFixtureGroupOptions {
|
|
|
295
299
|
labels?: readonly string[];
|
|
296
300
|
/** Human/AI-readable description(s) of expected visual appearance. Inherited by nested fixtures. */
|
|
297
301
|
expectedVisualDescriptions?: string | readonly string[];
|
|
302
|
+
/**
|
|
303
|
+
* Zod schema describing `input` shared by every fixture in this group. It is converted to
|
|
304
|
+
* JSON Schema at define time and merged into each descendant fixture's own schema (the
|
|
305
|
+
* descendant's properties win on conflict). Use it to declare common input — e.g. a `theme`
|
|
306
|
+
* switch — once for a whole group instead of repeating it on each fixture.
|
|
307
|
+
*/
|
|
308
|
+
inputSchema?: z.ZodType;
|
|
298
309
|
}
|
|
299
310
|
/**
|
|
300
311
|
* Input for defineFixtureVariants (only single fixtures, no nesting).
|
|
@@ -317,6 +328,12 @@ export interface DefineFixtureVariantsOptions {
|
|
|
317
328
|
labels?: readonly string[];
|
|
318
329
|
/** Human/AI-readable description(s) of expected visual appearance. Inherited by nested fixtures. */
|
|
319
330
|
expectedVisualDescriptions?: string | readonly string[];
|
|
331
|
+
/**
|
|
332
|
+
* Zod schema describing `input` shared by every variant in this group. Converted to JSON
|
|
333
|
+
* Schema at define time and merged into each variant's own schema (the variant's properties
|
|
334
|
+
* win on conflict).
|
|
335
|
+
*/
|
|
336
|
+
inputSchema?: z.ZodType;
|
|
320
337
|
}
|
|
321
338
|
/**
|
|
322
339
|
* Defines a single fixture.
|
|
@@ -325,31 +342,33 @@ export interface DefineFixtureVariantsOptions {
|
|
|
325
342
|
* ```ts
|
|
326
343
|
* // Simple - no cleanup needed
|
|
327
344
|
* export default defineFixture({
|
|
328
|
-
* render: (container
|
|
329
|
-
* container.innerHTML = `<button
|
|
345
|
+
* render: (container) => {
|
|
346
|
+
* container.innerHTML = `<button>Click me</button>`;
|
|
330
347
|
* },
|
|
331
348
|
* });
|
|
332
349
|
*
|
|
333
|
-
* //
|
|
350
|
+
* // Typed, parameterizable input via a zod schema
|
|
334
351
|
* export default defineFixture({
|
|
335
|
-
*
|
|
352
|
+
* inputSchema: z.object({ label: z.string().default('Click me') }),
|
|
353
|
+
* render: (container, { input }) => {
|
|
336
354
|
* const root = createRoot(container);
|
|
337
|
-
* root.render(<Button label={
|
|
355
|
+
* root.render(<Button label={input.label} />);
|
|
338
356
|
* return { dispose: () => root.unmount() };
|
|
339
357
|
* },
|
|
340
358
|
* });
|
|
341
359
|
*
|
|
342
360
|
* // Async render
|
|
343
361
|
* export default defineFixture({
|
|
344
|
-
*
|
|
345
|
-
*
|
|
362
|
+
* inputSchema: z.object({ url: z.string() }),
|
|
363
|
+
* render: async (container, { input, signal }) => {
|
|
364
|
+
* const data = await fetch(input.url, { signal });
|
|
346
365
|
* container.innerHTML = await data.text();
|
|
347
366
|
* return { dispose: () => { container.innerHTML = ''; } };
|
|
348
367
|
* },
|
|
349
368
|
* });
|
|
350
369
|
* ```
|
|
351
370
|
*/
|
|
352
|
-
export declare function defineFixture(options: DefineFixtureOptions): SingleFixtureExport;
|
|
371
|
+
export declare function defineFixture<TInput = unknown>(options: DefineFixtureOptions<TInput>): SingleFixtureExport;
|
|
353
372
|
/**
|
|
354
373
|
* Defines a group of fixtures with support for nesting.
|
|
355
374
|
*
|
|
@@ -394,9 +413,9 @@ export declare function defineFixtureVariants(options: DefineFixtureVariantsOpti
|
|
|
394
413
|
*
|
|
395
414
|
* @example
|
|
396
415
|
* ```ts
|
|
397
|
-
* render: (container, {
|
|
416
|
+
* render: (container, { input }) => syncRender(() => {
|
|
398
417
|
* const el = document.createElement('button');
|
|
399
|
-
* el.textContent =
|
|
418
|
+
* el.textContent = input.label;
|
|
400
419
|
* container.appendChild(el);
|
|
401
420
|
* return () => el.remove();
|
|
402
421
|
* })
|
|
@@ -413,8 +432,8 @@ export declare function syncRender(doRender: () => (() => void) | IDisposable |
|
|
|
413
432
|
*
|
|
414
433
|
* @example
|
|
415
434
|
* ```ts
|
|
416
|
-
* render: (container, {
|
|
417
|
-
* const data = await fetchData(
|
|
435
|
+
* render: (container, { input, signal }) => asyncRender(signal, async () => {
|
|
436
|
+
* const data = await fetchData(input.url, { signal });
|
|
418
437
|
* if (signal.aborted) return;
|
|
419
438
|
* container.innerHTML = data;
|
|
420
439
|
* return () => { container.innerHTML = ''; };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtureApi.d.ts","sourceRoot":"","sources":["../../src/core/fixtureApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"fixtureApi.d.ts","sourceRoot":"","sources":["../../src/core/fixtureApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,IAAI,IAAI,GAAG,OAAO,CAA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AC,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IAExD;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC;CACzB;AAgBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,aAAa,CAAC,MAAM,GAAG,OAAO,EAAE,OAAO,EAAE,oBAAoB,CAAC,MAAM,CAAC,GAAG,mBAAmB,CAO1G;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,GAAG,kBAAkB,CAAC;AACnF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,EAAE,OAAO,EAAE,iBAAiB,GAAG,kBAAkB,CAAC;AAmBvH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,qBAAqB,CAAC;AAC7F,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,4BAA4B,EAAE,QAAQ,EAAE,oBAAoB,GAAG,qBAAqB,CAAC;AA0BpI;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,WAAW,GAAG,IAAI,GAAG,YAAY,CAY1F;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,WAAW,EACnB,QAAQ,EAAE,MAAM,OAAO,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,WAAW,GAAG,IAAI,CAAC,GACzD,YAAY,CAsCd"}
|
|
@@ -76,8 +76,22 @@ export interface ComponentDefinition {
|
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* Creates the component definition from a validated SingleFixtureExport.
|
|
79
|
+
*
|
|
80
|
+
* @param inheritedInputSchema - JSON Schema accumulated from enclosing groups/variants; merged
|
|
81
|
+
* with the fixture's own schema (the fixture's properties win on conflict).
|
|
79
82
|
*/
|
|
80
|
-
export declare function createComponentDefinition(fixture: SingleFixtureExport, id: string, name: string, sourceFile: string, inheritedVisualDescriptions?: readonly string[]): ComponentDefinition;
|
|
83
|
+
export declare function createComponentDefinition(fixture: SingleFixtureExport, id: string, name: string, sourceFile: string, inheritedVisualDescriptions?: readonly string[], inheritedInputSchema?: IJsonSchema | undefined): ComponentDefinition;
|
|
84
|
+
/**
|
|
85
|
+
* Merges two object JSON Schemas. `child` properties win over `parent` on key conflicts;
|
|
86
|
+
* `required` is the de-duplicated union. Returns whichever side is defined when only one is.
|
|
87
|
+
*/
|
|
88
|
+
export declare function mergeInputSchemas(parent: IJsonSchema | undefined, child: IJsonSchema | undefined): IJsonSchema | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Builds the effective `input` object passed to a fixture: the schema's top-level property
|
|
91
|
+
* defaults, overlaid with any caller-provided overrides. Returns the override unchanged when
|
|
92
|
+
* there is no schema (so schemaless fixtures keep their original `undefined`/passthrough input).
|
|
93
|
+
*/
|
|
94
|
+
export declare function applyInputDefaults(schema: IJsonSchema | undefined, input: unknown): unknown;
|
|
81
95
|
/**
|
|
82
96
|
* Type guard for checking if a value is a ComponentDefinition.
|
|
83
97
|
* @deprecated Use isSingleFixture or isFixtureGroup instead
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtureApiConsumer.d.ts","sourceRoot":"","sources":["../../src/core/fixtureApiConsumer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAC;AAOzB;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAS5E;AAED;;;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AAC,EAAE,WAAW,CAAC;IAEnC,mDAAmD;IACnD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;;OAGG;IACH,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,GAAG,YAAY,CAAC;CACtE;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,mBAAmB,EAC5B,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,2BAA2B,GAAE,SAAS,MAAM,EAAO,EACnD,oBAAoB,GAAE,WAAW,GAAG,SAAqB,GACxD,mBAAmB,CAoBrB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,WAAW,GAAG,SAAS,EAC/B,KAAK,EAAE,WAAW,GAAG,SAAS,GAC7B,WAAW,GAAG,SAAS,CAYzB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAiB3F;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CASlF"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
export type { IDisposable, StyleDefinition, DisplayMode, PageMode, ComponentMode, ViewportPreset, ViewportPresetName, DefineFixtureOptions, DefineComponentOptions, FixtureGroupEntry, FixtureGroupInput, FixtureVariantsInput, FixtureExport, SingleFixtureExport, FixtureGroupExport, FixtureVariantsExport, RenderResult, RenderReturn, RenderContext, RenderHost, } from './fixtureApi.js';
|
|
1
|
+
export type { IDisposable, StyleDefinition, DisplayMode, PageMode, ComponentMode, ViewportPreset, ViewportPresetName, DefineFixtureOptions, DefineComponentOptions, FixtureGroupEntry, FixtureGroupInput, FixtureVariantsInput, FixtureExport, SingleFixtureExport, FixtureGroupExport, FixtureVariantsExport, RenderResult, RenderReturn, RenderContext, RenderHost, IJsonSchema, } from './fixtureApi.js';
|
|
2
2
|
export { singleFixtureBrand, fixtureGroupBrand, fixtureVariantsBrand, defineFixture, defineFixtureGroup, defineFixtureVariants, syncRender, asyncRender, } from './fixtureApi.js';
|
|
3
3
|
export type { ComponentDefinition, ParseResult } from './fixtureApiConsumer.js';
|
|
4
|
-
export { isSingleFixture, isFixtureGroup, isFixtureVariants, parseFixtureExport, parseSingleFixture, parseFixtureGroup, parseFixtureVariants, createComponentDefinition, isComponentDefinition, } from './fixtureApiConsumer.js';
|
|
4
|
+
export { isSingleFixture, isFixtureGroup, isFixtureVariants, parseFixtureExport, parseSingleFixture, parseFixtureGroup, parseFixtureVariants, createComponentDefinition, mergeInputSchemas, applyInputDefaults, isComponentDefinition, } from './fixtureApiConsumer.js';
|
|
5
|
+
export { FixtureInputStore } from './FixtureInputStore.js';
|
|
6
|
+
export type { FixtureInputOverride } from './FixtureInputStore.js';
|
|
7
|
+
export { aggregateInputProperties, effectiveInputValue, } from './inputAggregation.js';
|
|
8
|
+
export type { AggregatedInputProperty, ComponentInputInfo, } from './inputAggregation.js';
|
|
5
9
|
export type { ExceptionError, RenderEvent, RenderEventType, RenderReport, } from './ErrorInfo.js';
|
|
6
10
|
export type { FixtureNode, } from './FixtureNode.js';
|
|
7
11
|
export { FixturePath } from './FixturePath.js';
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAGA,YAAY,EACV,WAAW,EACX,eAAe,EACf,WAAW,EACX,QAAQ,EACR,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAGA,YAAY,EACV,WAAW,EACX,eAAe,EACf,WAAW,EACX,QAAQ,EACR,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,UAAU,EACV,WAAW,GACZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,UAAU,EACV,WAAW,GACZ,MAAM,iBAAiB,CAAC;AAKzB,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EACL,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EACL,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAK/B,YAAY,EACV,cAAc,EACd,WAAW,EACX,eAAe,EACf,YAAY,GACb,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAE,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