@pygmalionjs/pygmalion 0.5.19 → 0.5.20
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/dist-lib/pygmalion.js
CHANGED
|
@@ -2,8 +2,8 @@ var fh = Object.defineProperty;
|
|
|
2
2
|
var hh = (e, t, n) => t in e ? fh(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var gn = (e, t, n) => hh(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { jsx as s, jsxs as g, Fragment as Ve } from "react/jsx-runtime";
|
|
5
|
-
import { R as oi, u as ph, c as Ca, b as sd, g as ct, d as mh, m as Lt, e as f, f as At, r as ln, h as Ns, i as Yn, j as Pa, k as wn, l as ad, n as vr, p as gh, o as hr, q as We, t as bh, v as xh, w as yh, x as vh, y as wh, z as Sh, A as Nh, B as Is, C as Ih, D as Ch, E as Ph, G as $h, H as Mh, I as Eh, S as kh, J as Ah, K as cd, L as Rh, M as Cs, O as Th, P as Fh, Q as Lh, T as _h, U as ld, V as Dh, W as Lc, X as zh, Y as dd, Z as Oh, _ as Bh, $ as jh, a0 as Wh, a1 as Hh, a2 as Uh, a3 as ud, a4 as Vh, a5 as Kh, a6 as Q, a7 as _c, a8 as Dc, a9 as qh, aa as ns, ab as Yh, ac as Vo, ad as Ps, ae as Gh, af as fd, ag as Xh, ah as Jh, ai as Qh, s as Zh, aj as hd, ak as pd, al as $s, am as md, an as ep, ao as tp, ap as zc, aq as np, ar as rp, as as Oc, at as op, au as ip, av as sp, aw as ap, ax as cp, ay as lp, az as dp, aA as up, aB as fp, aC as hp, aD as pp, aE as mp, a as gp, aF as bp, aG as xp, aH as yp, aI as vp, aJ as wp, aK as Sp, aL as Np, aM as Ip, aN as Cp, aO as Pp, aP as $p, aQ as Mp, aR as Wr, aS as Bc, aT as Ep, aU as kp, aV as Ap, aW as Rp, aX as jc } from "./FrozenRoutePreview-
|
|
6
|
-
import { aY as Y0, aZ as G0, a_ as X0, a$ as J0, b0 as Q0, b1 as Z0, b2 as e1, b3 as t1, b4 as n1, b5 as r1, b6 as o1, b7 as i1, b8 as s1, b9 as a1, ba as c1, bb as l1 } from "./FrozenRoutePreview-
|
|
5
|
+
import { R as oi, u as ph, c as Ca, b as sd, g as ct, d as mh, m as Lt, e as f, f as At, r as ln, h as Ns, i as Yn, j as Pa, k as wn, l as ad, n as vr, p as gh, o as hr, q as We, t as bh, v as xh, w as yh, x as vh, y as wh, z as Sh, A as Nh, B as Is, C as Ih, D as Ch, E as Ph, G as $h, H as Mh, I as Eh, S as kh, J as Ah, K as cd, L as Rh, M as Cs, O as Th, P as Fh, Q as Lh, T as _h, U as ld, V as Dh, W as Lc, X as zh, Y as dd, Z as Oh, _ as Bh, $ as jh, a0 as Wh, a1 as Hh, a2 as Uh, a3 as ud, a4 as Vh, a5 as Kh, a6 as Q, a7 as _c, a8 as Dc, a9 as qh, aa as ns, ab as Yh, ac as Vo, ad as Ps, ae as Gh, af as fd, ag as Xh, ah as Jh, ai as Qh, s as Zh, aj as hd, ak as pd, al as $s, am as md, an as ep, ao as tp, ap as zc, aq as np, ar as rp, as as Oc, at as op, au as ip, av as sp, aw as ap, ax as cp, ay as lp, az as dp, aA as up, aB as fp, aC as hp, aD as pp, aE as mp, a as gp, aF as bp, aG as xp, aH as yp, aI as vp, aJ as wp, aK as Sp, aL as Np, aM as Ip, aN as Cp, aO as Pp, aP as $p, aQ as Mp, aR as Wr, aS as Bc, aT as Ep, aU as kp, aV as Ap, aW as Rp, aX as jc } from "./FrozenRoutePreview-DdLO8y9P.js";
|
|
6
|
+
import { aY as Y0, aZ as G0, a_ as X0, a$ as J0, b0 as Q0, b1 as Z0, b2 as e1, b3 as t1, b4 as n1, b5 as r1, b6 as o1, b7 as i1, b8 as s1, b9 as a1, ba as c1, bb as l1 } from "./FrozenRoutePreview-DdLO8y9P.js";
|
|
7
7
|
import { useRef as $e, useLayoutEffect as ii, useSyncExternalStore as Ge, useCallback as Ct, useReducer as gd, useEffect as se, memo as bd, createElement as ao, useState as Z, useMemo as Ft } from "react";
|
|
8
8
|
import { createPortal as Tp } from "react-dom";
|
|
9
9
|
const $a = {
|
|
@@ -2660,14 +2660,14 @@ function Oi(e = {}) {
|
|
|
2660
2660
|
}
|
|
2661
2661
|
async function k(E, T) {
|
|
2662
2662
|
if (e.prepare) return e.prepare(E, T);
|
|
2663
|
-
const { getDesignImportController: W } = await import("./FrozenRoutePreview-
|
|
2663
|
+
const { getDesignImportController: W } = await import("./FrozenRoutePreview-DdLO8y9P.js").then((z) => z.bd), N = W();
|
|
2664
2664
|
if (!N)
|
|
2665
2665
|
throw new Error("The design import controller is not available.");
|
|
2666
2666
|
return N.prepareScreenCapture(E, T);
|
|
2667
2667
|
}
|
|
2668
2668
|
async function L(E, T) {
|
|
2669
2669
|
if (e.settle) return e.settle(E, T);
|
|
2670
|
-
const { settleScreen: W } = await import("./FrozenRoutePreview-
|
|
2670
|
+
const { settleScreen: W } = await import("./FrozenRoutePreview-DdLO8y9P.js").then((N) => N.bc);
|
|
2671
2671
|
return W(E, T);
|
|
2672
2672
|
}
|
|
2673
2673
|
async function j(E, T) {
|
|
@@ -18590,8 +18590,8 @@ const j0 = {
|
|
|
18590
18590
|
Promise.resolve().then(() => Js),
|
|
18591
18591
|
Promise.resolve().then(() => Jm),
|
|
18592
18592
|
Promise.resolve().then(() => Gp),
|
|
18593
|
-
import("./FrozenRoutePreview-
|
|
18594
|
-
import("./FrozenRoutePreview-
|
|
18593
|
+
import("./FrozenRoutePreview-DdLO8y9P.js").then((u) => u.bf),
|
|
18594
|
+
import("./FrozenRoutePreview-DdLO8y9P.js").then((u) => u.be)
|
|
18595
18595
|
]), a = i.getMountedShadowPreviewHandle(e), c = f.pages.find(
|
|
18596
18596
|
(u) => u.id === e
|
|
18597
18597
|
);
|
package/dist-lib/testing.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DomImportOptions, type DomImportResult } from './domImport';
|
|
2
2
|
import { type DocumentChurnEntry, type DocumentStabilityOptions } from './documentStability';
|
|
3
3
|
import type { DesignFrameHeightMode } from './frameHeight';
|
|
4
|
+
import { type ScreenLaneDef } from './frameLanes';
|
|
4
5
|
import type { ComponentRegistry } from './registry';
|
|
5
6
|
import type { TokenDef } from './tokens';
|
|
6
7
|
export declare const DESIGN_IMPORT_KINDS: readonly ["icons", "design-tokens", "atoms", "components", "screens"];
|
|
@@ -416,6 +417,26 @@ export interface DesignImportController {
|
|
|
416
417
|
runScreenInteractions(iframe: HTMLIFrameElement, interactions: readonly DesignScreenInteraction[]): Promise<DesignScreenInteractionReport>;
|
|
417
418
|
prepareScreenCapture(iframe: HTMLIFrameElement, spec: DesignScreenCaptureSpec): Promise<DesignScreenCaptureReport>;
|
|
418
419
|
}
|
|
420
|
+
/**
|
|
421
|
+
* Which canvas a screen belongs to.
|
|
422
|
+
*
|
|
423
|
+
* `section` gives a section its own canvas, which is what a journal's numbers
|
|
424
|
+
* already say. On a catalog where one section holds nineteen screens that is
|
|
425
|
+
* still a canvas nobody can take in at once, and every frame on it is supplied
|
|
426
|
+
* before the reader reaches the one they came for.
|
|
427
|
+
*
|
|
428
|
+
* `lane` goes one level further, and it needs no new declaration: a section's
|
|
429
|
+
* lanes are already the grouping a person made — the situations a journey
|
|
430
|
+
* passes through. Two to four screens each, so the canvas a reader activates
|
|
431
|
+
* is the one they are reading.
|
|
432
|
+
*
|
|
433
|
+
* A screen with no lane keeps its section's canvas rather than being collected
|
|
434
|
+
* into an "other" canvas that means nothing.
|
|
435
|
+
*/
|
|
436
|
+
export declare function screensCanvasName(page: {
|
|
437
|
+
section?: string;
|
|
438
|
+
lane?: string;
|
|
439
|
+
}, partition: CreateDesignImportOptions['screensCanvasPartition'], lanes?: readonly ScreenLaneDef[]): string;
|
|
419
440
|
export interface CreateDesignImportOptions {
|
|
420
441
|
/** Default budget for full layer mode. The host can explicitly increase it according to the screen size. */
|
|
421
442
|
layerOptions?: DomImportOptions;
|
|
@@ -429,7 +450,13 @@ export interface CreateDesignImportOptions {
|
|
|
429
450
|
* with a section instead of the whole catalog. Cross-canvas activation
|
|
430
451
|
* already switches canvases (EditorStore.switchPage).
|
|
431
452
|
*/
|
|
432
|
-
screensCanvasPartition?: 'single' | 'section';
|
|
453
|
+
screensCanvasPartition?: 'single' | 'section' | 'lane';
|
|
454
|
+
/**
|
|
455
|
+
* The lane declarations, for naming lane canvases. Passed rather than read
|
|
456
|
+
* from the registry because pages are built before the editor renders, and a
|
|
457
|
+
* canvas named at that moment cannot wait for a later registration.
|
|
458
|
+
*/
|
|
459
|
+
screenLanes?: readonly ScreenLaneDef[];
|
|
433
460
|
/**
|
|
434
461
|
* What the editor's own capture treats as movement, and how long it waits for
|
|
435
462
|
* the screen to stop. The Playwright capture answers the same question with
|
|
@@ -56,3 +56,8 @@ export interface DomImportResult {
|
|
|
56
56
|
export declare function importDomFromElement(el: Element, win: Window, opts?: DomImportOptions): DomImportResult | null;
|
|
57
57
|
/** Convert the body of the same-origin iframe to a node tree. null if cross-origin. */
|
|
58
58
|
export declare function importDomFromIframe(iframe: HTMLIFrameElement, opts?: DomImportOptions): DomImportResult | null;
|
|
59
|
+
/**
|
|
60
|
+
* Rewrites ids and their references in an imported tree so they cannot collide
|
|
61
|
+
* with another frame's. Returns the number of ids scoped.
|
|
62
|
+
*/
|
|
63
|
+
export declare function scopeImportedDomIds(root: NodeJSON, scope: string): number;
|