@vscode/component-explorer 0.2.1-8 → 0.2.1-80
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 +104 -27
- package/dist/components/BottomDebugPanel.d.ts +8 -0
- package/dist/components/BottomDebugPanel.d.ts.map +1 -0
- package/dist/components/DebugPanelPlacement.d.ts +3 -0
- package/dist/components/DebugPanelPlacement.d.ts.map +1 -0
- package/dist/components/DebugWorkbench.d.ts +42 -0
- package/dist/components/DebugWorkbench.d.ts.map +1 -0
- package/dist/components/DebugWorkbenchLayout.d.ts +27 -0
- package/dist/components/DebugWorkbenchLayout.d.ts.map +1 -0
- package/dist/components/DebugWorkbenchState.d.ts +9 -0
- package/dist/components/DebugWorkbenchState.d.ts.map +1 -0
- package/dist/components/ExplorerModel.d.ts +14 -1
- package/dist/components/ExplorerModel.d.ts.map +1 -1
- package/dist/components/FixtureDebugStore.d.ts +20 -0
- package/dist/components/FixtureDebugStore.d.ts.map +1 -0
- package/dist/components/FixturePreviewItem.d.ts +10 -0
- package/dist/components/FixturePreviewItem.d.ts.map +1 -1
- package/dist/components/PageViewportState.d.ts +31 -0
- package/dist/components/PageViewportState.d.ts.map +1 -0
- 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/components/icons.d.ts +8 -8
- package/dist/components/icons.d.ts.map +1 -1
- package/dist/core/ComponentRenderer.d.ts +23 -3
- package/dist/core/ComponentRenderer.d.ts.map +1 -1
- package/dist/core/ErrorInfo.d.ts +21 -1
- package/dist/core/ErrorInfo.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/FixtureInteractionRuntime.d.ts +29 -0
- package/dist/core/FixtureInteractionRuntime.d.ts.map +1 -0
- package/dist/core/FixtureNode.d.ts.map +1 -1
- package/dist/core/fixtureApi.d.ts +220 -32
- package/dist/core/fixtureApi.d.ts.map +1 -1
- package/dist/core/fixtureApiConsumer.d.ts +22 -2
- package/dist/core/fixtureApiConsumer.d.ts.map +1 -1
- package/dist/core/index.d.ts +7 -3
- 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 +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -9
- package/dist/lib/explorerQueryParams.d.ts +2 -2
- package/dist/lib/explorerQueryParams.d.ts.map +1 -1
- package/dist/lib/fixtureSizeCache.d.ts +2 -0
- package/dist/lib/fixtureSizeCache.d.ts.map +1 -1
- package/dist/modes/EmbeddedMode.d.ts +7 -0
- package/dist/modes/EmbeddedMode.d.ts.map +1 -1
- package/dist/modes/ExplorerUIMode.d.ts.map +1 -1
- package/dist/modes/HeadlessMode.d.ts +12 -3
- package/dist/modes/HeadlessMode.d.ts.map +1 -1
- package/dist/{runtimeVersion-C3nZZ7xj.js → runtimeVersion-BoWRrQbs.js} +74 -37
- package/dist/runtimeVersion-BoWRrQbs.js.map +1 -0
- package/dist/viewer.js +4448 -1908
- package/dist/viewer.js.map +1 -1
- package/package.json +15 -14
- package/dist/core/PropertySchema.d.ts +0 -40
- package/dist/core/PropertySchema.d.ts.map +0 -1
- package/dist/runtimeVersion-C3nZZ7xj.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,61 @@ 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. |
|
|
38
|
+
| `inputControls` | `Record<inputKey, options>` | — | Places selected boolean/enum inputs in the fixture toolbar, sidebar, or both. |
|
|
39
|
+
| `debugPanels` | `DebugPanelDefinition[]` | — | Statically declares typed, interactive debug panels. |
|
|
33
40
|
| `isolation` | `'shadow-dom' \| 'iframe'` | `'shadow-dom'` | Component isolation strategy. |
|
|
34
41
|
| `displayMode` | `DisplayMode` | `{ type: 'component' }` | `'component'` for natural size, or `'page'` with viewport presets. |
|
|
35
42
|
| `styles` | `StyleDefinition[]` | — | Stylesheets injected into the shadow root (shadow-dom isolation only). |
|
|
36
43
|
| `background` | `'light' \| 'dark'` | `'light'` | Preview canvas background pattern. |
|
|
37
44
|
| `description` | `string` | — | Documentation description. |
|
|
38
45
|
|
|
39
|
-
|
|
46
|
+
Page fixtures open in **Fit** mode in the normal Explorer UI. Their compact viewport toolbar can
|
|
47
|
+
select a declared preset, edit logical width/height, switch to **Responsive** canvas sizing, or
|
|
48
|
+
render at unscaled **1:1** size. These persisted UI settings do not affect embedded or headless
|
|
49
|
+
rendering.
|
|
50
|
+
|
|
51
|
+
### `defineFixtureGroup(entries)` / `defineFixtureGroup(options, entries)`
|
|
40
52
|
|
|
41
|
-
Groups multiple fixtures (supports nesting)
|
|
53
|
+
Groups multiple fixtures (supports nesting). An optional first argument can declare an
|
|
54
|
+
`inputSchema` shared by — and merged into — every descendant fixture, so common input (e.g. a
|
|
55
|
+
`theme` switch) is declared once for the whole group:
|
|
42
56
|
|
|
43
57
|
```tsx
|
|
44
58
|
import { defineFixture, defineFixtureGroup } from '@vscode/component-explorer';
|
|
59
|
+
import { z } from 'zod';
|
|
45
60
|
|
|
46
|
-
export default defineFixtureGroup(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
61
|
+
export default defineFixtureGroup(
|
|
62
|
+
{ inputSchema: z.object({ theme: z.enum(['light', 'dark']).default('dark') }) },
|
|
63
|
+
{
|
|
64
|
+
Primary: defineFixture({ render: (c) => { /* ... */ } }),
|
|
65
|
+
Secondary: defineFixture({ render: (c) => { /* ... */ } }),
|
|
66
|
+
},
|
|
67
|
+
);
|
|
53
68
|
```
|
|
54
69
|
|
|
55
70
|
### `defineFixtureVariants(variants)`
|
|
@@ -66,16 +81,79 @@ defineFixtureVariants({
|
|
|
66
81
|
});
|
|
67
82
|
```
|
|
68
83
|
|
|
69
|
-
##
|
|
84
|
+
## Input Schemas
|
|
85
|
+
|
|
86
|
+
Fixture `input` is described with a [zod](https://zod.dev) schema (`inputSchema`). The explorer
|
|
87
|
+
converts it to JSON Schema and renders a control per property in the properties panel:
|
|
88
|
+
|
|
89
|
+
| Zod type | Control |
|
|
90
|
+
|---|---|
|
|
91
|
+
| `z.boolean()` | Toggle checkbox |
|
|
92
|
+
| `z.string()` | Text input |
|
|
93
|
+
| `z.number()` / `z.int()` | Number input |
|
|
94
|
+
| `z.enum([...])` | Dropdown select |
|
|
95
|
+
|
|
96
|
+
Use `.default(...)` to set the initial value and `.describe(...)` to document a property. When
|
|
97
|
+
multiple rendered fixtures share a property of the same name and schema, the panel exposes a
|
|
98
|
+
single control that edits them all at once.
|
|
99
|
+
|
|
100
|
+
Use `inputControls` with `placement: 'toolbar'` for compact boolean or enum controls beside the
|
|
101
|
+
fixture dimensions. Opt a property into live updates with `watchInput`; changed properties without
|
|
102
|
+
a watcher keep the default full-remount behavior:
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
defineFixture({
|
|
106
|
+
inputSchema: z.object({ showBounds: z.boolean().default(false) }),
|
|
107
|
+
inputControls: {
|
|
108
|
+
showBounds: { placement: 'toolbar', label: 'bounds' },
|
|
109
|
+
},
|
|
110
|
+
render(container, { watchInput }) {
|
|
111
|
+
const overlay = createBoundsOverlay(container);
|
|
112
|
+
watchInput('showBounds', value => overlay.setVisible(value));
|
|
113
|
+
return overlay;
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Typed Debug Panels and Output
|
|
119
|
+
|
|
120
|
+
`defineDebugPanel<TState, TAction>()` defines a custom panel UI. The fixture connects its live
|
|
121
|
+
state/action channel through `context.debug.connect`. The connection callback runs only while that
|
|
122
|
+
panel is visible, so hidden panels do not parse, subscribe, or publish data.
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
const sourcePanel = defineDebugPanel<
|
|
126
|
+
{ source: string },
|
|
127
|
+
{ type: 'setSource'; source: string }
|
|
128
|
+
>({
|
|
129
|
+
id: 'source',
|
|
130
|
+
title: 'Source',
|
|
131
|
+
render: (container, { sendAction }) => createSourceView(container, sendAction),
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
defineFixture({
|
|
135
|
+
debugPanels: [sourcePanel],
|
|
136
|
+
render(container, { debug }) {
|
|
137
|
+
const model = createModel(container);
|
|
138
|
+
debug.connect(sourcePanel, channel => {
|
|
139
|
+
const actions = channel.onAction(action => model.setSource(action.source));
|
|
140
|
+
const state = model.onDidChange(() => channel.publish({ source: model.source }));
|
|
141
|
+
channel.publish({ source: model.source });
|
|
142
|
+
return { dispose: () => { actions.dispose(); state.dispose(); } };
|
|
143
|
+
});
|
|
144
|
+
return model;
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
```
|
|
70
148
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
| `string` | `name`, `defaultValue`, `multiline?` | Text input (or textarea) |
|
|
75
|
-
| `number` | `name`, `defaultValue`, `min?`, `max?`, `step?` | Number input with optional range |
|
|
76
|
-
| `enum` | `name`, `defaultValue`, `options` | Dropdown select |
|
|
149
|
+
Panels default beside a single logical fixture and in the shared bottom workbench for variant rows.
|
|
150
|
+
Set `placement: 'canvas-right'` or `'bottom-panel'` on the panel to override this rule. Golden Layout
|
|
151
|
+
tabs can be dragged into splits when multiple panels need to remain visible.
|
|
77
152
|
|
|
78
|
-
|
|
153
|
+
Any defined `RenderResult.output` gets a built-in read-only JSON panel. Wrap it with
|
|
154
|
+
`interactiveOutput({ getSnapshot, activate })` to opt into JSON editing; output actions update the
|
|
155
|
+
live fixture without remounting. Headless and CLI consumers continue to receive the unwrapped
|
|
156
|
+
snapshot value.
|
|
79
157
|
|
|
80
158
|
## Explorer UI Components
|
|
81
159
|
|
|
@@ -96,7 +174,6 @@ The package exports the full Explorer UI as React components:
|
|
|
96
174
|
|---|---|
|
|
97
175
|
| `FixtureRegistry` | Observable registry of discovered fixtures. |
|
|
98
176
|
| `createFixtureTree` | Builds a `FixtureNode` tree from registered fixtures. |
|
|
99
|
-
| `getDefaultPropertyValues` | Extracts default values from a `PropertySchema[]`. |
|
|
100
177
|
| `VIEWPORT_SIZES` | Built-in viewport preset dimensions (`mobile`, `tablet`, `desktop`). |
|
|
101
178
|
|
|
102
179
|
## Styles
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ConsoleEventsStore } from '../core/ConsoleEventsStore.js';
|
|
2
|
+
import { ExplorerModel } from './ExplorerModel.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export declare const BottomDebugPanel: React.ComponentType<{
|
|
5
|
+
model: ExplorerModel;
|
|
6
|
+
consoleStore: ConsoleEventsStore;
|
|
7
|
+
} & {} & {} & {}>;
|
|
8
|
+
//# sourceMappingURL=BottomDebugPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomDebugPanel.d.ts","sourceRoot":"","sources":["../../src/components/BottomDebugPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,KAAK,EAAE,aAAa,EAAe,MAAM,oBAAoB,CAAC;AAsBrE,eAAO,MAAM,gBAAgB;;;iBA8D5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DebugPanelPlacement.d.ts","sourceRoot":"","sources":["../../src/components/DebugPanelPlacement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,wBAAgB,0BAA0B,CACxC,iBAAiB,EAAE,mBAAmB,GAAG,SAAS,EAClD,mBAAmB,EAAE,MAAM,GAC1B,mBAAmB,CAGrB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ConsoleEventsStore } from '../core/ConsoleEventsStore.js';
|
|
2
|
+
import { DebugPanelDefinition } from '../core/fixtureApi.js';
|
|
3
|
+
import { FixtureDebugStore } from './FixtureDebugStore.js';
|
|
4
|
+
import { DebugWorkbenchStateStore } from './DebugWorkbenchState.js';
|
|
5
|
+
export interface DebugWorkbenchEntry {
|
|
6
|
+
readonly key: string;
|
|
7
|
+
readonly title: string;
|
|
8
|
+
readonly fixtureId: string;
|
|
9
|
+
readonly fixtureName: string;
|
|
10
|
+
readonly panelId: string;
|
|
11
|
+
readonly definition?: DebugPanelDefinition;
|
|
12
|
+
readonly outputEditable?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface DebugWorkbenchProps {
|
|
15
|
+
readonly workbenchId: string;
|
|
16
|
+
readonly entries: readonly DebugWorkbenchEntry[];
|
|
17
|
+
readonly activeEntryKey: string;
|
|
18
|
+
readonly store: FixtureDebugStore;
|
|
19
|
+
readonly stateStore: DebugWorkbenchStateStore;
|
|
20
|
+
readonly consoleStore: ConsoleEventsStore | undefined;
|
|
21
|
+
readonly onActiveEntryChange: (entryKey: string) => void;
|
|
22
|
+
readonly onClose: (() => void) | undefined;
|
|
23
|
+
readonly externalHeaderHost: HTMLElement | null | undefined;
|
|
24
|
+
readonly contentVisible: boolean;
|
|
25
|
+
readonly popOutHref?: string;
|
|
26
|
+
readonly floatTopHeaders: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare const DebugWorkbench: import('react').ComponentType<{
|
|
29
|
+
workbenchId: string;
|
|
30
|
+
entries: readonly DebugWorkbenchEntry[];
|
|
31
|
+
activeEntryKey: string;
|
|
32
|
+
store: FixtureDebugStore;
|
|
33
|
+
stateStore: DebugWorkbenchStateStore;
|
|
34
|
+
consoleStore: ConsoleEventsStore | undefined;
|
|
35
|
+
onActiveEntryChange: (entryKey: string) => void;
|
|
36
|
+
onClose: (() => void) | undefined;
|
|
37
|
+
externalHeaderHost: HTMLElement | null | undefined;
|
|
38
|
+
contentVisible: boolean;
|
|
39
|
+
popOutHref: string | undefined;
|
|
40
|
+
floatTopHeaders: boolean;
|
|
41
|
+
} & {}>;
|
|
42
|
+
//# sourceMappingURL=DebugWorkbench.d.ts.map
|
|
@@ -0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AAC;IAC5D,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;CACnC;AA2VD,eAAO,MAAM,cAAc;;;;;;;oCA7UkB,MAAM,KAAK,IAAI;oBAC/B,IAAI;;;;;OAuYhC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type DebugSplitOrientation = 'horizontal' | 'vertical';
|
|
2
|
+
export type DebugDockZone = 'center' | 'left' | 'right' | 'top' | 'bottom';
|
|
3
|
+
export interface DebugStackNode {
|
|
4
|
+
readonly type: 'stack';
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly entryKeys: readonly string[];
|
|
7
|
+
readonly activeEntryKey: string;
|
|
8
|
+
}
|
|
9
|
+
export interface DebugSplitNode {
|
|
10
|
+
readonly type: 'split';
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly orientation: DebugSplitOrientation;
|
|
13
|
+
readonly ratio: number;
|
|
14
|
+
readonly first: DebugWorkbenchNode;
|
|
15
|
+
readonly second: DebugWorkbenchNode;
|
|
16
|
+
}
|
|
17
|
+
export type DebugWorkbenchNode = DebugStackNode | DebugSplitNode;
|
|
18
|
+
export declare function createDebugWorkbenchLayout(entryKeys: readonly string[], activeEntryKey: string | undefined): DebugWorkbenchNode;
|
|
19
|
+
export declare function getDebugWorkbenchEntryOrder(node: DebugWorkbenchNode): readonly string[];
|
|
20
|
+
export declare function getVisibleDebugEntryKeys(node: DebugWorkbenchNode): ReadonlySet<string>;
|
|
21
|
+
export declare function getFirstDebugStackId(node: DebugWorkbenchNode): string;
|
|
22
|
+
export declare function reconcileDebugWorkbenchLayout(node: DebugWorkbenchNode, entryKeys: readonly string[], activeEntryKey: string | undefined): DebugWorkbenchNode;
|
|
23
|
+
export declare function activateDebugEntry(node: DebugWorkbenchNode, entryKey: string): DebugWorkbenchNode;
|
|
24
|
+
export declare function reorderDebugEntry(node: DebugWorkbenchNode, entryKey: string, targetEntryKey: string, before: boolean): DebugWorkbenchNode;
|
|
25
|
+
export declare function dockDebugEntry(node: DebugWorkbenchNode, entryKey: string, targetStackId: string, zone: DebugDockZone): DebugWorkbenchNode;
|
|
26
|
+
export declare function updateDebugSplitRatio(node: DebugWorkbenchNode, splitId: string, ratio: number): DebugWorkbenchNode;
|
|
27
|
+
//# sourceMappingURL=DebugWorkbenchLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DebugWorkbenchLayout.d.ts","sourceRoot":"","sources":["../../src/components/DebugWorkbenchLayout.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG,YAAY,GAAG,UAAU,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE3E,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,EAAE,qBAAqB,CAAC;IAC5C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;CACrC;AAED,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG,cAAc,CAAC;AAIjE,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,kBAAkB,CAKpB;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,kBAAkB,GAAG,SAAS,MAAM,EAAE,CAIvF;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,kBAAkB,GAAG,WAAW,CAAC,MAAM,CAAC,CAItF;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAErE;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,kBAAkB,EACxB,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,kBAAkB,CA4BpB;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,kBAAkB,EACxB,QAAQ,EAAE,MAAM,GACf,kBAAkB,CAMpB;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,kBAAkB,EACxB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,OAAO,GACd,kBAAkB,CAepB;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,kBAAkB,EACxB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,aAAa,GAClB,kBAAkB,CAwCpB;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,kBAAkB,EACxB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,GACZ,kBAAkB,CAQpB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ISettableObservable } from '@vscode/observables';
|
|
2
|
+
import { DebugWorkbenchNode } from './DebugWorkbenchLayout.js';
|
|
3
|
+
export declare class DebugWorkbenchStateStore {
|
|
4
|
+
private readonly layouts;
|
|
5
|
+
private readonly activeEntries;
|
|
6
|
+
getLayout(workbenchId: string, entryKeys: readonly string[], activeEntryKey: string | undefined): ISettableObservable<DebugWorkbenchNode>;
|
|
7
|
+
getActiveEntry(workbenchId: string): ISettableObservable<string | undefined>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=DebugWorkbenchState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DebugWorkbenchState.d.ts","sourceRoot":"","sources":["../../src/components/DebugWorkbenchState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAC;AAEnC,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA8D;IACtF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA8D;IAE5F,SAAS,CACP,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,mBAAmB,CAAC,kBAAkB,CAAC;IAiB1C,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,mBAAmB,CAAC,MAAM,GAAG,SAAS,CAAC;CAQ7E"}
|
|
@@ -1,9 +1,12 @@
|
|
|
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';
|
|
6
6
|
import { ReportFixtureItem } from './ReportComparisonRow.js';
|
|
7
|
+
import { FixtureViewportStore } from './PageViewportState.js';
|
|
8
|
+
import { FixtureDebugStore } from './FixtureDebugStore.js';
|
|
9
|
+
import { DebugWorkbenchStateStore } from './DebugWorkbenchState.js';
|
|
7
10
|
export type ViewMode = 'session' | 'diff' | 'report';
|
|
8
11
|
/**
|
|
9
12
|
* A fixture item to be rendered in the preview area.
|
|
@@ -72,6 +75,16 @@ export declare class ExplorerModel extends ExplorerModel_base {
|
|
|
72
75
|
readonly selectedNode: import('@vscode/observables').IObservableWithChange<ExplorerTreeNode | undefined, void>;
|
|
73
76
|
/** List of preview rows to render based on current selection and view mode */
|
|
74
77
|
readonly selectedFixtures: import('@vscode/observables').IObservableWithChange<readonly PreviewRow[], void>;
|
|
78
|
+
/** Shared store of per-fixture `input` overrides, edited via the properties panel. */
|
|
79
|
+
readonly inputStore: FixtureInputStore;
|
|
80
|
+
/** Explorer-only page viewport size and presentation overrides. */
|
|
81
|
+
readonly viewportStore: FixtureViewportStore;
|
|
82
|
+
/** Live rendered fixture instances used by visibility-scoped debug panels. */
|
|
83
|
+
readonly debugStore: FixtureDebugStore;
|
|
84
|
+
/** Docking layouts and open-panel selections that survive preview-row recycling. */
|
|
85
|
+
readonly debugWorkbenchState: DebugWorkbenchStateStore;
|
|
86
|
+
/** Flattened list of the live fixtures currently shown in the preview area. */
|
|
87
|
+
readonly renderedFixtures: import('@vscode/observables').IObservableWithChange<readonly FixtureItem[], void>;
|
|
75
88
|
setViewMode: (mode: ViewMode) => void;
|
|
76
89
|
navigateToSession: (sessionName: string) => void;
|
|
77
90
|
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,kBA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AAC,UAAU,oBAA2B;IAC9C,mEAAmE;IACnE,QAAQ,CAAC,aAAa,uBAA8B;IACpD,8EAA8E;IAC9E,QAAQ,CAAC,UAAU,oBAA2B;IAC9C,oFAAoF;IACpF,QAAQ,CAAC,mBAAmB,2BAAkC;IAE9D,+EAA+E;IAC/E,QAAQ,CAAC,gBAAgB,oFAWtB;IAEH,WAAW,GAAI,MAAM,QAAQ,KAAG,IAAI,CAElC;IAEF,iBAAiB,GAAI,aAAa,MAAM,KAAG,IAAI,CAO7C;IAEF,iBAAiB,QAAO,IAAI,CAE1B;IAEF,kBAAkB,QAAO,IAAI,CAE3B;IAEF,WAAW,QAAO,IAAI,CAEpB;IAEF,UAAU,GAAI,QAAQ,MAAM,KAAG,IAAI,CAEjC;IAEF,kBAAkB,GAAI,QAAQ,MAAM,KAAG,IAAI,CASzC;IAEF,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO;IAKxD,OAAO,CAAC,qBAAqB;IAW7B,OAAO,CAAC,SAAS;IAWjB,OAAO,CAAC,mBAAmB;IA8C3B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IA8CxB,OAAO,CAAC,kBAAkB;CA6B3B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IReader } from '@vscode/observables';
|
|
2
|
+
import { ComponentRendering } from '../core/ComponentRenderer.js';
|
|
3
|
+
import { FixtureItem } from './ExplorerModel.js';
|
|
4
|
+
export interface FixtureDebugInfo {
|
|
5
|
+
readonly fixture: FixtureItem;
|
|
6
|
+
readonly rendering: ComponentRendering;
|
|
7
|
+
readonly ready: boolean;
|
|
8
|
+
readonly hasOutput: boolean;
|
|
9
|
+
readonly outputEditable: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare class FixtureDebugStore {
|
|
12
|
+
private readonly _entries;
|
|
13
|
+
read(reader: IReader, fixtureId: string): FixtureDebugInfo | undefined;
|
|
14
|
+
get(fixtureId: string): FixtureDebugInfo | undefined;
|
|
15
|
+
setRendering(fixture: FixtureItem, rendering: ComponentRendering): void;
|
|
16
|
+
markReady(fixture: FixtureItem, rendering: ComponentRendering): void;
|
|
17
|
+
remove(fixtureId: string, rendering: ComponentRendering): void;
|
|
18
|
+
private _set;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=FixtureDebugStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FixtureDebugStore.d.ts","sourceRoot":"","sources":["../../src/components/FixtureDebugStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;CAClC;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAGvB;IAEF,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAItE,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAIpD,YAAY,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,kBAAkB,GAAG,IAAI;IAUvE,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,kBAAkB,GAAG,IAAI;IAWpE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,GAAG,IAAI;IAQ9D,OAAO,CAAC,IAAI;CAKb"}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
import { FixtureInputStore } from '../core/index.js';
|
|
1
2
|
import { FixtureItem } from './ExplorerModel.js';
|
|
3
|
+
import { FixtureViewportStore } from './PageViewportState.js';
|
|
4
|
+
import { FixtureDebugStore } from './FixtureDebugStore.js';
|
|
5
|
+
import { DebugWorkbenchStateStore } from './DebugWorkbenchState.js';
|
|
2
6
|
import * as React from 'react';
|
|
3
7
|
export declare const FixturePreviewItem: React.ComponentType<{
|
|
4
8
|
fixture: FixtureItem;
|
|
5
9
|
compact: boolean | undefined;
|
|
6
10
|
onSelect: ((nodeId: string) => void) | undefined;
|
|
11
|
+
inputStore: FixtureInputStore | undefined;
|
|
12
|
+
viewportStore: FixtureViewportStore;
|
|
13
|
+
availablePageHeight: number;
|
|
14
|
+
debugStore: FixtureDebugStore;
|
|
15
|
+
debugWorkbenchState: DebugWorkbenchStateStore;
|
|
16
|
+
logicalFixtureCount: number;
|
|
7
17
|
} & {} & {} & {}>;
|
|
8
18
|
//# 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;AAM/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,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;AAItD,OAAO,EAEL,KAAK,oBAAoB,EAI1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AA4RzE,eAAO,MAAM,kBAAkB;;;wBA1QE,MAAM,KAAK,IAAI;;;;;;;iBA0hB/C,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IReader } from '@vscode/observables';
|
|
2
|
+
import { PageMode } from '../core/index.js';
|
|
3
|
+
export type PagePreviewMode = 'fit' | 'responsive' | 'actual';
|
|
4
|
+
export interface PageViewportSettings {
|
|
5
|
+
readonly viewportIndex: number;
|
|
6
|
+
readonly width: number;
|
|
7
|
+
readonly height: number;
|
|
8
|
+
readonly mode: PagePreviewMode;
|
|
9
|
+
}
|
|
10
|
+
export interface PagePreviewGeometry {
|
|
11
|
+
readonly logicalWidth: number;
|
|
12
|
+
readonly logicalHeight: number;
|
|
13
|
+
readonly scale: number;
|
|
14
|
+
readonly visualWidth: number;
|
|
15
|
+
readonly visualHeight: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function calculatePagePreviewGeometry(settings: PageViewportSettings, availableWidth: number, availableHeight?: number): PagePreviewGeometry;
|
|
18
|
+
export declare class FixtureViewportStore {
|
|
19
|
+
private readonly _values;
|
|
20
|
+
constructor();
|
|
21
|
+
read(reader: IReader, fixtureId: string, pageMode: PageMode): PageViewportSettings;
|
|
22
|
+
get(fixtureId: string, pageMode: PageMode): PageViewportSettings;
|
|
23
|
+
selectViewport(fixtureId: string, pageMode: PageMode, viewportIndex: number): void;
|
|
24
|
+
setWidth(fixtureId: string, pageMode: PageMode, width: number): void;
|
|
25
|
+
setHeight(fixtureId: string, pageMode: PageMode, height: number): void;
|
|
26
|
+
setMode(fixtureId: string, pageMode: PageMode, mode: PagePreviewMode): void;
|
|
27
|
+
private _set;
|
|
28
|
+
private _load;
|
|
29
|
+
private _persist;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=PageViewportState.d.ts.map
|
|
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Q,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAKpE,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAKtE,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,GAAG,IAAI;IAK3E,OAAO,CAAC,IAAI;IAMZ,OAAO,CAAC,KAAK;IAgBb,OAAO,CAAC,QAAQ;CAOjB"}
|
|
@@ -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;AAybpE,eAAO,MAAM,WAAW;;iBAoGvB,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;;GAwCxB,CAAC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export declare const ChevronRightIcon: ({ style }: {
|
|
3
3
|
style?: React.CSSProperties;
|
|
4
|
-
}) =>
|
|
4
|
+
}) => React.JSX.Element;
|
|
5
5
|
export declare const ChevronDownIcon: ({ style }: {
|
|
6
6
|
style?: React.CSSProperties;
|
|
7
|
-
}) =>
|
|
7
|
+
}) => React.JSX.Element;
|
|
8
8
|
export declare const ComponentIcon: ({ style }: {
|
|
9
9
|
style?: React.CSSProperties;
|
|
10
|
-
}) =>
|
|
10
|
+
}) => React.JSX.Element;
|
|
11
11
|
export declare const FolderIcon: ({ style }: {
|
|
12
12
|
style?: React.CSSProperties;
|
|
13
|
-
}) =>
|
|
14
|
-
export declare const PanelLeftIcon: () =>
|
|
15
|
-
export declare const PanelRightIcon: () =>
|
|
16
|
-
export declare const SunIcon: () =>
|
|
17
|
-
export declare const MoonIcon: () =>
|
|
13
|
+
}) => React.JSX.Element;
|
|
14
|
+
export declare const PanelLeftIcon: () => React.JSX.Element;
|
|
15
|
+
export declare const PanelRightIcon: () => React.JSX.Element;
|
|
16
|
+
export declare const SunIcon: () => React.JSX.Element;
|
|
17
|
+
export declare const MoonIcon: () => React.JSX.Element;
|
|
18
18
|
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/components/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,eAAO,MAAM,gBAAgB,GAAI,WAAW;IAAE,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/components/icons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,eAAO,MAAM,gBAAgB,GAAI,WAAW;IAAE,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAAE,sBAI1E,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,WAAW;IAAE,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAAE,sBAIzE,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,WAAW;IAAE,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAAE,sBAIvE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,WAAW;IAAE,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAAE,sBAIpE,CAAC;AAEF,eAAO,MAAM,aAAa,yBAIzB,CAAC;AAEF,eAAO,MAAM,cAAc,yBAI1B,CAAC;AAEF,eAAO,MAAM,OAAO,yBAInB,CAAC;AAEF,eAAO,MAAM,QAAQ,yBAIpB,CAAC"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { ComponentDefinition } from './fixtureApiConsumer.js';
|
|
2
|
-
import { RenderResult } from './fixtureApi.js';
|
|
2
|
+
import { RenderHost, RenderResult } from './fixtureApi.js';
|
|
3
|
+
import { ExceptionError } from './ErrorInfo.js';
|
|
4
|
+
import { ActiveDebugPanelSession } from './FixtureInteractionRuntime.js';
|
|
5
|
+
/** Maximum time a fixture render may take before it is reported as failed. */
|
|
6
|
+
export declare const RENDER_TIMEOUT_MS = 3000;
|
|
3
7
|
export declare class ComponentRendering {
|
|
4
8
|
readonly component: ComponentDefinition;
|
|
9
|
+
private readonly _renderHost;
|
|
10
|
+
private readonly _input?;
|
|
5
11
|
readonly renderTarget: HTMLElement;
|
|
6
12
|
readonly iframe: HTMLIFrameElement | null;
|
|
7
13
|
private readonly _abortController;
|
|
@@ -11,8 +17,22 @@ export declare class ComponentRendering {
|
|
|
11
17
|
private _styleTarget;
|
|
12
18
|
private readonly _disposables;
|
|
13
19
|
private readonly _rendered;
|
|
14
|
-
|
|
20
|
+
private readonly _inputRuntime;
|
|
21
|
+
private readonly _debugRuntime;
|
|
22
|
+
private readonly _iframeActiveSessions;
|
|
23
|
+
private readonly _iframePanelStateHandlers;
|
|
24
|
+
private _iframeHasOutput;
|
|
25
|
+
private _iframeOutputEditable;
|
|
26
|
+
private _nextIframePanelSessionId;
|
|
27
|
+
private _currentInput;
|
|
28
|
+
constructor(host: HTMLElement, component: ComponentDefinition, _renderHost?: RenderHost, _input?: unknown | undefined);
|
|
29
|
+
updateInput(input: unknown): boolean;
|
|
30
|
+
get hasOutput(): boolean;
|
|
31
|
+
get outputEditable(): boolean;
|
|
32
|
+
getOutputSnapshot(): unknown;
|
|
33
|
+
activateDebugPanel(panelId: string, publish: (state: unknown) => void): ActiveDebugPanelSession;
|
|
34
|
+
private _connectDebugPanel;
|
|
15
35
|
waitForRendering(): Promise<RenderResult | undefined>;
|
|
16
|
-
dispose():
|
|
36
|
+
dispose(): Promise<readonly ExceptionError[]>;
|
|
17
37
|
}
|
|
18
38
|
//# sourceMappingURL=ComponentRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentRenderer.d.ts","sourceRoot":"","sources":["../../src/core/ComponentRenderer.ts"],"names":[],"mapp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a,CAAU;gBAG9B,IAAI,EAAE,WAAW,EACR,SAAS,EAAE,mBAAmB,EACtB,WAAW,GAAE,UAAqD,EAClE,MAAM,CAAC,EAAE,OAAO,YAAA;IAgKlC,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAapC,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,IAAI,cAAc,IAAI,OAAO,CAE5B;IAED,iBAAiB,IAAI,OAAO;IAO5B,kBAAkB,CACjB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAC/B,uBAAuB;IAsC1B,OAAO,CAAC,kBAAkB;IAepB,gBAAgB,IAAI,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAmB3D,OAAO,IAAI,OAAO,CAAC,SAAS,cAAc,EAAE,CAAC;CAkD7C"}
|
package/dist/core/ErrorInfo.d.ts
CHANGED
|
@@ -6,15 +6,35 @@ export type RenderEventType = 'console.error' | 'console.warn' | 'console.log' |
|
|
|
6
6
|
export interface RenderEvent {
|
|
7
7
|
readonly type: RenderEventType;
|
|
8
8
|
readonly message: string;
|
|
9
|
+
readonly stack?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Errors and events captured while disposing a fixture (the implicit dispose
|
|
13
|
+
* that runs before a new render, or the explicit one triggered by
|
|
14
|
+
* `disposeAfter` / `disposeCurrentFixture()`).
|
|
15
|
+
*/
|
|
16
|
+
export interface DisposeReport {
|
|
17
|
+
readonly hasError: boolean;
|
|
18
|
+
/** Errors thrown by `dispose()` calls (RenderResult.dispose, addDisposable disposables). */
|
|
19
|
+
readonly errors: readonly ExceptionError[];
|
|
20
|
+
/** Console / window error events fired during the dispose call. */
|
|
21
|
+
readonly events: readonly RenderEvent[];
|
|
9
22
|
}
|
|
10
23
|
export interface RenderReport {
|
|
11
24
|
readonly hasError: boolean;
|
|
12
25
|
readonly error?: ExceptionError;
|
|
13
26
|
readonly events: RenderEvent[];
|
|
14
|
-
|
|
27
|
+
/** Output data the fixture provided via `RenderResult.output` (counterpart of `RenderContext.input`). */
|
|
28
|
+
readonly output?: unknown;
|
|
15
29
|
readonly renderTimeMs: {
|
|
16
30
|
readonly sync: number;
|
|
17
31
|
readonly total: number;
|
|
18
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* Errors / events captured while disposing the previous fixture (the implicit
|
|
35
|
+
* dispose that runs at the start of `renderFixture`). Present only if the
|
|
36
|
+
* dispose actually surfaced something.
|
|
37
|
+
*/
|
|
38
|
+
readonly previousDispose?: DisposeReport;
|
|
19
39
|
}
|
|
20
40
|
//# sourceMappingURL=ErrorInfo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorInfo.d.ts","sourceRoot":"","sources":["../../src/core/ErrorInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,eAAe,GAAG,eAAe,GAAG,cAAc,GAAG,aAAa,GAAG,cAAc,GAAG,2BAA2B,CAAC;AAE9H,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ErrorInfo.d.ts","sourceRoot":"","sources":["../../src/core/ErrorInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,eAAe,GAAG,eAAe,GAAG,cAAc,GAAG,aAAa,GAAG,cAAc,GAAG,2BAA2B,CAAC;AAE9H,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IA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