@brucesantos/design-space 0.9.2 → 0.9.3
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/CHANGELOG.md +27 -0
- package/README.md +20 -0
- package/dist/controls/params.d.ts +5 -0
- package/dist/controls/state.d.ts +10 -2
- package/dist/{index-Bj69Oe2X.js → index-BnTStnNk.js} +121 -114
- package/dist/{index-Bj69Oe2X.js.map → index-BnTStnNk.js.map} +1 -1
- package/dist/index.js +398 -391
- package/dist/index.js.map +1 -1
- package/dist/testing.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
1
|
+
import { jsx as n, jsxs as C, Fragment as Y } from "react/jsx-runtime";
|
|
2
2
|
import { useState as V, useRef as q, useCallback as U, useEffect as I, useMemo as D, useContext as ct, createContext as lt, useLayoutEffect as Ue } from "react";
|
|
3
|
-
import { r as xe, s as dt, h as oe, v as ut, a as ve, b as Ie, p as ht, P as $, c as We, C as
|
|
4
|
-
import {
|
|
5
|
-
function
|
|
3
|
+
import { r as xe, s as dt, h as oe, v as ut, a as ve, b as Ie, p as ht, P as $, c as We, C as ge, d as Pe, e as ae, t as ue, f as Ne, N as He, g as Be, F as pt, i as mt, j as ft, k as pe, l as ye, m as wt, n as _e, o as vt, q as gt, u as bt, w as St } from "./index-BnTStnNk.js";
|
|
4
|
+
import { H as bn, x as Sn, y as kn, z as Cn, A as xn, B as Nn, D as yn, E as $n, G as Mn } from "./index-BnTStnNk.js";
|
|
5
|
+
function kt(e) {
|
|
6
6
|
const t = e.scenarios ?? [], s = e.routes ?? [], o = e.components ?? [], r = new Map(t.map((c) => [c.id, c])), i = new Map(o.map((c) => [c.id, c])), l = new Map((e.personas ?? []).map((c) => [c.id, c])), a = new Map((e.fixtures ?? []).map((c) => [c.id, c])), p = new Map((e.rules ?? []).map((c) => [c.id, c])), m = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map();
|
|
7
7
|
for (const c of t) {
|
|
8
8
|
const v = xe(s, c.route ?? "");
|
|
@@ -28,13 +28,13 @@ function gt(e) {
|
|
|
28
28
|
controls: Array.isArray(c.controls) ? c.controls : []
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const S = new Map(f.map((c) => [c.id, c])), b = (c) => c ? r.get(c) : void 0, L = (c) => c ? l.get(c) : void 0, T = L(e.defaultPersona)?.id, N = (c, v) => {
|
|
32
32
|
if (!(!c || !v))
|
|
33
33
|
return i.get(c)?.fixtures?.find((x) => x.id === v);
|
|
34
34
|
}, w = (c = {}) => t.filter((v) => oe(c.handoff, v.id)), u = (c) => {
|
|
35
35
|
const v = xe(s, c);
|
|
36
|
-
return v ?
|
|
37
|
-
},
|
|
36
|
+
return v ? S.get(v.definition.path) : void 0;
|
|
37
|
+
}, k = (c = {}) => {
|
|
38
38
|
const { handoff: v } = c;
|
|
39
39
|
return v ? f.map((x) => ({
|
|
40
40
|
...x,
|
|
@@ -42,7 +42,7 @@ function gt(e) {
|
|
|
42
42
|
})).filter(
|
|
43
43
|
(x) => x.variations.length > 0 || (v.routes ?? []).length > 0 && Ie(v, x.href)
|
|
44
44
|
) : f;
|
|
45
|
-
},
|
|
45
|
+
}, g = (c) => c ? c.permissions ? c.permissions : L(c.persona ?? T)?.permissions ?? [] : [], y = (c = {}) => je(k(c)), _ = (c, v) => {
|
|
46
46
|
const x = new Set(c?.route.components ?? []), M = v ? [v] : c?.variations ?? [];
|
|
47
47
|
for (const F of M)
|
|
48
48
|
for (const E of F.components ?? []) x.add(E);
|
|
@@ -52,8 +52,8 @@ function gt(e) {
|
|
|
52
52
|
product: e,
|
|
53
53
|
screens: f,
|
|
54
54
|
issues: ut(e),
|
|
55
|
-
defaultPersona:
|
|
56
|
-
scenario:
|
|
55
|
+
defaultPersona: T,
|
|
56
|
+
scenario: b,
|
|
57
57
|
component: (c) => c ? i.get(c) : void 0,
|
|
58
58
|
componentFixture: N,
|
|
59
59
|
resolveComponentFixture: (c, v) => {
|
|
@@ -67,22 +67,22 @@ function gt(e) {
|
|
|
67
67
|
persona: L,
|
|
68
68
|
fixture: (c) => c ? a.get(c) : void 0,
|
|
69
69
|
rule: (c) => c ? p.get(c) : void 0,
|
|
70
|
-
screen: (c) => c ?
|
|
70
|
+
screen: (c) => c ? S.get(c) : void 0,
|
|
71
71
|
screenForPath: u,
|
|
72
72
|
screenOf: (c) => {
|
|
73
73
|
const v = c ? h.get(c.id) : void 0;
|
|
74
|
-
return v ?
|
|
74
|
+
return v ? S.get(v) : void 0;
|
|
75
75
|
},
|
|
76
|
-
screensFor:
|
|
76
|
+
screensFor: k,
|
|
77
77
|
flows: y,
|
|
78
78
|
flowOf: (c, v) => {
|
|
79
79
|
if (c)
|
|
80
80
|
return y(v).find((x) => x.name === c.group);
|
|
81
81
|
},
|
|
82
82
|
controlsOf: (c) => (c?.controls ?? []).flatMap((v) => v.controls ?? []),
|
|
83
|
-
resolveControls: (c, v = {}) =>
|
|
83
|
+
resolveControls: (c, v = {}) => Ct(c?.controls ?? [], v),
|
|
84
84
|
rulesOf: (c) => (c?.rules ?? []).map((v) => p.get(v)).filter((v) => !!v),
|
|
85
|
-
permissionsOf:
|
|
85
|
+
permissionsOf: g,
|
|
86
86
|
scenariosForRoute: (c, v) => {
|
|
87
87
|
const x = u(c);
|
|
88
88
|
return x ? x.variations.filter((M) => oe(v?.handoff, M.id)) : [];
|
|
@@ -105,7 +105,7 @@ function gt(e) {
|
|
|
105
105
|
) : M;
|
|
106
106
|
},
|
|
107
107
|
searchScreens: (c, v) => {
|
|
108
|
-
const x = X(c), M =
|
|
108
|
+
const x = X(c), M = k(v);
|
|
109
109
|
return x ? M.filter(
|
|
110
110
|
(F) => X(
|
|
111
111
|
[
|
|
@@ -138,7 +138,7 @@ function gt(e) {
|
|
|
138
138
|
},
|
|
139
139
|
componentsFor: z,
|
|
140
140
|
componentsOfScreen: (c, v) => _(c, v).map((x) => i.get(x)).filter((x) => !!x),
|
|
141
|
-
usagesOf: (c, v) => c ?
|
|
141
|
+
usagesOf: (c, v) => c ? k(v).filter(
|
|
142
142
|
(x) => x.route.components?.includes(c) || x.variations.some((M) => M.components?.includes(c))
|
|
143
143
|
) : []
|
|
144
144
|
};
|
|
@@ -159,18 +159,18 @@ function je(e) {
|
|
|
159
159
|
const o = [...s].map(([r, i]) => ({ name: r, screens: i }));
|
|
160
160
|
return t.length > 0 ? [{ name: void 0, screens: t }, ...o] : o;
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function be(e) {
|
|
163
163
|
const t = e.options ?? [];
|
|
164
164
|
return e.default !== void 0 && t.some((s) => s.value === e.default) ? e.default : t[0]?.value ?? "";
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function Ct(e, t = {}) {
|
|
167
167
|
const s = {}, o = [], r = /* @__PURE__ */ new Set(), i = t.requested ?? {};
|
|
168
168
|
for (const l of e)
|
|
169
169
|
for (const a of l.controls ?? []) {
|
|
170
170
|
if (r.has(a.id)) continue;
|
|
171
171
|
r.add(a.id);
|
|
172
|
-
const p = (f) => f !== void 0 && (a.options ?? []).some((
|
|
173
|
-
let m =
|
|
172
|
+
const p = (f) => f !== void 0 && (a.options ?? []).some((S) => S.value === f);
|
|
173
|
+
let m = be(a);
|
|
174
174
|
const h = t.scenario?.controls?.[a.id];
|
|
175
175
|
p(h) && (m = h);
|
|
176
176
|
const d = i[a.id];
|
|
@@ -180,22 +180,22 @@ function kt(e, t = {}) {
|
|
|
180
180
|
r.has(l) || o.push({ id: l, value: a, reason: "unknown-control" });
|
|
181
181
|
return { values: s, invalid: o };
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function xt(e, t) {
|
|
184
184
|
return e ? Object.entries(e.controls ?? {}).every(([s, o]) => t?.[s] === o) : !1;
|
|
185
185
|
}
|
|
186
|
-
const
|
|
186
|
+
const Nt = [
|
|
187
187
|
{ id: "mobile", label: "Celular", width: 375, height: 812 },
|
|
188
188
|
{ id: "tablet", label: "Tablet", width: 768, height: 1024 },
|
|
189
189
|
{ id: "desktop", label: "Desktop", width: 1280, height: 800 },
|
|
190
190
|
{ id: "fit", label: "Ajustar" },
|
|
191
191
|
{ id: "custom", label: "Personalizado" }
|
|
192
|
-
],
|
|
192
|
+
], Te = 25, Ee = 150, me = 100;
|
|
193
193
|
function qe(e, t, s) {
|
|
194
194
|
const o = s !== void 0 ? e.screenForPath(s) : e.screenOf(t), r = t && o && e.screenOf(t)?.id === o.id ? t : void 0;
|
|
195
195
|
return { screen: o, scenario: r };
|
|
196
196
|
}
|
|
197
197
|
function $e(e, t, s) {
|
|
198
|
-
const o = new URLSearchParams(e), r = ht(o), i = o.get($.component) ?? void 0, l = ve(r, i) ? t.component(i) : void 0, a = o.get($.scenario) ?? void 0, p = l || !oe(r, a) ? void 0 : t.scenario(a), m = o.get($.fixture) ?? void 0, h = l ? m ?? t.componentFixture(l.id, l.defaultFixture)?.id ?? l.fixtures?.[0]?.id : void 0, d = o.get($.network), f = l ? void 0 : qe(t, p, s),
|
|
198
|
+
const o = new URLSearchParams(e), r = ht(o), i = o.get($.component) ?? void 0, l = ve(r, i) ? t.component(i) : void 0, a = o.get($.scenario) ?? void 0, p = l || !oe(r, a) ? void 0 : t.scenario(a), m = o.get($.fixture) ?? void 0, h = l ? m ?? t.componentFixture(l.id, l.defaultFixture)?.id ?? l.fixtures?.[0]?.id : void 0, d = o.get($.network), f = l ? void 0 : qe(t, p, s), S = f?.screen && f.screen.controls.length > 0 ? t.resolveControls(f.screen, {
|
|
199
199
|
scenario: f.scenario,
|
|
200
200
|
requested: We(o)
|
|
201
201
|
}).values : void 0;
|
|
@@ -207,32 +207,32 @@ function $e(e, t, s) {
|
|
|
207
207
|
// tem persona, então o padrão não se aplica a ele.
|
|
208
208
|
persona: o.get($.persona) ?? p?.persona ?? (l ? void 0 : t.defaultPersona),
|
|
209
209
|
fixture: l ? h : m ?? p?.fixture,
|
|
210
|
-
network:
|
|
210
|
+
network: Pt(d) ? d : p?.network ?? "success",
|
|
211
211
|
viewport: o.get($.viewport) ?? "fit",
|
|
212
|
-
customWidth:
|
|
212
|
+
customWidth: Rt(o.get($.customWidth)),
|
|
213
213
|
themeMode: o.get($.themeMode) ?? t.product.theme?.modes?.[0],
|
|
214
214
|
locale: o.get($.locale) ?? t.product.theme?.locales?.[0],
|
|
215
215
|
dataSource: o.get($.dataSource) ?? t.product.dataSources?.default ?? "fixtures",
|
|
216
216
|
// Sem parâmetro, o tema do chrome fica em aberto: o shell resolve pela
|
|
217
217
|
// última escolha da pessoa e, na falta dela, pelo sistema.
|
|
218
|
-
chromeTheme:
|
|
218
|
+
chromeTheme: Tt(o.get($.chromeTheme)) ? o.get($.chromeTheme) : void 0,
|
|
219
219
|
// Chrome visível por padrão. `?chrome=0` é o modo de revisão limpa e captura
|
|
220
220
|
// de tela, então precisa ser explícito para não sumir sem pedido.
|
|
221
221
|
chrome: o.get($.chrome) !== "0",
|
|
222
222
|
inspector: o.get($.inspector) !== "0",
|
|
223
|
-
panelTab:
|
|
223
|
+
panelTab: Et(o.get($.panelTab)) ? o.get($.panelTab) : "variations",
|
|
224
224
|
zoom: Ze(o.get($.zoom)),
|
|
225
225
|
rotated: o.get($.rotated) === "1",
|
|
226
|
-
screenControls:
|
|
226
|
+
screenControls: S
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
229
|
function se(e, t, s) {
|
|
230
230
|
const o = new URLSearchParams(), r = t.scenario(e.scenario);
|
|
231
231
|
if (e.component ? o.set($.component, e.component) : e.scenario && o.set($.scenario, e.scenario), e.persona && e.persona !== (r?.persona ?? t.defaultPersona) && o.set($.persona, e.persona), e.component && e.fixture ? o.set($.fixture, e.fixture) : e.fixture && e.fixture !== r?.fixture && o.set($.fixture, e.fixture), e.network !== (r?.network ?? "success") && o.set($.network, e.network), e.screenControls && !e.component) {
|
|
232
|
-
const h = qe(t, r, s), d = h.screen ? t.resolveControls(h.screen, { scenario: h.scenario }).values : {}, f = h.screen ? t.controlsOf(h.screen).map((
|
|
233
|
-
for (const
|
|
234
|
-
const
|
|
235
|
-
|
|
232
|
+
const h = qe(t, r, s), d = h.screen ? t.resolveControls(h.screen, { scenario: h.scenario }).values : {}, f = h.screen ? t.controlsOf(h.screen).map((S) => S.id) : Object.keys(e.screenControls);
|
|
233
|
+
for (const S of f) {
|
|
234
|
+
const b = e.screenControls[S];
|
|
235
|
+
b !== void 0 && b !== d[S] && o.set(`${ge}${S}`, b);
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
e.viewport !== "fit" && o.set($.viewport, e.viewport), e.viewport === "custom" && e.customWidth && o.set($.customWidth, String(e.customWidth));
|
|
@@ -243,30 +243,30 @@ function se(e, t, s) {
|
|
|
243
243
|
const a = t.product.dataSources?.default ?? "fixtures";
|
|
244
244
|
e.dataSource && e.dataSource !== a && o.set($.dataSource, e.dataSource), e.chromeTheme && o.set($.chromeTheme, e.chromeTheme), e.chrome || o.set($.chrome, "0"), e.inspector || o.set($.inspector, "0"), e.panelTab === "info" && o.set($.panelTab, "info");
|
|
245
245
|
const p = Ze(e.zoom === void 0 ? null : String(e.zoom));
|
|
246
|
-
p !== me && o.set($.zoom, String(p)), e.rotated && o.set($.rotated, "1"),
|
|
246
|
+
p !== me && o.set($.zoom, String(p)), e.rotated && o.set($.rotated, "1"), Pe(o, e.handoff);
|
|
247
247
|
const m = o.toString();
|
|
248
248
|
return m ? `?${m}` : "";
|
|
249
249
|
}
|
|
250
250
|
function Ge(e, t = {}) {
|
|
251
|
-
const s = !!t.frame, [o, r] = V(() =>
|
|
251
|
+
const s = !!t.frame, [o, r] = V(() => Se()), i = q(o), l = U((w) => {
|
|
252
252
|
i.current = w, r(w);
|
|
253
253
|
}, []);
|
|
254
254
|
I(() => {
|
|
255
|
-
const w = () => l(
|
|
255
|
+
const w = () => l(Se());
|
|
256
256
|
return window.addEventListener("popstate", w), () => window.removeEventListener("popstate", w);
|
|
257
257
|
}, [l]), I(() => {
|
|
258
258
|
if (!s || window.parent === window) return;
|
|
259
|
-
const w = window.location.origin, u = (
|
|
260
|
-
const y = Be(
|
|
259
|
+
const w = window.location.origin, u = (g) => {
|
|
260
|
+
const y = Be(g, { origin: w, source: window.parent });
|
|
261
261
|
if (y?.type !== "location") return;
|
|
262
262
|
const { path: _, search: z } = Ne(y.url);
|
|
263
263
|
window.history.replaceState(null, "", ue(_, z)), l({ path: _, search: z });
|
|
264
264
|
};
|
|
265
265
|
window.addEventListener("message", u);
|
|
266
|
-
const
|
|
266
|
+
const k = Se();
|
|
267
267
|
return ae(
|
|
268
268
|
window.parent,
|
|
269
|
-
{ ds: 1, type: "ready", url: ue(
|
|
269
|
+
{ ds: 1, type: "ready", url: ue(k.path, k.search) },
|
|
270
270
|
w
|
|
271
271
|
), () => window.removeEventListener("message", u);
|
|
272
272
|
}, [s, l]);
|
|
@@ -274,18 +274,18 @@ function Ge(e, t = {}) {
|
|
|
274
274
|
() => $e(o.search, e, o.path),
|
|
275
275
|
[o.path, o.search, e]
|
|
276
276
|
), p = U(
|
|
277
|
-
(w, u,
|
|
277
|
+
(w, u, k = !1) => {
|
|
278
278
|
if (s) {
|
|
279
279
|
const y = ue(w, u), _ = Ne(y);
|
|
280
280
|
window.history.replaceState(null, "", y), l(_), ae(
|
|
281
281
|
window.parent === window ? void 0 : window.parent,
|
|
282
|
-
{ ds: 1, type: "navigate", url: y, replace:
|
|
282
|
+
{ ds: 1, type: "navigate", url: y, replace: k },
|
|
283
283
|
window.location.origin
|
|
284
284
|
);
|
|
285
285
|
return;
|
|
286
286
|
}
|
|
287
|
-
const
|
|
288
|
-
|
|
287
|
+
const g = `${w}${u}`;
|
|
288
|
+
k ? window.history.replaceState(null, "", g) : window.history.pushState(null, "", g), l({ path: w, search: u });
|
|
289
289
|
},
|
|
290
290
|
[s, l]
|
|
291
291
|
), m = U(() => {
|
|
@@ -293,29 +293,29 @@ function Ge(e, t = {}) {
|
|
|
293
293
|
return w === o ? a : $e(w.search, e, w.path);
|
|
294
294
|
}, [a, o, e]), h = U(
|
|
295
295
|
(w) => {
|
|
296
|
-
const u = i.current,
|
|
297
|
-
|
|
296
|
+
const u = i.current, k = { ...m(), ...w }, g = $t(se(k, e, u.path), u.search);
|
|
297
|
+
g !== u.search && p(u.path, g, !0);
|
|
298
298
|
},
|
|
299
299
|
[m, p, e]
|
|
300
300
|
), d = U(
|
|
301
301
|
(w) => {
|
|
302
302
|
const u = m().screenControls ?? {};
|
|
303
|
-
Object.entries(w).some(([
|
|
303
|
+
Object.entries(w).some(([g, y]) => u[g] !== y) && h({ screenControls: { ...u, ...w } });
|
|
304
304
|
},
|
|
305
305
|
[m, h]
|
|
306
306
|
), f = U(
|
|
307
307
|
(w, u) => {
|
|
308
|
-
const
|
|
308
|
+
const k = yt(w, i.current, e, {
|
|
309
309
|
controls: u?.controls
|
|
310
310
|
});
|
|
311
|
-
p(
|
|
311
|
+
p(k.path, k.search, u?.replace ?? !1);
|
|
312
312
|
},
|
|
313
313
|
[p, e]
|
|
314
|
-
),
|
|
314
|
+
), S = U(
|
|
315
315
|
(w) => {
|
|
316
316
|
const u = e.scenario(w);
|
|
317
317
|
if (!u || !oe(a.handoff, w)) return;
|
|
318
|
-
const
|
|
318
|
+
const k = {
|
|
319
319
|
...a,
|
|
320
320
|
scenario: u.id,
|
|
321
321
|
component: void 0,
|
|
@@ -325,41 +325,41 @@ function Ge(e, t = {}) {
|
|
|
325
325
|
// Os controles voltam ao que o cenário fixa, sobre os padrões da tela.
|
|
326
326
|
screenControls: void 0
|
|
327
327
|
};
|
|
328
|
-
p(u.route, se(
|
|
328
|
+
p(u.route, se(k, e, u.route), !1);
|
|
329
329
|
},
|
|
330
330
|
[a, p, e]
|
|
331
|
-
),
|
|
331
|
+
), b = U(
|
|
332
332
|
(w, u) => {
|
|
333
|
-
const
|
|
334
|
-
if (!
|
|
335
|
-
const
|
|
333
|
+
const k = e.component(w);
|
|
334
|
+
if (!k || !ve(a.handoff, w)) return;
|
|
335
|
+
const g = {
|
|
336
336
|
...a,
|
|
337
337
|
scenario: void 0,
|
|
338
|
-
component:
|
|
338
|
+
component: k.id,
|
|
339
339
|
persona: void 0,
|
|
340
340
|
fixture: void 0,
|
|
341
341
|
network: "success",
|
|
342
342
|
screenControls: void 0
|
|
343
343
|
};
|
|
344
|
-
|
|
344
|
+
g.fixture = e.componentFixture(k.id, k.defaultFixture)?.id ?? k.fixtures?.[0]?.id, p("/", se(g, e), u?.replace ?? !1);
|
|
345
345
|
},
|
|
346
346
|
[a, p, e]
|
|
347
347
|
), L = U(
|
|
348
348
|
(w, u) => {
|
|
349
|
-
const
|
|
350
|
-
if (!
|
|
351
|
-
const
|
|
352
|
-
if (
|
|
349
|
+
const k = e.screensFor({ handoff: a.handoff }).find((_) => _.id === w);
|
|
350
|
+
if (!k) return;
|
|
351
|
+
const g = k.variations[0];
|
|
352
|
+
if (g) {
|
|
353
353
|
const _ = {
|
|
354
354
|
...a,
|
|
355
|
-
scenario:
|
|
355
|
+
scenario: g.id,
|
|
356
356
|
component: void 0,
|
|
357
|
-
persona:
|
|
358
|
-
fixture:
|
|
359
|
-
network:
|
|
357
|
+
persona: g.persona,
|
|
358
|
+
fixture: g.fixture,
|
|
359
|
+
network: g.network ?? "success",
|
|
360
360
|
screenControls: void 0
|
|
361
361
|
};
|
|
362
|
-
p(
|
|
362
|
+
p(g.route, se(_, e, g.route), u?.replace ?? !1);
|
|
363
363
|
return;
|
|
364
364
|
}
|
|
365
365
|
const y = {
|
|
@@ -371,13 +371,13 @@ function Ge(e, t = {}) {
|
|
|
371
371
|
network: "success",
|
|
372
372
|
screenControls: void 0
|
|
373
373
|
};
|
|
374
|
-
p(
|
|
374
|
+
p(k.href, se(y, e, k.href), u?.replace ?? !1);
|
|
375
375
|
},
|
|
376
376
|
[a, p, e]
|
|
377
|
-
),
|
|
378
|
-
(w, u,
|
|
377
|
+
), T = U(
|
|
378
|
+
(w, u, k) => p(w || "/", u, k?.replace ?? !1),
|
|
379
379
|
[p]
|
|
380
|
-
), N = D(() =>
|
|
380
|
+
), N = D(() => Lt(a), [a]);
|
|
381
381
|
return {
|
|
382
382
|
location: o,
|
|
383
383
|
controls: a,
|
|
@@ -385,43 +385,50 @@ function Ge(e, t = {}) {
|
|
|
385
385
|
setControls: h,
|
|
386
386
|
setScreenControls: d,
|
|
387
387
|
navigate: f,
|
|
388
|
-
openScenario:
|
|
389
|
-
openComponent:
|
|
388
|
+
openScenario: S,
|
|
389
|
+
openComponent: b,
|
|
390
390
|
openScreen: L,
|
|
391
|
-
go:
|
|
391
|
+
go: T
|
|
392
392
|
};
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function yt(e, t, s, o = {}) {
|
|
395
395
|
const r = e.split("#")[0] ?? e, i = r.indexOf("?"), l = (i === -1 ? r : r.slice(0, i)) || "/", a = i === -1 ? void 0 : r.slice(i + 1), p = new URLSearchParams(t.search), m = $e(t.search, s, t.path);
|
|
396
396
|
let h;
|
|
397
397
|
if (a === void 0 && o.controls === void 0)
|
|
398
|
-
h = new URLSearchParams(t.search), s.screenForPath(l)?.id !== s.screenForPath(t.path)?.id &&
|
|
398
|
+
h = new URLSearchParams(t.search), s.screenForPath(l)?.id !== s.screenForPath(t.path)?.id && ft(h);
|
|
399
399
|
else {
|
|
400
400
|
const f = new URLSearchParams(a ?? "");
|
|
401
401
|
h = new URLSearchParams();
|
|
402
|
-
for (const [
|
|
403
|
-
!
|
|
402
|
+
for (const [S, b] of p)
|
|
403
|
+
!Mt(S) || f.has(S) || h.append(S, b);
|
|
404
404
|
m.scenario && !f.has($.scenario) && m.persona && m.persona !== s.defaultPersona && !h.has($.persona) && !f.has($.persona) && h.set($.persona, m.persona);
|
|
405
|
-
for (const [
|
|
405
|
+
for (const [S, b] of f) h.append(S, b);
|
|
406
406
|
if (o.controls) {
|
|
407
|
-
const
|
|
407
|
+
const S = s.screenForPath(l), b = s.scenario(h.get($.scenario) ?? void 0), L = b && S && s.screenOf(b)?.id === S.id ? b : void 0, T = S ? s.resolveControls(S, { scenario: L }).values : {};
|
|
408
408
|
for (const [N, w] of Object.entries(o.controls)) {
|
|
409
|
-
const u = `${
|
|
410
|
-
|
|
409
|
+
const u = `${ge}${N}`;
|
|
410
|
+
T[N] === w ? h.delete(u) : h.set(u, w);
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
m.handoff &&
|
|
414
|
+
m.handoff && Pe(h, m.handoff);
|
|
415
415
|
const d = h.toString();
|
|
416
416
|
return { path: l, search: d ? `?${d}` : "" };
|
|
417
417
|
}
|
|
418
|
-
function
|
|
419
|
-
|
|
418
|
+
function $t(e, t) {
|
|
419
|
+
const s = new URLSearchParams(e);
|
|
420
|
+
for (const [r, i] of new URLSearchParams(t))
|
|
421
|
+
r === pt || mt(r) || s.append(r, i);
|
|
422
|
+
const o = s.toString();
|
|
423
|
+
return o ? `?${o}` : "";
|
|
420
424
|
}
|
|
421
|
-
function
|
|
425
|
+
function Mt(e) {
|
|
426
|
+
return e.startsWith(ge) ? !1 : e !== $.scenario && e !== $.fixture && e !== $.component;
|
|
427
|
+
}
|
|
428
|
+
function Lt(e) {
|
|
422
429
|
if (e.viewport === "custom")
|
|
423
430
|
return { id: "custom", label: "Personalizado", width: e.customWidth ?? 1024 };
|
|
424
|
-
const t =
|
|
431
|
+
const t = Nt.find((s) => s.id === e.viewport) ?? {
|
|
425
432
|
id: "fit",
|
|
426
433
|
label: "Ajustar"
|
|
427
434
|
};
|
|
@@ -430,71 +437,71 @@ function yt(e) {
|
|
|
430
437
|
function Ze(e) {
|
|
431
438
|
if (e === null) return me;
|
|
432
439
|
const t = Number.parseInt(e, 10);
|
|
433
|
-
return Number.isFinite(t) ? Math.min(Ee, Math.max(
|
|
440
|
+
return Number.isFinite(t) ? Math.min(Ee, Math.max(Te, t)) : me;
|
|
434
441
|
}
|
|
435
|
-
function
|
|
442
|
+
function Se() {
|
|
436
443
|
return typeof window > "u" ? { path: "/", search: "" } : { path: window.location.pathname, search: window.location.search };
|
|
437
444
|
}
|
|
438
|
-
function
|
|
445
|
+
function Pt(e) {
|
|
439
446
|
return e !== null && He.includes(e);
|
|
440
447
|
}
|
|
441
|
-
function
|
|
448
|
+
function Tt(e) {
|
|
442
449
|
return e === "dark" || e === "light";
|
|
443
450
|
}
|
|
444
|
-
function
|
|
451
|
+
function Et(e) {
|
|
445
452
|
return e === "variations" || e === "info";
|
|
446
453
|
}
|
|
447
|
-
function
|
|
454
|
+
function Rt(e) {
|
|
448
455
|
if (!e) return;
|
|
449
456
|
const t = Number.parseInt(e, 10);
|
|
450
457
|
return Number.isFinite(t) && t > 0 ? t : void 0;
|
|
451
458
|
}
|
|
452
|
-
const
|
|
453
|
-
mobile: /* @__PURE__ */
|
|
459
|
+
const _t = "@brucesantos/design-space", Fe = "0.9.3", Ft = {
|
|
460
|
+
mobile: /* @__PURE__ */ C(Y, { children: [
|
|
454
461
|
/* @__PURE__ */ n("rect", { x: "7", y: "2.5", width: "10", height: "19", rx: "2" }),
|
|
455
462
|
/* @__PURE__ */ n("path", { d: "M11 18.5h2" })
|
|
456
463
|
] }),
|
|
457
|
-
tablet: /* @__PURE__ */
|
|
464
|
+
tablet: /* @__PURE__ */ C(Y, { children: [
|
|
458
465
|
/* @__PURE__ */ n("rect", { x: "4.5", y: "2.5", width: "15", height: "19", rx: "2" }),
|
|
459
466
|
/* @__PURE__ */ n("path", { d: "M11 18.5h2" })
|
|
460
467
|
] }),
|
|
461
|
-
desktop: /* @__PURE__ */
|
|
468
|
+
desktop: /* @__PURE__ */ C(Y, { children: [
|
|
462
469
|
/* @__PURE__ */ n("rect", { x: "2.5", y: "4", width: "19", height: "12.5", rx: "1.5" }),
|
|
463
470
|
/* @__PURE__ */ n("path", { d: "M8.5 20.5h7M12 16.5v4" })
|
|
464
471
|
] }),
|
|
465
472
|
fit: /* @__PURE__ */ n("path", { d: "M3 12h7M3 12l3-3M3 12l3 3M21 12h-7M21 12l-3-3M21 12l-3 3" }),
|
|
466
|
-
rotate: /* @__PURE__ */
|
|
473
|
+
rotate: /* @__PURE__ */ C(Y, { children: [
|
|
467
474
|
/* @__PURE__ */ n("path", { d: "M20 12a8 8 0 1 1-2.34-5.66" }),
|
|
468
475
|
/* @__PURE__ */ n("path", { d: "M20 4v4.5h-4.5" })
|
|
469
476
|
] }),
|
|
470
477
|
minus: /* @__PURE__ */ n("path", { d: "M5 12h14" }),
|
|
471
478
|
plus: /* @__PURE__ */ n("path", { d: "M5 12h14M12 5v14" }),
|
|
472
479
|
"arrow-up-right": /* @__PURE__ */ n("path", { d: "M7 17 17 7M8 7h9v9" }),
|
|
473
|
-
link: /* @__PURE__ */
|
|
480
|
+
link: /* @__PURE__ */ C(Y, { children: [
|
|
474
481
|
/* @__PURE__ */ n("path", { d: "M10 14a4 4 0 0 0 5.66 0l3-3a4 4 0 0 0-5.66-5.66l-1 1" }),
|
|
475
482
|
/* @__PURE__ */ n("path", { d: "M14 10a4 4 0 0 0-5.66 0l-3 3a4 4 0 0 0 5.66 5.66l1-1" })
|
|
476
483
|
] }),
|
|
477
484
|
check: /* @__PURE__ */ n("path", { d: "M5 12.5l4.5 4.5L19 7.5" }),
|
|
478
485
|
fullscreen: /* @__PURE__ */ n("path", { d: "M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5" }),
|
|
479
|
-
sun: /* @__PURE__ */
|
|
486
|
+
sun: /* @__PURE__ */ C(Y, { children: [
|
|
480
487
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "4" }),
|
|
481
488
|
/* @__PURE__ */ n("path", { d: "M12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4" })
|
|
482
489
|
] }),
|
|
483
490
|
moon: /* @__PURE__ */ n("path", { d: "M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5Z" }),
|
|
484
|
-
panel: /* @__PURE__ */
|
|
491
|
+
panel: /* @__PURE__ */ C(Y, { children: [
|
|
485
492
|
/* @__PURE__ */ n("rect", { x: "3", y: "4", width: "18", height: "16", rx: "2" }),
|
|
486
493
|
/* @__PURE__ */ n("path", { d: "M15 4v16" })
|
|
487
494
|
] }),
|
|
488
|
-
alert: /* @__PURE__ */
|
|
495
|
+
alert: /* @__PURE__ */ C(Y, { children: [
|
|
489
496
|
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "9" }),
|
|
490
497
|
/* @__PURE__ */ n("path", { d: "M12 7.5v5.5M12 16.2v.3" })
|
|
491
498
|
] }),
|
|
492
499
|
chevron: /* @__PURE__ */ n("path", { d: "M9 6l6 6-6 6" }),
|
|
493
|
-
search: /* @__PURE__ */
|
|
500
|
+
search: /* @__PURE__ */ C(Y, { children: [
|
|
494
501
|
/* @__PURE__ */ n("circle", { cx: "11", cy: "11", r: "6.5" }),
|
|
495
502
|
/* @__PURE__ */ n("path", { d: "M20 20l-4.2-4.2" })
|
|
496
503
|
] }),
|
|
497
|
-
copy: /* @__PURE__ */
|
|
504
|
+
copy: /* @__PURE__ */ C(Y, { children: [
|
|
498
505
|
/* @__PURE__ */ n("rect", { x: "8.5", y: "8.5", width: "12", height: "12", rx: "2" }),
|
|
499
506
|
/* @__PURE__ */ n("path", { d: "M15.5 8.5V5.5a2 2 0 0 0-2-2h-8a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h3" })
|
|
500
507
|
] })
|
|
@@ -514,7 +521,7 @@ function H({ name: e, size: t = 16 }) {
|
|
|
514
521
|
strokeLinejoin: "round",
|
|
515
522
|
"aria-hidden": "true",
|
|
516
523
|
focusable: "false",
|
|
517
|
-
children:
|
|
524
|
+
children: Ft[e]
|
|
518
525
|
}
|
|
519
526
|
);
|
|
520
527
|
}
|
|
@@ -659,7 +666,7 @@ const ne = {
|
|
|
659
666
|
empty: "Nada para mostrar ainda",
|
|
660
667
|
emptyHint: "O produto ainda não registrou telas nem componentes."
|
|
661
668
|
}
|
|
662
|
-
},
|
|
669
|
+
}, un = {
|
|
663
670
|
network: {
|
|
664
671
|
success: "Success",
|
|
665
672
|
loading: "Loading",
|
|
@@ -801,7 +808,7 @@ const ne = {
|
|
|
801
808
|
emptyHint: "The product has not registered any screens or components yet."
|
|
802
809
|
}
|
|
803
810
|
};
|
|
804
|
-
function
|
|
811
|
+
function Ot(e) {
|
|
805
812
|
if (!e) return ne;
|
|
806
813
|
const t = { ...ne };
|
|
807
814
|
for (const s of Object.keys(ne)) {
|
|
@@ -814,16 +821,16 @@ const Ye = lt(ne);
|
|
|
814
821
|
function J() {
|
|
815
822
|
return ct(Ye);
|
|
816
823
|
}
|
|
817
|
-
const
|
|
824
|
+
const hn = ne.network, zt = [
|
|
818
825
|
{ id: "mobile", icon: "mobile" },
|
|
819
826
|
{ id: "tablet", icon: "tablet" },
|
|
820
827
|
{ id: "desktop", icon: "desktop" },
|
|
821
828
|
{ id: "fit", icon: "fit" }
|
|
822
829
|
], Oe = [25, 33, 50, 67, 75, 90, 100, 110, 125, 150];
|
|
823
830
|
function ze(e, t) {
|
|
824
|
-
return t > 0 ? Oe.find((s) => s > e) ?? Ee : [...Oe].reverse().find((s) => s < e) ??
|
|
831
|
+
return t > 0 ? Oe.find((s) => s > e) ?? Ee : [...Oe].reverse().find((s) => s < e) ?? Te;
|
|
825
832
|
}
|
|
826
|
-
function
|
|
833
|
+
function At({
|
|
827
834
|
productName: e,
|
|
828
835
|
viewportId: t,
|
|
829
836
|
viewport: s,
|
|
@@ -838,40 +845,40 @@ function Ft({
|
|
|
838
845
|
onCleanReview: d,
|
|
839
846
|
onToggleTheme: f
|
|
840
847
|
}) {
|
|
841
|
-
const
|
|
848
|
+
const S = J(), b = S.topbar, [L, T] = V(!1), N = (t === "mobile" || t === "tablet") && !!(s.width && s.height), w = async () => {
|
|
842
849
|
try {
|
|
843
850
|
await navigator.clipboard.writeText(a);
|
|
844
851
|
} catch {
|
|
845
|
-
window.prompt(
|
|
852
|
+
window.prompt(b.copyPrompt, a);
|
|
846
853
|
}
|
|
847
|
-
|
|
854
|
+
T(!0), window.setTimeout(() => T(!1), 1600);
|
|
848
855
|
};
|
|
849
|
-
return /* @__PURE__ */
|
|
850
|
-
/* @__PURE__ */
|
|
856
|
+
return /* @__PURE__ */ C("header", { className: "ds-topbar", "aria-label": b.region, children: [
|
|
857
|
+
/* @__PURE__ */ C("div", { className: "ds-topbar__product", children: [
|
|
851
858
|
/* @__PURE__ */ n("span", { className: "ds-topbar__name", children: e }),
|
|
852
859
|
/* @__PURE__ */ n(
|
|
853
860
|
"a",
|
|
854
861
|
{
|
|
855
862
|
className: "ds-topbar__version",
|
|
856
|
-
href: `https://www.npmjs.com/package/${
|
|
863
|
+
href: `https://www.npmjs.com/package/${_t}/v/${Fe}`,
|
|
857
864
|
target: "_blank",
|
|
858
865
|
rel: "noreferrer",
|
|
859
|
-
children:
|
|
866
|
+
children: b.engineVersion(Fe)
|
|
860
867
|
}
|
|
861
868
|
)
|
|
862
869
|
] }),
|
|
863
|
-
/* @__PURE__ */
|
|
864
|
-
/* @__PURE__ */
|
|
865
|
-
|
|
866
|
-
const
|
|
870
|
+
/* @__PURE__ */ C("div", { className: "ds-topbar__view", children: [
|
|
871
|
+
/* @__PURE__ */ C("div", { className: "ds-group", role: "group", "aria-label": b.viewportGroup, children: [
|
|
872
|
+
zt.map((u) => {
|
|
873
|
+
const k = S.viewport[u.id] ?? u.id;
|
|
867
874
|
return /* @__PURE__ */ n(
|
|
868
875
|
"button",
|
|
869
876
|
{
|
|
870
877
|
type: "button",
|
|
871
878
|
className: "ds-btn ds-btn--icon",
|
|
872
879
|
"aria-pressed": t === u.id,
|
|
873
|
-
"aria-label":
|
|
874
|
-
title:
|
|
880
|
+
"aria-label": k,
|
|
881
|
+
title: k,
|
|
875
882
|
onClick: () => p(u.id),
|
|
876
883
|
children: /* @__PURE__ */ n(H, { name: u.icon })
|
|
877
884
|
},
|
|
@@ -884,23 +891,23 @@ function Ft({
|
|
|
884
891
|
type: "button",
|
|
885
892
|
className: "ds-btn ds-btn--icon",
|
|
886
893
|
"aria-pressed": r,
|
|
887
|
-
"aria-label":
|
|
888
|
-
title:
|
|
894
|
+
"aria-label": b.rotate,
|
|
895
|
+
title: b.rotate,
|
|
889
896
|
disabled: !N,
|
|
890
897
|
onClick: m,
|
|
891
898
|
children: /* @__PURE__ */ n(H, { name: "rotate" })
|
|
892
899
|
}
|
|
893
900
|
)
|
|
894
901
|
] }),
|
|
895
|
-
/* @__PURE__ */
|
|
902
|
+
/* @__PURE__ */ C("div", { className: "ds-group", role: "group", children: [
|
|
896
903
|
/* @__PURE__ */ n(
|
|
897
904
|
"button",
|
|
898
905
|
{
|
|
899
906
|
type: "button",
|
|
900
907
|
className: "ds-btn ds-btn--icon",
|
|
901
|
-
"aria-label":
|
|
902
|
-
title:
|
|
903
|
-
disabled: o <=
|
|
908
|
+
"aria-label": b.zoomOut,
|
|
909
|
+
title: b.zoomOut,
|
|
910
|
+
disabled: o <= Te,
|
|
904
911
|
onClick: () => h(ze(o, -1)),
|
|
905
912
|
children: /* @__PURE__ */ n(H, { name: "minus" })
|
|
906
913
|
}
|
|
@@ -910,10 +917,10 @@ function Ft({
|
|
|
910
917
|
{
|
|
911
918
|
type: "button",
|
|
912
919
|
className: "ds-btn ds-btn--zoom",
|
|
913
|
-
"aria-label":
|
|
914
|
-
title:
|
|
920
|
+
"aria-label": b.zoomReset,
|
|
921
|
+
title: b.zoomReset,
|
|
915
922
|
onClick: () => h(me),
|
|
916
|
-
children:
|
|
923
|
+
children: b.zoomValue(o)
|
|
917
924
|
}
|
|
918
925
|
),
|
|
919
926
|
/* @__PURE__ */ n(
|
|
@@ -921,8 +928,8 @@ function Ft({
|
|
|
921
928
|
{
|
|
922
929
|
type: "button",
|
|
923
930
|
className: "ds-btn ds-btn--icon",
|
|
924
|
-
"aria-label":
|
|
925
|
-
title:
|
|
931
|
+
"aria-label": b.zoomIn,
|
|
932
|
+
title: b.zoomIn,
|
|
926
933
|
disabled: o >= Ee,
|
|
927
934
|
onClick: () => h(ze(o, 1)),
|
|
928
935
|
children: /* @__PURE__ */ n(H, { name: "plus" })
|
|
@@ -934,21 +941,21 @@ function Ft({
|
|
|
934
941
|
{
|
|
935
942
|
type: "button",
|
|
936
943
|
className: "ds-btn ds-btn--icon",
|
|
937
|
-
"aria-label":
|
|
938
|
-
title:
|
|
944
|
+
"aria-label": b.cleanReview,
|
|
945
|
+
title: b.cleanReview,
|
|
939
946
|
onClick: d,
|
|
940
947
|
children: /* @__PURE__ */ n(H, { name: "fullscreen" })
|
|
941
948
|
}
|
|
942
949
|
)
|
|
943
950
|
] }),
|
|
944
|
-
/* @__PURE__ */
|
|
951
|
+
/* @__PURE__ */ C("div", { className: "ds-topbar__tools", children: [
|
|
945
952
|
/* @__PURE__ */ n(
|
|
946
953
|
"button",
|
|
947
954
|
{
|
|
948
955
|
type: "button",
|
|
949
956
|
className: "ds-btn ds-btn--icon",
|
|
950
|
-
"aria-label": L ?
|
|
951
|
-
title: L ?
|
|
957
|
+
"aria-label": L ? b.copied : b.copyLink,
|
|
958
|
+
title: L ? b.copied : b.copyLink,
|
|
952
959
|
onClick: w,
|
|
953
960
|
children: /* @__PURE__ */ n(H, { name: L ? "check" : "link" })
|
|
954
961
|
}
|
|
@@ -958,17 +965,17 @@ function Ft({
|
|
|
958
965
|
{
|
|
959
966
|
type: "button",
|
|
960
967
|
className: "ds-btn ds-btn--icon",
|
|
961
|
-
"aria-label": i === "dark" ?
|
|
962
|
-
title: i === "dark" ?
|
|
968
|
+
"aria-label": i === "dark" ? b.lightMode : b.darkMode,
|
|
969
|
+
title: i === "dark" ? b.lightMode : b.darkMode,
|
|
963
970
|
onClick: f,
|
|
964
971
|
children: /* @__PURE__ */ n(H, { name: i === "dark" ? "sun" : "moon" })
|
|
965
972
|
}
|
|
966
973
|
),
|
|
967
|
-
l.length > 0 && /* @__PURE__ */ n(
|
|
974
|
+
l.length > 0 && /* @__PURE__ */ n(Dt, { issues: l })
|
|
968
975
|
] })
|
|
969
976
|
] });
|
|
970
977
|
}
|
|
971
|
-
function
|
|
978
|
+
function Dt({ issues: e }) {
|
|
972
979
|
const t = J(), [s, o] = V(!1), r = q(null), i = e.filter((p) => p.level === "error").length, l = e.length - i, a = t.topbar.diagnostics(i, l);
|
|
973
980
|
return I(() => {
|
|
974
981
|
if (!s) return;
|
|
@@ -980,8 +987,8 @@ function Ot({ issues: e }) {
|
|
|
980
987
|
return window.addEventListener("pointerdown", p), window.addEventListener("keydown", m), () => {
|
|
981
988
|
window.removeEventListener("pointerdown", p), window.removeEventListener("keydown", m);
|
|
982
989
|
};
|
|
983
|
-
}, [s]), /* @__PURE__ */
|
|
984
|
-
/* @__PURE__ */
|
|
990
|
+
}, [s]), /* @__PURE__ */ C("div", { className: "ds-diagnostics", ref: r, children: [
|
|
991
|
+
/* @__PURE__ */ C(
|
|
985
992
|
"button",
|
|
986
993
|
{
|
|
987
994
|
type: "button",
|
|
@@ -997,12 +1004,12 @@ function Ot({ issues: e }) {
|
|
|
997
1004
|
]
|
|
998
1005
|
}
|
|
999
1006
|
),
|
|
1000
|
-
s && /* @__PURE__ */
|
|
1001
|
-
/* @__PURE__ */
|
|
1007
|
+
s && /* @__PURE__ */ C("div", { className: "ds-diagnostics__popover", role: "dialog", "aria-label": t.diagnostics.title, children: [
|
|
1008
|
+
/* @__PURE__ */ C("div", { className: "ds-diagnostics__head", children: [
|
|
1002
1009
|
/* @__PURE__ */ n("strong", { children: t.diagnostics.title }),
|
|
1003
1010
|
/* @__PURE__ */ n("span", { className: "ds-muted", children: a })
|
|
1004
1011
|
] }),
|
|
1005
|
-
/* @__PURE__ */ n("ul", { className: "ds-diagnostics__list", children: e.map((p, m) => /* @__PURE__ */
|
|
1012
|
+
/* @__PURE__ */ n("ul", { className: "ds-diagnostics__list", children: e.map((p, m) => /* @__PURE__ */ C("li", { className: "ds-diagnostics__item", "data-level": p.level, children: [
|
|
1006
1013
|
/* @__PURE__ */ n("span", { className: "ds-diagnostics__level", children: p.level === "error" ? t.diagnostics.error : t.diagnostics.warning }),
|
|
1007
1014
|
/* @__PURE__ */ n("code", { className: "ds-diagnostics__where", children: p.where }),
|
|
1008
1015
|
/* @__PURE__ */ n("span", { className: "ds-diagnostics__message", children: p.message })
|
|
@@ -1010,7 +1017,7 @@ function Ot({ issues: e }) {
|
|
|
1010
1017
|
] })
|
|
1011
1018
|
] });
|
|
1012
1019
|
}
|
|
1013
|
-
const
|
|
1020
|
+
const Vt = 16;
|
|
1014
1021
|
function Xe({ side: e, label: t, value: s, onChange: o, onStart: r, onEnd: i }) {
|
|
1015
1022
|
const l = q(void 0), a = e === "left" ? 1 : -1, p = (f) => {
|
|
1016
1023
|
if (f.button === 0) {
|
|
@@ -1044,13 +1051,13 @@ function Xe({ side: e, label: t, value: s, onChange: o, onStart: r, onEnd: i })
|
|
|
1044
1051
|
onKeyDown: (f) => {
|
|
1045
1052
|
if (f.key !== "ArrowLeft" && f.key !== "ArrowRight") return;
|
|
1046
1053
|
f.preventDefault();
|
|
1047
|
-
const
|
|
1048
|
-
o(s +
|
|
1054
|
+
const S = f.key === "ArrowRight" ? 1 : -1;
|
|
1055
|
+
o(s + S * a * Vt);
|
|
1049
1056
|
}
|
|
1050
1057
|
}
|
|
1051
1058
|
);
|
|
1052
1059
|
}
|
|
1053
|
-
function
|
|
1060
|
+
function Kt({
|
|
1054
1061
|
registry: e,
|
|
1055
1062
|
handoff: t,
|
|
1056
1063
|
activeScreen: s,
|
|
@@ -1062,16 +1069,16 @@ function At({
|
|
|
1062
1069
|
onResizeStart: p,
|
|
1063
1070
|
onResizeEnd: m
|
|
1064
1071
|
}) {
|
|
1065
|
-
const d = J().sidebar, [f,
|
|
1072
|
+
const d = J().sidebar, [f, S] = V(""), [b, L] = V(() => /* @__PURE__ */ new Set()), T = q(null), N = e.screensFor({ handoff: t }), w = e.componentsFor(t), u = N.length > 0, k = w.length > 0, [g, y] = V(
|
|
1066
1073
|
() => o || !u ? "components" : "screens"
|
|
1067
1074
|
);
|
|
1068
1075
|
I(() => {
|
|
1069
|
-
o &&
|
|
1070
|
-
}, [o, s,
|
|
1071
|
-
const _ =
|
|
1076
|
+
o && k ? y("components") : s && u && y("screens");
|
|
1077
|
+
}, [o, s, k, u]);
|
|
1078
|
+
const _ = g;
|
|
1072
1079
|
I(() => {
|
|
1073
1080
|
const E = (K) => {
|
|
1074
|
-
|
|
1081
|
+
Wt(K) && (K.preventDefault(), T.current?.focus(), T.current?.select());
|
|
1075
1082
|
};
|
|
1076
1083
|
return window.addEventListener("keydown", E), () => window.removeEventListener("keydown", E);
|
|
1077
1084
|
}, []);
|
|
@@ -1081,31 +1088,31 @@ function At({
|
|
|
1081
1088
|
), c = D(
|
|
1082
1089
|
() => e.searchComponents(f, t),
|
|
1083
1090
|
[t, f, e]
|
|
1084
|
-
), v = D(() =>
|
|
1085
|
-
const
|
|
1086
|
-
return
|
|
1091
|
+
), v = D(() => It(c, d.ungrouped), [c, d.ungrouped]), x = D(() => je(z), [z]), M = f.trim().length > 0, F = (E) => L((K) => {
|
|
1092
|
+
const P = new Set(K);
|
|
1093
|
+
return P.has(E) ? P.delete(E) : P.add(E), P;
|
|
1087
1094
|
});
|
|
1088
|
-
return /* @__PURE__ */
|
|
1089
|
-
/* @__PURE__ */
|
|
1095
|
+
return /* @__PURE__ */ C("nav", { className: "ds-sidebar", "aria-label": d.region, style: { width: l }, children: [
|
|
1096
|
+
/* @__PURE__ */ C("div", { className: "ds-search", children: [
|
|
1090
1097
|
/* @__PURE__ */ n(H, { name: "search", size: 14 }),
|
|
1091
1098
|
/* @__PURE__ */ n(
|
|
1092
1099
|
"input",
|
|
1093
1100
|
{
|
|
1094
|
-
ref:
|
|
1101
|
+
ref: T,
|
|
1095
1102
|
className: "ds-input ds-search__input",
|
|
1096
1103
|
type: "search",
|
|
1097
1104
|
value: f,
|
|
1098
1105
|
placeholder: d.searchPlaceholder,
|
|
1099
1106
|
"aria-label": d.searchLabel,
|
|
1100
|
-
onChange: (E) =>
|
|
1107
|
+
onChange: (E) => S(E.target.value),
|
|
1101
1108
|
onKeyDown: (E) => {
|
|
1102
|
-
E.key === "Escape" &&
|
|
1109
|
+
E.key === "Escape" && S("");
|
|
1103
1110
|
}
|
|
1104
1111
|
}
|
|
1105
1112
|
),
|
|
1106
1113
|
/* @__PURE__ */ n("kbd", { className: "ds-kbd", "aria-hidden": "true", children: d.searchShortcut })
|
|
1107
1114
|
] }),
|
|
1108
|
-
/* @__PURE__ */
|
|
1115
|
+
/* @__PURE__ */ C("div", { className: "ds-tabs", role: "tablist", "aria-label": d.tabs, children: [
|
|
1109
1116
|
/* @__PURE__ */ n(
|
|
1110
1117
|
Ae,
|
|
1111
1118
|
{
|
|
@@ -1127,7 +1134,7 @@ function At({
|
|
|
1127
1134
|
] }),
|
|
1128
1135
|
/* @__PURE__ */ n("div", { className: "ds-sidebar__list", role: "tabpanel", children: _ === "screens" ? u ? z.length === 0 ? /* @__PURE__ */ n("p", { className: "ds-empty", children: d.noMatch(f) }) : x.map((E) => {
|
|
1129
1136
|
const K = /* @__PURE__ */ n("ul", { className: "ds-items", children: E.screens.map((A) => /* @__PURE__ */ n(
|
|
1130
|
-
|
|
1137
|
+
Ut,
|
|
1131
1138
|
{
|
|
1132
1139
|
screen: A,
|
|
1133
1140
|
active: A.id === s && !o,
|
|
@@ -1136,16 +1143,16 @@ function At({
|
|
|
1136
1143
|
A.id
|
|
1137
1144
|
)) });
|
|
1138
1145
|
if (E.name === void 0) return /* @__PURE__ */ n("div", { className: "ds-group-section", children: K }, "");
|
|
1139
|
-
const
|
|
1140
|
-
return /* @__PURE__ */
|
|
1141
|
-
/* @__PURE__ */
|
|
1146
|
+
const P = `screens:${E.name}`, O = b.has(P) && !M;
|
|
1147
|
+
return /* @__PURE__ */ C("section", { className: "ds-group-section", children: [
|
|
1148
|
+
/* @__PURE__ */ C(
|
|
1142
1149
|
"button",
|
|
1143
1150
|
{
|
|
1144
1151
|
type: "button",
|
|
1145
1152
|
className: "ds-group-section__head",
|
|
1146
1153
|
"aria-expanded": !O,
|
|
1147
1154
|
"aria-label": d.toggleGroup(E.name),
|
|
1148
|
-
onClick: () => F(
|
|
1155
|
+
onClick: () => F(P),
|
|
1149
1156
|
children: [
|
|
1150
1157
|
/* @__PURE__ */ n(H, { name: "chevron", size: 12 }),
|
|
1151
1158
|
/* @__PURE__ */ n("span", { children: E.name }),
|
|
@@ -1154,16 +1161,16 @@ function At({
|
|
|
1154
1161
|
}
|
|
1155
1162
|
),
|
|
1156
1163
|
!O && K
|
|
1157
|
-
] },
|
|
1158
|
-
}) : /* @__PURE__ */ n("p", { className: "ds-empty", children: d.emptyScreens }) :
|
|
1159
|
-
const
|
|
1160
|
-
return /* @__PURE__ */
|
|
1161
|
-
/* @__PURE__ */
|
|
1164
|
+
] }, P);
|
|
1165
|
+
}) : /* @__PURE__ */ n("p", { className: "ds-empty", children: d.emptyScreens }) : k ? c.length === 0 ? /* @__PURE__ */ n("p", { className: "ds-empty", children: d.noMatch(f) }) : v.map(({ group: E, items: K }) => {
|
|
1166
|
+
const P = b.has(E) && !M;
|
|
1167
|
+
return /* @__PURE__ */ C("section", { className: "ds-group-section", children: [
|
|
1168
|
+
/* @__PURE__ */ C(
|
|
1162
1169
|
"button",
|
|
1163
1170
|
{
|
|
1164
1171
|
type: "button",
|
|
1165
1172
|
className: "ds-group-section__head",
|
|
1166
|
-
"aria-expanded": !
|
|
1173
|
+
"aria-expanded": !P,
|
|
1167
1174
|
"aria-label": d.toggleGroup(E),
|
|
1168
1175
|
onClick: () => F(E),
|
|
1169
1176
|
children: [
|
|
@@ -1173,7 +1180,7 @@ function At({
|
|
|
1173
1180
|
]
|
|
1174
1181
|
}
|
|
1175
1182
|
),
|
|
1176
|
-
!
|
|
1183
|
+
!P && /* @__PURE__ */ n("ul", { className: "ds-items", children: K.map((O) => /* @__PURE__ */ n("li", { children: /* @__PURE__ */ n(
|
|
1177
1184
|
"button",
|
|
1178
1185
|
{
|
|
1179
1186
|
type: "button",
|
|
@@ -1204,7 +1211,7 @@ function Ae({
|
|
|
1204
1211
|
count: s,
|
|
1205
1212
|
onSelect: o
|
|
1206
1213
|
}) {
|
|
1207
|
-
return /* @__PURE__ */
|
|
1214
|
+
return /* @__PURE__ */ C(
|
|
1208
1215
|
"button",
|
|
1209
1216
|
{
|
|
1210
1217
|
type: "button",
|
|
@@ -1220,12 +1227,12 @@ function Ae({
|
|
|
1220
1227
|
}
|
|
1221
1228
|
);
|
|
1222
1229
|
}
|
|
1223
|
-
function
|
|
1230
|
+
function Ut({
|
|
1224
1231
|
screen: e,
|
|
1225
1232
|
active: t,
|
|
1226
1233
|
onOpen: s
|
|
1227
1234
|
}) {
|
|
1228
|
-
return /* @__PURE__ */ n("li", { children: /* @__PURE__ */
|
|
1235
|
+
return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ C(
|
|
1229
1236
|
"button",
|
|
1230
1237
|
{
|
|
1231
1238
|
type: "button",
|
|
@@ -1239,7 +1246,7 @@ function Dt({
|
|
|
1239
1246
|
}
|
|
1240
1247
|
) });
|
|
1241
1248
|
}
|
|
1242
|
-
function
|
|
1249
|
+
function It(e, t) {
|
|
1243
1250
|
const s = /* @__PURE__ */ new Map();
|
|
1244
1251
|
for (const o of e) {
|
|
1245
1252
|
const r = o.group?.trim() || t, i = s.get(r) ?? [];
|
|
@@ -1247,10 +1254,10 @@ function Vt(e, t) {
|
|
|
1247
1254
|
}
|
|
1248
1255
|
return [...s].map(([o, r]) => ({ group: o, items: r }));
|
|
1249
1256
|
}
|
|
1250
|
-
function
|
|
1257
|
+
function Wt(e) {
|
|
1251
1258
|
return (e.metaKey || e.ctrlKey) && !e.altKey && !e.shiftKey && e.key.toLowerCase() === "k";
|
|
1252
1259
|
}
|
|
1253
|
-
function
|
|
1260
|
+
function Ht({
|
|
1254
1261
|
screen: e,
|
|
1255
1262
|
variations: t,
|
|
1256
1263
|
components: s,
|
|
@@ -1269,8 +1276,8 @@ function Ut({
|
|
|
1269
1276
|
const d = pe(h, { origin: o.origin, overrides: i });
|
|
1270
1277
|
let f = `- [${Qe(h.title)}](${d})`;
|
|
1271
1278
|
if (p) {
|
|
1272
|
-
const
|
|
1273
|
-
f += ` · [${m ?? l.immutableLink}](${
|
|
1279
|
+
const S = pe(h, { origin: p, overrides: i });
|
|
1280
|
+
f += ` · [${m ?? l.immutableLink}](${S})`;
|
|
1274
1281
|
} else m && (f += ` · ${m}`);
|
|
1275
1282
|
a.push(f);
|
|
1276
1283
|
}
|
|
@@ -1300,7 +1307,7 @@ function fe(e) {
|
|
|
1300
1307
|
function Qe(e) {
|
|
1301
1308
|
return e.replace(/([[\]])/g, "\\$1");
|
|
1302
1309
|
}
|
|
1303
|
-
function
|
|
1310
|
+
function Bt({
|
|
1304
1311
|
flow: e,
|
|
1305
1312
|
registry: t,
|
|
1306
1313
|
open: s,
|
|
@@ -1310,15 +1317,15 @@ function It({
|
|
|
1310
1317
|
}) {
|
|
1311
1318
|
const l = r.pr, a = [`## ${e.name}`, ""], p = o.deploymentUrl ? `https://${o.deploymentUrl}` : void 0, m = o.shortCommit ? l.commit(o.shortCommit) : void 0, h = (d, f) => {
|
|
1312
1319
|
if (s && s.screen.id === d.id) {
|
|
1313
|
-
const L = new URL(s.location.path || "/", f),
|
|
1314
|
-
for (const N of
|
|
1315
|
-
for (const [N, w] of
|
|
1320
|
+
const L = new URL(s.location.path || "/", f), T = new URLSearchParams(s.location.search);
|
|
1321
|
+
for (const N of wt) T.delete(N);
|
|
1322
|
+
for (const [N, w] of T) L.searchParams.append(N, w);
|
|
1316
1323
|
return ye(L.searchParams, i), L.toString();
|
|
1317
1324
|
}
|
|
1318
|
-
const
|
|
1319
|
-
if (
|
|
1320
|
-
const
|
|
1321
|
-
return ye(
|
|
1325
|
+
const S = d.variations[0];
|
|
1326
|
+
if (S) return pe(S, { origin: f, overrides: i });
|
|
1327
|
+
const b = new URL(d.href, f);
|
|
1328
|
+
return ye(b.searchParams, i), b.toString();
|
|
1322
1329
|
};
|
|
1323
1330
|
for (const d of e.screens) {
|
|
1324
1331
|
a.push(`### ${d.name}`, ""), d.description && a.push(d.description, "");
|
|
@@ -1328,10 +1335,10 @@ function It({
|
|
|
1328
1335
|
for (const N of d.controls) {
|
|
1329
1336
|
a.push(`- ${ce(N.title)} (\`${N.id}\`)`);
|
|
1330
1337
|
for (const w of N.controls) {
|
|
1331
|
-
const u =
|
|
1332
|
-
(
|
|
1338
|
+
const u = be(w), k = w.options.map(
|
|
1339
|
+
(g) => g.value === u ? `${ce(g.label)} (\`${g.value}\`, ${l.defaultOption})` : `${ce(g.label)} (\`${g.value}\`)`
|
|
1333
1340
|
).join(" · ");
|
|
1334
|
-
a.push(` - ${ce(w.label)} (\`c.${w.id}\`): ${
|
|
1341
|
+
a.push(` - ${ce(w.label)} (\`c.${w.id}\`): ${k}`);
|
|
1335
1342
|
}
|
|
1336
1343
|
}
|
|
1337
1344
|
a.push("");
|
|
@@ -1345,11 +1352,11 @@ function It({
|
|
|
1345
1352
|
a.push("");
|
|
1346
1353
|
}
|
|
1347
1354
|
a.push(`**${l.expected}**`, "");
|
|
1348
|
-
const
|
|
1349
|
-
(N) => N.expected?.length && N.id !==
|
|
1355
|
+
const S = s?.screen.id === d.id ? s.variation : void 0, b = S?.expected?.length ? S.expected : d.route.expected, L = d.variations.filter(
|
|
1356
|
+
(N) => N.expected?.length && N.id !== S?.id
|
|
1350
1357
|
);
|
|
1351
|
-
if (!
|
|
1352
|
-
for (const N of
|
|
1358
|
+
if (!b?.length && L.length === 0 && a.push(l.noExpected, ""), b?.length) {
|
|
1359
|
+
for (const N of b) a.push(`- ${N}`);
|
|
1353
1360
|
a.push("");
|
|
1354
1361
|
}
|
|
1355
1362
|
for (const N of L) {
|
|
@@ -1357,10 +1364,10 @@ function It({
|
|
|
1357
1364
|
for (const w of N.expected ?? []) a.push(`- ${w}`);
|
|
1358
1365
|
a.push("");
|
|
1359
1366
|
}
|
|
1360
|
-
const
|
|
1361
|
-
if (
|
|
1367
|
+
const T = t.componentsOfScreen(d);
|
|
1368
|
+
if (T.length > 0) {
|
|
1362
1369
|
a.push(`**${l.components}**`, ""), a.push(`| ${l.component} | ${l.source} |`, "| --- | --- |");
|
|
1363
|
-
for (const N of
|
|
1370
|
+
for (const N of T) {
|
|
1364
1371
|
const w = N.source ? `\`${fe(N.source)}\`` : l.empty;
|
|
1365
1372
|
a.push(`| ${fe(N.name)} (\`${N.id}\`) | ${w} |`);
|
|
1366
1373
|
}
|
|
@@ -1374,19 +1381,19 @@ function It({
|
|
|
1374
1381
|
function ce(e) {
|
|
1375
1382
|
return e.replace(/([*_[\]`])/g, "\\$1");
|
|
1376
1383
|
}
|
|
1377
|
-
function
|
|
1378
|
-
const { tab: t, onTab: s, width: o, onResize: r, onResizeStart: i, onResizeEnd: l } = e, a = J().panel, [p, m] = V(""), h = q(null), d = q(null), [f,
|
|
1379
|
-
const
|
|
1380
|
-
return
|
|
1384
|
+
function jt(e) {
|
|
1385
|
+
const { tab: t, onTab: s, width: o, onResize: r, onResizeStart: i, onResizeEnd: l } = e, a = J().panel, [p, m] = V(""), h = q(null), d = q(null), [f, S] = V(!1), [b, L] = V(() => /* @__PURE__ */ new Set()), T = (w) => L((u) => {
|
|
1386
|
+
const k = new Set(u);
|
|
1387
|
+
return k.has(w) ? k.delete(w) : k.add(w), k;
|
|
1381
1388
|
}), N = p.trim().length > 0;
|
|
1382
1389
|
return I(() => {
|
|
1383
1390
|
const w = (u) => {
|
|
1384
|
-
|
|
1391
|
+
Zt(u) && (u.preventDefault(), h.current?.focus(), h.current?.select());
|
|
1385
1392
|
};
|
|
1386
1393
|
return window.addEventListener("keydown", w), () => window.removeEventListener("keydown", w);
|
|
1387
1394
|
}, []), Ue(() => {
|
|
1388
|
-
|
|
1389
|
-
}), /* @__PURE__ */
|
|
1395
|
+
S(Yt(d.current, p));
|
|
1396
|
+
}), /* @__PURE__ */ C("aside", { className: "ds-panel", "aria-label": a.region, style: { width: o }, children: [
|
|
1390
1397
|
/* @__PURE__ */ n(
|
|
1391
1398
|
Xe,
|
|
1392
1399
|
{
|
|
@@ -1398,7 +1405,7 @@ function Wt(e) {
|
|
|
1398
1405
|
onEnd: l
|
|
1399
1406
|
}
|
|
1400
1407
|
),
|
|
1401
|
-
/* @__PURE__ */
|
|
1408
|
+
/* @__PURE__ */ C("div", { className: "ds-search", children: [
|
|
1402
1409
|
/* @__PURE__ */ n(H, { name: "search", size: 14 }),
|
|
1403
1410
|
/* @__PURE__ */ n(
|
|
1404
1411
|
"input",
|
|
@@ -1417,7 +1424,7 @@ function Wt(e) {
|
|
|
1417
1424
|
),
|
|
1418
1425
|
/* @__PURE__ */ n("kbd", { className: "ds-kbd", "aria-hidden": "true", children: a.searchShortcut })
|
|
1419
1426
|
] }),
|
|
1420
|
-
/* @__PURE__ */
|
|
1427
|
+
/* @__PURE__ */ C("div", { className: "ds-tabs", role: "tablist", "aria-label": a.tabs, children: [
|
|
1421
1428
|
/* @__PURE__ */ n(
|
|
1422
1429
|
"button",
|
|
1423
1430
|
{
|
|
@@ -1443,13 +1450,13 @@ function Wt(e) {
|
|
|
1443
1450
|
}
|
|
1444
1451
|
)
|
|
1445
1452
|
] }),
|
|
1446
|
-
/* @__PURE__ */
|
|
1447
|
-
t === "variations" ? /* @__PURE__ */ n(
|
|
1453
|
+
/* @__PURE__ */ C("div", { className: "ds-panel__body", role: "tabpanel", ref: d, children: [
|
|
1454
|
+
t === "variations" ? /* @__PURE__ */ n(qt, { ...e, collapsed: b, onToggle: T, filtering: N }) : /* @__PURE__ */ n(Gt, { ...e }),
|
|
1448
1455
|
f && /* @__PURE__ */ n("p", { className: "ds-empty", children: a.noMatch(p) })
|
|
1449
1456
|
] })
|
|
1450
1457
|
] });
|
|
1451
1458
|
}
|
|
1452
|
-
function
|
|
1459
|
+
function qt({
|
|
1453
1460
|
registry: e,
|
|
1454
1461
|
controls: t,
|
|
1455
1462
|
screen: s,
|
|
@@ -1464,24 +1471,24 @@ function Ht({
|
|
|
1464
1471
|
if (r) {
|
|
1465
1472
|
const u = r.fixtures ?? [];
|
|
1466
1473
|
if (u.length === 0) return /* @__PURE__ */ n("p", { className: "ds-empty", children: h.noComponentVariations });
|
|
1467
|
-
const
|
|
1468
|
-
return /* @__PURE__ */
|
|
1469
|
-
i.didFallback && i.requestedId &&
|
|
1470
|
-
/* @__PURE__ */ n(le, { title: r.name, hint:
|
|
1474
|
+
const k = i.fixture;
|
|
1475
|
+
return /* @__PURE__ */ C("div", { className: "ds-vcards", children: [
|
|
1476
|
+
i.didFallback && i.requestedId && k && /* @__PURE__ */ n("p", { className: "ds-notice", children: h.fixtureFallback(i.requestedId, k.id) }),
|
|
1477
|
+
/* @__PURE__ */ n(le, { title: r.name, hint: k?.description, children: /* @__PURE__ */ n(
|
|
1471
1478
|
ee,
|
|
1472
1479
|
{
|
|
1473
1480
|
label: h.componentVariations,
|
|
1474
|
-
value:
|
|
1475
|
-
options: u.map((
|
|
1476
|
-
onChange: (
|
|
1481
|
+
value: k?.id ?? "",
|
|
1482
|
+
options: u.map((g) => ({ value: g.id, label: g.label })),
|
|
1483
|
+
onChange: (g) => p({ fixture: g })
|
|
1477
1484
|
}
|
|
1478
1485
|
) })
|
|
1479
1486
|
] });
|
|
1480
1487
|
}
|
|
1481
1488
|
if (!s) return /* @__PURE__ */ n("p", { className: "ds-empty", children: h.nothingSelected });
|
|
1482
|
-
const d = s.variations, f = e.product,
|
|
1483
|
-
return /* @__PURE__ */
|
|
1484
|
-
/* @__PURE__ */
|
|
1489
|
+
const d = s.variations, f = e.product, S = f.theme?.modes ?? [], b = f.theme?.locales ?? [], L = f.dataSources?.adapters ?? [], T = t.screenControls ?? {}, N = o && xt(o, T) ? o : void 0, w = (u, k) => p({ screenControls: { ...T, [u]: k } });
|
|
1490
|
+
return /* @__PURE__ */ C("div", { className: "ds-vcards", children: [
|
|
1491
|
+
/* @__PURE__ */ C(le, { title: h.context, children: [
|
|
1485
1492
|
/* @__PURE__ */ n(
|
|
1486
1493
|
ee,
|
|
1487
1494
|
{
|
|
@@ -1504,21 +1511,21 @@ function Ht({
|
|
|
1504
1511
|
onChange: (u) => p({ network: u })
|
|
1505
1512
|
}
|
|
1506
1513
|
),
|
|
1507
|
-
|
|
1514
|
+
S.length > 1 && /* @__PURE__ */ n(
|
|
1508
1515
|
ee,
|
|
1509
1516
|
{
|
|
1510
1517
|
label: h.theme,
|
|
1511
|
-
value: t.themeMode ??
|
|
1512
|
-
options:
|
|
1518
|
+
value: t.themeMode ?? S[0],
|
|
1519
|
+
options: S.map((u) => ({ value: u, label: u })),
|
|
1513
1520
|
onChange: (u) => p({ themeMode: u })
|
|
1514
1521
|
}
|
|
1515
1522
|
),
|
|
1516
|
-
|
|
1523
|
+
b.length > 1 && /* @__PURE__ */ n(
|
|
1517
1524
|
ee,
|
|
1518
1525
|
{
|
|
1519
1526
|
label: h.locale,
|
|
1520
|
-
value: t.locale ??
|
|
1521
|
-
options:
|
|
1527
|
+
value: t.locale ?? b[0],
|
|
1528
|
+
options: b.map((u) => ({ value: u, label: u })),
|
|
1522
1529
|
onChange: (u) => p({ locale: u })
|
|
1523
1530
|
}
|
|
1524
1531
|
),
|
|
@@ -1536,23 +1543,23 @@ function Ht({
|
|
|
1536
1543
|
)
|
|
1537
1544
|
] }),
|
|
1538
1545
|
s.controls.map((u) => {
|
|
1539
|
-
const
|
|
1546
|
+
const k = e.component(u.component);
|
|
1540
1547
|
return /* @__PURE__ */ n(
|
|
1541
1548
|
le,
|
|
1542
1549
|
{
|
|
1543
1550
|
title: u.title,
|
|
1544
1551
|
hint: u.note,
|
|
1545
|
-
link:
|
|
1546
|
-
children: u.controls.map((
|
|
1552
|
+
link: k ? { label: h.openComponent(k.name), onOpen: () => a(k.id) } : void 0,
|
|
1553
|
+
children: u.controls.map((g) => /* @__PURE__ */ n(
|
|
1547
1554
|
ee,
|
|
1548
1555
|
{
|
|
1549
|
-
label:
|
|
1550
|
-
hint:
|
|
1551
|
-
value:
|
|
1552
|
-
options:
|
|
1553
|
-
onChange: (y) => w(
|
|
1556
|
+
label: g.label,
|
|
1557
|
+
hint: g.description,
|
|
1558
|
+
value: T[g.id] ?? be(g),
|
|
1559
|
+
options: g.options ?? [],
|
|
1560
|
+
onChange: (y) => w(g.id, y)
|
|
1554
1561
|
},
|
|
1555
|
-
|
|
1562
|
+
g.id
|
|
1556
1563
|
))
|
|
1557
1564
|
},
|
|
1558
1565
|
u.id
|
|
@@ -1577,8 +1584,8 @@ function le({
|
|
|
1577
1584
|
link: s,
|
|
1578
1585
|
children: o
|
|
1579
1586
|
}) {
|
|
1580
|
-
return /* @__PURE__ */
|
|
1581
|
-
/* @__PURE__ */
|
|
1587
|
+
return /* @__PURE__ */ C("section", { className: "ds-vcard", "data-ds-filter-group": !0, children: [
|
|
1588
|
+
/* @__PURE__ */ C("header", { className: "ds-vcard__head", title: t ? `${e} — ${t}` : e, children: [
|
|
1582
1589
|
/* @__PURE__ */ n("h3", { className: "ds-vcard__title ds-section__title", "data-ds-filter-title": !0, children: e }),
|
|
1583
1590
|
s && /* @__PURE__ */ n(
|
|
1584
1591
|
"button",
|
|
@@ -1602,12 +1609,12 @@ function ee({
|
|
|
1602
1609
|
options: o,
|
|
1603
1610
|
onChange: r
|
|
1604
1611
|
}) {
|
|
1605
|
-
return /* @__PURE__ */
|
|
1612
|
+
return /* @__PURE__ */ C("label", { className: "ds-vcard__field", "data-ds-filter": !0, title: t ? `${e} — ${t}` : e, children: [
|
|
1606
1613
|
/* @__PURE__ */ n("span", { className: "ds-visually-hidden", children: e }),
|
|
1607
1614
|
/* @__PURE__ */ n("select", { className: "ds-select", value: s, onChange: (i) => r(i.target.value), children: o.map((i) => /* @__PURE__ */ n("option", { value: i.value, children: i.label }, i.value)) })
|
|
1608
1615
|
] });
|
|
1609
1616
|
}
|
|
1610
|
-
function
|
|
1617
|
+
function Gt({
|
|
1611
1618
|
registry: e,
|
|
1612
1619
|
controls: t,
|
|
1613
1620
|
deploy: s,
|
|
@@ -1619,20 +1626,20 @@ function Bt({
|
|
|
1619
1626
|
onOpenComponent: p,
|
|
1620
1627
|
onOpenScreen: m
|
|
1621
1628
|
}) {
|
|
1622
|
-
const h = J(), d = h.info, [f,
|
|
1629
|
+
const h = J(), d = h.info, [f, S] = V(!1);
|
|
1623
1630
|
if (l) {
|
|
1624
|
-
const
|
|
1625
|
-
return /* @__PURE__ */
|
|
1626
|
-
/* @__PURE__ */
|
|
1631
|
+
const g = e.usagesOf(l.id, { handoff: t.handoff });
|
|
1632
|
+
return /* @__PURE__ */ C("div", { className: "ds-info", children: [
|
|
1633
|
+
/* @__PURE__ */ C(te, { title: d.component, children: [
|
|
1627
1634
|
/* @__PURE__ */ n(W, { term: d.name, children: l.name }),
|
|
1628
1635
|
/* @__PURE__ */ n(W, { term: d.id, children: /* @__PURE__ */ n("code", { children: l.id }) }),
|
|
1629
1636
|
l.group && /* @__PURE__ */ n(W, { term: d.group, children: l.group }),
|
|
1630
1637
|
l.description && /* @__PURE__ */ n(W, { term: d.description, children: l.description }),
|
|
1631
1638
|
l.source && /* @__PURE__ */ n(W, { term: d.source, children: /* @__PURE__ */ n("code", { children: l.source }) })
|
|
1632
1639
|
] }),
|
|
1633
|
-
/* @__PURE__ */ n(te, { title: d.usedIn, children:
|
|
1640
|
+
/* @__PURE__ */ n(te, { title: d.usedIn, children: g.length === 0 ? /* @__PURE__ */ n("p", { className: "ds-muted", children: d.notUsed }) : /* @__PURE__ */ n("ul", { className: "ds-links", children: g.map((y) => {
|
|
1634
1641
|
const _ = y.variations.find((z) => z.components?.includes(l.id)) ?? y.variations[0];
|
|
1635
|
-
return /* @__PURE__ */
|
|
1642
|
+
return /* @__PURE__ */ C("li", { "data-ds-filter": !0, children: [
|
|
1636
1643
|
/* @__PURE__ */ n(
|
|
1637
1644
|
"button",
|
|
1638
1645
|
{
|
|
@@ -1648,15 +1655,15 @@ function Bt({
|
|
|
1648
1655
|
] });
|
|
1649
1656
|
}
|
|
1650
1657
|
if (!r) return /* @__PURE__ */ n("p", { className: "ds-empty", children: h.panel.nothingSelected });
|
|
1651
|
-
const
|
|
1652
|
-
const
|
|
1653
|
-
flow: { name:
|
|
1658
|
+
const b = i ? e.componentsOfScreen(r, i) : e.componentsOfScreen(r), L = e.persona(t.persona ?? i?.persona), T = e.rulesOf(i), N = t.screenControls ?? {}, w = i?.expected?.length ? i.expected : r.route.expected, u = t.handoff ? { handoff: t.handoff } : void 0, k = async () => {
|
|
1659
|
+
const g = r.group ? e.flowOf(r, { handoff: t.handoff }) : void 0, y = g?.name ? Bt({
|
|
1660
|
+
flow: { name: g.name, screens: g.screens },
|
|
1654
1661
|
registry: e,
|
|
1655
1662
|
open: { screen: r, location: o, variation: i },
|
|
1656
1663
|
deploy: s,
|
|
1657
1664
|
labels: h,
|
|
1658
1665
|
overrides: u
|
|
1659
|
-
}) :
|
|
1666
|
+
}) : Ht({
|
|
1660
1667
|
screen: r,
|
|
1661
1668
|
variations: r.variations,
|
|
1662
1669
|
components: e.componentsOfScreen(r),
|
|
@@ -1669,10 +1676,10 @@ function Bt({
|
|
|
1669
1676
|
} catch {
|
|
1670
1677
|
window.prompt(d.copyPrompt, y);
|
|
1671
1678
|
}
|
|
1672
|
-
|
|
1679
|
+
S(!0), window.setTimeout(() => S(!1), 1600);
|
|
1673
1680
|
};
|
|
1674
|
-
return /* @__PURE__ */
|
|
1675
|
-
/* @__PURE__ */
|
|
1681
|
+
return /* @__PURE__ */ C("div", { className: "ds-info", children: [
|
|
1682
|
+
/* @__PURE__ */ C(te, { title: d.screen, children: [
|
|
1676
1683
|
/* @__PURE__ */ n(W, { term: d.name, children: r.name }),
|
|
1677
1684
|
/* @__PURE__ */ n(W, { term: d.route, children: /* @__PURE__ */ n("code", { children: r.route.path }) }),
|
|
1678
1685
|
r.group && /* @__PURE__ */ n(W, { term: d.flow, children: r.group }),
|
|
@@ -1680,57 +1687,57 @@ function Bt({
|
|
|
1680
1687
|
/* @__PURE__ */ n(de, { term: d.expected, items: w })
|
|
1681
1688
|
] }),
|
|
1682
1689
|
r.controls.length > 0 && /* @__PURE__ */ n(te, { title: d.controls, children: r.controls.flatMap(
|
|
1683
|
-
(
|
|
1684
|
-
const _ = N[y.id] ??
|
|
1685
|
-
return /* @__PURE__ */
|
|
1690
|
+
(g) => g.controls.map((y) => {
|
|
1691
|
+
const _ = N[y.id] ?? be(y), z = y.options.find((c) => c.value === _);
|
|
1692
|
+
return /* @__PURE__ */ C(W, { term: y.label, children: [
|
|
1686
1693
|
z?.label ?? _,
|
|
1687
1694
|
" ",
|
|
1688
1695
|
/* @__PURE__ */ n("code", { children: `c.${y.id}=${_}` })
|
|
1689
|
-
] }, `${
|
|
1696
|
+
] }, `${g.id}/${y.id}`);
|
|
1690
1697
|
})
|
|
1691
1698
|
) }),
|
|
1692
|
-
i && /* @__PURE__ */
|
|
1699
|
+
i && /* @__PURE__ */ C(te, { title: d.variation, children: [
|
|
1693
1700
|
/* @__PURE__ */ n(W, { term: d.name, children: i.title }),
|
|
1694
1701
|
/* @__PURE__ */ n(W, { term: d.id, children: /* @__PURE__ */ n("code", { children: i.id }) }),
|
|
1695
1702
|
L && /* @__PURE__ */ n(W, { term: d.persona, children: L.name }),
|
|
1696
1703
|
i.intent && /* @__PURE__ */ n(W, { term: d.intent, children: i.intent }),
|
|
1697
1704
|
/* @__PURE__ */ n(de, { term: d.preconditions, items: i.preconditions }),
|
|
1698
1705
|
/* @__PURE__ */ n(de, { term: d.actions, items: i.actions }),
|
|
1699
|
-
/* @__PURE__ */ n(de, { term: d.rules, items:
|
|
1706
|
+
/* @__PURE__ */ n(de, { term: d.rules, items: T.map((g) => g.statement) }),
|
|
1700
1707
|
i.ticket && /* @__PURE__ */ n(W, { term: d.ticket, children: /* @__PURE__ */ n("code", { children: i.ticket }) })
|
|
1701
1708
|
] }),
|
|
1702
|
-
|
|
1703
|
-
/* @__PURE__ */ n("button", { type: "button", className: "ds-link", onClick: () => p(
|
|
1704
|
-
|
|
1705
|
-
] },
|
|
1706
|
-
/* @__PURE__ */
|
|
1709
|
+
b.length > 0 && /* @__PURE__ */ n(te, { title: d.components, children: /* @__PURE__ */ n("ul", { className: "ds-links", children: b.map((g) => /* @__PURE__ */ C("li", { "data-ds-filter": !0, children: [
|
|
1710
|
+
/* @__PURE__ */ n("button", { type: "button", className: "ds-link", onClick: () => p(g.id), children: g.name }),
|
|
1711
|
+
g.source && /* @__PURE__ */ n("code", { className: "ds-muted", children: g.source })
|
|
1712
|
+
] }, g.id)) }) }),
|
|
1713
|
+
/* @__PURE__ */ C("button", { type: "button", className: "ds-btn ds-btn--block", onClick: k, children: [
|
|
1707
1714
|
/* @__PURE__ */ n(H, { name: f ? "check" : "copy", size: 14 }),
|
|
1708
1715
|
/* @__PURE__ */ n("span", { children: f ? d.copiedForPr : d.copyForPr })
|
|
1709
1716
|
] })
|
|
1710
1717
|
] });
|
|
1711
1718
|
}
|
|
1712
1719
|
function te({ title: e, children: t }) {
|
|
1713
|
-
return /* @__PURE__ */
|
|
1720
|
+
return /* @__PURE__ */ C("section", { className: "ds-section", "data-ds-filter-group": !0, children: [
|
|
1714
1721
|
/* @__PURE__ */ n("h2", { className: "ds-section__title", children: e }),
|
|
1715
1722
|
/* @__PURE__ */ n("div", { className: "ds-defs", children: t })
|
|
1716
1723
|
] });
|
|
1717
1724
|
}
|
|
1718
1725
|
function W({ term: e, children: t }) {
|
|
1719
|
-
return /* @__PURE__ */
|
|
1726
|
+
return /* @__PURE__ */ C("dl", { className: "ds-def", "data-ds-filter": !0, children: [
|
|
1720
1727
|
/* @__PURE__ */ n("dt", { children: e }),
|
|
1721
1728
|
/* @__PURE__ */ n("dd", { children: t })
|
|
1722
1729
|
] });
|
|
1723
1730
|
}
|
|
1724
1731
|
function de({ term: e, items: t }) {
|
|
1725
|
-
return t?.length ? /* @__PURE__ */
|
|
1732
|
+
return t?.length ? /* @__PURE__ */ C("dl", { className: "ds-def", "data-ds-filter": !0, children: [
|
|
1726
1733
|
/* @__PURE__ */ n("dt", { children: e }),
|
|
1727
1734
|
/* @__PURE__ */ n("dd", { children: /* @__PURE__ */ n("ul", { className: "ds-list", children: t.map((s) => /* @__PURE__ */ n("li", { children: s }, s)) }) })
|
|
1728
1735
|
] }) : null;
|
|
1729
1736
|
}
|
|
1730
|
-
function
|
|
1737
|
+
function Zt(e) {
|
|
1731
1738
|
return (e.metaKey || e.ctrlKey) && !e.altKey && !e.shiftKey && e.key.toLowerCase() === "f";
|
|
1732
1739
|
}
|
|
1733
|
-
function
|
|
1740
|
+
function Yt(e, t) {
|
|
1734
1741
|
if (!e) return !1;
|
|
1735
1742
|
const s = X(t), o = [...e.querySelectorAll("[data-ds-filter]")];
|
|
1736
1743
|
for (const r of o)
|
|
@@ -1748,8 +1755,8 @@ function qt(e, t) {
|
|
|
1748
1755
|
}
|
|
1749
1756
|
return s.length > 0 && o.length > 0 && o.every((r) => r.hidden);
|
|
1750
1757
|
}
|
|
1751
|
-
const
|
|
1752
|
-
function
|
|
1758
|
+
const Xt = 24;
|
|
1759
|
+
function Qt({
|
|
1753
1760
|
location: e,
|
|
1754
1761
|
viewport: t,
|
|
1755
1762
|
zoom: s,
|
|
@@ -1759,9 +1766,9 @@ function Zt({
|
|
|
1759
1766
|
onShortcut: l,
|
|
1760
1767
|
onEffectiveZoom: a
|
|
1761
1768
|
}) {
|
|
1762
|
-
const p = q(null), m = q(null), h =
|
|
1769
|
+
const p = q(null), m = q(null), h = Jt(p), d = ue(e.path, e.search), [f] = V(d), S = q(d), b = q(d), L = typeof window > "u" ? "" : window.location.origin, T = U(
|
|
1763
1770
|
(v) => {
|
|
1764
|
-
|
|
1771
|
+
b.current = v;
|
|
1765
1772
|
const x = m.current?.contentWindow;
|
|
1766
1773
|
try {
|
|
1767
1774
|
x?.location.replace(new URL(v, L).toString());
|
|
@@ -1772,10 +1779,10 @@ function Zt({
|
|
|
1772
1779
|
[L]
|
|
1773
1780
|
);
|
|
1774
1781
|
I(() => {
|
|
1775
|
-
if (d ===
|
|
1776
|
-
const v =
|
|
1777
|
-
|
|
1778
|
-
}, [d,
|
|
1782
|
+
if (d === S.current) return;
|
|
1783
|
+
const v = S.current;
|
|
1784
|
+
S.current = d, _e(v) !== _e(d) ? T(d) : ae(m.current?.contentWindow, { ds: 1, type: "location", url: d }, L);
|
|
1785
|
+
}, [d, T, L]), I(() => {
|
|
1779
1786
|
const v = (x) => {
|
|
1780
1787
|
const M = Be(x, {
|
|
1781
1788
|
origin: L,
|
|
@@ -1784,20 +1791,20 @@ function Zt({
|
|
|
1784
1791
|
if (M)
|
|
1785
1792
|
switch (M.type) {
|
|
1786
1793
|
case "ready": {
|
|
1787
|
-
if (M.url ===
|
|
1788
|
-
if (M.url ===
|
|
1794
|
+
if (M.url === S.current) return;
|
|
1795
|
+
if (M.url === b.current) {
|
|
1789
1796
|
ae(
|
|
1790
1797
|
m.current?.contentWindow,
|
|
1791
|
-
{ ds: 1, type: "location", url:
|
|
1798
|
+
{ ds: 1, type: "location", url: S.current },
|
|
1792
1799
|
L
|
|
1793
1800
|
);
|
|
1794
1801
|
return;
|
|
1795
1802
|
}
|
|
1796
|
-
|
|
1803
|
+
S.current = M.url, b.current = M.url, i(M.url, !0);
|
|
1797
1804
|
return;
|
|
1798
1805
|
}
|
|
1799
1806
|
case "navigate":
|
|
1800
|
-
|
|
1807
|
+
S.current = M.url, i(M.url, M.replace);
|
|
1801
1808
|
return;
|
|
1802
1809
|
case "shortcut":
|
|
1803
1810
|
l(M.key);
|
|
@@ -1808,11 +1815,11 @@ function Zt({
|
|
|
1808
1815
|
};
|
|
1809
1816
|
return window.addEventListener("message", v), () => window.removeEventListener("message", v);
|
|
1810
1817
|
}, [i, l, L]);
|
|
1811
|
-
const N = !!t.width, w = N ?
|
|
1818
|
+
const N = !!t.width, w = N ? Xt : 0, u = Math.max(0, h.width - w * 2), k = Math.max(0, h.height - w * 2), g = !t.width || u === 0 || t.width <= u, y = s === 100 && !g ? Math.max(10, Math.floor(u / t.width * 100)) : s, _ = y / 100;
|
|
1812
1819
|
I(() => {
|
|
1813
1820
|
a?.(y);
|
|
1814
1821
|
}, [y, a]);
|
|
1815
|
-
const z = t.width ?? u / _, c = t.height ??
|
|
1822
|
+
const z = t.width ?? u / _, c = t.height ?? k / _;
|
|
1816
1823
|
return /* @__PURE__ */ n("div", { className: "ds-canvas", ref: p, "data-fit": N ? void 0 : "true", children: /* @__PURE__ */ n(
|
|
1817
1824
|
"div",
|
|
1818
1825
|
{
|
|
@@ -1822,7 +1829,7 @@ function Zt({
|
|
|
1822
1829
|
"iframe",
|
|
1823
1830
|
{
|
|
1824
1831
|
ref: m,
|
|
1825
|
-
[
|
|
1832
|
+
[vt]: "",
|
|
1826
1833
|
className: "ds-frame",
|
|
1827
1834
|
src: f,
|
|
1828
1835
|
title: o,
|
|
@@ -1837,7 +1844,7 @@ function Zt({
|
|
|
1837
1844
|
}
|
|
1838
1845
|
) });
|
|
1839
1846
|
}
|
|
1840
|
-
function
|
|
1847
|
+
function Jt(e) {
|
|
1841
1848
|
const [t, s] = V({ width: 0, height: 0 });
|
|
1842
1849
|
return Ue(() => {
|
|
1843
1850
|
const o = e.current;
|
|
@@ -1877,13 +1884,13 @@ const Le = {
|
|
|
1877
1884
|
return new Promise(() => {
|
|
1878
1885
|
});
|
|
1879
1886
|
case "slow":
|
|
1880
|
-
return await
|
|
1887
|
+
return await en(Je), Me(t);
|
|
1881
1888
|
default:
|
|
1882
1889
|
return Me(t);
|
|
1883
1890
|
}
|
|
1884
1891
|
}
|
|
1885
1892
|
};
|
|
1886
|
-
function
|
|
1893
|
+
function pn(e) {
|
|
1887
1894
|
const { id: t, label: s, baseUrl: o, path: r, init: i, fallbackToFixture: l = !0 } = e;
|
|
1888
1895
|
return {
|
|
1889
1896
|
id: t,
|
|
@@ -1901,10 +1908,10 @@ function dn(e) {
|
|
|
1901
1908
|
}
|
|
1902
1909
|
};
|
|
1903
1910
|
}
|
|
1904
|
-
function
|
|
1911
|
+
function en(e) {
|
|
1905
1912
|
return new Promise((t) => setTimeout(t, e));
|
|
1906
1913
|
}
|
|
1907
|
-
function
|
|
1914
|
+
function tn(e) {
|
|
1908
1915
|
const { scenario: t, fixture: s, network: o, adapter: r } = e, [i, l] = V({
|
|
1909
1916
|
data: void 0,
|
|
1910
1917
|
isLoading: !!t || o === "loading" || o === "slow",
|
|
@@ -1955,18 +1962,18 @@ function Qt(e) {
|
|
|
1955
1962
|
}, [t, s, o, r, e.screen]), i;
|
|
1956
1963
|
}
|
|
1957
1964
|
function De({ title: e, children: t }) {
|
|
1958
|
-
return /* @__PURE__ */
|
|
1965
|
+
return /* @__PURE__ */ C("div", { className: "ds-stage-empty", children: [
|
|
1959
1966
|
/* @__PURE__ */ n("h2", { className: "ds-stage-empty__title", children: e }),
|
|
1960
1967
|
t
|
|
1961
1968
|
] });
|
|
1962
1969
|
}
|
|
1963
|
-
function
|
|
1970
|
+
function nn({ product: e, registry: t }) {
|
|
1964
1971
|
const s = J(), { location: o, controls: r, viewport: i, navigate: l, openScenario: a, setScreenControls: p } = Ge(
|
|
1965
1972
|
t,
|
|
1966
1973
|
{ frame: !0 }
|
|
1967
1974
|
), m = q(null);
|
|
1968
1975
|
I(() => {
|
|
1969
|
-
const
|
|
1976
|
+
const P = (O) => {
|
|
1970
1977
|
if (O.defaultPrevented || O.button !== 0 || O.metaKey || O.ctrlKey || O.shiftKey || O.altKey) return;
|
|
1971
1978
|
const A = O.target?.closest?.("a[href]");
|
|
1972
1979
|
if (!(A instanceof HTMLAnchorElement) || A.target && A.target !== "_self" || A.hasAttribute("download")) return;
|
|
@@ -1980,21 +1987,21 @@ function Jt({ product: e, registry: t }) {
|
|
|
1980
1987
|
}
|
|
1981
1988
|
B.origin === window.location.origin && (O.preventDefault(), l(`${B.pathname}${B.search}`));
|
|
1982
1989
|
};
|
|
1983
|
-
return document.addEventListener("click",
|
|
1990
|
+
return document.addEventListener("click", P), () => document.removeEventListener("click", P);
|
|
1984
1991
|
}, [l]), I(() => {
|
|
1985
|
-
const
|
|
1992
|
+
const P = (O) => {
|
|
1986
1993
|
if (window.parent === window) return;
|
|
1987
|
-
const A =
|
|
1994
|
+
const A = on(O);
|
|
1988
1995
|
if (!A) return;
|
|
1989
1996
|
const j = O.target;
|
|
1990
1997
|
A === "C" && j?.closest?.("input, textarea, select, [contenteditable='true'], [contenteditable='']") || (O.preventDefault(), ae(window.parent, { ds: 1, type: "shortcut", key: A }, window.location.origin));
|
|
1991
1998
|
};
|
|
1992
|
-
return window.addEventListener("keydown",
|
|
1999
|
+
return window.addEventListener("keydown", P), () => window.removeEventListener("keydown", P);
|
|
1993
2000
|
}, []), I(() => {
|
|
1994
|
-
const
|
|
1995
|
-
if (!
|
|
2001
|
+
const P = m.current;
|
|
2002
|
+
if (!P || !r.handoff) return;
|
|
1996
2003
|
const O = () => {
|
|
1997
|
-
for (const j of
|
|
2004
|
+
for (const j of P.querySelectorAll("a[href]")) {
|
|
1998
2005
|
const B = j.getAttribute("href");
|
|
1999
2006
|
if (!B || B.startsWith("#")) continue;
|
|
2000
2007
|
let Q;
|
|
@@ -2004,50 +2011,50 @@ function Jt({ product: e, registry: t }) {
|
|
|
2004
2011
|
continue;
|
|
2005
2012
|
}
|
|
2006
2013
|
if (Q.origin !== window.location.origin) continue;
|
|
2007
|
-
|
|
2014
|
+
Pe(Q.searchParams, r.handoff);
|
|
2008
2015
|
const ie = `${Q.pathname}${Q.search}${Q.hash}`;
|
|
2009
2016
|
B !== ie && j.setAttribute("href", ie);
|
|
2010
2017
|
}
|
|
2011
2018
|
};
|
|
2012
2019
|
O();
|
|
2013
2020
|
const A = new MutationObserver(O);
|
|
2014
|
-
return A.observe(
|
|
2021
|
+
return A.observe(P, { subtree: !0, childList: !0, attributes: !0, attributeFilter: ["href"] }), () => A.disconnect();
|
|
2015
2022
|
}, [r.handoff]);
|
|
2016
2023
|
const h = t.scenario(r.scenario), d = t.component(r.component), f = D(() => {
|
|
2017
|
-
const
|
|
2024
|
+
const P = new URLSearchParams(o.search);
|
|
2018
2025
|
return {
|
|
2019
|
-
scenario:
|
|
2020
|
-
component:
|
|
2026
|
+
scenario: P.get($.scenario) ?? void 0,
|
|
2027
|
+
component: P.get($.component) ?? void 0
|
|
2021
2028
|
};
|
|
2022
|
-
}, [o.search]),
|
|
2029
|
+
}, [o.search]), S = !!(r.handoff && (f.scenario && !oe(r.handoff, f.scenario) || f.component && !ve(r.handoff, f.component) || !f.component && !Ie(r.handoff, o.path, e.scenarios))), b = D(
|
|
2023
2030
|
() => t.resolveComponentFixture(d?.id, d ? r.fixture : void 0),
|
|
2024
2031
|
[d, r.fixture, t]
|
|
2025
2032
|
), L = D(() => {
|
|
2026
|
-
const
|
|
2027
|
-
return typeof
|
|
2028
|
-
}, [
|
|
2029
|
-
const
|
|
2030
|
-
return
|
|
2031
|
-
}, [r.dataSource, e.dataSources?.adapters]), { data: u, isLoading:
|
|
2033
|
+
const P = b.fixture?.data;
|
|
2034
|
+
return typeof P == "function" ? P() : P;
|
|
2035
|
+
}, [b.fixture]), T = t.persona(r.persona ?? h?.persona), N = t.fixture(r.fixture ?? h?.fixture), w = D(() => {
|
|
2036
|
+
const P = r.dataSource ?? "fixtures";
|
|
2037
|
+
return P === "fixtures" ? Le : e.dataSources?.adapters?.find((O) => O.id === P) ?? Le;
|
|
2038
|
+
}, [r.dataSource, e.dataSources?.adapters]), { data: u, isLoading: k, error: g } = tn({
|
|
2032
2039
|
scenario: h,
|
|
2033
2040
|
fixture: N,
|
|
2034
2041
|
network: r.network,
|
|
2035
2042
|
adapter: w,
|
|
2036
2043
|
screen: o.path
|
|
2037
2044
|
}), y = D(() => h ? r.persona && r.persona !== (h.persona ?? t.defaultPersona) ? t.persona(r.persona)?.permissions ?? [] : t.permissionsOf(h) : t.persona(r.persona)?.permissions ?? [], [r.persona, t, h]), _ = r.screenControls, z = D(() => _ ?? {}, [_]), c = U(
|
|
2038
|
-
(
|
|
2045
|
+
(P, O) => p({ [P]: O }),
|
|
2039
2046
|
[p]
|
|
2040
2047
|
), v = D(
|
|
2041
2048
|
() => ({
|
|
2042
2049
|
scenario: h,
|
|
2043
|
-
persona:
|
|
2050
|
+
persona: T,
|
|
2044
2051
|
permissions: y,
|
|
2045
|
-
can: (
|
|
2052
|
+
can: (P) => y.includes(P),
|
|
2046
2053
|
data: u,
|
|
2047
2054
|
fixture: N,
|
|
2048
2055
|
network: r.network,
|
|
2049
|
-
isLoading:
|
|
2050
|
-
error:
|
|
2056
|
+
isLoading: k,
|
|
2057
|
+
error: g,
|
|
2051
2058
|
rules: t.rulesOf(h),
|
|
2052
2059
|
viewport: i,
|
|
2053
2060
|
themeMode: r.themeMode,
|
|
@@ -2060,15 +2067,15 @@ function Jt({ product: e, registry: t }) {
|
|
|
2060
2067
|
}),
|
|
2061
2068
|
[
|
|
2062
2069
|
h,
|
|
2063
|
-
|
|
2070
|
+
T,
|
|
2064
2071
|
y,
|
|
2065
2072
|
u,
|
|
2066
2073
|
N,
|
|
2067
2074
|
r.network,
|
|
2068
2075
|
r.themeMode,
|
|
2069
2076
|
r.locale,
|
|
2070
|
-
|
|
2071
|
-
|
|
2077
|
+
k,
|
|
2078
|
+
g,
|
|
2072
2079
|
t,
|
|
2073
2080
|
i,
|
|
2074
2081
|
l,
|
|
@@ -2077,16 +2084,16 @@ function Jt({ product: e, registry: t }) {
|
|
|
2077
2084
|
c,
|
|
2078
2085
|
p
|
|
2079
2086
|
]
|
|
2080
|
-
), x = xe(e.routes ?? [], o.path), M = e.wrapper, F = e.notFound, E = d?.preview, K =
|
|
2087
|
+
), x = xe(e.routes ?? [], o.path), M = e.wrapper, F = e.notFound, E = d?.preview, K = S ? /* @__PURE__ */ n(De, { title: s.shell.outsideHandoff, children: /* @__PURE__ */ n("p", { children: s.shell.outsideHandoffHint }) }) : E ? /* @__PURE__ */ n(
|
|
2081
2088
|
E,
|
|
2082
2089
|
{
|
|
2083
|
-
fixture:
|
|
2090
|
+
fixture: b.fixture,
|
|
2084
2091
|
data: L,
|
|
2085
2092
|
viewport: i,
|
|
2086
2093
|
themeMode: r.themeMode ?? "default",
|
|
2087
2094
|
locale: r.locale ?? "default"
|
|
2088
2095
|
}
|
|
2089
|
-
) : x ? /* @__PURE__ */ n(x.definition.screen, { params: x.params, context: v }) : F ? /* @__PURE__ */ n(F, { path: o.path }) : /* @__PURE__ */ n(De, { title: s.shell.noRoute, children: /* @__PURE__ */
|
|
2096
|
+
) : x ? /* @__PURE__ */ n(x.definition.screen, { params: x.params, context: v }) : F ? /* @__PURE__ */ n(F, { path: o.path }) : /* @__PURE__ */ n(De, { title: s.shell.noRoute, children: /* @__PURE__ */ C("p", { children: [
|
|
2090
2097
|
/* @__PURE__ */ n("code", { children: o.path }),
|
|
2091
2098
|
" ",
|
|
2092
2099
|
s.shell.noRouteHint
|
|
@@ -2094,10 +2101,10 @@ function Jt({ product: e, registry: t }) {
|
|
|
2094
2101
|
return (
|
|
2095
2102
|
// `display: contents` deixa o layout do produto como se este nó não
|
|
2096
2103
|
// existisse: ele só serve de raiz para observar os links.
|
|
2097
|
-
/* @__PURE__ */ n("div", { ref: m, style: { display: "contents" }, children: M && !
|
|
2104
|
+
/* @__PURE__ */ n("div", { ref: m, style: { display: "contents" }, children: M && !S ? /* @__PURE__ */ n(M, { context: v, children: K }) : K })
|
|
2098
2105
|
);
|
|
2099
2106
|
}
|
|
2100
|
-
function
|
|
2107
|
+
function on(e) {
|
|
2101
2108
|
if (!e.altKey) {
|
|
2102
2109
|
if (e.shiftKey && !e.metaKey && !e.ctrlKey && e.key === "C") return "C";
|
|
2103
2110
|
if ((e.metaKey || e.ctrlKey) && !e.shiftKey) {
|
|
@@ -2141,7 +2148,7 @@ function Ke(e, t, s, o) {
|
|
|
2141
2148
|
);
|
|
2142
2149
|
return [r, l];
|
|
2143
2150
|
}
|
|
2144
|
-
function
|
|
2151
|
+
function rn() {
|
|
2145
2152
|
const e = "(prefers-color-scheme: dark)", t = () => {
|
|
2146
2153
|
try {
|
|
2147
2154
|
return window.matchMedia(e).matches ? "dark" : "light";
|
|
@@ -2160,29 +2167,29 @@ function tn() {
|
|
|
2160
2167
|
return r.addEventListener?.("change", i), () => r?.removeEventListener?.("change", i);
|
|
2161
2168
|
}, []), s;
|
|
2162
2169
|
}
|
|
2163
|
-
function
|
|
2170
|
+
function sn() {
|
|
2164
2171
|
const e = tt(he.appearance);
|
|
2165
2172
|
return e === "dark" || e === "light" ? e : void 0;
|
|
2166
2173
|
}
|
|
2167
|
-
function
|
|
2168
|
-
const t = D(() =>
|
|
2169
|
-
return /* @__PURE__ */ n(Ye.Provider, { value: s, children: o ? /* @__PURE__ */ n(
|
|
2174
|
+
function mn({ product: e }) {
|
|
2175
|
+
const t = D(() => kt(e), [e]), s = D(() => Ot(e.theme?.labels), [e.theme?.labels]), [o] = V(() => gt());
|
|
2176
|
+
return /* @__PURE__ */ n(Ye.Provider, { value: s, children: o ? /* @__PURE__ */ n(nn, { product: e, registry: t }) : /* @__PURE__ */ n(an, { product: e, registry: t }) });
|
|
2170
2177
|
}
|
|
2171
|
-
const
|
|
2172
|
-
function
|
|
2173
|
-
const s = J(), o = D(() =>
|
|
2178
|
+
const ke = { initial: 290, min: 200, max: 480 }, Ce = { initial: 320, min: 260, max: 560 };
|
|
2179
|
+
function an({ product: e, registry: t }) {
|
|
2180
|
+
const s = J(), o = D(() => bt(e.deploy), [e.deploy]), { location: r, controls: i, viewport: l, setControls: a, openScenario: p, openComponent: m, openScreen: h, go: d } = Ge(t), f = q(r);
|
|
2174
2181
|
f.current = r;
|
|
2175
|
-
const
|
|
2182
|
+
const S = rn(), [b, L] = V(() => sn()), T = i.chromeTheme ?? b ?? S, [N, w] = Ke(
|
|
2176
2183
|
he.leftWidth,
|
|
2184
|
+
ke.initial,
|
|
2185
|
+
ke.min,
|
|
2186
|
+
ke.max
|
|
2187
|
+
), [u, k] = Ke(
|
|
2188
|
+
he.rightWidth,
|
|
2177
2189
|
Ce.initial,
|
|
2178
2190
|
Ce.min,
|
|
2179
2191
|
Ce.max
|
|
2180
|
-
), [
|
|
2181
|
-
he.rightWidth,
|
|
2182
|
-
Se.initial,
|
|
2183
|
-
Se.min,
|
|
2184
|
-
Se.max
|
|
2185
|
-
), [b, y] = V(!1), _ = i.handoff, z = t.component(i.component), c = t.scenario(i.scenario), v = z ? void 0 : t.screensFor({ handoff: _ }).find((R) => R.id === t.screenForPath(r.path)?.id), x = v && c && v.variations.some((R) => R.id === c.id) ? c : void 0, M = D(
|
|
2192
|
+
), [g, y] = V(!1), _ = i.handoff, z = t.component(i.component), c = t.scenario(i.scenario), v = z ? void 0 : t.screensFor({ handoff: _ }).find((R) => R.id === t.screenForPath(r.path)?.id), x = v && c && v.variations.some((R) => R.id === c.id) ? c : void 0, M = D(
|
|
2186
2193
|
() => t.resolveComponentFixture(z?.id, z ? i.fixture : void 0),
|
|
2187
2194
|
[z, i.fixture, t]
|
|
2188
2195
|
), F = D(() => {
|
|
@@ -2193,13 +2200,13 @@ function on({ product: e, registry: t }) {
|
|
|
2193
2200
|
});
|
|
2194
2201
|
return R.length === 0 ? t.issues : [...R.map((Z) => ({
|
|
2195
2202
|
level: "warning",
|
|
2196
|
-
where: `url:${
|
|
2203
|
+
where: `url:${ge}${Z.id}`,
|
|
2197
2204
|
message: Z.reason === "invalid-value" ? s.diagnostics.invalidControl(Z.id, Z.value, Z.fallback ?? "") : s.diagnostics.unknownControl(Z.id, Z.value)
|
|
2198
2205
|
})), ...t.issues];
|
|
2199
|
-
}, [s, r.search, t, v, x]), E = t.screensFor({ handoff: _ })[0], K = t.componentsFor(_)[0],
|
|
2206
|
+
}, [s, r.search, t, v, x]), E = t.screensFor({ handoff: _ })[0], K = t.componentsFor(_)[0], P = !E && !K, O = D(() => {
|
|
2200
2207
|
const R = new URLSearchParams(r.search);
|
|
2201
2208
|
return R.has($.scenario) || R.has($.component);
|
|
2202
|
-
}, [r.search]), A = r.path === "/" && !O && !t.screenForPath("/") && !
|
|
2209
|
+
}, [r.search]), A = r.path === "/" && !O && !t.screenForPath("/") && !P;
|
|
2203
2210
|
I(() => {
|
|
2204
2211
|
A && (E ? h(E.id, { replace: !0 }) : K && m(K.id, { replace: !0 }));
|
|
2205
2212
|
}, [K, E, m, h, A]);
|
|
@@ -2225,24 +2232,24 @@ function on({ product: e, registry: t }) {
|
|
|
2225
2232
|
const Q = U(
|
|
2226
2233
|
(R, G) => {
|
|
2227
2234
|
const { path: Z, search: it } = Ne(R);
|
|
2228
|
-
d(Z,
|
|
2235
|
+
d(Z, St(it, f.current.search), { replace: G });
|
|
2229
2236
|
},
|
|
2230
2237
|
[d]
|
|
2231
2238
|
), ie = () => {
|
|
2232
|
-
const R =
|
|
2239
|
+
const R = T === "dark" ? "light" : "dark";
|
|
2233
2240
|
nt(he.appearance, R), L(R), a({ chromeTheme: R });
|
|
2234
2241
|
}, re = (R) => a(R), ot = `${o.origin}${r.path}${r.search}`, rt = i.panelTab ?? "variations", Re = i.zoom ?? 100, [st, at] = V(Re);
|
|
2235
|
-
return /* @__PURE__ */
|
|
2242
|
+
return /* @__PURE__ */ C(
|
|
2236
2243
|
"div",
|
|
2237
2244
|
{
|
|
2238
2245
|
className: "ds-root",
|
|
2239
|
-
"data-appearance":
|
|
2246
|
+
"data-appearance": T,
|
|
2240
2247
|
"data-chrome": i.chrome ? "visible" : "hidden",
|
|
2241
|
-
"data-resizing":
|
|
2248
|
+
"data-resizing": g ? "true" : void 0,
|
|
2242
2249
|
"data-viewport": l.id,
|
|
2243
2250
|
children: [
|
|
2244
2251
|
i.chrome && /* @__PURE__ */ n(
|
|
2245
|
-
|
|
2252
|
+
At,
|
|
2246
2253
|
{
|
|
2247
2254
|
productName: e.name,
|
|
2248
2255
|
deploy: o,
|
|
@@ -2250,7 +2257,7 @@ function on({ product: e, registry: t }) {
|
|
|
2250
2257
|
viewport: l,
|
|
2251
2258
|
zoom: st,
|
|
2252
2259
|
rotated: !!i.rotated,
|
|
2253
|
-
theme:
|
|
2260
|
+
theme: T,
|
|
2254
2261
|
issues: F,
|
|
2255
2262
|
linkUrl: ot,
|
|
2256
2263
|
onViewport: (R) => re({ viewport: R }),
|
|
@@ -2260,9 +2267,9 @@ function on({ product: e, registry: t }) {
|
|
|
2260
2267
|
onToggleTheme: ie
|
|
2261
2268
|
}
|
|
2262
2269
|
),
|
|
2263
|
-
/* @__PURE__ */
|
|
2270
|
+
/* @__PURE__ */ C("div", { className: "ds-body", children: [
|
|
2264
2271
|
i.chrome && /* @__PURE__ */ n(
|
|
2265
|
-
|
|
2272
|
+
Kt,
|
|
2266
2273
|
{
|
|
2267
2274
|
registry: t,
|
|
2268
2275
|
handoff: _,
|
|
@@ -2276,24 +2283,24 @@ function on({ product: e, registry: t }) {
|
|
|
2276
2283
|
onResizeEnd: () => y(!1)
|
|
2277
2284
|
}
|
|
2278
2285
|
),
|
|
2279
|
-
/* @__PURE__ */ n("main", { className: "ds-main", children:
|
|
2286
|
+
/* @__PURE__ */ n("main", { className: "ds-main", children: P ? /* @__PURE__ */ C("div", { className: "ds-chrome-empty", children: [
|
|
2280
2287
|
/* @__PURE__ */ n("h1", { className: "ds-chrome-empty__title", children: s.shell.empty }),
|
|
2281
2288
|
/* @__PURE__ */ n("p", { className: "ds-muted", children: s.shell.emptyHint })
|
|
2282
2289
|
] }) : A ? null : /* @__PURE__ */ n(
|
|
2283
|
-
|
|
2290
|
+
Qt,
|
|
2284
2291
|
{
|
|
2285
2292
|
location: r,
|
|
2286
2293
|
viewport: l,
|
|
2287
2294
|
zoom: Re,
|
|
2288
2295
|
onEffectiveZoom: at,
|
|
2289
2296
|
title: s.shell.frameTitle(e.name),
|
|
2290
|
-
resizing:
|
|
2297
|
+
resizing: g,
|
|
2291
2298
|
onFrameNavigate: Q,
|
|
2292
2299
|
onShortcut: B
|
|
2293
2300
|
}
|
|
2294
2301
|
) }),
|
|
2295
2302
|
i.chrome && /* @__PURE__ */ n(
|
|
2296
|
-
|
|
2303
|
+
jt,
|
|
2297
2304
|
{
|
|
2298
2305
|
registry: t,
|
|
2299
2306
|
controls: i,
|
|
@@ -2310,7 +2317,7 @@ function on({ product: e, registry: t }) {
|
|
|
2310
2317
|
onOpenScreen: (R) => h(R),
|
|
2311
2318
|
onChange: re,
|
|
2312
2319
|
width: u,
|
|
2313
|
-
onResize:
|
|
2320
|
+
onResize: k,
|
|
2314
2321
|
onResizeStart: () => y(!0),
|
|
2315
2322
|
onResizeEnd: () => y(!1)
|
|
2316
2323
|
}
|
|
@@ -2334,67 +2341,67 @@ function on({ product: e, registry: t }) {
|
|
|
2334
2341
|
function we(e) {
|
|
2335
2342
|
return new Date(e.length === 10 ? `${e}T00:00:00` : e);
|
|
2336
2343
|
}
|
|
2337
|
-
function
|
|
2344
|
+
function fn(e, t) {
|
|
2338
2345
|
const s = we(e), o = we(t);
|
|
2339
2346
|
let r = o.getFullYear() - s.getFullYear();
|
|
2340
2347
|
const i = o.getMonth() - s.getMonth();
|
|
2341
2348
|
return (i < 0 || i === 0 && o.getDate() < s.getDate()) && (r -= 1), r;
|
|
2342
2349
|
}
|
|
2343
|
-
function
|
|
2350
|
+
function wn(e, t) {
|
|
2344
2351
|
const s = we(e), o = we(t);
|
|
2345
2352
|
return Math.floor((o.getTime() - s.getTime()) / 864e5);
|
|
2346
2353
|
}
|
|
2347
2354
|
export {
|
|
2348
|
-
|
|
2355
|
+
ge as CONTROL_PARAM_PREFIX,
|
|
2349
2356
|
ne as DEFAULT_LABELS,
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2357
|
+
mn as DesignSpace,
|
|
2358
|
+
un as EN_US_LABELS,
|
|
2359
|
+
vt as FRAME_ATTRIBUTE,
|
|
2360
|
+
pt as FRAME_PARAM,
|
|
2361
|
+
bn as HANDOFF_PARAM,
|
|
2362
|
+
hn as NETWORK_LABELS,
|
|
2356
2363
|
He as NETWORK_STATES,
|
|
2357
2364
|
$ as PARAM,
|
|
2358
2365
|
Je as SLOW_NETWORK_DELAY_MS,
|
|
2359
2366
|
et as SimulatedNetworkError,
|
|
2360
2367
|
De as StageEmpty,
|
|
2361
|
-
|
|
2368
|
+
Nt as VIEWPORTS,
|
|
2362
2369
|
me as ZOOM_DEFAULT,
|
|
2363
2370
|
Ee as ZOOM_MAX,
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2371
|
+
Te as ZOOM_MIN,
|
|
2372
|
+
fn as ageInYears,
|
|
2373
|
+
Pe as applyHandoffScope,
|
|
2367
2374
|
ye as applyOverrides,
|
|
2368
2375
|
Ze as clampZoom,
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2376
|
+
Sn as commitUrl,
|
|
2377
|
+
kn as componentUrl,
|
|
2378
|
+
pn as createHttpAdapter,
|
|
2379
|
+
kt as createRegistry,
|
|
2380
|
+
wn as daysBetween,
|
|
2374
2381
|
Le as fixtureAdapter,
|
|
2375
|
-
|
|
2376
|
-
|
|
2382
|
+
Cn as formatIssues,
|
|
2383
|
+
bt as getDeployContext,
|
|
2377
2384
|
ve as handoffAllowsComponent,
|
|
2378
2385
|
Ie as handoffAllowsPath,
|
|
2379
2386
|
oe as handoffAllowsScenario,
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2387
|
+
xn as hasErrors,
|
|
2388
|
+
Nn as matchPath,
|
|
2389
|
+
yn as normalizeHandoffScope,
|
|
2383
2390
|
X as normalizeSearch,
|
|
2384
2391
|
$e as parseControls,
|
|
2385
2392
|
ht as parseHandoffScope,
|
|
2386
2393
|
we as parseIsoDate,
|
|
2387
2394
|
Me as resolveFixture,
|
|
2388
|
-
|
|
2395
|
+
Ot as resolveLabels,
|
|
2389
2396
|
xe as resolveRoute,
|
|
2390
|
-
|
|
2397
|
+
Lt as resolveViewport,
|
|
2391
2398
|
pe as scenarioUrl,
|
|
2392
2399
|
se as serializeControls,
|
|
2393
|
-
|
|
2400
|
+
$n as serializeValue,
|
|
2394
2401
|
Ge as useDesignSpaceState,
|
|
2395
2402
|
J as useLabels,
|
|
2396
|
-
|
|
2403
|
+
tn as useScenarioData,
|
|
2397
2404
|
ut as validateProduct,
|
|
2398
|
-
|
|
2405
|
+
Mn as validateScenario
|
|
2399
2406
|
};
|
|
2400
2407
|
//# sourceMappingURL=index.js.map
|