@pygmalionjs/pygmalion 0.2.31 → 0.2.32

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 "./App-UxJfVubu.js";
1
+ import { F as s, N as a, e as r, s as i, a as t } from "./App-BiKMlsWh.js";
2
2
  export {
3
3
  s as FrozenRoutePreviewView,
4
4
  a as NodeModel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pygmalionjs/pygmalion",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "description": "Code-backed DOM design sandbox and visual QA editor",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
package/types.d.ts CHANGED
@@ -835,6 +835,8 @@ export interface PreviewArtifactTransportRequest extends PreviewArtifactExpectat
835
835
  captureBaseUrl?: string;
836
836
  /** Frames to fetch. Omitted asks for the whole bundle, as earlier versions did. */
837
837
  frames?: readonly PreviewArtifactFrameRequest[];
838
+ /** Set false to seed only what exists instead of capturing what is absent. */
839
+ generate?: boolean;
838
840
  }
839
841
 
840
842
  export type PreviewArtifactTransport = (
@@ -843,6 +845,8 @@ export type PreviewArtifactTransport = (
843
845
 
844
846
  export interface PreviewArtifactHttpResponse {
845
847
  readonly ok: boolean;
848
+ readonly status?: number;
849
+ readonly statusText?: string;
846
850
  json(): Promise<unknown>;
847
851
  }
848
852
 
@@ -865,6 +869,12 @@ export interface PreviewArtifactHttpTransportOptions {
865
869
  export type PreviewArtifactValidationReason =
866
870
  'invalid-bundle' | 'namespace-mismatch' | 'revision-mismatch';
867
871
 
872
+ export interface PreviewArtifactFrameResolution {
873
+ exact: readonly string[];
874
+ missing: readonly string[];
875
+ stale: readonly string[];
876
+ }
877
+
868
878
  export type PreviewArtifactValidationResult =
869
879
  | {
870
880
  valid: true;
@@ -882,6 +892,7 @@ export type PreviewArtifactBootstrapResult =
882
892
  | {
883
893
  status: 'accepted';
884
894
  artifact: RoutePreviewArtifactBundle;
895
+ frameResolution?: PreviewArtifactFrameResolution;
885
896
  }
886
897
  | {
887
898
  status: 'unavailable';
@@ -914,11 +925,19 @@ export declare function createPreviewArtifactHttpTransport(
914
925
  export declare function validatePreviewArtifactBundle(
915
926
  value: unknown,
916
927
  expectation?: PreviewArtifactExpectation,
928
+ options?: { perFrameIdentity?: boolean },
917
929
  ): PreviewArtifactValidationResult;
930
+ export declare function resolvePreviewArtifactFrames(
931
+ artifact: RoutePreviewArtifactBundle,
932
+ expectation: PreviewArtifactExpectation,
933
+ frames: readonly PreviewArtifactFrameRequest[],
934
+ ): PreviewArtifactFrameResolution;
918
935
  export declare function bootstrapPreviewArtifact(
919
936
  options: PreviewArtifactExpectation & {
920
937
  transport: PreviewArtifactTransport;
921
938
  signal?: AbortSignal;
939
+ frames?: readonly PreviewArtifactFrameRequest[];
940
+ generate?: boolean;
922
941
  },
923
942
  ): Promise<PreviewArtifactBootstrapResult>;
924
943
 
@@ -1664,7 +1683,7 @@ export declare function PygmalionEditor(props: {
1664
1683
  previewCacheNamespace?: string;
1665
1684
  /** A canonical screen snapshot created during build. When the namespace matches, it is injected into the cache before the first render. */
1666
1685
  previewArtifacts?: RoutePreviewArtifactBundle;
1667
- /** Same-origin endpoint that resolves an exact namespace and source revision. */
1686
+ /** Same-origin endpoint that resolves an exact namespace and source revision. Stale embedded previews remain visibly last-known until this endpoint returns an exact frame. */
1668
1687
  previewArtifactEndpoint?: string;
1669
1688
  /** Number of actual app previews to run simultaneously. Defaults to an adaptive 12–32 lanes. */
1670
1689
  previewConcurrency?: number;