@pygmalionjs/pygmalion 0.5.9 → 0.5.11
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.
|
@@ -8530,6 +8530,17 @@ ${e}`;
|
|
|
8530
8530
|
}
|
|
8531
8531
|
this.sectionRenameTarget = d, this.selectedIds = [], this.selectedCanvasObject = { kind: "section", name: d };
|
|
8532
8532
|
}
|
|
8533
|
+
/**
|
|
8534
|
+
* Enters the app screen for one frame, whichever frame is asked for.
|
|
8535
|
+
*
|
|
8536
|
+
* ▶ plays from the *current* frame, which is right for a toolbar button but
|
|
8537
|
+
* makes "see this one for real" a two-step gesture: select the frame, then
|
|
8538
|
+
* find the button. Double-clicking the frame's own label is the direct form of
|
|
8539
|
+
* the same intent, so it names the frame instead of relying on selection.
|
|
8540
|
+
*/
|
|
8541
|
+
openFramePreview(e) {
|
|
8542
|
+
this.pages.find((r) => r.id === e) && this.activePageId !== e && this.switchPage(e), this.openPreview();
|
|
8543
|
+
}
|
|
8533
8544
|
openPreview(e = {}) {
|
|
8534
8545
|
var r;
|
|
8535
8546
|
const n = gr();
|
package/dist-lib/pygmalion.js
CHANGED
|
@@ -2,8 +2,8 @@ var Bf = Object.defineProperty;
|
|
|
2
2
|
var jf = (e, t, n) => t in e ? Bf(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var an = (e, t, n) => jf(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { jsx as s, jsxs as g, Fragment as Ke } from "react/jsx-runtime";
|
|
5
|
-
import { R as Zo, u as Wf, c as fa, b as Vl, g as Qe, d as Hf, m as Ht, e as f, f as Xt, r as dn, h as ys, i as qn, j as ha, k as Qt, l as Kl, n as eo, p as Vf, o as Wn, q as He, t as Kf, v as Uf, w as qf, x as Yf, y as Gf, z as Xf, A as Jf, B as vs, C as Qf, D as Zf, E as eh, G as th, H as nh, I as rh, S as oh, J as ih, K as sh, L as ah, M as ch, O as lh, P as dh, Q as uh, T as fh, U as Ul, V as hh, W as wc, X as ph, Y as ql, Z as mh, _ as gh, $ as bh, a0 as xh, a1 as yh, a2 as vh, a3 as Yl, a4 as wh, a5 as Sh, a6 as G, a7 as Sc, a8 as Nc, a9 as Nh, aa as Qi, ab as Ih, ac as Wo, ad as ws, ae as Ch, af as Gl, ag as $h, ah as Ph, ai as Mh, aj as Eh, s as kh, ak as Xl, al as Jl, am as Ss, an as Ql, ao as Ah, ap as Rh, aq as Ic, ar as Th, as as Fh, at as Cc, au as Lh, av as Dh, aw as zh, ax as _h, ay as Oh, az as Bh, aA as jh, aB as Wh, aC as Hh, aD as Vh, aE as Kh, aF as Uh, a as qh, aG as Yh, aH as Gh, aI as Xh, aJ as Jh, aK as Qh, aL as Zh, aM as ep, aN as tp, aO as np, aP as rp, aQ as op, aR as ip, aS as Fr, aT as sp, aU as ap, aV as cp, aW as lp, aX as $c } from "./FrozenRoutePreview-
|
|
6
|
-
import { aY as u0, aZ as f0, a_ as h0, a$ as p0, b0 as m0, b1 as g0, b2 as b0, b3 as x0, b4 as y0, b5 as v0, b6 as w0, b7 as S0, b8 as N0, b9 as I0 } from "./FrozenRoutePreview-
|
|
5
|
+
import { R as Zo, u as Wf, c as fa, b as Vl, g as Qe, d as Hf, m as Ht, e as f, f as Xt, r as dn, h as ys, i as qn, j as ha, k as Qt, l as Kl, n as eo, p as Vf, o as Wn, q as He, t as Kf, v as Uf, w as qf, x as Yf, y as Gf, z as Xf, A as Jf, B as vs, C as Qf, D as Zf, E as eh, G as th, H as nh, I as rh, S as oh, J as ih, K as sh, L as ah, M as ch, O as lh, P as dh, Q as uh, T as fh, U as Ul, V as hh, W as wc, X as ph, Y as ql, Z as mh, _ as gh, $ as bh, a0 as xh, a1 as yh, a2 as vh, a3 as Yl, a4 as wh, a5 as Sh, a6 as G, a7 as Sc, a8 as Nc, a9 as Nh, aa as Qi, ab as Ih, ac as Wo, ad as ws, ae as Ch, af as Gl, ag as $h, ah as Ph, ai as Mh, aj as Eh, s as kh, ak as Xl, al as Jl, am as Ss, an as Ql, ao as Ah, ap as Rh, aq as Ic, ar as Th, as as Fh, at as Cc, au as Lh, av as Dh, aw as zh, ax as _h, ay as Oh, az as Bh, aA as jh, aB as Wh, aC as Hh, aD as Vh, aE as Kh, aF as Uh, a as qh, aG as Yh, aH as Gh, aI as Xh, aJ as Jh, aK as Qh, aL as Zh, aM as ep, aN as tp, aO as np, aP as rp, aQ as op, aR as ip, aS as Fr, aT as sp, aU as ap, aV as cp, aW as lp, aX as $c } from "./FrozenRoutePreview-BR5CBAD3.js";
|
|
6
|
+
import { aY as u0, aZ as f0, a_ as h0, a$ as p0, b0 as m0, b1 as g0, b2 as b0, b3 as x0, b4 as y0, b5 as v0, b6 as w0, b7 as S0, b8 as N0, b9 as I0 } from "./FrozenRoutePreview-BR5CBAD3.js";
|
|
7
7
|
import { useRef as Ce, useLayoutEffect as ei, useSyncExternalStore as Je, useCallback as St, useReducer as Zl, useEffect as ce, memo as ed, createElement as to, useState as q, useMemo as Rt } from "react";
|
|
8
8
|
import { createPortal as dp } from "react-dom";
|
|
9
9
|
const pa = {
|
|
@@ -2623,14 +2623,14 @@ function Ri(e = {}) {
|
|
|
2623
2623
|
}
|
|
2624
2624
|
async function x(A, N) {
|
|
2625
2625
|
if (e.prepare) return e.prepare(A, N);
|
|
2626
|
-
const { getDesignImportController: T } = await import("./FrozenRoutePreview-
|
|
2626
|
+
const { getDesignImportController: T } = await import("./FrozenRoutePreview-BR5CBAD3.js").then((E) => E.bb), j = T();
|
|
2627
2627
|
if (!j)
|
|
2628
2628
|
throw new Error("The design import controller is not available.");
|
|
2629
2629
|
return j.prepareScreenCapture(A, N);
|
|
2630
2630
|
}
|
|
2631
2631
|
async function w(A, N) {
|
|
2632
2632
|
if (e.settle) return e.settle(A, N);
|
|
2633
|
-
const { settleScreen: T } = await import("./FrozenRoutePreview-
|
|
2633
|
+
const { settleScreen: T } = await import("./FrozenRoutePreview-BR5CBAD3.js").then((j) => j.ba);
|
|
2634
2634
|
return T(A, N);
|
|
2635
2635
|
}
|
|
2636
2636
|
async function v(A, N) {
|
|
@@ -3200,7 +3200,7 @@ const mg = He(function({
|
|
|
3200
3200
|
"data-frame-label": t.id,
|
|
3201
3201
|
"data-frame-label-kind": c.kind,
|
|
3202
3202
|
"data-frame-label-tier": d ? "compact" : "full",
|
|
3203
|
-
title: t.layerImportError ?? t.name
|
|
3203
|
+
title: t.layerImportError ?? `${t.name} — double-click to open this screen`,
|
|
3204
3204
|
style: {
|
|
3205
3205
|
display: "flex",
|
|
3206
3206
|
alignItems: "center",
|
|
@@ -3216,11 +3216,18 @@ const mg = He(function({
|
|
|
3216
3216
|
// does not compete with a second highlight.
|
|
3217
3217
|
outline: n ? `2px solid ${vs(c.accent, 0.2)}` : void 0,
|
|
3218
3218
|
outlineOffset: -2,
|
|
3219
|
-
|
|
3220
|
-
|
|
3219
|
+
// The label always takes pointer events now, because double-clicking it
|
|
3220
|
+
// enters the screen and that is the gesture a designer reaches for first.
|
|
3221
|
+
// Dragging to move stays edit-only; the label sits above the frame box in
|
|
3222
|
+
// its own strip, so accepting events here intercepts nothing beneath it.
|
|
3223
|
+
pointerEvents: "auto",
|
|
3224
|
+
cursor: u ? "move" : "pointer",
|
|
3221
3225
|
width: "fit-content"
|
|
3222
3226
|
},
|
|
3223
3227
|
onMouseDown: r,
|
|
3228
|
+
onDoubleClick: (p) => {
|
|
3229
|
+
p.stopPropagation(), f.openFramePreview(t.id);
|
|
3230
|
+
},
|
|
3224
3231
|
children: [
|
|
3225
3232
|
/* @__PURE__ */ s(
|
|
3226
3233
|
"div",
|
|
@@ -18416,8 +18423,8 @@ const o0 = {
|
|
|
18416
18423
|
Promise.resolve().then(() => Vs),
|
|
18417
18424
|
Promise.resolve().then(() => Mm),
|
|
18418
18425
|
Promise.resolve().then(() => $p),
|
|
18419
|
-
import("./FrozenRoutePreview-
|
|
18420
|
-
import("./FrozenRoutePreview-
|
|
18426
|
+
import("./FrozenRoutePreview-BR5CBAD3.js").then((u) => u.bd),
|
|
18427
|
+
import("./FrozenRoutePreview-BR5CBAD3.js").then((u) => u.bc)
|
|
18421
18428
|
]), a = i.getMountedShadowPreviewHandle(e), c = f.pages.find(
|
|
18422
18429
|
(u) => u.id === e
|
|
18423
18430
|
);
|
package/dist-lib/testing.js
CHANGED
package/node/dev-mirror.mjs
CHANGED
|
@@ -556,7 +556,17 @@ export async function syncDevMirrorWorktree(options) {
|
|
|
556
556
|
let warning = null;
|
|
557
557
|
let switchTarget = null;
|
|
558
558
|
|
|
559
|
-
|
|
559
|
+
// A pinned commit must never move: that is the whole point of pinning, and
|
|
560
|
+
// fetching behind a designer's back would silently change what a captured
|
|
561
|
+
// frame means. A branch NAME is the opposite promise — asking for `dev` means
|
|
562
|
+
// "whatever dev is now", so it has to reach the remote first.
|
|
563
|
+
//
|
|
564
|
+
// Conflating the two made the consumer's "refresh branch" button re-read a
|
|
565
|
+
// local ref and never advance: it looked like the newest dev and was whatever
|
|
566
|
+
// the machine last happened to fetch.
|
|
567
|
+
const pinnedCommit = localRef != null && /^[0-9a-f]{7,40}$/i.test(localRef);
|
|
568
|
+
|
|
569
|
+
if (localRef && pinnedCommit) {
|
|
560
570
|
try {
|
|
561
571
|
switchTarget = await git(
|
|
562
572
|
repoRoot,
|
|
@@ -568,6 +578,35 @@ export async function syncDevMirrorWorktree(options) {
|
|
|
568
578
|
} catch {
|
|
569
579
|
throw new Error(`local source.ref "${localRef}" cannot be interpreted as a commit`);
|
|
570
580
|
}
|
|
581
|
+
} else if (localRef) {
|
|
582
|
+
// `origin/dev` and `dev` both mean the same branch here; strip the remote so
|
|
583
|
+
// the fetch names a branch and the result is read back from the remote ref.
|
|
584
|
+
const namedBranch = localRef.startsWith(`${remote}/`)
|
|
585
|
+
? localRef.slice(remote.length + 1)
|
|
586
|
+
: localRef;
|
|
587
|
+
const namedRemoteRef = `${remote}/${namedBranch}`;
|
|
588
|
+
try {
|
|
589
|
+
await git(repoRoot, 'fetch', remote, namedBranch);
|
|
590
|
+
switchTarget = namedRemoteRef;
|
|
591
|
+
} catch (error) {
|
|
592
|
+
// Offline is not fatal — fall back to whatever the ref resolves to
|
|
593
|
+
// locally, and say so rather than pretending the branch is current.
|
|
594
|
+
warning = `source.ref "${localRef}" could not be refreshed from ${remote}: ${
|
|
595
|
+
error instanceof Error ? error.message.split('\n')[0] : String(error)
|
|
596
|
+
}`;
|
|
597
|
+
options.onWarning?.(warning);
|
|
598
|
+
try {
|
|
599
|
+
switchTarget = await git(
|
|
600
|
+
repoRoot,
|
|
601
|
+
'rev-parse',
|
|
602
|
+
'--verify',
|
|
603
|
+
'--end-of-options',
|
|
604
|
+
`${localRef}^{commit}`,
|
|
605
|
+
);
|
|
606
|
+
} catch {
|
|
607
|
+
throw new Error(`local source.ref "${localRef}" cannot be interpreted as a commit`);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
571
610
|
} else {
|
|
572
611
|
try {
|
|
573
612
|
await git(repoRoot, 'fetch', remote, branch);
|