@brucesantos/design-space 0.3.0 → 0.5.0

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/index.js CHANGED
@@ -1,209 +1,271 @@
1
- import { jsxs as d, jsx as o, Fragment as A } from "react/jsx-runtime";
2
- import { useState as T, useEffect as F, useMemo as x, useCallback as D, useContext as ae, createContext as re, useRef as G, forwardRef as se } from "react";
3
- import { S as ie, v as ce, P as b, N as ee, s as de, c as le, g as ue } from "./contrast-87-ijttm.js";
4
- import { C as xt, a as Mt, b as _t, d as Ct, e as Tt, f as Lt, h as At, i as Et, j as $t, p as Pt, r as Rt, k as Dt, l as Ft, m as It } from "./contrast-87-ijttm.js";
5
- function he(e) {
6
- const t = new Map(e.scenarios.map((l) => [l.id, l])), n = new Map(
7
- (e.components ?? []).map((l) => [l.id, l])
8
- ), s = new Map(e.personas.map((l) => [l.id, l])), i = new Map(e.fixtures.map((l) => [l.id, l])), a = new Map((e.rules ?? []).map((l) => [l.id, l])), r = new Map(e.modules.map((l) => [l.id, l])), c = new Map(
9
- e.modules.flatMap((l) => (l.flows ?? []).map((g) => [g.id, g]))
10
- ), p = e.modules.map((l) => ({
11
- module: l,
12
- scenarios: e.scenarios.filter((g) => g.id.split(".")[0] === l.id)
13
- })), h = new Set(p.flatMap((l) => l.scenarios.map((g) => g.id))), u = e.scenarios.filter((l) => !h.has(l.id)), m = (l) => l ? t.get(l) : void 0, N = (l) => l ? s.get(l) : void 0, y = (l) => l ? l.permissions ? l.permissions : N(l.persona)?.permissions ?? [] : [];
1
+ import { jsxs as u, jsx as o, Fragment as A } from "react/jsx-runtime";
2
+ import { useState as $, useEffect as I, useMemo as C, useCallback as E, useContext as le, createContext as ue, useRef as Q, forwardRef as he } from "react";
3
+ import { S as pe, v as me, P as g, N as se, s as fe, c as be, g as ve } from "./contrast-BseNi5QD.js";
4
+ import { C as At, a as Pt, b as Lt, d as $t, e as Et, f as Ft, h as Rt, i as Dt, j as Ot, k as It, p as Bt, r as Wt, l as jt, m as Ht, n as Kt } from "./contrast-BseNi5QD.js";
5
+ function ge(e) {
6
+ const t = new Map(e.scenarios.map((d) => [d.id, d])), n = new Map(
7
+ (e.components ?? []).map((d) => [d.id, d])
8
+ ), s = new Map(e.personas.map((d) => [d.id, d])), l = new Map(e.fixtures.map((d) => [d.id, d])), r = new Map((e.rules ?? []).map((d) => [d.id, d])), a = new Map(e.modules.map((d) => [d.id, d])), c = new Map(
9
+ e.modules.flatMap((d) => (d.flows ?? []).map((f) => [f.id, f]))
10
+ ), h = e.modules.map((d) => ({
11
+ module: d,
12
+ scenarios: e.scenarios.filter((f) => f.id.split(".")[0] === d.id)
13
+ })), p = new Set(h.flatMap((d) => d.scenarios.map((f) => f.id))), m = e.scenarios.filter((d) => !p.has(d.id)), v = (d) => d ? t.get(d) : void 0, i = (d) => d ? s.get(d) : void 0, N = (d, f) => {
14
+ if (!(!d || !f))
15
+ return n.get(d)?.fixtures?.find((k) => k.id === f);
16
+ }, x = (d = {}) => e.scenarios.filter(
17
+ (f) => d.includePorted || (d.view === "ported" ? f.status === "ported" : f.status !== "ported") || d.view === void 0 && f.id === d.activeScenario
18
+ ), S = (d) => d ? d.permissions ? d.permissions : i(d.persona)?.permissions ?? [] : [];
14
19
  return {
15
20
  product: e,
16
- tree: p,
17
- orphans: u,
18
- issues: ce(e),
19
- scenario: m,
20
- component: (l) => l ? n.get(l) : void 0,
21
- persona: N,
22
- fixture: (l) => l ? i.get(l) : void 0,
23
- rule: (l) => l ? a.get(l) : void 0,
24
- module: (l) => l ? r.get(l) : void 0,
25
- flow: (l) => l ? c.get(l) : void 0,
26
- rulesOf: (l) => (l?.rules ?? []).map((g) => a.get(g)).filter((g) => !!g),
27
- permissionsOf: y,
28
- scenariosForRoute: (l) => {
29
- const g = l.split("?")[0];
30
- return e.scenarios.filter((w) => w.route.split("?")[0] === g);
21
+ tree: h,
22
+ orphans: m,
23
+ issues: me(e),
24
+ scenario: v,
25
+ component: (d) => d ? n.get(d) : void 0,
26
+ componentFixture: N,
27
+ resolveComponentFixture: (d, f) => {
28
+ const k = d ? n.get(d) : void 0, M = N(d, f), _ = N(d, k?.defaultFixture) ?? k?.fixtures?.[0];
29
+ return {
30
+ fixture: M ?? _,
31
+ requestedId: f,
32
+ didFallback: !!(f && !M)
33
+ };
34
+ },
35
+ persona: i,
36
+ fixture: (d) => d ? l.get(d) : void 0,
37
+ rule: (d) => d ? r.get(d) : void 0,
38
+ module: (d) => d ? a.get(d) : void 0,
39
+ flow: (d) => d ? c.get(d) : void 0,
40
+ rulesOf: (d) => (d?.rules ?? []).map((f) => r.get(f)).filter((f) => !!f),
41
+ permissionsOf: S,
42
+ scenariosForRoute: (d, f) => {
43
+ const k = d.split("?")[0];
44
+ return x(f).filter((M) => M.route.split("?")[0] === k);
45
+ },
46
+ activeScenarios: x,
47
+ treeFor: (d) => {
48
+ const f = new Set(x(d).map((k) => k.id));
49
+ return h.map((k) => ({
50
+ ...k,
51
+ scenarios: k.scenarios.filter((M) => f.has(M.id))
52
+ }));
31
53
  },
32
- search: (l) => {
33
- const g = Y(l);
34
- return g ? e.scenarios.filter((w) => {
35
- const L = r.get(w.id.split(".")[0] ?? "")?.name ?? "";
36
- return Y(
54
+ orphansFor: (d) => {
55
+ const f = new Set(x(d).map((k) => k.id));
56
+ return m.filter((k) => f.has(k.id));
57
+ },
58
+ search: (d, f) => {
59
+ const k = te(d), M = x(f);
60
+ return k ? M.filter((_) => {
61
+ const T = a.get(_.id.split(".")[0] ?? "")?.name ?? "";
62
+ return te(
37
63
  [
38
- w.title,
39
- w.id,
40
- w.intent ?? "",
41
- w.route,
42
- L,
43
- s.get(w.persona)?.name ?? "",
44
- (w.tags ?? []).join(" "),
45
- (w.expected ?? []).join(" ")
64
+ _.title,
65
+ _.id,
66
+ _.intent ?? "",
67
+ _.route,
68
+ T,
69
+ s.get(_.persona)?.name ?? "",
70
+ (_.tags ?? []).join(" "),
71
+ (_.expected ?? []).join(" ")
46
72
  ].join(" ")
47
- ).includes(g);
48
- }) : e.scenarios;
73
+ ).includes(k);
74
+ }) : M;
49
75
  },
50
- byStatus: (l) => e.scenarios.filter((g) => g.status === l),
51
- coverage: () => {
52
- const l = Object.fromEntries(
53
- ie.map((g) => [g, 0])
76
+ byStatus: (d) => e.scenarios.filter((f) => f.status === d),
77
+ coverage: (d) => {
78
+ const f = Object.fromEntries(
79
+ pe.map((k) => [k, 0])
54
80
  );
55
- for (const g of e.scenarios) l[g.status] += 1;
56
- return l;
81
+ for (const k of x(d)) f[k.status] += 1;
82
+ return f;
57
83
  }
58
84
  };
59
85
  }
60
- function Y(e) {
86
+ function te(e) {
61
87
  return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").trim();
62
88
  }
63
- const te = [
89
+ const ie = [
64
90
  { id: "fit", label: "Ajustar" },
65
91
  { id: "mobile", label: "Celular", width: 390, height: 844 },
66
92
  { id: "tablet", label: "Tablet", width: 834, height: 1112 },
67
93
  { id: "desktop", label: "Desktop", width: 1440, height: 900 },
68
94
  { id: "custom", label: "Personalizado" }
69
- ], pe = [1, 1.25, 1.5, 2];
70
- function me(e, t) {
71
- const n = new URLSearchParams(e), s = n.get(b.component) ?? void 0, i = t.component(s), a = n.get(b.scenario) ?? void 0, r = i ? void 0 : t.scenario(a), c = n.get(b.network), p = Number(n.get(b.textScale));
95
+ ], we = [1, 1.25, 1.5, 2];
96
+ function ke(e, t) {
97
+ const n = new URLSearchParams(e), s = n.get(g.component) ?? void 0, l = t.component(s), r = n.get(g.scenario) ?? void 0, a = l ? void 0 : t.scenario(r), c = n.get(g.fixture) ?? void 0, h = l ? c ?? t.componentFixture(l.id, l.defaultFixture)?.id ?? l.fixtures?.[0]?.id : void 0, p = n.get(g.network), m = Number(n.get(g.textScale)), v = n.get(g.view), i = a?.status === "ported" || v === "ported" || n.get(g.showPorted) === "1" ? "ported" : "active";
72
98
  return {
73
- scenario: r?.id,
74
- component: i?.id,
75
- persona: n.get(b.persona) ?? r?.persona,
76
- fixture: n.get(b.fixture) ?? r?.fixture,
77
- network: ge(c) ? c : r?.network ?? "success",
78
- viewport: n.get(b.viewport) ?? "fit",
79
- customWidth: we(n.get(b.customWidth)),
80
- themeMode: n.get(b.themeMode) ?? t.product.theme?.modes?.[0],
81
- locale: n.get(b.locale) ?? t.product.theme?.locales?.[0],
82
- dataSource: n.get(b.dataSource) ?? t.product.dataSources?.default ?? "fixtures",
83
- chromeTheme: ve(n.get(b.chromeTheme)) ? n.get(b.chromeTheme) : "dark",
99
+ scenario: a?.id,
100
+ view: i,
101
+ showPorted: i === "ported",
102
+ component: l?.id,
103
+ persona: n.get(g.persona) ?? a?.persona,
104
+ fixture: l ? h : c ?? a?.fixture,
105
+ network: ye(p) ? p : a?.network ?? "success",
106
+ viewport: n.get(g.viewport) ?? "fit",
107
+ customWidth: _e(n.get(g.customWidth)),
108
+ themeMode: n.get(g.themeMode) ?? t.product.theme?.modes?.[0],
109
+ locale: n.get(g.locale) ?? t.product.theme?.locales?.[0],
110
+ dataSource: n.get(g.dataSource) ?? t.product.dataSources?.default ?? "fixtures",
111
+ chromeTheme: Se(n.get(g.chromeTheme)) ? n.get(g.chromeTheme) : "dark",
84
112
  // Chrome visível por padrão. `?chrome=0` é o modo de revisão limpa e captura
85
113
  // de tela, então precisa ser explícito para não sumir sem pedido.
86
- chrome: n.get(b.chrome) !== "0",
87
- keyboardMode: n.get(b.keyboardMode) === "1",
88
- reducedMotion: n.get(b.reducedMotion) === "1",
89
- textScale: pe.includes(p) ? p : 1,
90
- inspector: n.get(b.inspector) !== "0"
114
+ chrome: n.get(g.chrome) !== "0",
115
+ keyboardMode: n.get(g.keyboardMode) === "1",
116
+ reducedMotion: n.get(g.reducedMotion) === "1",
117
+ textScale: we.includes(m) ? m : 1,
118
+ inspector: n.get(g.inspector) !== "0"
91
119
  };
92
120
  }
93
- function z(e, t) {
121
+ function q(e, t) {
94
122
  const n = new URLSearchParams(), s = t.scenario(e.scenario);
95
- e.component ? n.set(b.component, e.component) : e.scenario && n.set(b.scenario, e.scenario), e.persona && e.persona !== s?.persona && n.set(b.persona, e.persona), e.fixture && e.fixture !== s?.fixture && n.set(b.fixture, e.fixture), e.network !== (s?.network ?? "success") && n.set(b.network, e.network), e.viewport !== "fit" && n.set(b.viewport, e.viewport), e.viewport === "custom" && e.customWidth && n.set(b.customWidth, String(e.customWidth));
96
- const i = t.product.theme?.modes?.[0];
97
- e.themeMode && e.themeMode !== i && n.set(b.themeMode, e.themeMode);
98
- const a = t.product.theme?.locales?.[0];
99
- e.locale && e.locale !== a && n.set(b.locale, e.locale);
100
- const r = t.product.dataSources?.default ?? "fixtures";
101
- e.dataSource && e.dataSource !== r && n.set(b.dataSource, e.dataSource), e.chromeTheme === "light" && n.set(b.chromeTheme, "light"), e.chrome || n.set(b.chrome, "0"), e.keyboardMode && n.set(b.keyboardMode, "1"), e.reducedMotion && n.set(b.reducedMotion, "1"), e.textScale !== 1 && n.set(b.textScale, String(e.textScale)), e.inspector || n.set(b.inspector, "0");
123
+ e.component ? n.set(g.component, e.component) : e.scenario && n.set(g.scenario, e.scenario), ee(e) === "ported" && n.set(g.view, "ported"), e.persona && e.persona !== s?.persona && n.set(g.persona, e.persona), e.component && e.fixture ? n.set(g.fixture, e.fixture) : e.fixture && e.fixture !== s?.fixture && n.set(g.fixture, e.fixture), e.network !== (s?.network ?? "success") && n.set(g.network, e.network), e.viewport !== "fit" && n.set(g.viewport, e.viewport), e.viewport === "custom" && e.customWidth && n.set(g.customWidth, String(e.customWidth));
124
+ const l = t.product.theme?.modes?.[0];
125
+ e.themeMode && e.themeMode !== l && n.set(g.themeMode, e.themeMode);
126
+ const r = t.product.theme?.locales?.[0];
127
+ e.locale && e.locale !== r && n.set(g.locale, e.locale);
128
+ const a = t.product.dataSources?.default ?? "fixtures";
129
+ e.dataSource && e.dataSource !== a && n.set(g.dataSource, e.dataSource), e.chromeTheme === "light" && n.set(g.chromeTheme, "light"), e.chrome || n.set(g.chrome, "0"), e.keyboardMode && n.set(g.keyboardMode, "1"), e.reducedMotion && n.set(g.reducedMotion, "1"), e.textScale !== 1 && n.set(g.textScale, String(e.textScale)), e.inspector || n.set(g.inspector, "0");
102
130
  const c = n.toString();
103
131
  return c ? `?${c}` : "";
104
132
  }
105
- function fe(e) {
106
- const [t, n] = T(() => J());
107
- F(() => {
108
- const u = () => n(J());
109
- return window.addEventListener("popstate", u), () => window.removeEventListener("popstate", u);
133
+ function Ne(e) {
134
+ const [t, n] = $(() => oe());
135
+ I(() => {
136
+ const v = () => n(oe());
137
+ return window.addEventListener("popstate", v), () => window.removeEventListener("popstate", v);
110
138
  }, []);
111
- const s = x(() => me(t.search, e), [t.search, e]), i = D((u, m, N = !1) => {
112
- const y = `${u}${m}`;
113
- N ? window.history.replaceState(null, "", y) : window.history.pushState(null, "", y), n({ path: u, search: m });
114
- }, []), a = D(
115
- (u) => {
116
- const m = { ...s, ...u };
117
- i(t.path, z(m, e), !0);
139
+ const s = C(() => ke(t.search, e), [t.search, e]), l = E((v, i, N = !1) => {
140
+ const x = `${v}${i}`;
141
+ N ? window.history.replaceState(null, "", x) : window.history.pushState(null, "", x), n({ path: v, search: i });
142
+ }, []), r = E(
143
+ (v) => {
144
+ const i = v.view ?? (v.showPorted === void 0 ? void 0 : v.showPorted ? "ported" : "active"), N = {
145
+ ...s,
146
+ ...v,
147
+ ...i ? { view: i, showPorted: i === "ported" } : {}
148
+ };
149
+ l(t.path, q(N, e), !0);
150
+ },
151
+ [s, t.path, l, e]
152
+ ), a = E(
153
+ (v) => {
154
+ const i = e.scenario(s.scenario), N = !i || (v === "ported" ? i.status === "ported" : i.status !== "ported"), x = {
155
+ ...s,
156
+ view: v,
157
+ showPorted: v === "ported",
158
+ ...N ? {} : {
159
+ scenario: void 0,
160
+ persona: void 0,
161
+ fixture: void 0,
162
+ network: "success"
163
+ }
164
+ };
165
+ l(N ? t.path : "/", q(x, e), !1);
118
166
  },
119
- [s, t.path, i, e]
120
- ), r = D(
121
- (u, m) => {
122
- const [N, y] = u.split("?"), l = N || "/", g = y ? `?${y}` : t.search;
123
- i(l, g, m?.replace ?? !1);
167
+ [s, t.path, l, e]
168
+ ), c = E(
169
+ (v, i) => {
170
+ const [N, x] = v.split("?"), S = N || "/", d = x ? `?${x}` : t.search;
171
+ l(S, d, i?.replace ?? !1);
124
172
  },
125
- [t.search, i]
126
- ), c = D(
127
- (u) => {
128
- const m = e.scenario(u);
129
- if (!m) return;
173
+ [t.search, l]
174
+ ), h = E(
175
+ (v) => {
176
+ const i = e.scenario(v);
177
+ if (!i) return;
130
178
  const N = {
131
179
  ...s,
132
- scenario: m.id,
180
+ scenario: i.id,
181
+ view: i.status === "ported" ? "ported" : "active",
182
+ showPorted: i.status === "ported",
133
183
  component: void 0,
134
- persona: m.persona,
135
- fixture: m.fixture,
136
- network: m.network ?? "success"
184
+ persona: i.persona,
185
+ fixture: i.fixture,
186
+ network: i.network ?? "success"
137
187
  };
138
- i(m.route, z(N, e), !1);
188
+ l(i.route, q(N, e), !1);
139
189
  },
140
- [s, i, e]
141
- ), p = D(
142
- (u) => {
143
- const m = e.component(u);
144
- if (!m) return;
190
+ [s, l, e]
191
+ ), p = E(
192
+ (v) => {
193
+ const i = e.component(v);
194
+ if (!i) return;
145
195
  const N = {
146
196
  ...s,
147
197
  scenario: void 0,
148
- component: m.id,
198
+ component: i.id,
149
199
  persona: void 0,
150
200
  fixture: void 0,
151
201
  network: "success"
152
202
  };
153
- i("/", z(N, e), !1);
203
+ N.fixture = e.componentFixture(i.id, i.defaultFixture)?.id ?? i.fixtures?.[0]?.id, l("/", q(N, e), !1);
154
204
  },
155
- [s, i, e]
156
- ), h = x(() => be(s), [s]);
157
- return { location: t, controls: s, viewport: h, setControls: a, navigate: r, openScenario: c, openComponent: p };
205
+ [s, l, e]
206
+ ), m = C(() => xe(s), [s]);
207
+ return {
208
+ location: t,
209
+ controls: s,
210
+ viewport: m,
211
+ setControls: r,
212
+ setScenarioView: a,
213
+ navigate: c,
214
+ openScenario: h,
215
+ openComponent: p
216
+ };
158
217
  }
159
- function be(e) {
160
- const t = te.find((n) => n.id === e.viewport);
218
+ function ee(e) {
219
+ return e.view ?? (e.showPorted ? "ported" : "active");
220
+ }
221
+ function xe(e) {
222
+ const t = ie.find((n) => n.id === e.viewport);
161
223
  return e.viewport === "custom" ? { id: "custom", label: "Personalizado", width: e.customWidth ?? 1024 } : t ?? { id: "fit", label: "Ajustar" };
162
224
  }
163
- function J() {
225
+ function oe() {
164
226
  return typeof window > "u" ? { path: "/", search: "" } : { path: window.location.pathname, search: window.location.search };
165
227
  }
166
- function ge(e) {
167
- return e !== null && ee.includes(e);
228
+ function ye(e) {
229
+ return e !== null && se.includes(e);
168
230
  }
169
- function ve(e) {
231
+ function Se(e) {
170
232
  return e === "dark" || e === "light";
171
233
  }
172
- function we(e) {
234
+ function _e(e) {
173
235
  if (!e) return;
174
236
  const t = Number.parseInt(e, 10);
175
237
  return Number.isFinite(t) && t > 0 ? t : void 0;
176
238
  }
177
- function ke(e, t) {
178
- const n = e.split("/").filter(Boolean), s = Ne(t).split("/").filter(Boolean), i = {};
179
- for (const [a, r] of n.entries()) {
180
- if (r === "*")
181
- return i["*"] = s.slice(a).join("/"), i;
182
- const c = s[a];
239
+ function Me(e, t) {
240
+ const n = e.split("/").filter(Boolean), s = Te(t).split("/").filter(Boolean), l = {};
241
+ for (const [r, a] of n.entries()) {
242
+ if (a === "*")
243
+ return l["*"] = s.slice(r).join("/"), l;
244
+ const c = s[r];
183
245
  if (c === void 0) return null;
184
- if (r.startsWith(":")) {
185
- i[r.slice(1)] = c;
246
+ if (a.startsWith(":")) {
247
+ l[a.slice(1)] = c;
186
248
  continue;
187
249
  }
188
- if (r !== c) return null;
250
+ if (a !== c) return null;
189
251
  }
190
- return n.length !== s.length ? null : i;
252
+ return n.length !== s.length ? null : l;
191
253
  }
192
- function ye(e, t) {
193
- const n = [...e].sort((s, i) => Q(i.path) - Q(s.path));
254
+ function Ce(e, t) {
255
+ const n = [...e].sort((s, l) => ne(l.path) - ne(s.path));
194
256
  for (const s of n) {
195
- const i = ke(s.path, t);
196
- if (i) return { definition: s, params: i };
257
+ const l = Me(s.path, t);
258
+ if (l) return { definition: s, params: l };
197
259
  }
198
260
  }
199
- function Q(e) {
261
+ function ne(e) {
200
262
  const t = e.split("/").filter(Boolean);
201
263
  let n = t.length;
202
264
  for (const s of t)
203
265
  s === "*" ? n -= 2 : s.startsWith(":") ? n += 1 : n += 4;
204
266
  return n;
205
267
  }
206
- function Ne(e) {
268
+ function Te(e) {
207
269
  const t = e.split("?")[0] ?? e;
208
270
  try {
209
271
  return decodeURI(t);
@@ -211,17 +273,17 @@ function Ne(e) {
211
273
  return t;
212
274
  }
213
275
  }
214
- const Se = 2500;
215
- class xe extends Error {
276
+ const Ae = 2500;
277
+ class Pe extends Error {
216
278
  constructor(t) {
217
279
  super(`Falha de rede simulada no cenário "${t}".`), this.name = "SimulatedNetworkError";
218
280
  }
219
281
  }
220
- function V(e) {
282
+ function X(e) {
221
283
  if (e)
222
284
  return typeof e.data == "function" ? e.data() : e.data;
223
285
  }
224
- const q = {
286
+ const Z = {
225
287
  id: "fixtures",
226
288
  label: "Fixtures",
227
289
  load: async ({ scenario: e, fixture: t, network: n }) => {
@@ -229,66 +291,66 @@ const q = {
229
291
  case "empty":
230
292
  return null;
231
293
  case "error":
232
- throw new xe(e.id);
294
+ throw new Pe(e.id);
233
295
  case "loading":
234
296
  return new Promise(() => {
235
297
  });
236
298
  case "slow":
237
- return await Me(Se), V(t);
299
+ return await Le(Ae), X(t);
238
300
  default:
239
- return V(t);
301
+ return X(t);
240
302
  }
241
303
  }
242
304
  };
243
- function pt(e) {
244
- const { id: t, label: n, baseUrl: s, path: i, init: a, fallbackToFixture: r = !0 } = e;
305
+ function gt(e) {
306
+ const { id: t, label: n, baseUrl: s, path: l, init: r, fallbackToFixture: a = !0 } = e;
245
307
  return {
246
308
  id: t,
247
309
  label: n,
248
310
  load: async (c) => {
249
- const p = new URL(i ? i(c) : c.scenario.route, s);
311
+ const h = new URL(l ? l(c) : c.scenario.route, s);
250
312
  try {
251
- const h = await fetch(p, a);
252
- if (!h.ok) throw new Error(`${h.status} ${h.statusText}`);
253
- return await h.json();
254
- } catch (h) {
255
- if (r) return V(c.fixture);
256
- throw new Error(`Adapter "${t}" falhou em ${p.toString()}`, { cause: h });
313
+ const p = await fetch(h, r);
314
+ if (!p.ok) throw new Error(`${p.status} ${p.statusText}`);
315
+ return await p.json();
316
+ } catch (p) {
317
+ if (a) return X(c.fixture);
318
+ throw new Error(`Adapter "${t}" falhou em ${h.toString()}`, { cause: p });
257
319
  }
258
320
  }
259
321
  };
260
322
  }
261
- function Me(e) {
323
+ function Le(e) {
262
324
  return new Promise((t) => setTimeout(t, e));
263
325
  }
264
- function _e(e) {
265
- const { scenario: t, fixture: n, network: s, adapter: i } = e, [a, r] = T({
326
+ function $e(e) {
327
+ const { scenario: t, fixture: n, network: s, adapter: l } = e, [r, a] = $({
266
328
  data: void 0,
267
329
  isLoading: !!t,
268
330
  error: void 0
269
331
  });
270
- return F(() => {
332
+ return I(() => {
271
333
  if (!t) {
272
- r({ data: void 0, isLoading: !1, error: void 0 });
334
+ a({ data: void 0, isLoading: !1, error: void 0 });
273
335
  return;
274
336
  }
275
337
  let c = !0;
276
- r({ data: void 0, isLoading: !0, error: void 0 });
277
- const p = i ?? q;
278
- return Promise.resolve(p.load({ scenario: t, fixture: n, network: s })).then((h) => {
279
- c && r({ data: h, isLoading: !1, error: void 0 });
280
- }).catch((h) => {
281
- c && r({
338
+ a({ data: void 0, isLoading: !0, error: void 0 });
339
+ const h = l ?? Z;
340
+ return Promise.resolve(h.load({ scenario: t, fixture: n, network: s })).then((p) => {
341
+ c && a({ data: p, isLoading: !1, error: void 0 });
342
+ }).catch((p) => {
343
+ c && a({
282
344
  data: void 0,
283
345
  isLoading: !1,
284
- error: h instanceof Error ? h : new Error(String(h))
346
+ error: p instanceof Error ? p : new Error(String(p))
285
347
  });
286
348
  }), () => {
287
349
  c = !1;
288
350
  };
289
- }, [t, n, s, i]), a;
351
+ }, [t, n, s, l]), r;
290
352
  }
291
- const Ce = {
353
+ const Ee = {
292
354
  a: "link",
293
355
  article: "article",
294
356
  aside: "complementary",
@@ -322,7 +384,7 @@ const Ce = {
322
384
  th: "columnheader",
323
385
  tr: "row",
324
386
  ul: "list"
325
- }, Te = {
387
+ }, Fe = {
326
388
  button: "button",
327
389
  checkbox: "checkbox",
328
390
  email: "textbox",
@@ -337,50 +399,50 @@ const Ce = {
337
399
  text: "textbox",
338
400
  url: "textbox"
339
401
  };
340
- function Le(e) {
402
+ function Re(e) {
341
403
  if (!e || !(e instanceof HTMLElement)) return;
342
- const { name: t, nameFrom: n } = Ee(e);
404
+ const { name: t, nameFrom: n } = Oe(e);
343
405
  return {
344
- role: Ae(e),
406
+ role: De(e),
345
407
  name: t,
346
408
  nameFrom: n,
347
- description: $e(e),
348
- states: Pe(e),
349
- selector: Fe(e),
409
+ description: Ie(e),
410
+ states: Be(e),
411
+ selector: He(e),
350
412
  hiddenFromTabOrder: e.tabIndex < 0,
351
- hiddenFromAssistiveTech: Re(e)
413
+ hiddenFromAssistiveTech: We(e)
352
414
  };
353
415
  }
354
- function Ae(e) {
416
+ function De(e) {
355
417
  const t = e.getAttribute("role");
356
418
  if (t) return t.split(/\s+/)[0] ?? t;
357
419
  const n = e.tagName.toLowerCase();
358
420
  if (n === "input") {
359
421
  const s = e.type.toLowerCase();
360
- return Te[s] ?? "textbox";
422
+ return Fe[s] ?? "textbox";
361
423
  }
362
- return n === "a" && !e.hasAttribute("href") ? "generic" : Ce[n] ?? "generic";
424
+ return n === "a" && !e.hasAttribute("href") ? "generic" : Ee[n] ?? "generic";
363
425
  }
364
- function Ee(e) {
426
+ function Oe(e) {
365
427
  const t = e.getAttribute("aria-labelledby");
366
428
  if (t) {
367
- const r = t.split(/\s+/).map((c) => e.ownerDocument.getElementById(c)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
368
- if (r) return { name: r, nameFrom: "aria-labelledby" };
429
+ const a = t.split(/\s+/).map((c) => e.ownerDocument.getElementById(c)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
430
+ if (a) return { name: a, nameFrom: "aria-labelledby" };
369
431
  }
370
432
  const n = e.getAttribute("aria-label")?.trim();
371
433
  if (n) return { name: n, nameFrom: "aria-label" };
372
434
  if (e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement) {
373
- const r = Array.from(e.labels ?? []).map((c) => c.textContent?.trim() ?? "").filter(Boolean);
374
- if (r.length) return { name: r.join(" "), nameFrom: "label" };
435
+ const a = Array.from(e.labels ?? []).map((c) => c.textContent?.trim() ?? "").filter(Boolean);
436
+ if (a.length) return { name: a.join(" "), nameFrom: "label" };
375
437
  }
376
438
  if (e instanceof HTMLImageElement) {
377
- const r = e.getAttribute("alt");
378
- if (r !== null) return { name: r, nameFrom: "alt" };
439
+ const a = e.getAttribute("alt");
440
+ if (a !== null) return { name: a, nameFrom: "alt" };
379
441
  }
380
- const s = e.getAttribute("title")?.trim(), i = De(e);
381
- return i ? { name: i, nameFrom: "content" } : s ? { name: s, nameFrom: "title" } : e instanceof HTMLInputElement && e.value ? { name: e.value, nameFrom: "value" } : e.getAttribute("placeholder")?.trim() ? { name: "", nameFrom: "none" } : { name: "", nameFrom: "none" };
442
+ const s = e.getAttribute("title")?.trim(), l = je(e);
443
+ return l ? { name: l, nameFrom: "content" } : s ? { name: s, nameFrom: "title" } : e instanceof HTMLInputElement && e.value ? { name: e.value, nameFrom: "value" } : e.getAttribute("placeholder")?.trim() ? { name: "", nameFrom: "none" } : { name: "", nameFrom: "none" };
382
444
  }
383
- function $e(e) {
445
+ function Ie(e) {
384
446
  const t = e.getAttribute("aria-describedby");
385
447
  if (t) {
386
448
  const n = t.split(/\s+/).map((s) => e.ownerDocument.getElementById(s)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
@@ -388,14 +450,14 @@ function $e(e) {
388
450
  }
389
451
  return e.getAttribute("aria-description")?.trim() || void 0;
390
452
  }
391
- function Pe(e) {
392
- const t = [], n = (s, i = s.replace("aria-", "")) => {
393
- const a = e.getAttribute(s);
394
- a !== null && a !== "false" && t.push(a === "true" || a === "" ? i : `${i}=${a}`);
453
+ function Be(e) {
454
+ const t = [], n = (s, l = s.replace("aria-", "")) => {
455
+ const r = e.getAttribute(s);
456
+ r !== null && r !== "false" && t.push(r === "true" || r === "" ? l : `${l}=${r}`);
395
457
  };
396
458
  return e.disabled && t.push("disabled"), e.getAttribute("aria-disabled") === "true" && t.push("disabled"), e.required && t.push("required"), e.readOnly && t.push("readonly"), e.checked && t.push("checked"), n("aria-expanded"), n("aria-selected"), n("aria-checked"), n("aria-pressed"), n("aria-current"), n("aria-invalid"), n("aria-busy"), n("aria-live"), n("aria-haspopup"), n("aria-level", "level"), e.ownerDocument.activeElement === e && t.push("focused"), [...new Set(t)];
397
459
  }
398
- function Re(e) {
460
+ function We(e) {
399
461
  let t = e;
400
462
  for (; t; ) {
401
463
  if (t.getAttribute("aria-hidden") === "true" || t.hasAttribute("hidden")) return !0;
@@ -403,13 +465,13 @@ function Re(e) {
403
465
  }
404
466
  return !1;
405
467
  }
406
- function De(e) {
468
+ function je(e) {
407
469
  const t = e.cloneNode(!0);
408
470
  for (const n of t.querySelectorAll("[aria-hidden='true'],[hidden]"))
409
471
  n.remove();
410
472
  return (t.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, 160);
411
473
  }
412
- function Fe(e) {
474
+ function He(e) {
413
475
  const t = e.tagName.toLowerCase();
414
476
  if (e.id) return `${t}#${e.id}`;
415
477
  const n = e.getAttribute("data-testid");
@@ -417,7 +479,7 @@ function Fe(e) {
417
479
  const s = Array.from(e.classList).slice(0, 2);
418
480
  return s.length ? `${t}.${s.join(".")}` : t;
419
481
  }
420
- function Ie(e = document) {
482
+ function Ke(e = document) {
421
483
  const t = [
422
484
  "a[href]",
423
485
  "button",
@@ -434,36 +496,36 @@ function Ie(e = document) {
434
496
  return s.display === "none" || s.visibility === "hidden" ? !1 : n.offsetWidth > 0 || n.offsetHeight > 0 || n === document.activeElement;
435
497
  });
436
498
  }
437
- function Oe(e, t) {
438
- const [n, s] = T(), [i, a] = T([]), r = D(() => {
499
+ function ze(e, t) {
500
+ const [n, s] = $(), [l, r] = $([]), a = E(() => {
439
501
  const c = t.current;
440
502
  if (!c) {
441
- a([]);
503
+ r([]);
442
504
  return;
443
505
  }
444
- a(
445
- Ie(c).map((p, h) => ({
446
- index: h + 1,
447
- element: p,
448
- rect: p.getBoundingClientRect(),
449
- forcedOrder: p.tabIndex > 0
506
+ r(
507
+ Ke(c).map((h, p) => ({
508
+ index: p + 1,
509
+ element: h,
510
+ rect: h.getBoundingClientRect(),
511
+ forcedOrder: h.tabIndex > 0
450
512
  }))
451
513
  );
452
514
  }, [t]);
453
- return F(() => {
515
+ return I(() => {
454
516
  if (!e) {
455
- s(void 0), a([]);
517
+ s(void 0), r([]);
456
518
  return;
457
519
  }
458
- const c = () => s(Le(document.activeElement));
459
- document.addEventListener("focusin", c), window.addEventListener("resize", r), window.addEventListener("scroll", r, !0), c(), r();
460
- const p = t.current, h = p ? new MutationObserver(() => r()) : void 0;
461
- return h?.observe(p, { childList: !0, subtree: !0, attributes: !0 }), () => {
462
- document.removeEventListener("focusin", c), window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0), h?.disconnect();
520
+ const c = () => s(Re(document.activeElement));
521
+ document.addEventListener("focusin", c), window.addEventListener("resize", a), window.addEventListener("scroll", a, !0), c(), a();
522
+ const h = t.current, p = h ? new MutationObserver(() => a()) : void 0;
523
+ return p?.observe(h, { childList: !0, subtree: !0, attributes: !0 }), () => {
524
+ document.removeEventListener("focusin", c), window.removeEventListener("resize", a), window.removeEventListener("scroll", a, !0), p?.disconnect();
463
525
  };
464
- }, [e, r, t]), { focused: n, tabStops: i, refresh: r };
526
+ }, [e, a, t]), { focused: n, tabStops: l, refresh: a };
465
527
  }
466
- const C = {
528
+ const L = {
467
529
  status: {
468
530
  ported: "Portado — não validado",
469
531
  proposed: "Proposta",
@@ -529,6 +591,15 @@ const C = {
529
591
  matchCount: (e) => `${e} ${e === 1 ? "situação" : "situações"}.`,
530
592
  noComponentMatch: (e) => `Nenhum componente para "${e}".`,
531
593
  componentMatchCount: (e) => `${e} ${e === 1 ? "componente" : "componentes"}.`,
594
+ activeWork: "Trabalho ativo",
595
+ portedReferences: (e) => `Referências portadas · ${e}`,
596
+ viewPorted: (e) => `Ver ${e} ${e === 1 ? "referência portada" : "referências portadas"}`,
597
+ backToActive: "Voltar ao trabalho ativo",
598
+ currentView: (e) => `Visão atual: ${e}`,
599
+ noActiveWork: "Não há cenários no trabalho ativo.",
600
+ noPortedReferences: "Não há referências portadas.",
601
+ showPorted: "Mostrar portados",
602
+ activePorted: "Aberto por link direto; oculto do trabalho ativo",
532
603
  emptyModule: "Nenhum cenário ainda.",
533
604
  emptyComponents: "O produto ainda não registrou componentes.",
534
605
  withoutModule: "Sem módulo",
@@ -541,6 +612,7 @@ const C = {
541
612
  region: "Controles do cenário",
542
613
  persona: "Persona",
543
614
  fixture: "Dados",
615
+ componentFixture: "Dados do componente",
544
616
  network: "Rede",
545
617
  viewport: "Viewport",
546
618
  customWidth: "Largura personalizada em pixels",
@@ -565,6 +637,9 @@ const C = {
565
637
  noScenario: "Nenhum cenário ativo. Escolha uma situação na navegação para ver contexto, regras e critérios.",
566
638
  componentReference: "Componente",
567
639
  componentGroup: "Grupo",
640
+ componentFixture: "Fixture ativa",
641
+ componentFixtureDescription: "Descrição da fixture",
642
+ componentFixtureFallback: (e, t) => `A fixture \`${e}\` não existe neste componente. Exibindo \`${t}\` como fallback.`,
568
643
  situation: "Situação",
569
644
  reproduction: "Reprodução",
570
645
  id: "Id",
@@ -614,14 +689,16 @@ const C = {
614
689
  withoutModule: "Sem módulo",
615
690
  withoutModuleHint: "O prefixo do id não corresponde a nenhum módulo registrado, então estas situações não aparecem na navegação por módulo.",
616
691
  emptyModule: "Nenhuma situação registrada neste módulo ainda.",
617
- keyboardBadge: "teclado"
692
+ keyboardBadge: "teclado",
693
+ noActiveWork: "Não há cenários no trabalho ativo.",
694
+ noPortedReferences: "Não há referências portadas nesta coleção."
618
695
  },
619
696
  shell: {
620
697
  restoreChrome: "Mostrar controles",
621
698
  noRoute: "Nenhuma rota para este endereço",
622
699
  noRouteHint: "não casa com nenhuma rota declarada. Escolha uma situação na navegação."
623
700
  }
624
- }, mt = {
701
+ }, wt = {
625
702
  status: {
626
703
  ported: "Ported — not validated",
627
704
  proposed: "Proposed",
@@ -687,6 +764,15 @@ const C = {
687
764
  matchCount: (e) => `${e} ${e === 1 ? "scenario" : "scenarios"}.`,
688
765
  noComponentMatch: (e) => `No components found for "${e}".`,
689
766
  componentMatchCount: (e) => `${e} ${e === 1 ? "component" : "components"}.`,
767
+ activeWork: "Active work",
768
+ portedReferences: (e) => `Ported references · ${e}`,
769
+ viewPorted: (e) => `View ${e} ported ${e === 1 ? "reference" : "references"}`,
770
+ backToActive: "Back to active work",
771
+ currentView: (e) => `Current view: ${e}`,
772
+ noActiveWork: "There are no scenarios in active work.",
773
+ noPortedReferences: "There are no ported references.",
774
+ showPorted: "Show ported",
775
+ activePorted: "Opened by direct link; hidden from active work",
690
776
  emptyModule: "No scenarios yet.",
691
777
  emptyComponents: "The product has not registered any components yet.",
692
778
  withoutModule: "No module",
@@ -699,6 +785,7 @@ const C = {
699
785
  region: "Scenario controls",
700
786
  persona: "Persona",
701
787
  fixture: "Data",
788
+ componentFixture: "Component data",
702
789
  network: "Network",
703
790
  viewport: "Viewport",
704
791
  customWidth: "Custom width in pixels",
@@ -723,6 +810,9 @@ const C = {
723
810
  noScenario: "No active scenario. Choose a state in the navigation to see its context, rules, and criteria.",
724
811
  componentReference: "Component",
725
812
  componentGroup: "Group",
813
+ componentFixture: "Active fixture",
814
+ componentFixtureDescription: "Fixture description",
815
+ componentFixtureFallback: (e, t) => `Fixture \`${e}\` does not exist for this component. Showing \`${t}\` as fallback.`,
726
816
  situation: "State",
727
817
  reproduction: "Reproduction",
728
818
  id: "ID",
@@ -772,7 +862,9 @@ const C = {
772
862
  withoutModule: "No module",
773
863
  withoutModuleHint: "The ID prefix does not match a registered module, so these states do not appear in module navigation.",
774
864
  emptyModule: "No states have been registered in this module yet.",
775
- keyboardBadge: "keyboard"
865
+ keyboardBadge: "keyboard",
866
+ noActiveWork: "There are no scenarios in active work.",
867
+ noPortedReferences: "There are no ported references in this collection."
776
868
  },
777
869
  shell: {
778
870
  restoreChrome: "Show controls",
@@ -780,73 +872,78 @@ const C = {
780
872
  noRouteHint: "does not match any declared route. Choose a state from the navigation."
781
873
  }
782
874
  };
783
- function Be(e) {
784
- if (!e) return C;
785
- const t = { ...C };
786
- for (const n of Object.keys(C)) {
875
+ function Ue(e) {
876
+ if (!e) return L;
877
+ const t = { ...L };
878
+ for (const n of Object.keys(L)) {
787
879
  const s = e[n];
788
- s && (t[n] = { ...C[n], ...s });
880
+ s && (t[n] = { ...L[n], ...s });
789
881
  }
790
882
  return t;
791
883
  }
792
- const oe = re(C);
793
- function M() {
794
- return ae(oe);
884
+ const ce = ue(L);
885
+ function P() {
886
+ return le(ce);
795
887
  }
796
- const ft = C.status, bt = C.statusMeaning, gt = C.network, vt = C.keyboard;
797
- function We({
888
+ const kt = L.status, Nt = L.statusMeaning, xt = L.network, yt = L.keyboard;
889
+ function Ve({
798
890
  registry: e,
799
891
  activeScenario: t,
800
892
  activeComponent: n,
801
893
  controls: s,
802
- onOpenScenario: i,
803
- onOpenComponent: a
894
+ onOpenScenario: l,
895
+ onOpenComponent: r,
896
+ onViewChange: a
804
897
  }) {
805
- const r = M(), [c, p] = T(n ? "components" : "flows"), [h, u] = T(""), [m, N] = T(/* @__PURE__ */ new Set()), y = G(null), l = G(/* @__PURE__ */ new Map());
806
- F(() => {
898
+ const c = P(), [h, p] = $(n ? "components" : "flows"), [m, v] = $(""), [i, N] = $(/* @__PURE__ */ new Set()), x = Q(null), S = Q(/* @__PURE__ */ new Map()), d = ee(s), f = e.byStatus("ported").length, k = e.activeScenarios({ view: d }).length, M = d === "ported" ? c.sidebar.portedReferences(f) : c.sidebar.activeWork;
899
+ I(() => {
807
900
  n ? p("components") : t && p("flows");
808
- }, [n, t]), F(() => {
809
- const f = (v) => {
810
- Ke(v) && (v.preventDefault(), y.current?.focus(), y.current?.select());
901
+ }, [n, t]), I(() => {
902
+ const b = (w) => {
903
+ Ye(w) && (w.preventDefault(), x.current?.focus(), x.current?.select());
811
904
  };
812
- return window.addEventListener("keydown", f), () => window.removeEventListener("keydown", f);
905
+ return window.addEventListener("keydown", b), () => window.removeEventListener("keydown", b);
813
906
  }, []);
814
- const g = x(() => {
815
- if (h.trim())
816
- return new Set(e.search(h).map((f) => f.id));
817
- }, [h, e]), w = x(() => {
818
- const f = Z(h);
907
+ const _ = C(() => {
908
+ if (m.trim())
909
+ return new Set(
910
+ e.search(m, { view: d }).map((b) => b.id)
911
+ );
912
+ }, [m, e, d]), T = C(() => {
913
+ const b = ae(m);
819
914
  return (e.product.components ?? []).filter(
820
- (v) => Z([v.name, v.id, v.group, v.description].join(" ")).includes(
821
- f
915
+ (w) => ae([w.name, w.id, w.group, w.description].join(" ")).includes(
916
+ b
822
917
  )
823
918
  );
824
- }, [h, e.product.components]), L = (f) => g ? f.filter((v) => g.has(v.id)) : f, E = e.tree.map((f) => ({ ...f, scenarios: L(f.scenarios) })).filter((f) => g ? f.scenarios.length > 0 : !0), $ = L(e.orphans), I = E.reduce((f, v) => f + v.scenarios.length, 0) + $.length, O = He(w), P = c === "flows" ? [...E.flatMap((f) => f.scenarios), ...$].map((f) => f.id) : w.map((f) => f.id), B = (f, v) => {
825
- if (P.length === 0) return;
826
- const k = ze(P, f, v);
827
- k && l.current.get(k)?.focus();
828
- }, K = (f) => {
829
- f.key === "ArrowDown" ? (f.preventDefault(), B(void 0, 1)) : f.key === "Escape" && u("");
830
- }, R = (f, v) => {
831
- v.key !== "ArrowDown" && v.key !== "ArrowUp" || (v.preventDefault(), B(f, v.key === "ArrowDown" ? 1 : -1));
832
- }, W = (f, v) => {
833
- v ? l.current.set(f, v) : l.current.delete(f);
834
- }, j = (f) => N((v) => {
835
- const k = new Set(v);
836
- return k.has(f) ? k.delete(f) : k.add(f), k;
919
+ }, [m, e.product.components]), B = (b) => _ ? b.filter((w) => _.has(w.id)) : b, W = {
920
+ view: d
921
+ }, F = e.treeFor(W).map((b) => ({ ...b, scenarios: B(b.scenarios) })).filter((b) => b.scenarios.length > 0), R = B(e.orphansFor(W)), D = F.reduce((b, w) => b + w.scenarios.length, 0) + R.length, j = qe(T), z = h === "flows" ? [...F.flatMap((b) => b.scenarios), ...R].map((b) => b.id) : T.map((b) => b.id), O = (b, w) => {
922
+ if (z.length === 0) return;
923
+ const y = Je(z, b, w);
924
+ y && S.current.get(y)?.focus();
925
+ }, U = (b) => {
926
+ b.key === "ArrowDown" ? (b.preventDefault(), O(void 0, 1)) : b.key === "Escape" && v("");
927
+ }, H = (b, w) => {
928
+ w.key !== "ArrowDown" && w.key !== "ArrowUp" || (w.preventDefault(), O(b, w.key === "ArrowDown" ? 1 : -1));
929
+ }, K = (b, w) => {
930
+ w ? S.current.set(b, w) : S.current.delete(b);
931
+ }, V = (b) => N((w) => {
932
+ const y = new Set(w);
933
+ return y.has(b) ? y.delete(b) : y.add(b), y;
837
934
  });
838
- return /* @__PURE__ */ d("nav", { className: "ds-chrome ds-sidebar", "aria-label": r.sidebar.region, children: [
839
- /* @__PURE__ */ d("div", { className: "ds-sidebar__tabs", role: "tablist", children: [
935
+ return /* @__PURE__ */ u("nav", { className: "ds-chrome ds-sidebar", "aria-label": c.sidebar.region, children: [
936
+ /* @__PURE__ */ u("div", { className: "ds-sidebar__tabs", role: "tablist", children: [
840
937
  /* @__PURE__ */ o(
841
938
  "button",
842
939
  {
843
940
  type: "button",
844
941
  role: "tab",
845
- "aria-selected": c === "flows",
942
+ "aria-selected": h === "flows",
846
943
  onClick: () => {
847
- p("flows"), u("");
944
+ p("flows"), v("");
848
945
  },
849
- children: r.sidebar.flowsTab
946
+ children: c.sidebar.flowsTab
850
947
  }
851
948
  ),
852
949
  /* @__PURE__ */ o(
@@ -854,85 +951,124 @@ function We({
854
951
  {
855
952
  type: "button",
856
953
  role: "tab",
857
- "aria-selected": c === "components",
954
+ "aria-selected": h === "components",
858
955
  onClick: () => {
859
- p("components"), u("");
956
+ p("components"), v("");
860
957
  },
861
- children: r.sidebar.componentsTab
958
+ children: c.sidebar.componentsTab
862
959
  }
863
960
  )
864
961
  ] }),
865
- /* @__PURE__ */ d("div", { className: "ds-sidebar__search", children: [
962
+ /* @__PURE__ */ u("div", { className: "ds-sidebar__search", children: [
866
963
  /* @__PURE__ */ o(
867
964
  "input",
868
965
  {
869
- ref: y,
966
+ ref: x,
870
967
  className: "ds-input ds-input--search",
871
968
  type: "search",
872
- value: h,
873
- placeholder: c === "flows" ? r.sidebar.searchPlaceholder : r.sidebar.componentSearchPlaceholder,
874
- "aria-label": c === "flows" ? r.sidebar.searchLabel : r.sidebar.componentSearchLabel,
875
- onChange: (f) => u(f.target.value),
876
- onKeyDown: K
969
+ value: m,
970
+ placeholder: h === "flows" ? c.sidebar.searchPlaceholder : c.sidebar.componentSearchPlaceholder,
971
+ "aria-label": h === "flows" ? c.sidebar.searchLabel : c.sidebar.componentSearchLabel,
972
+ onChange: (b) => v(b.target.value),
973
+ onKeyDown: U
877
974
  }
878
975
  ),
879
- /* @__PURE__ */ o("kbd", { children: r.sidebar.searchShortcut })
880
- ] }),
881
- /* @__PURE__ */ d("div", { className: "ds-sidebar__tree", role: "tabpanel", children: [
882
- h.trim() !== "" && /* @__PURE__ */ o("p", { className: "ds-sidebar__empty", role: "status", children: c === "flows" ? I === 0 ? r.sidebar.noMatch(h) : r.sidebar.matchCount(I) : w.length === 0 ? r.sidebar.noComponentMatch(h) : r.sidebar.componentMatchCount(w.length) }),
883
- c === "flows" ? /* @__PURE__ */ o(
884
- je,
885
- {
886
- nodes: E,
887
- orphans: $,
888
- matches: g,
889
- collapsed: m,
890
- activeScenario: t?.id,
891
- emptyModuleLabel: r.sidebar.emptyModule,
892
- withoutModuleLabel: r.sidebar.withoutModule,
893
- onToggle: j,
894
- onOpen: i,
895
- onKeyDown: R,
896
- setItemRef: W
897
- }
898
- ) : O.length === 0 && !h ? /* @__PURE__ */ o("p", { className: "ds-sidebar__empty", children: r.sidebar.emptyComponents }) : O.map(([f, v]) => /* @__PURE__ */ d("section", { className: "ds-component-group", children: [
899
- /* @__PURE__ */ o("h2", { children: f }),
900
- /* @__PURE__ */ o("ul", { children: v.map((k) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ d(
901
- "button",
902
- {
903
- ref: (S) => W(k.id, S),
904
- type: "button",
905
- className: "ds-component-item",
906
- "aria-current": k.id === n,
907
- onClick: () => a(k.id),
908
- onKeyDown: (S) => R(k.id, S),
909
- children: [
910
- /* @__PURE__ */ o("span", { children: k.name }),
911
- k.description && /* @__PURE__ */ o("small", { children: k.description })
912
- ]
913
- }
914
- ) }, k.id)) })
915
- ] }, f))
976
+ /* @__PURE__ */ o("kbd", { children: c.sidebar.searchShortcut })
916
977
  ] }),
917
- c === "flows" && t && /* @__PURE__ */ d("aside", { className: "ds-sidebar__scope", "aria-label": r.sidebar.scope, children: [
918
- /* @__PURE__ */ o("h2", { children: r.sidebar.scope }),
919
- /* @__PURE__ */ d("dl", { children: [
920
- /* @__PURE__ */ o("dt", { children: r.sidebar.scopeData }),
921
- /* @__PURE__ */ o("dd", { children: e.fixture(s.fixture ?? t.fixture)?.label ?? r.controls.none }),
922
- /* @__PURE__ */ o("dt", { children: r.sidebar.scopePersona }),
923
- /* @__PURE__ */ o("dd", { children: e.persona(s.persona ?? t.persona)?.name ?? r.controls.none }),
924
- /* @__PURE__ */ o("dt", { children: r.sidebar.scopeNetwork }),
925
- /* @__PURE__ */ o("dd", { children: r.network[s.network] })
978
+ /* @__PURE__ */ u(
979
+ "div",
980
+ {
981
+ className: "ds-sidebar__tree",
982
+ role: "tabpanel",
983
+ "aria-label": h === "flows" ? c.sidebar.currentView(M) : void 0,
984
+ children: [
985
+ h === "flows" && /* @__PURE__ */ u("header", { className: "ds-sidebar__view-header", children: [
986
+ /* @__PURE__ */ o("h2", { children: M }),
987
+ d === "ported" && /* @__PURE__ */ o(
988
+ "button",
989
+ {
990
+ type: "button",
991
+ className: "ds-text-action",
992
+ onClick: () => a("active"),
993
+ children: c.sidebar.backToActive
994
+ }
995
+ )
996
+ ] }),
997
+ m.trim() !== "" && /* @__PURE__ */ o("p", { className: "ds-sidebar__empty", role: "status", children: h === "flows" ? D === 0 ? c.sidebar.noMatch(m) : c.sidebar.matchCount(D) : T.length === 0 ? c.sidebar.noComponentMatch(m) : c.sidebar.componentMatchCount(T.length) }),
998
+ h === "flows" && m.trim() === "" && k === 0 ? /* @__PURE__ */ u("div", { className: "ds-sidebar__view-empty", children: [
999
+ /* @__PURE__ */ o("p", { children: d === "ported" ? c.sidebar.noPortedReferences : c.sidebar.noActiveWork }),
1000
+ d === "active" && f > 0 && /* @__PURE__ */ o(
1001
+ "button",
1002
+ {
1003
+ type: "button",
1004
+ className: "ds-text-action",
1005
+ onClick: () => a("ported"),
1006
+ children: c.sidebar.viewPorted(f)
1007
+ }
1008
+ )
1009
+ ] }) : h === "flows" ? /* @__PURE__ */ o(
1010
+ Ge,
1011
+ {
1012
+ nodes: F,
1013
+ orphans: R,
1014
+ matches: _,
1015
+ collapsed: i,
1016
+ activeScenario: t?.id,
1017
+ withoutModuleLabel: c.sidebar.withoutModule,
1018
+ onToggle: V,
1019
+ onOpen: l,
1020
+ onKeyDown: H,
1021
+ setItemRef: K
1022
+ }
1023
+ ) : j.length === 0 && !m ? /* @__PURE__ */ o("p", { className: "ds-sidebar__empty", children: c.sidebar.emptyComponents }) : j.map(([b, w]) => /* @__PURE__ */ u("section", { className: "ds-component-group", children: [
1024
+ /* @__PURE__ */ o("h2", { children: b }),
1025
+ /* @__PURE__ */ o("ul", { children: w.map((y) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ u(
1026
+ "button",
1027
+ {
1028
+ ref: (G) => K(y.id, G),
1029
+ type: "button",
1030
+ className: "ds-component-item",
1031
+ "aria-current": y.id === n,
1032
+ onClick: () => r(y.id),
1033
+ onKeyDown: (G) => H(y.id, G),
1034
+ children: [
1035
+ /* @__PURE__ */ o("span", { children: y.name }),
1036
+ y.description && /* @__PURE__ */ o("small", { children: y.description })
1037
+ ]
1038
+ }
1039
+ ) }, y.id)) })
1040
+ ] }, b))
1041
+ ]
1042
+ }
1043
+ ),
1044
+ h === "flows" && d === "active" && k > 0 && f > 0 && /* @__PURE__ */ o("div", { className: "ds-sidebar__view-footer", children: /* @__PURE__ */ o(
1045
+ "button",
1046
+ {
1047
+ type: "button",
1048
+ className: "ds-text-action",
1049
+ onClick: () => a("ported"),
1050
+ children: c.sidebar.viewPorted(f)
1051
+ }
1052
+ ) }),
1053
+ h === "flows" && t && /* @__PURE__ */ u("aside", { className: "ds-sidebar__scope", "aria-label": c.sidebar.scope, children: [
1054
+ /* @__PURE__ */ o("h2", { children: c.sidebar.scope }),
1055
+ /* @__PURE__ */ u("dl", { children: [
1056
+ /* @__PURE__ */ o("dt", { children: c.sidebar.scopeData }),
1057
+ /* @__PURE__ */ o("dd", { children: e.fixture(s.fixture ?? t.fixture)?.label ?? c.controls.none }),
1058
+ /* @__PURE__ */ o("dt", { children: c.sidebar.scopePersona }),
1059
+ /* @__PURE__ */ o("dd", { children: e.persona(s.persona ?? t.persona)?.name ?? c.controls.none }),
1060
+ /* @__PURE__ */ o("dt", { children: c.sidebar.scopeNetwork }),
1061
+ /* @__PURE__ */ o("dd", { children: c.network[s.network] })
926
1062
  ] })
927
1063
  ] })
928
1064
  ] });
929
1065
  }
930
- function je(e) {
931
- return /* @__PURE__ */ d(A, { children: [
1066
+ function Ge(e) {
1067
+ return /* @__PURE__ */ u(A, { children: [
932
1068
  e.nodes.map((t) => {
933
1069
  const n = !e.collapsed.has(t.module.id) || !!e.matches;
934
- return /* @__PURE__ */ d("section", { className: "ds-module", children: [
935
- /* @__PURE__ */ d(
1070
+ return /* @__PURE__ */ u("section", { className: "ds-module", children: [
1071
+ /* @__PURE__ */ u(
936
1072
  "button",
937
1073
  {
938
1074
  type: "button",
@@ -946,42 +1082,45 @@ function je(e) {
946
1082
  ]
947
1083
  }
948
1084
  ),
949
- n && /* @__PURE__ */ d("ul", { className: "ds-module__scenarios", children: [
950
- t.scenarios.map((s) => /* @__PURE__ */ o(X, { scenario: s, ...e }, s.id)),
951
- t.scenarios.length === 0 && /* @__PURE__ */ o("li", { className: "ds-sidebar__empty", children: e.emptyModuleLabel })
952
- ] })
1085
+ n && /* @__PURE__ */ o("ul", { className: "ds-module__scenarios", children: t.scenarios.map((s) => /* @__PURE__ */ o(re, { scenario: s, ...e }, s.id)) })
953
1086
  ] }, t.module.id);
954
1087
  }),
955
- e.orphans.length > 0 && /* @__PURE__ */ d("section", { className: "ds-module", children: [
956
- /* @__PURE__ */ d("div", { className: "ds-module__header", "aria-hidden": "true", children: [
1088
+ e.orphans.length > 0 && /* @__PURE__ */ u("section", { className: "ds-module", children: [
1089
+ /* @__PURE__ */ u("div", { className: "ds-module__header", "aria-hidden": "true", children: [
957
1090
  /* @__PURE__ */ o("span", { className: "ds-module__chevron", children: "▶" }),
958
1091
  /* @__PURE__ */ o("span", { children: e.withoutModuleLabel }),
959
1092
  /* @__PURE__ */ o("span", { className: "ds-module__count", children: e.orphans.length })
960
1093
  ] }),
961
- /* @__PURE__ */ o("ul", { className: "ds-module__scenarios", children: e.orphans.map((t) => /* @__PURE__ */ o(X, { scenario: t, ...e }, t.id)) })
1094
+ /* @__PURE__ */ o("ul", { className: "ds-module__scenarios", children: e.orphans.map((t) => /* @__PURE__ */ o(re, { scenario: t, ...e }, t.id)) })
962
1095
  ] })
963
1096
  ] });
964
1097
  }
965
- function X({ scenario: e, activeScenario: t, onOpen: n, onKeyDown: s, setItemRef: i }) {
966
- const a = M().status[e.status];
967
- return /* @__PURE__ */ o("li", { children: /* @__PURE__ */ d(
1098
+ function re({
1099
+ scenario: e,
1100
+ activeScenario: t,
1101
+ onOpen: n,
1102
+ onKeyDown: s,
1103
+ setItemRef: l
1104
+ }) {
1105
+ const r = P().status[e.status];
1106
+ return /* @__PURE__ */ o("li", { children: /* @__PURE__ */ u(
968
1107
  "button",
969
1108
  {
970
- ref: (r) => i(e.id, r),
1109
+ ref: (a) => l(e.id, a),
971
1110
  type: "button",
972
1111
  className: "ds-scenario",
973
1112
  "aria-current": e.id === t,
974
1113
  onClick: () => n(e.id),
975
- onKeyDown: (r) => s(e.id, r),
1114
+ onKeyDown: (a) => s(e.id, a),
976
1115
  children: [
977
- /* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": e.status, title: a }),
1116
+ /* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": e.status, title: r }),
978
1117
  /* @__PURE__ */ o("span", { className: "ds-scenario__title", children: e.title }),
979
- /* @__PURE__ */ o("span", { className: "ds-visually-hidden", children: a })
1118
+ /* @__PURE__ */ o("span", { className: "ds-visually-hidden", children: r })
980
1119
  ]
981
1120
  }
982
1121
  ) });
983
1122
  }
984
- function He(e) {
1123
+ function qe(e) {
985
1124
  const t = /* @__PURE__ */ new Map();
986
1125
  for (const n of e) {
987
1126
  const s = n.group ?? "Componentes";
@@ -989,83 +1128,87 @@ function He(e) {
989
1128
  }
990
1129
  return [...t.entries()];
991
1130
  }
992
- function Z(e) {
1131
+ function ae(e) {
993
1132
  return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").trim();
994
1133
  }
995
- function Ke(e) {
1134
+ function Ye(e) {
996
1135
  const t = e.key.toLowerCase();
997
1136
  return (e.metaKey || e.ctrlKey) && !e.altKey && !e.shiftKey && (t === "k" || t === "f");
998
1137
  }
999
- function ze(e, t, n) {
1138
+ function Je(e, t, n) {
1000
1139
  if (e.length === 0) return;
1001
- const s = t ? e.indexOf(t) : -1, i = Math.max(0, Math.min(e.length - 1, s + n));
1002
- return e[i];
1140
+ const s = t ? e.indexOf(t) : -1, l = Math.max(0, Math.min(e.length - 1, s + n));
1141
+ return e[l];
1003
1142
  }
1004
- function Ue({
1143
+ function Qe({
1005
1144
  product: e,
1006
1145
  scenario: t,
1007
1146
  deploy: n,
1008
1147
  inspectorOpen: s,
1009
- chromeTheme: i,
1148
+ chromeTheme: l,
1149
+ view: r,
1010
1150
  onToggleInspector: a,
1011
- onToggleChromeTheme: r
1151
+ onToggleChromeTheme: c
1012
1152
  }) {
1013
- const c = M().topbar, [p, h] = T(!1), u = async () => {
1014
- const y = t ? de(t, {
1153
+ const h = P().topbar, [p, m] = $(!1), v = async () => {
1154
+ const x = t ? fe(t, {
1015
1155
  origin: n.origin,
1016
- overrides: i === "light" ? { chromeTheme: i } : void 0
1156
+ overrides: {
1157
+ ...l === "light" ? { chromeTheme: l } : {},
1158
+ ...r === "ported" ? { view: r } : {}
1159
+ }
1017
1160
  }) : `${n.origin}${window.location.pathname}${window.location.search}`;
1018
1161
  try {
1019
- await navigator.clipboard.writeText(y);
1162
+ await navigator.clipboard.writeText(x);
1020
1163
  } catch {
1021
- window.prompt(c.copyPrompt, y);
1164
+ window.prompt(h.copyPrompt, x);
1022
1165
  }
1023
- h(!0), window.setTimeout(() => h(!1), 1600);
1024
- }, m = Ge(
1166
+ m(!0), window.setTimeout(() => m(!1), 1600);
1167
+ }, i = Xe(
1025
1168
  typeof window > "u" ? `${n.origin}/` : window.location.href
1026
- ), N = Ve(n.origin, i);
1027
- return /* @__PURE__ */ d("header", { className: "ds-chrome ds-topbar", children: [
1028
- /* @__PURE__ */ d("div", { className: "ds-topbar__product", children: [
1169
+ ), N = Ze(n.origin, l, r);
1170
+ return /* @__PURE__ */ u("header", { className: "ds-chrome ds-topbar", children: [
1171
+ /* @__PURE__ */ u("div", { className: "ds-topbar__product", children: [
1029
1172
  /* @__PURE__ */ o(
1030
1173
  "a",
1031
1174
  {
1032
1175
  className: "ds-topbar__home",
1033
1176
  href: N,
1034
- "aria-label": c.homeTitle(e.name),
1035
- title: c.homeTitle(e.name),
1177
+ "aria-label": h.homeTitle(e.name),
1178
+ title: h.homeTitle(e.name),
1036
1179
  children: e.name
1037
1180
  }
1038
1181
  ),
1039
1182
  e.tagline && /* @__PURE__ */ o("span", { className: "ds-topbar__tagline", children: e.tagline })
1040
1183
  ] }),
1041
1184
  /* @__PURE__ */ o("div", { className: "ds-topbar__spacer" }),
1042
- /* @__PURE__ */ d("div", { className: "ds-topbar__meta", children: [
1043
- n.branch && /* @__PURE__ */ o("code", { title: c.branchTitle(n.branch), children: n.branch.length > 28 ? `${n.branch.slice(0, 27)}…` : n.branch }),
1044
- n.commit && /* @__PURE__ */ o("code", { title: c.commitTitle(n.commit), children: n.shortCommit }),
1045
- /* @__PURE__ */ o("code", { title: c.envTitle(n.env), children: n.env })
1185
+ /* @__PURE__ */ u("div", { className: "ds-topbar__meta", children: [
1186
+ n.branch && /* @__PURE__ */ o("code", { title: h.branchTitle(n.branch), children: n.branch.length > 28 ? `${n.branch.slice(0, 27)}…` : n.branch }),
1187
+ n.commit && /* @__PURE__ */ o("code", { title: h.commitTitle(n.commit), children: n.shortCommit }),
1188
+ /* @__PURE__ */ o("code", { title: h.envTitle(n.env), children: n.env })
1046
1189
  ] }),
1047
1190
  /* @__PURE__ */ o(
1048
1191
  "button",
1049
1192
  {
1050
1193
  type: "button",
1051
1194
  className: "ds-btn ds-btn--icon",
1052
- "aria-pressed": i === "light",
1053
- "aria-label": i === "dark" ? c.lightMode : c.darkMode,
1054
- title: i === "dark" ? c.lightMode : c.darkMode,
1055
- onClick: r,
1056
- children: /* @__PURE__ */ o(qe, { theme: i })
1195
+ "aria-pressed": l === "light",
1196
+ "aria-label": l === "dark" ? h.lightMode : h.darkMode,
1197
+ title: l === "dark" ? h.lightMode : h.darkMode,
1198
+ onClick: c,
1199
+ children: /* @__PURE__ */ o(et, { theme: l })
1057
1200
  }
1058
1201
  ),
1059
- /* @__PURE__ */ o("button", { type: "button", className: "ds-btn", onClick: u, children: p ? c.copied : c.copyLink }),
1202
+ /* @__PURE__ */ o("button", { type: "button", className: "ds-btn", onClick: v, children: p ? h.copied : h.copyLink }),
1060
1203
  /* @__PURE__ */ o(
1061
1204
  "a",
1062
1205
  {
1063
1206
  className: "ds-btn",
1064
- href: m,
1207
+ href: i,
1065
1208
  target: "_blank",
1066
1209
  rel: "noreferrer",
1067
- title: c.cleanReviewTitle,
1068
- children: c.cleanReview
1210
+ title: h.cleanReviewTitle,
1211
+ children: h.cleanReview
1069
1212
  }
1070
1213
  ),
1071
1214
  /* @__PURE__ */ o(
@@ -1075,20 +1218,20 @@ function Ue({
1075
1218
  className: "ds-btn",
1076
1219
  "aria-pressed": s,
1077
1220
  onClick: a,
1078
- children: c.panel
1221
+ children: h.panel
1079
1222
  }
1080
1223
  )
1081
1224
  ] });
1082
1225
  }
1083
- function Ge(e) {
1226
+ function Xe(e) {
1084
1227
  const t = new URL(e);
1085
- return t.searchParams.set(b.chrome, "0"), t.toString();
1228
+ return t.searchParams.set(g.chrome, "0"), t.toString();
1086
1229
  }
1087
- function Ve(e, t) {
1088
- const n = new URL("/", e);
1089
- return t === "light" && n.searchParams.set(b.chromeTheme, t), n.toString();
1230
+ function Ze(e, t, n = "active") {
1231
+ const s = new URL("/", e);
1232
+ return t === "light" && s.searchParams.set(g.chromeTheme, t), n === "ported" && s.searchParams.set(g.view, "ported"), s.toString();
1090
1233
  }
1091
- function qe({ theme: e }) {
1234
+ function et({ theme: e }) {
1092
1235
  const t = {
1093
1236
  width: 15,
1094
1237
  height: 15,
@@ -1100,57 +1243,77 @@ function qe({ theme: e }) {
1100
1243
  strokeLinejoin: "round",
1101
1244
  "aria-hidden": !0
1102
1245
  };
1103
- return e === "dark" ? /* @__PURE__ */ d("svg", { ...t, children: [
1246
+ return e === "dark" ? /* @__PURE__ */ u("svg", { ...t, children: [
1104
1247
  /* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "4" }),
1105
1248
  /* @__PURE__ */ o("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.42 1.42M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.42" })
1106
1249
  ] }) : /* @__PURE__ */ o("svg", { ...t, children: /* @__PURE__ */ o("path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z" }) });
1107
1250
  }
1108
- function Ye({ registry: e, controls: t, scenarioActive: n, onChange: s }) {
1109
- const i = M(), a = i.controls, { product: r } = e, c = r.dataSources?.adapters ?? [], p = r.theme?.modes ?? [], h = r.theme?.locales ?? [];
1110
- return /* @__PURE__ */ d("div", { className: "ds-chrome ds-controls", role: "group", "aria-label": a.region, children: [
1111
- n && /* @__PURE__ */ d("div", { className: "ds-field", children: [
1112
- /* @__PURE__ */ o("label", { htmlFor: "ds-persona", children: a.persona }),
1113
- /* @__PURE__ */ d(
1251
+ function tt({
1252
+ registry: e,
1253
+ controls: t,
1254
+ scenarioActive: n,
1255
+ component: s,
1256
+ componentFixture: l,
1257
+ onChange: r
1258
+ }) {
1259
+ const a = P(), c = a.controls, { product: h } = e, p = h.dataSources?.adapters ?? [], m = h.theme?.modes ?? [], v = h.theme?.locales ?? [];
1260
+ return /* @__PURE__ */ u("div", { className: "ds-chrome ds-controls", role: "group", "aria-label": c.region, children: [
1261
+ s?.fixtures?.length ? /* @__PURE__ */ u("div", { className: "ds-field", children: [
1262
+ /* @__PURE__ */ o("label", { htmlFor: "ds-component-fixture", children: c.componentFixture }),
1263
+ /* @__PURE__ */ o(
1264
+ "select",
1265
+ {
1266
+ id: "ds-component-fixture",
1267
+ className: "ds-select",
1268
+ value: l?.fixture?.id ?? "",
1269
+ onChange: (i) => r({ fixture: i.target.value || void 0 }),
1270
+ children: s.fixtures.map((i) => /* @__PURE__ */ o("option", { value: i.id, children: i.label }, i.id))
1271
+ }
1272
+ )
1273
+ ] }) : null,
1274
+ n && /* @__PURE__ */ u("div", { className: "ds-field", children: [
1275
+ /* @__PURE__ */ o("label", { htmlFor: "ds-persona", children: c.persona }),
1276
+ /* @__PURE__ */ u(
1114
1277
  "select",
1115
1278
  {
1116
1279
  id: "ds-persona",
1117
1280
  className: "ds-select",
1118
1281
  value: t.persona ?? "",
1119
- onChange: (u) => s({ persona: u.target.value || void 0 }),
1282
+ onChange: (i) => r({ persona: i.target.value || void 0 }),
1120
1283
  children: [
1121
- /* @__PURE__ */ o("option", { value: "", children: a.none }),
1122
- r.personas.map((u) => /* @__PURE__ */ o("option", { value: u.id, children: u.name }, u.id))
1284
+ /* @__PURE__ */ o("option", { value: "", children: c.none }),
1285
+ h.personas.map((i) => /* @__PURE__ */ o("option", { value: i.id, children: i.name }, i.id))
1123
1286
  ]
1124
1287
  }
1125
1288
  )
1126
1289
  ] }),
1127
- n && /* @__PURE__ */ d("div", { className: "ds-field", children: [
1128
- /* @__PURE__ */ o("span", { className: "ds-field__label", id: "ds-network-label", children: a.network }),
1129
- /* @__PURE__ */ o("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-network-label", children: ee.map((u) => /* @__PURE__ */ o(
1290
+ n && /* @__PURE__ */ u("div", { className: "ds-field", children: [
1291
+ /* @__PURE__ */ o("span", { className: "ds-field__label", id: "ds-network-label", children: c.network }),
1292
+ /* @__PURE__ */ o("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-network-label", children: se.map((i) => /* @__PURE__ */ o(
1130
1293
  "button",
1131
1294
  {
1132
1295
  type: "button",
1133
- "aria-pressed": t.network === u,
1134
- onClick: () => s({ network: u }),
1135
- children: i.network[u]
1296
+ "aria-pressed": t.network === i,
1297
+ onClick: () => r({ network: i }),
1298
+ children: a.network[i]
1136
1299
  },
1137
- u
1300
+ i
1138
1301
  )) })
1139
1302
  ] }),
1140
- /* @__PURE__ */ d("div", { className: "ds-field", children: [
1141
- /* @__PURE__ */ o("span", { className: "ds-field__label", id: "ds-viewport-label", children: a.viewport }),
1142
- /* @__PURE__ */ o("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-viewport-label", children: te.map((u) => /* @__PURE__ */ o(
1303
+ /* @__PURE__ */ u("div", { className: "ds-field", children: [
1304
+ /* @__PURE__ */ o("span", { className: "ds-field__label", id: "ds-viewport-label", children: c.viewport }),
1305
+ /* @__PURE__ */ o("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-viewport-label", children: ie.map((i) => /* @__PURE__ */ o(
1143
1306
  "button",
1144
1307
  {
1145
1308
  type: "button",
1146
1309
  className: "ds-icon-button",
1147
- "aria-pressed": t.viewport === u.id,
1148
- "aria-label": i.viewport[u.id] ?? u.label,
1149
- title: i.viewport[u.id] ?? u.label,
1150
- onClick: () => s({ viewport: u.id }),
1151
- children: /* @__PURE__ */ o(Je, { id: u.id })
1310
+ "aria-pressed": t.viewport === i.id,
1311
+ "aria-label": a.viewport[i.id] ?? i.label,
1312
+ title: a.viewport[i.id] ?? i.label,
1313
+ onClick: () => r({ viewport: i.id }),
1314
+ children: /* @__PURE__ */ o(ot, { id: i.id })
1152
1315
  },
1153
- u.id
1316
+ i.id
1154
1317
  )) }),
1155
1318
  t.viewport === "custom" && /* @__PURE__ */ o(
1156
1319
  "input",
@@ -1161,57 +1324,57 @@ function Ye({ registry: e, controls: t, scenarioActive: n, onChange: s }) {
1161
1324
  max: 3840,
1162
1325
  step: 10,
1163
1326
  style: { width: 88 },
1164
- "aria-label": a.customWidth,
1327
+ "aria-label": c.customWidth,
1165
1328
  value: t.customWidth ?? 1024,
1166
- onChange: (u) => s({ customWidth: Number(u.target.value) || void 0 })
1329
+ onChange: (i) => r({ customWidth: Number(i.target.value) || void 0 })
1167
1330
  }
1168
1331
  )
1169
1332
  ] }),
1170
- p.length > 1 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
1171
- /* @__PURE__ */ o("label", { htmlFor: "ds-theme", children: a.theme }),
1333
+ m.length > 1 && /* @__PURE__ */ u("div", { className: "ds-field", children: [
1334
+ /* @__PURE__ */ o("label", { htmlFor: "ds-theme", children: c.theme }),
1172
1335
  /* @__PURE__ */ o(
1173
1336
  "select",
1174
1337
  {
1175
1338
  id: "ds-theme",
1176
1339
  className: "ds-select",
1177
- value: t.themeMode ?? p[0],
1178
- onChange: (u) => s({ themeMode: u.target.value }),
1179
- children: p.map((u) => /* @__PURE__ */ o("option", { value: u, children: u }, u))
1340
+ value: t.themeMode ?? m[0],
1341
+ onChange: (i) => r({ themeMode: i.target.value }),
1342
+ children: m.map((i) => /* @__PURE__ */ o("option", { value: i, children: i }, i))
1180
1343
  }
1181
1344
  )
1182
1345
  ] }),
1183
- h.length > 1 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
1184
- /* @__PURE__ */ o("label", { htmlFor: "ds-locale", children: a.locale }),
1346
+ v.length > 1 && /* @__PURE__ */ u("div", { className: "ds-field", children: [
1347
+ /* @__PURE__ */ o("label", { htmlFor: "ds-locale", children: c.locale }),
1185
1348
  /* @__PURE__ */ o(
1186
1349
  "select",
1187
1350
  {
1188
1351
  id: "ds-locale",
1189
1352
  className: "ds-select",
1190
- value: t.locale ?? h[0],
1191
- onChange: (u) => s({ locale: u.target.value }),
1192
- children: h.map((u) => /* @__PURE__ */ o("option", { value: u, children: u }, u))
1353
+ value: t.locale ?? v[0],
1354
+ onChange: (i) => r({ locale: i.target.value }),
1355
+ children: v.map((i) => /* @__PURE__ */ o("option", { value: i, children: i }, i))
1193
1356
  }
1194
1357
  )
1195
1358
  ] }),
1196
- c.length > 0 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
1197
- /* @__PURE__ */ o("label", { htmlFor: "ds-source", children: a.dataSource }),
1198
- /* @__PURE__ */ d(
1359
+ n && p.length > 0 && /* @__PURE__ */ u("div", { className: "ds-field", children: [
1360
+ /* @__PURE__ */ o("label", { htmlFor: "ds-source", children: c.dataSource }),
1361
+ /* @__PURE__ */ u(
1199
1362
  "select",
1200
1363
  {
1201
1364
  id: "ds-source",
1202
1365
  className: "ds-select",
1203
1366
  value: t.dataSource ?? "fixtures",
1204
- onChange: (u) => s({ dataSource: u.target.value }),
1367
+ onChange: (i) => r({ dataSource: i.target.value }),
1205
1368
  children: [
1206
- /* @__PURE__ */ o("option", { value: "fixtures", children: a.fixturesOption }),
1207
- c.filter((u) => u.id !== "fixtures").map((u) => /* @__PURE__ */ o("option", { value: u.id, children: u.label }, u.id))
1369
+ /* @__PURE__ */ o("option", { value: "fixtures", children: c.fixturesOption }),
1370
+ p.filter((i) => i.id !== "fixtures").map((i) => /* @__PURE__ */ o("option", { value: i.id, children: i.label }, i.id))
1208
1371
  ]
1209
1372
  }
1210
1373
  )
1211
1374
  ] })
1212
1375
  ] });
1213
1376
  }
1214
- function Je({ id: e }) {
1377
+ function ot({ id: e }) {
1215
1378
  const t = {
1216
1379
  width: 16,
1217
1380
  height: 16,
@@ -1223,49 +1386,59 @@ function Je({ id: e }) {
1223
1386
  strokeLinejoin: "round",
1224
1387
  "aria-hidden": !0
1225
1388
  };
1226
- return e === "fit" ? /* @__PURE__ */ o("svg", { ...t, children: /* @__PURE__ */ o("path", { d: "M8 3H5a2 2 0 0 0-2 2v3M16 3h3a2 2 0 0 1 2 2v3M8 21H5a2 2 0 0 1-2-2v-3M16 21h3a2 2 0 0 0 2-2v-3" }) }) : e === "mobile" ? /* @__PURE__ */ d("svg", { ...t, children: [
1389
+ return e === "fit" ? /* @__PURE__ */ o("svg", { ...t, children: /* @__PURE__ */ o("path", { d: "M8 3H5a2 2 0 0 0-2 2v3M16 3h3a2 2 0 0 1 2 2v3M8 21H5a2 2 0 0 1-2-2v-3M16 21h3a2 2 0 0 0 2-2v-3" }) }) : e === "mobile" ? /* @__PURE__ */ u("svg", { ...t, children: [
1227
1390
  /* @__PURE__ */ o("rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2" }),
1228
1391
  /* @__PURE__ */ o("path", { d: "M12 18h.01" })
1229
- ] }) : e === "tablet" ? /* @__PURE__ */ d("svg", { ...t, children: [
1392
+ ] }) : e === "tablet" ? /* @__PURE__ */ u("svg", { ...t, children: [
1230
1393
  /* @__PURE__ */ o("rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", ry: "2" }),
1231
1394
  /* @__PURE__ */ o("path", { d: "M12 18h.01" })
1232
- ] }) : e === "desktop" ? /* @__PURE__ */ d("svg", { ...t, children: [
1395
+ ] }) : e === "desktop" ? /* @__PURE__ */ u("svg", { ...t, children: [
1233
1396
  /* @__PURE__ */ o("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
1234
1397
  /* @__PURE__ */ o("path", { d: "M8 21h8M12 17v4" })
1235
1398
  ] }) : /* @__PURE__ */ o("svg", { ...t, children: /* @__PURE__ */ o("path", { d: "M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7" }) });
1236
1399
  }
1237
- function Qe({
1400
+ function nt({
1238
1401
  registry: e,
1239
1402
  scenario: t,
1240
1403
  component: n,
1241
- controls: s,
1242
- focusedNode: i,
1404
+ componentFixture: s,
1405
+ controls: l,
1406
+ focusedNode: r,
1243
1407
  tabStopCount: a
1244
1408
  }) {
1245
- const r = M().inspector, [c, p] = T("scenario"), h = e.issues.filter((u) => u.level === "error").length;
1246
- return /* @__PURE__ */ d("aside", { className: "ds-chrome ds-inspector", "aria-label": r.region, children: [
1247
- /* @__PURE__ */ d("div", { className: "ds-inspector__tabs", role: "tablist", children: [
1248
- /* @__PURE__ */ o(U, { id: "scenario", current: c, onSelect: p, children: n ? r.componentReference : r.tabScenario }),
1249
- /* @__PURE__ */ o(U, { id: "a11y", current: c, onSelect: p, children: r.tabA11y }),
1250
- /* @__PURE__ */ o(U, { id: "diagnostics", current: c, onSelect: p, children: h > 0 ? r.diagnosticsWithErrors(h) : r.tabDiagnostics })
1409
+ const c = P().inspector, [h, p] = $("scenario"), m = e.issues.filter((v) => v.level === "error").length;
1410
+ return /* @__PURE__ */ u("aside", { className: "ds-chrome ds-inspector", "aria-label": c.region, children: [
1411
+ /* @__PURE__ */ u("div", { className: "ds-inspector__tabs", role: "tablist", children: [
1412
+ /* @__PURE__ */ o(J, { id: "scenario", current: h, onSelect: p, children: n ? c.componentReference : c.tabScenario }),
1413
+ /* @__PURE__ */ o(J, { id: "a11y", current: h, onSelect: p, children: c.tabA11y }),
1414
+ /* @__PURE__ */ o(J, { id: "diagnostics", current: h, onSelect: p, children: m > 0 ? c.diagnosticsWithErrors(m) : c.tabDiagnostics })
1251
1415
  ] }),
1252
- /* @__PURE__ */ d("div", { className: "ds-inspector__body", role: "tabpanel", children: [
1253
- c === "scenario" && /* @__PURE__ */ o(Xe, { registry: e, scenario: t, component: n, controls: s }),
1254
- c === "a11y" && /* @__PURE__ */ o(
1255
- Ze,
1416
+ /* @__PURE__ */ u("div", { className: "ds-inspector__body", role: "tabpanel", children: [
1417
+ h === "scenario" && /* @__PURE__ */ o(
1418
+ rt,
1256
1419
  {
1257
1420
  registry: e,
1258
1421
  scenario: t,
1259
- focusedNode: i,
1260
- keyboardMode: s.keyboardMode,
1422
+ component: n,
1423
+ componentFixture: s,
1424
+ controls: l
1425
+ }
1426
+ ),
1427
+ h === "a11y" && /* @__PURE__ */ o(
1428
+ at,
1429
+ {
1430
+ registry: e,
1431
+ scenario: t,
1432
+ focusedNode: r,
1433
+ keyboardMode: l.keyboardMode,
1261
1434
  tabStopCount: a
1262
1435
  }
1263
1436
  ),
1264
- c === "diagnostics" && /* @__PURE__ */ o(et, { registry: e })
1437
+ h === "diagnostics" && /* @__PURE__ */ o(st, { registry: e })
1265
1438
  ] })
1266
1439
  ] });
1267
1440
  }
1268
- function U({
1441
+ function J({
1269
1442
  id: e,
1270
1443
  current: t,
1271
1444
  onSelect: n,
@@ -1282,156 +1455,173 @@ function U({
1282
1455
  }
1283
1456
  );
1284
1457
  }
1285
- function Xe({
1458
+ function rt({
1286
1459
  registry: e,
1287
1460
  scenario: t,
1288
1461
  component: n,
1289
- controls: s
1462
+ componentFixture: s,
1463
+ controls: l
1290
1464
  }) {
1291
- const i = M(), a = i.inspector;
1465
+ const r = P(), a = r.inspector;
1292
1466
  if (!t)
1293
- return n ? /* @__PURE__ */ d("div", { className: "ds-block", children: [
1467
+ return n ? /* @__PURE__ */ u("div", { className: "ds-block", children: [
1294
1468
  /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.componentReference }),
1295
1469
  /* @__PURE__ */ o("p", { style: { color: "var(--ds-fg)", fontSize: 15, fontWeight: 600 }, children: n.name }),
1296
1470
  n.description && /* @__PURE__ */ o("p", { children: n.description }),
1297
- /* @__PURE__ */ d("dl", { className: "ds-kv", style: { marginTop: 14 }, children: [
1471
+ /* @__PURE__ */ u("dl", { className: "ds-kv", style: { marginTop: 14 }, children: [
1298
1472
  /* @__PURE__ */ o("dt", { children: a.id }),
1299
1473
  /* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: n.id }),
1300
- n.group && /* @__PURE__ */ d(A, { children: [
1474
+ n.group && /* @__PURE__ */ u(A, { children: [
1301
1475
  /* @__PURE__ */ o("dt", { children: a.componentGroup }),
1302
1476
  /* @__PURE__ */ o("dd", { children: n.group })
1477
+ ] }),
1478
+ s?.fixture && /* @__PURE__ */ u(A, { children: [
1479
+ /* @__PURE__ */ o("dt", { children: a.componentFixture }),
1480
+ /* @__PURE__ */ u("dd", { children: [
1481
+ s.fixture.label,
1482
+ " ",
1483
+ /* @__PURE__ */ o("code", { children: s.fixture.id })
1484
+ ] }),
1485
+ s.fixture.description && /* @__PURE__ */ u(A, { children: [
1486
+ /* @__PURE__ */ o("dt", { children: a.componentFixtureDescription }),
1487
+ /* @__PURE__ */ o("dd", { children: s.fixture.description })
1488
+ ] })
1303
1489
  ] })
1304
- ] })
1490
+ ] }),
1491
+ s?.didFallback && s.fixture && /* @__PURE__ */ o("p", { className: "ds-note", "data-tone": "warn", children: a.componentFixtureFallback(
1492
+ s.requestedId ?? "",
1493
+ s.fixture.id
1494
+ ) })
1305
1495
  ] }) : /* @__PURE__ */ o("p", { className: "ds-block", children: a.noScenario });
1306
- const r = e.persona(s.persona ?? t.persona), c = s.persona ? e.persona(s.persona)?.permissions ?? [] : e.permissionsOf(t), p = e.rulesOf(t), h = e.fixture(s.fixture ?? t.fixture), u = !!(s.persona && s.persona !== t.persona);
1307
- return /* @__PURE__ */ d(A, { children: [
1308
- /* @__PURE__ */ d("div", { className: "ds-block", children: [
1496
+ const c = e.persona(l.persona ?? t.persona), h = l.persona ? e.persona(l.persona)?.permissions ?? [] : e.permissionsOf(t), p = e.rulesOf(t), m = e.fixture(l.fixture ?? t.fixture), v = !!(l.persona && l.persona !== t.persona);
1497
+ return /* @__PURE__ */ u(A, { children: [
1498
+ /* @__PURE__ */ u("div", { className: "ds-block", children: [
1309
1499
  /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.situation }),
1310
1500
  /* @__PURE__ */ o("p", { style: { color: "var(--ds-fg)", fontSize: 14, fontWeight: 600 }, children: t.title }),
1311
1501
  t.intent && /* @__PURE__ */ o("p", { children: t.intent }),
1312
- /* @__PURE__ */ d("div", { className: "ds-chips", children: [
1313
- /* @__PURE__ */ o("span", { className: "ds-chip", "data-tone": ot(t.status), children: i.status[t.status] }),
1314
- (t.tags ?? []).map((m) => /* @__PURE__ */ o("span", { className: "ds-chip", children: m }, m))
1502
+ /* @__PURE__ */ u("div", { className: "ds-chips", children: [
1503
+ /* @__PURE__ */ o("span", { className: "ds-chip", "data-tone": ct(t.status), children: r.status[t.status] }),
1504
+ (t.tags ?? []).map((i) => /* @__PURE__ */ o("span", { className: "ds-chip", children: i }, i))
1315
1505
  ] }),
1316
- /* @__PURE__ */ o("p", { style: { marginTop: 6 }, children: i.statusMeaning[t.status] })
1506
+ /* @__PURE__ */ o("p", { style: { marginTop: 6 }, children: r.statusMeaning[t.status] })
1317
1507
  ] }),
1318
- /* @__PURE__ */ d("div", { className: "ds-block", children: [
1508
+ /* @__PURE__ */ u("div", { className: "ds-block", children: [
1319
1509
  /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.reproduction }),
1320
- /* @__PURE__ */ d("dl", { className: "ds-kv", children: [
1510
+ /* @__PURE__ */ u("dl", { className: "ds-kv", children: [
1321
1511
  /* @__PURE__ */ o("dt", { children: a.id }),
1322
1512
  /* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: t.id }),
1323
1513
  /* @__PURE__ */ o("dt", { children: a.route }),
1324
1514
  /* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: t.route }),
1325
1515
  /* @__PURE__ */ o("dt", { children: a.persona }),
1326
- /* @__PURE__ */ d("dd", { children: [
1327
- r?.name ?? "—",
1328
- u && /* @__PURE__ */ o("span", { className: "ds-chip", "data-tone": "warn", style: { marginLeft: 6 }, children: a.personaSwapped })
1516
+ /* @__PURE__ */ u("dd", { children: [
1517
+ c?.name ?? "—",
1518
+ v && /* @__PURE__ */ o("span", { className: "ds-chip", "data-tone": "warn", style: { marginLeft: 6 }, children: a.personaSwapped })
1329
1519
  ] }),
1330
1520
  /* @__PURE__ */ o("dt", { children: a.data }),
1331
- /* @__PURE__ */ o("dd", { children: h?.label ?? "—" }),
1521
+ /* @__PURE__ */ o("dd", { children: m?.label ?? "—" }),
1332
1522
  /* @__PURE__ */ o("dt", { children: a.network }),
1333
- /* @__PURE__ */ o("dd", { children: i.network[s.network] })
1523
+ /* @__PURE__ */ o("dd", { children: r.network[l.network] })
1334
1524
  ] }),
1335
- r?.goal && /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: a.goal(r.goal) })
1525
+ c?.goal && /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: a.goal(c.goal) })
1336
1526
  ] }),
1337
- c.length > 0 && /* @__PURE__ */ d("div", { className: "ds-block", children: [
1527
+ h.length > 0 && /* @__PURE__ */ u("div", { className: "ds-block", children: [
1338
1528
  /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.permissions }),
1339
- /* @__PURE__ */ o("div", { className: "ds-chips", children: c.map((m) => /* @__PURE__ */ o("span", { className: "ds-chip", children: m }, m)) })
1529
+ /* @__PURE__ */ o("div", { className: "ds-chips", children: h.map((i) => /* @__PURE__ */ o("span", { className: "ds-chip", children: i }, i)) })
1340
1530
  ] }),
1341
- t.preconditions?.length ? /* @__PURE__ */ d("div", { className: "ds-block", children: [
1531
+ t.preconditions?.length ? /* @__PURE__ */ u("div", { className: "ds-block", children: [
1342
1532
  /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.preconditions }),
1343
- /* @__PURE__ */ o("ul", { className: "ds-list", children: t.preconditions.map((m) => /* @__PURE__ */ o("li", { children: m }, m)) })
1533
+ /* @__PURE__ */ o("ul", { className: "ds-list", children: t.preconditions.map((i) => /* @__PURE__ */ o("li", { children: i }, i)) })
1344
1534
  ] }) : null,
1345
- p.length > 0 && /* @__PURE__ */ d("div", { className: "ds-block", children: [
1535
+ p.length > 0 && /* @__PURE__ */ u("div", { className: "ds-block", children: [
1346
1536
  /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.rules }),
1347
- p.map((m) => /* @__PURE__ */ d("div", { className: "ds-rule", children: [
1348
- /* @__PURE__ */ o("span", { className: "ds-rule__id", children: m.id }),
1349
- /* @__PURE__ */ o("span", { className: "ds-rule__statement", children: m.statement }),
1350
- m.rationale && /* @__PURE__ */ o("p", { className: "ds-rule__rationale", children: m.rationale })
1351
- ] }, m.id))
1537
+ p.map((i) => /* @__PURE__ */ u("div", { className: "ds-rule", children: [
1538
+ /* @__PURE__ */ o("span", { className: "ds-rule__id", children: i.id }),
1539
+ /* @__PURE__ */ o("span", { className: "ds-rule__statement", children: i.statement }),
1540
+ i.rationale && /* @__PURE__ */ o("p", { className: "ds-rule__rationale", children: i.rationale })
1541
+ ] }, i.id))
1352
1542
  ] }),
1353
- t.actions?.length ? /* @__PURE__ */ d("div", { className: "ds-block", children: [
1543
+ t.actions?.length ? /* @__PURE__ */ u("div", { className: "ds-block", children: [
1354
1544
  /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.actions }),
1355
- /* @__PURE__ */ o("ul", { className: "ds-list", children: t.actions.map((m) => /* @__PURE__ */ o("li", { children: m }, m)) })
1545
+ /* @__PURE__ */ o("ul", { className: "ds-list", children: t.actions.map((i) => /* @__PURE__ */ o("li", { children: i }, i)) })
1356
1546
  ] }) : null,
1357
- t.expected?.length ? /* @__PURE__ */ d("div", { className: "ds-block", children: [
1547
+ t.expected?.length ? /* @__PURE__ */ u("div", { className: "ds-block", children: [
1358
1548
  /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.expected }),
1359
- /* @__PURE__ */ o("ul", { className: "ds-list", children: t.expected.map((m) => /* @__PURE__ */ o("li", { children: m }, m)) })
1549
+ /* @__PURE__ */ o("ul", { className: "ds-list", children: t.expected.map((i) => /* @__PURE__ */ o("li", { children: i }, i)) })
1360
1550
  ] }) : null,
1361
- t.approvedAt && /* @__PURE__ */ d("div", { className: "ds-block", children: [
1551
+ t.approvedAt && /* @__PURE__ */ u("div", { className: "ds-block", children: [
1362
1552
  /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.approval }),
1363
- /* @__PURE__ */ d("p", { children: [
1553
+ /* @__PURE__ */ u("p", { children: [
1364
1554
  t.approvedAt.date,
1365
1555
  " · ",
1366
1556
  /* @__PURE__ */ o("code", { children: t.approvedAt.commit.slice(0, 7) })
1367
1557
  ] }),
1368
1558
  /* @__PURE__ */ o("a", { href: t.approvedAt.url, target: "_blank", rel: "noreferrer", children: a.openApproved })
1369
1559
  ] }),
1370
- t.ticket && /* @__PURE__ */ d("div", { className: "ds-block", children: [
1560
+ t.ticket && /* @__PURE__ */ u("div", { className: "ds-block", children: [
1371
1561
  /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.engineering }),
1372
1562
  /* @__PURE__ */ o("p", { children: t.ticket })
1373
1563
  ] })
1374
1564
  ] });
1375
1565
  }
1376
- function Ze({
1566
+ function at({
1377
1567
  registry: e,
1378
1568
  scenario: t,
1379
1569
  focusedNode: n,
1380
1570
  keyboardMode: s,
1381
- tabStopCount: i
1571
+ tabStopCount: l
1382
1572
  }) {
1383
- const a = M(), r = a.inspector, c = le(e.product.theme?.contrastPairs), p = c.filter((h) => h.passes !== !0);
1384
- return /* @__PURE__ */ d(A, { children: [
1385
- t && /* @__PURE__ */ d("div", { className: "ds-block", children: [
1386
- /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.a11yContract }),
1387
- /* @__PURE__ */ d("dl", { className: "ds-kv", children: [
1388
- /* @__PURE__ */ o("dt", { children: r.keyboard }),
1389
- /* @__PURE__ */ o("dd", { children: a.keyboard[t.a11y.keyboard] }),
1390
- /* @__PURE__ */ o("dt", { children: r.contrast }),
1391
- /* @__PURE__ */ o("dd", { children: r.contrastTarget(t.a11y.contrast) })
1573
+ const r = P(), a = r.inspector, c = be(e.product.theme?.contrastPairs), h = c.filter((p) => p.passes !== !0);
1574
+ return /* @__PURE__ */ u(A, { children: [
1575
+ t && /* @__PURE__ */ u("div", { className: "ds-block", children: [
1576
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.a11yContract }),
1577
+ /* @__PURE__ */ u("dl", { className: "ds-kv", children: [
1578
+ /* @__PURE__ */ o("dt", { children: a.keyboard }),
1579
+ /* @__PURE__ */ o("dd", { children: r.keyboard[t.a11y.keyboard] }),
1580
+ /* @__PURE__ */ o("dt", { children: a.contrast }),
1581
+ /* @__PURE__ */ o("dd", { children: a.contrastTarget(t.a11y.contrast) })
1392
1582
  ] }),
1393
- t.a11y.announces?.length ? /* @__PURE__ */ d(A, { children: [
1394
- /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: r.announces }),
1395
- /* @__PURE__ */ o("div", { className: "ds-chips", children: t.a11y.announces.map((h) => /* @__PURE__ */ o("span", { className: "ds-chip", children: h }, h)) })
1583
+ t.a11y.announces?.length ? /* @__PURE__ */ u(A, { children: [
1584
+ /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: a.announces }),
1585
+ /* @__PURE__ */ o("div", { className: "ds-chips", children: t.a11y.announces.map((p) => /* @__PURE__ */ o("span", { className: "ds-chip", children: p }, p)) })
1396
1586
  ] }) : null,
1397
1587
  t.a11y.notes && /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: t.a11y.notes })
1398
1588
  ] }),
1399
- /* @__PURE__ */ d("div", { className: "ds-block", children: [
1400
- /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.focusedElement }),
1401
- s ? n ? /* @__PURE__ */ d(A, { children: [
1402
- /* @__PURE__ */ d("dl", { className: "ds-kv", children: [
1403
- /* @__PURE__ */ o("dt", { children: r.role }),
1589
+ /* @__PURE__ */ u("div", { className: "ds-block", children: [
1590
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.focusedElement }),
1591
+ s ? n ? /* @__PURE__ */ u(A, { children: [
1592
+ /* @__PURE__ */ u("dl", { className: "ds-kv", children: [
1593
+ /* @__PURE__ */ o("dt", { children: a.role }),
1404
1594
  /* @__PURE__ */ o("dd", { children: n.role }),
1405
- /* @__PURE__ */ o("dt", { children: r.name }),
1406
- /* @__PURE__ */ o("dd", { children: n.name ? n.name : /* @__PURE__ */ o("span", { style: { color: "var(--ds-err)" }, children: r.noAccessibleName }) }),
1407
- /* @__PURE__ */ o("dt", { children: r.nameFrom }),
1595
+ /* @__PURE__ */ o("dt", { children: a.name }),
1596
+ /* @__PURE__ */ o("dd", { children: n.name ? n.name : /* @__PURE__ */ o("span", { style: { color: "var(--ds-err)" }, children: a.noAccessibleName }) }),
1597
+ /* @__PURE__ */ o("dt", { children: a.nameFrom }),
1408
1598
  /* @__PURE__ */ o("dd", { children: n.nameFrom }),
1409
- n.description ? /* @__PURE__ */ d(A, { children: [
1410
- /* @__PURE__ */ o("dt", { children: r.description }),
1599
+ n.description ? /* @__PURE__ */ u(A, { children: [
1600
+ /* @__PURE__ */ o("dt", { children: a.description }),
1411
1601
  /* @__PURE__ */ o("dd", { children: n.description })
1412
1602
  ] }) : null,
1413
- /* @__PURE__ */ o("dt", { children: r.selector }),
1603
+ /* @__PURE__ */ o("dt", { children: a.selector }),
1414
1604
  /* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: n.selector })
1415
1605
  ] }),
1416
- n.states.length > 0 && /* @__PURE__ */ o("div", { className: "ds-chips", style: { marginTop: 8 }, children: n.states.map((h) => /* @__PURE__ */ o("span", { className: "ds-chip", children: h }, h)) }),
1417
- n.hiddenFromAssistiveTech && /* @__PURE__ */ o("p", { className: "ds-note", style: { marginTop: 8 }, children: r.focusableButHidden }),
1418
- /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: r.tabStopsInStage(i) })
1419
- ] }) : /* @__PURE__ */ o("p", { children: r.pressTab(i) }) : /* @__PURE__ */ o("p", { children: r.keyboardModeOff })
1606
+ n.states.length > 0 && /* @__PURE__ */ o("div", { className: "ds-chips", style: { marginTop: 8 }, children: n.states.map((p) => /* @__PURE__ */ o("span", { className: "ds-chip", children: p }, p)) }),
1607
+ n.hiddenFromAssistiveTech && /* @__PURE__ */ o("p", { className: "ds-note", style: { marginTop: 8 }, children: a.focusableButHidden }),
1608
+ /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: a.tabStopsInStage(l) })
1609
+ ] }) : /* @__PURE__ */ o("p", { children: a.pressTab(l) }) : /* @__PURE__ */ o("p", { children: a.keyboardModeOff })
1420
1610
  ] }),
1421
- /* @__PURE__ */ d("div", { className: "ds-block", children: [
1422
- /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.tokenContrast }),
1423
- c.length === 0 ? /* @__PURE__ */ o("p", { children: r.noContrastPairs }) : /* @__PURE__ */ d("table", { className: "ds-contrast", children: [
1424
- /* @__PURE__ */ o("thead", { children: /* @__PURE__ */ d("tr", { children: [
1425
- /* @__PURE__ */ o("th", { scope: "col", children: r.pair }),
1426
- /* @__PURE__ */ o("th", { scope: "col", children: r.ratio })
1611
+ /* @__PURE__ */ u("div", { className: "ds-block", children: [
1612
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.tokenContrast }),
1613
+ c.length === 0 ? /* @__PURE__ */ o("p", { children: a.noContrastPairs }) : /* @__PURE__ */ u("table", { className: "ds-contrast", children: [
1614
+ /* @__PURE__ */ o("thead", { children: /* @__PURE__ */ u("tr", { children: [
1615
+ /* @__PURE__ */ o("th", { scope: "col", children: a.pair }),
1616
+ /* @__PURE__ */ o("th", { scope: "col", children: a.ratio })
1427
1617
  ] }) }),
1428
- /* @__PURE__ */ o("tbody", { children: c.map((h) => /* @__PURE__ */ d("tr", { children: [
1429
- /* @__PURE__ */ d("td", { children: [
1618
+ /* @__PURE__ */ o("tbody", { children: c.map((p) => /* @__PURE__ */ u("tr", { children: [
1619
+ /* @__PURE__ */ u("td", { children: [
1430
1620
  /* @__PURE__ */ o(
1431
1621
  "span",
1432
1622
  {
1433
1623
  className: "ds-swatch",
1434
- style: { background: h.pair.background },
1624
+ style: { background: p.pair.background },
1435
1625
  "aria-hidden": "true"
1436
1626
  }
1437
1627
  ),
@@ -1439,49 +1629,49 @@ function Ze({
1439
1629
  "span",
1440
1630
  {
1441
1631
  className: "ds-swatch",
1442
- style: { background: h.pair.foreground },
1632
+ style: { background: p.pair.foreground },
1443
1633
  "aria-hidden": "true"
1444
1634
  }
1445
1635
  ),
1446
- h.pair.name
1636
+ p.pair.name
1447
1637
  ] }),
1448
1638
  /* @__PURE__ */ o(
1449
1639
  "td",
1450
1640
  {
1451
1641
  style: {
1452
- color: h.passes === !0 ? "var(--ds-ok)" : h.passes === !1 ? "var(--ds-err)" : "var(--ds-warn)"
1642
+ color: p.passes === !0 ? "var(--ds-ok)" : p.passes === !1 ? "var(--ds-err)" : "var(--ds-warn)"
1453
1643
  },
1454
- children: h.label
1644
+ children: p.label
1455
1645
  }
1456
1646
  )
1457
- ] }, h.pair.name)) })
1647
+ ] }, p.pair.name)) })
1458
1648
  ] }),
1459
- p.length > 0 && /* @__PURE__ */ o("p", { className: "ds-note", style: { marginTop: 8 }, children: r.pairsFailing(p.length) })
1649
+ h.length > 0 && /* @__PURE__ */ o("p", { className: "ds-note", style: { marginTop: 8 }, children: a.pairsFailing(h.length) })
1460
1650
  ] }),
1461
- /* @__PURE__ */ o("p", { className: "ds-note", children: r.automatedIsFloor })
1651
+ /* @__PURE__ */ o("p", { className: "ds-note", children: a.automatedIsFloor })
1462
1652
  ] });
1463
1653
  }
1464
- function et({ registry: e }) {
1465
- const t = M(), n = t.inspector, s = e.coverage(), { issues: i } = e;
1466
- return /* @__PURE__ */ d(A, { children: [
1467
- /* @__PURE__ */ d("div", { className: "ds-block", children: [
1654
+ function st({ registry: e }) {
1655
+ const t = P(), n = t.inspector, s = e.coverage({ includePorted: !0 }), { issues: l } = e;
1656
+ return /* @__PURE__ */ u(A, { children: [
1657
+ /* @__PURE__ */ u("div", { className: "ds-block", children: [
1468
1658
  /* @__PURE__ */ o("h2", { className: "ds-block__title", children: n.coverage }),
1469
- /* @__PURE__ */ o("dl", { className: "ds-kv", children: Object.entries(s).filter(([, a]) => a > 0).map(([a, r]) => /* @__PURE__ */ d("div", { style: { display: "contents" }, children: [
1470
- /* @__PURE__ */ o("dt", { children: t.status[a] }),
1471
- /* @__PURE__ */ o("dd", { style: { fontVariantNumeric: "tabular-nums" }, children: r })
1472
- ] }, a)) }),
1659
+ /* @__PURE__ */ o("dl", { className: "ds-kv", children: Object.entries(s).filter(([, r]) => r > 0).map(([r, a]) => /* @__PURE__ */ u("div", { style: { display: "contents" }, children: [
1660
+ /* @__PURE__ */ o("dt", { children: t.status[r] }),
1661
+ /* @__PURE__ */ o("dd", { style: { fontVariantNumeric: "tabular-nums" }, children: a })
1662
+ ] }, r)) }),
1473
1663
  /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: n.scenariosRegistered(e.product.scenarios.length) })
1474
1664
  ] }),
1475
- /* @__PURE__ */ d("div", { className: "ds-block", children: [
1665
+ /* @__PURE__ */ u("div", { className: "ds-block", children: [
1476
1666
  /* @__PURE__ */ o("h2", { className: "ds-block__title", children: n.scenarioContract }),
1477
- i.length === 0 ? /* @__PURE__ */ o("p", { children: n.noIssues }) : i.map((a, r) => /* @__PURE__ */ d("div", { className: "ds-issue", "data-level": a.level, children: [
1478
- /* @__PURE__ */ o("span", { className: "ds-issue__where", children: a.where }),
1479
- a.message
1480
- ] }, `${a.where}-${r}`))
1667
+ l.length === 0 ? /* @__PURE__ */ o("p", { children: n.noIssues }) : l.map((r, a) => /* @__PURE__ */ u("div", { className: "ds-issue", "data-level": r.level, children: [
1668
+ /* @__PURE__ */ o("span", { className: "ds-issue__where", children: r.where }),
1669
+ r.message
1670
+ ] }, `${r.where}-${a}`))
1481
1671
  ] })
1482
1672
  ] });
1483
1673
  }
1484
- const tt = {
1674
+ const it = {
1485
1675
  ported: void 0,
1486
1676
  proposed: "warn",
1487
1677
  "in-review": "warn",
@@ -1490,17 +1680,17 @@ const tt = {
1490
1680
  implemented: "ok",
1491
1681
  superseded: void 0
1492
1682
  };
1493
- function ot(e) {
1494
- return tt[e];
1683
+ function ct(e) {
1684
+ return it[e];
1495
1685
  }
1496
- const nt = se(function({ viewport: t, textScale: n, reducedMotion: s, keyboardMode: i, children: a }, r) {
1686
+ const dt = he(function({ viewport: t, textScale: n, reducedMotion: s, keyboardMode: l, children: r }, a) {
1497
1687
  return /* @__PURE__ */ o("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ o(
1498
1688
  "div",
1499
1689
  {
1500
- ref: r,
1690
+ ref: a,
1501
1691
  className: "ds-stage",
1502
1692
  "data-viewport": t.id,
1503
- "data-keyboard-mode": i,
1693
+ "data-keyboard-mode": l,
1504
1694
  "data-reduced-motion": s,
1505
1695
  style: {
1506
1696
  width: t.width ? `${t.width}px` : "100%",
@@ -1510,11 +1700,11 @@ const nt = se(function({ viewport: t, textScale: n, reducedMotion: s, keyboardMo
1510
1700
  // texto grande e só dar zoom na captura de tela.
1511
1701
  fontSize: n === 1 ? void 0 : `${n * 100}%`
1512
1702
  },
1513
- children: a
1703
+ children: r
1514
1704
  }
1515
1705
  ) });
1516
1706
  });
1517
- function at({ stops: e }) {
1707
+ function lt({ stops: e }) {
1518
1708
  return e.length === 0 ? null : /* @__PURE__ */ o("div", { className: "ds-chrome ds-taborder", "aria-hidden": "true", children: e.map((t) => /* @__PURE__ */ o(
1519
1709
  "span",
1520
1710
  {
@@ -1526,42 +1716,80 @@ function at({ stops: e }) {
1526
1716
  `${t.index}-${t.rect.top}-${t.rect.left}`
1527
1717
  )) });
1528
1718
  }
1529
- function rt({ title: e, children: t }) {
1530
- return /* @__PURE__ */ d("div", { className: "ds-chrome ds-stage-empty", children: [
1719
+ function ut({ title: e, children: t }) {
1720
+ return /* @__PURE__ */ u("div", { className: "ds-chrome ds-stage-empty", children: [
1531
1721
  /* @__PURE__ */ o("h2", { children: e }),
1532
1722
  t
1533
1723
  ] });
1534
1724
  }
1535
- function st({ registry: e, onOpenScenario: t }) {
1536
- const n = M(), { product: s } = e, i = e.coverage(), a = s.scenarios.length;
1537
- return /* @__PURE__ */ d("div", { className: "ds-chrome ds-home", children: [
1538
- /* @__PURE__ */ d("header", { className: "ds-home__header", children: [
1539
- /* @__PURE__ */ o("h1", { children: s.name }),
1540
- s.tagline && /* @__PURE__ */ o("p", { className: "ds-home__tagline", children: s.tagline }),
1541
- /* @__PURE__ */ o("p", { className: "ds-home__lead", children: n.home.lead(a) }),
1542
- /* @__PURE__ */ o("div", { className: "ds-chips", children: Object.entries(i).filter(([, r]) => r > 0).map(([r, c]) => /* @__PURE__ */ d("span", { className: "ds-chip", children: [
1543
- n.status[r],
1725
+ function ht({
1726
+ registry: e,
1727
+ onOpenScenario: t,
1728
+ view: n,
1729
+ onViewChange: s,
1730
+ showPorted: l = !1
1731
+ }) {
1732
+ const r = P(), { product: a } = e, c = n ?? (l ? "ported" : "active"), h = { view: c }, p = e.coverage(h), m = e.activeScenarios(h).length, v = e.treeFor(h).filter((S) => S.scenarios.length > 0), i = e.orphansFor(h), N = e.byStatus("ported").length, x = c === "ported" ? r.sidebar.portedReferences(N) : r.sidebar.activeWork;
1733
+ return /* @__PURE__ */ u("div", { className: "ds-chrome ds-home", children: [
1734
+ /* @__PURE__ */ u("header", { className: "ds-home__header", children: [
1735
+ /* @__PURE__ */ o("p", { className: "ds-home__view", "aria-live": "polite", children: x }),
1736
+ /* @__PURE__ */ o("h1", { children: a.name }),
1737
+ a.tagline && /* @__PURE__ */ o("p", { className: "ds-home__tagline", children: a.tagline }),
1738
+ /* @__PURE__ */ o("p", { className: "ds-home__lead", children: r.home.lead(m) }),
1739
+ /* @__PURE__ */ o("div", { className: "ds-chips", children: Object.entries(p).filter(([, S]) => S > 0).map(([S, d]) => /* @__PURE__ */ u("span", { className: "ds-chip", children: [
1740
+ r.status[S],
1544
1741
  ": ",
1545
- c
1546
- ] }, r)) })
1742
+ d
1743
+ ] }, S)) }),
1744
+ m > 0 && c === "active" && N > 0 && /* @__PURE__ */ o(
1745
+ "button",
1746
+ {
1747
+ type: "button",
1748
+ className: "ds-text-action ds-home__view-action",
1749
+ onClick: () => s?.("ported"),
1750
+ children: r.sidebar.viewPorted(N)
1751
+ }
1752
+ ),
1753
+ c === "ported" && /* @__PURE__ */ o(
1754
+ "button",
1755
+ {
1756
+ type: "button",
1757
+ className: "ds-text-action ds-home__view-action",
1758
+ onClick: () => s?.("active"),
1759
+ children: r.sidebar.backToActive
1760
+ }
1761
+ )
1762
+ ] }),
1763
+ m === 0 && /* @__PURE__ */ u("section", { className: "ds-home__empty", "aria-label": r.sidebar.currentView(x), children: [
1764
+ /* @__PURE__ */ o("p", { children: c === "ported" ? r.home.noPortedReferences : r.home.noActiveWork }),
1765
+ c === "active" && N > 0 && /* @__PURE__ */ o(
1766
+ "button",
1767
+ {
1768
+ type: "button",
1769
+ className: "ds-text-action",
1770
+ onClick: () => s?.("ported"),
1771
+ children: r.sidebar.viewPorted(N)
1772
+ }
1773
+ )
1547
1774
  ] }),
1548
- e.tree.map(({ module: r, scenarios: c }) => /* @__PURE__ */ o(
1549
- it,
1775
+ v.map(({ module: S, scenarios: d }) => /* @__PURE__ */ o(
1776
+ pt,
1550
1777
  {
1551
- module: r,
1552
- scenarios: c,
1778
+ module: S,
1779
+ scenarios: d,
1553
1780
  registry: e,
1781
+ view: c,
1554
1782
  onOpenScenario: t
1555
1783
  },
1556
- r.id
1784
+ S.id
1557
1785
  )),
1558
- e.orphans.length > 0 && /* @__PURE__ */ d("section", { className: "ds-home__module", children: [
1559
- /* @__PURE__ */ o("h2", { children: n.home.withoutModule }),
1560
- /* @__PURE__ */ o("p", { className: "ds-home__hint", children: n.home.withoutModuleHint }),
1786
+ i.length > 0 && /* @__PURE__ */ u("section", { className: "ds-home__module", children: [
1787
+ /* @__PURE__ */ o("h2", { children: r.home.withoutModule }),
1788
+ /* @__PURE__ */ o("p", { className: "ds-home__hint", children: r.home.withoutModuleHint }),
1561
1789
  /* @__PURE__ */ o(
1562
- ne,
1790
+ de,
1563
1791
  {
1564
- scenarios: e.orphans,
1792
+ scenarios: i,
1565
1793
  registry: e,
1566
1794
  onOpenScenario: t
1567
1795
  }
@@ -1569,205 +1797,265 @@ function st({ registry: e, onOpenScenario: t }) {
1569
1797
  ] })
1570
1798
  ] });
1571
1799
  }
1572
- function it({
1800
+ function pt({
1573
1801
  module: e,
1574
1802
  scenarios: t,
1575
1803
  registry: n,
1576
- onOpenScenario: s
1804
+ view: s,
1805
+ onOpenScenario: l
1577
1806
  }) {
1578
- return /* @__PURE__ */ d("section", { className: "ds-home__module", children: [
1807
+ return /* @__PURE__ */ u("section", { className: "ds-home__module", children: [
1579
1808
  /* @__PURE__ */ o("h2", { children: e.name }),
1580
1809
  e.description && /* @__PURE__ */ o("p", { className: "ds-home__hint", children: e.description }),
1581
- (e.flows ?? []).map((i) => /* @__PURE__ */ o(ct, { flow: i, registry: n, onOpenScenario: s }, i.id)),
1582
- /* @__PURE__ */ o(ne, { scenarios: t, registry: n, onOpenScenario: s })
1810
+ (e.flows ?? []).map((r) => /* @__PURE__ */ o(
1811
+ mt,
1812
+ {
1813
+ flow: r,
1814
+ registry: n,
1815
+ view: s,
1816
+ onOpenScenario: l
1817
+ },
1818
+ r.id
1819
+ )),
1820
+ /* @__PURE__ */ o(de, { scenarios: t, registry: n, onOpenScenario: l })
1583
1821
  ] });
1584
1822
  }
1585
- function ct({
1823
+ function mt({
1586
1824
  flow: e,
1587
1825
  registry: t,
1588
- onOpenScenario: n
1826
+ view: n,
1827
+ onOpenScenario: s
1589
1828
  }) {
1590
- return /* @__PURE__ */ d("div", { className: "ds-flow", children: [
1829
+ const l = e.steps.filter((r) => {
1830
+ const a = t.scenario(r.scenario);
1831
+ return a && (n === "ported" ? a.status === "ported" : a.status !== "ported");
1832
+ });
1833
+ return l.length === 0 ? null : /* @__PURE__ */ u("div", { className: "ds-flow", children: [
1591
1834
  /* @__PURE__ */ o("h3", { children: e.title }),
1592
1835
  e.description && /* @__PURE__ */ o("p", { className: "ds-home__hint", children: e.description }),
1593
- /* @__PURE__ */ o("ol", { className: "ds-flow__steps", children: e.steps.map((s, i) => {
1594
- const a = t.scenario(s.scenario), r = Object.entries(s.branches ?? {});
1595
- return /* @__PURE__ */ d("li", { children: [
1596
- /* @__PURE__ */ o("button", { type: "button", className: "ds-flow__step", onClick: () => n(s.scenario), children: s.label ?? a?.title ?? s.scenario }),
1597
- s.decision && /* @__PURE__ */ o("p", { className: "ds-flow__decision", children: s.decision }),
1598
- r.length > 0 && /* @__PURE__ */ o("ul", { className: "ds-flow__branches", children: r.map(([c, p]) => /* @__PURE__ */ d("li", { children: [
1599
- /* @__PURE__ */ o("span", { className: "ds-flow__branch-label", children: c }),
1836
+ /* @__PURE__ */ o("ol", { className: "ds-flow__steps", children: l.map((r, a) => {
1837
+ const c = t.scenario(r.scenario), h = Object.entries(r.branches ?? {}).filter(([, p]) => {
1838
+ const m = t.scenario(p);
1839
+ return m && (n === "ported" ? m.status === "ported" : m.status !== "ported");
1840
+ });
1841
+ return /* @__PURE__ */ u("li", { children: [
1842
+ /* @__PURE__ */ o("button", { type: "button", className: "ds-flow__step", onClick: () => s(r.scenario), children: r.label ?? c?.title ?? r.scenario }),
1843
+ r.decision && /* @__PURE__ */ o("p", { className: "ds-flow__decision", children: r.decision }),
1844
+ h.length > 0 && /* @__PURE__ */ o("ul", { className: "ds-flow__branches", children: h.map(([p, m]) => /* @__PURE__ */ u("li", { children: [
1845
+ /* @__PURE__ */ o("span", { className: "ds-flow__branch-label", children: p }),
1600
1846
  /* @__PURE__ */ o(
1601
1847
  "button",
1602
1848
  {
1603
1849
  type: "button",
1604
1850
  className: "ds-flow__step",
1605
- onClick: () => n(p),
1606
- children: t.scenario(p)?.title ?? p
1851
+ onClick: () => s(m),
1852
+ children: t.scenario(m)?.title ?? m
1607
1853
  }
1608
1854
  )
1609
- ] }, c)) })
1610
- ] }, `${s.scenario}-${i}`);
1855
+ ] }, p)) })
1856
+ ] }, `${r.scenario}-${a}`);
1611
1857
  }) })
1612
1858
  ] });
1613
1859
  }
1614
- function ne({
1860
+ function de({
1615
1861
  scenarios: e,
1616
1862
  registry: t,
1617
1863
  onOpenScenario: n
1618
1864
  }) {
1619
- const s = M();
1620
- return e.length === 0 ? /* @__PURE__ */ o("p", { className: "ds-home__hint", children: s.home.emptyModule }) : /* @__PURE__ */ o("ul", { className: "ds-home__grid", children: e.map((i) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ d("button", { type: "button", className: "ds-home__card", onClick: () => n(i.id), children: [
1621
- /* @__PURE__ */ d("span", { className: "ds-home__card-head", children: [
1622
- /* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": i.status }),
1623
- /* @__PURE__ */ o("span", { className: "ds-home__card-title", children: i.title })
1865
+ const s = P();
1866
+ return /* @__PURE__ */ o("ul", { className: "ds-home__grid", children: e.map((l) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ u("button", { type: "button", className: "ds-home__card", onClick: () => n(l.id), children: [
1867
+ /* @__PURE__ */ u("span", { className: "ds-home__card-head", children: [
1868
+ /* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": l.status }),
1869
+ /* @__PURE__ */ o("span", { className: "ds-home__card-title", children: l.title })
1624
1870
  ] }),
1625
- i.intent && /* @__PURE__ */ o("span", { className: "ds-home__card-intent", children: i.intent }),
1626
- /* @__PURE__ */ d("span", { className: "ds-home__card-meta", children: [
1627
- t.persona(i.persona)?.name ?? i.persona,
1871
+ l.intent && /* @__PURE__ */ o("span", { className: "ds-home__card-intent", children: l.intent }),
1872
+ /* @__PURE__ */ u("span", { className: "ds-home__card-meta", children: [
1873
+ t.persona(l.persona)?.name ?? l.persona,
1628
1874
  " · ",
1629
- s.status[i.status],
1630
- i.a11y.keyboard === "full" ? ` · ${s.home.keyboardBadge}` : ""
1875
+ s.status[l.status],
1876
+ l.a11y.keyboard === "full" ? ` · ${s.home.keyboardBadge}` : ""
1631
1877
  ] })
1632
- ] }) }, i.id)) });
1878
+ ] }) }, l.id)) });
1633
1879
  }
1634
- function wt({ product: e }) {
1635
- const t = x(() => he(e), [e]), n = x(() => Be(e.theme?.labels), [e.theme?.labels]), s = x(() => ue(e.deploy), [e.deploy]), { location: i, controls: a, viewport: r, setControls: c, navigate: p, openScenario: h, openComponent: u } = fe(t), m = G(null), { focused: N, tabStops: y } = Oe(a.keyboardMode, m), l = t.scenario(a.scenario), g = t.component(a.component), w = t.persona(a.persona ?? l?.persona), L = t.fixture(a.fixture ?? l?.fixture), E = x(() => {
1636
- const S = a.dataSource ?? "fixtures";
1637
- return S === "fixtures" ? q : e.dataSources?.adapters?.find((_) => _.id === S) ?? q;
1638
- }, [a.dataSource, e.dataSources?.adapters]), { data: $, isLoading: I, error: O } = _e({ scenario: l, fixture: L, network: a.network, adapter: E });
1639
- F(() => {
1640
- const S = (_) => {
1641
- if (!(!_.shiftKey || _.metaKey || _.ctrlKey || _.altKey || _.target?.matches("input, textarea, select, [contenteditable='true']"))) {
1642
- switch (_.key) {
1880
+ function St({ product: e }) {
1881
+ const t = C(() => ge(e), [e]), n = C(() => Ue(e.theme?.labels), [e.theme?.labels]), s = C(() => ve(e.deploy), [e.deploy]), {
1882
+ location: l,
1883
+ controls: r,
1884
+ viewport: a,
1885
+ setControls: c,
1886
+ setScenarioView: h,
1887
+ navigate: p,
1888
+ openScenario: m,
1889
+ openComponent: v
1890
+ } = Ne(t), i = ee(r), N = Q(null), { focused: x, tabStops: S } = ze(r.keyboardMode, N), d = t.scenario(r.scenario), f = t.component(r.component), k = C(
1891
+ () => t.resolveComponentFixture(f?.id, f ? r.fixture : void 0),
1892
+ [f, r.fixture, t]
1893
+ ), M = C(() => {
1894
+ const w = k.fixture?.data;
1895
+ return typeof w == "function" ? w() : w;
1896
+ }, [k.fixture]), _ = t.persona(r.persona ?? d?.persona), T = t.fixture(r.fixture ?? d?.fixture), B = C(() => {
1897
+ const w = r.dataSource ?? "fixtures";
1898
+ return w === "fixtures" ? Z : e.dataSources?.adapters?.find((y) => y.id === w) ?? Z;
1899
+ }, [r.dataSource, e.dataSources?.adapters]), { data: W, isLoading: F, error: R } = $e({ scenario: d, fixture: T, network: r.network, adapter: B });
1900
+ I(() => {
1901
+ const w = (y) => {
1902
+ if (!(!y.shiftKey || y.metaKey || y.ctrlKey || y.altKey || y.target?.matches("input, textarea, select, [contenteditable='true']"))) {
1903
+ switch (y.key) {
1643
1904
  case "K":
1644
- c({ keyboardMode: !a.keyboardMode });
1905
+ c({ keyboardMode: !r.keyboardMode });
1645
1906
  break;
1646
1907
  case "P":
1647
- c({ inspector: !a.inspector });
1908
+ c({ inspector: !r.inspector });
1648
1909
  break;
1649
1910
  default:
1650
1911
  return;
1651
1912
  }
1652
- _.preventDefault();
1913
+ y.preventDefault();
1653
1914
  }
1654
1915
  };
1655
- return window.addEventListener("keydown", S), () => window.removeEventListener("keydown", S);
1656
- }, [a.keyboardMode, a.inspector, c]);
1657
- const P = x(() => a.persona && a.persona !== l?.persona ? t.persona(a.persona)?.permissions ?? [] : t.permissionsOf(l), [a.persona, t, l]), B = x(
1916
+ return window.addEventListener("keydown", w), () => window.removeEventListener("keydown", w);
1917
+ }, [r.keyboardMode, r.inspector, c]);
1918
+ const D = C(() => r.persona && r.persona !== d?.persona ? t.persona(r.persona)?.permissions ?? [] : t.permissionsOf(d), [r.persona, t, d]), j = C(
1658
1919
  () => ({
1659
- scenario: l,
1660
- persona: w,
1661
- permissions: P,
1662
- can: (S) => P.includes(S),
1663
- data: $,
1664
- fixture: L,
1665
- network: a.network,
1666
- isLoading: I,
1667
- error: O,
1668
- rules: t.rulesOf(l),
1669
- viewport: r,
1670
- themeMode: a.themeMode,
1671
- locale: a.locale,
1920
+ scenario: d,
1921
+ persona: _,
1922
+ permissions: D,
1923
+ can: (w) => D.includes(w),
1924
+ data: W,
1925
+ fixture: T,
1926
+ network: r.network,
1927
+ isLoading: F,
1928
+ error: R,
1929
+ rules: t.rulesOf(d),
1930
+ viewport: a,
1931
+ themeMode: r.themeMode,
1932
+ locale: r.locale,
1672
1933
  a11y: {
1673
- keyboardMode: a.keyboardMode,
1674
- reducedMotion: a.reducedMotion,
1675
- textScale: a.textScale
1934
+ keyboardMode: r.keyboardMode,
1935
+ reducedMotion: r.reducedMotion,
1936
+ textScale: r.textScale
1676
1937
  },
1677
1938
  navigate: p,
1678
- openScenario: h
1939
+ openScenario: m
1679
1940
  }),
1680
1941
  [
1681
- l,
1682
- w,
1683
- P,
1684
- $,
1685
- L,
1686
- a.network,
1687
- a.themeMode,
1688
- a.locale,
1689
- a.keyboardMode,
1690
- a.reducedMotion,
1691
- a.textScale,
1692
- I,
1693
- O,
1942
+ d,
1943
+ _,
1944
+ D,
1945
+ W,
1946
+ T,
1947
+ r.network,
1948
+ r.themeMode,
1949
+ r.locale,
1950
+ r.keyboardMode,
1951
+ r.reducedMotion,
1952
+ r.textScale,
1953
+ F,
1954
+ R,
1694
1955
  t,
1695
- r,
1956
+ a,
1696
1957
  p,
1697
- h
1958
+ m
1698
1959
  ]
1699
- ), K = !l && !g && i.path === "/", R = ye(e.routes, i.path), W = e.wrapper, j = e.notFound, f = g?.preview, v = f ? /* @__PURE__ */ o(f, {}) : R ? /* @__PURE__ */ o(R.definition.screen, { params: R.params, context: B }) : j ? /* @__PURE__ */ o(j, { path: i.path }) : /* @__PURE__ */ o(rt, { title: n.shell.noRoute, children: /* @__PURE__ */ d("p", { children: [
1700
- /* @__PURE__ */ o("code", { children: i.path }),
1960
+ ), z = !d && !f && l.path === "/", O = Ce(e.routes, l.path), U = e.wrapper, H = e.notFound, K = f?.preview, V = K ? /* @__PURE__ */ o(
1961
+ K,
1962
+ {
1963
+ fixture: k.fixture,
1964
+ data: M,
1965
+ viewport: a,
1966
+ themeMode: r.themeMode ?? "default",
1967
+ locale: r.locale ?? "default",
1968
+ a11y: {
1969
+ keyboardMode: r.keyboardMode,
1970
+ reducedMotion: r.reducedMotion,
1971
+ textScale: r.textScale
1972
+ }
1973
+ }
1974
+ ) : O ? /* @__PURE__ */ o(O.definition.screen, { params: O.params, context: j }) : H ? /* @__PURE__ */ o(H, { path: l.path }) : /* @__PURE__ */ o(ut, { title: n.shell.noRoute, children: /* @__PURE__ */ u("p", { children: [
1975
+ /* @__PURE__ */ o("code", { children: l.path }),
1701
1976
  " ",
1702
1977
  n.shell.noRouteHint
1703
- ] }) }), k = W ? /* @__PURE__ */ o(W, { context: B, children: v }) : v;
1704
- return /* @__PURE__ */ o(oe.Provider, { value: n, children: /* @__PURE__ */ d(
1978
+ ] }) }), b = U ? /* @__PURE__ */ o(U, { context: j, children: V }) : V;
1979
+ return /* @__PURE__ */ o(ce.Provider, { value: n, children: /* @__PURE__ */ u(
1705
1980
  "div",
1706
1981
  {
1707
1982
  className: "ds-root",
1708
- "data-chrome": a.chrome ? "visible" : "hidden",
1709
- "data-appearance": a.chromeTheme ?? "dark",
1710
- "data-inspector": a.inspector ? "open" : "closed",
1711
- "data-viewport": r.id,
1983
+ "data-chrome": r.chrome ? "visible" : "hidden",
1984
+ "data-appearance": r.chromeTheme ?? "dark",
1985
+ "data-inspector": r.inspector ? "open" : "closed",
1986
+ "data-viewport": a.id,
1712
1987
  children: [
1713
- a.chrome && /* @__PURE__ */ o(
1714
- Ue,
1988
+ r.chrome && /* @__PURE__ */ o(
1989
+ Qe,
1715
1990
  {
1716
1991
  product: e,
1717
- scenario: l,
1992
+ scenario: d,
1718
1993
  deploy: s,
1719
- inspectorOpen: a.inspector,
1720
- chromeTheme: a.chromeTheme ?? "dark",
1721
- onToggleInspector: () => c({ inspector: !a.inspector }),
1722
- onToggleChromeTheme: () => c({ chromeTheme: a.chromeTheme === "light" ? "dark" : "light" })
1994
+ inspectorOpen: r.inspector,
1995
+ chromeTheme: r.chromeTheme ?? "dark",
1996
+ view: i,
1997
+ onToggleInspector: () => c({ inspector: !r.inspector }),
1998
+ onToggleChromeTheme: () => c({ chromeTheme: r.chromeTheme === "light" ? "dark" : "light" })
1723
1999
  }
1724
2000
  ),
1725
- a.chrome && /* @__PURE__ */ o(
1726
- We,
2001
+ r.chrome && /* @__PURE__ */ o(
2002
+ Ve,
1727
2003
  {
1728
2004
  registry: t,
1729
- activeScenario: l,
1730
- activeComponent: a.component,
1731
- controls: a,
1732
- onOpenScenario: h,
1733
- onOpenComponent: u
2005
+ activeScenario: d,
2006
+ activeComponent: r.component,
2007
+ controls: r,
2008
+ onOpenScenario: m,
2009
+ onOpenComponent: v,
2010
+ onViewChange: h
1734
2011
  }
1735
2012
  ),
1736
- /* @__PURE__ */ d("div", { className: "ds-stage-area", children: [
1737
- K ? /* @__PURE__ */ o("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ o(st, { registry: t, onOpenScenario: h }) }) : /* @__PURE__ */ o(
1738
- nt,
2013
+ /* @__PURE__ */ u("div", { className: "ds-stage-area", children: [
2014
+ z ? /* @__PURE__ */ o("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ o(
2015
+ ht,
1739
2016
  {
1740
- ref: m,
1741
- viewport: r,
1742
- textScale: a.textScale,
1743
- reducedMotion: a.reducedMotion,
1744
- keyboardMode: a.keyboardMode,
1745
- children: k
2017
+ registry: t,
2018
+ view: i,
2019
+ onViewChange: h,
2020
+ onOpenScenario: m
2021
+ }
2022
+ ) }) : /* @__PURE__ */ o(
2023
+ dt,
2024
+ {
2025
+ ref: N,
2026
+ viewport: a,
2027
+ textScale: r.textScale,
2028
+ reducedMotion: r.reducedMotion,
2029
+ keyboardMode: r.keyboardMode,
2030
+ children: b
1746
2031
  }
1747
2032
  ),
1748
- a.chrome && /* @__PURE__ */ o(
1749
- Ye,
2033
+ r.chrome && /* @__PURE__ */ o(
2034
+ tt,
1750
2035
  {
1751
2036
  registry: t,
1752
- controls: a,
1753
- scenarioActive: !!l,
2037
+ controls: r,
2038
+ scenarioActive: !!d,
2039
+ component: f,
2040
+ componentFixture: k,
1754
2041
  onChange: c
1755
2042
  }
1756
2043
  )
1757
2044
  ] }),
1758
- a.chrome && /* @__PURE__ */ o(
1759
- Qe,
2045
+ r.chrome && /* @__PURE__ */ o(
2046
+ nt,
1760
2047
  {
1761
2048
  registry: t,
1762
- scenario: l,
1763
- component: g,
1764
- controls: a,
1765
- focusedNode: N,
1766
- tabStopCount: y.length
2049
+ scenario: d,
2050
+ component: f,
2051
+ componentFixture: k,
2052
+ controls: r,
2053
+ focusedNode: x,
2054
+ tabStopCount: S.length
1767
2055
  }
1768
2056
  ),
1769
- a.keyboardMode && /* @__PURE__ */ o(at, { stops: y }),
1770
- !a.chrome && /* @__PURE__ */ o(
2057
+ r.keyboardMode && /* @__PURE__ */ o(lt, { stops: S }),
2058
+ !r.chrome && /* @__PURE__ */ o(
1771
2059
  "button",
1772
2060
  {
1773
2061
  type: "button",
@@ -1780,76 +2068,77 @@ function wt({ product: e }) {
1780
2068
  }
1781
2069
  ) });
1782
2070
  }
1783
- function H(e) {
2071
+ function Y(e) {
1784
2072
  return new Date(e.length === 10 ? `${e}T00:00:00` : e);
1785
2073
  }
1786
- function kt(e, t) {
1787
- const n = H(e), s = H(t);
1788
- let i = s.getFullYear() - n.getFullYear();
1789
- const a = s.getMonth() - n.getMonth();
1790
- return (a < 0 || a === 0 && s.getDate() < n.getDate()) && (i -= 1), i;
2074
+ function _t(e, t) {
2075
+ const n = Y(e), s = Y(t);
2076
+ let l = s.getFullYear() - n.getFullYear();
2077
+ const r = s.getMonth() - n.getMonth();
2078
+ return (r < 0 || r === 0 && s.getDate() < n.getDate()) && (l -= 1), l;
1791
2079
  }
1792
- function yt(e, t) {
1793
- const n = H(e), s = H(t);
2080
+ function Mt(e, t) {
2081
+ const n = Y(e), s = Y(t);
1794
2082
  return Math.floor((s.getTime() - n.getTime()) / 864e5);
1795
2083
  }
1796
2084
  export {
1797
- xt as CONTRAST_THRESHOLDS,
1798
- C as DEFAULT_LABELS,
1799
- wt as DesignSpace,
1800
- mt as EN_US_LABELS,
1801
- st as Home,
1802
- vt as KEYBOARD_LABELS,
1803
- gt as NETWORK_LABELS,
1804
- ee as NETWORK_STATES,
1805
- b as PARAM,
1806
- ie as SCENARIO_STATUSES,
1807
- Se as SLOW_NETWORK_DELAY_MS,
1808
- ft as STATUS_LABELS,
1809
- bt as STATUS_MEANING,
1810
- xe as SimulatedNetworkError,
1811
- nt as Stage,
1812
- rt as StageEmpty,
1813
- pe as TEXT_SCALES,
1814
- at as TabOrderOverlay,
1815
- te as VIEWPORTS,
1816
- kt as ageInYears,
1817
- Mt as applyOverrides,
1818
- _t as assertContrastPairs,
1819
- Ct as checkContrastPair,
1820
- le as checkContrastPairs,
1821
- Tt as commitUrl,
1822
- Ae as computeRole,
1823
- Lt as contrastRatio,
1824
- pt as createHttpAdapter,
1825
- he as createRegistry,
1826
- yt as daysBetween,
1827
- Le as describeElement,
1828
- q as fixtureAdapter,
1829
- At as flatten,
1830
- Et as formatIssues,
1831
- ue as getDeployContext,
1832
- $t as hasErrors,
1833
- ke as matchPath,
1834
- Pt as parseColor,
1835
- me as parseControls,
1836
- H as parseIsoDate,
1837
- Rt as readCssVariable,
1838
- Dt as relativeLuminance,
1839
- V as resolveFixture,
1840
- Be as resolveLabels,
1841
- ye as resolveRoute,
1842
- be as resolveViewport,
1843
- de as scenarioUrl,
1844
- z as serializeControls,
1845
- Ft as serializeValue,
1846
- Fe as shortSelector,
1847
- Ie as tabbableElements,
1848
- fe as useDesignSpaceState,
1849
- Oe as useKeyboardMode,
1850
- M as useLabels,
1851
- _e as useScenarioData,
1852
- ce as validateProduct,
1853
- It as validateScenario
2085
+ At as CONTRAST_THRESHOLDS,
2086
+ L as DEFAULT_LABELS,
2087
+ St as DesignSpace,
2088
+ wt as EN_US_LABELS,
2089
+ ht as Home,
2090
+ yt as KEYBOARD_LABELS,
2091
+ xt as NETWORK_LABELS,
2092
+ se as NETWORK_STATES,
2093
+ g as PARAM,
2094
+ pe as SCENARIO_STATUSES,
2095
+ Ae as SLOW_NETWORK_DELAY_MS,
2096
+ kt as STATUS_LABELS,
2097
+ Nt as STATUS_MEANING,
2098
+ Pe as SimulatedNetworkError,
2099
+ dt as Stage,
2100
+ ut as StageEmpty,
2101
+ we as TEXT_SCALES,
2102
+ lt as TabOrderOverlay,
2103
+ ie as VIEWPORTS,
2104
+ _t as ageInYears,
2105
+ Pt as applyOverrides,
2106
+ Lt as assertContrastPairs,
2107
+ $t as checkContrastPair,
2108
+ be as checkContrastPairs,
2109
+ Et as commitUrl,
2110
+ Ft as componentUrl,
2111
+ De as computeRole,
2112
+ Rt as contrastRatio,
2113
+ gt as createHttpAdapter,
2114
+ ge as createRegistry,
2115
+ Mt as daysBetween,
2116
+ Re as describeElement,
2117
+ Z as fixtureAdapter,
2118
+ Dt as flatten,
2119
+ Ot as formatIssues,
2120
+ ve as getDeployContext,
2121
+ It as hasErrors,
2122
+ Me as matchPath,
2123
+ Bt as parseColor,
2124
+ ke as parseControls,
2125
+ Y as parseIsoDate,
2126
+ Wt as readCssVariable,
2127
+ jt as relativeLuminance,
2128
+ X as resolveFixture,
2129
+ Ue as resolveLabels,
2130
+ Ce as resolveRoute,
2131
+ xe as resolveViewport,
2132
+ fe as scenarioUrl,
2133
+ q as serializeControls,
2134
+ Ht as serializeValue,
2135
+ He as shortSelector,
2136
+ Ke as tabbableElements,
2137
+ Ne as useDesignSpaceState,
2138
+ ze as useKeyboardMode,
2139
+ P as useLabels,
2140
+ $e as useScenarioData,
2141
+ me as validateProduct,
2142
+ Kt as validateScenario
1854
2143
  };
1855
2144
  //# sourceMappingURL=index.js.map