@pygmalionjs/pygmalion 0.2.41 → 0.2.43
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/{App-kzN-1Je6.js → App-CqQXGMGw.js} +4866 -4660
- package/dist-lib/pygmalion.js +422 -418
- package/dist-lib/style.css +1 -1
- package/dist-lib/testing.js +1 -1
- package/node/source-operations.mjs +17 -1
- package/package.json +1 -1
- package/types.d.ts +18 -15
package/dist-lib/pygmalion.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { b as se, m as tt, i as lt, g as dt, e as X, S as ut, c as ft, a as mt, d as
|
|
3
|
-
import { X as qn, Y as Kn, Z as Gn, _ as Ln, $ as
|
|
1
|
+
import { jsxs as A, jsx as v } from "react/jsx-runtime";
|
|
2
|
+
import { b as se, m as tt, i as lt, g as dt, e as X, S as ut, c as ft, a as mt, d as pt, f as ht, h as gt, j as yt, k as wt, l as St, n as ve, o as bt, p as vt, q as It, r as xt, t as Pt, u as Et, v as Ct, w as je, x as Rt, y as Nt, z as $t, A as _e, B as Be, C as oe, D as At, E as Mt, G as Ue, H as Ot, I as ye, J as we, K as Dt, L as He, M as kt, O as qe, P as Ft, Q as Tt, R as zt, T as jt, U as _t, V as Bt, W as Ke } from "./App-CqQXGMGw.js";
|
|
3
|
+
import { X as qn, Y as Kn, Z as Gn, _ as Ln, $ as Wn, a0 as Vn, a1 as Jn, a2 as Qn, a3 as Xn, a4 as Yn, a5 as Zn, a6 as er, a7 as tr, a8 as nr, a9 as rr, aa as or, ab as sr, ac as ir, ad as ar, ae as cr, af as lr, ag as dr, ah as ur, ai as fr, aj as mr, ak as pr, al as hr, am as gr, an as yr, ao as wr, ap as Sr, aq as br, ar as vr, as as Ir, at as xr, au as Pr, av as Er, aw as Cr, ax as Rr, ay as Nr, az as $r, aA as Ar, aB as Mr } from "./App-CqQXGMGw.js";
|
|
4
4
|
import { createElement as Ge, useMemo as ie, useState as fe, useRef as xe, useCallback as de, useEffect as me, useLayoutEffect as Le } from "react";
|
|
5
5
|
function Ut(e) {
|
|
6
6
|
return e.flatMap((t, o) => {
|
|
@@ -81,7 +81,7 @@ function Kt(e) {
|
|
|
81
81
|
states: B(t.map((r) => r.state))
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function We(e) {
|
|
85
85
|
return [
|
|
86
86
|
e.code,
|
|
87
87
|
e.edgeId,
|
|
@@ -91,7 +91,7 @@ function Ve(e) {
|
|
|
91
91
|
].join(":");
|
|
92
92
|
}
|
|
93
93
|
function Gt(e) {
|
|
94
|
-
var Z,
|
|
94
|
+
var Z, W;
|
|
95
95
|
const t = [], o = [], r = /* @__PURE__ */ new Map();
|
|
96
96
|
for (const c of e.screens) {
|
|
97
97
|
const i = c.id.trim();
|
|
@@ -112,11 +112,11 @@ function Gt(e) {
|
|
|
112
112
|
let i;
|
|
113
113
|
try {
|
|
114
114
|
if (i = (e.recipeKey ?? Ht)(c), !i.trim()) throw new Error("Recipe keys cannot be empty.");
|
|
115
|
-
} catch (
|
|
115
|
+
} catch (y) {
|
|
116
116
|
s.add(c.id), t.push({
|
|
117
117
|
code: "invalid-recipe",
|
|
118
118
|
severity: "error",
|
|
119
|
-
message:
|
|
119
|
+
message: y instanceof Error ? y.message : "Storyboard recipe identity could not be created.",
|
|
120
120
|
screenId: c.id
|
|
121
121
|
}), i = `invalid:${c.id}`;
|
|
122
122
|
}
|
|
@@ -129,17 +129,17 @@ function Gt(e) {
|
|
|
129
129
|
const u = new Map(l.map((c) => [c.id, c])), w = (c, i) => B([
|
|
130
130
|
i,
|
|
131
131
|
...(c ?? []).flatMap((d) => {
|
|
132
|
-
const
|
|
132
|
+
const y = d.trim(), I = a[y] ?? (u.has(y) ? y : null);
|
|
133
133
|
return I ? [I] : [];
|
|
134
134
|
})
|
|
135
|
-
]),
|
|
135
|
+
]), p = /* @__PURE__ */ new Map();
|
|
136
136
|
for (const c of e.assets ?? []) {
|
|
137
|
-
const i =
|
|
138
|
-
i ? i.push(c) :
|
|
137
|
+
const i = p.get(c.pageId);
|
|
138
|
+
i ? i.push(c) : p.set(c.pageId, [c]);
|
|
139
139
|
}
|
|
140
|
-
const
|
|
140
|
+
const h = l.map((c) => {
|
|
141
141
|
const i = c.screenIds.flatMap(
|
|
142
|
-
(d) =>
|
|
142
|
+
(d) => p.get(d) ?? []
|
|
143
143
|
);
|
|
144
144
|
return {
|
|
145
145
|
...c,
|
|
@@ -152,41 +152,41 @@ function Gt(e) {
|
|
|
152
152
|
...i.map((d) => d.sourcePath)
|
|
153
153
|
])
|
|
154
154
|
};
|
|
155
|
-
}),
|
|
156
|
-
for (const c of
|
|
155
|
+
}), x = /* @__PURE__ */ new Map();
|
|
156
|
+
for (const c of h)
|
|
157
157
|
for (const i of c.routes) {
|
|
158
|
-
const d =
|
|
159
|
-
d ? d.push(c.id) :
|
|
158
|
+
const d = x.get(i);
|
|
159
|
+
d ? d.push(c.id) : x.set(i, [c.id]);
|
|
160
160
|
}
|
|
161
|
-
const
|
|
162
|
-
const
|
|
161
|
+
const S = (c, i, d) => {
|
|
162
|
+
const y = c.trim(), I = a[y] ?? (u.has(y) ? y : null);
|
|
163
163
|
if (I) return I;
|
|
164
|
-
const m = B(
|
|
164
|
+
const m = B(x.get(y) ?? []);
|
|
165
165
|
return m.length === 1 ? m[0] : m.length > 1 ? (t.push({
|
|
166
166
|
code: d === "source" ? "ambiguous-edge-source" : "ambiguous-edge-target",
|
|
167
167
|
severity: "error",
|
|
168
168
|
message: `Storyboard edge "${i}" references an ambiguous ${d} route.`,
|
|
169
169
|
edgeId: i,
|
|
170
|
-
screenId:
|
|
170
|
+
screenId: y || void 0
|
|
171
171
|
}), null) : (t.push({
|
|
172
172
|
code: d === "source" ? "unknown-edge-source" : "unknown-edge-target",
|
|
173
173
|
severity: "error",
|
|
174
174
|
message: `Storyboard edge "${i}" references an unknown ${d}.`,
|
|
175
175
|
edgeId: i,
|
|
176
|
-
screenId:
|
|
176
|
+
screenId: y || void 0
|
|
177
177
|
}), null);
|
|
178
|
-
},
|
|
178
|
+
}, g = [], E = /* @__PURE__ */ new Map(), f = [
|
|
179
179
|
["explicit", e.explicitEdges ?? []],
|
|
180
180
|
["inferred", e.inferredEdges ?? []]
|
|
181
181
|
];
|
|
182
182
|
let R = 0;
|
|
183
183
|
for (const [c, i] of f)
|
|
184
184
|
for (const d of i) {
|
|
185
|
-
const
|
|
185
|
+
const y = qt(d, R);
|
|
186
186
|
R += 1;
|
|
187
|
-
const I =
|
|
187
|
+
const I = S(d.from, y, "source"), m = S(d.to, y, "target");
|
|
188
188
|
if (!I || !m || I === m) continue;
|
|
189
|
-
const N = w(d.fromScope, I), O = w(d.toScope, m), K = `${I}\0${m}`, F =
|
|
189
|
+
const N = w(d.fromScope, I), O = w(d.toScope, m), K = `${I}\0${m}`, F = E.get(K);
|
|
190
190
|
if (F) {
|
|
191
191
|
const ce = {
|
|
192
192
|
...F,
|
|
@@ -200,35 +200,35 @@ function Gt(e) {
|
|
|
200
200
|
]),
|
|
201
201
|
sourceEdgeIds: B([
|
|
202
202
|
...F.sourceEdgeIds,
|
|
203
|
-
|
|
203
|
+
y
|
|
204
204
|
])
|
|
205
205
|
};
|
|
206
|
-
|
|
207
|
-
const
|
|
208
|
-
|
|
206
|
+
E.set(K, ce);
|
|
207
|
+
const he = g.indexOf(F);
|
|
208
|
+
he >= 0 && (g[he] = ce);
|
|
209
209
|
continue;
|
|
210
210
|
}
|
|
211
211
|
const q = {
|
|
212
|
-
id:
|
|
212
|
+
id: y,
|
|
213
213
|
from: I,
|
|
214
214
|
to: m,
|
|
215
215
|
fromNodeIds: N,
|
|
216
216
|
toNodeIds: O,
|
|
217
217
|
kind: ((Z = d.kind) == null ? void 0 : Z.trim()) || void 0,
|
|
218
|
-
label: ((
|
|
218
|
+
label: ((W = d.label) == null ? void 0 : W.trim()) || void 0,
|
|
219
219
|
origin: c,
|
|
220
|
-
sourceEdgeIds: [
|
|
220
|
+
sourceEdgeIds: [y]
|
|
221
221
|
};
|
|
222
|
-
|
|
222
|
+
E.set(K, q), g.push(q);
|
|
223
223
|
}
|
|
224
|
-
|
|
224
|
+
g.sort(
|
|
225
225
|
(c, i) => `${c.from}:${c.to}:${c.id}`.localeCompare(`${i.from}:${i.to}:${i.id}`)
|
|
226
226
|
);
|
|
227
|
-
const D = /* @__PURE__ */ new Map(),
|
|
228
|
-
for (const c of
|
|
227
|
+
const D = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map();
|
|
228
|
+
for (const c of g) {
|
|
229
229
|
for (const i of c.fromNodeIds ?? [c.from]) {
|
|
230
|
-
const d =
|
|
231
|
-
d ? d.push(c) :
|
|
230
|
+
const d = b.get(i);
|
|
231
|
+
d ? d.push(c) : b.set(i, [c]);
|
|
232
232
|
}
|
|
233
233
|
for (const i of c.toNodeIds ?? [c.to]) {
|
|
234
234
|
const d = D.get(i);
|
|
@@ -250,24 +250,24 @@ function Gt(e) {
|
|
|
250
250
|
M.push(d);
|
|
251
251
|
}
|
|
252
252
|
const te = new Set(M);
|
|
253
|
-
let
|
|
254
|
-
|
|
253
|
+
let P = B(M);
|
|
254
|
+
P.length || (P = h.filter((c) => {
|
|
255
255
|
var i;
|
|
256
256
|
return (((i = D.get(c.id)) == null ? void 0 : i.length) ?? 0) === 0;
|
|
257
|
-
}).map((c) => c.id).sort((c, i) => c.localeCompare(i))), !
|
|
258
|
-
const C = /* @__PURE__ */ new Set(), j = [...
|
|
257
|
+
}).map((c) => c.id).sort((c, i) => c.localeCompare(i))), !P.length && h.length && (P = [h[0].id]);
|
|
258
|
+
const C = /* @__PURE__ */ new Set(), j = [...P];
|
|
259
259
|
for (; j.length; ) {
|
|
260
260
|
const c = j.shift();
|
|
261
261
|
if (!C.has(c)) {
|
|
262
262
|
C.add(c);
|
|
263
|
-
for (const i of
|
|
263
|
+
for (const i of b.get(c) ?? [])
|
|
264
264
|
j.push(i.to), c === i.from && j.push(...i.toNodeIds ?? [i.to]);
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
|
-
const H =
|
|
268
|
-
var d,
|
|
269
|
-
const i = (((d = D.get(c.id)) == null ? void 0 : d.length) ?? 0) === 0 && (((
|
|
270
|
-
return !C.has(c.id) || i &&
|
|
267
|
+
const H = h.filter((c) => {
|
|
268
|
+
var d, y;
|
|
269
|
+
const i = (((d = D.get(c.id)) == null ? void 0 : d.length) ?? 0) === 0 && (((y = b.get(c.id)) == null ? void 0 : y.length) ?? 0) === 0 && !te.has(c.id);
|
|
270
|
+
return !C.has(c.id) || i && h.length > 1;
|
|
271
271
|
});
|
|
272
272
|
for (const c of H)
|
|
273
273
|
for (const i of c.screenIds)
|
|
@@ -279,38 +279,38 @@ function Gt(e) {
|
|
|
279
279
|
nodeId: c.id
|
|
280
280
|
});
|
|
281
281
|
const Q = /* @__PURE__ */ new Map();
|
|
282
|
-
for (const c of
|
|
282
|
+
for (const c of h)
|
|
283
283
|
for (const i of c.sourceKeys) {
|
|
284
284
|
const d = Q.get(i) ?? {
|
|
285
285
|
nodeIds: /* @__PURE__ */ new Set(),
|
|
286
286
|
screenIds: /* @__PURE__ */ new Set()
|
|
287
287
|
};
|
|
288
288
|
d.nodeIds.add(c.id);
|
|
289
|
-
for (const
|
|
289
|
+
for (const y of c.screenIds) d.screenIds.add(y);
|
|
290
290
|
Q.set(i, d);
|
|
291
291
|
}
|
|
292
|
-
const
|
|
292
|
+
const pe = [...Q.entries()].map(([c, i]) => ({
|
|
293
293
|
sourceKey: c,
|
|
294
|
-
nodeIds: [...i.nodeIds].sort((d,
|
|
295
|
-
screenIds: [...i.screenIds].sort((d,
|
|
294
|
+
nodeIds: [...i.nodeIds].sort((d, y) => d.localeCompare(y)),
|
|
295
|
+
screenIds: [...i.screenIds].sort((d, y) => d.localeCompare(y)),
|
|
296
296
|
shared: i.nodeIds.size > 1
|
|
297
|
-
})).sort((c, i) => c.sourceKey.localeCompare(i.sourceKey)), ue =
|
|
298
|
-
const i = [...
|
|
299
|
-
(d,
|
|
297
|
+
})).sort((c, i) => c.sourceKey.localeCompare(i.sourceKey)), ue = h.map((c) => {
|
|
298
|
+
const i = [...b.get(c.id) ?? []].sort(
|
|
299
|
+
(d, y) => d.id.localeCompare(y.id)
|
|
300
300
|
);
|
|
301
301
|
return {
|
|
302
302
|
nodeId: c.id,
|
|
303
303
|
edgeIds: i.map((d) => d.id),
|
|
304
304
|
targetNodeIds: B(i.map((d) => d.to))
|
|
305
305
|
};
|
|
306
|
-
}).filter((c) => c.targetNodeIds.length > 1).sort((c, i) => c.nodeId.localeCompare(i.nodeId)),
|
|
307
|
-
|
|
306
|
+
}).filter((c) => c.targetNodeIds.length > 1).sort((c, i) => c.nodeId.localeCompare(i.nodeId)), V = new Set(
|
|
307
|
+
h.flatMap((c) => c.scenarioIds)
|
|
308
308
|
), ae = new Set(
|
|
309
309
|
(e.nonVisualScenarioIds ?? []).map((c) => c.trim())
|
|
310
310
|
), ne = B(
|
|
311
311
|
(e.scenarios ?? []).map((c) => c.id)
|
|
312
312
|
), Y = ne.filter(
|
|
313
|
-
(c) => !
|
|
313
|
+
(c) => !V.has(c) && !ae.has(c)
|
|
314
314
|
);
|
|
315
315
|
for (const c of Y)
|
|
316
316
|
t.push({
|
|
@@ -320,33 +320,33 @@ function Gt(e) {
|
|
|
320
320
|
scenarioId: c
|
|
321
321
|
});
|
|
322
322
|
t.sort(
|
|
323
|
-
(c, i) =>
|
|
323
|
+
(c, i) => We(c).localeCompare(We(i))
|
|
324
324
|
);
|
|
325
325
|
const re = B(
|
|
326
326
|
H.flatMap((c) => c.screenIds)
|
|
327
327
|
), J = {
|
|
328
328
|
screens: o.length,
|
|
329
|
-
canonicalNodes:
|
|
330
|
-
mergedScreens: Math.max(0, o.length -
|
|
331
|
-
edges:
|
|
332
|
-
connectedNodes:
|
|
329
|
+
canonicalNodes: h.length,
|
|
330
|
+
mergedScreens: Math.max(0, o.length - h.length),
|
|
331
|
+
edges: g.length,
|
|
332
|
+
connectedNodes: h.length - H.length,
|
|
333
333
|
disconnectedScreens: re,
|
|
334
334
|
codeScenarios: ne.length,
|
|
335
335
|
representedScenarios: ne.filter(
|
|
336
|
-
(c) =>
|
|
336
|
+
(c) => V.has(c)
|
|
337
337
|
).length,
|
|
338
338
|
missingScenarios: Y,
|
|
339
339
|
complete: re.length === 0 && Y.length === 0 && !t.some((c) => c.severity === "error") && s.size === 0
|
|
340
340
|
};
|
|
341
341
|
return {
|
|
342
342
|
version: 1,
|
|
343
|
-
nodes:
|
|
344
|
-
edges:
|
|
343
|
+
nodes: h,
|
|
344
|
+
edges: g,
|
|
345
345
|
aliases: Object.fromEntries(
|
|
346
346
|
Object.entries(a).sort(([c], [i]) => c.localeCompare(i))
|
|
347
347
|
),
|
|
348
|
-
sourceGroups:
|
|
349
|
-
startNodeIds:
|
|
348
|
+
sourceGroups: pe,
|
|
349
|
+
startNodeIds: P,
|
|
350
350
|
branches: ue,
|
|
351
351
|
warnings: t,
|
|
352
352
|
coverage: J
|
|
@@ -363,10 +363,10 @@ function Pe(e) {
|
|
|
363
363
|
}
|
|
364
364
|
return e;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function Ve(e) {
|
|
367
367
|
return JSON.stringify(Pe(e ?? null));
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function Wt(e) {
|
|
370
370
|
return !!(e && typeof e == "object" && !Array.isArray(e));
|
|
371
371
|
}
|
|
372
372
|
function L(e) {
|
|
@@ -414,7 +414,7 @@ function Je(e, t, o) {
|
|
|
414
414
|
screenIds: o.get(s) ?? [l]
|
|
415
415
|
})).sort((s, l) => s.representativeId.localeCompare(l.representativeId));
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function Vt(e) {
|
|
418
418
|
var o;
|
|
419
419
|
const t = /* @__PURE__ */ new Map();
|
|
420
420
|
for (const r of e ?? []) {
|
|
@@ -430,23 +430,23 @@ function Wt(e) {
|
|
|
430
430
|
}
|
|
431
431
|
function Jt(e, t, o, r) {
|
|
432
432
|
return (e ?? []).flatMap((n, s) => {
|
|
433
|
-
var
|
|
434
|
-
const l = (
|
|
433
|
+
var h, x, S;
|
|
434
|
+
const l = (h = n.from) == null ? void 0 : h.trim(), a = (x = n.to) == null ? void 0 : x.trim();
|
|
435
435
|
if (!l || !a || n.unresolvedTarget) return [];
|
|
436
436
|
const u = r.has(l) ? [{ representativeId: l, screenIds: [l] }] : Je(l, t, o), w = r.has(a) ? [{ representativeId: a, screenIds: [a] }] : Je(a, t, o);
|
|
437
437
|
if (!u.length || !w.length) return [];
|
|
438
|
-
const
|
|
438
|
+
const p = ((S = n.id) == null ? void 0 : S.trim()) || `discovery-edge:${s + 1}`;
|
|
439
439
|
return u.flatMap(
|
|
440
|
-
(
|
|
441
|
-
var D,
|
|
440
|
+
(g, E) => w.map((f, R) => {
|
|
441
|
+
var D, b;
|
|
442
442
|
return {
|
|
443
|
-
id: u.length === 1 && w.length === 1 ?
|
|
444
|
-
from:
|
|
443
|
+
id: u.length === 1 && w.length === 1 ? p : `${p}:${E + 1}:${R + 1}`,
|
|
444
|
+
from: g.representativeId,
|
|
445
445
|
to: f.representativeId,
|
|
446
|
-
fromScope:
|
|
446
|
+
fromScope: g.screenIds,
|
|
447
447
|
toScope: f.screenIds,
|
|
448
448
|
kind: ((D = n.kind) == null ? void 0 : D.trim()) || void 0,
|
|
449
|
-
label: ((
|
|
449
|
+
label: ((b = n.label) == null ? void 0 : b.trim()) || void 0
|
|
450
450
|
};
|
|
451
451
|
})
|
|
452
452
|
);
|
|
@@ -462,10 +462,10 @@ function Qt(e, t, o) {
|
|
|
462
462
|
}
|
|
463
463
|
);
|
|
464
464
|
if (!n.length) return [];
|
|
465
|
-
const s =
|
|
465
|
+
const s = Ve(
|
|
466
466
|
tt(o, e.environment)
|
|
467
467
|
), l = n.filter(
|
|
468
|
-
(a) =>
|
|
468
|
+
(a) => Ve(a.environment) === s
|
|
469
469
|
);
|
|
470
470
|
return [
|
|
471
471
|
...new Set(
|
|
@@ -507,10 +507,10 @@ function Xt(e, t) {
|
|
|
507
507
|
}));
|
|
508
508
|
}
|
|
509
509
|
function Ne(e, t) {
|
|
510
|
-
var a, u, w,
|
|
510
|
+
var a, u, w, p;
|
|
511
511
|
const o = (((a = e.interactions) == null ? void 0 : a.length) ?? 0) - (((u = t.interactions) == null ? void 0 : u.length) ?? 0);
|
|
512
512
|
if (o !== 0) return o;
|
|
513
|
-
const r = (w = e.scenarioIds) != null && w.includes("environment:baseline") ? 0 : 1, n = (
|
|
513
|
+
const r = (w = e.scenarioIds) != null && w.includes("environment:baseline") ? 0 : 1, n = (p = t.scenarioIds) != null && p.includes("environment:baseline") ? 0 : 1;
|
|
514
514
|
if (r !== n) return r - n;
|
|
515
515
|
const s = !e.environment && !e.preset ? 0 : 1, l = !t.environment && !t.preset ? 0 : 1;
|
|
516
516
|
return s !== l ? s - l : e.id.localeCompare(t.id);
|
|
@@ -603,25 +603,25 @@ function rn(e, t) {
|
|
|
603
603
|
return n.flatMap((u) => {
|
|
604
604
|
const w = s.get(u.id);
|
|
605
605
|
if (!w.length) return [];
|
|
606
|
-
const
|
|
607
|
-
(
|
|
608
|
-
s.get(
|
|
606
|
+
const h = n.filter(
|
|
607
|
+
(x) => tn(
|
|
608
|
+
s.get(x.id),
|
|
609
609
|
w
|
|
610
610
|
)
|
|
611
|
-
).sort((
|
|
612
|
-
const
|
|
613
|
-
if (
|
|
614
|
-
const
|
|
615
|
-
if (
|
|
616
|
-
const R =
|
|
611
|
+
).sort((x, S) => {
|
|
612
|
+
const g = s.get(S.id).length - s.get(x.id).length;
|
|
613
|
+
if (g !== 0) return g;
|
|
614
|
+
const E = x.flow && x.flow === u.flow ? 0 : 1, f = S.flow && S.flow === u.flow ? 0 : 1;
|
|
615
|
+
if (E !== f) return E - f;
|
|
616
|
+
const R = x.section && x.section === u.section ? 0 : 1, D = S.section && S.section === u.section ? 0 : 1;
|
|
617
617
|
if (R !== D) return R - D;
|
|
618
|
-
const
|
|
619
|
-
return
|
|
618
|
+
const b = x.id === l ? 0 : 1, M = S.id === l ? 0 : 1;
|
|
619
|
+
return b !== M ? b - M : Ne(x, S);
|
|
620
620
|
})[0];
|
|
621
|
-
return
|
|
621
|
+
return h ? [
|
|
622
622
|
{
|
|
623
|
-
id: `discovery-recipe:${encodeURIComponent(
|
|
624
|
-
from:
|
|
623
|
+
id: `discovery-recipe:${encodeURIComponent(h.id)}:${encodeURIComponent(u.id)}`,
|
|
624
|
+
from: h.id,
|
|
625
625
|
to: u.id,
|
|
626
626
|
kind: "recipe-step"
|
|
627
627
|
}
|
|
@@ -691,49 +691,49 @@ function sn(e, t, o) {
|
|
|
691
691
|
});
|
|
692
692
|
}
|
|
693
693
|
function an(e, t) {
|
|
694
|
-
var w,
|
|
695
|
-
const o = new Set(e.map((
|
|
696
|
-
e.map((
|
|
694
|
+
var w, p, h, x, S;
|
|
695
|
+
const o = new Set(e.map((g) => g.id)), r = new Map(
|
|
696
|
+
e.map((g, E) => [g.id, E])
|
|
697
697
|
), n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
|
|
698
|
-
for (const
|
|
699
|
-
n.set(
|
|
700
|
-
for (const
|
|
701
|
-
const
|
|
702
|
-
...(
|
|
703
|
-
(f) => [f,
|
|
698
|
+
for (const g of o)
|
|
699
|
+
n.set(g, /* @__PURE__ */ new Set()), s.set(g, /* @__PURE__ */ new Set()), l.set(g, /* @__PURE__ */ new Set());
|
|
700
|
+
for (const g of t) {
|
|
701
|
+
const E = [
|
|
702
|
+
...(g.fromScope ?? [g.from]).map(
|
|
703
|
+
(f) => [f, g.to]
|
|
704
704
|
),
|
|
705
|
-
...(
|
|
706
|
-
(f) => [
|
|
705
|
+
...(g.toScope ?? [g.to]).map(
|
|
706
|
+
(f) => [g.from, f]
|
|
707
707
|
)
|
|
708
708
|
];
|
|
709
|
-
for (const [f, R] of
|
|
710
|
-
!o.has(f) || !o.has(R) || ((w = n.get(R)) == null || w.add(f), (
|
|
709
|
+
for (const [f, R] of E)
|
|
710
|
+
!o.has(f) || !o.has(R) || ((w = n.get(R)) == null || w.add(f), (p = s.get(f)) == null || p.add(R), (h = l.get(f)) == null || h.add(R), (x = l.get(R)) == null || x.add(f));
|
|
711
711
|
}
|
|
712
712
|
const a = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
|
|
713
|
-
for (const
|
|
714
|
-
if (u.has(
|
|
715
|
-
const
|
|
713
|
+
for (const g of o) {
|
|
714
|
+
if (u.has(g)) continue;
|
|
715
|
+
const E = [], f = [g];
|
|
716
716
|
for (; f.length; ) {
|
|
717
|
-
const
|
|
718
|
-
if (!u.has(
|
|
719
|
-
u.add(
|
|
720
|
-
for (const C of l.get(
|
|
717
|
+
const P = f.shift();
|
|
718
|
+
if (!u.has(P)) {
|
|
719
|
+
u.add(P), E.push(P);
|
|
720
|
+
for (const C of l.get(P) ?? [])
|
|
721
721
|
u.has(C) || f.push(C);
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
|
-
if (
|
|
724
|
+
if (E.length === 1 && (((S = l.get(E[0])) == null ? void 0 : S.size) ?? 0) === 0)
|
|
725
725
|
continue;
|
|
726
|
-
const R =
|
|
726
|
+
const R = E.filter((P) => {
|
|
727
727
|
var C;
|
|
728
|
-
return (((C = n.get(
|
|
728
|
+
return (((C = n.get(P)) == null ? void 0 : C.size) ?? 0) === 0;
|
|
729
729
|
}).sort(
|
|
730
|
-
(
|
|
731
|
-
), D = [...
|
|
732
|
-
(
|
|
730
|
+
(P, C) => (r.get(P) ?? Number.MAX_SAFE_INTEGER) - (r.get(C) ?? Number.MAX_SAFE_INTEGER) || P.localeCompare(C)
|
|
731
|
+
), D = [...E].sort(
|
|
732
|
+
(P, C) => (r.get(P) ?? Number.MAX_SAFE_INTEGER) - (r.get(C) ?? Number.MAX_SAFE_INTEGER) || P.localeCompare(C)
|
|
733
733
|
)[0];
|
|
734
734
|
if (!D) continue;
|
|
735
|
-
const
|
|
736
|
-
const C = [
|
|
735
|
+
const b = [D], M = /* @__PURE__ */ new Set(), te = (P) => {
|
|
736
|
+
const C = [P];
|
|
737
737
|
for (; C.length; ) {
|
|
738
738
|
const j = C.shift();
|
|
739
739
|
if (!M.has(j)) {
|
|
@@ -744,13 +744,13 @@ function an(e, t) {
|
|
|
744
744
|
}
|
|
745
745
|
};
|
|
746
746
|
te(D);
|
|
747
|
-
for (const
|
|
748
|
-
M.has(
|
|
749
|
-
for (const
|
|
750
|
-
a.add(
|
|
747
|
+
for (const P of R)
|
|
748
|
+
M.has(P) || (b.push(P), te(P));
|
|
749
|
+
for (const P of b)
|
|
750
|
+
a.add(P);
|
|
751
751
|
}
|
|
752
752
|
return [...a].sort(
|
|
753
|
-
(
|
|
753
|
+
(g, E) => (r.get(g) ?? Number.MAX_SAFE_INTEGER) - (r.get(E) ?? Number.MAX_SAFE_INTEGER) || g.localeCompare(E)
|
|
754
754
|
);
|
|
755
755
|
}
|
|
756
756
|
function ot(e) {
|
|
@@ -762,7 +762,7 @@ function ot(e) {
|
|
|
762
762
|
);
|
|
763
763
|
}
|
|
764
764
|
function cn(e) {
|
|
765
|
-
var u, w,
|
|
765
|
+
var u, w, p, h, x;
|
|
766
766
|
const t = Xt(
|
|
767
767
|
e.pages,
|
|
768
768
|
e.manifest
|
|
@@ -775,7 +775,7 @@ function cn(e) {
|
|
|
775
775
|
e.manifest.edges,
|
|
776
776
|
o,
|
|
777
777
|
r,
|
|
778
|
-
new Set(n.map((
|
|
778
|
+
new Set(n.map((S) => S.id))
|
|
779
779
|
),
|
|
780
780
|
...nn(n, o),
|
|
781
781
|
...rn(n, o),
|
|
@@ -787,11 +787,11 @@ function cn(e) {
|
|
|
787
787
|
return Gt({
|
|
788
788
|
screens: n,
|
|
789
789
|
assets: e.assets,
|
|
790
|
-
scenarios:
|
|
790
|
+
scenarios: Vt(e.manifest.routes),
|
|
791
791
|
explicitEdges: a,
|
|
792
792
|
inferredEdges: l,
|
|
793
|
-
startScreenIds: (
|
|
794
|
-
nonVisualScenarioIds: (
|
|
793
|
+
startScreenIds: (h = (p = e.storyboard) == null ? void 0 : p.startScreenIds) != null && h.length ? e.storyboard.startScreenIds : an(n, [...a, ...l]),
|
|
794
|
+
nonVisualScenarioIds: (x = e.storyboard) == null ? void 0 : x.nonVisualScenarioIds
|
|
795
795
|
});
|
|
796
796
|
}
|
|
797
797
|
async function st(e) {
|
|
@@ -803,7 +803,7 @@ async function st(e) {
|
|
|
803
803
|
if (!o.ok)
|
|
804
804
|
throw new Error(`Storyboard discovery failed (${o.status})`);
|
|
805
805
|
const r = await o.json();
|
|
806
|
-
if (!
|
|
806
|
+
if (!Wt(r))
|
|
807
807
|
throw new Error("Storyboard discovery returned an invalid manifest.");
|
|
808
808
|
return {
|
|
809
809
|
manifest: r,
|
|
@@ -826,7 +826,7 @@ async function Nn(e) {
|
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
828
|
const Ee = "var(--pygmalion-catalog-surface, #ffffff)", Ce = "var(--pygmalion-catalog-canvas, #f5f5f5)", ke = "var(--pygmalion-catalog-border, #e5e7eb)", Re = "var(--pygmalion-catalog-text, #202124)", G = "var(--pygmalion-catalog-muted, #6b7280)", ln = "var(--pygmalion-catalog-header, #11182f)", dn = "var(--pygmalion-catalog-accent, #7c6cf2)";
|
|
829
|
-
function
|
|
829
|
+
function $n({
|
|
830
830
|
title: e,
|
|
831
831
|
eyebrow: t,
|
|
832
832
|
description: o,
|
|
@@ -838,7 +838,7 @@ function An({
|
|
|
838
838
|
bodyBackground: u = Ee,
|
|
839
839
|
bodyGap: w = 40
|
|
840
840
|
}) {
|
|
841
|
-
return /* @__PURE__ */
|
|
841
|
+
return /* @__PURE__ */ A(
|
|
842
842
|
"section",
|
|
843
843
|
{
|
|
844
844
|
"data-pygmalion-catalog-document": "",
|
|
@@ -855,7 +855,7 @@ function An({
|
|
|
855
855
|
fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
|
|
856
856
|
},
|
|
857
857
|
children: [
|
|
858
|
-
/* @__PURE__ */
|
|
858
|
+
/* @__PURE__ */ A(
|
|
859
859
|
"header",
|
|
860
860
|
{
|
|
861
861
|
style: {
|
|
@@ -869,8 +869,8 @@ function An({
|
|
|
869
869
|
background: l
|
|
870
870
|
},
|
|
871
871
|
children: [
|
|
872
|
-
/* @__PURE__ */
|
|
873
|
-
t ? /* @__PURE__ */
|
|
872
|
+
/* @__PURE__ */ A("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
|
|
873
|
+
t ? /* @__PURE__ */ v(
|
|
874
874
|
"div",
|
|
875
875
|
{
|
|
876
876
|
style: {
|
|
@@ -883,7 +883,7 @@ function An({
|
|
|
883
883
|
children: t
|
|
884
884
|
}
|
|
885
885
|
) : null,
|
|
886
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ v(
|
|
887
887
|
"h1",
|
|
888
888
|
{
|
|
889
889
|
style: {
|
|
@@ -897,7 +897,7 @@ function An({
|
|
|
897
897
|
children: e
|
|
898
898
|
}
|
|
899
899
|
),
|
|
900
|
-
o ? /* @__PURE__ */
|
|
900
|
+
o ? /* @__PURE__ */ v(
|
|
901
901
|
"div",
|
|
902
902
|
{
|
|
903
903
|
style: {
|
|
@@ -910,7 +910,7 @@ function An({
|
|
|
910
910
|
}
|
|
911
911
|
) : null
|
|
912
912
|
] }),
|
|
913
|
-
r || n ? /* @__PURE__ */
|
|
913
|
+
r || n ? /* @__PURE__ */ A(
|
|
914
914
|
"div",
|
|
915
915
|
{
|
|
916
916
|
style: {
|
|
@@ -922,15 +922,15 @@ function An({
|
|
|
922
922
|
whiteSpace: "nowrap"
|
|
923
923
|
},
|
|
924
924
|
children: [
|
|
925
|
-
r ? /* @__PURE__ */
|
|
926
|
-
n ? /* @__PURE__ */
|
|
925
|
+
r ? /* @__PURE__ */ v("span", { children: r }) : null,
|
|
926
|
+
n ? /* @__PURE__ */ v("span", { children: n }) : null
|
|
927
927
|
]
|
|
928
928
|
}
|
|
929
929
|
) : null
|
|
930
930
|
]
|
|
931
931
|
}
|
|
932
932
|
),
|
|
933
|
-
/* @__PURE__ */
|
|
933
|
+
/* @__PURE__ */ v(
|
|
934
934
|
"div",
|
|
935
935
|
{
|
|
936
936
|
"data-pygmalion-catalog-document-body": "",
|
|
@@ -950,7 +950,7 @@ function An({
|
|
|
950
950
|
}
|
|
951
951
|
);
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function An({
|
|
954
954
|
title: e,
|
|
955
955
|
itemId: t,
|
|
956
956
|
count: o,
|
|
@@ -958,7 +958,7 @@ function $n({
|
|
|
958
958
|
children: n,
|
|
959
959
|
tone: s = "tinted"
|
|
960
960
|
}) {
|
|
961
|
-
return /* @__PURE__ */
|
|
961
|
+
return /* @__PURE__ */ A(
|
|
962
962
|
"section",
|
|
963
963
|
{
|
|
964
964
|
"data-pygmalion-catalog-section": "",
|
|
@@ -974,8 +974,8 @@ function $n({
|
|
|
974
974
|
background: s === "tinted" ? Ce : "transparent"
|
|
975
975
|
},
|
|
976
976
|
children: [
|
|
977
|
-
/* @__PURE__ */
|
|
978
|
-
/* @__PURE__ */
|
|
977
|
+
/* @__PURE__ */ A("header", { style: { display: "flex", alignItems: "baseline", gap: 8 }, children: [
|
|
978
|
+
/* @__PURE__ */ v(
|
|
979
979
|
"h2",
|
|
980
980
|
{
|
|
981
981
|
style: {
|
|
@@ -987,9 +987,9 @@ function $n({
|
|
|
987
987
|
children: e
|
|
988
988
|
}
|
|
989
989
|
),
|
|
990
|
-
typeof o == "number" ? /* @__PURE__ */
|
|
990
|
+
typeof o == "number" ? /* @__PURE__ */ v("span", { style: { color: G, fontSize: 11 }, children: o }) : null
|
|
991
991
|
] }),
|
|
992
|
-
r ? /* @__PURE__ */
|
|
992
|
+
r ? /* @__PURE__ */ v("div", { style: { marginTop: -10, color: G, fontSize: 11 }, children: r }) : null,
|
|
993
993
|
n
|
|
994
994
|
]
|
|
995
995
|
}
|
|
@@ -1000,12 +1000,12 @@ function Mn({
|
|
|
1000
1000
|
columns: t,
|
|
1001
1001
|
cornerLabel: o,
|
|
1002
1002
|
renderCell: r,
|
|
1003
|
-
renderRowLabel: n = (u) => u,
|
|
1004
|
-
renderColumnLabel: s = (u) => u,
|
|
1003
|
+
renderRowLabel: n = (u) => String(u),
|
|
1004
|
+
renderColumnLabel: s = (u) => String(u),
|
|
1005
1005
|
boundary: l = !0,
|
|
1006
1006
|
cellStyle: a
|
|
1007
1007
|
}) {
|
|
1008
|
-
return /* @__PURE__ */
|
|
1008
|
+
return /* @__PURE__ */ v(
|
|
1009
1009
|
"div",
|
|
1010
1010
|
{
|
|
1011
1011
|
"data-pygmalion-catalog-matrix": "",
|
|
@@ -1017,7 +1017,7 @@ function Mn({
|
|
|
1017
1017
|
border: l ? `1px dashed ${dn}` : void 0,
|
|
1018
1018
|
borderRadius: l ? 4 : void 0
|
|
1019
1019
|
},
|
|
1020
|
-
children: /* @__PURE__ */
|
|
1020
|
+
children: /* @__PURE__ */ A(
|
|
1021
1021
|
"table",
|
|
1022
1022
|
{
|
|
1023
1023
|
style: {
|
|
@@ -1026,8 +1026,8 @@ function Mn({
|
|
|
1026
1026
|
borderSpacing: 0
|
|
1027
1027
|
},
|
|
1028
1028
|
children: [
|
|
1029
|
-
/* @__PURE__ */
|
|
1030
|
-
/* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ v("thead", { children: /* @__PURE__ */ A("tr", { children: [
|
|
1030
|
+
/* @__PURE__ */ v(
|
|
1031
1031
|
"th",
|
|
1032
1032
|
{
|
|
1033
1033
|
style: {
|
|
@@ -1041,7 +1041,7 @@ function Mn({
|
|
|
1041
1041
|
children: o
|
|
1042
1042
|
}
|
|
1043
1043
|
),
|
|
1044
|
-
t.map((u) => /* @__PURE__ */
|
|
1044
|
+
t.map((u) => /* @__PURE__ */ v(
|
|
1045
1045
|
"th",
|
|
1046
1046
|
{
|
|
1047
1047
|
style: {
|
|
@@ -1054,11 +1054,11 @@ function Mn({
|
|
|
1054
1054
|
},
|
|
1055
1055
|
children: s(u)
|
|
1056
1056
|
},
|
|
1057
|
-
u
|
|
1057
|
+
`${typeof u}:${String(u)}`
|
|
1058
1058
|
))
|
|
1059
1059
|
] }) }),
|
|
1060
|
-
/* @__PURE__ */
|
|
1061
|
-
/* @__PURE__ */
|
|
1060
|
+
/* @__PURE__ */ v("tbody", { children: e.map((u) => /* @__PURE__ */ A("tr", { children: [
|
|
1061
|
+
/* @__PURE__ */ v(
|
|
1062
1062
|
"th",
|
|
1063
1063
|
{
|
|
1064
1064
|
style: {
|
|
@@ -1072,7 +1072,7 @@ function Mn({
|
|
|
1072
1072
|
children: n(u)
|
|
1073
1073
|
}
|
|
1074
1074
|
),
|
|
1075
|
-
t.map((w) => /* @__PURE__ */
|
|
1075
|
+
t.map((w) => /* @__PURE__ */ v(
|
|
1076
1076
|
"td",
|
|
1077
1077
|
{
|
|
1078
1078
|
style: {
|
|
@@ -1083,9 +1083,9 @@ function Mn({
|
|
|
1083
1083
|
},
|
|
1084
1084
|
children: r(u, w)
|
|
1085
1085
|
},
|
|
1086
|
-
w
|
|
1086
|
+
`${typeof w}:${String(w)}`
|
|
1087
1087
|
))
|
|
1088
|
-
] }, u)) })
|
|
1088
|
+
] }, `${typeof u}:${String(u)}`)) })
|
|
1089
1089
|
]
|
|
1090
1090
|
}
|
|
1091
1091
|
)
|
|
@@ -1128,7 +1128,7 @@ function mn({
|
|
|
1128
1128
|
secondaryLabel: r,
|
|
1129
1129
|
minimumColumnWidth: n
|
|
1130
1130
|
}) {
|
|
1131
|
-
return /* @__PURE__ */
|
|
1131
|
+
return /* @__PURE__ */ A(
|
|
1132
1132
|
"section",
|
|
1133
1133
|
{
|
|
1134
1134
|
"data-pygmalion-catalog-page": e.id,
|
|
@@ -1143,14 +1143,14 @@ function mn({
|
|
|
1143
1143
|
fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
|
|
1144
1144
|
},
|
|
1145
1145
|
children: [
|
|
1146
|
-
/* @__PURE__ */
|
|
1147
|
-
/* @__PURE__ */
|
|
1148
|
-
/* @__PURE__ */
|
|
1146
|
+
/* @__PURE__ */ A("header", { style: { marginBottom: 24 }, children: [
|
|
1147
|
+
/* @__PURE__ */ v("h1", { style: { margin: 0, fontSize: 24, lineHeight: 1.35 }, children: e.name }),
|
|
1148
|
+
/* @__PURE__ */ A("p", { style: { margin: "6px 0 0", color: G, fontSize: 13 }, children: [
|
|
1149
1149
|
t.length,
|
|
1150
1150
|
" assets"
|
|
1151
1151
|
] })
|
|
1152
1152
|
] }),
|
|
1153
|
-
/* @__PURE__ */
|
|
1153
|
+
/* @__PURE__ */ v(
|
|
1154
1154
|
"div",
|
|
1155
1155
|
{
|
|
1156
1156
|
style: {
|
|
@@ -1158,7 +1158,7 @@ function mn({
|
|
|
1158
1158
|
gridTemplateColumns: "repeat(6, max-content)",
|
|
1159
1159
|
gap: 16
|
|
1160
1160
|
},
|
|
1161
|
-
children: t.map((s) => /* @__PURE__ */
|
|
1161
|
+
children: t.map((s) => /* @__PURE__ */ A(
|
|
1162
1162
|
"article",
|
|
1163
1163
|
{
|
|
1164
1164
|
"data-pygmalion-catalog-item": s.id,
|
|
@@ -1171,7 +1171,7 @@ function mn({
|
|
|
1171
1171
|
background: Ee
|
|
1172
1172
|
},
|
|
1173
1173
|
children: [
|
|
1174
|
-
/* @__PURE__ */
|
|
1174
|
+
/* @__PURE__ */ v(
|
|
1175
1175
|
"div",
|
|
1176
1176
|
{
|
|
1177
1177
|
style: {
|
|
@@ -1184,7 +1184,7 @@ function mn({
|
|
|
1184
1184
|
children: o(s)
|
|
1185
1185
|
}
|
|
1186
1186
|
),
|
|
1187
|
-
/* @__PURE__ */
|
|
1187
|
+
/* @__PURE__ */ v(
|
|
1188
1188
|
"div",
|
|
1189
1189
|
{
|
|
1190
1190
|
style: {
|
|
@@ -1199,7 +1199,7 @@ function mn({
|
|
|
1199
1199
|
children: s.name
|
|
1200
1200
|
}
|
|
1201
1201
|
),
|
|
1202
|
-
r ? /* @__PURE__ */
|
|
1202
|
+
r ? /* @__PURE__ */ v("div", { style: { marginTop: 4, color: G, fontSize: 11, lineHeight: 1.45 }, children: r(s) }) : s.codeName ? /* @__PURE__ */ v(
|
|
1203
1203
|
"div",
|
|
1204
1204
|
{
|
|
1205
1205
|
style: {
|
|
@@ -1248,7 +1248,7 @@ function On(e) {
|
|
|
1248
1248
|
}
|
|
1249
1249
|
const o = {}, r = [];
|
|
1250
1250
|
for (const n of t.values()) {
|
|
1251
|
-
const s = () => /* @__PURE__ */
|
|
1251
|
+
const s = () => /* @__PURE__ */ v(
|
|
1252
1252
|
mn,
|
|
1253
1253
|
{
|
|
1254
1254
|
page: n.page,
|
|
@@ -1280,8 +1280,8 @@ function On(e) {
|
|
|
1280
1280
|
}
|
|
1281
1281
|
};
|
|
1282
1282
|
}
|
|
1283
|
-
function
|
|
1284
|
-
const o = Object.entries((e == null ? void 0 : e.props) ?? {}).filter(([, a]) => a.length > 0).sort(([a, u], [w,
|
|
1283
|
+
function pn(e, t = 60) {
|
|
1284
|
+
const o = Object.entries((e == null ? void 0 : e.props) ?? {}).filter(([, a]) => a.length > 0).sort(([a, u], [w, p]) => p.length - u.length || a.localeCompare(w)), r = o[0], n = o[1], s = Math.max(1, (r == null ? void 0 : r[1].length) ?? 1), l = n == null ? void 0 : n[1].slice(0, Math.max(1, Math.floor(t / s)));
|
|
1285
1285
|
return {
|
|
1286
1286
|
row: r,
|
|
1287
1287
|
column: n ? [n[0], l ?? []] : void 0,
|
|
@@ -1289,12 +1289,12 @@ function hn(e, t = 60) {
|
|
|
1289
1289
|
additional: o.slice(2)
|
|
1290
1290
|
};
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1292
|
+
function hn(e, t, o, r) {
|
|
1293
1293
|
return {
|
|
1294
1294
|
...e.defaultProps,
|
|
1295
1295
|
...Object.fromEntries(t.fixed),
|
|
1296
|
-
...t.row && o ? { [t.row[0]]: o } : {},
|
|
1297
|
-
...t.column && r ? { [t.column[0]]: r } : {}
|
|
1296
|
+
...t.row && o !== void 0 ? { [t.row[0]]: o } : {},
|
|
1297
|
+
...t.column && r !== void 0 ? { [t.column[0]]: r } : {}
|
|
1298
1298
|
};
|
|
1299
1299
|
}
|
|
1300
1300
|
function gn({
|
|
@@ -1304,7 +1304,7 @@ function gn({
|
|
|
1304
1304
|
}) {
|
|
1305
1305
|
var a, u;
|
|
1306
1306
|
if (!t)
|
|
1307
|
-
return /* @__PURE__ */
|
|
1307
|
+
return /* @__PURE__ */ A(
|
|
1308
1308
|
"section",
|
|
1309
1309
|
{
|
|
1310
1310
|
"data-pygmalion-catalog-component": e.id,
|
|
@@ -1318,13 +1318,13 @@ function gn({
|
|
|
1318
1318
|
background: Ce
|
|
1319
1319
|
},
|
|
1320
1320
|
children: [
|
|
1321
|
-
/* @__PURE__ */
|
|
1322
|
-
/* @__PURE__ */
|
|
1321
|
+
/* @__PURE__ */ v("strong", { children: e.name }),
|
|
1322
|
+
/* @__PURE__ */ v("p", { style: { color: G }, children: "The component is not registered." })
|
|
1323
1323
|
]
|
|
1324
1324
|
}
|
|
1325
1325
|
);
|
|
1326
|
-
const r =
|
|
1327
|
-
return /* @__PURE__ */
|
|
1326
|
+
const r = pn(t, o), n = ((a = r.row) == null ? void 0 : a[1]) ?? [void 0], s = ((u = r.column) == null ? void 0 : u[1]) ?? [void 0], l = t.component;
|
|
1327
|
+
return /* @__PURE__ */ A(
|
|
1328
1328
|
"section",
|
|
1329
1329
|
{
|
|
1330
1330
|
"data-pygmalion-catalog-component": e.id,
|
|
@@ -1339,11 +1339,11 @@ function gn({
|
|
|
1339
1339
|
fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif"
|
|
1340
1340
|
},
|
|
1341
1341
|
children: [
|
|
1342
|
-
/* @__PURE__ */
|
|
1343
|
-
/* @__PURE__ */
|
|
1344
|
-
e.sourcePath ? /* @__PURE__ */
|
|
1342
|
+
/* @__PURE__ */ A("header", { style: { marginBottom: 24 }, children: [
|
|
1343
|
+
/* @__PURE__ */ v("h1", { style: { margin: 0, fontSize: 24 }, children: e.name }),
|
|
1344
|
+
e.sourcePath ? /* @__PURE__ */ v("p", { style: { margin: "6px 0 0", color: G, fontSize: 12 }, children: e.sourcePath }) : null
|
|
1345
1345
|
] }),
|
|
1346
|
-
/* @__PURE__ */
|
|
1346
|
+
/* @__PURE__ */ v(
|
|
1347
1347
|
"div",
|
|
1348
1348
|
{
|
|
1349
1349
|
style: {
|
|
@@ -1352,12 +1352,13 @@ function gn({
|
|
|
1352
1352
|
gap: 12
|
|
1353
1353
|
},
|
|
1354
1354
|
children: n.flatMap(
|
|
1355
|
-
(w) => s.map((
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
r.
|
|
1355
|
+
(w) => s.map((p) => {
|
|
1356
|
+
var S, g;
|
|
1357
|
+
const h = hn(t, r, w, p), x = [
|
|
1358
|
+
r.row && w !== void 0 ? `${((S = t.propLabels) == null ? void 0 : S[r.row[0]]) ?? r.row[0]}=${String(w)}` : "",
|
|
1359
|
+
r.column && p !== void 0 ? `${((g = t.propLabels) == null ? void 0 : g[r.column[0]]) ?? r.column[0]}=${String(p)}` : ""
|
|
1359
1360
|
].filter(Boolean).join(" · ");
|
|
1360
|
-
return /* @__PURE__ */
|
|
1361
|
+
return /* @__PURE__ */ A(
|
|
1361
1362
|
"article",
|
|
1362
1363
|
{
|
|
1363
1364
|
style: {
|
|
@@ -1368,43 +1369,46 @@ function gn({
|
|
|
1368
1369
|
background: Ee
|
|
1369
1370
|
},
|
|
1370
1371
|
children: [
|
|
1371
|
-
|
|
1372
|
-
/* @__PURE__ */
|
|
1372
|
+
x ? /* @__PURE__ */ v("div", { style: { marginBottom: 12, color: G, fontSize: 11 }, children: x }) : null,
|
|
1373
|
+
/* @__PURE__ */ v("div", { style: { display: "flex", minHeight: 44, alignItems: "center" }, children: Ge(
|
|
1373
1374
|
l,
|
|
1374
|
-
|
|
1375
|
+
h,
|
|
1375
1376
|
t.children === "text" ? t.defaultChildren ?? e.name : void 0
|
|
1376
1377
|
) })
|
|
1377
1378
|
]
|
|
1378
1379
|
},
|
|
1379
|
-
`${w ?? "default"}:${
|
|
1380
|
+
`${typeof w}:${String(w ?? "default")}:${typeof p}:${String(p ?? "default")}`
|
|
1380
1381
|
);
|
|
1381
1382
|
})
|
|
1382
1383
|
)
|
|
1383
1384
|
}
|
|
1384
1385
|
),
|
|
1385
|
-
r.additional.map(([w,
|
|
1386
|
-
|
|
1387
|
-
/* @__PURE__ */
|
|
1388
|
-
"
|
|
1389
|
-
{
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1386
|
+
r.additional.map(([w, p]) => {
|
|
1387
|
+
var h;
|
|
1388
|
+
return /* @__PURE__ */ A("section", { style: { marginTop: 20 }, children: [
|
|
1389
|
+
/* @__PURE__ */ v("h2", { style: { margin: "0 0 10px", color: G, fontSize: 12 }, children: ((h = t.propLabels) == null ? void 0 : h[w]) ?? w }),
|
|
1390
|
+
/* @__PURE__ */ v("div", { style: { display: "flex", flexWrap: "wrap", gap: 12 }, children: p.map((x) => /* @__PURE__ */ A(
|
|
1391
|
+
"article",
|
|
1392
|
+
{
|
|
1393
|
+
style: {
|
|
1394
|
+
padding: 16,
|
|
1395
|
+
border: `1px solid ${ke}`,
|
|
1396
|
+
borderRadius: 10,
|
|
1397
|
+
background: Ee
|
|
1398
|
+
},
|
|
1399
|
+
children: [
|
|
1400
|
+
/* @__PURE__ */ v("div", { style: { marginBottom: 12, color: G, fontSize: 11 }, children: String(x) }),
|
|
1401
|
+
Ge(
|
|
1402
|
+
l,
|
|
1403
|
+
{ ...t.defaultProps, [w]: x },
|
|
1404
|
+
t.children === "text" ? t.defaultChildren ?? e.name : void 0
|
|
1405
|
+
)
|
|
1406
|
+
]
|
|
1395
1407
|
},
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
{ ...t.defaultProps, [w]: p },
|
|
1401
|
-
t.children === "text" ? t.defaultChildren ?? e.name : void 0
|
|
1402
|
-
)
|
|
1403
|
-
]
|
|
1404
|
-
},
|
|
1405
|
-
p
|
|
1406
|
-
)) })
|
|
1407
|
-
] }, w))
|
|
1408
|
+
`${typeof x}:${String(x)}`
|
|
1409
|
+
)) })
|
|
1410
|
+
] }, w);
|
|
1411
|
+
})
|
|
1408
1412
|
]
|
|
1409
1413
|
}
|
|
1410
1414
|
);
|
|
@@ -1417,7 +1421,7 @@ function Dn(e) {
|
|
|
1417
1421
|
e.kind,
|
|
1418
1422
|
s.id,
|
|
1419
1423
|
e.registryPrefix
|
|
1420
|
-
), a = e.registry[s.name], u = () => /* @__PURE__ */
|
|
1424
|
+
), a = e.registry[s.name], u = () => /* @__PURE__ */ v(
|
|
1421
1425
|
gn,
|
|
1422
1426
|
{
|
|
1423
1427
|
item: s,
|
|
@@ -1468,7 +1472,7 @@ function Ye(e) {
|
|
|
1468
1472
|
const t = e;
|
|
1469
1473
|
return !Number.isSafeInteger(t.width) || !Number.isSafeInteger(t.height) || Number(t.width) < 1 || Number(t.height) < 1 || Number(t.width) > 65536 || Number(t.height) > 65536 ? null : { width: Number(t.width), height: Number(t.height) };
|
|
1470
1474
|
}
|
|
1471
|
-
function
|
|
1475
|
+
function Sn(e) {
|
|
1472
1476
|
if (!e || typeof e != "object" || Array.isArray(e)) return null;
|
|
1473
1477
|
const t = e, o = Ye(t.before), r = Ye(t.after);
|
|
1474
1478
|
if (!o || !r || !Number.isSafeInteger(t.changedPixels) || !Number.isSafeInteger(t.totalPixels) || Number(t.changedPixels) < 0 || Number(t.totalPixels) < 1 || Number(t.changedPixels) > Number(t.totalPixels) || typeof t.threshold != "number" || !Number.isFinite(t.threshold) || t.threshold < 0 || t.threshold > 1)
|
|
@@ -1485,7 +1489,7 @@ function bn(e) {
|
|
|
1485
1489
|
heatmapUrl: n
|
|
1486
1490
|
};
|
|
1487
1491
|
}
|
|
1488
|
-
function
|
|
1492
|
+
function bn(e, t) {
|
|
1489
1493
|
if (!e || typeof e != "object" || Array.isArray(e)) return null;
|
|
1490
1494
|
const o = e;
|
|
1491
1495
|
if (typeof o.id != "string" || !o.id) return null;
|
|
@@ -1493,7 +1497,7 @@ function vn(e, t) {
|
|
|
1493
1497
|
if (!n) return null;
|
|
1494
1498
|
const s = Me(o.after);
|
|
1495
1499
|
if (t === "changed" && !s) return null;
|
|
1496
|
-
const l = s ?
|
|
1500
|
+
const l = s ? Sn(o.pixelDiff) : null;
|
|
1497
1501
|
return {
|
|
1498
1502
|
id: o.id,
|
|
1499
1503
|
before: n,
|
|
@@ -1505,7 +1509,7 @@ function vn(e, t) {
|
|
|
1505
1509
|
...l ? { pixelDiff: l } : {}
|
|
1506
1510
|
};
|
|
1507
1511
|
}
|
|
1508
|
-
function
|
|
1512
|
+
function vn(e, t = []) {
|
|
1509
1513
|
const o = new Set(t), r = o.size > 0, n = /* @__PURE__ */ new Set(), s = [
|
|
1510
1514
|
...e.styles.map((l) => l.affectedFrames ?? []),
|
|
1511
1515
|
...e.texts.map((l) => l.affectedFrames ?? []),
|
|
@@ -1533,11 +1537,11 @@ async function Ze(e, t, o) {
|
|
|
1533
1537
|
);
|
|
1534
1538
|
if (typeof n.baselineId != "string" || !n.baselineId)
|
|
1535
1539
|
throw new Error("Pygmalion visual QA response has no baselineId");
|
|
1536
|
-
const s = Array.isArray(n.frames) ? n.frames.map((
|
|
1537
|
-
if (!
|
|
1538
|
-
const
|
|
1539
|
-
return typeof
|
|
1540
|
-
}).filter((
|
|
1540
|
+
const s = Array.isArray(n.frames) ? n.frames.map((p) => bn(p, o.phase)).filter((p) => p != null) : [], l = Array.isArray(n.failures) ? n.failures.map((p) => {
|
|
1541
|
+
if (!p || typeof p != "object" || Array.isArray(p)) return null;
|
|
1542
|
+
const h = p;
|
|
1543
|
+
return typeof h.id == "string" && typeof h.error == "string" ? { id: h.id, error: h.error } : null;
|
|
1544
|
+
}).filter((p) => p != null) : [], a = new Set(o.frameIds), w = new Set(s.map((p) => p.id)).size === s.length && s.every((p) => a.has(p.id)) && l.every((p) => a.has(p.id));
|
|
1541
1545
|
return {
|
|
1542
1546
|
phase: o.phase,
|
|
1543
1547
|
baselineId: n.baselineId,
|
|
@@ -1576,20 +1580,20 @@ async function ee(e) {
|
|
|
1576
1580
|
return t;
|
|
1577
1581
|
}
|
|
1578
1582
|
function kn(e = {}) {
|
|
1579
|
-
var re, J, Z,
|
|
1583
|
+
var re, J, Z, W, c;
|
|
1580
1584
|
const {
|
|
1581
1585
|
sessionId: t,
|
|
1582
1586
|
sessionStorageKey: o = In,
|
|
1583
1587
|
autoStart: r = !0,
|
|
1584
1588
|
fetcher: n = fetch,
|
|
1585
1589
|
formatApplyMessage: s
|
|
1586
|
-
} = e, l = ((re = e.endpoints) == null ? void 0 : re.mirror) ?? Oe.mirror, a = ((J = e.endpoints) == null ? void 0 : J.sessions) ?? Oe.sessions, u = ((Z = e.endpoints) == null ? void 0 : Z.inspect) ?? Oe.inspect, w = e.visualQa != null,
|
|
1587
|
-
() => JSON.parse(
|
|
1588
|
-
[
|
|
1589
|
-
),
|
|
1590
|
+
} = e, l = ((re = e.endpoints) == null ? void 0 : re.mirror) ?? Oe.mirror, a = ((J = e.endpoints) == null ? void 0 : J.sessions) ?? Oe.sessions, u = ((Z = e.endpoints) == null ? void 0 : Z.inspect) ?? Oe.inspect, w = e.visualQa != null, p = ((W = e.visualQa) == null ? void 0 : W.endpoint) ?? xn, h = JSON.stringify(((c = e.visualQa) == null ? void 0 : c.eligibleFrameIds) ?? []), x = ie(
|
|
1591
|
+
() => JSON.parse(h),
|
|
1592
|
+
[h]
|
|
1593
|
+
), S = ie(
|
|
1590
1594
|
() => Pn(t, o),
|
|
1591
1595
|
[t, o]
|
|
1592
|
-
), [
|
|
1596
|
+
), [g, E] = fe({
|
|
1593
1597
|
state: "idle",
|
|
1594
1598
|
commit: null,
|
|
1595
1599
|
shortCommit: null,
|
|
@@ -1599,16 +1603,16 @@ function kn(e = {}) {
|
|
|
1599
1603
|
warning: null,
|
|
1600
1604
|
error: null,
|
|
1601
1605
|
appOrigin: null
|
|
1602
|
-
}), [f, R] = fe(null), [D,
|
|
1606
|
+
}), [f, R] = fe(null), [D, b] = fe(null), [M, te] = fe({
|
|
1603
1607
|
refs: [],
|
|
1604
1608
|
defaultRef: null,
|
|
1605
1609
|
worktreeRef: null
|
|
1606
|
-
}),
|
|
1610
|
+
}), P = xe(null), C = xe(null), j = de(
|
|
1607
1611
|
async (i = !0, d) => {
|
|
1608
|
-
if (d != null &&
|
|
1609
|
-
}),
|
|
1610
|
-
const
|
|
1611
|
-
|
|
1612
|
+
if (d != null && P.current && await P.current.catch(() => {
|
|
1613
|
+
}), P.current) return P.current;
|
|
1614
|
+
const y = (async () => {
|
|
1615
|
+
E((I) => ({ ...I, state: "syncing", error: null }));
|
|
1612
1616
|
try {
|
|
1613
1617
|
const I = d != null;
|
|
1614
1618
|
let m = await n(`${l}/${i || I ? "refresh" : "status"}`, {
|
|
@@ -1627,7 +1631,7 @@ function kn(e = {}) {
|
|
|
1627
1631
|
await n(`${a}/open`, {
|
|
1628
1632
|
method: "POST",
|
|
1629
1633
|
headers: { "content-type": "application/json" },
|
|
1630
|
-
body: JSON.stringify({ sessionId:
|
|
1634
|
+
body: JSON.stringify({ sessionId: S, baseDevSha: N.commit })
|
|
1631
1635
|
})
|
|
1632
1636
|
);
|
|
1633
1637
|
if (!K.ok || !K.session)
|
|
@@ -1645,23 +1649,23 @@ function kn(e = {}) {
|
|
|
1645
1649
|
throw new Error(q.error ?? "Pygmalion could not check the design session");
|
|
1646
1650
|
F = q.session;
|
|
1647
1651
|
}
|
|
1648
|
-
|
|
1652
|
+
E(N), R(F), b(F.appOrigin ?? N.appOrigin);
|
|
1649
1653
|
} catch (I) {
|
|
1650
|
-
|
|
1654
|
+
E((m) => ({
|
|
1651
1655
|
...m,
|
|
1652
1656
|
state: "error",
|
|
1653
1657
|
error: I instanceof Error ? I.message : String(I)
|
|
1654
1658
|
}));
|
|
1655
1659
|
}
|
|
1656
1660
|
})();
|
|
1657
|
-
|
|
1661
|
+
P.current = y;
|
|
1658
1662
|
try {
|
|
1659
|
-
await
|
|
1663
|
+
await y;
|
|
1660
1664
|
} finally {
|
|
1661
|
-
|
|
1665
|
+
P.current === y && (P.current = null);
|
|
1662
1666
|
}
|
|
1663
1667
|
},
|
|
1664
|
-
[n, l, a,
|
|
1668
|
+
[n, l, a, S]
|
|
1665
1669
|
), H = de(async () => {
|
|
1666
1670
|
try {
|
|
1667
1671
|
const i = await ee(
|
|
@@ -1684,14 +1688,14 @@ function kn(e = {}) {
|
|
|
1684
1688
|
await j(!0, i), await H();
|
|
1685
1689
|
},
|
|
1686
1690
|
[H, j, f == null ? void 0 : f.branchName]
|
|
1687
|
-
),
|
|
1691
|
+
), pe = de(
|
|
1688
1692
|
async (i) => {
|
|
1689
1693
|
var N;
|
|
1690
1694
|
if (!f) throw new Error("Pygmalion design session is not ready");
|
|
1691
1695
|
const d = C.current;
|
|
1692
1696
|
if (d && (d.sessionId !== f.id || d.baseDevSha !== f.baseDevSha || d.revision !== f.revision || d.fingerprint !== JSON.stringify(i)))
|
|
1693
1697
|
throw new Error("The code diff you checked is out of date. Please check the diff for the current changes again.");
|
|
1694
|
-
const
|
|
1698
|
+
const y = await ee(
|
|
1695
1699
|
await n(`${a}/apply-visual`, {
|
|
1696
1700
|
method: "POST",
|
|
1697
1701
|
headers: { "content-type": "application/json" },
|
|
@@ -1704,17 +1708,17 @@ function kn(e = {}) {
|
|
|
1704
1708
|
})
|
|
1705
1709
|
})
|
|
1706
1710
|
);
|
|
1707
|
-
if (!
|
|
1708
|
-
throw new Error(
|
|
1709
|
-
R(
|
|
1710
|
-
const I =
|
|
1711
|
+
if (!y.ok || !y.session)
|
|
1712
|
+
throw new Error(y.error ?? "Pygmalion could not apply the visual changes");
|
|
1713
|
+
R(y.session), y.session.appOrigin && b(y.session.appOrigin);
|
|
1714
|
+
const I = y.applied ?? i.styles.length + i.texts.length + i.operations.length;
|
|
1711
1715
|
let m;
|
|
1712
|
-
if (d != null && d.qaBaselineId && ((N = d.qaFrameIds) != null && N.length) &&
|
|
1716
|
+
if (d != null && d.qaBaselineId && ((N = d.qaFrameIds) != null && N.length) && y.session.appOrigin)
|
|
1713
1717
|
try {
|
|
1714
|
-
m = await Ze(n,
|
|
1718
|
+
m = await Ze(n, p, {
|
|
1715
1719
|
phase: "changed",
|
|
1716
1720
|
baselineId: d.qaBaselineId,
|
|
1717
|
-
basePath: Xe(
|
|
1721
|
+
basePath: Xe(y.session.appOrigin, window.location.origin),
|
|
1718
1722
|
frameIds: d.qaFrameIds
|
|
1719
1723
|
});
|
|
1720
1724
|
} catch (O) {
|
|
@@ -1729,13 +1733,13 @@ function kn(e = {}) {
|
|
|
1729
1733
|
}
|
|
1730
1734
|
return C.current = null, {
|
|
1731
1735
|
applied: I,
|
|
1732
|
-
branch:
|
|
1733
|
-
integration:
|
|
1734
|
-
message: s == null ? void 0 : s(
|
|
1736
|
+
branch: y.session.branchName ?? void 0,
|
|
1737
|
+
integration: y.session.integration.state,
|
|
1738
|
+
message: s == null ? void 0 : s(y.session, I),
|
|
1735
1739
|
...m ? { qa: m } : {}
|
|
1736
1740
|
};
|
|
1737
1741
|
},
|
|
1738
|
-
[n, s,
|
|
1742
|
+
[n, s, p, f, a]
|
|
1739
1743
|
), ue = de(
|
|
1740
1744
|
async (i) => {
|
|
1741
1745
|
var N;
|
|
@@ -1755,19 +1759,19 @@ function kn(e = {}) {
|
|
|
1755
1759
|
);
|
|
1756
1760
|
if (!d.ok || !Number.isSafeInteger(d.revision))
|
|
1757
1761
|
throw new Error(d.error ?? "Pygmalion could not preview the visual changes");
|
|
1758
|
-
const
|
|
1762
|
+
const y = w ? vn(i, x) : [];
|
|
1759
1763
|
let I;
|
|
1760
|
-
const m = f.appOrigin ??
|
|
1761
|
-
if (
|
|
1764
|
+
const m = f.appOrigin ?? g.appOrigin;
|
|
1765
|
+
if (y.length > 0) {
|
|
1762
1766
|
if (!m)
|
|
1763
1767
|
throw new Error("Impact screen QA baseline preview not ready");
|
|
1764
|
-
if (I = await Ze(n,
|
|
1768
|
+
if (I = await Ze(n, p, {
|
|
1765
1769
|
phase: "baseline",
|
|
1766
1770
|
basePath: Xe(m, window.location.origin),
|
|
1767
|
-
frameIds:
|
|
1771
|
+
frameIds: y
|
|
1768
1772
|
}), !I.complete)
|
|
1769
1773
|
throw new Error(
|
|
1770
|
-
((N = I.failures[0]) == null ? void 0 : N.error) ?? `Failed to capture ${
|
|
1774
|
+
((N = I.failures[0]) == null ? void 0 : N.error) ?? `Failed to capture ${y.length - I.frames.length} affected frames`
|
|
1771
1775
|
);
|
|
1772
1776
|
}
|
|
1773
1777
|
return C.current = {
|
|
@@ -1775,7 +1779,7 @@ function kn(e = {}) {
|
|
|
1775
1779
|
baseDevSha: f.baseDevSha,
|
|
1776
1780
|
revision: d.revision,
|
|
1777
1781
|
fingerprint: JSON.stringify(i),
|
|
1778
|
-
...I ? { qaBaselineId: I.baselineId, qaFrameIds:
|
|
1782
|
+
...I ? { qaBaselineId: I.baselineId, qaFrameIds: y } : {}
|
|
1779
1783
|
}, {
|
|
1780
1784
|
revision: d.revision,
|
|
1781
1785
|
files: Array.isArray(d.files) ? d.files : [],
|
|
@@ -1785,14 +1789,14 @@ function kn(e = {}) {
|
|
|
1785
1789
|
},
|
|
1786
1790
|
[
|
|
1787
1791
|
n,
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1792
|
+
g.appOrigin,
|
|
1793
|
+
x,
|
|
1794
|
+
p,
|
|
1791
1795
|
f,
|
|
1792
1796
|
a,
|
|
1793
1797
|
w
|
|
1794
1798
|
]
|
|
1795
|
-
),
|
|
1799
|
+
), V = de(
|
|
1796
1800
|
async (i) => {
|
|
1797
1801
|
if (i.length === 0) return { files: [] };
|
|
1798
1802
|
const d = await ee(
|
|
@@ -1824,7 +1828,7 @@ function kn(e = {}) {
|
|
|
1824
1828
|
);
|
|
1825
1829
|
if (!i.ok || i.reverted !== !0 || !i.operation || i.operation.kind !== "visual-revert" || !i.session)
|
|
1826
1830
|
throw new Error(i.error ?? "Pygmalion could not revert the last visual change");
|
|
1827
|
-
return C.current = null, R(i.session), i.session.appOrigin &&
|
|
1831
|
+
return C.current = null, R(i.session), i.session.appOrigin && b(i.session.appOrigin), {
|
|
1828
1832
|
reverted: !0,
|
|
1829
1833
|
operation: i.operation,
|
|
1830
1834
|
session: i.session
|
|
@@ -1835,9 +1839,9 @@ function kn(e = {}) {
|
|
|
1835
1839
|
}, [r, j]), me(() => {
|
|
1836
1840
|
r && H();
|
|
1837
1841
|
}, [r]);
|
|
1838
|
-
const ne = (f == null ? void 0 : f.appOrigin) ??
|
|
1842
|
+
const ne = (f == null ? void 0 : f.appOrigin) ?? g.appOrigin ?? D, Y = (f == null ? void 0 : f.headSha) ?? (f == null ? void 0 : f.baseDevSha) ?? g.commit ?? "pending";
|
|
1839
1843
|
return {
|
|
1840
|
-
mirror:
|
|
1844
|
+
mirror: g,
|
|
1841
1845
|
session: f,
|
|
1842
1846
|
ready: D != null,
|
|
1843
1847
|
appOrigin: ne,
|
|
@@ -1848,8 +1852,8 @@ function kn(e = {}) {
|
|
|
1848
1852
|
sourceRefs: M,
|
|
1849
1853
|
loadSourceRefs: H,
|
|
1850
1854
|
previewVisual: ue,
|
|
1851
|
-
inspectImpact:
|
|
1852
|
-
applyVisual:
|
|
1855
|
+
inspectImpact: V,
|
|
1856
|
+
applyVisual: pe,
|
|
1853
1857
|
revertLastVisual: ae
|
|
1854
1858
|
};
|
|
1855
1859
|
}
|
|
@@ -1864,46 +1868,46 @@ function Fn({
|
|
|
1864
1868
|
label: a = "Source revision",
|
|
1865
1869
|
refreshLabel: u = "Refresh current revision",
|
|
1866
1870
|
children: w,
|
|
1867
|
-
className:
|
|
1871
|
+
className: p
|
|
1868
1872
|
}) {
|
|
1869
|
-
const
|
|
1873
|
+
const h = ie(
|
|
1870
1874
|
() => ({
|
|
1871
|
-
local: o.filter((
|
|
1872
|
-
remote: o.filter((
|
|
1875
|
+
local: o.filter((b) => b.kind === "local"),
|
|
1876
|
+
remote: o.filter((b) => b.kind === "remote")
|
|
1873
1877
|
}),
|
|
1874
1878
|
[o]
|
|
1875
|
-
),
|
|
1876
|
-
const
|
|
1877
|
-
return s &&
|
|
1878
|
-
}, [s, o, l]),
|
|
1879
|
-
() => o.find((
|
|
1880
|
-
[o,
|
|
1881
|
-
),
|
|
1882
|
-
return /* @__PURE__ */
|
|
1879
|
+
), x = ie(() => {
|
|
1880
|
+
const b = new Set(o.map((M) => M.name));
|
|
1881
|
+
return s && b.add(s), l && b.add(l), b;
|
|
1882
|
+
}, [s, o, l]), S = e ?? s ?? "", g = ie(
|
|
1883
|
+
() => o.find((b) => b.name === S) ?? null,
|
|
1884
|
+
[o, S]
|
|
1885
|
+
), E = (t == null ? void 0 : t.toLowerCase()) ?? null, f = (g == null ? void 0 : g.commit.toLowerCase()) ?? null, R = !!(E && f && E !== f && !E.startsWith(f) && !f.startsWith(E)), D = (t == null ? void 0 : t.slice(0, 8)) ?? null;
|
|
1886
|
+
return /* @__PURE__ */ A(
|
|
1883
1887
|
"span",
|
|
1884
1888
|
{
|
|
1885
|
-
className:
|
|
1889
|
+
className: p,
|
|
1886
1890
|
"data-pygmalion-source-ref": "",
|
|
1887
1891
|
"data-busy": n ? "" : void 0,
|
|
1888
1892
|
"data-update-available": R ? "" : void 0,
|
|
1889
|
-
"data-latest-commit": R ?
|
|
1893
|
+
"data-latest-commit": R ? g == null ? void 0 : g.commit : void 0,
|
|
1890
1894
|
style: { position: "relative", display: "inline-flex", alignItems: "center" },
|
|
1891
1895
|
children: [
|
|
1892
|
-
w ?? /* @__PURE__ */
|
|
1893
|
-
/* @__PURE__ */
|
|
1896
|
+
w ?? /* @__PURE__ */ v("span", { "data-pygmalion-source-ref-value": "", children: S || a }),
|
|
1897
|
+
/* @__PURE__ */ A(
|
|
1894
1898
|
"select",
|
|
1895
1899
|
{
|
|
1896
|
-
value:
|
|
1900
|
+
value: S,
|
|
1897
1901
|
disabled: n,
|
|
1898
1902
|
"aria-label": a,
|
|
1899
1903
|
"data-pygmalion-source-ref-select": "",
|
|
1900
|
-
onChange: (
|
|
1901
|
-
const M =
|
|
1904
|
+
onChange: (b) => {
|
|
1905
|
+
const M = b.target.value;
|
|
1902
1906
|
if (!M) {
|
|
1903
|
-
|
|
1907
|
+
S && r(S);
|
|
1904
1908
|
return;
|
|
1905
1909
|
}
|
|
1906
|
-
M && M !==
|
|
1910
|
+
M && M !== S && r(M);
|
|
1907
1911
|
},
|
|
1908
1912
|
style: {
|
|
1909
1913
|
position: "absolute",
|
|
@@ -1919,27 +1923,27 @@ function Fn({
|
|
|
1919
1923
|
margin: 0
|
|
1920
1924
|
},
|
|
1921
1925
|
children: [
|
|
1922
|
-
|
|
1926
|
+
S ? /* @__PURE__ */ A("option", { value: "", children: [
|
|
1923
1927
|
u,
|
|
1924
1928
|
" · ",
|
|
1925
|
-
|
|
1926
|
-
R ? ` · ${D ?? "unknown"} → ${(
|
|
1929
|
+
S,
|
|
1930
|
+
R ? ` · ${D ?? "unknown"} → ${(g == null ? void 0 : g.commit) ?? "latest"}` : ""
|
|
1927
1931
|
] }) : null,
|
|
1928
|
-
|
|
1929
|
-
l ? /* @__PURE__ */
|
|
1932
|
+
S && !x.has(S) ? /* @__PURE__ */ v("option", { value: S, children: S }) : null,
|
|
1933
|
+
l ? /* @__PURE__ */ A("option", { value: l, children: [
|
|
1930
1934
|
l,
|
|
1931
1935
|
" · uncommitted work"
|
|
1932
1936
|
] }) : null,
|
|
1933
|
-
|
|
1934
|
-
|
|
1937
|
+
h.local.length > 0 ? /* @__PURE__ */ v("optgroup", { label: "local", children: h.local.map((b) => /* @__PURE__ */ A("option", { value: b.name, children: [
|
|
1938
|
+
b.name,
|
|
1935
1939
|
" · ",
|
|
1936
|
-
|
|
1937
|
-
] },
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
+
b.commit
|
|
1941
|
+
] }, b.fullName)) }) : null,
|
|
1942
|
+
h.remote.length > 0 ? /* @__PURE__ */ v("optgroup", { label: "remote", children: h.remote.map((b) => /* @__PURE__ */ A("option", { value: b.name, children: [
|
|
1943
|
+
b.name,
|
|
1940
1944
|
" · ",
|
|
1941
|
-
|
|
1942
|
-
] },
|
|
1945
|
+
b.commit
|
|
1946
|
+
] }, b.fullName)) }) : null
|
|
1943
1947
|
]
|
|
1944
1948
|
}
|
|
1945
1949
|
)
|
|
@@ -1973,19 +1977,19 @@ function Bn({
|
|
|
1973
1977
|
designImport: a,
|
|
1974
1978
|
onTokensChange: u,
|
|
1975
1979
|
appOrigin: w,
|
|
1976
|
-
previewRevision:
|
|
1977
|
-
previewCacheNamespace:
|
|
1978
|
-
previewArtifacts:
|
|
1979
|
-
previewArtifactEndpoint:
|
|
1980
|
-
previewConcurrency:
|
|
1981
|
-
previewOpen:
|
|
1980
|
+
previewRevision: p,
|
|
1981
|
+
previewCacheNamespace: h,
|
|
1982
|
+
previewArtifacts: x,
|
|
1983
|
+
previewArtifactEndpoint: S,
|
|
1984
|
+
previewConcurrency: g,
|
|
1985
|
+
previewOpen: E,
|
|
1982
1986
|
onPreviewOpenChange: f,
|
|
1983
1987
|
flowCanvas: R,
|
|
1984
1988
|
onApply: D,
|
|
1985
|
-
onDesignChange:
|
|
1989
|
+
onDesignChange: b,
|
|
1986
1990
|
onInspectApply: M,
|
|
1987
1991
|
onInspectPreview: te,
|
|
1988
|
-
onInspectImpact:
|
|
1992
|
+
onInspectImpact: P,
|
|
1989
1993
|
storyboard: C,
|
|
1990
1994
|
storyboardDiscovery: j = !0,
|
|
1991
1995
|
storyboardDiscoveryEndpoint: H = ut
|
|
@@ -1999,13 +2003,13 @@ function Bn({
|
|
|
1999
2003
|
H,
|
|
2000
2004
|
C
|
|
2001
2005
|
]
|
|
2002
|
-
), [
|
|
2006
|
+
), [pe, ue] = fe(null), V = pe === Q, [ae, ne] = fe();
|
|
2003
2007
|
a && (a.assertComplete(), ft(a));
|
|
2004
2008
|
const Y = e ?? (a == null ? void 0 : a.getRegistry()), re = t ?? (a == null ? void 0 : a.getTokens()), J = o ?? (a == null ? void 0 : a.getInitialPages());
|
|
2005
|
-
Y && mt(Y),
|
|
2006
|
-
!!(
|
|
2009
|
+
Y && mt(Y), pt(n ?? []), re && ht(re), s && gt(s), Tt(u ?? null), yt(h), wt(
|
|
2010
|
+
!!(S != null && S.trim())
|
|
2007
2011
|
);
|
|
2008
|
-
const Z = ae ??
|
|
2012
|
+
const Z = ae ?? x, W = ie(
|
|
2009
2013
|
() => (J ?? []).flatMap(
|
|
2010
2014
|
(m) => m.route && m.importPageId ? [
|
|
2011
2015
|
{
|
|
@@ -2021,43 +2025,43 @@ function Bn({
|
|
|
2021
2025
|
] : []
|
|
2022
2026
|
),
|
|
2023
2027
|
[J]
|
|
2024
|
-
), c =
|
|
2025
|
-
() =>
|
|
2028
|
+
), c = p ?? kt(), i = w ?? qe(), d = xe([]), y = xe([]), I = ie(
|
|
2029
|
+
() => W.map((m) => ({
|
|
2026
2030
|
id: m.canonicalId,
|
|
2027
|
-
fingerprint:
|
|
2031
|
+
fingerprint: St(
|
|
2028
2032
|
m,
|
|
2029
2033
|
c,
|
|
2030
|
-
|
|
2034
|
+
ve()
|
|
2031
2035
|
)
|
|
2032
2036
|
})),
|
|
2033
|
-
[
|
|
2037
|
+
[W, c, V]
|
|
2034
2038
|
);
|
|
2035
|
-
return d.current = I,
|
|
2036
|
-
(m) =>
|
|
2037
|
-
namespace:
|
|
2039
|
+
return d.current = I, y.current = W.map(
|
|
2040
|
+
(m) => bt({
|
|
2041
|
+
namespace: h ?? "",
|
|
2038
2042
|
previewRevision: c,
|
|
2039
2043
|
route: m.route,
|
|
2040
2044
|
width: m.width ?? 390,
|
|
2041
2045
|
height: m.height ?? 600,
|
|
2042
2046
|
environment: tt(
|
|
2043
|
-
|
|
2047
|
+
ve(),
|
|
2044
2048
|
m.environment
|
|
2045
2049
|
),
|
|
2046
2050
|
preset: m.preset,
|
|
2047
2051
|
interactions: m.interactions,
|
|
2048
2052
|
assertions: m.assertions
|
|
2049
2053
|
})
|
|
2050
|
-
),
|
|
2051
|
-
w != null && Pt(w),
|
|
2052
|
-
}, [w, l,
|
|
2053
|
-
!Z || !J || !
|
|
2054
|
-
namespace:
|
|
2054
|
+
), g != null && vt(g), zt(f ?? null), R != null && It(R), jt(D ?? null), _t(M ?? null), xt(te ?? null), Bt(P ?? null), J && X.initPagesFromComponents(J, { initialCanvas: r }), Le(() => {
|
|
2055
|
+
w != null && Pt(w), p != null && Et(p), Ct(l ?? []);
|
|
2056
|
+
}, [w, l, p]), Le(() => {
|
|
2057
|
+
!Z || !J || !V || je(Z, {
|
|
2058
|
+
namespace: h ?? "",
|
|
2055
2059
|
previewRevision: c,
|
|
2056
2060
|
appOrigin: i,
|
|
2057
|
-
baselineEnvironment:
|
|
2058
|
-
allowStaleIdentity: !!
|
|
2061
|
+
baselineEnvironment: ve(),
|
|
2062
|
+
allowStaleIdentity: !!S,
|
|
2059
2063
|
allowMatchingFrameIdentity: ae != null,
|
|
2060
|
-
pages:
|
|
2064
|
+
pages: W.map((m, N) => {
|
|
2061
2065
|
var O;
|
|
2062
2066
|
return {
|
|
2063
2067
|
...m,
|
|
@@ -2068,77 +2072,77 @@ function Bn({
|
|
|
2068
2072
|
}, [
|
|
2069
2073
|
Z,
|
|
2070
2074
|
I,
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2075
|
+
W,
|
|
2076
|
+
S,
|
|
2077
|
+
h,
|
|
2074
2078
|
ae,
|
|
2075
2079
|
i,
|
|
2076
2080
|
J,
|
|
2077
2081
|
c,
|
|
2078
|
-
|
|
2082
|
+
V
|
|
2079
2083
|
]), me(() => {
|
|
2080
|
-
Ke(
|
|
2084
|
+
Ke(b ?? null);
|
|
2081
2085
|
const m = Rt(X);
|
|
2082
2086
|
return () => {
|
|
2083
2087
|
m(), Ke(null);
|
|
2084
2088
|
};
|
|
2085
|
-
}, [
|
|
2086
|
-
if (ne(void 0), !
|
|
2089
|
+
}, [b]), me(() => {
|
|
2090
|
+
if (ne(void 0), !V || !S || !(h != null && h.trim()) || !(p != null && p.trim()))
|
|
2087
2091
|
return;
|
|
2088
2092
|
const m = new AbortController(), N = Nt({
|
|
2089
|
-
endpoint:
|
|
2093
|
+
endpoint: S,
|
|
2090
2094
|
captureBaseUrl: w
|
|
2091
|
-
}), O =
|
|
2095
|
+
}), O = $t(p), K = (T) => {
|
|
2092
2096
|
je(T, {
|
|
2093
|
-
namespace:
|
|
2094
|
-
previewRevision:
|
|
2097
|
+
namespace: h,
|
|
2098
|
+
previewRevision: p,
|
|
2095
2099
|
appOrigin: qe(),
|
|
2096
|
-
baselineEnvironment:
|
|
2100
|
+
baselineEnvironment: ve(),
|
|
2097
2101
|
allowStaleIdentity: !0,
|
|
2098
2102
|
allowMatchingFrameIdentity: !0,
|
|
2099
|
-
pages:
|
|
2103
|
+
pages: W.map(($, z) => {
|
|
2100
2104
|
var _;
|
|
2101
2105
|
return {
|
|
2102
|
-
|
|
2106
|
+
...$,
|
|
2103
2107
|
fingerprint: (_ = I[z]) == null ? void 0 : _.fingerprint
|
|
2104
2108
|
};
|
|
2105
2109
|
})
|
|
2106
2110
|
}), ne(T);
|
|
2107
|
-
}, F = (T,
|
|
2108
|
-
namespace:
|
|
2111
|
+
}, F = (T, $, z) => Ft({
|
|
2112
|
+
namespace: h,
|
|
2109
2113
|
sourceRevision: O,
|
|
2110
2114
|
transport: N,
|
|
2111
2115
|
signal: z,
|
|
2112
2116
|
...T.length ? { frames: T } : {},
|
|
2113
|
-
|
|
2114
|
-
}), q = (T,
|
|
2115
|
-
const z = new Set(
|
|
2117
|
+
...$ ? {} : { generate: !1 }
|
|
2118
|
+
}), q = (T, $) => {
|
|
2119
|
+
const z = new Set($);
|
|
2116
2120
|
return T.filter((_) => z.has(_.id));
|
|
2117
|
-
}, ce = (T,
|
|
2121
|
+
}, ce = (T, $) => T instanceof Error && T.message ? T.message : $, he = new AbortController();
|
|
2118
2122
|
if (_e(async (T) => {
|
|
2119
2123
|
var z, _, le;
|
|
2120
|
-
const
|
|
2121
|
-
if (
|
|
2122
|
-
K(
|
|
2123
|
-
const
|
|
2124
|
-
if (T.every((
|
|
2124
|
+
const $ = await F(T, !0, he.signal);
|
|
2125
|
+
if ($.status === "accepted") {
|
|
2126
|
+
K($.artifact);
|
|
2127
|
+
const Se = new Set(((z = $.frameResolution) == null ? void 0 : z.exact) ?? []);
|
|
2128
|
+
if (T.every((be) => Se.has(be.id)))
|
|
2125
2129
|
return { status: "accepted" };
|
|
2126
2130
|
const ge = [
|
|
2127
|
-
...((_ =
|
|
2128
|
-
...((le =
|
|
2131
|
+
...((_ = $.frameResolution) == null ? void 0 : _.missing) ?? [],
|
|
2132
|
+
...((le = $.frameResolution) == null ? void 0 : le.stale) ?? []
|
|
2129
2133
|
];
|
|
2130
2134
|
return {
|
|
2131
2135
|
status: "unavailable",
|
|
2132
2136
|
message: ge.length ? `The exact preview endpoint did not return a current capture for ${ge.join(", ")}.` : "The exact preview endpoint returned no current capture."
|
|
2133
2137
|
};
|
|
2134
2138
|
}
|
|
2135
|
-
return
|
|
2139
|
+
return $.status === "rejected" ? {
|
|
2136
2140
|
status: "rejected",
|
|
2137
|
-
message:
|
|
2141
|
+
message: $.errors.join(" ") || "The preview artifact was rejected."
|
|
2138
2142
|
} : {
|
|
2139
2143
|
status: "unavailable",
|
|
2140
2144
|
message: ce(
|
|
2141
|
-
|
|
2145
|
+
$.error,
|
|
2142
2146
|
"The exact preview endpoint is unavailable."
|
|
2143
2147
|
)
|
|
2144
2148
|
};
|
|
@@ -2151,7 +2155,7 @@ function Bn({
|
|
|
2151
2155
|
return _ !== "exact" && _ !== "generating";
|
|
2152
2156
|
});
|
|
2153
2157
|
oe(T, { status: "checking" });
|
|
2154
|
-
const
|
|
2158
|
+
const $ = (z) => z.filter((_) => {
|
|
2155
2159
|
const le = Be(
|
|
2156
2160
|
_.id,
|
|
2157
2161
|
_.fingerprint
|
|
@@ -2159,31 +2163,31 @@ function Bn({
|
|
|
2159
2163
|
return le !== "generating" && le !== "exact";
|
|
2160
2164
|
});
|
|
2161
2165
|
(async () => {
|
|
2162
|
-
var ge,
|
|
2163
|
-
const z =
|
|
2166
|
+
var ge, be, ze;
|
|
2167
|
+
const z = y.current.slice(
|
|
2164
2168
|
0,
|
|
2165
2169
|
d.current.length
|
|
2166
2170
|
);
|
|
2167
|
-
if (await
|
|
2171
|
+
if (await At(z), m.signal.aborted) return;
|
|
2168
2172
|
const _ = new Set(
|
|
2169
2173
|
d.current.filter(
|
|
2170
2174
|
(U, k) => z[k] ? Mt(z[k]) : !1
|
|
2171
2175
|
).map((U) => U.id)
|
|
2172
2176
|
);
|
|
2173
2177
|
oe(
|
|
2174
|
-
|
|
2178
|
+
$(
|
|
2175
2179
|
T.filter((U) => _.has(U.id))
|
|
2176
2180
|
),
|
|
2177
2181
|
{ status: "exact" }
|
|
2178
2182
|
);
|
|
2179
|
-
const le =
|
|
2183
|
+
const le = $(
|
|
2180
2184
|
T.filter((U) => !_.has(U.id))
|
|
2181
|
-
),
|
|
2185
|
+
), Se = [];
|
|
2182
2186
|
for (const U of Ue(
|
|
2183
2187
|
le
|
|
2184
2188
|
)) {
|
|
2185
2189
|
const k = await Ot({
|
|
2186
|
-
namespace:
|
|
2190
|
+
namespace: h,
|
|
2187
2191
|
sourceRevision: O,
|
|
2188
2192
|
transport: N,
|
|
2189
2193
|
frames: U,
|
|
@@ -2191,31 +2195,31 @@ function Bn({
|
|
|
2191
2195
|
});
|
|
2192
2196
|
if (m.signal.aborted) return;
|
|
2193
2197
|
if (k.status === "accepted") {
|
|
2194
|
-
|
|
2198
|
+
Se.push(
|
|
2195
2199
|
...q(U, k.resolution.exact)
|
|
2196
2200
|
);
|
|
2197
|
-
const
|
|
2201
|
+
const Ae = q(U, [
|
|
2198
2202
|
...k.resolution.missing,
|
|
2199
2203
|
...k.resolution.stale
|
|
2200
2204
|
]);
|
|
2201
|
-
oe(
|
|
2205
|
+
oe($(Ae), {
|
|
2202
2206
|
status: "outdated",
|
|
2203
2207
|
message: "Select this frame to generate the exact preview."
|
|
2204
2208
|
});
|
|
2205
2209
|
continue;
|
|
2206
2210
|
}
|
|
2207
|
-
const
|
|
2211
|
+
const $e = k.status === "rejected" ? k.errors.join(" ") || "The preview artifact probe was rejected." : ce(
|
|
2208
2212
|
k.error,
|
|
2209
2213
|
"The exact preview endpoint is unavailable."
|
|
2210
2214
|
);
|
|
2211
|
-
oe(
|
|
2215
|
+
oe($(U), {
|
|
2212
2216
|
status: "error",
|
|
2213
2217
|
reason: k.status === "rejected" ? "rejected" : "unavailable",
|
|
2214
|
-
message:
|
|
2218
|
+
message: $e
|
|
2215
2219
|
});
|
|
2216
2220
|
}
|
|
2217
2221
|
for (const U of Ue(
|
|
2218
|
-
|
|
2222
|
+
$(Se)
|
|
2219
2223
|
)) {
|
|
2220
2224
|
const k = await F(
|
|
2221
2225
|
U,
|
|
@@ -2228,29 +2232,29 @@ function Bn({
|
|
|
2228
2232
|
q(U, ((ge = k.frameResolution) == null ? void 0 : ge.exact) ?? []),
|
|
2229
2233
|
{ status: "exact" }
|
|
2230
2234
|
);
|
|
2231
|
-
const
|
|
2232
|
-
...((
|
|
2235
|
+
const Ae = q(U, [
|
|
2236
|
+
...((be = k.frameResolution) == null ? void 0 : be.missing) ?? [],
|
|
2233
2237
|
...((ze = k.frameResolution) == null ? void 0 : ze.stale) ?? []
|
|
2234
2238
|
]);
|
|
2235
|
-
oe(
|
|
2239
|
+
oe($(Ae), {
|
|
2236
2240
|
status: "outdated",
|
|
2237
2241
|
message: "Select this frame to generate the exact preview."
|
|
2238
2242
|
});
|
|
2239
2243
|
continue;
|
|
2240
2244
|
}
|
|
2241
|
-
const
|
|
2245
|
+
const $e = k.status === "rejected" ? k.errors.join(" ") || "The preview artifact was rejected." : ce(
|
|
2242
2246
|
k.error,
|
|
2243
2247
|
"The exact preview endpoint is unavailable."
|
|
2244
2248
|
);
|
|
2245
|
-
oe(
|
|
2249
|
+
oe($(U), {
|
|
2246
2250
|
status: "error",
|
|
2247
2251
|
reason: k.status === "rejected" ? "rejected" : "unavailable",
|
|
2248
|
-
message:
|
|
2252
|
+
message: $e
|
|
2249
2253
|
});
|
|
2250
2254
|
}
|
|
2251
2255
|
})().catch((z) => {
|
|
2252
2256
|
if (m.signal.aborted) return;
|
|
2253
|
-
const _ =
|
|
2257
|
+
const _ = $(T);
|
|
2254
2258
|
oe(_, {
|
|
2255
2259
|
status: "error",
|
|
2256
2260
|
reason: "unavailable",
|
|
@@ -2262,14 +2266,14 @@ function Bn({
|
|
|
2262
2266
|
});
|
|
2263
2267
|
}
|
|
2264
2268
|
return () => {
|
|
2265
|
-
_e(null),
|
|
2269
|
+
_e(null), he.abort(), m.abort();
|
|
2266
2270
|
};
|
|
2267
2271
|
}, [
|
|
2268
|
-
|
|
2269
|
-
p,
|
|
2272
|
+
S,
|
|
2270
2273
|
h,
|
|
2274
|
+
p,
|
|
2271
2275
|
w,
|
|
2272
|
-
|
|
2276
|
+
V
|
|
2273
2277
|
]), me(() => {
|
|
2274
2278
|
let m = !0;
|
|
2275
2279
|
if (!j)
|
|
@@ -2303,29 +2307,29 @@ function Bn({
|
|
|
2303
2307
|
H,
|
|
2304
2308
|
Q
|
|
2305
2309
|
]), me(() => {
|
|
2306
|
-
|
|
2307
|
-
}, [
|
|
2310
|
+
E == null || E === X.previewOpen || (E ? X.openPreview({ notifyHost: !1 }) : X.closePreview({ notifyHost: !1 }));
|
|
2311
|
+
}, [E]), /* @__PURE__ */ v(Dt, { previewIdentityReady: V });
|
|
2308
2312
|
}
|
|
2309
2313
|
export {
|
|
2310
2314
|
qn as DEFAULT_DESIGN_COMPILE_LIMITS,
|
|
2311
2315
|
Kn as DESIGN_IMPORT_KINDS,
|
|
2312
2316
|
Gn as DESIGN_IR_SCHEMA,
|
|
2313
2317
|
Ln as DESIGN_IR_VERSION,
|
|
2314
|
-
|
|
2318
|
+
$n as PygmalionCatalogDocument,
|
|
2315
2319
|
Mn as PygmalionCatalogMatrix,
|
|
2316
|
-
|
|
2320
|
+
An as PygmalionCatalogSection,
|
|
2317
2321
|
Bn as PygmalionEditor,
|
|
2318
2322
|
ut as STORYBOARD_ENVIRONMENT_CONTROL,
|
|
2319
|
-
|
|
2323
|
+
Wn as STORYBOARD_ENVIRONMENT_QUERY,
|
|
2320
2324
|
Fn as SourceRefControl,
|
|
2321
2325
|
Tn as __debug,
|
|
2322
|
-
|
|
2326
|
+
Vn as applyTokenOverride,
|
|
2323
2327
|
Ft as bootstrapPreviewArtifact,
|
|
2324
2328
|
Jn as clearPreviewEnvironmentControlValues,
|
|
2325
2329
|
Qn as clearPygmalionPreviewCache,
|
|
2326
2330
|
Xn as compileDesignDocument,
|
|
2327
2331
|
Dn as createDesignComponentCatalog,
|
|
2328
|
-
|
|
2332
|
+
pn as createDesignComponentVariantMatrix,
|
|
2329
2333
|
On as createDesignGalleryCatalog,
|
|
2330
2334
|
Yn as createDesignImportController,
|
|
2331
2335
|
Zn as createDesignIntermediateDocument,
|
|
@@ -2350,43 +2354,43 @@ export {
|
|
|
2350
2354
|
ur as getDesignComponentConnection,
|
|
2351
2355
|
fr as getDesignComponentConnectionForComponent,
|
|
2352
2356
|
mr as getDesignComponentConnections,
|
|
2353
|
-
|
|
2354
|
-
|
|
2357
|
+
pr as getPreviewEnvironmentControlValue,
|
|
2358
|
+
hr as getPreviewEnvironmentControls,
|
|
2355
2359
|
gr as getPreviewEnvironmentOverride,
|
|
2356
2360
|
yr as getRecommendedPygmalionPreviewConcurrency,
|
|
2357
|
-
|
|
2361
|
+
ve as getStoryboardBaselineEnvironment,
|
|
2358
2362
|
ot as getStoryboardDiscoveryBaselineEnvironment,
|
|
2359
2363
|
wr as getStoryboardGraph,
|
|
2360
|
-
|
|
2364
|
+
Sr as getViewportPresets,
|
|
2361
2365
|
st as loadStoryboardDiscovery,
|
|
2362
|
-
|
|
2366
|
+
br as mergeScreenPresets,
|
|
2363
2367
|
tt as mergeStoryboardEnvironment,
|
|
2364
2368
|
Nn as publishStoryboardDiscovery,
|
|
2365
2369
|
zn as pygmalionNavigate,
|
|
2366
2370
|
jn as pygmalionOpenPreview,
|
|
2367
2371
|
_n as pygmalionResetCurrentEdits,
|
|
2368
|
-
|
|
2372
|
+
vr as reconstructRoutePreviewArtifactScreenshotV3,
|
|
2369
2373
|
Ir as reconstructRoutePreviewArtifactSnapshotV3,
|
|
2370
2374
|
xr as registerDesignCodegenAdapter,
|
|
2371
2375
|
Pr as resetTokenOverrides,
|
|
2372
2376
|
Er as resolvePreviewArtifactFrames,
|
|
2373
2377
|
Xt as resolveStoryboardScreenCases,
|
|
2374
2378
|
mt as setComponentRegistry,
|
|
2375
|
-
|
|
2379
|
+
pt as setDesignComponentConnections,
|
|
2376
2380
|
Cr as setPreviewEnvironmentControlValue,
|
|
2377
2381
|
Ct as setPreviewEnvironmentControls,
|
|
2378
2382
|
Pt as setPygmalionAppOrigin,
|
|
2379
|
-
|
|
2383
|
+
vt as setPygmalionPreviewConcurrency,
|
|
2380
2384
|
Et as setPygmalionPreviewRevision,
|
|
2381
2385
|
ye as setStoryboardBaselineEnvironment,
|
|
2382
2386
|
se as setStoryboardGraph,
|
|
2383
|
-
|
|
2387
|
+
ht as setTokens,
|
|
2384
2388
|
gt as setViewportPresets,
|
|
2385
2389
|
Ht as storyboardScreenRecipeKey,
|
|
2386
2390
|
Rr as subscribePreviewEnvironmentControls,
|
|
2387
2391
|
Nr as subscribeStoryboardGraph,
|
|
2388
2392
|
kn as usePygmalionProject,
|
|
2389
|
-
|
|
2390
|
-
|
|
2393
|
+
$r as validateDesignComponentConnections,
|
|
2394
|
+
Ar as validatePreviewArtifactBundle,
|
|
2391
2395
|
Mr as validateRoutePreviewArtifactV3Browser
|
|
2392
2396
|
};
|