@vscode/component-explorer 0.2.1-16 → 0.2.1-160

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 (71) hide show
  1. package/README.md +119 -27
  2. package/dist/components/BottomDebugPanel.d.ts +8 -0
  3. package/dist/components/BottomDebugPanel.d.ts.map +1 -0
  4. package/dist/components/DebugPanelPlacement.d.ts +3 -0
  5. package/dist/components/DebugPanelPlacement.d.ts.map +1 -0
  6. package/dist/components/DebugWorkbench.d.ts +42 -0
  7. package/dist/components/DebugWorkbench.d.ts.map +1 -0
  8. package/dist/components/DebugWorkbenchLayout.d.ts +27 -0
  9. package/dist/components/DebugWorkbenchLayout.d.ts.map +1 -0
  10. package/dist/components/DebugWorkbenchState.d.ts +9 -0
  11. package/dist/components/DebugWorkbenchState.d.ts.map +1 -0
  12. package/dist/components/ExplorerModel.d.ts +28 -5
  13. package/dist/components/ExplorerModel.d.ts.map +1 -1
  14. package/dist/components/FixtureDebugStore.d.ts +20 -0
  15. package/dist/components/FixtureDebugStore.d.ts.map +1 -0
  16. package/dist/components/FixturePreviewItem.d.ts +12 -0
  17. package/dist/components/FixturePreviewItem.d.ts.map +1 -1
  18. package/dist/components/LeftSidebar.d.ts.map +1 -1
  19. package/dist/components/PageViewportState.d.ts +31 -0
  20. package/dist/components/PageViewportState.d.ts.map +1 -0
  21. package/dist/components/PreviewArea.d.ts.map +1 -1
  22. package/dist/components/RightSidebar.d.ts +8 -2
  23. package/dist/components/RightSidebar.d.ts.map +1 -1
  24. package/dist/components/TitleBar.d.ts.map +1 -1
  25. package/dist/components/TreeView.d.ts +3 -1
  26. package/dist/components/TreeView.d.ts.map +1 -1
  27. package/dist/components/favoriteFixtures.d.ts +4 -0
  28. package/dist/components/favoriteFixtures.d.ts.map +1 -0
  29. package/dist/components/icons.d.ts +12 -8
  30. package/dist/components/icons.d.ts.map +1 -1
  31. package/dist/components/types.d.ts +2 -0
  32. package/dist/components/types.d.ts.map +1 -1
  33. package/dist/core/ComponentRenderer.d.ts +23 -3
  34. package/dist/core/ComponentRenderer.d.ts.map +1 -1
  35. package/dist/core/ErrorInfo.d.ts +21 -1
  36. package/dist/core/ErrorInfo.d.ts.map +1 -1
  37. package/dist/core/FixtureInputStore.d.ts +32 -0
  38. package/dist/core/FixtureInputStore.d.ts.map +1 -0
  39. package/dist/core/FixtureInteractionRuntime.d.ts +29 -0
  40. package/dist/core/FixtureInteractionRuntime.d.ts.map +1 -0
  41. package/dist/core/FixtureNode.d.ts.map +1 -1
  42. package/dist/core/RenderTimeout.d.ts +39 -0
  43. package/dist/core/RenderTimeout.d.ts.map +1 -0
  44. package/dist/core/fixtureApi.d.ts +220 -32
  45. package/dist/core/fixtureApi.d.ts.map +1 -1
  46. package/dist/core/fixtureApiConsumer.d.ts +22 -2
  47. package/dist/core/fixtureApiConsumer.d.ts.map +1 -1
  48. package/dist/core/index.d.ts +7 -3
  49. package/dist/core/index.d.ts.map +1 -1
  50. package/dist/core/inputAggregation.d.ts +31 -0
  51. package/dist/core/inputAggregation.d.ts.map +1 -0
  52. package/dist/index.d.ts +2 -2
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.js +11 -9
  55. package/dist/lib/explorerQueryParams.d.ts +2 -2
  56. package/dist/lib/explorerQueryParams.d.ts.map +1 -1
  57. package/dist/lib/fixtureSizeCache.d.ts +2 -0
  58. package/dist/lib/fixtureSizeCache.d.ts.map +1 -1
  59. package/dist/modes/EmbeddedMode.d.ts +7 -0
  60. package/dist/modes/EmbeddedMode.d.ts.map +1 -1
  61. package/dist/modes/ExplorerUIMode.d.ts.map +1 -1
  62. package/dist/modes/HeadlessMode.d.ts +12 -3
  63. package/dist/modes/HeadlessMode.d.ts.map +1 -1
  64. package/dist/{runtimeVersion-CuO1bI-n.js → runtimeVersion-Ddl6Y2xd.js} +74 -37
  65. package/dist/runtimeVersion-Ddl6Y2xd.js.map +1 -0
  66. package/dist/viewer.js +4636 -1863
  67. package/dist/viewer.js.map +1 -1
  68. package/package.json +7 -5
  69. package/dist/core/PropertySchema.d.ts +0 -40
  70. package/dist/core/PropertySchema.d.ts.map +0 -1
  71. package/dist/runtimeVersion-CuO1bI-n.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, property schemas, fixture registry, and the Explorer React UI.
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,76 @@ 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
- properties: [
16
- { type: 'string', name: 'label', defaultValue: 'Click me' },
17
- { type: 'boolean', name: 'disabled', defaultValue: false },
18
- ],
19
- render: (container, props) => {
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={props.label as string} disabled={props.disabled as boolean} />);
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, props) => Disposable` | **(required)** | Renders the component. Must return `{ dispose() }` for cleanup. |
32
- | `properties` | `PropertySchema[]` | `[]` | Configurable properties shown in the properties panel. |
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
- ### `defineFixtureGroup(entries)`
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
+ ### Render timeout and diagnostics
52
+
53
+ Fixtures have a 3,000 ms asynchronous render/readiness budget. Synchronous work
54
+ in an installed V8 `Error.prepareStackTrace` formatter, including source-map
55
+ loading, parsing, and mapping, is excluded from that budget. The formatter's
56
+ result and exceptions are preserved; genuine fixture errors still fail with
57
+ their mapped stacks, and renders that never finish still time out.
58
+
59
+ The watchdog uses captured real timers, not a fixture's virtual clock. Diagnostic
60
+ time is shared across same-origin embedded frames, including synchronous fixture
61
+ setup. Overlapping renders keep
62
+ the formatter wrapped until the last render finishes. Headless timing reports
63
+ remain real wall-clock durations, including diagnostics. The browser runner's
64
+ outer timeout remains the limit on total wall-clock work.
65
+
66
+ ### `defineFixtureGroup(entries)` / `defineFixtureGroup(options, entries)`
40
67
 
41
- Groups multiple fixtures (supports nesting):
68
+ Groups multiple fixtures (supports nesting). An optional first argument can declare an
69
+ `inputSchema` shared by — and merged into — every descendant fixture, so common input (e.g. a
70
+ `theme` switch) is declared once for the whole group:
42
71
 
43
72
  ```tsx
44
73
  import { defineFixture, defineFixtureGroup } from '@vscode/component-explorer';
74
+ import { z } from 'zod';
45
75
 
46
- export default defineFixtureGroup({
47
- Primary: defineFixture({ render: (c) => { /* ... */ } }),
48
- Secondary: defineFixture({ render: (c) => { /* ... */ } }),
49
- Nested: defineFixtureGroup({
50
- Small: defineFixture({ render: (c) => { /* ... */ } }),
51
- }),
52
- });
76
+ export default defineFixtureGroup(
77
+ { inputSchema: z.object({ theme: z.enum(['light', 'dark']).default('dark') }) },
78
+ {
79
+ Primary: defineFixture({ render: (c) => { /* ... */ } }),
80
+ Secondary: defineFixture({ render: (c) => { /* ... */ } }),
81
+ },
82
+ );
53
83
  ```
54
84
 
55
85
  ### `defineFixtureVariants(variants)`
@@ -66,16 +96,79 @@ defineFixtureVariants({
66
96
  });
67
97
  ```
68
98
 
69
- ## Property Types
99
+ ## Input Schemas
100
+
101
+ Fixture `input` is described with a [zod](https://zod.dev) schema (`inputSchema`). The explorer
102
+ converts it to JSON Schema and renders a control per property in the properties panel:
103
+
104
+ | Zod type | Control |
105
+ |---|---|
106
+ | `z.boolean()` | Toggle checkbox |
107
+ | `z.string()` | Text input |
108
+ | `z.number()` / `z.int()` | Number input |
109
+ | `z.enum([...])` | Dropdown select |
110
+
111
+ Use `.default(...)` to set the initial value and `.describe(...)` to document a property. When
112
+ multiple rendered fixtures share a property of the same name and schema, the panel exposes a
113
+ single control that edits them all at once.
114
+
115
+ Use `inputControls` with `placement: 'toolbar'` for compact boolean or enum controls beside the
116
+ fixture dimensions. Opt a property into live updates with `watchInput`; changed properties without
117
+ a watcher keep the default full-remount behavior:
118
+
119
+ ```ts
120
+ defineFixture({
121
+ inputSchema: z.object({ showBounds: z.boolean().default(false) }),
122
+ inputControls: {
123
+ showBounds: { placement: 'toolbar', label: 'bounds' },
124
+ },
125
+ render(container, { watchInput }) {
126
+ const overlay = createBoundsOverlay(container);
127
+ watchInput('showBounds', value => overlay.setVisible(value));
128
+ return overlay;
129
+ },
130
+ });
131
+ ```
132
+
133
+ ## Typed Debug Panels and Output
134
+
135
+ `defineDebugPanel<TState, TAction>()` defines a custom panel UI. The fixture connects its live
136
+ state/action channel through `context.debug.connect`. The connection callback runs only while that
137
+ panel is visible, so hidden panels do not parse, subscribe, or publish data.
138
+
139
+ ```ts
140
+ const sourcePanel = defineDebugPanel<
141
+ { source: string },
142
+ { type: 'setSource'; source: string }
143
+ >({
144
+ id: 'source',
145
+ title: 'Source',
146
+ render: (container, { sendAction }) => createSourceView(container, sendAction),
147
+ });
148
+
149
+ defineFixture({
150
+ debugPanels: [sourcePanel],
151
+ render(container, { debug }) {
152
+ const model = createModel(container);
153
+ debug.connect(sourcePanel, channel => {
154
+ const actions = channel.onAction(action => model.setSource(action.source));
155
+ const state = model.onDidChange(() => channel.publish({ source: model.source }));
156
+ channel.publish({ source: model.source });
157
+ return { dispose: () => { actions.dispose(); state.dispose(); } };
158
+ });
159
+ return model;
160
+ },
161
+ });
162
+ ```
70
163
 
71
- | Type | Fields | Description |
72
- |---|---|---|
73
- | `boolean` | `name`, `defaultValue` | Toggle checkbox |
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 |
164
+ Panels default beside a single logical fixture and in the shared bottom workbench for variant rows.
165
+ Set `placement: 'canvas-right'` or `'bottom-panel'` on the panel to override this rule. Golden Layout
166
+ tabs can be dragged into splits when multiple panels need to remain visible.
77
167
 
78
- All property types support an optional `description` field.
168
+ Any defined `RenderResult.output` gets a built-in read-only JSON panel. Wrap it with
169
+ `interactiveOutput({ getSnapshot, activate })` to opt into JSON editing; output actions update the
170
+ live fixture without remounting. Headless and CLI consumers continue to receive the unwrapped
171
+ snapshot value.
79
172
 
80
173
  ## Explorer UI Components
81
174
 
@@ -96,7 +189,6 @@ The package exports the full Explorer UI as React components:
96
189
  |---|---|
97
190
  | `FixtureRegistry` | Observable registry of discovered fixtures. |
98
191
  | `createFixtureTree` | Builds a `FixtureNode` tree from registered fixtures. |
99
- | `getDefaultPropertyValues` | Extracts default values from a `PropertySchema[]`. |
100
192
  | `VIEWPORT_SIZES` | Built-in viewport preset dimensions (`mobile`, `tablet`, `desktop`). |
101
193
 
102
194
  ## 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,3 @@
1
+ import { DebugPanelPlacement } from '../core/index.js';
2
+ export declare function resolveDebugPanelPlacement(explicitPlacement: DebugPanelPlacement | undefined, logicalFixtureCount: number): DebugPanelPlacement;
3
+ //# sourceMappingURL=DebugPanelPlacement.d.ts.map
@@ -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,0 +1 @@
1
+ {"version":3,"file":"DebugWorkbench.d.ts","sourceRoot":"","sources":["../../src/components/DebugWorkbench.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,M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C;AAmZD,eAAO,MAAM,cAAc;;;;;;;oCA3WkB,MAAM,KAAK,IAAI;oBAC/B,IAAI;;;;;OAiahC,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","sour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AM,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';
3
- import { ExplorerTreeNode } from './types.js';
2
+ import { FixtureRegistry, ComponentDefinition, FixtureInputStore } from '../core/index.js';
3
+ import { ExplorerTreeKind, 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.
@@ -22,6 +25,10 @@ export interface ScreenshotComparisonItem {
22
25
  readonly name: string;
23
26
  readonly path: string;
24
27
  }
28
+ export interface RevealTreeNodeRequest {
29
+ readonly id: number;
30
+ readonly nodeId: string;
31
+ }
25
32
  /**
26
33
  * A preview row can be a live fixture, a variant group, or a screenshot comparison.
27
34
  */
@@ -57,7 +64,10 @@ export declare class ExplorerModel extends ExplorerModel_base {
57
64
  readonly rightSidebarVisible: import('@vscode/observables').ISettableObservable<boolean, void>;
58
65
  readonly isDarkTheme: import('@vscode/observables').ISettableObservable<boolean, void>;
59
66
  readonly selectedNodeId: import('@vscode/observables').ISettableObservable<string | undefined, void>;
60
- readonly expandedNodeIds: import('@vscode/observables').ISettableObservable<ReadonlySet<string>, void>;
67
+ readonly expandedNodeKeys: import('@vscode/observables').ISettableObservable<ReadonlySet<string>, void>;
68
+ readonly revealTreeNodeRequest: import('@vscode/observables').ISettableObservable<RevealTreeNodeRequest | undefined, void>;
69
+ private _nextRevealTreeNodeRequestId;
70
+ readonly favoriteNodeIds: import('@vscode/observables').ISettableObservable<ReadonlySet<string>, void>;
61
71
  readonly viewMode: import('@vscode/observables').ISettableObservable<ViewMode, void>;
62
72
  get daemonAvailable(): boolean;
63
73
  get daemon(): DaemonModel | undefined;
@@ -69,17 +79,30 @@ export declare class ExplorerModel extends ExplorerModel_base {
69
79
  /** The explorer's tree derived from the registry or report */
70
80
  readonly tree: import('@vscode/observables').IObservableWithChange<ExplorerTreeNode, void>;
71
81
  readonly filteredTree: import('@vscode/observables').IObservableWithChange<ExplorerTreeNode, void>;
82
+ readonly sidebarTrees: import('@vscode/observables').IObservableWithChange<readonly ExplorerTreeNode[], void>;
72
83
  readonly selectedNode: import('@vscode/observables').IObservableWithChange<ExplorerTreeNode | undefined, void>;
73
84
  /** List of preview rows to render based on current selection and view mode */
74
85
  readonly selectedFixtures: import('@vscode/observables').IObservableWithChange<readonly PreviewRow[], void>;
86
+ /** Shared store of per-fixture `input` overrides, edited via the properties panel. */
87
+ readonly inputStore: FixtureInputStore;
88
+ /** Explorer-only page viewport size and presentation overrides. */
89
+ readonly viewportStore: FixtureViewportStore;
90
+ /** Live rendered fixture instances used by visibility-scoped debug panels. */
91
+ readonly debugStore: FixtureDebugStore;
92
+ /** Docking layouts and open-panel selections that survive preview-row recycling. */
93
+ readonly debugWorkbenchState: DebugWorkbenchStateStore;
94
+ /** Flattened list of the live fixtures currently shown in the preview area. */
95
+ readonly renderedFixtures: import('@vscode/observables').IObservableWithChange<readonly FixtureItem[], void>;
75
96
  setViewMode: (mode: ViewMode) => void;
76
97
  navigateToSession: (sessionName: string) => void;
77
98
  toggleLeftSidebar: () => void;
78
99
  toggleRightSidebar: () => void;
79
100
  toggleTheme: () => void;
80
101
  selectNode: (nodeId: string) => void;
81
- toggleNodeExpanded: (nodeId: string) => void;
82
- isNodeExpanded(nodeId: string, reader: IReader): boolean;
102
+ toggleNodeExpanded: (treeKind: ExplorerTreeKind, nodeId: string) => void;
103
+ toggleNodeFavorite: (nodeId: string) => void;
104
+ revealSelectedNodeInTree: () => void;
105
+ isNodeExpanded(treeKind: ExplorerTreeKind, nodeId: string, reader: IReader): boolean;
83
106
  private _initialExpandedNodes;
84
107
  private _findNode;
85
108
  private _collectPreviewRows;
@@ -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;AAE7E,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,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,mBAAmB,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAClB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ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0FASlB;IAEH,8EAA8E;IAC9E,QAAQ,CAAC,gBAAgB,mFAuBtB;IAEH,sFAAsF;IACtF,QAAQ,CAAC,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,UAAU,gBAAgB,EAAE,QAAQ,MAAM,KAAG,IAAI,CAUrE;IAEF,kBAAkB,GAAI,QAAQ,MAAM,KAAG,IAAI,CAQzC;IAEF,wBAAwB,QAAO,IAAI,CAmBjC;IAEF,cAAc,CAAC,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO;IAKpF,OAAO,CAAC,qBAAqB;IAc7B,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,20 @@
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;
17
+ rowId: string;
18
+ getRowElement: (id: string) => HTMLDivElement | undefined;
7
19
  } & {} & {} & {}>;
8
20
  //# 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;AA0FtD,eAAO,MAAM,kBAAkB;;;wBAhFE,MAAM,KAAK,IAAI;iBAuH/C,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;AA8RzE,eAAO,MAAM,kBAAkB;;;wBA5QE,MAAM,KAAK,IAAI;;;;;;;;wBAQf,MAAM,KAAK,cAAc,GAAG,SAAS;iBAohBrE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"LeftSidebar.d.ts","sourceRoot":"","sources":["../../src/components/LeftSidebar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,eAAO,MAAM,WAAW;;GAgBvB,CAAC"}
1
+ {"version":3,"file":"LeftSidebar.d.ts","sourceRoot":"","sources":["../../src/components/LeftSidebar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,eAAO,MAAM,WAAW;;GAwBvB,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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageViewportState.d.ts","sourceRoot":"","sources":["../../src/components/PageViewportState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,OAAO,EAA4B,MAAM,qBAAqB,CAAC;AAC9F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,YAAY,GAAG,QAAQ,CAAC;AAE9D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;CAChC;AASD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AA2CD,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,oBAAoB,EAC9B,cAAc,EAAE,MAAM,EACtB,eAAe,SAAI,GAClB,mBAAmB,CAwBrB;AAED,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkE;;IAM1F,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,oBAAoB;IAIlF,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,oBAAoB;IAIhE,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI;IAYlF,QAAQ,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;AAqbpE,eAAO,MAAM,WAAW;;iBAmGvB,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;AAocpE,eAAO,MAAM,WAAW;;iBAoGvB,CAAC"}
@@ -1,6 +1,12 @@
1
- import { ExplorerTreeNode } from './types.js';
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
- selectedNode: import('@vscode/observables-react').IPropertyTransformerFactory<ExplorerTreeNode | undefined, ExplorerTreeNode | undefined>;
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,gBAAgB,EAAE,MAAM,YAAY,CAAC;AA8GnD,eAAO,MAAM,YAAY;;GAqBxB,CAAC"}
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 +1 @@
1
- {"version":3,"file":"TitleBar.d.ts","sourceRoot":"","sources":["../../src/components/TitleBar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAY,MAAM,oBAAoB,CAAC;AAoDlE,eAAO,MAAM,QAAQ;;GA2DpB,CAAC"}
1
+ {"version":3,"file":"TitleBar.d.ts","sourceRoot":"","sources":["../../src/components/TitleBar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAY,MAAM,oBAAoB,CAAC;AAoDlE,eAAO,MAAM,QAAQ;;GAoEpB,CAAC"}
@@ -1,14 +1,16 @@
1
1
  import { ExplorerModel } from './ExplorerModel.js';
2
- import { ExplorerTreeNode } from './types.js';
2
+ import { ExplorerTreeKind, ExplorerTreeNode } from './types.js';
3
3
  import * as React from 'react';
4
4
  export declare const TreeView: React.ComponentType<import('@vscode/observables-react').PropsIn<{
5
5
  model: import('@vscode/observables-react').IPropertyTransformerFactory<ExplorerModel, ExplorerModel>;
6
6
  nodes: import('@vscode/observables-react').IPropertyTransformerFactory<readonly ExplorerTreeNode[], readonly ExplorerTreeNode[]>;
7
7
  depth: import('@vscode/observables-react').IPropertyTransformerFactory<number, number>;
8
+ treeKind: import('@vscode/observables-react').IPropertyTransformerFactory<ExplorerTreeKind, ExplorerTreeKind>;
8
9
  }>>;
9
10
  export declare const TreeItem: React.ComponentType<{
10
11
  model: ExplorerModel;
11
12
  node: ExplorerTreeNode;
12
13
  depth: number;
14
+ treeKind: ExplorerTreeKind;
13
15
  } & {} & {} & {}>;
14
16
  //# sourceMappingURL=TreeView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TreeView.d.ts","sourceRoot":"","sources":["../../src/components/TreeView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AA+BnD,eAAO,MAAM,QAAQ;;;;GAapB,CAAC;AAuCF,eAAO,MAAM,QAAQ;;;;iBA+DnB,CAAC"}
1
+ {"version":3,"file":"TreeView.d.ts","sourceRoot":"","sources":["../../src/components/TreeView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,aAAa,EAAyB,MAAM,oBAAoB,CAAC;AAC/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAoDrE,eAAO,MAAM,QAAQ;;;;;GAcpB,CAAC;AA4DF,eAAO,MAAM,QAAQ;;;;;iBA+EnB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ExplorerTreeNode } from './types.js';
2
+ export declare const FAVORITES_NODE_ID = "component-explorer-internal:favorites";
3
+ export declare function createFavoriteFixturesTree(root: ExplorerTreeNode, favoriteNodeIds: ReadonlySet<string>): ExplorerTreeNode | undefined;
4
+ //# sourceMappingURL=favoriteFixtures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"favoriteFixtures.d.ts","sourceRoot":"","sources":["../../src/components/favoriteFixtures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,eAAO,MAAM,iBAAiB,0CAA0C,CAAC;AAEzE,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,gBAAgB,EACtB,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,GACnC,gBAAgB,GAAG,SAAS,CAc9B"}
@@ -1,18 +1,22 @@
1
1
  import * as React from 'react';
2
2
  export declare const ChevronRightIcon: ({ style }: {
3
3
  style?: React.CSSProperties;
4
- }) => import("react/jsx-runtime").JSX.Element;
4
+ }) => React.JSX.Element;
5
5
  export declare const ChevronDownIcon: ({ style }: {
6
6
  style?: React.CSSProperties;
7
- }) => import("react/jsx-runtime").JSX.Element;
7
+ }) => React.JSX.Element;
8
8
  export declare const ComponentIcon: ({ style }: {
9
9
  style?: React.CSSProperties;
10
- }) => import("react/jsx-runtime").JSX.Element;
10
+ }) => React.JSX.Element;
11
11
  export declare const FolderIcon: ({ style }: {
12
12
  style?: React.CSSProperties;
13
- }) => import("react/jsx-runtime").JSX.Element;
14
- export declare const PanelLeftIcon: () => import("react/jsx-runtime").JSX.Element;
15
- export declare const PanelRightIcon: () => import("react/jsx-runtime").JSX.Element;
16
- export declare const SunIcon: () => import("react/jsx-runtime").JSX.Element;
17
- export declare const MoonIcon: () => import("react/jsx-runtime").JSX.Element;
13
+ }) => React.JSX.Element;
14
+ export declare const StarIcon: ({ filled }: {
15
+ filled?: boolean;
16
+ }) => React.JSX.Element;
17
+ export declare const RevealInTreeIcon: () => React.JSX.Element;
18
+ export declare const PanelLeftIcon: () => React.JSX.Element;
19
+ export declare const PanelRightIcon: () => React.JSX.Element;
20
+ export declare const SunIcon: () => React.JSX.Element;
21
+ export declare const MoonIcon: () => React.JSX.Element;
18
22
  //# 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,4CAI1E,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,WAAW;IAAE,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAAE,4CAIzE,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,WAAW;IAAE,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAAE,4CAIvE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,WAAW;IAAE,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAAE,4CAIpE,CAAC;AAEF,eAAO,MAAM,aAAa,+CAIzB,CAAC;AAEF,eAAO,MAAM,cAAc,+CAI1B,CAAC;AAEF,eAAO,MAAM,OAAO,+CAInB,CAAC;AAEF,eAAO,MAAM,QAAQ,+CAIpB,CAAC"}
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,QAAQ,GAAI,YAAoB;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,sBAIhE,CAAC;AAEF,eAAO,MAAM,gBAAgB,yBAI5B,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,5 +1,6 @@
1
1
  import { FixtureNode, ComponentDefinition } from '../core/index.js';
2
2
  import { FixturePath } from '../core/FixturePath.js';
3
+ export type ExplorerTreeKind = 'components' | 'favorites';
3
4
  /**
4
5
  * Explorer's tree node structure, derived from FixtureNode.
5
6
  * This is the explorer's own representation of the fixture tree.
@@ -11,6 +12,7 @@ export interface ExplorerTreeNode {
11
12
  readonly children?: readonly ExplorerTreeNode[];
12
13
  readonly component?: ComponentDefinition;
13
14
  readonly labels: readonly string[];
15
+ readonly isFavoritesRoot?: boolean;
14
16
  }
15
17
  /**
16
18
  * Converts a FixtureNode tree to ExplorerTreeNode tree.