@vscode/component-explorer 0.1.1-23 → 0.1.1-25
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/dist/components/ExplorerModel.d.ts.map +1 -1
- package/dist/components/TreeView.d.ts.map +1 -1
- package/dist/components/types.d.ts +2 -1
- package/dist/components/types.d.ts.map +1 -1
- package/dist/core/ComponentRenderer.d.ts +3 -3
- package/dist/core/ComponentRenderer.d.ts.map +1 -1
- package/dist/core/FixtureNode.d.ts +2 -2
- package/dist/core/FixtureNode.d.ts.map +1 -1
- package/dist/core/FixturePath.d.ts +8 -0
- package/dist/core/FixturePath.d.ts.map +1 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/daemon/DaemonModel.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/modes/HeadlessMode.d.ts.map +1 -1
- package/dist/report/ReportModel.d.ts.map +1 -1
- package/dist/report/ScreenshotReport.d.ts +1 -0
- package/dist/report/ScreenshotReport.d.ts.map +1 -1
- package/dist/{runtimeVersion-DYzHdVhM.js → runtimeVersion-VBAP_EcQ.js} +2 -2
- package/dist/{runtimeVersion-DYzHdVhM.js.map → runtimeVersion-VBAP_EcQ.js.map} +1 -1
- package/dist/viewer.js +825 -809
- package/dist/viewer.js.map +1 -1
- package/package.json +1 -1
|
@@ -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,OAA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,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"}
|
|
@@ -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;
|
|
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,10 +1,11 @@
|
|
|
1
1
|
import { FixtureNode, ComponentDefinition } from '../core/index.js';
|
|
2
|
+
import { FixturePath } from '../core/FixturePath.js';
|
|
2
3
|
/**
|
|
3
4
|
* Explorer's tree node structure, derived from FixtureNode.
|
|
4
5
|
* This is the explorer's own representation of the fixture tree.
|
|
5
6
|
*/
|
|
6
7
|
export interface ExplorerTreeNode {
|
|
7
|
-
readonly id:
|
|
8
|
+
readonly id: FixturePath;
|
|
8
9
|
readonly name: string;
|
|
9
10
|
readonly type: 'folder' | 'variants' | 'component';
|
|
10
11
|
readonly children?: readonly ExplorerTreeNode[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,WAAW,CAAC;IACnD,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAChD,QAAQ,CAAC,SAAS,CAAC,EAAE,mBAAmB,CAAC;IACzC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,gBAAgB,CASlE"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { ComponentDefinition } from './fixtureApiConsumer.js';
|
|
2
|
-
import {
|
|
2
|
+
import { RenderResult } from './fixtureApi.js';
|
|
3
3
|
export declare class ComponentRendering {
|
|
4
4
|
readonly component: ComponentDefinition;
|
|
5
5
|
readonly renderTarget: HTMLElement;
|
|
6
6
|
readonly iframe: HTMLIFrameElement | null;
|
|
7
7
|
private readonly _abortController;
|
|
8
|
-
private _rawResult;
|
|
9
8
|
private _resolvedResult;
|
|
10
9
|
private _injectedElements;
|
|
11
10
|
private _adoptedSheets;
|
|
12
11
|
private _styleTarget;
|
|
13
|
-
|
|
12
|
+
private readonly _rendered;
|
|
14
13
|
constructor(host: HTMLElement, component: ComponentDefinition);
|
|
14
|
+
waitForRendering(): Promise<RenderResult | undefined>;
|
|
15
15
|
dispose(): void;
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=ComponentRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentRenderer.d.ts","sourceRoot":"","sources":["../../src/core/ComponentRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"ComponentRenderer.d.ts","sourceRoot":"","sources":["../../src/core/ComponentRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,iBAAiB,CAAC;AA4CrE,qBAAa,kBAAkB;IAUC,QAAQ,CAAC,SAAS,EAAE,mBAAmB;IATtE,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAQ;IACjD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAyB;IAC1D,OAAO,CAAC,eAAe,CAA2B;IAClD,OAAO,CAAC,iBAAiB,CAAqB;IAC9C,OAAO,CAAC,cAAc,CAAuB;IAC7C,OAAO,CAAC,YAAY,CAAmC;IACvD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoC;gBAElD,IAAI,EAAE,WAAW,EAAW,SAAS,EAAE,mBAAmB;IA0EhE,gBAAgB,IAAI,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAM3D,OAAO,IAAI,IAAI;CAMf"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { FixtureExport } from './fixtureApi.js';
|
|
2
2
|
import { ComponentDefinition } from './fixtureApiConsumer.js';
|
|
3
|
+
import { FixturePath } from './FixturePath.js';
|
|
3
4
|
/**
|
|
4
5
|
* A node in the fixture tree.
|
|
5
6
|
* Can be a folder (with children), variants (with children, horizontal layout), or a component leaf.
|
|
6
7
|
*/
|
|
7
8
|
export interface FixtureNode {
|
|
8
|
-
|
|
9
|
-
readonly id: string;
|
|
9
|
+
readonly id: FixturePath;
|
|
10
10
|
/** Display name */
|
|
11
11
|
readonly name: string;
|
|
12
12
|
/** Node type: folder for groups, variants for horizontal variant display, component for leaves */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FixtureNode.d.ts","sourceRoot":"","sources":["../../src/core/FixtureNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,
|
|
1
|
+
{"version":3,"file":"FixtureNode.d.ts","sourceRoot":"","sources":["../../src/core/FixtureNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAKH,KAAK,mBAAmB,EAC3B,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;AA+HD;;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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FixturePath.d.ts","sourceRoot":"","sources":["../../src/core/FixturePath.ts"],"names":[],"mappings":"AAAA,qBAAa,WAAW;IAGV,QAAQ,CAAC,KAAK,EAAE,MAAM;IAFlC,OAAO,CAAC,SAAS,CAAgC;gBAE5B,KAAK,EAAE,MAAM;IAElC,IAAI,QAAQ,IAAI,SAAS,MAAM,EAAE,CAEhC;IAED,QAAQ,IAAI,MAAM;CAGnB"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export type { ComponentDefinition, ParseResult } from './fixtureApiConsumer.js';
|
|
|
4
4
|
export { isSingleFixture, isFixtureGroup, isFixtureVariants, parseFixtureExport, parseSingleFixture, parseFixtureGroup, parseFixtureVariants, createComponentDefinition, isComponentDefinition, } from './fixtureApiConsumer.js';
|
|
5
5
|
export type { ExceptionError, RenderEvent, RenderEventType, RenderReport, } from './ErrorInfo.js';
|
|
6
6
|
export type { FixtureNode, } from './FixtureNode.js';
|
|
7
|
+
export { FixturePath } from './FixturePath.js';
|
|
7
8
|
export { VIEWPORT_SIZES, resolveViewport } from './DisplayMode.js';
|
|
8
9
|
export { getDefaultPropertyValues } from './PropertySchema.js';
|
|
9
10
|
export { createFixtureTree, findNodeByPath, collectComponents } from './FixtureNode.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,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,aAAa,GACd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,UAAU,EACV,WAAW,GACZ,MAAM,iBAAiB,CAAC;AAKzB,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EACL,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AAKjC,YAAY,EACV,cAAc,EACd,WAAW,EACX,eAAe,EACf,YAAY,GACb,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,WAAW,GACZ,MAAM,kBAAkB,CAAC;
|
|
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,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,YAAY,EACZ,YAAY,EACZ,aAAa,GACd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,UAAU,EACV,WAAW,GACZ,MAAM,iBAAiB,CAAC;AAKzB,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EACL,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AAKjC,YAAY,EACV,cAAc,EACd,WAAW,EACX,eAAe,EACf,YAAY,GACb,MAAM,gBAAgB,CAAC;AAExB,YAAY,EACV,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGxF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB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
|
|
1
|
+
import { _ as r } from "./runtimeVersion-VBAP_EcQ.js";
|
|
2
|
+
import { d as s, a as n, b as t, f as u, c as f, r as o, s as d } from "./runtimeVersion-VBAP_EcQ.js";
|
|
3
3
|
globalThis._buildInfo = r;
|
|
4
4
|
export {
|
|
5
5
|
s as defineFixture,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadlessMode.d.ts","sourceRoot":"","sources":["../../src/modes/HeadlessMode.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAA+B,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACtF,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKxE,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,qBAAqB,CAAC,EAAE,WAAW,CAAC;KACpC;CACD;AAED,UAAU,WAAW;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,YAAY,IAAI,WAAW,EAAE,CAAC;IAC9B,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACxD;AAED,UAAU,WAAW;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAC7B,QAAQ,CAAC,UAAU,EAAE,OAAO,GAAG,MAAM,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,qBAAa,YAAa,YAAW,eAAe;IASlD,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IARnC,QAAQ,CAAC,SAAS,SAAuC;IACzD,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,KAAK,CAAc;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Aa,YAAW,eAAe;IASlD,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IARnC,QAAQ,CAAC,SAAS,SAAuC;IACzD,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,eAAe,CAAiB;IACxC,OAAO,CAAC,iBAAiB,CAAiC;IAC1D,OAAO,CAAC,iBAAiB,CAA0B;gBAGjC,iBAAiB,EAAE,WAAW,EAC/C,cAAc,EAAE,cAAc;IAU/B,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED,cAAc,CAAC,cAAc,EAAE,cAAc,GAAG,IAAI;IAQpD,WAAW,IAAI,IAAI;IAKnB,YAAY,IAAI,WAAW,EAAE;IAIvB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAmF7D,OAAO,CAAC,UAAU;IAWlB,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,gBAAgB;IASxB,OAAO,CAAC,iBAAiB;CAWzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReportModel.d.ts","sourceRoot":"","sources":["../../src/report/ReportModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAmB,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,uBAAuB,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"ReportModel.d.ts","sourceRoot":"","sources":["../../src/report/ReportModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAmB,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAsB,MAAM,uBAAuB,CAAC;AAClF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG/D,KAAK,WAAW,GACZ;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS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E,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE;QAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAAA;KAAE,CAAC;CACrF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SemanticVersion as f } from "@hediet/semver";
|
|
2
|
-
const l = { version: "0.2.0", date: "2026-03-
|
|
2
|
+
const l = { version: "0.2.0", date: "2026-03-12T21:17:42.348Z" }, c = Symbol.for("@vscode/component-explorer/singleFixture/v1"), i = Symbol.for("@vscode/component-explorer/fixtureGroup/v1"), a = Symbol.for("@vscode/component-explorer/fixtureVariants/v1");
|
|
3
3
|
function x(o) {
|
|
4
4
|
return {
|
|
5
5
|
[c]: !0,
|
|
@@ -81,4 +81,4 @@ export {
|
|
|
81
81
|
y as r,
|
|
82
82
|
c as s
|
|
83
83
|
};
|
|
84
|
-
//# sourceMappingURL=runtimeVersion-
|
|
84
|
+
//# sourceMappingURL=runtimeVersion-VBAP_EcQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeVersion-DYzHdVhM.js","sources":["../src/core/fixtureApi.ts","../src/runtimeVersion.ts"],"sourcesContent":["/**\n * Public Fixture API\n * \n * This module is the public API for defining fixtures.\n * It's designed to be stable across versions - projects can use a different\n * @vscode/component-explorer version than the explorer viewer uses.\n * \n * Use Symbol.for() instead of Symbol() so the same symbol is shared across\n * different versions of this package.\n *\n * @module fixtureApi\n */\n\n// ============================================================================\n// Types for fixture definition (re-exported for convenience)\n// ============================================================================\n\n/**\n * Disposable resource that can be cleaned up.\n */\nexport interface IDisposable {\n dispose(): void;\n}\n\n/** @deprecated Use IDisposable instead */\nexport type Disposable = IDisposable;\n\n/**\n * Result of a render operation.\n * Supports both sync and async rendering with cancellation.\n * All fields are optional for simple use cases.\n */\nexport interface RenderResult {\n /**\n * Resolves when the component is fully rendered and ready.\n * For sync renders, this can be omitted (treated as immediately ready).\n * Rejects if the render is aborted via the AbortSignal.\n */\n readonly ready?: Promise<void>;\n \n /**\n * Cleanup function. Called when the fixture is unmounted.\n * Can be omitted if no cleanup is needed.\n */\n dispose?(): void;\n\n /**\n * Arbitrary data to include in the render report.\n * Visible to the CLI and MCP tools.\n */\n readonly data?: unknown;\n}\n\n/**\n * What the render function can return.\n * - undefined: no cleanup needed, immediately ready\n * - RenderResult: object with optional ready/dispose\n * - Promise<...>: async render that resolves to undefined or RenderResult\n */\nexport type RenderReturn = RenderResult | undefined | void | Promise<RenderResult | undefined | void>;\n\n/**\n * Context passed to the render function.\n */\nexport interface RenderContext {\n /** Property values based on the property schema */\n readonly props: Record<string, unknown>;\n /** AbortSignal for cancellation; check signal.aborted or listen to 'abort' event */\n readonly signal: AbortSignal;\n}\n\n/**\n * Style definition for shadow DOM injection.\n */\nexport type StyleDefinition =\n | { readonly type: 'css'; readonly content: string }\n | { readonly type: 'url'; readonly href: string }\n | { readonly type: 'adopted'; readonly sheet: CSSStyleSheet };\n\n/**\n * Display mode for a component.\n */\nexport type DisplayMode = PageMode | ComponentMode;\n\n/**\n * Page mode - component fills a viewport with device presets.\n */\nexport interface PageMode {\n readonly type: 'page';\n readonly viewports: ViewportPreset[];\n}\n\n/**\n * Component mode - renders at natural size.\n */\nexport interface ComponentMode {\n readonly type: 'component';\n}\n\n/**\n * Viewport preset - either a named preset or custom dimensions.\n */\nexport type ViewportPreset =\n | ViewportPresetName\n | { readonly name: string; readonly width: number; readonly height: number };\n\nexport type ViewportPresetName = 'mobile' | 'tablet' | 'desktop';\n\n/**\n * Schema for a component property.\n */\nexport type PropertySchema =\n | BooleanProperty\n | StringProperty\n | NumberProperty\n | EnumProperty;\n\nexport interface BooleanProperty {\n readonly type: 'boolean';\n readonly name: string;\n readonly defaultValue: boolean;\n readonly description?: string;\n}\n\nexport interface StringProperty {\n readonly type: 'string';\n readonly name: string;\n readonly defaultValue: string;\n readonly description?: string;\n readonly multiline?: boolean;\n}\n\nexport interface NumberProperty {\n readonly type: 'number';\n readonly name: string;\n readonly defaultValue: number;\n readonly description?: string;\n readonly min?: number;\n readonly max?: number;\n readonly step?: number;\n}\n\nexport interface EnumProperty {\n readonly type: 'enum';\n readonly name: string;\n readonly defaultValue: string;\n readonly description?: string;\n readonly options: readonly string[];\n}\n\n// ============================================================================\n// Brand symbols - use Symbol.for() for cross-version compatibility\n// ============================================================================\n\n/** Brand symbol to identify single fixtures */\nexport const singleFixtureBrand = Symbol.for('@vscode/component-explorer/singleFixture/v1');\n\n/** Brand symbol to identify fixture groups */\nexport const fixtureGroupBrand = Symbol.for('@vscode/component-explorer/fixtureGroup/v1');\n\n/** Brand symbol to identify fixture variants */\nexport const fixtureVariantsBrand = Symbol.for('@vscode/component-explorer/fixtureVariants/v1');\n\n// ============================================================================\n// Define fixture options\n// ============================================================================\n\n/**\n * Options for defining a single component fixture.\n */\nexport interface DefineFixtureOptions {\n /**\n * Path in the explorer tree.\n * - `undefined` (default): use fixture filename only\n * - `'Foo/Bar'`: exact path (fixture filename NOT appended)\n * - `'Foo/Bar/'`: prefix (fixture filename IS appended → Foo/Bar/{filename})\n * \n * @throws Error if path contains empty segments (e.g., '/foo', 'foo//bar')\n */\n path?: string;\n\n /** Optional description for documentation */\n description?: string;\n\n /** How to isolate: 'none' (default) renders in light DOM, 'shadow-dom' for CSS isolation, 'iframe' for full isolation */\n isolation?: 'none' | 'shadow-dom' | 'iframe';\n\n /** Display mode: defaults to { type: 'component' } */\n displayMode?: DisplayMode;\n\n /** Styles to inject (into document head for 'none', into shadow root for 'shadow-dom', into iframe head for 'iframe') */\n styles?: StyleDefinition[];\n\n /** Background pattern for the preview canvas: 'light' (default) or 'dark' for dark transparent pattern */\n background?: 'light' | 'dark';\n\n /** Labels for categorization and filtering (e.g. 'animation', 'blocks-ci') */\n labels?: readonly string[];\n\n /** Property definitions */\n properties?: PropertySchema[];\n\n /**\n * Render the component into the container.\n * \n * @param container - The DOM element to render into\n * @param context - Render context containing props and abort signal\n * @returns Optional RenderResult, or a Promise that resolves to one\n */\n render: (container: HTMLElement, context: RenderContext) => RenderReturn;\n}\n\n/** @deprecated Use DefineFixtureOptions instead */\nexport type DefineComponentOptions = DefineFixtureOptions;\n\n// ============================================================================\n// Fixture export types (opaque to the user, consumed by fixtureApiConsumer)\n// ============================================================================\n\n/**\n * A single fixture export created by defineFixture().\n */\nexport interface SingleFixtureExport {\n readonly [singleFixtureBrand]: true;\n readonly _options: DefineFixtureOptions;\n readonly _path?: string;\n}\n\n/**\n * Group entry: either a single fixture, a nested group, or variants.\n */\nexport type FixtureGroupEntry = SingleFixtureExport | FixtureGroupExport | FixtureVariantsExport;\n\n/**\n * A fixture group export created by defineFixtureGroup().\n */\nexport interface FixtureGroupExport {\n readonly [fixtureGroupBrand]: true;\n readonly _entries: { [key: string]: FixtureGroupEntry };\n readonly _path?: string;\n readonly _labels?: readonly string[];\n}\n\n/**\n * A fixture variants export created by defineFixtureVariants().\n */\nexport interface FixtureVariantsExport {\n readonly [fixtureVariantsBrand]: true;\n readonly _variants: { [key: string]: SingleFixtureExport };\n readonly _path?: string;\n readonly _labels?: readonly string[];\n}\n\n/**\n * Fixture export type - a single fixture, a group, or variants.\n */\nexport type FixtureExport = SingleFixtureExport | FixtureGroupExport | FixtureVariantsExport;\n\n/**\n * Input for defineFixtureGroup.\n */\nexport type FixtureGroupInput = { [key: string]: FixtureGroupEntry };\n\n/**\n * Options for defineFixtureGroup with optional path.\n */\nexport interface DefineFixtureGroupOptions {\n /**\n * Path in the explorer tree.\n * - `undefined` (default): use fixture filename only\n * - `'Foo/Bar'`: exact path (fixture filename NOT appended)\n * - `'Foo/Bar/'`: prefix (fixture filename IS appended → Foo/Bar/{filename})\n */\n path?: string;\n\n /** Labels for categorization and filtering (e.g. 'animation', 'blocks-ci') */\n labels?: readonly string[];\n}\n\n/**\n * Input for defineFixtureVariants (only single fixtures, no nesting).\n */\nexport type FixtureVariantsInput = { [key: string]: SingleFixtureExport };\n\n/**\n * Options for defineFixtureVariants with optional path.\n */\nexport interface DefineFixtureVariantsOptions {\n /**\n * Path in the explorer tree.\n * - `undefined` (default): use fixture filename only \n * - `'Foo/Bar'`: exact path (fixture filename NOT appended)\n * - `'Foo/Bar/'`: prefix (fixture filename IS appended → Foo/Bar/{filename})\n */\n path?: string;\n\n /** Labels for categorization and filtering (e.g. 'animation', 'blocks-ci') */\n labels?: readonly string[];\n}\n\n// ============================================================================\n// Define fixture functions\n// ============================================================================\n\n/**\n * Defines a single fixture.\n * \n * @example\n * ```ts\n * // Simple - no cleanup needed\n * export default defineFixture({\n * render: (container, { props }) => {\n * container.innerHTML = `<button>${props.label}</button>`;\n * },\n * });\n * \n * // With cleanup\n * export default defineFixture({\n * render: (container, { props }) => {\n * const root = createRoot(container);\n * root.render(<Button label={props.label} />);\n * return { dispose: () => root.unmount() };\n * },\n * });\n * \n * // Async render\n * export default defineFixture({\n * render: async (container, { props, signal }) => {\n * const data = await fetch(props.url, { signal });\n * container.innerHTML = await data.text();\n * return { dispose: () => { container.innerHTML = ''; } };\n * },\n * });\n * ```\n */\nexport function defineFixture(options: DefineFixtureOptions): SingleFixtureExport {\n return {\n [singleFixtureBrand]: true,\n _options: options,\n _path: options.path,\n };\n}\n\n/**\n * Defines a group of fixtures with support for nesting.\n * \n * @example\n * ```ts\n * export default defineFixtureGroup({\n * Primary: defineFixture({\n * render: (container) => { ... },\n * }),\n * Variants: defineFixtureGroup({\n * Small: defineFixture({ ... }),\n * Large: defineFixture({ ... }),\n * }),\n * });\n * ```\n */\nexport function defineFixtureGroup(entries: FixtureGroupInput): FixtureGroupExport;\nexport function defineFixtureGroup(options: DefineFixtureGroupOptions, entries: FixtureGroupInput): FixtureGroupExport;\nexport function defineFixtureGroup(optionsOrEntries: DefineFixtureGroupOptions | FixtureGroupInput, maybeEntries?: FixtureGroupInput): FixtureGroupExport {\n if (maybeEntries !== undefined) {\n const opts = optionsOrEntries as DefineFixtureGroupOptions;\n return {\n [fixtureGroupBrand]: true,\n _entries: maybeEntries,\n _path: opts.path,\n _labels: opts.labels,\n };\n }\n return {\n [fixtureGroupBrand]: true,\n _entries: optionsOrEntries as FixtureGroupInput,\n };\n}\n\n/**\n * Defines a group of fixture variants (no nesting allowed).\n * Variants are rendered horizontally by default and have a distinct icon in the tree.\n * \n * @example\n * ```ts\n * export default defineFixtureGroup({\n * Button: defineFixtureVariants({\n * Small: defineFixture({ ... }),\n * Medium: defineFixture({ ... }),\n * Large: defineFixture({ ... }),\n * }),\n * });\n * ```\n */\nexport function defineFixtureVariants(variants: FixtureVariantsInput): FixtureVariantsExport;\nexport function defineFixtureVariants(options: DefineFixtureVariantsOptions, variants: FixtureVariantsInput): FixtureVariantsExport;\nexport function defineFixtureVariants(optionsOrVariants: DefineFixtureVariantsOptions | FixtureVariantsInput, maybeVariants?: FixtureVariantsInput): FixtureVariantsExport {\n if (maybeVariants !== undefined) {\n const opts = optionsOrVariants as DefineFixtureVariantsOptions;\n return {\n [fixtureVariantsBrand]: true,\n _variants: maybeVariants,\n _path: opts.path,\n _labels: opts.labels,\n };\n }\n return {\n [fixtureVariantsBrand]: true,\n _variants: optionsOrVariants as FixtureVariantsInput,\n };\n}\n\n// ============================================================================\n// Render helpers\n// ============================================================================\n\n/** Already-resolved promise, reused for efficiency */\nconst resolvedPromise = Promise.resolve();\n\n/**\n * Helper for synchronous renders.\n * Executes the render function immediately and wraps the cleanup in a RenderResult.\n * \n * @param doRender - Function that renders synchronously and returns a cleanup function\n * @returns A RenderResult with an already-resolved ready promise\n * \n * @example\n * ```ts\n * render: (container, { props }) => syncRender(() => {\n * const el = document.createElement('button');\n * el.textContent = props.label;\n * container.appendChild(el);\n * return () => el.remove();\n * })\n * ```\n */\nexport function syncRender(doRender: () => (() => void) | IDisposable | void): RenderResult {\n const cleanup = doRender();\n return {\n ready: resolvedPromise,\n dispose: () => {\n if (typeof cleanup === 'function') {\n cleanup();\n } else if (cleanup && typeof cleanup.dispose === 'function') {\n cleanup.dispose();\n }\n },\n };\n}\n\n/**\n * Helper for asynchronous renders with cancellation support.\n * \n * @param signal - AbortSignal for cancellation\n * @param doRender - Async function that renders and returns a cleanup function.\n * Should check signal.aborted periodically for long operations.\n * @returns A RenderResult whose ready promise rejects with AbortError if cancelled\n * \n * @example\n * ```ts\n * render: (container, { props, signal }) => asyncRender(signal, async () => {\n * const data = await fetchData(props.url, { signal });\n * if (signal.aborted) return;\n * container.innerHTML = data;\n * return () => { container.innerHTML = ''; };\n * })\n * ```\n */\nexport function asyncRender(\n signal: AbortSignal,\n doRender: () => Promise<(() => void) | IDisposable | void>\n): RenderResult {\n let cleanup: (() => void) | IDisposable | void;\n let disposed = false;\n\n function isAborted(): boolean {\n return signal.aborted;\n }\n\n const ready = (async () => {\n if (isAborted()) {\n throw new DOMException('Render aborted', 'AbortError');\n }\n cleanup = await doRender();\n if (isAborted() || disposed) {\n // Cleanup immediately if aborted/disposed during render\n doCleanup();\n if (isAborted()) {\n throw new DOMException('Render aborted', 'AbortError');\n }\n }\n })();\n\n function doCleanup(): void {\n if (typeof cleanup === 'function') {\n cleanup();\n } else if (cleanup && typeof cleanup.dispose === 'function') {\n cleanup.dispose();\n }\n cleanup = undefined;\n }\n\n return {\n ready,\n dispose: () => {\n disposed = true;\n doCleanup();\n },\n };\n}\n","import { SemanticVersion } from '@hediet/semver';\n\nexport const runtimeVersion = SemanticVersion.parse('1.0.0');\n\n"],"names":["singleFixtureBrand","fixtureGroupBrand","fixtureVariantsBrand","defineFixture","options","defineFixtureGroup","optionsOrEntries","maybeEntries","opts","defineFixtureVariants","optionsOrVariants","maybeVariants","resolvedPromise","syncRender","doRender","cleanup","asyncRender","signal","disposed","isAborted","ready","doCleanup","runtimeVersion","SemanticVersion"],"mappings":";kEA2JaA,IAAqB,OAAO,IAAI,6CAA6C,GAG7EC,IAAoB,OAAO,IAAI,4CAA4C,GAG3EC,IAAuB,OAAO,IAAI,+CAA+C;AA8KvF,SAASC,EAAcC,GAAoD;AAChF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,aAAa,kBAAkB,YAAY;AAAA,EAG3D,GAAA;AAEA,WAASE,IAAkB;AACzB,IAAI,OAAON,KAAY,aACrBA,EAAA,IACSA,KAAW,OAAOA,EAAQ,WAAY,cAC/CA,EAAQ,QAAA,GAEVA,IAAU;AAAA,EACZ;AAEA,SAAO;AAAA,IACL,OAAAK;AAAA,IACA,SAAS,MAAM;AACb,MAAAF,IAAW,IACXG,EAAA;AAAA,IACF;AAAA,EAAA;AAEJ;ACzfO,MAAMC,IAAiBC,EAAgB,MAAM,OAAO;"}
|
|
1
|
+
{"version":3,"file":"runtimeVersion-VBAP_EcQ.js","sources":["../src/core/fixtureApi.ts","../src/runtimeVersion.ts"],"sourcesContent":["/**\n * Public Fixture API\n * \n * This module is the public API for defining fixtures.\n * It's designed to be stable across versions - projects can use a different\n * @vscode/component-explorer version than the explorer viewer uses.\n * \n * Use Symbol.for() instead of Symbol() so the same symbol is shared across\n * different versions of this package.\n *\n * @module fixtureApi\n */\n\n// ============================================================================\n// Types for fixture definition (re-exported for convenience)\n// ============================================================================\n\n/**\n * Disposable resource that can be cleaned up.\n */\nexport interface IDisposable {\n dispose(): void;\n}\n\n/** @deprecated Use IDisposable instead */\nexport type Disposable = IDisposable;\n\n/**\n * Result of a render operation.\n * Supports both sync and async rendering with cancellation.\n * All fields are optional for simple use cases.\n */\nexport interface RenderResult {\n /**\n * Resolves when the component is fully rendered and ready.\n * For sync renders, this can be omitted (treated as immediately ready).\n * Rejects if the render is aborted via the AbortSignal.\n */\n readonly ready?: Promise<void>;\n \n /**\n * Cleanup function. Called when the fixture is unmounted.\n * Can be omitted if no cleanup is needed.\n */\n dispose?(): void;\n\n /**\n * Arbitrary data to include in the render report.\n * Visible to the CLI and MCP tools.\n */\n readonly data?: unknown;\n}\n\n/**\n * What the render function can return.\n * - undefined: no cleanup needed, immediately ready\n * - RenderResult: object with optional ready/dispose\n * - Promise<...>: async render that resolves to undefined or RenderResult\n */\nexport type RenderReturn = RenderResult | undefined | void | Promise<RenderResult | undefined | void>;\n\n/**\n * Context passed to the render function.\n */\nexport interface RenderContext {\n /** Property values based on the property schema */\n readonly props: Record<string, unknown>;\n /** AbortSignal for cancellation; check signal.aborted or listen to 'abort' event */\n readonly signal: AbortSignal;\n}\n\n/**\n * Style definition for shadow DOM injection.\n */\nexport type StyleDefinition =\n | { readonly type: 'css'; readonly content: string }\n | { readonly type: 'url'; readonly href: string }\n | { readonly type: 'adopted'; readonly sheet: CSSStyleSheet };\n\n/**\n * Display mode for a component.\n */\nexport type DisplayMode = PageMode | ComponentMode;\n\n/**\n * Page mode - component fills a viewport with device presets.\n */\nexport interface PageMode {\n readonly type: 'page';\n readonly viewports: ViewportPreset[];\n}\n\n/**\n * Component mode - renders at natural size.\n */\nexport interface ComponentMode {\n readonly type: 'component';\n}\n\n/**\n * Viewport preset - either a named preset or custom dimensions.\n */\nexport type ViewportPreset =\n | ViewportPresetName\n | { readonly name: string; readonly width: number; readonly height: number };\n\nexport type ViewportPresetName = 'mobile' | 'tablet' | 'desktop';\n\n/**\n * Schema for a component property.\n */\nexport type PropertySchema =\n | BooleanProperty\n | StringProperty\n | NumberProperty\n | EnumProperty;\n\nexport interface BooleanProperty {\n readonly type: 'boolean';\n readonly name: string;\n readonly defaultValue: boolean;\n readonly description?: string;\n}\n\nexport interface StringProperty {\n readonly type: 'string';\n readonly name: string;\n readonly defaultValue: string;\n readonly description?: string;\n readonly multiline?: boolean;\n}\n\nexport interface NumberProperty {\n readonly type: 'number';\n readonly name: string;\n readonly defaultValue: number;\n readonly description?: string;\n readonly min?: number;\n readonly max?: number;\n readonly step?: number;\n}\n\nexport interface EnumProperty {\n readonly type: 'enum';\n readonly name: string;\n readonly defaultValue: string;\n readonly description?: string;\n readonly options: readonly string[];\n}\n\n// ============================================================================\n// Brand symbols - use Symbol.for() for cross-version compatibility\n// ============================================================================\n\n/** Brand symbol to identify single fixtures */\nexport const singleFixtureBrand = Symbol.for('@vscode/component-explorer/singleFixture/v1');\n\n/** Brand symbol to identify fixture groups */\nexport const fixtureGroupBrand = Symbol.for('@vscode/component-explorer/fixtureGroup/v1');\n\n/** Brand symbol to identify fixture variants */\nexport const fixtureVariantsBrand = Symbol.for('@vscode/component-explorer/fixtureVariants/v1');\n\n// ============================================================================\n// Define fixture options\n// ============================================================================\n\n/**\n * Options for defining a single component fixture.\n */\nexport interface DefineFixtureOptions {\n /**\n * Path in the explorer tree.\n * - `undefined` (default): use fixture filename only\n * - `'Foo/Bar'`: exact path (fixture filename NOT appended)\n * - `'Foo/Bar/'`: prefix (fixture filename IS appended → Foo/Bar/{filename})\n * \n * @throws Error if path contains empty segments (e.g., '/foo', 'foo//bar')\n */\n path?: string;\n\n /** Optional description for documentation */\n description?: string;\n\n /** How to isolate: 'none' (default) renders in light DOM, 'shadow-dom' for CSS isolation, 'iframe' for full isolation */\n isolation?: 'none' | 'shadow-dom' | 'iframe';\n\n /** Display mode: defaults to { type: 'component' } */\n displayMode?: DisplayMode;\n\n /** Styles to inject (into document head for 'none', into shadow root for 'shadow-dom', into iframe head for 'iframe') */\n styles?: StyleDefinition[];\n\n /** Background pattern for the preview canvas: 'light' (default) or 'dark' for dark transparent pattern */\n background?: 'light' | 'dark';\n\n /** Labels for categorization and filtering (e.g. 'animation', 'blocks-ci') */\n labels?: readonly string[];\n\n /** Property definitions */\n properties?: PropertySchema[];\n\n /**\n * Render the component into the container.\n * \n * @param container - The DOM element to render into\n * @param context - Render context containing props and abort signal\n * @returns Optional RenderResult, or a Promise that resolves to one\n */\n render: (container: HTMLElement, context: RenderContext) => RenderReturn;\n}\n\n/** @deprecated Use DefineFixtureOptions instead */\nexport type DefineComponentOptions = DefineFixtureOptions;\n\n// ============================================================================\n// Fixture export types (opaque to the user, consumed by fixtureApiConsumer)\n// ============================================================================\n\n/**\n * A single fixture export created by defineFixture().\n */\nexport interface SingleFixtureExport {\n readonly [singleFixtureBrand]: true;\n readonly _options: DefineFixtureOptions;\n readonly _path?: string;\n}\n\n/**\n * Group entry: either a single fixture, a nested group, or variants.\n */\nexport type FixtureGroupEntry = SingleFixtureExport | FixtureGroupExport | FixtureVariantsExport;\n\n/**\n * A fixture group export created by defineFixtureGroup().\n */\nexport interface FixtureGroupExport {\n readonly [fixtureGroupBrand]: true;\n readonly _entries: { [key: string]: FixtureGroupEntry };\n readonly _path?: string;\n readonly _labels?: readonly string[];\n}\n\n/**\n * A fixture variants export created by defineFixtureVariants().\n */\nexport interface FixtureVariantsExport {\n readonly [fixtureVariantsBrand]: true;\n readonly _variants: { [key: string]: SingleFixtureExport };\n readonly _path?: string;\n readonly _labels?: readonly string[];\n}\n\n/**\n * Fixture export type - a single fixture, a group, or variants.\n */\nexport type FixtureExport = SingleFixtureExport | FixtureGroupExport | FixtureVariantsExport;\n\n/**\n * Input for defineFixtureGroup.\n */\nexport type FixtureGroupInput = { [key: string]: FixtureGroupEntry };\n\n/**\n * Options for defineFixtureGroup with optional path.\n */\nexport interface DefineFixtureGroupOptions {\n /**\n * Path in the explorer tree.\n * - `undefined` (default): use fixture filename only\n * - `'Foo/Bar'`: exact path (fixture filename NOT appended)\n * - `'Foo/Bar/'`: prefix (fixture filename IS appended → Foo/Bar/{filename})\n */\n path?: string;\n\n /** Labels for categorization and filtering (e.g. 'animation', 'blocks-ci') */\n labels?: readonly string[];\n}\n\n/**\n * Input for defineFixtureVariants (only single fixtures, no nesting).\n */\nexport type FixtureVariantsInput = { [key: string]: SingleFixtureExport };\n\n/**\n * Options for defineFixtureVariants with optional path.\n */\nexport interface DefineFixtureVariantsOptions {\n /**\n * Path in the explorer tree.\n * - `undefined` (default): use fixture filename only \n * - `'Foo/Bar'`: exact path (fixture filename NOT appended)\n * - `'Foo/Bar/'`: prefix (fixture filename IS appended → Foo/Bar/{filename})\n */\n path?: string;\n\n /** Labels for categorization and filtering (e.g. 'animation', 'blocks-ci') */\n labels?: readonly string[];\n}\n\n// ============================================================================\n// Define fixture functions\n// ============================================================================\n\n/**\n * Defines a single fixture.\n * \n * @example\n * ```ts\n * // Simple - no cleanup needed\n * export default defineFixture({\n * render: (container, { props }) => {\n * container.innerHTML = `<button>${props.label}</button>`;\n * },\n * });\n * \n * // With cleanup\n * export default defineFixture({\n * render: (container, { props }) => {\n * const root = createRoot(container);\n * root.render(<Button label={props.label} />);\n * return { dispose: () => root.unmount() };\n * },\n * });\n * \n * // Async render\n * export default defineFixture({\n * render: async (container, { props, signal }) => {\n * const data = await fetch(props.url, { signal });\n * container.innerHTML = await data.text();\n * return { dispose: () => { container.innerHTML = ''; } };\n * },\n * });\n * ```\n */\nexport function defineFixture(options: DefineFixtureOptions): SingleFixtureExport {\n return {\n [singleFixtureBrand]: true,\n _options: options,\n _path: options.path,\n };\n}\n\n/**\n * Defines a group of fixtures with support for nesting.\n * \n * @example\n * ```ts\n * export default defineFixtureGroup({\n * Primary: defineFixture({\n * render: (container) => { ... },\n * }),\n * Variants: defineFixtureGroup({\n * Small: defineFixture({ ... }),\n * Large: defineFixture({ ... }),\n * }),\n * });\n * ```\n */\nexport function defineFixtureGroup(entries: FixtureGroupInput): FixtureGroupExport;\nexport function defineFixtureGroup(options: DefineFixtureGroupOptions, entries: FixtureGroupInput): FixtureGroupExport;\nexport function defineFixtureGroup(optionsOrEntries: DefineFixtureGroupOptions | FixtureGroupInput, maybeEntries?: FixtureGroupInput): FixtureGroupExport {\n if (maybeEntries !== undefined) {\n const opts = optionsOrEntries as DefineFixtureGroupOptions;\n return {\n [fixtureGroupBrand]: true,\n _entries: maybeEntries,\n _path: opts.path,\n _labels: opts.labels,\n };\n }\n return {\n [fixtureGroupBrand]: true,\n _entries: optionsOrEntries as FixtureGroupInput,\n };\n}\n\n/**\n * Defines a group of fixture variants (no nesting allowed).\n * Variants are rendered horizontally by default and have a distinct icon in the tree.\n * \n * @example\n * ```ts\n * export default defineFixtureGroup({\n * Button: defineFixtureVariants({\n * Small: defineFixture({ ... }),\n * Medium: defineFixture({ ... }),\n * Large: defineFixture({ ... }),\n * }),\n * });\n * ```\n */\nexport function defineFixtureVariants(variants: FixtureVariantsInput): FixtureVariantsExport;\nexport function defineFixtureVariants(options: DefineFixtureVariantsOptions, variants: FixtureVariantsInput): FixtureVariantsExport;\nexport function defineFixtureVariants(optionsOrVariants: DefineFixtureVariantsOptions | FixtureVariantsInput, maybeVariants?: FixtureVariantsInput): FixtureVariantsExport {\n if (maybeVariants !== undefined) {\n const opts = optionsOrVariants as DefineFixtureVariantsOptions;\n return {\n [fixtureVariantsBrand]: true,\n _variants: maybeVariants,\n _path: opts.path,\n _labels: opts.labels,\n };\n }\n return {\n [fixtureVariantsBrand]: true,\n _variants: optionsOrVariants as FixtureVariantsInput,\n };\n}\n\n// ============================================================================\n// Render helpers\n// ============================================================================\n\n/** Already-resolved promise, reused for efficiency */\nconst resolvedPromise = Promise.resolve();\n\n/**\n * Helper for synchronous renders.\n * Executes the render function immediately and wraps the cleanup in a RenderResult.\n * \n * @param doRender - Function that renders synchronously and returns a cleanup function\n * @returns A RenderResult with an already-resolved ready promise\n * \n * @example\n * ```ts\n * render: (container, { props }) => syncRender(() => {\n * const el = document.createElement('button');\n * el.textContent = props.label;\n * container.appendChild(el);\n * return () => el.remove();\n * })\n * ```\n */\nexport function syncRender(doRender: () => (() => void) | IDisposable | void): RenderResult {\n const cleanup = doRender();\n return {\n ready: resolvedPromise,\n dispose: () => {\n if (typeof cleanup === 'function') {\n cleanup();\n } else if (cleanup && typeof cleanup.dispose === 'function') {\n cleanup.dispose();\n }\n },\n };\n}\n\n/**\n * Helper for asynchronous renders with cancellation support.\n * \n * @param signal - AbortSignal for cancellation\n * @param doRender - Async function that renders and returns a cleanup function.\n * Should check signal.aborted periodically for long operations.\n * @returns A RenderResult whose ready promise rejects with AbortError if cancelled\n * \n * @example\n * ```ts\n * render: (container, { props, signal }) => asyncRender(signal, async () => {\n * const data = await fetchData(props.url, { signal });\n * if (signal.aborted) return;\n * container.innerHTML = data;\n * return () => { container.innerHTML = ''; };\n * })\n * ```\n */\nexport function asyncRender(\n signal: AbortSignal,\n doRender: () => Promise<(() => void) | IDisposable | void>\n): RenderResult {\n let cleanup: (() => void) | IDisposable | void;\n let disposed = false;\n\n function isAborted(): boolean {\n return signal.aborted;\n }\n\n const ready = (async () => {\n if (isAborted()) {\n throw new DOMException('Render aborted', 'AbortError');\n }\n cleanup = await doRender();\n if (isAborted() || disposed) {\n // Cleanup immediately if aborted/disposed during render\n doCleanup();\n if (isAborted()) {\n throw new DOMException('Render aborted', 'AbortError');\n }\n }\n })();\n\n function doCleanup(): void {\n if (typeof cleanup === 'function') {\n cleanup();\n } else if (cleanup && typeof cleanup.dispose === 'function') {\n cleanup.dispose();\n }\n cleanup = undefined;\n }\n\n return {\n ready,\n dispose: () => {\n disposed = true;\n doCleanup();\n },\n };\n}\n","import { SemanticVersion } from '@hediet/semver';\n\nexport const runtimeVersion = SemanticVersion.parse('1.0.0');\n\n"],"names":["singleFixtureBrand","fixtureGroupBrand","fixtureVariantsBrand","defineFixture","options","defineFixtureGroup","optionsOrEntries","maybeEntries","opts","defineFixtureVariants","optionsOrVariants","maybeVariants","resolvedPromise","syncRender","doRender","cleanup","asyncRender","signal","disposed","isAborted","ready","doCleanup","runtimeVersion","SemanticVersion"],"mappings":";kEA2JaA,IAAqB,OAAO,IAAI,6CAA6C,GAG7EC,IAAoB,OAAO,IAAI,4CAA4C,GAG3EC,IAAuB,OAAO,IAAI,+CAA+C;AA8KvF,SAASC,EAAcC,GAAoD;AAChF,SAAO;AAAA,IACL,CAACJ,CAAkB,GAAG;AAAA,IACtB,UAAUI;AAAA,IACV,OAAOA,EAAQ;AAAA,EAAA;AAEnB;AAoBO,SAASC,EAAmBC,GAAiEC,GAAsD;AACxJ,MAAIA,MAAiB,QAAW;AAC9B,UAAMC,IAAOF;AACb,WAAO;AAAA,MACL,CAACL,CAAiB,GAAG;AAAA,MACrB,UAAUM;AAAA,MACV,OAAOC,EAAK;AAAA,MACZ,SAASA,EAAK;AAAA,IAAA;AAAA,EAElB;AACA,SAAO;AAAA,IACL,CAACP,CAAiB,GAAG;A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