@pygmalionjs/pygmalion 0.5.9 → 0.5.10

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();
@@ -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-Bd6lSPb-.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-Bd6lSPb-.js";
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-Bd6lSPb-.js").then((E) => E.bb), j = T();
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-Bd6lSPb-.js").then((j) => j.ba);
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
- pointerEvents: u ? "auto" : "none",
3220
- cursor: u ? "move" : "default",
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-Bd6lSPb-.js").then((u) => u.bd),
18420
- import("./FrozenRoutePreview-Bd6lSPb-.js").then((u) => u.bc)
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
  );
@@ -1,4 +1,4 @@
1
- import { F as s, N as a, e as r, s as i, a as t } from "./FrozenRoutePreview-Bd6lSPb-.js";
1
+ import { F as s, N as a, e as r, s as i, a as t } from "./FrozenRoutePreview-BR5CBAD3.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.5.9",
3
+ "version": "0.5.10",
4
4
  "description": "Code-backed DOM design sandbox and visual QA editor",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {