@vscode/component-explorer 0.2.1-18 → 0.2.1-180
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 +198 -27
- package/dist/browserDaemonClient-AB8d4x2O.js +3465 -0
- package/dist/browserDaemonClient-AB8d4x2O.js.map +1 -0
- 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 +30 -0
- package/dist/components/DebugWorkbenchLayout.d.ts.map +1 -0
- package/dist/components/DebugWorkbenchState.d.ts +31 -0
- package/dist/components/DebugWorkbenchState.d.ts.map +1 -0
- package/dist/components/ExplorerModel.d.ts +28 -5
- 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 +11 -0
- package/dist/components/FixturePreviewItem.d.ts.map +1 -1
- package/dist/components/LeftSidebar.d.ts.map +1 -1
- package/dist/components/PageViewportState.d.ts +34 -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/TitleBar.d.ts.map +1 -1
- package/dist/components/TreeView.d.ts +3 -1
- package/dist/components/TreeView.d.ts.map +1 -1
- package/dist/components/favoriteFixtures.d.ts +4 -0
- package/dist/components/favoriteFixtures.d.ts.map +1 -0
- package/dist/components/icons.d.ts +12 -8
- package/dist/components/icons.d.ts.map +1 -1
- package/dist/components/types.d.ts +2 -0
- package/dist/components/types.d.ts.map +1 -1
- package/dist/core/ComponentRenderer.d.ts +26 -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 +30 -0
- package/dist/core/FixtureInteractionRuntime.d.ts.map +1 -0
- package/dist/core/FixtureNode.d.ts.map +1 -1
- package/dist/core/FixtureRegistry.d.ts +2 -0
- package/dist/core/FixtureRegistry.d.ts.map +1 -1
- package/dist/core/RenderTimeout.d.ts +39 -0
- package/dist/core/RenderTimeout.d.ts.map +1 -0
- package/dist/core/fixtureApi.d.ts +234 -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/daemon/DaemonConfig.d.ts +0 -2
- package/dist/daemon/DaemonConfig.d.ts.map +1 -1
- package/dist/daemon/DaemonModel.d.ts +12 -6
- package/dist/daemon/DaemonModel.d.ts.map +1 -1
- package/dist/daemon/browserDaemonClient.d.ts +3 -0
- package/dist/daemon/browserDaemonClient.d.ts.map +1 -0
- package/dist/fixtureApi.d-DjVuiRlO.d.ts +533 -0
- package/dist/index.d.ts +53 -10
- 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 +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-DLeDvOjy.js → runtimeVersion-D9F0L_-O.js} +80 -39
- package/dist/runtimeVersion-D9F0L_-O.js.map +1 -0
- package/dist/viewer.d.ts +2900 -24
- package/dist/viewer.d.ts.map +1 -1
- package/dist/viewer.js +5596 -2332
- package/dist/viewer.js.map +1 -1
- package/package.json +10 -6
- package/dist/core/PropertySchema.d.ts +0 -40
- package/dist/core/PropertySchema.d.ts.map +0 -1
- package/dist/runtimeVersion-DLeDvOjy.js.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DebugPanelActivation, IDisposable } from './fixtureApi.js';
|
|
2
|
+
export declare const OUTPUT_DEBUG_PANEL_ID = "$output";
|
|
3
|
+
export interface ActiveDebugPanelSession extends IDisposable {
|
|
4
|
+
sendAction(action: unknown): void;
|
|
5
|
+
}
|
|
6
|
+
type InputListener = (value: unknown, input: unknown) => void;
|
|
7
|
+
export declare class FixtureInputRuntime {
|
|
8
|
+
private _input;
|
|
9
|
+
private readonly _listeners;
|
|
10
|
+
constructor(_input: unknown);
|
|
11
|
+
watch(key: string, listener: InputListener): IDisposable;
|
|
12
|
+
update(input: unknown): boolean;
|
|
13
|
+
report(key: string, value: unknown): unknown;
|
|
14
|
+
}
|
|
15
|
+
export declare class FixtureDebugRuntime implements IDisposable {
|
|
16
|
+
private readonly _activations;
|
|
17
|
+
private readonly _activeSessions;
|
|
18
|
+
private _output;
|
|
19
|
+
private _hasOutput;
|
|
20
|
+
connect(panelId: string, activate: DebugPanelActivation<unknown, unknown>): IDisposable;
|
|
21
|
+
setOutput(output: unknown): void;
|
|
22
|
+
get hasOutput(): boolean;
|
|
23
|
+
get outputEditable(): boolean;
|
|
24
|
+
getOutputSnapshot(): unknown;
|
|
25
|
+
activate(panelId: string, publish: (state: unknown) => void): ActiveDebugPanelSession;
|
|
26
|
+
dispose(): void;
|
|
27
|
+
private _activateOutput;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=FixtureInteractionRuntime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FixtureInteractionRuntime.d.ts","sourceRoot":"","sources":["../../src/core/FixtureInteractionRuntime.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EAEzB,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAC;AAEzB,eAAO,MAAM,qBAAqB,YAAY,CAAC;AAE/C,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC1D,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;CACnC;AAED,KAAK,aAAa,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;AAE9D,qBAAa,mBAAmB;IAGlB,OAAO,CAAC,MAAM;IAF1B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAyC;gBAEhD,MAAM,EAAE,OAAO;IAEnC,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,GAAG,WAAW;IAsBxD,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAsB/B,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO;CAO7C;AAED,qBAAa,mBAAoB,YAAW,WAAW;IACrD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA6D;IAC1F,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAsC;IACtE,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,UAAU,CAAS;IAE3B,OAAO,CACL,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,GAC/C,WAAW;IAcd,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAKhC,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,IAAI,cAAc,IAAI,OAAO,CAE5B;IAED,iBAAiB,IAAI,OAAO;IAM5B,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,uBAAuB;IAgDrF,OAAO,IAAI,IAAI;IASf,OAAO,CAAC,eAAe;CAWxB"}
|
|
@@ -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"}
|
|
@@ -3,6 +3,8 @@ import { FixtureExport } from './fixtureApi.js';
|
|
|
3
3
|
import { ComponentDefinition } from './fixtureApiConsumer.js';
|
|
4
4
|
import { FixtureNode } from './FixtureNode.js';
|
|
5
5
|
export declare class FixtureRegistry {
|
|
6
|
+
readonly storageScope?: string | undefined;
|
|
7
|
+
constructor(storageScope?: string | undefined);
|
|
6
8
|
private readonly _fixtures;
|
|
7
9
|
readonly loading: import('@vscode/observables').ISettableObservable<boolean, void>;
|
|
8
10
|
readonly error: import('@vscode/observables').ISettableObservable<string | undefined, void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FixtureRegistry.d.ts","sourceRoot":"","sources":["../../src/core/FixtureRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,WAAW,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAqC,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEvF,qBAAa,eAAe;
|
|
1
|
+
{"version":3,"file":"FixtureRegistry.d.ts","sourceRoot":"","sources":["../../src/core/FixtureRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,WAAW,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAqC,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEvF,qBAAa,eAAe;IACd,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM;gBAArB,YAAY,CAAC,EAAE,MAAM,YAAA;IAE1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgE;IAC1F,QAAQ,CAAC,OAAO,mEAAyC;IACzD,QAAQ,CAAC,KAAK,8EAAwD;IAEtE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,WAAW,CAAC,CAGpC;IAEH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,GAAG,IAAI;IAM1D,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAO9B,KAAK,IAAI,IAAI;IAIb,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,WAAW,GAAG,SAAS;IAKjE,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,mBAAmB,GAAG,SAAS;CAMpE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare function realTimeNow(): number;
|
|
2
|
+
interface TimeApi {
|
|
3
|
+
now(): number;
|
|
4
|
+
schedule(callback: () => void, delay: number): () => void;
|
|
5
|
+
}
|
|
6
|
+
type StackTraceFormatter = (error: Error, frames: readonly unknown[]) => unknown;
|
|
7
|
+
interface StackTraceHost {
|
|
8
|
+
prepareStackTrace?: StackTraceFormatter;
|
|
9
|
+
}
|
|
10
|
+
interface DiagnosticTime {
|
|
11
|
+
elapsed: number;
|
|
12
|
+
depth: number;
|
|
13
|
+
}
|
|
14
|
+
/** Accounts for synchronous stack formatting without changing its result or error behavior. */
|
|
15
|
+
export declare class DiagnosticClock {
|
|
16
|
+
private readonly _host;
|
|
17
|
+
private readonly _time;
|
|
18
|
+
private readonly _diagnostics;
|
|
19
|
+
private _references;
|
|
20
|
+
private _restore;
|
|
21
|
+
constructor(_host: StackTraceHost, _time: TimeApi, _diagnostics?: DiagnosticTime);
|
|
22
|
+
now(): number;
|
|
23
|
+
schedule(callback: () => void, delay: number): () => void;
|
|
24
|
+
track(): () => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function trackDiagnosticTime(): () => void;
|
|
27
|
+
/** A real-time render budget that does not charge synchronous diagnostic formatting. */
|
|
28
|
+
export declare class RenderTimeout {
|
|
29
|
+
private readonly _signal;
|
|
30
|
+
readonly promise: Promise<never>;
|
|
31
|
+
private _cancel;
|
|
32
|
+
private readonly _stopTracking;
|
|
33
|
+
private _disposed;
|
|
34
|
+
private readonly _onAbort;
|
|
35
|
+
constructor(duration: number, _signal: AbortSignal, clock?: DiagnosticClock);
|
|
36
|
+
dispose(): void;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=RenderTimeout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderTimeout.d.ts","sourceRoot":"","sources":["../../src/core/RenderTimeout.ts"],"names":[],"mappings":"AASA,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED,UAAU,OAAO;IAChB,GAAG,IAAI,MAAM,CAAC;IACd,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,IAAI,CAAC;CAC1D;AAUD,KAAK,mBAAmB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,OAAO,EAAE,KAAK,OAAO,CAAC;AAEjF,UAAU,cAAc;IACvB,iBAAiB,CAAC,EAAE,mBAAmB,CAAC;CACxC;AAED,UAAU,cAAc;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACd;AAiBD,+FAA+F;AAC/F,qBAAa,eAAe;IAK1B,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAN9B,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,QAAQ,CAA2B;gBAGzB,KAAK,EAAE,cAAc,EACrB,KAAK,EAAE,OAAO,EACd,YAAY,GAAE,cAAyC;IAGzE,GAAG,IAAI,MAAM;IAIb,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,IAAI;IAIzD,KAAK,IAAI,MAAM,IAAI;CAmCnB;AAID,wBAAgB,mBAAmB,IAAI,MAAM,IAAI,CAEhD;AAED,wFAAwF;AACxF,qBAAa,aAAa;IASxB,OAAO,CAAC,QAAQ,CAAC,OAAO;IARzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACjC,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAa;IAC3C,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwB;gBAGhD,QAAQ,EAAE,MAAM,EACC,OAAO,EAAE,WAAW,EACrC,KAAK,GAAE,eAAiC;IAwBzC,OAAO,IAAI,IAAI;CAQf"}
|
|
@@ -1,20 +1,75 @@
|
|
|
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.
|
|
4
|
+
* `dispose` may be sync or async; the framework awaits the returned promise (if any)
|
|
5
|
+
* and captures any thrown errors.
|
|
15
6
|
*/
|
|
16
7
|
export interface IDisposable {
|
|
17
|
-
dispose(): void
|
|
8
|
+
dispose(): void | Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export type DebugPanelPlacement = 'canvas-right' | 'bottom-panel';
|
|
11
|
+
export interface DebugPanelViewContext<TAction> {
|
|
12
|
+
sendAction(action: TAction): void;
|
|
13
|
+
viewState<T>(options: DebugPanelViewStateOptions<T>): DebugPanelViewState<T>;
|
|
14
|
+
}
|
|
15
|
+
export interface DebugPanelViewStateOptions<T> {
|
|
16
|
+
readonly version: number;
|
|
17
|
+
readonly scope: 'pane' | 'fixture';
|
|
18
|
+
readonly schema: z.ZodType<T>;
|
|
19
|
+
readonly defaultValue: T;
|
|
20
|
+
}
|
|
21
|
+
export interface DebugPanelViewState<T> {
|
|
22
|
+
get(): T;
|
|
23
|
+
set(value: T): void;
|
|
24
|
+
onChange(listener: (value: T) => void): IDisposable;
|
|
25
|
+
}
|
|
26
|
+
export interface DebugPanelViewInstance<TState> extends IDisposable {
|
|
27
|
+
update(state: TState): void;
|
|
28
|
+
}
|
|
29
|
+
export interface DefineDebugPanelOptions<TState, TAction> {
|
|
30
|
+
readonly id: string;
|
|
31
|
+
readonly title: string;
|
|
32
|
+
readonly placement?: DebugPanelPlacement;
|
|
33
|
+
render(container: HTMLElement, context: DebugPanelViewContext<TAction>): DebugPanelViewInstance<TState>;
|
|
34
|
+
}
|
|
35
|
+
interface ErasedDebugPanelViewInstance extends IDisposable {
|
|
36
|
+
update(state: unknown): void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A statically declared custom panel. `TState` is published by the fixture and
|
|
40
|
+
* `TAction` is sent back by the panel UI.
|
|
41
|
+
*/
|
|
42
|
+
export interface DebugPanelDefinition<TState = unknown, TAction = unknown> {
|
|
43
|
+
readonly id: string;
|
|
44
|
+
readonly title: string;
|
|
45
|
+
readonly placement?: DebugPanelPlacement;
|
|
46
|
+
/** @internal Viewer-side, type-erased renderer produced by defineDebugPanel. */
|
|
47
|
+
readonly _render: (container: HTMLElement, sendAction: (action: unknown) => void, viewState?: DebugPanelViewContext<unknown>['viewState']) => ErasedDebugPanelViewInstance;
|
|
48
|
+
/** @internal Carries types for inference without affecting the runtime shape. */
|
|
49
|
+
readonly _types?: {
|
|
50
|
+
readonly state: TState;
|
|
51
|
+
readonly action: TAction;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export interface DebugPanelChannel<TState, TAction> {
|
|
55
|
+
publish(state: TState): void;
|
|
56
|
+
onAction(listener: (action: TAction) => void): IDisposable;
|
|
57
|
+
}
|
|
58
|
+
export type DebugPanelActivation<TState, TAction> = (channel: DebugPanelChannel<TState, TAction>) => void | IDisposable;
|
|
59
|
+
export interface FixtureDebugApi {
|
|
60
|
+
connect<TState, TAction>(panel: DebugPanelDefinition<TState, TAction>, activate: DebugPanelActivation<TState, TAction>): IDisposable;
|
|
61
|
+
}
|
|
62
|
+
export interface FixtureInputControlOptions {
|
|
63
|
+
readonly placement?: 'sidebar' | 'toolbar' | 'both';
|
|
64
|
+
readonly label?: string;
|
|
65
|
+
readonly title?: string;
|
|
66
|
+
}
|
|
67
|
+
/** Brand for an output that can be observed and edited while its Output panel is visible. */
|
|
68
|
+
export declare const interactiveOutputBrand: unique symbol;
|
|
69
|
+
export interface InteractiveOutput<T> {
|
|
70
|
+
readonly [interactiveOutputBrand]: true;
|
|
71
|
+
getSnapshot(): T;
|
|
72
|
+
activate(channel: DebugPanelChannel<T, T>): void | IDisposable;
|
|
18
73
|
}
|
|
19
74
|
/**
|
|
20
75
|
* Result of a render operation.
|
|
@@ -30,14 +85,20 @@ export interface RenderResult {
|
|
|
30
85
|
readonly ready?: Promise<void>;
|
|
31
86
|
/**
|
|
32
87
|
* Cleanup function. Called when the fixture is unmounted.
|
|
88
|
+
* May be sync or async; the framework awaits the returned promise (if any).
|
|
89
|
+
* Errors thrown (sync or async) are captured and surfaced via the
|
|
90
|
+
* `previousDispose` field of the next render report (or `currentDispose`
|
|
91
|
+
* if `disposeAfter` was requested).
|
|
33
92
|
* Can be omitted if no cleanup is needed.
|
|
34
93
|
*/
|
|
35
|
-
dispose?(): void
|
|
94
|
+
dispose?(): void | Promise<void>;
|
|
36
95
|
/**
|
|
37
96
|
* Arbitrary data to include in the render report.
|
|
38
|
-
* Visible to the CLI and MCP tools.
|
|
97
|
+
* Visible to the CLI and MCP tools (surfaced as `output`).
|
|
98
|
+
*
|
|
99
|
+
* Symmetric counterpart of `RenderContext.input`: input flows in, output flows out.
|
|
39
100
|
*/
|
|
40
|
-
readonly
|
|
101
|
+
readonly output?: unknown;
|
|
41
102
|
}
|
|
42
103
|
/**
|
|
43
104
|
* What the render function can return.
|
|
@@ -48,13 +109,67 @@ export interface RenderResult {
|
|
|
48
109
|
export type RenderReturn = RenderResult | undefined | void | Promise<RenderResult | undefined | void>;
|
|
49
110
|
/**
|
|
50
111
|
* Context passed to the render function.
|
|
112
|
+
*
|
|
113
|
+
* @typeParam TInput - Shape of `input`, inferred from the fixture's zod `inputSchema`
|
|
114
|
+
* (defaults to `unknown` when no schema is declared).
|
|
51
115
|
*/
|
|
52
|
-
export interface RenderContext {
|
|
116
|
+
export interface RenderContext<TInput = unknown> {
|
|
117
|
+
/**
|
|
118
|
+
* Unique identifier of the fixture being rendered.
|
|
119
|
+
* Stable across renders of the same fixture; useful for keying caches,
|
|
120
|
+
* logging, or distinguishing between sibling fixtures sharing a render function.
|
|
121
|
+
*/
|
|
122
|
+
readonly fixtureId: string;
|
|
53
123
|
/** AbortSignal for cancellation; check signal.aborted or listen to 'abort' event */
|
|
54
124
|
readonly signal: AbortSignal;
|
|
55
125
|
/** Register a disposable to be cleaned up when the fixture is unmounted. Returns the same disposable for chaining. */
|
|
56
126
|
addDisposable<T extends IDisposable>(disposable: T): T;
|
|
127
|
+
/**
|
|
128
|
+
* Observes one input property without remounting the fixture. The listener is
|
|
129
|
+
* invoked immediately and again for subsequent changes to this property.
|
|
130
|
+
* Input properties without a watcher retain the default remount behavior.
|
|
131
|
+
*/
|
|
132
|
+
watchInput<TKey extends Extract<keyof TInput, string>>(key: TKey, listener: (value: TInput[TKey], input: TInput) => void): IDisposable;
|
|
133
|
+
/** Reports a component-originated change to a watched input, keeping sidebar controls synchronized without echoing it to the watcher. */
|
|
134
|
+
reportInput<TKey extends Extract<keyof TInput, string>>(key: TKey, value: TInput[TKey]): void;
|
|
135
|
+
/** Connects statically declared debug panels to this live fixture instance. */
|
|
136
|
+
readonly debug: FixtureDebugApi;
|
|
137
|
+
/**
|
|
138
|
+
* Describes where this fixture is being rendered. Use this to enable dev-only affordances
|
|
139
|
+
* (e.g. extra controls, logging) without affecting screenshots or embedded views.
|
|
140
|
+
*/
|
|
141
|
+
readonly host: RenderHost;
|
|
142
|
+
/**
|
|
143
|
+
* Data passed in by the caller (CLI/MCP screenshot tool, explorer UI). Use this to
|
|
144
|
+
* parameterize the fixture: e.g. switch theme, vary props, select a scenario.
|
|
145
|
+
*
|
|
146
|
+
* When the fixture declares a zod `inputSchema`, this is typed as `z.infer<typeof schema>`
|
|
147
|
+
* and populated with the schema's defaults for any keys the caller omitted. Without a
|
|
148
|
+
* schema it is `unknown` (and `undefined` when no input was provided).
|
|
149
|
+
*
|
|
150
|
+
* Symmetric with `RenderResult.output` (which flows back out to the caller).
|
|
151
|
+
*/
|
|
152
|
+
readonly input: TInput;
|
|
57
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* Describes the environment a fixture is rendered in.
|
|
156
|
+
*/
|
|
157
|
+
export type RenderHost =
|
|
158
|
+
/** Rendered in the Component Explorer UI (visible to a human). */
|
|
159
|
+
{
|
|
160
|
+
readonly kind: 'explorer-ui';
|
|
161
|
+
readonly interactive: true;
|
|
162
|
+
}
|
|
163
|
+
/** Headless render for CLI/MCP screenshots. */
|
|
164
|
+
| {
|
|
165
|
+
readonly kind: 'headless';
|
|
166
|
+
readonly interactive: false;
|
|
167
|
+
}
|
|
168
|
+
/** Rendered inside an isolation iframe (user-facing standalone view). */
|
|
169
|
+
| {
|
|
170
|
+
readonly kind: 'embedded';
|
|
171
|
+
readonly interactive: false;
|
|
172
|
+
};
|
|
58
173
|
/**
|
|
59
174
|
* Style definition for shadow DOM injection.
|
|
60
175
|
*/
|
|
@@ -94,6 +209,36 @@ export type ViewportPreset = ViewportPresetName | {
|
|
|
94
209
|
readonly height: number;
|
|
95
210
|
};
|
|
96
211
|
export type ViewportPresetName = 'mobile' | 'tablet' | 'desktop';
|
|
212
|
+
/**
|
|
213
|
+
* Minimal JSON Schema interface used to describe a fixture's expected `input` shape.
|
|
214
|
+
*
|
|
215
|
+
* This is the *derived* form: fixtures declare their input with a zod schema
|
|
216
|
+
* (`DefineFixtureOptions.inputSchema`) and the framework converts it to this JSON Schema
|
|
217
|
+
* at define time. Tools (CLI/MCP/explorer UI) read it for validation, autocompletion, or
|
|
218
|
+
* to generate input-editing controls.
|
|
219
|
+
*
|
|
220
|
+
* Intentionally a structural, recursive type covering the subset of JSON Schema we
|
|
221
|
+
* actually surface to tools — the index signature lets any additional standard JSON Schema
|
|
222
|
+
* keywords (`format`, `pattern`, `oneOf`, `$ref`, …) flow through without changing this interface.
|
|
223
|
+
*/
|
|
224
|
+
export interface IJsonSchema {
|
|
225
|
+
readonly type?: 'object' | 'array' | 'string' | 'number' | 'integer' | 'boolean' | 'null';
|
|
226
|
+
readonly properties?: {
|
|
227
|
+
readonly [key: string]: IJsonSchema;
|
|
228
|
+
};
|
|
229
|
+
readonly required?: readonly string[];
|
|
230
|
+
readonly items?: IJsonSchema;
|
|
231
|
+
readonly enum?: readonly unknown[];
|
|
232
|
+
readonly const?: unknown;
|
|
233
|
+
readonly default?: unknown;
|
|
234
|
+
readonly description?: string;
|
|
235
|
+
readonly title?: string;
|
|
236
|
+
readonly additionalProperties?: boolean | IJsonSchema;
|
|
237
|
+
readonly anyOf?: readonly IJsonSchema[];
|
|
238
|
+
readonly oneOf?: readonly IJsonSchema[];
|
|
239
|
+
readonly allOf?: readonly IJsonSchema[];
|
|
240
|
+
readonly [key: string]: unknown;
|
|
241
|
+
}
|
|
97
242
|
/** Brand symbol to identify single fixtures */
|
|
98
243
|
export declare const singleFixtureBrand: unique symbol;
|
|
99
244
|
/** Brand symbol to identify fixture groups */
|
|
@@ -102,8 +247,10 @@ export declare const fixtureGroupBrand: unique symbol;
|
|
|
102
247
|
export declare const fixtureVariantsBrand: unique symbol;
|
|
103
248
|
/**
|
|
104
249
|
* Options for defining a single component fixture.
|
|
250
|
+
*
|
|
251
|
+
* @typeParam TInput - Shape of the fixture's `input`, inferred from `inputSchema`.
|
|
105
252
|
*/
|
|
106
|
-
export interface DefineFixtureOptions {
|
|
253
|
+
export interface DefineFixtureOptions<TInput = unknown> {
|
|
107
254
|
/**
|
|
108
255
|
* Path in the explorer tree.
|
|
109
256
|
* - `undefined` (default): use fixture filename only
|
|
@@ -127,14 +274,41 @@ export interface DefineFixtureOptions {
|
|
|
127
274
|
labels?: readonly string[];
|
|
128
275
|
/** Human/AI-readable description(s) of expected visual appearance. Inherited from parent group/variants and accumulated into a string[]. */
|
|
129
276
|
expectedVisualDescriptions?: string | readonly string[];
|
|
277
|
+
/**
|
|
278
|
+
* Zod schema describing the expected shape of `RenderContext.input`.
|
|
279
|
+
*
|
|
280
|
+
* Declaring it gives two things:
|
|
281
|
+
* 1. **Type safety** — `render`'s `context.input` is typed as `z.infer<typeof schema>`.
|
|
282
|
+
* 2. **Tooling** — the framework converts the schema to JSON Schema at define time so the
|
|
283
|
+
* CLI/MCP/explorer UI can validate, autocomplete, or render input-editing controls.
|
|
284
|
+
*
|
|
285
|
+
* The schema must describe an object (`z.object({...})`) — `input` is always a JSON object
|
|
286
|
+
* (or `undefined`). Property-level `.default(...)` values are surfaced to tooling and used
|
|
287
|
+
* to populate omitted keys before `render` runs.
|
|
288
|
+
*
|
|
289
|
+
* @example
|
|
290
|
+
* ```ts
|
|
291
|
+
* inputSchema: z.object({
|
|
292
|
+
* theme: z.enum(['light', 'dark']).default('light'),
|
|
293
|
+
* count: z.number().int().default(1),
|
|
294
|
+
* })
|
|
295
|
+
* ```
|
|
296
|
+
*/
|
|
297
|
+
inputSchema?: z.ZodType<TInput>;
|
|
298
|
+
/** Controls how selected input properties are presented in the Explorer UI. */
|
|
299
|
+
inputControls?: {
|
|
300
|
+
readonly [TKey in Extract<keyof TInput, string>]?: FixtureInputControlOptions;
|
|
301
|
+
};
|
|
302
|
+
/** Custom debug panels contributed by this fixture. */
|
|
303
|
+
debugPanels?: readonly DebugPanelDefinition<unknown, unknown>[];
|
|
130
304
|
/**
|
|
131
305
|
* Render the component into the container.
|
|
132
306
|
*
|
|
133
307
|
* @param container - The DOM element to render into
|
|
134
|
-
* @param context - Render context containing
|
|
308
|
+
* @param context - Render context containing input and abort signal
|
|
135
309
|
* @returns Optional RenderResult, or a Promise that resolves to one
|
|
136
310
|
*/
|
|
137
|
-
render: (container: HTMLElement, context: RenderContext) => RenderReturn;
|
|
311
|
+
render: (container: HTMLElement, context: RenderContext<TInput>) => RenderReturn;
|
|
138
312
|
}
|
|
139
313
|
/** @deprecated Use DefineFixtureOptions instead */
|
|
140
314
|
export type DefineComponentOptions = DefineFixtureOptions;
|
|
@@ -145,6 +319,8 @@ export interface SingleFixtureExport {
|
|
|
145
319
|
readonly [singleFixtureBrand]: true;
|
|
146
320
|
readonly _options: DefineFixtureOptions;
|
|
147
321
|
readonly _path?: string;
|
|
322
|
+
/** JSON Schema derived from `_options.inputSchema` at define time (cross-version safe). */
|
|
323
|
+
readonly _inputSchemaJson?: IJsonSchema;
|
|
148
324
|
}
|
|
149
325
|
/**
|
|
150
326
|
* Group entry: either a single fixture, a nested group, or variants.
|
|
@@ -161,6 +337,8 @@ export interface FixtureGroupExport {
|
|
|
161
337
|
readonly _path?: string;
|
|
162
338
|
readonly _labels?: readonly string[];
|
|
163
339
|
readonly _expectedVisualDescriptions?: string | readonly string[];
|
|
340
|
+
/** JSON Schema derived from the group's `inputSchema`; merged into every descendant fixture. */
|
|
341
|
+
readonly _inputSchemaJson?: IJsonSchema;
|
|
164
342
|
}
|
|
165
343
|
/**
|
|
166
344
|
* A fixture variants export created by defineFixtureVariants().
|
|
@@ -173,6 +351,8 @@ export interface FixtureVariantsExport {
|
|
|
173
351
|
readonly _path?: string;
|
|
174
352
|
readonly _labels?: readonly string[];
|
|
175
353
|
readonly _expectedVisualDescriptions?: string | readonly string[];
|
|
354
|
+
/** JSON Schema derived from the variants group's `inputSchema`; merged into every variant. */
|
|
355
|
+
readonly _inputSchemaJson?: IJsonSchema;
|
|
176
356
|
}
|
|
177
357
|
/**
|
|
178
358
|
* Fixture export type - a single fixture, a group, or variants.
|
|
@@ -199,6 +379,13 @@ export interface DefineFixtureGroupOptions {
|
|
|
199
379
|
labels?: readonly string[];
|
|
200
380
|
/** Human/AI-readable description(s) of expected visual appearance. Inherited by nested fixtures. */
|
|
201
381
|
expectedVisualDescriptions?: string | readonly string[];
|
|
382
|
+
/**
|
|
383
|
+
* Zod schema describing `input` shared by every fixture in this group. It is converted to
|
|
384
|
+
* JSON Schema at define time and merged into each descendant fixture's own schema (the
|
|
385
|
+
* descendant's properties win on conflict). Use it to declare common input — e.g. a `theme`
|
|
386
|
+
* switch — once for a whole group instead of repeating it on each fixture.
|
|
387
|
+
*/
|
|
388
|
+
inputSchema?: z.ZodType;
|
|
202
389
|
}
|
|
203
390
|
/**
|
|
204
391
|
* Input for defineFixtureVariants (only single fixtures, no nesting).
|
|
@@ -221,6 +408,12 @@ export interface DefineFixtureVariantsOptions {
|
|
|
221
408
|
labels?: readonly string[];
|
|
222
409
|
/** Human/AI-readable description(s) of expected visual appearance. Inherited by nested fixtures. */
|
|
223
410
|
expectedVisualDescriptions?: string | readonly string[];
|
|
411
|
+
/**
|
|
412
|
+
* Zod schema describing `input` shared by every variant in this group. Converted to JSON
|
|
413
|
+
* Schema at define time and merged into each variant's own schema (the variant's properties
|
|
414
|
+
* win on conflict).
|
|
415
|
+
*/
|
|
416
|
+
inputSchema?: z.ZodType;
|
|
224
417
|
}
|
|
225
418
|
/**
|
|
226
419
|
* Defines a single fixture.
|
|
@@ -229,31 +422,39 @@ export interface DefineFixtureVariantsOptions {
|
|
|
229
422
|
* ```ts
|
|
230
423
|
* // Simple - no cleanup needed
|
|
231
424
|
* export default defineFixture({
|
|
232
|
-
* render: (container
|
|
233
|
-
* container.innerHTML = `<button
|
|
425
|
+
* render: (container) => {
|
|
426
|
+
* container.innerHTML = `<button>Click me</button>`;
|
|
234
427
|
* },
|
|
235
428
|
* });
|
|
236
429
|
*
|
|
237
|
-
* //
|
|
430
|
+
* // Typed, parameterizable input via a zod schema
|
|
238
431
|
* export default defineFixture({
|
|
239
|
-
*
|
|
432
|
+
* inputSchema: z.object({ label: z.string().default('Click me') }),
|
|
433
|
+
* render: (container, { input }) => {
|
|
240
434
|
* const root = createRoot(container);
|
|
241
|
-
* root.render(<Button label={
|
|
435
|
+
* root.render(<Button label={input.label} />);
|
|
242
436
|
* return { dispose: () => root.unmount() };
|
|
243
437
|
* },
|
|
244
438
|
* });
|
|
245
439
|
*
|
|
246
440
|
* // Async render
|
|
247
441
|
* export default defineFixture({
|
|
248
|
-
*
|
|
249
|
-
*
|
|
442
|
+
* inputSchema: z.object({ url: z.string() }),
|
|
443
|
+
* render: async (container, { input, signal }) => {
|
|
444
|
+
* const data = await fetch(input.url, { signal });
|
|
250
445
|
* container.innerHTML = await data.text();
|
|
251
446
|
* return { dispose: () => { container.innerHTML = ''; } };
|
|
252
447
|
* },
|
|
253
448
|
* });
|
|
254
449
|
* ```
|
|
255
450
|
*/
|
|
256
|
-
export declare function defineFixture(options: DefineFixtureOptions): SingleFixtureExport;
|
|
451
|
+
export declare function defineFixture<TInput = unknown>(options: DefineFixtureOptions<TInput>): SingleFixtureExport;
|
|
452
|
+
export declare function defineDebugPanel<TState, TAction = never>(options: DefineDebugPanelOptions<TState, TAction>): DebugPanelDefinition<TState, TAction>;
|
|
453
|
+
export declare function interactiveOutput<T>(options: {
|
|
454
|
+
readonly getSnapshot: () => T;
|
|
455
|
+
readonly activate: DebugPanelActivation<T, T>;
|
|
456
|
+
}): InteractiveOutput<T>;
|
|
457
|
+
export declare function isInteractiveOutput(value: unknown): value is InteractiveOutput<unknown>;
|
|
257
458
|
/**
|
|
258
459
|
* Defines a group of fixtures with support for nesting.
|
|
259
460
|
*
|
|
@@ -298,9 +499,9 @@ export declare function defineFixtureVariants(options: DefineFixtureVariantsOpti
|
|
|
298
499
|
*
|
|
299
500
|
* @example
|
|
300
501
|
* ```ts
|
|
301
|
-
* render: (container, {
|
|
502
|
+
* render: (container, { input }) => syncRender(() => {
|
|
302
503
|
* const el = document.createElement('button');
|
|
303
|
-
* el.textContent =
|
|
504
|
+
* el.textContent = input.label;
|
|
304
505
|
* container.appendChild(el);
|
|
305
506
|
* return () => el.remove();
|
|
306
507
|
* })
|
|
@@ -317,8 +518,8 @@ export declare function syncRender(doRender: () => (() => void) | IDisposable |
|
|
|
317
518
|
*
|
|
318
519
|
* @example
|
|
319
520
|
* ```ts
|
|
320
|
-
* render: (container, {
|
|
321
|
-
* const data = await fetchData(
|
|
521
|
+
* render: (container, { input, signal }) => asyncRender(signal, async () => {
|
|
522
|
+
* const data = await fetchData(input.url, { signal });
|
|
322
523
|
* if (signal.aborted) return;
|
|
323
524
|
* container.innerHTML = data;
|
|
324
525
|
* return () => { container.innerHTML = ''; };
|
|
@@ -326,4 +527,5 @@ export declare function syncRender(doRender: () => (() => void) | IDisposable |
|
|
|
326
527
|
* ```
|
|
327
528
|
*/
|
|
328
529
|
export declare function asyncRender(signal: AbortSignal, doRender: () => Promise<(() => void) | IDisposable | void>): RenderResult;
|
|
530
|
+
export {};
|
|
329
531
|
//# sourceMappingURL=fixtureApi.d.ts.map
|
|
@@ -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,CAAC,IAAI,CAAC,CAAC;CACjC;AAED,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG,cAAc,CAAC;AAElE,MAAM,WAAW,qBAAqB,CAAC,OAAO;IAC5C,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,0BAA0B,CAAC,CAAC,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC;CAC9E;AAED,MAAM,WAAW,0BAA0B,CAAC,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC,GAAG,IAAI,CAAC,CAAC;IACT,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAAG,WAAW,CAAC;CACrD;AAED,MAAM,WAAW,sBAAsB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AC,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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FixtureExport, SingleFixtureExport, FixtureGroupExport, FixtureVariantsExport, DisplayMode, StyleDefinition, RenderReturn, RenderContext } from './fixtureApi.js';
|
|
1
|
+
import { FixtureExport, SingleFixtureExport, FixtureGroupExport, FixtureVariantsExport, DisplayMode, StyleDefinition, RenderReturn, RenderContext, IJsonSchema, DebugPanelDefinition, FixtureInputControlOptions } from './fixtureApi.js';
|
|
2
2
|
/**
|
|
3
3
|
* Type guard for SingleFixtureExport.
|
|
4
4
|
* Uses the global symbol brand for cross-version compatibility.
|
|
@@ -64,6 +64,12 @@ export interface ComponentDefinition {
|
|
|
64
64
|
readonly labels: readonly string[];
|
|
65
65
|
/** Accumulated expected visual descriptions (from self + parent groups/variants) */
|
|
66
66
|
readonly expectedVisualDescriptions: readonly string[];
|
|
67
|
+
/** JSON Schema describing the expected shape of `RenderContext.input` (always an object). */
|
|
68
|
+
readonly inputSchema?: IJsonSchema;
|
|
69
|
+
/** Explorer presentation metadata for input properties. */
|
|
70
|
+
readonly inputControls?: Readonly<Record<string, FixtureInputControlOptions>>;
|
|
71
|
+
/** Statically declared custom debug panels. */
|
|
72
|
+
readonly debugPanels: readonly DebugPanelDefinition<unknown, unknown>[];
|
|
67
73
|
/** Source file path this fixture was defined in */
|
|
68
74
|
readonly sourceFile: string;
|
|
69
75
|
/**
|
|
@@ -74,8 +80,22 @@ export interface ComponentDefinition {
|
|
|
74
80
|
}
|
|
75
81
|
/**
|
|
76
82
|
* Creates the component definition from a validated SingleFixtureExport.
|
|
83
|
+
*
|
|
84
|
+
* @param inheritedInputSchema - JSON Schema accumulated from enclosing groups/variants; merged
|
|
85
|
+
* with the fixture's own schema (the fixture's properties win on conflict).
|
|
77
86
|
*/
|
|
78
|
-
export declare function createComponentDefinition(fixture: SingleFixtureExport, id: string, name: string, sourceFile: string, inheritedVisualDescriptions?: readonly string[]): ComponentDefinition;
|
|
87
|
+
export declare function createComponentDefinition(fixture: SingleFixtureExport, id: string, name: string, sourceFile: string, inheritedVisualDescriptions?: readonly string[], inheritedInputSchema?: IJsonSchema | undefined): ComponentDefinition;
|
|
88
|
+
/**
|
|
89
|
+
* Merges two object JSON Schemas. `child` properties win over `parent` on key conflicts;
|
|
90
|
+
* `required` is the de-duplicated union. Returns whichever side is defined when only one is.
|
|
91
|
+
*/
|
|
92
|
+
export declare function mergeInputSchemas(parent: IJsonSchema | undefined, child: IJsonSchema | undefined): IJsonSchema | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* Builds the effective `input` object passed to a fixture: the schema's top-level property
|
|
95
|
+
* defaults, overlaid with any caller-provided overrides. Returns the override unchanged when
|
|
96
|
+
* there is no schema (so schemaless fixtures keep their original `undefined`/passthrough input).
|
|
97
|
+
*/
|
|
98
|
+
export declare function applyInputDefaults(schema: IJsonSchema | undefined, input: unknown): unknown;
|
|
79
99
|
/**
|
|
80
100
|
* Type guard for checking if a value is a ComponentDefinition.
|
|
81
101
|
* @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,
|
|
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,EAChB,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAChC,MAAM,iBAAiB,CAAC;AAOzB;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAS5E;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CAS1E;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,qBAAqB,CAShF;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE;AAMD,MAAM,MAAM,WAAW,CAAC,CAAC,IACrB;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAC1B;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE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AE9E,+CAA+C;IAC/C,QAAQ,CAAC,WAAW,EAAE,SAAS,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC;IAExE,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,CAsBrB;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, } from './fixtureApi.js';
|
|
2
|
-
export { singleFixtureBrand, fixtureGroupBrand, fixtureVariantsBrand, defineFixture, defineFixtureGroup, defineFixtureVariants, syncRender, asyncRender, } 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, DebugPanelPlacement, DebugPanelViewContext, DebugPanelViewState, DebugPanelViewStateOptions, DebugPanelViewInstance, DefineDebugPanelOptions, DebugPanelDefinition, DebugPanelChannel, DebugPanelActivation, FixtureDebugApi, FixtureInputControlOptions, InteractiveOutput, } from './fixtureApi.js';
|
|
2
|
+
export { singleFixtureBrand, fixtureGroupBrand, fixtureVariantsBrand, defineFixture, defineFixtureGroup, defineFixtureVariants, defineDebugPanel, interactiveOutput, isInteractiveOutput, 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,
|
|
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,EACX,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,0BAA0B,EAC1B,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,0BAA0B,EAC1B,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,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,EACj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