@pygmalionjs/pygmalion 0.6.17 → 0.6.19
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/{FrozenRoutePreview-BBgXrlKF.js → FrozenRoutePreview-B6UY1aLt.js} +323 -316
- package/dist-lib/pygmalion.js +6391 -6213
- package/dist-lib/testing.js +1 -1
- package/dist-lib/types/canvas/useFlowSession.d.ts +10 -2
- package/dist-lib/types/editor/designImport.d.ts +12 -2
- package/dist-lib/types/editor/flowSessionScheduler.d.ts +22 -3
- package/dist-lib/types/editor/flowSessions.d.ts +8 -1
- package/dist-lib/types/editor/interactiveSessionSurface.d.ts +18 -0
- package/dist-lib/types/editor/screenInteractions.d.ts +2 -2
- package/dist-lib/types/lib.d.ts +1 -1
- package/package.json +1 -1
|
@@ -374,7 +374,7 @@ function An(t, e) {
|
|
|
374
374
|
}
|
|
375
375
|
var E = /* @__PURE__ */ Symbol("mobx administration"), Fe = /* @__PURE__ */ (function() {
|
|
376
376
|
function t(n) {
|
|
377
|
-
n === void 0 && (n = process.env.NODE_ENV !== "production" ? "Atom@" + ae() : "Atom"), this.name_ = void 0, this.flags_ = 0, this.observers_ = /* @__PURE__ */ new Set(), this.lastAccessedBy_ = 0, this.lowestObserverState_ =
|
|
377
|
+
n === void 0 && (n = process.env.NODE_ENV !== "production" ? "Atom@" + ae() : "Atom"), this.name_ = void 0, this.flags_ = 0, this.observers_ = /* @__PURE__ */ new Set(), this.lastAccessedBy_ = 0, this.lowestObserverState_ = M.NOT_TRACKING_, this.onBOL = void 0, this.onBUOL = void 0, this.name_ = n;
|
|
378
378
|
}
|
|
379
379
|
var e = t.prototype;
|
|
380
380
|
return e.onBO = function() {
|
|
@@ -1007,7 +1007,7 @@ var Bc = "create", Ue = /* @__PURE__ */ (function(t) {
|
|
|
1007
1007
|
}, e;
|
|
1008
1008
|
})(Fe), U = /* @__PURE__ */ (function() {
|
|
1009
1009
|
function t(n) {
|
|
1010
|
-
this.dependenciesState_ =
|
|
1010
|
+
this.dependenciesState_ = M.NOT_TRACKING_, this.observing_ = [], this.newObserving_ = null, this.observers_ = /* @__PURE__ */ new Set(), this.runId_ = 0, this.lastAccessedBy_ = 0, this.lowestObserverState_ = M.UP_TO_DATE_, this.unboundDepsCount_ = 0, this.value_ = new cn(null), this.name_ = void 0, this.triggeredBy_ = void 0, this.flags_ = 0, this.derivation = void 0, this.setter_ = void 0, this.isTracing_ = se.NONE, this.scope_ = void 0, this.equals_ = void 0, this.requiresReaction_ = void 0, this.keepAlive_ = void 0, this.onBOL = void 0, this.onBUOL = void 0, n.get || w(31), this.derivation = n.get, this.name_ = n.name || (process.env.NODE_ENV !== "production" ? "ComputedValue@" + ae() : "ComputedValue"), n.set && (this.setter_ = qe(process.env.NODE_ENV !== "production" ? this.name_ + "-setter" : "ComputedValue-setter", n.set)), this.equals_ = n.equals || (n.compareStructural || n.struct ? We.structural : We.default), this.scope_ = n.context, this.requiresReaction_ = n.requiresReaction, this.keepAlive_ = !!n.keepAlive;
|
|
1011
1011
|
}
|
|
1012
1012
|
var e = t.prototype;
|
|
1013
1013
|
return e.onBecomeStale_ = function() {
|
|
@@ -1045,7 +1045,7 @@ var Bc = "create", Ue = /* @__PURE__ */ (function(t) {
|
|
|
1045
1045
|
}, e.trackAndCompute = function() {
|
|
1046
1046
|
var r = this.value_, i = (
|
|
1047
1047
|
/* see #1208 */
|
|
1048
|
-
this.dependenciesState_ ===
|
|
1048
|
+
this.dependenciesState_ === M.NOT_TRACKING_
|
|
1049
1049
|
), o = this.computeValue_(!0), s = i || Jt(r) || Jt(o) || !this.equals_(r, o);
|
|
1050
1050
|
return s && (this.value_ = o, process.env.NODE_ENV !== "production" && j() && Ye({
|
|
1051
1051
|
observableKind: "computed",
|
|
@@ -1143,10 +1143,10 @@ U.isRunningSetterMask_ = 2;
|
|
|
1143
1143
|
U.isBeingObservedMask_ = 4;
|
|
1144
1144
|
U.isPendingUnobservationMask_ = 8;
|
|
1145
1145
|
U.diffValueMask_ = 16;
|
|
1146
|
-
var Cn = /* @__PURE__ */ et("ComputedValue", U),
|
|
1146
|
+
var Cn = /* @__PURE__ */ et("ComputedValue", U), M;
|
|
1147
1147
|
(function(t) {
|
|
1148
1148
|
t[t.NOT_TRACKING_ = -1] = "NOT_TRACKING_", t[t.UP_TO_DATE_ = 0] = "UP_TO_DATE_", t[t.POSSIBLY_STALE_ = 1] = "POSSIBLY_STALE_", t[t.STALE_ = 2] = "STALE_";
|
|
1149
|
-
})(
|
|
1149
|
+
})(M || (M = {}));
|
|
1150
1150
|
var se;
|
|
1151
1151
|
(function(t) {
|
|
1152
1152
|
t[t.NONE = 0] = "NONE", t[t.LOG = 1] = "LOG", t[t.BREAK = 2] = "BREAK";
|
|
@@ -1159,12 +1159,12 @@ function Jt(t) {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
function hr(t) {
|
|
1161
1161
|
switch (t.dependenciesState_) {
|
|
1162
|
-
case
|
|
1162
|
+
case M.UP_TO_DATE_:
|
|
1163
1163
|
return !1;
|
|
1164
|
-
case
|
|
1165
|
-
case
|
|
1164
|
+
case M.NOT_TRACKING_:
|
|
1165
|
+
case M.STALE_:
|
|
1166
1166
|
return !0;
|
|
1167
|
-
case
|
|
1167
|
+
case M.POSSIBLY_STALE_: {
|
|
1168
1168
|
for (var e = Vr(!0), n = tt(), r = t.observing_, i = r.length, o = 0; o < i; o++) {
|
|
1169
1169
|
var s = r[o];
|
|
1170
1170
|
if (Cn(s)) {
|
|
@@ -1176,7 +1176,7 @@ function hr(t) {
|
|
|
1176
1176
|
} catch {
|
|
1177
1177
|
return Me(n), Ot(e), !0;
|
|
1178
1178
|
}
|
|
1179
|
-
if (t.dependenciesState_ ===
|
|
1179
|
+
if (t.dependenciesState_ === M.STALE_)
|
|
1180
1180
|
return Me(n), Ot(e), !0;
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
@@ -1217,7 +1217,7 @@ function Kc(t) {
|
|
|
1217
1217
|
process.env.NODE_ENV !== "production" && t.observing_.length === 0 && (typeof t.requiresObservable_ == "boolean" ? t.requiresObservable_ : b.reactionRequiresObservable) && console.warn("[mobx] Derivation '" + t.name_ + "' is created/updated without reading any observable value.");
|
|
1218
1218
|
}
|
|
1219
1219
|
function Uc(t) {
|
|
1220
|
-
for (var e = t.observing_, n = t.observing_ = t.newObserving_, r =
|
|
1220
|
+
for (var e = t.observing_, n = t.observing_ = t.newObserving_, r = M.UP_TO_DATE_, i = 0, o = t.unboundDepsCount_, s = 0; s < o; s++) {
|
|
1221
1221
|
var a = n[s];
|
|
1222
1222
|
a.diffValue === 0 && (a.diffValue = 1, i !== s && (n[i] = a), i++), a.dependenciesState_ > r && (r = a.dependenciesState_);
|
|
1223
1223
|
}
|
|
@@ -1229,14 +1229,14 @@ function Uc(t) {
|
|
|
1229
1229
|
var u = n[i];
|
|
1230
1230
|
u.diffValue === 1 && (u.diffValue = 0, Yc(u, t));
|
|
1231
1231
|
}
|
|
1232
|
-
r !==
|
|
1232
|
+
r !== M.UP_TO_DATE_ && (t.dependenciesState_ = r, t.onBecomeStale_());
|
|
1233
1233
|
}
|
|
1234
1234
|
function pr(t) {
|
|
1235
1235
|
var e = t.observing_;
|
|
1236
1236
|
t.observing_ = [];
|
|
1237
1237
|
for (var n = e.length; n--; )
|
|
1238
1238
|
jo(e[n], t);
|
|
1239
|
-
t.dependenciesState_ =
|
|
1239
|
+
t.dependenciesState_ = M.NOT_TRACKING_;
|
|
1240
1240
|
}
|
|
1241
1241
|
function Lo(t) {
|
|
1242
1242
|
var e = tt();
|
|
@@ -1261,10 +1261,10 @@ function Ot(t) {
|
|
|
1261
1261
|
b.allowStateReads = t;
|
|
1262
1262
|
}
|
|
1263
1263
|
function Fo(t) {
|
|
1264
|
-
if (t.dependenciesState_ !==
|
|
1265
|
-
t.dependenciesState_ =
|
|
1264
|
+
if (t.dependenciesState_ !== M.UP_TO_DATE_) {
|
|
1265
|
+
t.dependenciesState_ = M.UP_TO_DATE_;
|
|
1266
1266
|
for (var e = t.observing_, n = e.length; n--; )
|
|
1267
|
-
e[n].lowestObserverState_ =
|
|
1267
|
+
e[n].lowestObserverState_ = M.UP_TO_DATE_;
|
|
1268
1268
|
}
|
|
1269
1269
|
}
|
|
1270
1270
|
var Xt = function() {
|
|
@@ -1315,18 +1315,18 @@ function Vo(t) {
|
|
|
1315
1315
|
return e !== null ? (e.runId_ !== t.lastAccessedBy_ && (t.lastAccessedBy_ = e.runId_, e.newObserving_[e.unboundDepsCount_++] = t, !t.isBeingObserved && b.trackingContext && (t.isBeingObserved = !0, t.onBO())), t.isBeingObserved) : (t.observers_.size === 0 && b.inBatch > 0 && zo(t), !1);
|
|
1316
1316
|
}
|
|
1317
1317
|
function Bo(t) {
|
|
1318
|
-
t.lowestObserverState_ !==
|
|
1319
|
-
e.dependenciesState_ ===
|
|
1318
|
+
t.lowestObserverState_ !== M.STALE_ && (t.lowestObserverState_ = M.STALE_, t.observers_.forEach(function(e) {
|
|
1319
|
+
e.dependenciesState_ === M.UP_TO_DATE_ && (process.env.NODE_ENV !== "production" && e.isTracing_ !== se.NONE && Ho(e, t), e.onBecomeStale_()), e.dependenciesState_ = M.STALE_;
|
|
1320
1320
|
}));
|
|
1321
1321
|
}
|
|
1322
1322
|
function Jc(t) {
|
|
1323
|
-
t.lowestObserverState_ !==
|
|
1324
|
-
e.dependenciesState_ ===
|
|
1323
|
+
t.lowestObserverState_ !== M.STALE_ && (t.lowestObserverState_ = M.STALE_, t.observers_.forEach(function(e) {
|
|
1324
|
+
e.dependenciesState_ === M.POSSIBLY_STALE_ ? (e.dependenciesState_ = M.STALE_, process.env.NODE_ENV !== "production" && e.isTracing_ !== se.NONE && Ho(e, t)) : e.dependenciesState_ === M.UP_TO_DATE_ && (t.lowestObserverState_ = M.UP_TO_DATE_);
|
|
1325
1325
|
}));
|
|
1326
1326
|
}
|
|
1327
1327
|
function Xc(t) {
|
|
1328
|
-
t.lowestObserverState_ ===
|
|
1329
|
-
e.dependenciesState_ ===
|
|
1328
|
+
t.lowestObserverState_ === M.UP_TO_DATE_ && (t.lowestObserverState_ = M.POSSIBLY_STALE_, t.observers_.forEach(function(e) {
|
|
1329
|
+
e.dependenciesState_ === M.UP_TO_DATE_ && (e.dependenciesState_ = M.POSSIBLY_STALE_, e.onBecomeStale_());
|
|
1330
1330
|
}));
|
|
1331
1331
|
}
|
|
1332
1332
|
function Ho(t, e) {
|
|
@@ -1361,7 +1361,7 @@ function Ko(t, e, n) {
|
|
|
1361
1361
|
}
|
|
1362
1362
|
var Oe = /* @__PURE__ */ (function() {
|
|
1363
1363
|
function t(n, r, i, o) {
|
|
1364
|
-
n === void 0 && (n = process.env.NODE_ENV !== "production" ? "Reaction@" + ae() : "Reaction"), this.name_ = void 0, this.onInvalidate_ = void 0, this.errorHandler_ = void 0, this.requiresObservable_ = void 0, this.observing_ = [], this.newObserving_ = [], this.dependenciesState_ =
|
|
1364
|
+
n === void 0 && (n = process.env.NODE_ENV !== "production" ? "Reaction@" + ae() : "Reaction"), this.name_ = void 0, this.onInvalidate_ = void 0, this.errorHandler_ = void 0, this.requiresObservable_ = void 0, this.observing_ = [], this.newObserving_ = [], this.dependenciesState_ = M.NOT_TRACKING_, this.runId_ = 0, this.unboundDepsCount_ = 0, this.flags_ = 0, this.isTracing_ = se.NONE, this.name_ = n, this.onInvalidate_ = r, this.errorHandler_ = i, this.requiresObservable_ = o;
|
|
1365
1365
|
}
|
|
1366
1366
|
var e = t.prototype;
|
|
1367
1367
|
return e.onBecomeStale_ = function() {
|
|
@@ -1611,10 +1611,10 @@ function uu(t, e, n) {
|
|
|
1611
1611
|
if (d = !1, !g.isDisposed) {
|
|
1612
1612
|
var m = !1, S = f;
|
|
1613
1613
|
g.track(function() {
|
|
1614
|
-
var
|
|
1614
|
+
var y = Vc(!1, function() {
|
|
1615
1615
|
return t(g);
|
|
1616
1616
|
});
|
|
1617
|
-
m = l || !h(f,
|
|
1617
|
+
m = l || !h(f, y), f = y;
|
|
1618
1618
|
}), (l && n.fireImmediately || !l && m) && a(f, S, g), l = !1;
|
|
1619
1619
|
}
|
|
1620
1620
|
}
|
|
@@ -1715,30 +1715,30 @@ var bu = 0, yu = /* @__PURE__ */ (function(t) {
|
|
|
1715
1715
|
d = p;
|
|
1716
1716
|
function S(O) {
|
|
1717
1717
|
f = void 0;
|
|
1718
|
-
var
|
|
1718
|
+
var A;
|
|
1719
1719
|
try {
|
|
1720
|
-
|
|
1721
|
-
} catch (
|
|
1722
|
-
return p(
|
|
1720
|
+
A = He(i + " - runid: " + u + " - yield " + m++, l.next).call(l, O);
|
|
1721
|
+
} catch (x) {
|
|
1722
|
+
return p(x);
|
|
1723
1723
|
}
|
|
1724
|
-
|
|
1724
|
+
_(A);
|
|
1725
1725
|
}
|
|
1726
|
-
function
|
|
1726
|
+
function y(O) {
|
|
1727
1727
|
f = void 0;
|
|
1728
|
-
var
|
|
1728
|
+
var A;
|
|
1729
1729
|
try {
|
|
1730
|
-
|
|
1731
|
-
} catch (
|
|
1732
|
-
return p(
|
|
1730
|
+
A = He(i + " - runid: " + u + " - yield " + m++, l.throw).call(l, O);
|
|
1731
|
+
} catch (x) {
|
|
1732
|
+
return p(x);
|
|
1733
1733
|
}
|
|
1734
|
-
|
|
1734
|
+
_(A);
|
|
1735
1735
|
}
|
|
1736
|
-
function
|
|
1736
|
+
function _(O) {
|
|
1737
1737
|
if ($(O == null ? void 0 : O.then)) {
|
|
1738
|
-
O.then(
|
|
1738
|
+
O.then(_, p);
|
|
1739
1739
|
return;
|
|
1740
1740
|
}
|
|
1741
|
-
return O.done ? g(O.value) : (f = Promise.resolve(O.value), f.then(S,
|
|
1741
|
+
return O.done ? g(O.value) : (f = Promise.resolve(O.value), f.then(S, y));
|
|
1742
1742
|
}
|
|
1743
1743
|
S(void 0);
|
|
1744
1744
|
});
|
|
@@ -2355,22 +2355,22 @@ var Pu = {}, De = "add", dn = "delete", os = /* @__PURE__ */ (function() {
|
|
|
2355
2355
|
}
|
|
2356
2356
|
}
|
|
2357
2357
|
for (var h = ct(o.entries()), g; !(g = h()).done; ) {
|
|
2358
|
-
var p = g.value, m = p[0], S = p[1],
|
|
2358
|
+
var p = g.value, m = p[0], S = p[1], y = i.data_.has(m);
|
|
2359
2359
|
if (i.set(m, S), i.data_.has(m)) {
|
|
2360
|
-
var
|
|
2361
|
-
s.set(m,
|
|
2360
|
+
var _ = i.data_.get(m);
|
|
2361
|
+
s.set(m, _), y || (a = !0);
|
|
2362
2362
|
}
|
|
2363
2363
|
}
|
|
2364
2364
|
if (!a)
|
|
2365
2365
|
if (i.data_.size !== s.size)
|
|
2366
2366
|
i.keysAtom_.reportChanged();
|
|
2367
2367
|
else
|
|
2368
|
-
for (var O = i.data_.keys(),
|
|
2369
|
-
if (
|
|
2368
|
+
for (var O = i.data_.keys(), A = s.keys(), x = O.next(), P = A.next(); !x.done; ) {
|
|
2369
|
+
if (x.value !== P.value) {
|
|
2370
2370
|
i.keysAtom_.reportChanged();
|
|
2371
2371
|
break;
|
|
2372
2372
|
}
|
|
2373
|
-
|
|
2373
|
+
x = O.next(), P = A.next();
|
|
2374
2374
|
}
|
|
2375
2375
|
i.data_ = s;
|
|
2376
2376
|
}), this;
|
|
@@ -3275,16 +3275,16 @@ function Ju() {
|
|
|
3275
3275
|
m = s({
|
|
3276
3276
|
inst: { value: p, getSnapshot: g }
|
|
3277
3277
|
});
|
|
3278
|
-
var S = m[0].inst,
|
|
3278
|
+
var S = m[0].inst, y = m[1];
|
|
3279
3279
|
return c(
|
|
3280
3280
|
function() {
|
|
3281
|
-
S.value = p, S.getSnapshot = g, n(S) &&
|
|
3281
|
+
S.value = p, S.getSnapshot = g, n(S) && y({ inst: S });
|
|
3282
3282
|
},
|
|
3283
3283
|
[h, p, g]
|
|
3284
3284
|
), a(
|
|
3285
3285
|
function() {
|
|
3286
|
-
return n(S) &&
|
|
3287
|
-
n(S) &&
|
|
3286
|
+
return n(S) && y({ inst: S }), h(function() {
|
|
3287
|
+
n(S) && y({ inst: S });
|
|
3288
3288
|
});
|
|
3289
3289
|
},
|
|
3290
3290
|
[h]
|
|
@@ -4810,7 +4810,7 @@ function qi(t, e = {}) {
|
|
|
4810
4810
|
Math.min(i, c)
|
|
4811
4811
|
);
|
|
4812
4812
|
if (o.length > 1) {
|
|
4813
|
-
const p = o.map((S) => S.width).sort((S,
|
|
4813
|
+
const p = o.map((S) => S.width).sort((S, y) => y - S), m = p[0] + n + p[1];
|
|
4814
4814
|
m <= i && (u = Math.max(u, m));
|
|
4815
4815
|
}
|
|
4816
4816
|
const l = [];
|
|
@@ -4851,29 +4851,29 @@ function Jl(t, e = {}) {
|
|
|
4851
4851
|
{ length: f },
|
|
4852
4852
|
() => ({ width: 0, height: 0, frames: [] })
|
|
4853
4853
|
);
|
|
4854
|
-
s.forEach((
|
|
4854
|
+
s.forEach((x, P) => {
|
|
4855
4855
|
let D = 0;
|
|
4856
4856
|
for (let V = 1; V < h.length; V += 1)
|
|
4857
4857
|
h[V].height < h[D].height && (D = V);
|
|
4858
4858
|
const k = h[D], z = k.frames.length === 0 ? 0 : k.height + n;
|
|
4859
|
-
k.frames.push({ index:
|
|
4859
|
+
k.frames.push({ index: P, y: z }), k.width = Math.max(k.width, x.width), k.height = z + x.height;
|
|
4860
4860
|
});
|
|
4861
|
-
const g = h.reduce((
|
|
4861
|
+
const g = h.reduce((x, P) => x + P.width, 0) + n * Math.max(0, h.length - 1);
|
|
4862
4862
|
if (g > o && f > 1) continue;
|
|
4863
|
-
const p = Math.max(...h.map((
|
|
4863
|
+
const p = Math.max(...h.map((x) => x.height)), m = Array.from({ length: s.length });
|
|
4864
4864
|
let S = 0;
|
|
4865
|
-
for (const
|
|
4866
|
-
for (const
|
|
4867
|
-
m[
|
|
4868
|
-
...s[
|
|
4865
|
+
for (const x of h) {
|
|
4866
|
+
for (const P of x.frames)
|
|
4867
|
+
m[P.index] = {
|
|
4868
|
+
...s[P.index],
|
|
4869
4869
|
x: S,
|
|
4870
|
-
y:
|
|
4870
|
+
y: P.y
|
|
4871
4871
|
};
|
|
4872
|
-
S +=
|
|
4872
|
+
S += x.width + n;
|
|
4873
4873
|
}
|
|
4874
|
-
const
|
|
4875
|
-
Math.log(
|
|
4876
|
-
),
|
|
4874
|
+
const y = Math.max(1, g * p), _ = g / Math.max(1, p), O = Math.abs(
|
|
4875
|
+
Math.log(_ / r)
|
|
4876
|
+
), A = Math.max(0, 1 - a / y);
|
|
4877
4877
|
c.push({
|
|
4878
4878
|
frames: m,
|
|
4879
4879
|
width: g,
|
|
@@ -4882,7 +4882,7 @@ function Jl(t, e = {}) {
|
|
|
4882
4882
|
columnCount: f,
|
|
4883
4883
|
// Empty-space cost stops a wide row of one-sheet columns from winning
|
|
4884
4884
|
// solely because it happens to match the target aspect ratio.
|
|
4885
|
-
score: O +
|
|
4885
|
+
score: O + A * 1.2
|
|
4886
4886
|
});
|
|
4887
4887
|
}
|
|
4888
4888
|
const u = c.reduce(
|
|
@@ -5530,7 +5530,7 @@ function Kp(t, e) {
|
|
|
5530
5530
|
}
|
|
5531
5531
|
for (const [p, m] of Object.entries(f.props)) {
|
|
5532
5532
|
const S = (o = h.props) == null ? void 0 : o[p];
|
|
5533
|
-
(!S || !S.some((
|
|
5533
|
+
(!S || !S.some((y) => Object.is(y, m))) && n.push({
|
|
5534
5534
|
severity: "error",
|
|
5535
5535
|
cardId: s.id,
|
|
5536
5536
|
message: `option "${f.label}" sets ${p}=${JSON.stringify(m)} outside the adapter's vocabulary`
|
|
@@ -6108,8 +6108,8 @@ function qs(t, e, n, r, i, o, s) {
|
|
|
6108
6108
|
sourceProps: Sr(
|
|
6109
6109
|
t.getAttribute("data-pygmalion-own-props")
|
|
6110
6110
|
)
|
|
6111
|
-
},
|
|
6112
|
-
if (p && (g === "collapse" ||
|
|
6111
|
+
}, y = p != null && g === "expand" && ((V = o.collapseInstance) == null ? void 0 : V.call(o, p)) === !0 && !Yd(t, o) && Gd(t, p) && !qd(t);
|
|
6112
|
+
if (p && (g === "collapse" || y))
|
|
6113
6113
|
return Gt("component", {
|
|
6114
6114
|
name: p.name,
|
|
6115
6115
|
componentName: p.name,
|
|
@@ -6121,10 +6121,10 @@ function qs(t, e, n, r, i, o, s) {
|
|
|
6121
6121
|
...S,
|
|
6122
6122
|
...Qi(f, e, l.display, h)
|
|
6123
6123
|
});
|
|
6124
|
-
const
|
|
6124
|
+
const _ = Ud(t, u, p == null ? void 0 : p.name);
|
|
6125
6125
|
if (Rd.has(u) && (o.mediaMode ?? "placeholder") === "placeholder")
|
|
6126
6126
|
return Gt("rows", {
|
|
6127
|
-
name:
|
|
6127
|
+
name: _,
|
|
6128
6128
|
widthMode: "fixed",
|
|
6129
6129
|
width: Math.max(4, Math.round(f.width / h)),
|
|
6130
6130
|
heightMode: "fixed",
|
|
@@ -6137,13 +6137,13 @@ function qs(t, e, n, r, i, o, s) {
|
|
|
6137
6137
|
domStyle: Gn(l),
|
|
6138
6138
|
...S
|
|
6139
6139
|
});
|
|
6140
|
-
const O = l.display === "flex" || l.display === "inline-flex",
|
|
6140
|
+
const O = l.display === "flex" || l.display === "inline-flex", A = O && l.flexDirection.startsWith("row") ? "columns" : "rows", x = Ae(A === "columns" ? l.columnGap : l.rowGap), P = Math.round(
|
|
6141
6141
|
(Ae(l.paddingTop) + Ae(l.paddingRight) + Ae(l.paddingBottom) + Ae(l.paddingLeft)) / 4
|
|
6142
|
-
), D = Ae(l.borderTopWidth), k = Gt(
|
|
6143
|
-
name:
|
|
6142
|
+
), D = Ae(l.borderTopWidth), k = Gt(A, {
|
|
6143
|
+
name: _,
|
|
6144
6144
|
...Qi(f, e, l.display, h),
|
|
6145
|
-
gap: Number.isFinite(
|
|
6146
|
-
padding:
|
|
6145
|
+
gap: Number.isFinite(x) ? x : 0,
|
|
6146
|
+
padding: P,
|
|
6147
6147
|
justify: O ? jd[l.justifyContent] ?? "start" : "start",
|
|
6148
6148
|
alignItems: O ? zd[l.alignItems] ?? "start" : "start",
|
|
6149
6149
|
fill: Kn(l.backgroundColor),
|
|
@@ -6182,17 +6182,17 @@ function qs(t, e, n, r, i, o, s) {
|
|
|
6182
6182
|
break;
|
|
6183
6183
|
}
|
|
6184
6184
|
if (Ce.nodeType === Node.TEXT_NODE) {
|
|
6185
|
-
const
|
|
6186
|
-
if (!
|
|
6185
|
+
const N = (Ce.textContent ?? "").replace(/\s+/g, " ").trim();
|
|
6186
|
+
if (!N) continue;
|
|
6187
6187
|
if (r.count += 1, r.maxDepth = Math.max(r.maxDepth, n + 1), typeof ((vt = t.ownerDocument) == null ? void 0 : vt.createRange) == "function")
|
|
6188
6188
|
try {
|
|
6189
6189
|
const ze = t.ownerDocument.createRange();
|
|
6190
6190
|
ze.selectNodeContents(Ce);
|
|
6191
|
-
const
|
|
6192
|
-
(
|
|
6191
|
+
const I = ze.getBoundingClientRect();
|
|
6192
|
+
(I.width >= 1 || I.height >= 1) && Zi(
|
|
6193
6193
|
r,
|
|
6194
6194
|
[...s, k.children.length],
|
|
6195
|
-
|
|
6195
|
+
I,
|
|
6196
6196
|
h
|
|
6197
6197
|
);
|
|
6198
6198
|
} catch {
|
|
@@ -6200,7 +6200,7 @@ function qs(t, e, n, r, i, o, s) {
|
|
|
6200
6200
|
k.children.push(
|
|
6201
6201
|
Gt("text", {
|
|
6202
6202
|
name: "text",
|
|
6203
|
-
text:
|
|
6203
|
+
text: N,
|
|
6204
6204
|
fontSize: Ae(l.fontSize) || 14,
|
|
6205
6205
|
fontWeight: Number(l.fontWeight) || 400,
|
|
6206
6206
|
color: Kn(l.color) || "#191f28",
|
|
@@ -6209,11 +6209,11 @@ function qs(t, e, n, r, i, o, s) {
|
|
|
6209
6209
|
})
|
|
6210
6210
|
);
|
|
6211
6211
|
} else if (Ce.nodeType === Node.ELEMENT_NODE) {
|
|
6212
|
-
const
|
|
6212
|
+
const N = qs(Ce, f, n + 1, r, i, o, [
|
|
6213
6213
|
...s,
|
|
6214
6214
|
k.children.length
|
|
6215
6215
|
]);
|
|
6216
|
-
|
|
6216
|
+
N && k.children.push(N);
|
|
6217
6217
|
}
|
|
6218
6218
|
}
|
|
6219
6219
|
return k;
|
|
@@ -6828,129 +6828,132 @@ async function Xn(t, e, n) {
|
|
|
6828
6828
|
} while (!0);
|
|
6829
6829
|
return null;
|
|
6830
6830
|
}
|
|
6831
|
-
async function Nr(t, e) {
|
|
6832
|
-
let
|
|
6833
|
-
const
|
|
6831
|
+
async function Nr(t, e, n = {}) {
|
|
6832
|
+
let r = 0;
|
|
6833
|
+
const i = [];
|
|
6834
6834
|
try {
|
|
6835
|
-
const
|
|
6836
|
-
|
|
6835
|
+
const o = t.contentDocument;
|
|
6836
|
+
o && qt(o, []);
|
|
6837
6837
|
} catch {
|
|
6838
6838
|
}
|
|
6839
|
-
for (const
|
|
6840
|
-
if (
|
|
6841
|
-
if ((
|
|
6839
|
+
for (const o of e) {
|
|
6840
|
+
if (o.action === "wait") {
|
|
6841
|
+
if ((o.selector || o.text) && !await Xn(
|
|
6842
6842
|
t,
|
|
6843
|
-
|
|
6844
|
-
|
|
6843
|
+
o,
|
|
6844
|
+
o.waitState ?? "visible"
|
|
6845
6845
|
)) {
|
|
6846
|
-
if (
|
|
6846
|
+
if (o.optional) continue;
|
|
6847
6847
|
return {
|
|
6848
6848
|
complete: !1,
|
|
6849
|
-
completed:
|
|
6849
|
+
completed: r,
|
|
6850
6850
|
total: e.length,
|
|
6851
|
-
failedLabel:
|
|
6852
|
-
error: `"${
|
|
6851
|
+
failedLabel: o.label,
|
|
6852
|
+
error: `"${o.label}"I waited for the screen status of the step, but it did not appear.`
|
|
6853
6853
|
};
|
|
6854
6854
|
}
|
|
6855
|
-
await Ke(t,
|
|
6855
|
+
await Ke(t, o.settleMs ?? Number(o.value ?? 500)), r += 1;
|
|
6856
6856
|
continue;
|
|
6857
6857
|
}
|
|
6858
|
-
if (
|
|
6858
|
+
if (o.action === "storage") {
|
|
6859
6859
|
try {
|
|
6860
|
-
const
|
|
6861
|
-
if (!
|
|
6862
|
-
|
|
6860
|
+
const c = t.contentWindow, u = o.storage === "session" ? c == null ? void 0 : c.sessionStorage : c == null ? void 0 : c.localStorage;
|
|
6861
|
+
if (!u || !o.key) throw new Error("storage context unavailable");
|
|
6862
|
+
o.value == null ? u.removeItem(o.key) : u.setItem(o.key, o.value);
|
|
6863
6863
|
} catch {
|
|
6864
|
-
if (
|
|
6864
|
+
if (o.optional) continue;
|
|
6865
6865
|
return {
|
|
6866
6866
|
complete: !1,
|
|
6867
|
-
completed:
|
|
6867
|
+
completed: r,
|
|
6868
6868
|
total: e.length,
|
|
6869
|
-
failedLabel:
|
|
6870
|
-
error: `"${
|
|
6869
|
+
failedLabel: o.label,
|
|
6870
|
+
error: `"${o.label}"Failed to access the app store in step.`
|
|
6871
6871
|
};
|
|
6872
6872
|
}
|
|
6873
|
-
|
|
6873
|
+
r += 1, await Ke(t, o.settleMs ?? 50);
|
|
6874
6874
|
continue;
|
|
6875
6875
|
}
|
|
6876
|
-
if (
|
|
6877
|
-
let
|
|
6876
|
+
if (o.action === "scroll") {
|
|
6877
|
+
let c = null;
|
|
6878
6878
|
try {
|
|
6879
|
-
|
|
6879
|
+
c = t.contentDocument;
|
|
6880
6880
|
} catch {
|
|
6881
|
-
|
|
6881
|
+
c = null;
|
|
6882
6882
|
}
|
|
6883
|
-
const
|
|
6884
|
-
if (!
|
|
6885
|
-
if (
|
|
6883
|
+
const u = c && (o.selector || o.text) ? await Xn(t, o, "attached") : null;
|
|
6884
|
+
if (!c || (o.selector || o.text) && !u || !mf(c, u, o)) {
|
|
6885
|
+
if (o.optional) continue;
|
|
6886
6886
|
return {
|
|
6887
6887
|
complete: !1,
|
|
6888
|
-
completed:
|
|
6888
|
+
completed: r,
|
|
6889
6889
|
total: e.length,
|
|
6890
|
-
failedLabel:
|
|
6891
|
-
error: `"${
|
|
6890
|
+
failedLabel: o.label,
|
|
6891
|
+
error: `"${o.label}" scroll target was not found.`
|
|
6892
6892
|
};
|
|
6893
6893
|
}
|
|
6894
|
-
|
|
6894
|
+
r += 1, await Ke(t, o.settleMs ?? 100);
|
|
6895
6895
|
continue;
|
|
6896
6896
|
}
|
|
6897
|
-
const
|
|
6898
|
-
if (!
|
|
6899
|
-
if (
|
|
6897
|
+
const s = await Xn(t, o, "actionable");
|
|
6898
|
+
if (!s) {
|
|
6899
|
+
if (o.optional) continue;
|
|
6900
6900
|
return {
|
|
6901
6901
|
complete: !1,
|
|
6902
|
-
completed:
|
|
6902
|
+
completed: r,
|
|
6903
6903
|
total: e.length,
|
|
6904
|
-
failedLabel:
|
|
6905
|
-
error: `"${
|
|
6904
|
+
failedLabel: o.label,
|
|
6905
|
+
error: `"${o.label}"The screen element for the step was not found or actionable.`
|
|
6906
6906
|
};
|
|
6907
6907
|
}
|
|
6908
|
-
const
|
|
6909
|
-
if (!
|
|
6908
|
+
const a = s.ownerDocument.defaultView;
|
|
6909
|
+
if (!a)
|
|
6910
6910
|
return {
|
|
6911
6911
|
complete: !1,
|
|
6912
|
-
completed:
|
|
6912
|
+
completed: r,
|
|
6913
6913
|
total: e.length,
|
|
6914
|
-
failedLabel:
|
|
6915
|
-
error: `"${
|
|
6914
|
+
failedLabel: o.label,
|
|
6915
|
+
error: `"${o.label}"Failed to read the screen context for the step.`
|
|
6916
6916
|
};
|
|
6917
|
-
if (
|
|
6918
|
-
so(
|
|
6919
|
-
else if (
|
|
6920
|
-
|
|
6921
|
-
else if (
|
|
6922
|
-
Qs(
|
|
6923
|
-
else if (
|
|
6924
|
-
|
|
6925
|
-
else if (
|
|
6926
|
-
hf(
|
|
6927
|
-
else if (
|
|
6928
|
-
if (!(
|
|
6917
|
+
if (o.action === "click")
|
|
6918
|
+
so(s, a);
|
|
6919
|
+
else if (o.action === "focus")
|
|
6920
|
+
s.focus({ preventScroll: !0 });
|
|
6921
|
+
else if (o.action === "hover")
|
|
6922
|
+
Qs(s, a), i.push(o), qt(s.ownerDocument, i);
|
|
6923
|
+
else if (o.action === "focus-visible")
|
|
6924
|
+
s.focus({ preventScroll: !0 }), i.push(o), qt(s.ownerDocument, i);
|
|
6925
|
+
else if (o.action === "active")
|
|
6926
|
+
hf(s, a), i.push(o), qt(s.ownerDocument, i);
|
|
6927
|
+
else if (o.action === "fill") {
|
|
6928
|
+
if (!(s instanceof a.HTMLInputElement || s instanceof a.HTMLTextAreaElement))
|
|
6929
6929
|
return {
|
|
6930
6930
|
complete: !1,
|
|
6931
|
-
completed:
|
|
6931
|
+
completed: r,
|
|
6932
6932
|
total: e.length,
|
|
6933
|
-
failedLabel:
|
|
6934
|
-
error: `"${
|
|
6933
|
+
failedLabel: o.label,
|
|
6934
|
+
error: `"${o.label}"Step is not an input element.`
|
|
6935
6935
|
};
|
|
6936
|
-
pf(
|
|
6937
|
-
} else if (
|
|
6938
|
-
if (!(
|
|
6936
|
+
pf(s, o.value ?? "");
|
|
6937
|
+
} else if (o.action === "check") {
|
|
6938
|
+
if (!(s instanceof a.HTMLInputElement))
|
|
6939
6939
|
return {
|
|
6940
6940
|
complete: !1,
|
|
6941
|
-
completed:
|
|
6941
|
+
completed: r,
|
|
6942
6942
|
total: e.length,
|
|
6943
|
-
failedLabel:
|
|
6944
|
-
error: `"${
|
|
6943
|
+
failedLabel: o.label,
|
|
6944
|
+
error: `"${o.label}"The step is not a checked element.`
|
|
6945
6945
|
};
|
|
6946
|
-
|
|
6946
|
+
s.checked || so(s, a);
|
|
6947
6947
|
} else {
|
|
6948
|
-
const
|
|
6949
|
-
|
|
6948
|
+
const c = o.key ?? o.value ?? "Enter";
|
|
6949
|
+
s.dispatchEvent(new a.KeyboardEvent("keydown", { key: c, bubbles: !0 })), s.dispatchEvent(new a.KeyboardEvent("keyup", { key: c, bubbles: !0 }));
|
|
6950
6950
|
}
|
|
6951
|
-
|
|
6951
|
+
r += 1, await Ke(
|
|
6952
|
+
t,
|
|
6953
|
+
o.settleMs ?? n.defaultActionSettleMs ?? 600
|
|
6954
|
+
);
|
|
6952
6955
|
}
|
|
6953
|
-
return { complete: !0, completed:
|
|
6956
|
+
return { complete: !0, completed: r, total: e.length };
|
|
6954
6957
|
}
|
|
6955
6958
|
const Qp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6956
6959
|
__proto__: null,
|
|
@@ -7055,25 +7058,25 @@ function _f(t, e, n = {}) {
|
|
|
7055
7058
|
for (const p of e)
|
|
7056
7059
|
for (const m of t.pages) {
|
|
7057
7060
|
if (((l = n.include) == null ? void 0 : l.call(n, m, p)) === !1) continue;
|
|
7058
|
-
const S = (d = n.transformPage) == null ? void 0 : d.call(n, m, p),
|
|
7061
|
+
const S = (d = n.transformPage) == null ? void 0 : d.call(n, m, p), y = ((f = n.createPageId) == null ? void 0 : f.call(n, m, p)) ?? `${m.id}:viewport:${p.id}`, _ = ((h = n.createPageName) == null ? void 0 : h.call(n, m, p)) ?? `${m.name} · ${p.label}`, O = ((g = n.createSection) == null ? void 0 : g.call(n, m, p)) ?? `${m.section} · ${p.label}`;
|
|
7059
7062
|
i.push({
|
|
7060
7063
|
...m,
|
|
7061
7064
|
...S,
|
|
7062
|
-
id:
|
|
7063
|
-
name:
|
|
7065
|
+
id: y,
|
|
7066
|
+
name: _,
|
|
7064
7067
|
section: O,
|
|
7065
7068
|
width: Math.round(p.width),
|
|
7066
7069
|
height: Math.round(p.height),
|
|
7067
7070
|
heightMode: p.heightMode ?? (S == null ? void 0 : S.heightMode) ?? m.heightMode,
|
|
7068
7071
|
maxHeight: p.maxHeight ?? (S == null ? void 0 : S.maxHeight) ?? m.maxHeight
|
|
7069
7072
|
});
|
|
7070
|
-
for (const
|
|
7073
|
+
for (const A of r.get(m.id) ?? [])
|
|
7071
7074
|
o.push({
|
|
7072
|
-
...
|
|
7073
|
-
id: `${
|
|
7074
|
-
name: `${
|
|
7075
|
+
...A,
|
|
7076
|
+
id: `${A.id}:viewport:${p.id}`,
|
|
7077
|
+
name: `${A.name} · ${p.label}`,
|
|
7075
7078
|
section: O,
|
|
7076
|
-
pageId:
|
|
7079
|
+
pageId: y
|
|
7077
7080
|
});
|
|
7078
7081
|
}
|
|
7079
7082
|
const s = i.map((p) => p.id), a = o.map((p) => p.id), c = Le(s), u = Le(a);
|
|
@@ -7100,76 +7103,76 @@ function Sf({
|
|
|
7100
7103
|
captureRequirements: i
|
|
7101
7104
|
}) {
|
|
7102
7105
|
var S;
|
|
7103
|
-
const o = t.map((
|
|
7104
|
-
var
|
|
7106
|
+
const o = t.map((y) => {
|
|
7107
|
+
var _, O;
|
|
7105
7108
|
return {
|
|
7106
|
-
...
|
|
7107
|
-
preset: r != null && r.preset ||
|
|
7108
|
-
assertions: (
|
|
7109
|
+
...y,
|
|
7110
|
+
preset: r != null && r.preset || y.preset ? oa(r == null ? void 0 : r.preset, y.preset) : void 0,
|
|
7111
|
+
assertions: (_ = r == null ? void 0 : r.assertions) != null && _.length || (O = y.assertions) != null && O.length ? [
|
|
7109
7112
|
...((r == null ? void 0 : r.assertions) ?? []).map(lo),
|
|
7110
|
-
...(
|
|
7113
|
+
...(y.assertions ?? []).map(lo)
|
|
7111
7114
|
] : void 0
|
|
7112
7115
|
};
|
|
7113
|
-
}), s = e.map((
|
|
7114
|
-
...Le(s).map((
|
|
7115
|
-
...Le(c).map((
|
|
7116
|
+
}), s = e.map((y) => y.id), a = new Set(s), c = o.map((y) => y.id), u = [
|
|
7117
|
+
...Le(s).map((y) => `Duplicate scenario ID:${y}`),
|
|
7118
|
+
...Le(c).map((y) => `Duplicate screen case IDs:${y}`)
|
|
7116
7119
|
], l = /* @__PURE__ */ new Map();
|
|
7117
|
-
for (const
|
|
7118
|
-
i != null && i.preset && !
|
|
7119
|
-
for (const
|
|
7120
|
-
if (!a.has(
|
|
7121
|
-
u.push(`screen "${
|
|
7120
|
+
for (const y of o) {
|
|
7121
|
+
i != null && i.preset && !y.preset && u.push(`screen "${y.id}"There are no required presets.`), i != null && i.assertions && !((S = y.assertions) != null && S.length) && u.push(`screen "${y.id}" is missing a required assertion.`);
|
|
7122
|
+
for (const _ of y.scenarioIds ?? []) {
|
|
7123
|
+
if (!a.has(_)) {
|
|
7124
|
+
u.push(`screen "${y.id}"Scenario without${_}see`);
|
|
7122
7125
|
continue;
|
|
7123
7126
|
}
|
|
7124
|
-
const O = l.get(
|
|
7127
|
+
const O = l.get(_);
|
|
7125
7128
|
if (O) {
|
|
7126
|
-
u.push(`scenario${
|
|
7129
|
+
u.push(`scenario${_}Go to screen "${O}", "${y.id}"Duplicate classification in`);
|
|
7127
7130
|
continue;
|
|
7128
7131
|
}
|
|
7129
|
-
l.set(
|
|
7132
|
+
l.set(_, y.id);
|
|
7130
7133
|
}
|
|
7131
7134
|
}
|
|
7132
7135
|
const d = /* @__PURE__ */ new Set();
|
|
7133
|
-
for (const
|
|
7134
|
-
if (!a.has(
|
|
7135
|
-
u.push(`Scenario without non-visual classification${
|
|
7136
|
+
for (const y of n) {
|
|
7137
|
+
if (!a.has(y.id)) {
|
|
7138
|
+
u.push(`Scenario without non-visual classification${y.id}see`);
|
|
7136
7139
|
continue;
|
|
7137
7140
|
}
|
|
7138
|
-
if (l.has(
|
|
7139
|
-
u.push(`scenario${
|
|
7141
|
+
if (l.has(y.id)) {
|
|
7142
|
+
u.push(`scenario${y.id}Overlapping classification of visual and non-visual actions`);
|
|
7140
7143
|
continue;
|
|
7141
7144
|
}
|
|
7142
|
-
if (d.has(
|
|
7143
|
-
u.push(`scenario${
|
|
7145
|
+
if (d.has(y.id)) {
|
|
7146
|
+
u.push(`scenario${y.id}Non-visual classification overlap of`);
|
|
7144
7147
|
continue;
|
|
7145
7148
|
}
|
|
7146
|
-
d.add(
|
|
7149
|
+
d.add(y.id);
|
|
7147
7150
|
}
|
|
7148
|
-
const f = s.filter((
|
|
7151
|
+
const f = s.filter((y) => !l.has(y) && !d.has(y));
|
|
7149
7152
|
if (f.length && u.push(`Unclassified Scenario:${f.join(", ")}`), u.length)
|
|
7150
7153
|
throw new Error(`[Pygmalion] Screens scenario classification error${u.join(`
|
|
7151
7154
|
`)}`);
|
|
7152
|
-
const h = new Map(e.map((
|
|
7153
|
-
id: `state:${
|
|
7154
|
-
name:
|
|
7155
|
-
section:
|
|
7156
|
-
pageId:
|
|
7157
|
-
sourcePath:
|
|
7158
|
-
codeName:
|
|
7159
|
-
flow:
|
|
7160
|
-
scenarioId:
|
|
7161
|
-
description: [
|
|
7162
|
-
})), p = [...l.entries()].map(([
|
|
7163
|
-
const O = h.get(
|
|
7155
|
+
const h = new Map(e.map((y) => [y.id, y])), g = o.map((y) => ({
|
|
7156
|
+
id: `state:${y.id}`,
|
|
7157
|
+
name: y.name,
|
|
7158
|
+
section: y.section,
|
|
7159
|
+
pageId: y.id,
|
|
7160
|
+
sourcePath: y.sourcePath,
|
|
7161
|
+
codeName: y.codeName ?? y.state,
|
|
7162
|
+
flow: y.flow,
|
|
7163
|
+
scenarioId: y.scenarioId,
|
|
7164
|
+
description: [y.scenario, y.state].filter(Boolean).join(" · ")
|
|
7165
|
+
})), p = [...l.entries()].map(([y, _]) => {
|
|
7166
|
+
const O = h.get(y);
|
|
7164
7167
|
return {
|
|
7165
|
-
id: `scenario:${
|
|
7166
|
-
name: O.name ??
|
|
7168
|
+
id: `scenario:${y}`,
|
|
7169
|
+
name: O.name ?? y,
|
|
7167
7170
|
section: O.section,
|
|
7168
|
-
pageId:
|
|
7171
|
+
pageId: _,
|
|
7169
7172
|
sourcePath: O.sourcePath,
|
|
7170
7173
|
codeName: O.codeName,
|
|
7171
7174
|
flow: O.flow,
|
|
7172
|
-
scenarioId:
|
|
7175
|
+
scenarioId: y,
|
|
7173
7176
|
description: O.description
|
|
7174
7177
|
};
|
|
7175
7178
|
}), m = [...g, ...p];
|
|
@@ -7182,11 +7185,11 @@ function Sf({
|
|
|
7182
7185
|
// and no canonical id look uncovered.
|
|
7183
7186
|
pages: o.map(
|
|
7184
7187
|
({
|
|
7185
|
-
sourcePath:
|
|
7186
|
-
codeName:
|
|
7188
|
+
sourcePath: y,
|
|
7189
|
+
codeName: _,
|
|
7187
7190
|
coverageRoutes: O,
|
|
7188
|
-
...
|
|
7189
|
-
}) =>
|
|
7191
|
+
...A
|
|
7192
|
+
}) => A
|
|
7190
7193
|
)
|
|
7191
7194
|
},
|
|
7192
7195
|
coverage: {
|
|
@@ -7379,17 +7382,17 @@ function Nf(t, e = {}) {
|
|
|
7379
7382
|
var h, g, p;
|
|
7380
7383
|
const l = [], d = [], f = [];
|
|
7381
7384
|
for (const m of ot) {
|
|
7382
|
-
const S = t.collections[m],
|
|
7383
|
-
d.push(...S.assets.map((
|
|
7384
|
-
for (const
|
|
7385
|
-
|
|
7386
|
-
for (const
|
|
7387
|
-
m === "screens" && ((h =
|
|
7388
|
-
for (const O of
|
|
7389
|
-
O.selector.trim() || l.push(`${m}:${
|
|
7390
|
-
!
|
|
7391
|
-
for (const O of
|
|
7392
|
-
n[O] || l.push(`${m}:${
|
|
7385
|
+
const S = t.collections[m], y = new Set(S.pages.map((_) => _.id));
|
|
7386
|
+
d.push(...S.assets.map((_) => `${m}:${_.id}`)), f.push(...S.pages.map((_) => `${m}:${_.id}`)), S.assets.length !== S.expectedCount && l.push(`${m}: expected ${S.expectedCount}, imported ${S.assets.length}`);
|
|
7387
|
+
for (const _ of S.assets)
|
|
7388
|
+
y.has(_.pageId) || l.push(`${m}:${_.id}: unknown pageId ${_.pageId}`);
|
|
7389
|
+
for (const _ of S.pages) {
|
|
7390
|
+
m === "screens" && ((h = _.interactions) != null && h.length || (g = _.assertions) != null && g.length || _.preset) && !_.route && l.push(`${m}:${_.id}: capture contract requires a route preview`), _.preset && !vn(_.preset) && l.push(`${m}:${_.id}: preset must contain only finite JSON-serializable data`), _.environment && !vn(_.environment) && l.push(`${m}:${_.id}: environment must contain only finite JSON-serializable data`);
|
|
7391
|
+
for (const O of _.assertions ?? [])
|
|
7392
|
+
O.selector.trim() || l.push(`${m}:${_.id}: assertion selector is required`), O.label.trim() || l.push(`${m}:${_.id}: assertion label is required`), O.attribute && !O.attribute.name.trim() && l.push(`${m}:${_.id}: assertion attribute name is required`);
|
|
7393
|
+
!_.route && !_.componentName && !((p = _.gallery) != null && p.length) && l.push(`${m}:${_.id}: componentName, gallery, or route is required`), _.frameSizeMode != null && _.frameSizeMode !== "fixed" && _.frameSizeMode !== "content" && l.push(`${m}:${_.id}: frameSizeMode must be fixed or content`), _.heightMode != null && _.heightMode !== "fixed" && _.heightMode !== "document" && l.push(`${m}:${_.id}: heightMode must be fixed or document`), _.maxHeight != null && (!Number.isFinite(_.maxHeight) || _.maxHeight <= 0) && l.push(`${m}:${_.id}: maxHeight must be a positive finite number`), _.componentName && !n[_.componentName] && l.push(`${m}:${_.id}: missing registry component ${_.componentName}`);
|
|
7394
|
+
for (const O of _.gallery ?? [])
|
|
7395
|
+
n[O] || l.push(`${m}:${_.id}: missing gallery component ${O}`);
|
|
7393
7396
|
}
|
|
7394
7397
|
}
|
|
7395
7398
|
for (const m of Le(d)) l.push(`duplicate asset id ${m}`);
|
|
@@ -7399,13 +7402,13 @@ ${l.join(`
|
|
|
7399
7402
|
`)}`);
|
|
7400
7403
|
};
|
|
7401
7404
|
c();
|
|
7402
|
-
const u = async (l, d) => {
|
|
7403
|
-
var
|
|
7404
|
-
const
|
|
7405
|
-
let
|
|
7405
|
+
const u = async (l, d, f) => {
|
|
7406
|
+
var y, _, O;
|
|
7407
|
+
const h = [];
|
|
7408
|
+
let g = !d.preset;
|
|
7406
7409
|
if (d.preset)
|
|
7407
7410
|
if (!e.executeScreenPreset)
|
|
7408
|
-
|
|
7411
|
+
h.push({
|
|
7409
7412
|
stage: "preset",
|
|
7410
7413
|
code: "preset_executor_missing",
|
|
7411
7414
|
label: "screen preset",
|
|
@@ -7413,41 +7416,45 @@ ${l.join(`
|
|
|
7413
7416
|
});
|
|
7414
7417
|
else
|
|
7415
7418
|
try {
|
|
7416
|
-
const
|
|
7419
|
+
const A = await e.executeScreenPreset(
|
|
7417
7420
|
{ pageId: d.pageId, route: d.route, preset: Ct(d.preset) },
|
|
7418
7421
|
{ iframe: l }
|
|
7419
7422
|
);
|
|
7420
|
-
|
|
7423
|
+
A && !A.complete ? h.push({
|
|
7421
7424
|
stage: "preset",
|
|
7422
7425
|
code: "preset_rejected",
|
|
7423
7426
|
label: "screen preset",
|
|
7424
|
-
message:
|
|
7425
|
-
actual:
|
|
7426
|
-
}) :
|
|
7427
|
-
} catch (
|
|
7428
|
-
|
|
7427
|
+
message: A.message ?? "The host refused to apply the screen preset.",
|
|
7428
|
+
actual: A.details
|
|
7429
|
+
}) : g = !0;
|
|
7430
|
+
} catch (A) {
|
|
7431
|
+
h.push({
|
|
7429
7432
|
stage: "preset",
|
|
7430
7433
|
code: "preset_error",
|
|
7431
7434
|
label: "screen preset",
|
|
7432
|
-
message: `An error occurred while applying the screen preset:${String(
|
|
7435
|
+
message: `An error occurred while applying the screen preset:${String(A).slice(0, 160)}`
|
|
7433
7436
|
});
|
|
7434
7437
|
}
|
|
7435
|
-
let
|
|
7436
|
-
|
|
7438
|
+
let p = wf(((y = d.interactions) == null ? void 0 : y.length) ?? 0), m = Of(((_ = d.assertions) == null ? void 0 : _.length) ?? 0);
|
|
7439
|
+
h.length === 0 && ((O = f == null ? void 0 : f.onBeforeInteractions) == null || O.call(f), p = await Nr(
|
|
7440
|
+
l,
|
|
7441
|
+
d.interactions ?? [],
|
|
7442
|
+
f
|
|
7443
|
+
), p.complete || h.push({
|
|
7437
7444
|
stage: "interaction",
|
|
7438
7445
|
code: "interaction_failed",
|
|
7439
|
-
label:
|
|
7440
|
-
message:
|
|
7441
|
-
})),
|
|
7442
|
-
const
|
|
7446
|
+
label: p.failedLabel,
|
|
7447
|
+
message: p.error ?? "Couldn't reproduce the user flow."
|
|
7448
|
+
})), h.length === 0 && (m = await xf(l, d.assertions ?? []), h.push(...m.failures));
|
|
7449
|
+
const S = h[0];
|
|
7443
7450
|
return {
|
|
7444
|
-
complete:
|
|
7445
|
-
presetApplied:
|
|
7446
|
-
interactions:
|
|
7447
|
-
assertions:
|
|
7448
|
-
failures:
|
|
7449
|
-
failedLabel:
|
|
7450
|
-
error:
|
|
7451
|
+
complete: h.length === 0,
|
|
7452
|
+
presetApplied: g,
|
|
7453
|
+
interactions: p,
|
|
7454
|
+
assertions: m,
|
|
7455
|
+
failures: h,
|
|
7456
|
+
failedLabel: S == null ? void 0 : S.label,
|
|
7457
|
+
error: S == null ? void 0 : S.message
|
|
7451
7458
|
};
|
|
7452
7459
|
};
|
|
7453
7460
|
return {
|
|
@@ -7517,7 +7524,7 @@ ${l.join(`
|
|
|
7517
7524
|
...d
|
|
7518
7525
|
}),
|
|
7519
7526
|
captureIframeWhenStable: async (l, d = {}) => {
|
|
7520
|
-
var
|
|
7527
|
+
var P;
|
|
7521
7528
|
const {
|
|
7522
7529
|
settleMs: f = 1e3,
|
|
7523
7530
|
timeoutMs: h = 8e3,
|
|
@@ -7531,17 +7538,17 @@ ${l.join(`
|
|
|
7531
7538
|
return null;
|
|
7532
7539
|
}
|
|
7533
7540
|
if (!(m != null && m.body) || !S) return null;
|
|
7534
|
-
const
|
|
7535
|
-
let
|
|
7536
|
-
const
|
|
7537
|
-
|
|
7541
|
+
const y = Date.now();
|
|
7542
|
+
let _ = Date.now(), O = m.body.querySelectorAll("*").length;
|
|
7543
|
+
const A = S.MutationObserver, x = new A(() => {
|
|
7544
|
+
_ = Date.now(), O = m.body.querySelectorAll("*").length;
|
|
7538
7545
|
});
|
|
7539
|
-
|
|
7546
|
+
x.observe(m.body, { childList: !0, subtree: !0, attributes: !0, characterData: !0 });
|
|
7540
7547
|
try {
|
|
7541
7548
|
await new Promise((D) => {
|
|
7542
7549
|
const k = () => {
|
|
7543
7550
|
const z = Date.now(), V = m.body.querySelectorAll("*").length;
|
|
7544
|
-
if (V !== O && (O = V,
|
|
7551
|
+
if (V !== O && (O = V, _ = z), V >= g && z - _ >= f || z - y >= h) {
|
|
7545
7552
|
D();
|
|
7546
7553
|
return;
|
|
7547
7554
|
}
|
|
@@ -7550,10 +7557,10 @@ ${l.join(`
|
|
|
7550
7557
|
S.setTimeout(k, 100);
|
|
7551
7558
|
});
|
|
7552
7559
|
} finally {
|
|
7553
|
-
|
|
7560
|
+
x.disconnect();
|
|
7554
7561
|
}
|
|
7555
7562
|
try {
|
|
7556
|
-
await ((
|
|
7563
|
+
await ((P = m.fonts) == null ? void 0 : P.ready), await new Promise((D) => {
|
|
7557
7564
|
S.requestAnimationFrame(() => D());
|
|
7558
7565
|
});
|
|
7559
7566
|
} catch {
|
|
@@ -7651,11 +7658,11 @@ function Rf(t) {
|
|
|
7651
7658
|
if (!g) continue;
|
|
7652
7659
|
const p = If(g);
|
|
7653
7660
|
if (!p) continue;
|
|
7654
|
-
const m = (p.x - s.x) / r - f.x, S = (p.y - s.y) / r - f.y,
|
|
7661
|
+
const m = (p.x - s.x) / r - f.x, S = (p.y - s.y) / r - f.y, y = p.width / r - f.width, _ = p.height / r - f.height, O = Math.max(
|
|
7655
7662
|
Math.abs(m),
|
|
7656
7663
|
Math.abs(S),
|
|
7657
|
-
Math.abs(
|
|
7658
|
-
Math.abs(
|
|
7664
|
+
Math.abs(y),
|
|
7665
|
+
Math.abs(_)
|
|
7659
7666
|
);
|
|
7660
7667
|
a += 1, !(O <= Pf) && (c = Math.max(c, O), u.push({
|
|
7661
7668
|
nodeId: h.id,
|
|
@@ -7675,8 +7682,8 @@ function Rf(t) {
|
|
|
7675
7682
|
},
|
|
7676
7683
|
dx: Math.round(m),
|
|
7677
7684
|
dy: Math.round(S),
|
|
7678
|
-
dwidth: Math.round(
|
|
7679
|
-
dheight: Math.round(
|
|
7685
|
+
dwidth: Math.round(y),
|
|
7686
|
+
dheight: Math.round(_),
|
|
7680
7687
|
drift: Math.round(O)
|
|
7681
7688
|
}));
|
|
7682
7689
|
}
|
|
@@ -10617,69 +10624,69 @@ function Vh({
|
|
|
10617
10624
|
}), c = yt(() => {
|
|
10618
10625
|
}), u = yt(i);
|
|
10619
10626
|
u.current = i;
|
|
10620
|
-
const l = yt(0), [d, f] = or([]), [h, g] = or("none"), p = ir.frozenPreviewOverrideCss(t), m = ir.frozenPreviewCssRules(), S = ir.frozenPreviewMutations(),
|
|
10627
|
+
const l = yt(0), [d, f] = or([]), [h, g] = or("none"), p = ir.frozenPreviewOverrideCss(t), m = ir.frozenPreviewCssRules(), S = ir.frozenPreviewMutations(), y = JSON.stringify({ cssRules: m, mutations: S }), _ = () => {
|
|
10621
10628
|
var vt, Ce;
|
|
10622
10629
|
const O = (vt = s.current) == null ? void 0 : vt.contentDocument;
|
|
10623
10630
|
if (!(O != null && O.head)) return;
|
|
10624
|
-
const
|
|
10625
|
-
let
|
|
10631
|
+
const A = ++l.current, x = [];
|
|
10632
|
+
let P = O.querySelector(
|
|
10626
10633
|
"style[data-pygmalion-frozen-overrides]"
|
|
10627
10634
|
);
|
|
10628
|
-
p ?
|
|
10635
|
+
p ? P || (P = O.createElement("style"), P.dataset.pygmalionFrozenOverrides = "", O.head.append(P)) : P == null || P.remove(), P && P.textContent !== p && (P.textContent = p), a.current();
|
|
10629
10636
|
const D = [];
|
|
10630
10637
|
let k = 0, z = 0;
|
|
10631
|
-
for (const
|
|
10638
|
+
for (const N of m)
|
|
10632
10639
|
try {
|
|
10633
|
-
O.querySelector(
|
|
10640
|
+
O.querySelector(N.selector);
|
|
10634
10641
|
} catch {
|
|
10635
|
-
|
|
10642
|
+
x.push(`Style selector cannot be applied:${N.key}`);
|
|
10636
10643
|
}
|
|
10637
|
-
for (const
|
|
10644
|
+
for (const N of S) {
|
|
10638
10645
|
let ze = [];
|
|
10639
10646
|
try {
|
|
10640
|
-
ze = [...O.querySelectorAll(
|
|
10647
|
+
ze = [...O.querySelectorAll(N.selector)];
|
|
10641
10648
|
} catch {
|
|
10642
|
-
|
|
10649
|
+
x.push(`DOM selector cannot be applied:${N.key}`);
|
|
10643
10650
|
continue;
|
|
10644
10651
|
}
|
|
10645
|
-
if (
|
|
10646
|
-
|
|
10652
|
+
if (N.staleReason && ze.length > 0) {
|
|
10653
|
+
x.push(N.staleReason), (N.component || N.key.endsWith(":component-props")) && (z += ze.length);
|
|
10647
10654
|
continue;
|
|
10648
10655
|
}
|
|
10649
|
-
for (const
|
|
10650
|
-
if (
|
|
10651
|
-
const R =
|
|
10656
|
+
for (const I of ze) {
|
|
10657
|
+
if (N.component) {
|
|
10658
|
+
const R = N.component, ge = le()[R.name];
|
|
10652
10659
|
if (!ge) {
|
|
10653
|
-
|
|
10660
|
+
x.push(
|
|
10654
10661
|
`Component registry entry not found:${R.name}`
|
|
10655
|
-
), z += 1,
|
|
10656
|
-
|
|
10662
|
+
), z += 1, I.setAttribute("data-pygmalion-sandbox-replay", "stale"), D.push(() => {
|
|
10663
|
+
I.removeAttribute("data-pygmalion-sandbox-replay");
|
|
10657
10664
|
});
|
|
10658
10665
|
continue;
|
|
10659
10666
|
}
|
|
10660
10667
|
if (ge.children === "nodes") {
|
|
10661
|
-
|
|
10668
|
+
x.push(
|
|
10662
10669
|
"Components that use node children cannot be safely replayed in a frozen sandbox."
|
|
10663
|
-
), z += 1,
|
|
10664
|
-
|
|
10670
|
+
), z += 1, I.setAttribute("data-pygmalion-sandbox-replay", "stale"), D.push(() => {
|
|
10671
|
+
I.removeAttribute("data-pygmalion-sandbox-replay");
|
|
10665
10672
|
});
|
|
10666
10673
|
continue;
|
|
10667
10674
|
}
|
|
10668
10675
|
const Ee = O.createElement("pygmalion-sandbox-root");
|
|
10669
|
-
Ee.setAttribute("data-pygmalion-sandbox-replay", "applied"), Ee.style.display = "contents",
|
|
10670
|
-
const oi =
|
|
10671
|
-
|
|
10676
|
+
Ee.setAttribute("data-pygmalion-sandbox-replay", "applied"), Ee.style.display = "contents", I.before(Ee);
|
|
10677
|
+
const oi = I.hasAttribute("hidden");
|
|
10678
|
+
I.setAttribute("hidden", ""), I.setAttribute("data-pygmalion-sandbox-replay", "source");
|
|
10672
10679
|
let bt = vo(Ee);
|
|
10673
10680
|
const Ia = () => {
|
|
10674
10681
|
const ve = bt;
|
|
10675
|
-
bt = null, Ee.remove(),
|
|
10682
|
+
bt = null, Ee.remove(), I.toggleAttribute("hidden", oi), I.removeAttribute("data-pygmalion-sandbox-replay"), ve && queueMicrotask(() => ve.unmount());
|
|
10676
10683
|
};
|
|
10677
10684
|
D.push(Ia);
|
|
10678
10685
|
const si = (ve) => {
|
|
10679
|
-
if (l.current !==
|
|
10686
|
+
if (l.current !== A) return;
|
|
10680
10687
|
z += 1;
|
|
10681
10688
|
const Pa = ve instanceof Error ? ve.message : String(ve), ai = `Component sandbox rendering failed:${R.name} · ${Pa}`;
|
|
10682
|
-
|
|
10689
|
+
x.push(ai), Ee.setAttribute("data-pygmalion-sandbox-replay", "stale"), I.toggleAttribute("hidden", oi), g("stale"), f((Ca) => {
|
|
10683
10690
|
const ci = [.../* @__PURE__ */ new Set([...Ca, ai])];
|
|
10684
10691
|
return o == null || o(ci), ci;
|
|
10685
10692
|
});
|
|
@@ -10702,57 +10709,57 @@ function Vh({
|
|
|
10702
10709
|
}
|
|
10703
10710
|
continue;
|
|
10704
10711
|
}
|
|
10705
|
-
if (
|
|
10706
|
-
const R =
|
|
10707
|
-
|
|
10712
|
+
if (N.hidden != null) {
|
|
10713
|
+
const R = I.hasAttribute("hidden");
|
|
10714
|
+
I.toggleAttribute("hidden", N.hidden), D.push(() => I.toggleAttribute("hidden", R));
|
|
10708
10715
|
}
|
|
10709
|
-
if (
|
|
10710
|
-
for (const [R, ge] of Object.entries(
|
|
10711
|
-
const Ee =
|
|
10712
|
-
ge == null ?
|
|
10713
|
-
Ee == null ?
|
|
10716
|
+
if (N.attributes)
|
|
10717
|
+
for (const [R, ge] of Object.entries(N.attributes)) {
|
|
10718
|
+
const Ee = I.getAttribute(R);
|
|
10719
|
+
ge == null ? I.removeAttribute(R) : I.setAttribute(R, ge), D.push(() => {
|
|
10720
|
+
Ee == null ? I.removeAttribute(R) : I.setAttribute(R, Ee);
|
|
10714
10721
|
});
|
|
10715
10722
|
}
|
|
10716
|
-
if (
|
|
10717
|
-
const R =
|
|
10718
|
-
|
|
10719
|
-
|
|
10723
|
+
if (N.replaceChildrenHtml != null) {
|
|
10724
|
+
const R = I.innerHTML;
|
|
10725
|
+
I.innerHTML = N.replaceChildrenHtml, D.push(() => {
|
|
10726
|
+
I.innerHTML = R;
|
|
10720
10727
|
});
|
|
10721
10728
|
}
|
|
10722
|
-
if (
|
|
10723
|
-
if (
|
|
10724
|
-
const R =
|
|
10725
|
-
|
|
10726
|
-
|
|
10729
|
+
if (N.text == null) continue;
|
|
10730
|
+
if (N.textNodeOrdinal == null) {
|
|
10731
|
+
const R = I.textContent;
|
|
10732
|
+
I.textContent = N.text, D.push(() => {
|
|
10733
|
+
I.textContent = R;
|
|
10727
10734
|
});
|
|
10728
10735
|
continue;
|
|
10729
10736
|
}
|
|
10730
|
-
const Na = ((Ce = O.defaultView) == null ? void 0 : Ce.Node.TEXT_NODE) ?? 3, Vt = [...
|
|
10737
|
+
const Na = ((Ce = O.defaultView) == null ? void 0 : Ce.Node.TEXT_NODE) ?? 3, Vt = [...I.childNodes].filter(
|
|
10731
10738
|
(R) => {
|
|
10732
10739
|
var ge;
|
|
10733
10740
|
return R.nodeType === Na && !!((ge = R.textContent) != null && ge.trim());
|
|
10734
10741
|
}
|
|
10735
|
-
)[
|
|
10742
|
+
)[N.textNodeOrdinal];
|
|
10736
10743
|
if (!Vt) continue;
|
|
10737
10744
|
const Ma = Vt.textContent;
|
|
10738
|
-
Vt.textContent =
|
|
10745
|
+
Vt.textContent = N.text, D.push(() => {
|
|
10739
10746
|
Vt.textContent = Ma;
|
|
10740
10747
|
});
|
|
10741
10748
|
}
|
|
10742
10749
|
}
|
|
10743
10750
|
a.current = () => {
|
|
10744
|
-
for (const
|
|
10751
|
+
for (const N of D.reverse()) N();
|
|
10745
10752
|
};
|
|
10746
|
-
const V = [...new Set(
|
|
10753
|
+
const V = [...new Set(x)];
|
|
10747
10754
|
g(
|
|
10748
10755
|
z > 0 ? "stale" : k > 0 ? "applied" : "none"
|
|
10749
10756
|
), f(
|
|
10750
|
-
(
|
|
10757
|
+
(N) => JSON.stringify(N) === JSON.stringify(V) ? N : V
|
|
10751
10758
|
), o == null || o(V);
|
|
10752
10759
|
};
|
|
10753
|
-
return di(() => (
|
|
10760
|
+
return di(() => (_(), () => {
|
|
10754
10761
|
l.current += 1, a.current();
|
|
10755
|
-
}), [p, e,
|
|
10762
|
+
}), [p, e, y]), di(
|
|
10756
10763
|
() => () => {
|
|
10757
10764
|
c.current();
|
|
10758
10765
|
},
|
|
@@ -10774,14 +10781,14 @@ function Vh({
|
|
|
10774
10781
|
className: "block border-0 bg-white",
|
|
10775
10782
|
style: { width: "100%", height: n, pointerEvents: "none" },
|
|
10776
10783
|
onLoad: () => {
|
|
10777
|
-
|
|
10784
|
+
_();
|
|
10778
10785
|
const O = s.current;
|
|
10779
10786
|
if (!O) return;
|
|
10780
10787
|
c.current();
|
|
10781
|
-
const
|
|
10782
|
-
c.current = t.heightMode === "document" &&
|
|
10783
|
-
var
|
|
10784
|
-
(
|
|
10788
|
+
const A = O.contentDocument;
|
|
10789
|
+
c.current = t.heightMode === "document" && A ? dl(A, (x) => {
|
|
10790
|
+
var P;
|
|
10791
|
+
(P = u.current) == null || P.call(u, x);
|
|
10785
10792
|
}) : () => {
|
|
10786
10793
|
}, r == null || r(O);
|
|
10787
10794
|
}
|