@pygmalionjs/pygmalion 0.6.1 → 0.6.3
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 +3 -1
- package/dist-lib/{FrozenRoutePreview-3yddEUJs.js → FrozenRoutePreview-V9-gxIyv.js} +1744 -1445
- package/dist-lib/pygmalion.js +6424 -6092
- package/dist-lib/style.css +1 -1
- package/dist-lib/testing.js +1 -1
- package/dist-lib/types/editor/automaticMotion.d.ts +24 -0
- package/dist-lib/types/editor/automaticPseudoStates.d.ts +1 -0
- package/dist-lib/types/editor/previewBootstrap.d.ts +1 -1
- package/dist-lib/types/editor/previewCaptureProgress.d.ts +20 -0
- package/dist-lib/types/editor/shadowPreview.d.ts +9 -0
- package/dist-lib/types/editor/store.d.ts +8 -0
- package/dist-lib/types/lib.d.ts +2 -0
- package/docs/screen-state-contract.md +23 -1
- package/node/automatic-motion-runtime.mjs +279 -0
- package/node/automatic-pseudo-runtime.mjs +8 -1
- package/node/preview-artifact-plugin.mjs +198 -49
- package/node/preview-capture-worker.mjs +80 -7
- package/node/storyboard-canonical.mjs +1 -1
- package/node/storyboard-capture-runtime.mjs +29 -8
- package/node/vite.mjs +2 -0
- package/package.json +2 -1
- package/vite.d.ts +40 -18
package/vite.d.ts
CHANGED
|
@@ -71,6 +71,18 @@ export interface PygmalionPreviewCaptureWorkerConfig {
|
|
|
71
71
|
jobTimeoutMs?: number;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
export interface PygmalionPreviewCaptureProgressEvent {
|
|
75
|
+
phase: 'queued' | 'preparing' | 'capturing' | 'retrying' | 'finalizing';
|
|
76
|
+
completed: number;
|
|
77
|
+
total: number;
|
|
78
|
+
frameId?: string;
|
|
79
|
+
captureStatus?: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface PygmalionPreviewCaptureGeneratorOptions {
|
|
83
|
+
onProgress?: (progress: PygmalionPreviewCaptureProgressEvent) => void;
|
|
84
|
+
}
|
|
85
|
+
|
|
74
86
|
export interface PygmalionPreviewConfig {
|
|
75
87
|
configFile?: string;
|
|
76
88
|
viteConfig?: string;
|
|
@@ -88,12 +100,15 @@ export interface PygmalionPreviewConfig {
|
|
|
88
100
|
sessionPort?: number;
|
|
89
101
|
artifactFile?: string;
|
|
90
102
|
artifactEndpoint?: string;
|
|
91
|
-
generateArtifact?: (
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
103
|
+
generateArtifact?: (
|
|
104
|
+
request: {
|
|
105
|
+
namespace: string;
|
|
106
|
+
sourceRevision: string;
|
|
107
|
+
frames?: readonly { id: string; fingerprint?: string }[];
|
|
108
|
+
captureBaseUrl?: string;
|
|
109
|
+
},
|
|
110
|
+
options?: PygmalionPreviewCaptureGeneratorOptions,
|
|
111
|
+
) => unknown | Promise<unknown>;
|
|
97
112
|
/**
|
|
98
113
|
* Warm capture worker used to satisfy artifact generation requests when
|
|
99
114
|
* `generateArtifact` is absent. When both are set, `generateArtifact` wins.
|
|
@@ -170,18 +185,22 @@ export declare function createPygmalionVitePlugins(
|
|
|
170
185
|
): PluginOption[];
|
|
171
186
|
|
|
172
187
|
export declare const PYGMALION_PREVIEW_ARTIFACT_ENDPOINT: string;
|
|
188
|
+
export declare const PYGMALION_PREVIEW_CAPTURE_PROGRESS_SUFFIX: string;
|
|
173
189
|
export declare const DEFAULT_PYGMALION_PREVIEW_ARTIFACT_FILE: string;
|
|
174
190
|
export declare function pygmalionPreviewArtifactPlugin(options?: {
|
|
175
191
|
root?: string;
|
|
176
192
|
artifactFile?: string;
|
|
177
193
|
endpoint?: string;
|
|
178
194
|
disabled?: () => boolean;
|
|
179
|
-
generateArtifact?: (
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
195
|
+
generateArtifact?: (
|
|
196
|
+
request: {
|
|
197
|
+
namespace: string;
|
|
198
|
+
sourceRevision: string;
|
|
199
|
+
frames?: readonly { id: string; fingerprint?: string }[];
|
|
200
|
+
captureBaseUrl?: string;
|
|
201
|
+
},
|
|
202
|
+
options?: PygmalionPreviewCaptureGeneratorOptions,
|
|
203
|
+
) => unknown | Promise<unknown>;
|
|
185
204
|
acquireLease?: (
|
|
186
205
|
reason: string,
|
|
187
206
|
) =>
|
|
@@ -190,12 +209,15 @@ export declare function pygmalionPreviewArtifactPlugin(options?: {
|
|
|
190
209
|
| Promise<{ release(): void | Promise<void> } | null>;
|
|
191
210
|
}): PluginOption;
|
|
192
211
|
export interface PygmalionPreviewCaptureWorkerChannel {
|
|
193
|
-
generateArtifact(
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
212
|
+
generateArtifact(
|
|
213
|
+
request: {
|
|
214
|
+
namespace: string;
|
|
215
|
+
sourceRevision: string;
|
|
216
|
+
frames?: readonly { id: string; fingerprint?: string }[];
|
|
217
|
+
captureBaseUrl?: string;
|
|
218
|
+
},
|
|
219
|
+
options?: PygmalionPreviewCaptureGeneratorOptions,
|
|
220
|
+
): Promise<unknown>;
|
|
199
221
|
dispose(): Promise<void>;
|
|
200
222
|
}
|
|
201
223
|
export declare function createPreviewCaptureWorkerChannel(
|