@pygmalionjs/pygmalion 0.6.32 → 0.6.34

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.
@@ -1,4 +1,4 @@
1
- import { F as s, N as a, e as r, s as i, a as t } from "./FrozenRoutePreview-BwkyYvUV.js";
1
+ import { F as s, N as a, e as r, s as i, a as t } from "./FrozenRoutePreview-BbF5Ov5K.js";
2
2
  export {
3
3
  s as FrozenRoutePreviewView,
4
4
  a as NodeModel,
@@ -27,6 +27,8 @@ export interface CaptureSupplyFrame {
27
27
  recipe?: RoutePreviewFrameRecipe;
28
28
  }
29
29
  export interface CaptureSupplyPlan {
30
+ /** Canvas that owned the viewport when this plan was built. */
31
+ activeCanvas?: string;
30
32
  /** Chunks of the active canvas, nearest first. */
31
33
  active: CaptureSupplyFrame[][];
32
34
  /** Chunks of the other canvases, in the order the frames were given. */
@@ -1,3 +1,4 @@
1
+ import { getOnDesignChange } from './host';
1
2
  import type { EditorStore } from './store';
2
3
  type SyncStatus = 'idle' | 'saving' | 'saved' | 'error';
3
4
  declare class DesignSyncState {
@@ -10,11 +11,24 @@ declare class DesignSyncState {
10
11
  }
11
12
  /** General purpose status to show code autosave status in right panel. */
12
13
  export declare const designSyncState: DesignSyncState;
14
+ export interface DocumentSyncOptions {
15
+ /** Exact checkout identity attached to every batch from this session. */
16
+ sourceRevision?: string;
17
+ /** Pin this session to its host callback instead of reading a later one. */
18
+ onDesignChange?: NonNullable<ReturnType<typeof getOnDesignChange>> | null;
19
+ }
20
+ /**
21
+ * Retire every queue, baseline, and in-flight result owned by the old catalog.
22
+ * The host receives an abort signal for cooperative cancellation; even when it
23
+ * ignores that signal, the retired request can no longer mutate this module's
24
+ * new queue or status.
25
+ */
26
+ export declare function resetDocumentSync(): void;
13
27
  /**
14
28
  * It observes the entire edited document, but only sends the final state of changed elements to the host.
15
29
  * Continuous typing/dragging and undo/redo are combined with the same element key, so the save history and edit history are separated.
16
30
  */
17
- export declare function startDocumentSync(editor: EditorStore): () => void;
31
+ export declare function startDocumentSync(editor: EditorStore, options?: DocumentSyncOptions): () => void;
18
32
  /** Tokens also use the same element change queue as canvas documents. */
19
33
  export declare function queueTokenDesignChange(tokens: {
20
34
  name: string;
@@ -77,6 +77,15 @@ export interface DesignElementChange {
77
77
  /** Successive edits of one element are combined into one final state and delivered to the host. */
78
78
  export interface DesignChangePayload {
79
79
  revision: number;
80
+ /** Exact source checkout that owned the edited document batch. */
81
+ sourceRevision?: string;
82
+ /**
83
+ * Aborted when that source checkout is retired before the host finishes.
84
+ * This property is intentionally non-enumerable at runtime so JSON
85
+ * transports keep their existing payload shape unless they explicitly read
86
+ * the signal.
87
+ */
88
+ signal?: AbortSignal;
80
89
  changes: DesignElementChange[];
81
90
  }
82
91
  export interface DesignChangeResult {
@@ -20,6 +20,8 @@ export interface PreviewEnvironmentControlDef {
20
20
  /** Configure the inspector controls once from the host application. */
21
21
  export declare function setPreviewEnvironmentControls(next: readonly PreviewEnvironmentControlDef[]): void;
22
22
  export declare function getPreviewEnvironmentControls(): readonly PreviewEnvironmentControlDef[];
23
+ /** Explicit choices only; defaults stay implicit so they do not alter identity. */
24
+ export declare function getPreviewEnvironmentControlSelections(): Readonly<Record<string, string>>;
23
25
  export declare function getPreviewEnvironmentControlValue(controlId: string): string | undefined;
24
26
  /**
25
27
  * Selects a condition. Defaults are visually selected but remain inert until a
@@ -27,6 +27,21 @@ export declare function mirrorBootRetryDelayMs(attempt: number): number;
27
27
  export interface MirrorGateStatus {
28
28
  state: string;
29
29
  }
30
+ /** The idle status fields that can identify an immutable source before checkout. */
31
+ export interface IdleMirrorSourceStatus extends MirrorGateStatus {
32
+ sourceRef: string | null;
33
+ }
34
+ /**
35
+ * Returns an immutable source revision that can safely create the first lazy
36
+ * preview demand.
37
+ *
38
+ * An idle mirror has no checked-out `commit` yet. When it was configured with
39
+ * a full Git object id, however, that ref already names the exact revision the
40
+ * catalog endpoint will verify after preparation. Named refs, worktree mode,
41
+ * and abbreviated ids can move or be ambiguous, so they remain pending until
42
+ * the server reports the resolved commit.
43
+ */
44
+ export declare function idleMirrorSourceRevision(status: IdleMirrorSourceStatus): string | null;
30
45
  export interface SettleMirrorStatusOptions<S extends MirrorGateStatus> {
31
46
  /** Status of the initial request; returned as-is when already settled. */
32
47
  initial: S;
@@ -0,0 +1,135 @@
1
+ import type { DesignComponentConnectionDef } from './componentConnections';
2
+ import type { DesignCodegenProjectManifest } from './designCompiler';
3
+ import type { DesignImportAsset, DesignImportInitialPage, DesignScenarioSource } from './designImport';
4
+ import type { FrameBranchKindDef, FrameLabelLabels } from './frameLabels';
5
+ import type { ScreenLaneDef } from './frameLanes';
6
+ import { type ScreenStateAxisDef } from './interactiveStates';
7
+ import type { PreviewEnvironmentControlDef } from './previewEnvironmentControls';
8
+ import type { RegistryEntry } from './registry';
9
+ import type { ScenarioCoverageClaim } from './scenarioCoverage';
10
+ import type { ScreenCardDef } from './screenCards';
11
+ import type { ScreenDimensionDef } from './screenDimensions';
12
+ import type { ScreenFlowPath } from './screenFlows';
13
+ import type { ScreenListDef } from './screenLists';
14
+ import type { SectionHeaderDef, SectionHeaderLabels } from './sectionHeaders';
15
+ import type { SessionPresetDef } from './sessionPresets';
16
+ import type { StoryboardDefinition } from './storyboardGraph';
17
+ import type { SurfaceClassification } from './surfaceDemands';
18
+ import type { TokenDef } from './tokens';
19
+ import type { ViewportPresetDef } from './viewportPresets';
20
+ export declare const PYGMALION_REVISION_CATALOG_VERSION: 1;
21
+ /** A routed page whose identity is complete at the JSON boundary. */
22
+ export interface PygmalionRevisionScreenPage extends DesignImportInitialPage {
23
+ name: string;
24
+ canvas: string;
25
+ route: string;
26
+ importKind: 'screens';
27
+ importPageId: string;
28
+ }
29
+ /** Revision-owned registry metadata overlaid onto host-owned React components. */
30
+ export type PygmalionRevisionComponentRegistry = Readonly<Record<string, Omit<RegistryEntry, 'component'>>>;
31
+ /**
32
+ * The JSON-serializable part of a design import that belongs to one checkout.
33
+ * React component implementations stay in the editor host; routed screens and
34
+ * every declaration that decides what those screens mean travel together.
35
+ */
36
+ export interface PygmalionRevisionScreenCatalog {
37
+ expectedCount: number;
38
+ assets: readonly DesignImportAsset[];
39
+ pages: readonly PygmalionRevisionScreenPage[];
40
+ }
41
+ export interface PygmalionRevisionCatalogV1 {
42
+ version: typeof PYGMALION_REVISION_CATALOG_VERSION;
43
+ namespace: string;
44
+ sourceRevision: string;
45
+ screens: PygmalionRevisionScreenCatalog;
46
+ /** JSON token inventory from the same source checkout. */
47
+ tokens?: readonly TokenDef[];
48
+ /** Serializable component metadata; the host still supplies each implementation. */
49
+ componentRegistry?: PygmalionRevisionComponentRegistry;
50
+ /** Repository-owned generated-code intent for the catalog's canonical frames. */
51
+ codegenProject?: DesignCodegenProjectManifest;
52
+ componentConnections?: readonly DesignComponentConnectionDef[];
53
+ viewportPresets?: readonly ViewportPresetDef[];
54
+ sessionPresets?: readonly SessionPresetDef[];
55
+ previewEnvironmentControls?: readonly PreviewEnvironmentControlDef[];
56
+ screenFlows?: readonly ScreenFlowPath[];
57
+ scenarioCoverage?: readonly ScenarioCoverageClaim[];
58
+ screenDimensions?: readonly ScreenDimensionDef[];
59
+ screenLists?: readonly ScreenListDef[];
60
+ sectionHeaders?: readonly SectionHeaderDef[];
61
+ sectionHeaderLabels?: SectionHeaderLabels;
62
+ screenLanes?: readonly ScreenLaneDef[];
63
+ frameBranchKinds?: readonly FrameBranchKindDef[];
64
+ frameLabelLabels?: FrameLabelLabels;
65
+ screenCards?: readonly ScreenCardDef[];
66
+ screenStateAxes?: readonly ScreenStateAxisDef[];
67
+ surfaceClassifications?: readonly SurfaceClassification[];
68
+ storyboard?: StoryboardDefinition;
69
+ storyboardScenarios?: readonly DesignScenarioSource[];
70
+ sessionStoryboards?: Readonly<Record<string, StoryboardDefinition>>;
71
+ }
72
+ export type PygmalionRevisionCatalog = PygmalionRevisionCatalogV1;
73
+ export interface PygmalionRevisionCatalogExpectation {
74
+ namespace?: string;
75
+ sourceRevision?: string;
76
+ }
77
+ export type PygmalionRevisionCatalogValidation = {
78
+ valid: true;
79
+ catalog: PygmalionRevisionCatalog;
80
+ } | {
81
+ valid: false;
82
+ errors: readonly string[];
83
+ };
84
+ /**
85
+ * Validates the cross-process boundary before any editor singleton is touched.
86
+ * Nested declaration semantics are validated by their existing installers;
87
+ * this gate proves the envelope, exact identity, and screen referential integrity.
88
+ */
89
+ export declare function validatePygmalionRevisionCatalog(value: unknown, expectation?: PygmalionRevisionCatalogExpectation): PygmalionRevisionCatalogValidation;
90
+ export interface PygmalionRevisionCatalogLoadOptions {
91
+ endpoint: string;
92
+ namespace: string;
93
+ sourceRevision: string;
94
+ signal?: AbortSignal;
95
+ fetcher?: typeof fetch;
96
+ }
97
+ /** A non-success HTTP response from the exact revision catalog endpoint. */
98
+ export declare class PygmalionRevisionCatalogHttpError extends Error {
99
+ readonly status: number;
100
+ readonly code: string;
101
+ readonly retryable: boolean;
102
+ readonly preparing: boolean;
103
+ constructor(options: {
104
+ status: number;
105
+ code: string;
106
+ retryable?: boolean;
107
+ preparing?: boolean;
108
+ });
109
+ }
110
+ /** Fetches and validates one exact revision catalog from the local Vite host. */
111
+ export declare function loadPygmalionRevisionCatalog({ endpoint, namespace, sourceRevision, signal, fetcher, }: PygmalionRevisionCatalogLoadOptions): Promise<PygmalionRevisionCatalog>;
112
+ export type PygmalionRevisionCatalogRequestResult = {
113
+ status: 'accepted';
114
+ catalog: PygmalionRevisionCatalog;
115
+ } | {
116
+ status: 'stale';
117
+ };
118
+ /**
119
+ * Latest-request-wins loader with exact-revision caching.
120
+ *
121
+ * Abort is an optimization, not the correctness boundary: a host fetcher may
122
+ * ignore its signal. The monotonic generation also rejects an old dev request
123
+ * after the sequence dev -> qa -> dev, where comparing the revision string
124
+ * alone would incorrectly accept the first dev response.
125
+ */
126
+ export declare class PygmalionRevisionCatalogClient {
127
+ private readonly loader;
128
+ private generation;
129
+ private activeAbortController;
130
+ private readonly cache;
131
+ constructor(loader: (sourceRevision: string, signal: AbortSignal) => Promise<PygmalionRevisionCatalog>);
132
+ request(sourceRevision: string): Promise<PygmalionRevisionCatalogRequestResult>;
133
+ invalidate(sourceRevision?: string): void;
134
+ dispose(): void;
135
+ }
@@ -0,0 +1,62 @@
1
+ import { type DesignComponentConnectionDef } from './componentConnections';
2
+ import { type FrameBranchKindDef, type FrameLabelLabels } from './frameLabels';
3
+ import { type ScreenLaneDef } from './frameLanes';
4
+ import { type ScreenStateAxisDef } from './interactiveStates';
5
+ import { type PreviewEnvironmentControlDef } from './previewEnvironmentControls';
6
+ import { type ComponentRegistry, type RegistryEntry } from './registry';
7
+ import { type ScenarioCoverageClaim } from './scenarioCoverage';
8
+ import { type ScreenCardDef } from './screenCards';
9
+ import { type ScreenDimensionDef } from './screenDimensions';
10
+ import { type ScreenFlowPath } from './screenFlows';
11
+ import { type ScreenListDef } from './screenLists';
12
+ import { type SectionHeaderDef, type SectionHeaderLabels } from './sectionHeaders';
13
+ import { type SessionPresetDef } from './sessionPresets';
14
+ import { type SurfaceClassification } from './surfaceDemands';
15
+ import { type TokenDef } from './tokens';
16
+ import { type ViewportPresetDef } from './viewportPresets';
17
+ /**
18
+ * Mutable declaration singletons that must move with one revision catalog.
19
+ * The component implementations remain supplied by the host bundle; the
20
+ * catalog owns their revision-specific JSON declarations and token values.
21
+ */
22
+ export interface RevisionCatalogDeclarations {
23
+ registry?: ComponentRegistry;
24
+ tokens?: readonly TokenDef[];
25
+ componentConnections?: readonly DesignComponentConnectionDef[];
26
+ viewportPresets?: readonly ViewportPresetDef[];
27
+ sessionPresets?: readonly SessionPresetDef[];
28
+ previewEnvironmentControls?: readonly PreviewEnvironmentControlDef[];
29
+ screenFlows?: readonly ScreenFlowPath[];
30
+ scenarioCoverage?: readonly ScenarioCoverageClaim[];
31
+ screenDimensions?: readonly ScreenDimensionDef[];
32
+ screenLists?: readonly ScreenListDef[];
33
+ sectionHeaders?: readonly SectionHeaderDef[];
34
+ sectionHeaderLabels?: SectionHeaderLabels;
35
+ screenLanes?: readonly ScreenLaneDef[];
36
+ frameBranchKinds?: readonly FrameBranchKindDef[];
37
+ frameLabelLabels?: FrameLabelLabels;
38
+ screenCards?: readonly ScreenCardDef[];
39
+ screenStateAxes?: readonly ScreenStateAxisDef[];
40
+ surfaceClassifications?: readonly SurfaceClassification[];
41
+ }
42
+ /** A page commit that can undo mutations made before it throws. */
43
+ export interface RevisionCatalogPageCommit {
44
+ commit: () => void;
45
+ rollback: () => void;
46
+ }
47
+ /**
48
+ * Binds revision-owned serializable metadata to implementations bundled by the
49
+ * editor host. Missing implementations fail closed: silently retaining the
50
+ * previous revision's entry would make adoption and code generation lie about
51
+ * which component the selected checkout contains.
52
+ */
53
+ export declare function bindRevisionComponentRegistry(manifest: Readonly<Record<string, Omit<RegistryEntry, 'component'>>> | undefined, hostRegistry: ComponentRegistry | undefined): ComponentRegistry | undefined;
54
+ /**
55
+ * Installs a catalog and its page commit as one recoverable boundary.
56
+ *
57
+ * Module stores do not participate in a MobX transaction, so `runInAction`
58
+ * alone cannot roll them back. Capture their last complete snapshot first and
59
+ * restore it if a declaration installer or the page commit rejects. A failed
60
+ * revision therefore never remains half-installed for the next render.
61
+ */
62
+ export declare function installRevisionCatalogSnapshot(declarations: RevisionCatalogDeclarations, pageCommit: (() => void) | RevisionCatalogPageCommit): void;
@@ -184,7 +184,7 @@ export interface RoutePreviewFrameRequestOptions {
184
184
  }
185
185
  type RoutePreviewFrameRequester = (frames: readonly RoutePreviewArtifactFrameIdentity[], options?: RoutePreviewFrameRequestOptions) => RoutePreviewArtifactFrameRequestResult | Promise<RoutePreviewArtifactFrameRequestResult> | void;
186
186
  /** Installed by the host adapter, which owns the transport. */
187
- export declare function setRoutePreviewArtifactFrameRequester(requester: RoutePreviewFrameRequester | null): void;
187
+ export declare function setRoutePreviewArtifactFrameRequester(requester: RoutePreviewFrameRequester | null): () => void;
188
188
  /**
189
189
  * When an exact artifact endpoint exists, background cache misses stay cheap:
190
190
  * only an active or deliberately hovered frame may boot the live application.
@@ -5,6 +5,7 @@ export interface RoutePreviewArtifactStatusInput {
5
5
  resolution: RoutePreviewArtifactResolution;
6
6
  captureStatus?: RoutePreviewArtifactV3Status;
7
7
  diagnostic?: string;
8
+ liveInteractionReady?: boolean;
8
9
  }
9
10
  export interface RoutePreviewArtifactStatusPresentation {
10
11
  title: string;
@@ -45,4 +46,4 @@ export declare function resolveStaticRoutePreviewSurface({ hasScreenshot, hasDom
45
46
  preferDom?: boolean;
46
47
  }): StaticRoutePreviewSurface;
47
48
  /** Turns artifact freshness and capture state into one unambiguous frame badge. */
48
- export declare function resolveRoutePreviewArtifactStatus({ stale, resolution, captureStatus, diagnostic, }: RoutePreviewArtifactStatusInput): RoutePreviewArtifactStatusPresentation | null;
49
+ export declare function resolveRoutePreviewArtifactStatus({ stale, resolution, captureStatus, diagnostic, liveInteractionReady, }: RoutePreviewArtifactStatusInput): RoutePreviewArtifactStatusPresentation | null;
@@ -3,7 +3,7 @@ import { type InteractiveStateDef } from './interactiveStates';
3
3
  import { type ScreenDimensionDef } from './screenDimensions';
4
4
  import { type CardBadgeOption, type CardSlotDef, type ScreenCardDef } from './screenCards';
5
5
  import { type ScreenListDef } from './screenLists';
6
- import { type DesignImportAsset, type DesignImportKind, type DesignFrameSizeMode, type DesignScreenAssertion, type DesignScreenDesiredState, type DesignScreenInteraction, type DesignScreenPreset, type StoryboardEnvironment } from './designImport';
6
+ import { type DesignImportAsset, type DesignImportInitialPage, type DesignImportKind, type DesignFrameSizeMode, type DesignScreenAssertion, type DesignScreenDesiredState, type DesignScreenInteraction, type DesignScreenPreset, type StoryboardEnvironment } from './designImport';
7
7
  import { type DomImportDiagnostic, type DomImportResult } from './domImport';
8
8
  import { type LayerImportFidelityReport, type MeasurableElement } from './importFidelity';
9
9
  import { type DesignFrameHeightMode } from './frameHeight';
@@ -466,6 +466,8 @@ export declare class EditorStore {
466
466
  /** Same-tab reload restoration keyed by a host-provided workspace identity. */
467
467
  private activeFrameStorageKey;
468
468
  private activeFrameDisposer;
469
+ private activeFramePersistenceScope;
470
+ private activeFramePersistenceCatalogKey;
469
471
  /** Explicit edit scope by sourceKey. Unspecified is shared like the existing operation. */
470
472
  private sharedSourceEditScopes;
471
473
  /** The final change that can be safely reflected to the original source during a regular canvas NodeModel patch. */
@@ -524,48 +526,45 @@ export declare class EditorStore {
524
526
  private sourceEditScopeForNode;
525
527
  setSharedSourceEditScope(node: NodeModel, scope: SharedSourceEditScope): void;
526
528
  private pagesInitialized;
529
+ private installedPageCatalogKey;
530
+ private installedHostPageSignature;
531
+ private pagesFromComponents;
532
+ private resetPageCatalogState;
533
+ private chooseInitialPage;
534
+ private installPagesFromComponents;
527
535
  /**
528
536
  * Host injects “real screen components” into editor pages — 1 component node per page (root fill).
529
537
  * StrictMode applies only once even to dual mounts (idempotent).
530
538
  */
531
- initPagesFromComponents(defs: {
532
- name: string;
533
- componentName?: string;
534
- /** Registry Name List — Created as a vertical gallery page (listing component nodes). */
535
- gallery?: string[];
536
- canvas?: string;
537
- section?: string;
538
- route?: string;
539
- previewRoute?: string;
540
- width?: number;
541
- height?: number;
542
- frameSizeMode?: DesignFrameSizeMode;
543
- heightMode?: DesignFrameHeightMode;
544
- maxHeight?: number;
545
- path?: string;
546
- publish?: boolean;
547
- importLayers?: boolean;
548
- importPageId?: string;
549
- importKind?: string;
550
- assetIds?: string[];
551
- sourcePaths?: string[];
552
- flow?: string;
553
- scenario?: string;
554
- state?: string;
555
- stateKind?: string;
556
- lane?: string;
557
- runtimes?: readonly string[];
558
- scenarioId?: string;
559
- scenarioIds?: readonly string[];
560
- interactions?: DesignScreenInteraction[];
561
- desiredState?: DesignScreenDesiredState;
562
- environment?: StoryboardEnvironment;
563
- preset?: DesignScreenPreset;
564
- assertions?: DesignScreenAssertion[];
565
- session?: string;
566
- }[], options?: {
539
+ initPagesFromComponents(defs: DesignImportInitialPage[], options?: {
567
540
  initialCanvas?: string;
568
541
  }): void;
542
+ /** True when replacing with this exact page catalog would be a no-op. */
543
+ hasInstalledPageCatalog(catalogKey: string): boolean;
544
+ /** Re-publishes component props after the host swaps registry functions. */
545
+ invalidateComponentRegistryBindings(): void;
546
+ /**
547
+ * Refreshes only pages supplied by the editor host while retaining routed
548
+ * pages and their revision-local edits. A runtime/session revision reuses the
549
+ * same definitions and therefore remains a strict no-op.
550
+ */
551
+ refreshHostPagesFromComponents(defs: readonly DesignImportInitialPage[], identity?: {
552
+ sourceRevision?: string;
553
+ appOrigin?: string;
554
+ }): boolean;
555
+ /**
556
+ * Replaces the complete page catalog for a different source revision.
557
+ * Canonical page ids, never allocation-order ids, are the only state allowed
558
+ * to cross the boundary. All edit and imported-preview state belongs to the
559
+ * checkout that produced it and is retired before the new pages publish.
560
+ */
561
+ replacePagesFromComponents(defs: readonly DesignImportInitialPage[], options: {
562
+ catalogKey: string;
563
+ initialCanvas?: string;
564
+ sourceRevision?: string;
565
+ appOrigin?: string;
566
+ hostPages?: readonly DesignImportInitialPage[];
567
+ }): boolean;
569
568
  /** Tree root of the active page — getter(computed) for compatibility with existing code. */
570
569
  get root(): NodeModel;
571
570
  addPage(): boolean;
@@ -20,6 +20,15 @@ export declare function getTokenOverrides(): {
20
20
  name: string;
21
21
  value: string;
22
22
  }[];
23
+ /**
24
+ * Replaces revision-local token edits without reporting them as new user edits.
25
+ * Catalog installation uses this to retire one checkout's CSS overrides and to
26
+ * restore them if the surrounding atomic install fails.
27
+ */
28
+ export declare function replaceTokenOverrides(next: readonly {
29
+ name: string;
30
+ value: string;
31
+ }[]): void;
23
32
  /** Edit token value — Immediately override document root (live) + notify cumulative changes to host callback. */
24
33
  export declare function applyTokenOverride(name: string, value: string): void;
25
34
  /** Disable all overrides (return to original value). */
@@ -21,6 +21,8 @@ import { type PreviewEnvironmentControlDef } from './editor/previewEnvironmentCo
21
21
  import type { DesignCodegenProjectManifest, DesignCodegenValidator } from './editor/designCompiler';
22
22
 
23
23
  export { setComponentRegistry } from './editor/registry';
24
+ export { loadPygmalionRevisionCatalog, PygmalionRevisionCatalogClient, PygmalionRevisionCatalogHttpError, PYGMALION_REVISION_CATALOG_VERSION, validatePygmalionRevisionCatalog, } from './editor/revisionCatalog';
25
+ export type { PygmalionRevisionCatalog, PygmalionRevisionCatalogExpectation, PygmalionRevisionCatalogLoadOptions, PygmalionRevisionCatalogRequestResult, PygmalionRevisionCatalogValidation, PygmalionRevisionCatalogV1, PygmalionRevisionComponentRegistry, PygmalionRevisionScreenCatalog, PygmalionRevisionScreenPage, } from './editor/revisionCatalog';
24
26
  export { PYGMALION_PREVIEW_CAPTURE_PROGRESS_SUFFIX, previewCaptureProgressEndpoint, usePygmalionPreviewCaptureProgress, } from './editor/previewCaptureProgress';
25
27
  export type { PygmalionPreviewCaptureProgress, PygmalionPreviewCaptureProgressPhase, } from './editor/previewCaptureProgress';
26
28
  export { beginFrameInteraction, exitFrameInteraction, getFrameInteractionSnapshot, setFrameInteractionScroll, subscribeFrameInteraction, } from './editor/frameInteraction';
@@ -55,7 +57,7 @@ export { validateInteractiveStates, validateScreenStateAxes, } from './editor/in
55
57
  export type { InteractiveStateDef, InteractiveStateDiagnostic, InteractiveStateOption, ScreenStateAxisDef, ScreenStateAxisDiagnostic, ScreenStateAxisKind, ScreenStateOption, } from './editor/interactiveStates';
56
58
  export { validateScreenCards } from './editor/screenCards';
57
59
  export type { CardBadgeOption, CardSlotDef, ScreenCardDef, ScreenCardDiagnostic, } from './editor/screenCards';
58
- export { validateFrameBranchKinds, framesMissingScenario } from './editor/frameLabels';
60
+ export { validateFrameBranchKinds, framesMissingScenario, } from './editor/frameLabels';
59
61
  export type { FrameBranchKindDef, FrameBranchKindDiagnostic, FrameLabelLabels, } from './editor/frameLabels';
60
62
  export { validateSectionHeaders } from './editor/sectionHeaders';
61
63
  export type { SectionHeaderDef, SectionHeaderDiagnostic, SectionHeaderFacts, SectionHeaderLabels, } from './editor/sectionHeaders';
@@ -78,7 +80,7 @@ export { createStoryboardRouteUrl, getStoryboardBaselineEnvironment, mergeStoryb
78
80
  export type { ApplyPayload, DesignChangePayload, DesignChangeResult, DesignCodeDocument, DesignElementChange, DesignElementDocument, DesignTokenDocument, InspectApplyResult, InspectImpactResult, InspectPreviewResult, } from './editor/host';
79
81
  export type { InspectApplyPayload, PrimitiveSourceValue, PrimitiveSourceValueType, SourceAffectedFrame, SourceEditOperation, SourceEditScope, SourceIdentity, SourceInsertComponent, } from './editor/inspect';
80
82
  export type { InspectQaArtifactHash, InspectQaCaptureRequest, InspectQaFailure, InspectQaFrameResult, InspectQaPixelDiff, InspectQaPixelDimensions, InspectQaResult, } from './editor/visualQa';
81
- export { inspectQaBaseUrl, requestInspectQaCapture, } from './editor/visualQa';
83
+ export { inspectQaBaseUrl, requestInspectQaCapture } from './editor/visualQa';
82
84
  export { usePygmalionProject } from './editor/projectRuntime';
83
85
  export type { PygmalionDesignSessionStatus, PygmalionDevMirrorStatus, PygmalionIntegrationState, PygmalionProjectEndpoints, PygmalionProjectRuntime, PygmalionProjectRuntimeOptions, PygmalionRevertResult, PygmalionSessionOperation, PygmalionSourceRef, PygmalionSourceRefs, PygmalionVisualOperation, PygmalionVisualRevertOperation, } from './editor/projectRuntime';
84
86
  export { SourceRefControl } from './ui/SourceRefControl';
@@ -283,7 +285,7 @@ export declare function pygmalionOpenPreview(): void;
283
285
  export declare function pygmalionResetCurrentEdits(): boolean;
284
286
  export interface InitialPageDef extends DesignImportInitialPage {
285
287
  }
286
- export declare function PygmalionEditor({ registry, tokens, initialPages, initialCanvas, activeFramePersistenceKey, initialEditMode, componentConnections, codegenProject, codegenValidator, codegenValidationScope, 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, screenStateAxes, interactiveStates, surfaceClassifications, onApply, onDesignChange, onInspectApply, onInspectPreview, onInspectImpact, storyboard, storyboardScenarios, sessionStoryboards, storyboardDiscovery, storyboardDiscoveryEndpoint, }: {
288
+ export declare function PygmalionEditor({ registry, tokens, initialPages, initialCanvas, activeFramePersistenceKey, initialEditMode, componentConnections, codegenProject, codegenValidator, codegenValidationScope, viewportPresets, sessionPresets, previewEnvironmentControls, designImport, onTokensChange, appOrigin, previewRevision, previewCacheNamespace, previewArtifacts, previewArtifactEndpoint, previewCatalogEndpoint, previewConcurrency, previewOpen, onPreviewOpenChange, flowCanvas, frameSurface, captureSupply, screenFlows, screenFlowConcurrency, scenarioCoverage, screenDimensions, screenLists, sectionHeaders, sectionHeaderLabels, screenLanes, frameBranchKinds, frameLabelLabels, screenCards, liveScreenBudget, screenStateAxes, interactiveStates, surfaceClassifications, onApply, onDesignChange, onInspectApply, onInspectPreview, onInspectImpact, storyboard, storyboardScenarios, sessionStoryboards, storyboardDiscovery, storyboardDiscoveryEndpoint, }: {
287
289
  registry?: ComponentRegistry;
288
290
  tokens?: TokenDef[];
289
291
  initialPages?: InitialPageDef[];
@@ -341,6 +343,13 @@ export declare function PygmalionEditor({ registry, tokens, initialPages, initia
341
343
  previewArtifacts?: RoutePreviewArtifactBundle;
342
344
  /** Same-origin endpoint that resolves an exact namespace and source revision, generating it on demand when configured by the Vite plugin. */
343
345
  previewArtifactEndpoint?: string;
346
+ /**
347
+ * Same-origin endpoint for the exact checkout's serialized screen catalog.
348
+ * When configured, routed pages and their declarations never fall back to
349
+ * the editor bundle: the previous coherent revision stays visible until the
350
+ * requested catalog has been validated and installed as one snapshot.
351
+ */
352
+ previewCatalogEndpoint?: string;
344
353
  /** Number of actual app previews to run simultaneously. Defaults to an adaptive 12–32 lanes. */
345
354
  previewConcurrency?: number;
346
355
  /** Controlled by external status such as host route ▶ Whether the preview is opened or not. */