@pygmalionjs/pygmalion 0.5.22 → 0.5.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-lib/testing.js
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { StoryboardEnvironment } from './designImport';
|
|
2
|
+
/**
|
|
3
|
+
* One runtime the whole catalog can be seen under.
|
|
4
|
+
*
|
|
5
|
+
* Some products are not one product. The same build runs embedded in a host
|
|
6
|
+
* application and on its own, and the difference is not a state inside a screen
|
|
7
|
+
* — it decides which screens exist and what each one is allowed to show. A host
|
|
8
|
+
* that declared such a runtime had nowhere to put it: an axis belongs to a
|
|
9
|
+
* frame, and a preview control only dresses the live preview, so the catalog
|
|
10
|
+
* could only ever be captured under whichever runtime happened to be the
|
|
11
|
+
* default. The other one was invisible.
|
|
12
|
+
*
|
|
13
|
+
* A session preset is that choice, made once for everything. Selecting one
|
|
14
|
+
* rewrites the storyboard baseline, which every frame's identity already folds
|
|
15
|
+
* in, so the catalog re-resolves under the new runtime instead of showing
|
|
16
|
+
* frames captured under the old one.
|
|
17
|
+
*/
|
|
18
|
+
export interface SessionPresetDef {
|
|
19
|
+
/** Button text. The panel column is narrow, so keep it short. */
|
|
20
|
+
label: string;
|
|
21
|
+
/**
|
|
22
|
+
* The runtime, as boot conditions. Merged UNDER each frame's own declared
|
|
23
|
+
* environment: a screen that states a condition outright keeps it.
|
|
24
|
+
*/
|
|
25
|
+
environment?: StoryboardEnvironment;
|
|
26
|
+
/** Tooltip text. */
|
|
27
|
+
description?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Declares the preset list. A malformed entry throws here rather than producing
|
|
31
|
+
* a button that silently captures the catalog under nothing — the host
|
|
32
|
+
* configures this once at mount.
|
|
33
|
+
*/
|
|
34
|
+
export declare function setSessionPresets(next: readonly SessionPresetDef[]): void;
|
|
35
|
+
export declare function getSessionPresets(): SessionPresetDef[];
|
|
36
|
+
export declare function getSelectedSessionPreset(): number | null;
|
|
37
|
+
/**
|
|
38
|
+
* Puts the catalog under one preset, or back under the product's default.
|
|
39
|
+
*
|
|
40
|
+
* The baseline is what every frame's identity is derived from, so changing it
|
|
41
|
+
* is what makes the catalog re-resolve rather than keep showing what was
|
|
42
|
+
* captured under the previous runtime — setting it already retires the frames
|
|
43
|
+
* held from the runtime before.
|
|
44
|
+
*/
|
|
45
|
+
export declare function selectSessionPreset(index: number | null): void;
|
|
46
|
+
export declare function subscribeSessionPresets(listener: () => void): () => void;
|
package/dist-lib/types/lib.d.ts
CHANGED
|
@@ -78,7 +78,10 @@ export { SourceRefControl } from './ui/SourceRefControl';
|
|
|
78
78
|
export type { SourceRefControlProps } from './ui/SourceRefControl';
|
|
79
79
|
export type { TokenDef } from './editor/tokens';
|
|
80
80
|
export { getViewportPresets, setViewportPresets, } from './editor/viewportPresets';
|
|
81
|
+
import { type SessionPresetDef } from './editor/sessionPresets';
|
|
81
82
|
export type { ViewportPresetDef } from './editor/viewportPresets';
|
|
83
|
+
export { getSelectedSessionPreset, getSessionPresets, selectSessionPreset, setSessionPresets, subscribeSessionPresets, } from './editor/sessionPresets';
|
|
84
|
+
export type { SessionPresetDef } from './editor/sessionPresets';
|
|
82
85
|
export { clearPreviewEnvironmentControlValues, getPreviewEnvironmentControlValue, getPreviewEnvironmentControls, getPreviewEnvironmentOverride, setPreviewEnvironmentControlValue, setPreviewEnvironmentControls, subscribePreviewEnvironmentControls, } from './editor/previewEnvironmentControls';
|
|
83
86
|
export type { PreviewEnvironmentControlDef, PreviewEnvironmentControlOptionDef, } from './editor/previewEnvironmentControls';
|
|
84
87
|
export { createDesignImportController, createDesignScreenCollection, DESIGN_IMPORT_KINDS, expandDesignScreenCasesViewports, expandDesignScreenCollectionViewports, mergeScreenPresets, } from './editor/designImport';
|
|
@@ -205,7 +208,7 @@ export declare function pygmalionOpenPreview(): void;
|
|
|
205
208
|
export declare function pygmalionResetCurrentEdits(): boolean;
|
|
206
209
|
export interface InitialPageDef extends DesignImportInitialPage {
|
|
207
210
|
}
|
|
208
|
-
export declare function PygmalionEditor({ registry, tokens, initialPages, initialCanvas, initialEditMode, componentConnections, viewportPresets, previewEnvironmentControls, designImport, onTokensChange, appOrigin, previewRevision, previewCacheNamespace, previewArtifacts, previewArtifactEndpoint, previewConcurrency, previewOpen, onPreviewOpenChange, flowCanvas, frameSurface, captureSupply, screenFlows, screenFlowConcurrency, scenarioCoverage, screenDimensions, screenLists, sectionHeaders, sectionHeaderLabels, screenLanes, frameBranchKinds, frameLabelLabels, screenCards, liveScreenBudget, interactiveStates, surfaceClassifications, onApply, onDesignChange, onInspectApply, onInspectPreview, onInspectImpact, storyboard, storyboardDiscovery, storyboardDiscoveryEndpoint, }: {
|
|
211
|
+
export declare function PygmalionEditor({ registry, tokens, initialPages, initialCanvas, initialEditMode, componentConnections, viewportPresets, sessionPresets, previewEnvironmentControls, designImport, onTokensChange, appOrigin, previewRevision, previewCacheNamespace, previewArtifacts, previewArtifactEndpoint, previewConcurrency, previewOpen, onPreviewOpenChange, flowCanvas, frameSurface, captureSupply, screenFlows, screenFlowConcurrency, scenarioCoverage, screenDimensions, screenLists, sectionHeaders, sectionHeaderLabels, screenLanes, frameBranchKinds, frameLabelLabels, screenCards, liveScreenBudget, interactiveStates, surfaceClassifications, onApply, onDesignChange, onInspectApply, onInspectPreview, onInspectImpact, storyboard, storyboardDiscovery, storyboardDiscoveryEndpoint, }: {
|
|
209
212
|
registry?: ComponentRegistry;
|
|
210
213
|
tokens?: TokenDef[];
|
|
211
214
|
initialPages?: InitialPageDef[];
|
|
@@ -222,6 +225,12 @@ export declare function PygmalionEditor({ registry, tokens, initialPages, initia
|
|
|
222
225
|
componentConnections?: readonly DesignComponentConnectionDef[];
|
|
223
226
|
/** Named frame widths the application supports — rendered as one-click buttons beside the W/H boxes. */
|
|
224
227
|
viewportPresets?: readonly ViewportPresetDef[];
|
|
228
|
+
/**
|
|
229
|
+
* Runtimes the whole catalog can be seen under — an embedded host build and a
|
|
230
|
+
* standalone one, for instance. Unlike an axis, which belongs to a frame,
|
|
231
|
+
* choosing one re-resolves every frame: it decides which screens exist.
|
|
232
|
+
*/
|
|
233
|
+
sessionPresets?: readonly SessionPresetDef[];
|
|
225
234
|
/** Host-declared browser conditions shown in the active frame's Preview inspector. */
|
|
226
235
|
previewEnvironmentControls?: readonly PreviewEnvironmentControlDef[];
|
|
227
236
|
/** A public importer that provides unified control over code inventory and importing of entire DOM layers. */
|