@pygmalionjs/pygmalion 0.5.30 → 0.5.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.
|
@@ -5544,6 +5544,13 @@ const Ql = [
|
|
|
5544
5544
|
"border-bottom-left-radius",
|
|
5545
5545
|
"box-shadow",
|
|
5546
5546
|
"opacity",
|
|
5547
|
+
// SVG gradient stops often receive their paint through CSS variables in an
|
|
5548
|
+
// inline style. `style` attributes are deliberately not copied as raw text,
|
|
5549
|
+
// so their resolved paint has to cross the computed-style boundary here.
|
|
5550
|
+
// Without it the <linearGradient> and url(#id) survive, but both stops fall
|
|
5551
|
+
// back to the browser default black in editable layers.
|
|
5552
|
+
"stop-color",
|
|
5553
|
+
"stop-opacity",
|
|
5547
5554
|
"transform",
|
|
5548
5555
|
"transform-origin",
|
|
5549
5556
|
"color",
|
package/dist-lib/pygmalion.js
CHANGED
|
@@ -2,8 +2,8 @@ var xh = Object.defineProperty;
|
|
|
2
2
|
var yh = (e, t, n) => t in e ? xh(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var gn = (e, t, n) => yh(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { jsx as s, jsxs as g, Fragment as Ye } from "react/jsx-runtime";
|
|
5
|
-
import { R as oi, u as vh, c as $a, b as dd, g as lt, d as wh, m as Dt, e as f, f as Tt, r as cn, h as Cs, i as Yn, j as Ma, k as wn, l as ud, n as vr, p as Sh, o as hr, q as Be, t as Nh, v as Ih, w as Ch, x as Ph, y as $h, z as Mh, A as Eh, B as Ps, C as kh, D as Ah, E as Rh, G as Th, H as Fh, I as Lh, S as _h, J as Dh, K as fd, L as zh, M as $s, O as Oh, P as Bh, Q as jh, T as Wh, U as hd, V as Hh, W as Dc, X as Uh, Y as pd, Z as Vh, _ as Kh, $ as qh, a0 as Yh, a1 as Gh, a2 as Xh, a3 as md, a4 as Jh, a5 as Qh, a6 as J, a7 as zc, a8 as Oc, a9 as Zh, aa as rs, ab as ep, ac as Vo, ad as Ms, ae as tp, af as gd, ag as np, ah as rp, ai as op, s as ip, aj as bd, ak as ii, al as sp, am as ap, an as xd, ao as yd, ap as Es, aq as vd, ar as cp, as as lp, at as Bc, au as dp, av as up, aw as jc, ax as fp, ay as hp, az as pp, aA as mp, aB as gp, aC as bp, aD as xp, aE as yp, aF as vp, aG as wp, aH as Sp, aI as Np, a as Ip, aJ as Cp, aK as Pp, aL as $p, aM as Mp, aN as Ep, aO as kp, aP as Ap, aQ as Rp, aR as Tp, aS as Fp, aT as Lp, aU as _p, aV as Dp, aW as Wr, aX as Wc, aY as zp, aZ as Op, a_ as Bp, a$ as jp, b0 as Hc } from "./FrozenRoutePreview-
|
|
6
|
-
import { b1 as f1, b2 as h1, b3 as p1, b4 as m1, b5 as g1, b6 as b1, b7 as x1, b8 as y1, b9 as v1, ba as w1, bb as S1, bc as N1, bd as I1, be as C1, bf as P1, bg as $1 } from "./FrozenRoutePreview-
|
|
5
|
+
import { R as oi, u as vh, c as $a, b as dd, g as lt, d as wh, m as Dt, e as f, f as Tt, r as cn, h as Cs, i as Yn, j as Ma, k as wn, l as ud, n as vr, p as Sh, o as hr, q as Be, t as Nh, v as Ih, w as Ch, x as Ph, y as $h, z as Mh, A as Eh, B as Ps, C as kh, D as Ah, E as Rh, G as Th, H as Fh, I as Lh, S as _h, J as Dh, K as fd, L as zh, M as $s, O as Oh, P as Bh, Q as jh, T as Wh, U as hd, V as Hh, W as Dc, X as Uh, Y as pd, Z as Vh, _ as Kh, $ as qh, a0 as Yh, a1 as Gh, a2 as Xh, a3 as md, a4 as Jh, a5 as Qh, a6 as J, a7 as zc, a8 as Oc, a9 as Zh, aa as rs, ab as ep, ac as Vo, ad as Ms, ae as tp, af as gd, ag as np, ah as rp, ai as op, s as ip, aj as bd, ak as ii, al as sp, am as ap, an as xd, ao as yd, ap as Es, aq as vd, ar as cp, as as lp, at as Bc, au as dp, av as up, aw as jc, ax as fp, ay as hp, az as pp, aA as mp, aB as gp, aC as bp, aD as xp, aE as yp, aF as vp, aG as wp, aH as Sp, aI as Np, a as Ip, aJ as Cp, aK as Pp, aL as $p, aM as Mp, aN as Ep, aO as kp, aP as Ap, aQ as Rp, aR as Tp, aS as Fp, aT as Lp, aU as _p, aV as Dp, aW as Wr, aX as Wc, aY as zp, aZ as Op, a_ as Bp, a$ as jp, b0 as Hc } from "./FrozenRoutePreview-BGssXLP2.js";
|
|
6
|
+
import { b1 as f1, b2 as h1, b3 as p1, b4 as m1, b5 as g1, b6 as b1, b7 as x1, b8 as y1, b9 as v1, ba as w1, bb as S1, bc as N1, bd as I1, be as C1, bf as P1, bg as $1 } from "./FrozenRoutePreview-BGssXLP2.js";
|
|
7
7
|
import { useRef as Pe, useLayoutEffect as si, useSyncExternalStore as Xe, useCallback as Pt, useReducer as wd, useEffect as ae, memo as Sd, createElement as ao, useState as Q, useMemo as _t } from "react";
|
|
8
8
|
import { createPortal as Wp } from "react-dom";
|
|
9
9
|
const Ea = {
|
|
@@ -2660,14 +2660,14 @@ function Bi(e = {}) {
|
|
|
2660
2660
|
}
|
|
2661
2661
|
async function k(R, T) {
|
|
2662
2662
|
if (e.prepare) return e.prepare(R, T);
|
|
2663
|
-
const { getDesignImportController: I } = await import("./FrozenRoutePreview-
|
|
2663
|
+
const { getDesignImportController: I } = await import("./FrozenRoutePreview-BGssXLP2.js").then((F) => F.bi), N = I();
|
|
2664
2664
|
if (!N)
|
|
2665
2665
|
throw new Error("The design import controller is not available.");
|
|
2666
2666
|
return N.prepareScreenCapture(R, T);
|
|
2667
2667
|
}
|
|
2668
2668
|
async function L(R, T) {
|
|
2669
2669
|
if (e.settle) return e.settle(R, T);
|
|
2670
|
-
const { settleScreen: I } = await import("./FrozenRoutePreview-
|
|
2670
|
+
const { settleScreen: I } = await import("./FrozenRoutePreview-BGssXLP2.js").then((N) => N.bh);
|
|
2671
2671
|
return I(R, T);
|
|
2672
2672
|
}
|
|
2673
2673
|
async function W(R, T) {
|
|
@@ -18854,8 +18854,8 @@ const i1 = {
|
|
|
18854
18854
|
Promise.resolve().then(() => Zs),
|
|
18855
18855
|
Promise.resolve().then(() => sg),
|
|
18856
18856
|
Promise.resolve().then(() => om),
|
|
18857
|
-
import("./FrozenRoutePreview-
|
|
18858
|
-
import("./FrozenRoutePreview-
|
|
18857
|
+
import("./FrozenRoutePreview-BGssXLP2.js").then((u) => u.bk),
|
|
18858
|
+
import("./FrozenRoutePreview-BGssXLP2.js").then((u) => u.bj)
|
|
18859
18859
|
]), a = i.getMountedShadowPreviewHandle(e), c = f.pages.find(
|
|
18860
18860
|
(u) => u.id === e
|
|
18861
18861
|
);
|
package/dist-lib/testing.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
mergeRoutePreviewArtifactV3,
|
|
4
|
+
selectRoutePreviewArtifactFrames,
|
|
5
|
+
validateRoutePreviewArtifactBundle,
|
|
6
|
+
} from './route-preview-artifact-v3.mjs';
|
|
3
7
|
import { createPreviewArtifactStore } from './preview-artifact-store.mjs';
|
|
4
8
|
|
|
5
9
|
export const PYGMALION_PREVIEW_ARTIFACT_ENDPOINT =
|
|
@@ -247,6 +251,7 @@ export function pygmalionPreviewArtifactPlugin({
|
|
|
247
251
|
acquireLease,
|
|
248
252
|
requestRuntime,
|
|
249
253
|
runtimePrepared = () => true,
|
|
254
|
+
artifactStoreMaxBytes,
|
|
250
255
|
} = {}) {
|
|
251
256
|
const resolvedRoot = path.resolve(root);
|
|
252
257
|
const resolvedArtifact = path.resolve(resolvedRoot, artifactFile);
|
|
@@ -288,6 +293,9 @@ export function pygmalionPreviewArtifactPlugin({
|
|
|
288
293
|
// With the source root, a published frame records the files it actually
|
|
289
294
|
// rendered, so freshness stops depending on which revision captured it.
|
|
290
295
|
sourceRoot: resolvedRoot,
|
|
296
|
+
...(artifactStoreMaxBytes == null
|
|
297
|
+
? {}
|
|
298
|
+
: { maxBytes: artifactStoreMaxBytes }),
|
|
291
299
|
});
|
|
292
300
|
const identityQueues = new Map();
|
|
293
301
|
const inFlightRequests = new Map();
|
|
@@ -485,7 +493,7 @@ export function pygmalionPreviewArtifactPlugin({
|
|
|
485
493
|
);
|
|
486
494
|
const absent = new Set([...before.missing, ...before.stale]);
|
|
487
495
|
const remaining = wanted.filter((frame) => absent.has(frame.id));
|
|
488
|
-
if (remaining.length === 0) return before
|
|
496
|
+
if (remaining.length === 0) return before;
|
|
489
497
|
|
|
490
498
|
const generated = await withCaptureLease(sourceRevision, () =>
|
|
491
499
|
generateArtifact({
|
|
@@ -508,13 +516,17 @@ export function pygmalionPreviewArtifactPlugin({
|
|
|
508
516
|
sourceRevision,
|
|
509
517
|
recordRevision: false,
|
|
510
518
|
});
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
)
|
|
519
|
+
// Retention is allowed to decline a newly generated object when older
|
|
520
|
+
// entries have earned higher read recency. That cache decision must not
|
|
521
|
+
// discard the result from the request that just paid to generate it.
|
|
522
|
+
const responseArtifact = mergeRoutePreviewArtifactV3(
|
|
523
|
+
before.bundle,
|
|
524
|
+
generated,
|
|
525
|
+
);
|
|
526
|
+
return selectRoutePreviewArtifactFrames(responseArtifact, wanted, {
|
|
527
|
+
includeStale: true,
|
|
528
|
+
sourceRevision,
|
|
529
|
+
});
|
|
518
530
|
}, priority),
|
|
519
531
|
);
|
|
520
532
|
}
|
|
@@ -644,17 +656,17 @@ export function pygmalionPreviewArtifactPlugin({
|
|
|
644
656
|
}
|
|
645
657
|
const requested = new Set(absent);
|
|
646
658
|
try {
|
|
647
|
-
await generateFrames(
|
|
659
|
+
const captured = await generateFrames(
|
|
648
660
|
namespace,
|
|
649
661
|
sourceRevision,
|
|
650
662
|
captureBaseUrl,
|
|
651
663
|
wanted.filter((frame) => requested.has(frame.id)),
|
|
652
664
|
priority,
|
|
653
665
|
);
|
|
654
|
-
picked =
|
|
655
|
-
|
|
656
|
-
sourceRevision,
|
|
666
|
+
picked = selectRoutePreviewArtifactFrames(
|
|
667
|
+
mergeRoutePreviewArtifactV3(picked.bundle, captured.bundle),
|
|
657
668
|
wanted,
|
|
669
|
+
{ includeStale: true, sourceRevision },
|
|
658
670
|
);
|
|
659
671
|
} catch (error) {
|
|
660
672
|
sendGenerationFailure(response, error);
|