@brucesantos/design-space 0.1.1 → 0.3.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,190 +1,209 @@
1
- import { jsxs as d, jsx as a, Fragment as x } from "react/jsx-runtime";
2
- import { useState as _, useEffect as E, useMemo as k, useCallback as M, forwardRef as ee, useRef as te } from "react";
3
- import { v as ae, P as p, N as q, s as re, c as ne, g as se } from "./contrast-DsgJg12D.js";
4
- import { C as rt, S as nt, a as st, b as ot, d as it, e as dt, f as ct, h as lt, i as ut, j as ht, p as mt, r as pt, k as ft, l as bt, m as vt } from "./contrast-DsgJg12D.js";
5
- function oe(e) {
6
- const t = new Map(e.scenarios.map((i) => [i.id, i])), r = new Map(e.personas.map((i) => [i.id, i])), n = new Map(e.fixtures.map((i) => [i.id, i])), s = new Map((e.rules ?? []).map((i) => [i.id, i])), l = new Map(e.modules.map((i) => [i.id, i])), c = new Map(
7
- e.modules.flatMap((i) => (i.flows ?? []).map((h) => [h.id, h]))
8
- ), o = e.modules.map((i) => ({
9
- module: i,
10
- scenarios: e.scenarios.filter((h) => h.id.split(".")[0] === i.id)
11
- })), u = new Set(o.flatMap((i) => i.scenarios.map((h) => h.id))), m = e.scenarios.filter((i) => !u.has(i.id)), f = (i) => i ? t.get(i) : void 0, v = (i) => i ? r.get(i) : void 0, g = (i) => i ? i.permissions ? i.permissions : v(i.persona)?.permissions ?? [] : [];
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 ?? [] : [];
12
14
  return {
13
15
  product: e,
14
- tree: o,
15
- orphans: m,
16
- issues: ae(e),
17
- scenario: f,
18
- persona: v,
19
- fixture: (i) => i ? n.get(i) : void 0,
20
- rule: (i) => i ? s.get(i) : void 0,
21
- module: (i) => i ? l.get(i) : void 0,
22
- flow: (i) => i ? c.get(i) : void 0,
23
- rulesOf: (i) => (i?.rules ?? []).map((h) => s.get(h)).filter((h) => !!h),
24
- permissionsOf: g,
25
- scenariosForRoute: (i) => {
26
- const h = i.split("?")[0];
27
- return e.scenarios.filter((b) => b.route.split("?")[0] === h);
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);
28
31
  },
29
- search: (i) => {
30
- const h = W(i);
31
- return h ? e.scenarios.filter((b) => {
32
- const y = l.get(b.id.split(".")[0] ?? "")?.name ?? "";
33
- return W(
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(
34
37
  [
35
- b.title,
36
- b.id,
37
- b.intent ?? "",
38
- b.route,
39
- y,
40
- r.get(b.persona)?.name ?? "",
41
- (b.tags ?? []).join(" "),
42
- (b.expected ?? []).join(" ")
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(" ")
43
46
  ].join(" ")
44
- ).includes(h);
47
+ ).includes(g);
45
48
  }) : e.scenarios;
46
49
  },
47
- byStatus: (i) => e.scenarios.filter((h) => h.status === i),
50
+ byStatus: (l) => e.scenarios.filter((g) => g.status === l),
48
51
  coverage: () => {
49
- const i = {
50
- proposed: 0,
51
- "in-review": 0,
52
- approved: 0,
53
- "in-implementation": 0,
54
- implemented: 0,
55
- superseded: 0
56
- };
57
- for (const h of e.scenarios) i[h.status] += 1;
58
- return i;
52
+ const l = Object.fromEntries(
53
+ ie.map((g) => [g, 0])
54
+ );
55
+ for (const g of e.scenarios) l[g.status] += 1;
56
+ return l;
59
57
  }
60
58
  };
61
59
  }
62
- function W(e) {
60
+ function Y(e) {
63
61
  return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").trim();
64
62
  }
65
- const Y = [
63
+ const te = [
66
64
  { id: "fit", label: "Ajustar" },
67
65
  { id: "mobile", label: "Celular", width: 390, height: 844 },
68
66
  { id: "tablet", label: "Tablet", width: 834, height: 1112 },
69
67
  { id: "desktop", label: "Desktop", width: 1440, height: 900 },
70
68
  { id: "custom", label: "Personalizado" }
71
- ], G = [1, 1.25, 1.5, 2];
72
- function ie(e, t) {
73
- const r = new URLSearchParams(e), n = r.get(p.scenario) ?? void 0, s = t.scenario(n), l = r.get(p.network), c = Number(r.get(p.textScale));
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));
74
72
  return {
75
- scenario: s?.id,
76
- persona: r.get(p.persona) ?? s?.persona,
77
- fixture: r.get(p.fixture) ?? s?.fixture,
78
- network: le(l) ? l : s?.network ?? "success",
79
- viewport: r.get(p.viewport) ?? "fit",
80
- customWidth: ue(r.get(p.customWidth)),
81
- themeMode: r.get(p.themeMode) ?? t.product.theme?.modes?.[0],
82
- locale: r.get(p.locale) ?? t.product.theme?.locales?.[0],
83
- dataSource: r.get(p.dataSource) ?? t.product.dataSources?.default ?? "fixtures",
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",
84
84
  // Chrome visível por padrão. `?chrome=0` é o modo de revisão limpa e captura
85
85
  // de tela, então precisa ser explícito para não sumir sem pedido.
86
- chrome: r.get(p.chrome) !== "0",
87
- keyboardMode: r.get(p.keyboardMode) === "1",
88
- reducedMotion: r.get(p.reducedMotion) === "1",
89
- textScale: G.includes(c) ? c : 1,
90
- inspector: r.get(p.inspector) !== "0"
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"
91
91
  };
92
92
  }
93
- function H(e, t) {
94
- const r = new URLSearchParams(), n = t.scenario(e.scenario);
95
- e.scenario && r.set(p.scenario, e.scenario), e.persona && e.persona !== n?.persona && r.set(p.persona, e.persona), e.fixture && e.fixture !== n?.fixture && r.set(p.fixture, e.fixture), e.network !== (n?.network ?? "success") && r.set(p.network, e.network), e.viewport !== "fit" && r.set(p.viewport, e.viewport), e.viewport === "custom" && e.customWidth && r.set(p.customWidth, String(e.customWidth));
96
- const s = t.product.theme?.modes?.[0];
97
- e.themeMode && e.themeMode !== s && r.set(p.themeMode, e.themeMode);
98
- const l = t.product.theme?.locales?.[0];
99
- e.locale && e.locale !== l && r.set(p.locale, e.locale);
100
- const c = t.product.dataSources?.default ?? "fixtures";
101
- e.dataSource && e.dataSource !== c && r.set(p.dataSource, e.dataSource), e.chrome || r.set(p.chrome, "0"), e.keyboardMode && r.set(p.keyboardMode, "1"), e.reducedMotion && r.set(p.reducedMotion, "1"), e.textScale !== 1 && r.set(p.textScale, String(e.textScale)), e.inspector || r.set(p.inspector, "0");
102
- const o = r.toString();
103
- return o ? `?${o}` : "";
93
+ function z(e, t) {
94
+ 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");
102
+ const c = n.toString();
103
+ return c ? `?${c}` : "";
104
104
  }
105
- function de(e) {
106
- const [t, r] = _(() => U());
107
- E(() => {
108
- const m = () => r(U());
109
- return window.addEventListener("popstate", m), () => window.removeEventListener("popstate", m);
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);
110
110
  }, []);
111
- const n = k(() => ie(t.search, e), [t.search, e]), s = M((m, f, v = !1) => {
112
- const g = `${m}${f}`;
113
- v ? window.history.replaceState(null, "", g) : window.history.pushState(null, "", g), r({ path: m, search: f });
114
- }, []), l = M(
115
- (m) => {
116
- const f = { ...n, ...m };
117
- s(t.path, H(f, e), !0);
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);
118
118
  },
119
- [n, t.path, s, e]
120
- ), c = M(
121
- (m, f) => {
122
- const [v, g] = m.split("?"), i = v || "/", h = g ? `?${g}` : t.search;
123
- s(i, h, f?.replace ?? !1);
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);
124
124
  },
125
- [t.search, s]
126
- ), o = M(
127
- (m) => {
128
- const f = e.scenario(m);
129
- if (!f) return;
130
- const v = {
131
- ...n,
132
- scenario: f.id,
133
- persona: f.persona,
134
- fixture: f.fixture,
135
- network: f.network ?? "success"
125
+ [t.search, i]
126
+ ), c = D(
127
+ (u) => {
128
+ const m = e.scenario(u);
129
+ if (!m) return;
130
+ const N = {
131
+ ...s,
132
+ scenario: m.id,
133
+ component: void 0,
134
+ persona: m.persona,
135
+ fixture: m.fixture,
136
+ network: m.network ?? "success"
136
137
  };
137
- s(f.route, H(v, e), !1);
138
+ i(m.route, z(N, e), !1);
138
139
  },
139
- [n, s, e]
140
- ), u = k(() => ce(n), [n]);
141
- return { location: t, controls: n, viewport: u, setControls: l, navigate: c, openScenario: o };
140
+ [s, i, e]
141
+ ), p = D(
142
+ (u) => {
143
+ const m = e.component(u);
144
+ if (!m) return;
145
+ const N = {
146
+ ...s,
147
+ scenario: void 0,
148
+ component: m.id,
149
+ persona: void 0,
150
+ fixture: void 0,
151
+ network: "success"
152
+ };
153
+ i("/", z(N, e), !1);
154
+ },
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 };
142
158
  }
143
- function ce(e) {
144
- const t = Y.find((r) => r.id === e.viewport);
159
+ function be(e) {
160
+ const t = te.find((n) => n.id === e.viewport);
145
161
  return e.viewport === "custom" ? { id: "custom", label: "Personalizado", width: e.customWidth ?? 1024 } : t ?? { id: "fit", label: "Ajustar" };
146
162
  }
147
- function U() {
163
+ function J() {
148
164
  return typeof window > "u" ? { path: "/", search: "" } : { path: window.location.pathname, search: window.location.search };
149
165
  }
150
- function le(e) {
151
- return e !== null && q.includes(e);
166
+ function ge(e) {
167
+ return e !== null && ee.includes(e);
168
+ }
169
+ function ve(e) {
170
+ return e === "dark" || e === "light";
152
171
  }
153
- function ue(e) {
172
+ function we(e) {
154
173
  if (!e) return;
155
174
  const t = Number.parseInt(e, 10);
156
175
  return Number.isFinite(t) && t > 0 ? t : void 0;
157
176
  }
158
- function he(e, t) {
159
- const r = e.split("/").filter(Boolean), n = pe(t).split("/").filter(Boolean), s = {};
160
- for (const [l, c] of r.entries()) {
161
- if (c === "*")
162
- return s["*"] = n.slice(l).join("/"), s;
163
- const o = n[l];
164
- if (o === void 0) return null;
165
- if (c.startsWith(":")) {
166
- s[c.slice(1)] = o;
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];
183
+ if (c === void 0) return null;
184
+ if (r.startsWith(":")) {
185
+ i[r.slice(1)] = c;
167
186
  continue;
168
187
  }
169
- if (c !== o) return null;
188
+ if (r !== c) return null;
170
189
  }
171
- return r.length !== n.length ? null : s;
190
+ return n.length !== s.length ? null : i;
172
191
  }
173
- function me(e, t) {
174
- const r = [...e].sort((n, s) => K(s.path) - K(n.path));
175
- for (const n of r) {
176
- const s = he(n.path, t);
177
- if (s) return { definition: n, params: s };
192
+ function ye(e, t) {
193
+ const n = [...e].sort((s, i) => Q(i.path) - Q(s.path));
194
+ for (const s of n) {
195
+ const i = ke(s.path, t);
196
+ if (i) return { definition: s, params: i };
178
197
  }
179
198
  }
180
- function K(e) {
199
+ function Q(e) {
181
200
  const t = e.split("/").filter(Boolean);
182
- let r = t.length;
183
- for (const n of t)
184
- n === "*" ? r -= 2 : n.startsWith(":") ? r += 1 : r += 4;
185
- return r;
201
+ let n = t.length;
202
+ for (const s of t)
203
+ s === "*" ? n -= 2 : s.startsWith(":") ? n += 1 : n += 4;
204
+ return n;
186
205
  }
187
- function pe(e) {
206
+ function Ne(e) {
188
207
  const t = e.split("?")[0] ?? e;
189
208
  try {
190
209
  return decodeURI(t);
@@ -192,84 +211,84 @@ function pe(e) {
192
211
  return t;
193
212
  }
194
213
  }
195
- const fe = 2500;
196
- class be extends Error {
214
+ const Se = 2500;
215
+ class xe extends Error {
197
216
  constructor(t) {
198
217
  super(`Falha de rede simulada no cenário "${t}".`), this.name = "SimulatedNetworkError";
199
218
  }
200
219
  }
201
- function F(e) {
220
+ function V(e) {
202
221
  if (e)
203
222
  return typeof e.data == "function" ? e.data() : e.data;
204
223
  }
205
- const O = {
224
+ const q = {
206
225
  id: "fixtures",
207
226
  label: "Fixtures",
208
- load: async ({ scenario: e, fixture: t, network: r }) => {
209
- switch (r) {
227
+ load: async ({ scenario: e, fixture: t, network: n }) => {
228
+ switch (n) {
210
229
  case "empty":
211
230
  return null;
212
231
  case "error":
213
- throw new be(e.id);
232
+ throw new xe(e.id);
214
233
  case "loading":
215
234
  return new Promise(() => {
216
235
  });
217
236
  case "slow":
218
- return await ve(fe), F(t);
237
+ return await Me(Se), V(t);
219
238
  default:
220
- return F(t);
239
+ return V(t);
221
240
  }
222
241
  }
223
242
  };
224
- function Je(e) {
225
- const { id: t, label: r, baseUrl: n, path: s, init: l, fallbackToFixture: c = !0 } = e;
243
+ function pt(e) {
244
+ const { id: t, label: n, baseUrl: s, path: i, init: a, fallbackToFixture: r = !0 } = e;
226
245
  return {
227
246
  id: t,
228
- label: r,
229
- load: async (o) => {
230
- const u = new URL(s ? s(o) : o.scenario.route, n);
247
+ label: n,
248
+ load: async (c) => {
249
+ const p = new URL(i ? i(c) : c.scenario.route, s);
231
250
  try {
232
- const m = await fetch(u, l);
233
- if (!m.ok) throw new Error(`${m.status} ${m.statusText}`);
234
- return await m.json();
235
- } catch (m) {
236
- if (c) return F(o.fixture);
237
- throw new Error(`Adapter "${t}" falhou em ${u.toString()}`, { cause: m });
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 });
238
257
  }
239
258
  }
240
259
  };
241
260
  }
242
- function ve(e) {
261
+ function Me(e) {
243
262
  return new Promise((t) => setTimeout(t, e));
244
263
  }
245
- function ge(e) {
246
- const { scenario: t, fixture: r, network: n, adapter: s } = e, [l, c] = _({
264
+ function _e(e) {
265
+ const { scenario: t, fixture: n, network: s, adapter: i } = e, [a, r] = T({
247
266
  data: void 0,
248
267
  isLoading: !!t,
249
268
  error: void 0
250
269
  });
251
- return E(() => {
270
+ return F(() => {
252
271
  if (!t) {
253
- c({ data: void 0, isLoading: !1, error: void 0 });
272
+ r({ data: void 0, isLoading: !1, error: void 0 });
254
273
  return;
255
274
  }
256
- let o = !0;
257
- c({ data: void 0, isLoading: !0, error: void 0 });
258
- const u = s ?? O;
259
- return Promise.resolve(u.load({ scenario: t, fixture: r, network: n })).then((m) => {
260
- o && c({ data: m, isLoading: !1, error: void 0 });
261
- }).catch((m) => {
262
- o && c({
275
+ 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({
263
282
  data: void 0,
264
283
  isLoading: !1,
265
- error: m instanceof Error ? m : new Error(String(m))
284
+ error: h instanceof Error ? h : new Error(String(h))
266
285
  });
267
286
  }), () => {
268
- o = !1;
287
+ c = !1;
269
288
  };
270
- }, [t, r, n, s]), l;
289
+ }, [t, n, s, i]), a;
271
290
  }
272
- const Ne = {
291
+ const Ce = {
273
292
  a: "link",
274
293
  article: "article",
275
294
  aside: "complementary",
@@ -303,7 +322,7 @@ const Ne = {
303
322
  th: "columnheader",
304
323
  tr: "row",
305
324
  ul: "list"
306
- }, we = {
325
+ }, Te = {
307
326
  button: "button",
308
327
  checkbox: "checkbox",
309
328
  email: "textbox",
@@ -318,65 +337,65 @@ const Ne = {
318
337
  text: "textbox",
319
338
  url: "textbox"
320
339
  };
321
- function _e(e) {
340
+ function Le(e) {
322
341
  if (!e || !(e instanceof HTMLElement)) return;
323
- const { name: t, nameFrom: r } = xe(e);
342
+ const { name: t, nameFrom: n } = Ee(e);
324
343
  return {
325
- role: ke(e),
344
+ role: Ae(e),
326
345
  name: t,
327
- nameFrom: r,
328
- description: Se(e),
329
- states: ye(e),
330
- selector: Ee(e),
346
+ nameFrom: n,
347
+ description: $e(e),
348
+ states: Pe(e),
349
+ selector: Fe(e),
331
350
  hiddenFromTabOrder: e.tabIndex < 0,
332
- hiddenFromAssistiveTech: Me(e)
351
+ hiddenFromAssistiveTech: Re(e)
333
352
  };
334
353
  }
335
- function ke(e) {
354
+ function Ae(e) {
336
355
  const t = e.getAttribute("role");
337
356
  if (t) return t.split(/\s+/)[0] ?? t;
338
- const r = e.tagName.toLowerCase();
339
- if (r === "input") {
340
- const n = e.type.toLowerCase();
341
- return we[n] ?? "textbox";
357
+ const n = e.tagName.toLowerCase();
358
+ if (n === "input") {
359
+ const s = e.type.toLowerCase();
360
+ return Te[s] ?? "textbox";
342
361
  }
343
- return r === "a" && !e.hasAttribute("href") ? "generic" : Ne[r] ?? "generic";
362
+ return n === "a" && !e.hasAttribute("href") ? "generic" : Ce[n] ?? "generic";
344
363
  }
345
- function xe(e) {
364
+ function Ee(e) {
346
365
  const t = e.getAttribute("aria-labelledby");
347
366
  if (t) {
348
- const c = t.split(/\s+/).map((o) => e.ownerDocument.getElementById(o)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
349
- if (c) return { name: c, nameFrom: "aria-labelledby" };
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" };
350
369
  }
351
- const r = e.getAttribute("aria-label")?.trim();
352
- if (r) return { name: r, nameFrom: "aria-label" };
370
+ const n = e.getAttribute("aria-label")?.trim();
371
+ if (n) return { name: n, nameFrom: "aria-label" };
353
372
  if (e instanceof HTMLInputElement || e instanceof HTMLSelectElement || e instanceof HTMLTextAreaElement) {
354
- const c = Array.from(e.labels ?? []).map((o) => o.textContent?.trim() ?? "").filter(Boolean);
355
- if (c.length) return { name: c.join(" "), nameFrom: "label" };
373
+ const r = Array.from(e.labels ?? []).map((c) => c.textContent?.trim() ?? "").filter(Boolean);
374
+ if (r.length) return { name: r.join(" "), nameFrom: "label" };
356
375
  }
357
376
  if (e instanceof HTMLImageElement) {
358
- const c = e.getAttribute("alt");
359
- if (c !== null) return { name: c, nameFrom: "alt" };
377
+ const r = e.getAttribute("alt");
378
+ if (r !== null) return { name: r, nameFrom: "alt" };
360
379
  }
361
- const n = e.getAttribute("title")?.trim(), s = Ce(e);
362
- return s ? { name: s, nameFrom: "content" } : n ? { name: n, nameFrom: "title" } : e instanceof HTMLInputElement && e.value ? { name: e.value, nameFrom: "value" } : e.getAttribute("placeholder")?.trim() ? { name: "", nameFrom: "none" } : { name: "", nameFrom: "none" };
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" };
363
382
  }
364
- function Se(e) {
383
+ function $e(e) {
365
384
  const t = e.getAttribute("aria-describedby");
366
385
  if (t) {
367
- const r = t.split(/\s+/).map((n) => e.ownerDocument.getElementById(n)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
368
- if (r) return r;
386
+ const n = t.split(/\s+/).map((s) => e.ownerDocument.getElementById(s)?.textContent?.trim() ?? "").filter(Boolean).join(" ");
387
+ if (n) return n;
369
388
  }
370
389
  return e.getAttribute("aria-description")?.trim() || void 0;
371
390
  }
372
- function ye(e) {
373
- const t = [], r = (n, s = n.replace("aria-", "")) => {
374
- const l = e.getAttribute(n);
375
- l !== null && l !== "false" && t.push(l === "true" || l === "" ? s : `${s}=${l}`);
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}`);
376
395
  };
377
- 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"), r("aria-expanded"), r("aria-selected"), r("aria-checked"), r("aria-pressed"), r("aria-current"), r("aria-invalid"), r("aria-busy"), r("aria-live"), r("aria-haspopup"), r("aria-level", "level"), e.ownerDocument.activeElement === e && t.push("focused"), [...new Set(t)];
396
+ 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)];
378
397
  }
379
- function Me(e) {
398
+ function Re(e) {
380
399
  let t = e;
381
400
  for (; t; ) {
382
401
  if (t.getAttribute("aria-hidden") === "true" || t.hasAttribute("hidden")) return !0;
@@ -384,21 +403,21 @@ function Me(e) {
384
403
  }
385
404
  return !1;
386
405
  }
387
- function Ce(e) {
406
+ function De(e) {
388
407
  const t = e.cloneNode(!0);
389
- for (const r of t.querySelectorAll("[aria-hidden='true'],[hidden]"))
390
- r.remove();
408
+ for (const n of t.querySelectorAll("[aria-hidden='true'],[hidden]"))
409
+ n.remove();
391
410
  return (t.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, 160);
392
411
  }
393
- function Ee(e) {
412
+ function Fe(e) {
394
413
  const t = e.tagName.toLowerCase();
395
414
  if (e.id) return `${t}#${e.id}`;
396
- const r = e.getAttribute("data-testid");
397
- if (r) return `${t}[data-testid="${r}"]`;
398
- const n = Array.from(e.classList).slice(0, 2);
399
- return n.length ? `${t}.${n.join(".")}` : t;
415
+ const n = e.getAttribute("data-testid");
416
+ if (n) return `${t}[data-testid="${n}"]`;
417
+ const s = Array.from(e.classList).slice(0, 2);
418
+ return s.length ? `${t}.${s.join(".")}` : t;
400
419
  }
401
- function Te(e = document) {
420
+ function Ie(e = document) {
402
421
  const t = [
403
422
  "a[href]",
404
423
  "button",
@@ -409,290 +428,731 @@ function Te(e = document) {
409
428
  "[tabindex]",
410
429
  "[contenteditable='true']"
411
430
  ].join(",");
412
- return Array.from(e.querySelectorAll(t)).filter((r) => {
413
- if (r.tabIndex < 0 || r.disabled || r.getAttribute("aria-hidden") === "true") return !1;
414
- const n = window.getComputedStyle(r);
415
- return n.display === "none" || n.visibility === "hidden" ? !1 : r.offsetWidth > 0 || r.offsetHeight > 0 || r === document.activeElement;
431
+ return Array.from(e.querySelectorAll(t)).filter((n) => {
432
+ if (n.tabIndex < 0 || n.disabled || n.getAttribute("aria-hidden") === "true") return !1;
433
+ const s = window.getComputedStyle(n);
434
+ return s.display === "none" || s.visibility === "hidden" ? !1 : n.offsetWidth > 0 || n.offsetHeight > 0 || n === document.activeElement;
416
435
  });
417
436
  }
418
- function Ae(e, t) {
419
- const [r, n] = _(), [s, l] = _([]), c = M(() => {
420
- const o = t.current;
421
- if (!o) {
422
- l([]);
437
+ function Oe(e, t) {
438
+ const [n, s] = T(), [i, a] = T([]), r = D(() => {
439
+ const c = t.current;
440
+ if (!c) {
441
+ a([]);
423
442
  return;
424
443
  }
425
- l(
426
- Te(o).map((u, m) => ({
427
- index: m + 1,
428
- element: u,
429
- rect: u.getBoundingClientRect(),
430
- forcedOrder: u.tabIndex > 0
444
+ a(
445
+ Ie(c).map((p, h) => ({
446
+ index: h + 1,
447
+ element: p,
448
+ rect: p.getBoundingClientRect(),
449
+ forcedOrder: p.tabIndex > 0
431
450
  }))
432
451
  );
433
452
  }, [t]);
434
- return E(() => {
453
+ return F(() => {
435
454
  if (!e) {
436
- n(void 0), l([]);
455
+ s(void 0), a([]);
437
456
  return;
438
457
  }
439
- const o = () => n(_e(document.activeElement));
440
- document.addEventListener("focusin", o), window.addEventListener("resize", c), window.addEventListener("scroll", c, !0), o(), c();
441
- const u = t.current, m = u ? new MutationObserver(() => c()) : void 0;
442
- return m?.observe(u, { childList: !0, subtree: !0, attributes: !0 }), () => {
443
- document.removeEventListener("focusin", o), window.removeEventListener("resize", c), window.removeEventListener("scroll", c, !0), m?.disconnect();
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();
444
463
  };
445
- }, [e, c, t]), { focused: r, tabStops: s, refresh: c };
464
+ }, [e, r, t]), { focused: n, tabStops: i, refresh: r };
446
465
  }
447
- const S = {
448
- proposed: "Proposta",
449
- "in-review": "Em revisão",
450
- approved: "Aprovado",
451
- "in-implementation": "Em implementação",
452
- implemented: "Implementado",
453
- superseded: "Superado"
454
- }, Le = {
455
- proposed: "Exploração ainda não aprovada.",
456
- "in-review": "Aberto para validação de design, negócio ou cliente.",
457
- approved: "Referência autorizada, registrada por URL de commit.",
458
- "in-implementation": "Ligado a um trabalho ativo de engenharia.",
459
- implemented: "Disponível no produto real e validado.",
460
- superseded: "Mantido para histórico ou substituído por outra decisão."
461
- }, Q = {
462
- success: "Sucesso",
463
- loading: "Carregando",
464
- empty: "Vazio",
465
- error: "Erro",
466
- slow: "Lento"
467
- }, Fe = {
468
- full: "Jornada completável só por teclado",
469
- partial: "Parcialmente operável por teclado",
470
- "not-applicable": "Não se aplica"
466
+ const C = {
467
+ status: {
468
+ ported: "Portado — não validado",
469
+ proposed: "Proposta",
470
+ "in-review": "Em revisão",
471
+ approved: "Aprovado",
472
+ "in-implementation": "Em implementação",
473
+ implemented: "Implementado",
474
+ superseded: "Superado"
475
+ },
476
+ statusMeaning: {
477
+ ported: "Veio do sistema existente, mas não foi validado e não representa compromisso de implementação.",
478
+ proposed: "Exploração ainda não aprovada.",
479
+ "in-review": "Aberto para validação de design, negócio ou cliente.",
480
+ approved: "Referência autorizada, registrada por URL de commit.",
481
+ "in-implementation": "Ligado a um trabalho ativo de engenharia.",
482
+ implemented: "Disponível no produto real e validado.",
483
+ superseded: "Mantido para histórico ou substituído por outra decisão."
484
+ },
485
+ network: {
486
+ success: "Sucesso",
487
+ loading: "Carregando",
488
+ empty: "Vazio",
489
+ error: "Erro",
490
+ slow: "Lento"
491
+ },
492
+ keyboard: {
493
+ full: "Jornada completável só por teclado",
494
+ partial: "Parcialmente operável por teclado",
495
+ "not-applicable": "Não se aplica"
496
+ },
497
+ viewport: {
498
+ fit: "Ajustar",
499
+ mobile: "Celular",
500
+ tablet: "Tablet",
501
+ desktop: "Desktop",
502
+ custom: "Personalizado"
503
+ },
504
+ topbar: {
505
+ homeTitle: (e) => `Ir para a página inicial de ${e}`,
506
+ toggleNav: "Mostrar ou ocultar a navegação",
507
+ copyLink: "Copiar link",
508
+ copied: "Link copiado",
509
+ copyPrompt: "Copie o link do cenário:",
510
+ cleanReview: "Revisão limpa",
511
+ cleanReviewTitle: "Abrir a situação em uma nova aba, sem o chrome do Design Space",
512
+ panel: "Painel",
513
+ lightMode: "Modo claro",
514
+ darkMode: "Modo escuro",
515
+ branchTitle: (e) => `Branch: ${e}`,
516
+ commitTitle: (e) => `Commit: ${e}`,
517
+ envTitle: (e) => `Ambiente: ${e}`
518
+ },
519
+ sidebar: {
520
+ region: "Cenários do produto",
521
+ flowsTab: "Fluxos",
522
+ componentsTab: "Componentes",
523
+ searchPlaceholder: "Buscar situação…",
524
+ searchLabel: "Buscar cenário pelo vocabulário do produto",
525
+ componentSearchPlaceholder: "Buscar componente…",
526
+ componentSearchLabel: "Buscar componente do produto",
527
+ searchShortcut: "⌘K",
528
+ noMatch: (e) => `Nenhuma situação para "${e}".`,
529
+ matchCount: (e) => `${e} ${e === 1 ? "situação" : "situações"}.`,
530
+ noComponentMatch: (e) => `Nenhum componente para "${e}".`,
531
+ componentMatchCount: (e) => `${e} ${e === 1 ? "componente" : "componentes"}.`,
532
+ emptyModule: "Nenhum cenário ainda.",
533
+ emptyComponents: "O produto ainda não registrou componentes.",
534
+ withoutModule: "Sem módulo",
535
+ scope: "Escopo ativo",
536
+ scopeData: "Dados",
537
+ scopePersona: "Persona",
538
+ scopeNetwork: "Rede"
539
+ },
540
+ controls: {
541
+ region: "Controles do cenário",
542
+ persona: "Persona",
543
+ fixture: "Dados",
544
+ network: "Rede",
545
+ viewport: "Viewport",
546
+ customWidth: "Largura personalizada em pixels",
547
+ theme: "Tema",
548
+ locale: "Idioma",
549
+ dataSource: "Fonte",
550
+ fixturesOption: "Fixtures",
551
+ a11y: "Acessibilidade",
552
+ keyboardMode: "Teclado",
553
+ keyboardModeTitle: "Percorrer a jornada só por teclado, com foco visível e ordem de tabulação evidenciada",
554
+ reducedMotion: "Movimento",
555
+ reducedMotionTitle: "Reduzir movimento dentro do palco",
556
+ textScale: "Ampliação de texto",
557
+ none: "—"
558
+ },
559
+ inspector: {
560
+ region: "Painel de contexto",
561
+ tabScenario: "Cenário",
562
+ tabA11y: "Acessibilidade",
563
+ tabDiagnostics: "Diagnóstico",
564
+ diagnosticsWithErrors: (e) => `Diagnóstico (${e})`,
565
+ noScenario: "Nenhum cenário ativo. Escolha uma situação na navegação para ver contexto, regras e critérios.",
566
+ componentReference: "Componente",
567
+ componentGroup: "Grupo",
568
+ situation: "Situação",
569
+ reproduction: "Reprodução",
570
+ id: "Id",
571
+ route: "Rota",
572
+ persona: "Persona",
573
+ personaSwapped: "trocada",
574
+ data: "Dados",
575
+ network: "Rede",
576
+ goal: (e) => `Objetivo: ${e}`,
577
+ permissions: "Permissões efetivas",
578
+ preconditions: "Pré-condições",
579
+ rules: "Regras",
580
+ actions: "Ações disponíveis",
581
+ expected: "Critérios de aceite",
582
+ approval: "Aprovação",
583
+ openApproved: "Abrir a versão aprovada",
584
+ engineering: "Engenharia",
585
+ a11yContract: "Contrato do cenário",
586
+ keyboard: "Teclado",
587
+ contrast: "Contraste",
588
+ contrastTarget: (e) => `WCAG 2.2 ${e}`,
589
+ announces: "Precisa ser anunciado:",
590
+ focusedElement: "Elemento em foco",
591
+ keyboardModeOff: "Ligue o modo teclado na barra de controles para inspecionar a árvore acessível.",
592
+ pressTab: (e) => `Pressione Tab dentro do palco. ${e} paradas de tabulação foram encontradas.`,
593
+ role: "Papel",
594
+ name: "Nome",
595
+ noAccessibleName: "sem nome acessível",
596
+ nameFrom: "Nome vem de",
597
+ description: "Descrição",
598
+ selector: "Seletor",
599
+ focusableButHidden: "Este elemento é focável mas está escondido de tecnologia assistiva. Um leitor de tela recebe foco sem receber conteúdo.",
600
+ tabStopsInStage: (e) => `${e} paradas de tabulação no palco.`,
601
+ tokenContrast: "Contraste dos tokens",
602
+ noContrastPairs: "O produto não declarou pares de contraste em theme.contrastPairs. Contraste é propriedade de par de cores: declarar aqui valida na origem, uma vez.",
603
+ pair: "Par",
604
+ ratio: "Razão",
605
+ pairsFailing: (e) => `${e} ${e === 1 ? "par" : "pares"} fora do alvo. O teste de tokens do produto falha o build por isso.`,
606
+ automatedIsFloor: "Verificação automática é piso, não teto. Ordem de leitura confusa, rótulo tecnicamente presente mas sem sentido e fluxo impossível de completar com leitor de tela passam no axe.",
607
+ coverage: "Cobertura por status",
608
+ scenariosRegistered: (e) => `${e} cenários registrados.`,
609
+ scenarioContract: "Contrato de cenário",
610
+ noIssues: "Nenhum problema encontrado."
611
+ },
612
+ home: {
613
+ lead: (e) => `Especificação executável: cada situação abaixo abre por link, com persona, dados e regras próprios. ${e} ${e === 1 ? "situação registrada" : "situações registradas"}.`,
614
+ withoutModule: "Sem módulo",
615
+ 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
+ emptyModule: "Nenhuma situação registrada neste módulo ainda.",
617
+ keyboardBadge: "teclado"
618
+ },
619
+ shell: {
620
+ restoreChrome: "Mostrar controles",
621
+ noRoute: "Nenhuma rota para este endereço",
622
+ noRouteHint: "não casa com nenhuma rota declarada. Escolha uma situação na navegação."
623
+ }
624
+ }, mt = {
625
+ status: {
626
+ ported: "Ported — not validated",
627
+ proposed: "Proposed",
628
+ "in-review": "In review",
629
+ approved: "Approved",
630
+ "in-implementation": "In implementation",
631
+ implemented: "Implemented",
632
+ superseded: "Superseded"
633
+ },
634
+ statusMeaning: {
635
+ ported: "Imported from the existing system, but not validated and not an implementation commitment.",
636
+ proposed: "Exploration that has not been approved yet.",
637
+ "in-review": "Open for design, business, or client validation.",
638
+ approved: "Authorized reference, recorded with a commit URL.",
639
+ "in-implementation": "Linked to active engineering work.",
640
+ implemented: "Available in the real product and validated.",
641
+ superseded: "Kept for history or replaced by another decision."
642
+ },
643
+ network: {
644
+ success: "Success",
645
+ loading: "Loading",
646
+ empty: "Empty",
647
+ error: "Error",
648
+ slow: "Slow"
649
+ },
650
+ keyboard: {
651
+ full: "Journey can be completed with keyboard only",
652
+ partial: "Partially operable with keyboard",
653
+ "not-applicable": "Not applicable"
654
+ },
655
+ viewport: {
656
+ fit: "Fit",
657
+ mobile: "Mobile",
658
+ tablet: "Tablet",
659
+ desktop: "Desktop",
660
+ custom: "Custom"
661
+ },
662
+ topbar: {
663
+ homeTitle: (e) => `Go to ${e} home`,
664
+ toggleNav: "Show or hide navigation",
665
+ copyLink: "Copy link",
666
+ copied: "Link copied",
667
+ copyPrompt: "Copy the scenario link:",
668
+ cleanReview: "Clean review",
669
+ cleanReviewTitle: "Open this state in a new tab without the Design Space chrome",
670
+ panel: "Panel",
671
+ lightMode: "Light mode",
672
+ darkMode: "Dark mode",
673
+ branchTitle: (e) => `Branch: ${e}`,
674
+ commitTitle: (e) => `Commit: ${e}`,
675
+ envTitle: (e) => `Environment: ${e}`
676
+ },
677
+ sidebar: {
678
+ region: "Product scenarios",
679
+ flowsTab: "Flows",
680
+ componentsTab: "Components",
681
+ searchPlaceholder: "Search scenarios…",
682
+ searchLabel: "Search scenarios using product language",
683
+ componentSearchPlaceholder: "Search components…",
684
+ componentSearchLabel: "Search product components",
685
+ searchShortcut: "⌘K",
686
+ noMatch: (e) => `No scenarios found for "${e}".`,
687
+ matchCount: (e) => `${e} ${e === 1 ? "scenario" : "scenarios"}.`,
688
+ noComponentMatch: (e) => `No components found for "${e}".`,
689
+ componentMatchCount: (e) => `${e} ${e === 1 ? "component" : "components"}.`,
690
+ emptyModule: "No scenarios yet.",
691
+ emptyComponents: "The product has not registered any components yet.",
692
+ withoutModule: "No module",
693
+ scope: "Active scope",
694
+ scopeData: "Data",
695
+ scopePersona: "Persona",
696
+ scopeNetwork: "Network"
697
+ },
698
+ controls: {
699
+ region: "Scenario controls",
700
+ persona: "Persona",
701
+ fixture: "Data",
702
+ network: "Network",
703
+ viewport: "Viewport",
704
+ customWidth: "Custom width in pixels",
705
+ theme: "Theme",
706
+ locale: "Language",
707
+ dataSource: "Source",
708
+ fixturesOption: "Fixtures",
709
+ a11y: "Accessibility",
710
+ keyboardMode: "Keyboard",
711
+ keyboardModeTitle: "Complete the journey with keyboard only, showing focus and tab order",
712
+ reducedMotion: "Motion",
713
+ reducedMotionTitle: "Reduce motion inside the stage",
714
+ textScale: "Text size",
715
+ none: "—"
716
+ },
717
+ inspector: {
718
+ region: "Context panel",
719
+ tabScenario: "Scenario",
720
+ tabA11y: "Accessibility",
721
+ tabDiagnostics: "Diagnostics",
722
+ diagnosticsWithErrors: (e) => `Diagnostics (${e})`,
723
+ noScenario: "No active scenario. Choose a state in the navigation to see its context, rules, and criteria.",
724
+ componentReference: "Component",
725
+ componentGroup: "Group",
726
+ situation: "State",
727
+ reproduction: "Reproduction",
728
+ id: "ID",
729
+ route: "Route",
730
+ persona: "Persona",
731
+ personaSwapped: "changed",
732
+ data: "Data",
733
+ network: "Network",
734
+ goal: (e) => `Goal: ${e}`,
735
+ permissions: "Effective permissions",
736
+ preconditions: "Preconditions",
737
+ rules: "Rules",
738
+ actions: "Available actions",
739
+ expected: "Acceptance criteria",
740
+ approval: "Approval",
741
+ openApproved: "Open approved version",
742
+ engineering: "Engineering",
743
+ a11yContract: "Scenario contract",
744
+ keyboard: "Keyboard",
745
+ contrast: "Contrast",
746
+ contrastTarget: (e) => `WCAG 2.2 ${e}`,
747
+ announces: "Must be announced:",
748
+ focusedElement: "Focused element",
749
+ keyboardModeOff: "Turn on keyboard mode in the controls to inspect the accessibility tree.",
750
+ pressTab: (e) => `Press Tab inside the stage. ${e} tab ${e === 1 ? "stop was" : "stops were"} found.`,
751
+ role: "Role",
752
+ name: "Name",
753
+ noAccessibleName: "no accessible name",
754
+ nameFrom: "Name source",
755
+ description: "Description",
756
+ selector: "Selector",
757
+ focusableButHidden: "This element is focusable but hidden from assistive technology. A screen reader receives focus without receiving content.",
758
+ tabStopsInStage: (e) => `${e} tab ${e === 1 ? "stop" : "stops"} in the stage.`,
759
+ tokenContrast: "Token contrast",
760
+ noContrastPairs: "The product has not declared contrast pairs in theme.contrastPairs. Contrast belongs to a pair of colors; declaring pairs here validates them once, at the source.",
761
+ pair: "Pair",
762
+ ratio: "Ratio",
763
+ pairsFailing: (e) => `${e} ${e === 1 ? "pair is" : "pairs are"} below the target. The product token test fails the build for this.`,
764
+ automatedIsFloor: "Automated checks are a floor, not a ceiling. Confusing reading order, technically present but meaningless labels, and journeys that cannot be completed with a screen reader can still pass automated tools.",
765
+ coverage: "Coverage by status",
766
+ scenariosRegistered: (e) => `${e} ${e === 1 ? "scenario" : "scenarios"} registered.`,
767
+ scenarioContract: "Scenario contract",
768
+ noIssues: "No issues found."
769
+ },
770
+ home: {
771
+ lead: (e) => `Executable specification: each state below opens from a link with its own persona, data, and rules. ${e} ${e === 1 ? "state registered" : "states registered"}.`,
772
+ withoutModule: "No module",
773
+ withoutModuleHint: "The ID prefix does not match a registered module, so these states do not appear in module navigation.",
774
+ emptyModule: "No states have been registered in this module yet.",
775
+ keyboardBadge: "keyboard"
776
+ },
777
+ shell: {
778
+ restoreChrome: "Show controls",
779
+ noRoute: "No route for this address",
780
+ noRouteHint: "does not match any declared route. Choose a state from the navigation."
781
+ }
471
782
  };
472
- function Oe({ registry: e, activeScenario: t, onOpenScenario: r }) {
473
- const [n, s] = _(""), [l, c] = _(/* @__PURE__ */ new Set()), o = k(() => {
474
- if (n.trim())
475
- return new Set(e.search(n).map((i) => i.id));
476
- }, [n, e]), u = (i) => c((h) => {
477
- const b = new Set(h);
478
- return b.has(i) ? b.delete(i) : b.add(i), b;
479
- }), m = (i) => o ? i.filter((h) => o.has(h.id)) : i, f = e.tree.map((i) => ({ ...i, scenarios: m(i.scenarios) })).filter((i) => o ? i.scenarios.length > 0 : !0), v = m(e.orphans), g = f.reduce((i, h) => i + h.scenarios.length, 0) + v.length;
480
- return /* @__PURE__ */ d("nav", { className: "ds-chrome ds-sidebar", "aria-label": "Cenários do produto", children: [
481
- /* @__PURE__ */ a("div", { className: "ds-sidebar__search", children: /* @__PURE__ */ a(
482
- "input",
483
- {
484
- className: "ds-input ds-input--search",
485
- type: "search",
486
- value: n,
487
- placeholder: "Buscar situação…",
488
- "aria-label": "Buscar cenário pelo vocabulário do produto",
489
- onChange: (i) => s(i.target.value)
490
- }
491
- ) }),
492
- /* @__PURE__ */ d("div", { className: "ds-sidebar__tree", children: [
493
- n.trim() !== "" && /* @__PURE__ */ a("p", { className: "ds-sidebar__empty", role: "status", children: g === 0 ? `Nenhuma situação para "${n}".` : `${g} ${g === 1 ? "situação" : "situações"}.` }),
494
- f.map((i) => {
495
- const h = !l.has(i.module.id) || !!o;
496
- return /* @__PURE__ */ d("section", { className: "ds-module", children: [
497
- /* @__PURE__ */ d(
498
- "button",
499
- {
500
- type: "button",
501
- className: "ds-module__header",
502
- "aria-expanded": h,
503
- onClick: () => u(i.module.id),
504
- children: [
505
- /* @__PURE__ */ a("span", { className: "ds-module__chevron", "aria-hidden": "true", children: "▶" }),
506
- /* @__PURE__ */ a("span", { children: i.module.name }),
507
- /* @__PURE__ */ a("span", { className: "ds-module__count", children: i.scenarios.length })
508
- ]
509
- }
510
- ),
511
- h && /* @__PURE__ */ d("ul", { className: "ds-module__scenarios", children: [
512
- i.scenarios.map((b) => /* @__PURE__ */ a(
513
- V,
514
- {
515
- scenario: b,
516
- isActive: b.id === t,
517
- onOpen: r
518
- },
519
- b.id
520
- )),
521
- i.scenarios.length === 0 && /* @__PURE__ */ a("li", { className: "ds-sidebar__empty", children: "Nenhum cenário ainda." })
522
- ] })
523
- ] }, i.module.id);
524
- }),
525
- v.length > 0 && /* @__PURE__ */ d("section", { className: "ds-module", children: [
526
- /* @__PURE__ */ d("div", { className: "ds-module__header", "aria-hidden": "true", children: [
527
- /* @__PURE__ */ a("span", { className: "ds-module__chevron", children: "▶" }),
528
- /* @__PURE__ */ a("span", { children: "Sem módulo" }),
529
- /* @__PURE__ */ a("span", { className: "ds-module__count", children: v.length })
530
- ] }),
531
- /* @__PURE__ */ a("ul", { className: "ds-module__scenarios", children: v.map((i) => /* @__PURE__ */ a(
532
- V,
533
- {
534
- scenario: i,
535
- isActive: i.id === t,
536
- onOpen: r
783
+ function Be(e) {
784
+ if (!e) return C;
785
+ const t = { ...C };
786
+ for (const n of Object.keys(C)) {
787
+ const s = e[n];
788
+ s && (t[n] = { ...C[n], ...s });
789
+ }
790
+ return t;
791
+ }
792
+ const oe = re(C);
793
+ function M() {
794
+ return ae(oe);
795
+ }
796
+ const ft = C.status, bt = C.statusMeaning, gt = C.network, vt = C.keyboard;
797
+ function We({
798
+ registry: e,
799
+ activeScenario: t,
800
+ activeComponent: n,
801
+ controls: s,
802
+ onOpenScenario: i,
803
+ onOpenComponent: a
804
+ }) {
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(() => {
807
+ 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());
811
+ };
812
+ return window.addEventListener("keydown", f), () => window.removeEventListener("keydown", f);
813
+ }, []);
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);
819
+ return (e.product.components ?? []).filter(
820
+ (v) => Z([v.name, v.id, v.group, v.description].join(" ")).includes(
821
+ f
822
+ )
823
+ );
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;
837
+ });
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: [
840
+ /* @__PURE__ */ o(
841
+ "button",
842
+ {
843
+ type: "button",
844
+ role: "tab",
845
+ "aria-selected": c === "flows",
846
+ onClick: () => {
847
+ p("flows"), u("");
848
+ },
849
+ children: r.sidebar.flowsTab
850
+ }
851
+ ),
852
+ /* @__PURE__ */ o(
853
+ "button",
854
+ {
855
+ type: "button",
856
+ role: "tab",
857
+ "aria-selected": c === "components",
858
+ onClick: () => {
859
+ p("components"), u("");
537
860
  },
538
- i.id
539
- )) })
861
+ children: r.sidebar.componentsTab
862
+ }
863
+ )
864
+ ] }),
865
+ /* @__PURE__ */ d("div", { className: "ds-sidebar__search", children: [
866
+ /* @__PURE__ */ o(
867
+ "input",
868
+ {
869
+ ref: y,
870
+ className: "ds-input ds-input--search",
871
+ 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
877
+ }
878
+ ),
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))
916
+ ] }),
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] })
540
926
  ] })
541
927
  ] })
542
928
  ] });
543
929
  }
544
- function V({
545
- scenario: e,
546
- isActive: t,
547
- onOpen: r
548
- }) {
549
- return /* @__PURE__ */ a("li", { children: /* @__PURE__ */ d(
930
+ function je(e) {
931
+ return /* @__PURE__ */ d(A, { children: [
932
+ e.nodes.map((t) => {
933
+ const n = !e.collapsed.has(t.module.id) || !!e.matches;
934
+ return /* @__PURE__ */ d("section", { className: "ds-module", children: [
935
+ /* @__PURE__ */ d(
936
+ "button",
937
+ {
938
+ type: "button",
939
+ className: "ds-module__header",
940
+ "aria-expanded": n,
941
+ onClick: () => e.onToggle(t.module.id),
942
+ children: [
943
+ /* @__PURE__ */ o("span", { className: "ds-module__chevron", "aria-hidden": "true", children: "▶" }),
944
+ /* @__PURE__ */ o("span", { children: t.module.name }),
945
+ /* @__PURE__ */ o("span", { className: "ds-module__count", children: t.scenarios.length })
946
+ ]
947
+ }
948
+ ),
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
+ ] })
953
+ ] }, t.module.id);
954
+ }),
955
+ e.orphans.length > 0 && /* @__PURE__ */ d("section", { className: "ds-module", children: [
956
+ /* @__PURE__ */ d("div", { className: "ds-module__header", "aria-hidden": "true", children: [
957
+ /* @__PURE__ */ o("span", { className: "ds-module__chevron", children: "▶" }),
958
+ /* @__PURE__ */ o("span", { children: e.withoutModuleLabel }),
959
+ /* @__PURE__ */ o("span", { className: "ds-module__count", children: e.orphans.length })
960
+ ] }),
961
+ /* @__PURE__ */ o("ul", { className: "ds-module__scenarios", children: e.orphans.map((t) => /* @__PURE__ */ o(X, { scenario: t, ...e }, t.id)) })
962
+ ] })
963
+ ] });
964
+ }
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(
550
968
  "button",
551
969
  {
970
+ ref: (r) => i(e.id, r),
552
971
  type: "button",
553
972
  className: "ds-scenario",
554
- "aria-current": t,
555
- onClick: () => r(e.id),
973
+ "aria-current": e.id === t,
974
+ onClick: () => n(e.id),
975
+ onKeyDown: (r) => s(e.id, r),
556
976
  children: [
557
- /* @__PURE__ */ a(
558
- "span",
559
- {
560
- className: "ds-status-dot",
561
- "data-status": e.status,
562
- title: S[e.status]
563
- }
564
- ),
565
- /* @__PURE__ */ a("span", { className: "ds-scenario__title", children: e.title }),
566
- /* @__PURE__ */ a("span", { className: "ds-visually-hidden", children: S[e.status] })
977
+ /* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": e.status, title: a }),
978
+ /* @__PURE__ */ o("span", { className: "ds-scenario__title", children: e.title }),
979
+ /* @__PURE__ */ o("span", { className: "ds-visually-hidden", children: a })
567
980
  ]
568
981
  }
569
982
  ) });
570
983
  }
571
- function $e({
984
+ function He(e) {
985
+ const t = /* @__PURE__ */ new Map();
986
+ for (const n of e) {
987
+ const s = n.group ?? "Componentes";
988
+ t.set(s, [...t.get(s) ?? [], n]);
989
+ }
990
+ return [...t.entries()];
991
+ }
992
+ function Z(e) {
993
+ return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").trim();
994
+ }
995
+ function Ke(e) {
996
+ const t = e.key.toLowerCase();
997
+ return (e.metaKey || e.ctrlKey) && !e.altKey && !e.shiftKey && (t === "k" || t === "f");
998
+ }
999
+ function ze(e, t, n) {
1000
+ 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];
1003
+ }
1004
+ function Ue({
572
1005
  product: e,
573
1006
  scenario: t,
574
- deploy: r,
575
- inspectorOpen: n,
576
- sidebarOpen: s,
577
- onToggleInspector: l,
578
- onToggleSidebar: c,
579
- onHideChrome: o
1007
+ deploy: n,
1008
+ inspectorOpen: s,
1009
+ chromeTheme: i,
1010
+ onToggleInspector: a,
1011
+ onToggleChromeTheme: r
580
1012
  }) {
581
- const [u, m] = _(!1), f = async () => {
582
- const v = t ? re(t, { origin: r.origin }) : `${r.origin}${window.location.pathname}${window.location.search}`;
1013
+ const c = M().topbar, [p, h] = T(!1), u = async () => {
1014
+ const y = t ? de(t, {
1015
+ origin: n.origin,
1016
+ overrides: i === "light" ? { chromeTheme: i } : void 0
1017
+ }) : `${n.origin}${window.location.pathname}${window.location.search}`;
583
1018
  try {
584
- await navigator.clipboard.writeText(v);
1019
+ await navigator.clipboard.writeText(y);
585
1020
  } catch {
586
- window.prompt("Copie o link do cenário:", v);
1021
+ window.prompt(c.copyPrompt, y);
587
1022
  }
588
- m(!0), window.setTimeout(() => m(!1), 1600);
589
- };
1023
+ h(!0), window.setTimeout(() => h(!1), 1600);
1024
+ }, m = Ge(
1025
+ typeof window > "u" ? `${n.origin}/` : window.location.href
1026
+ ), N = Ve(n.origin, i);
590
1027
  return /* @__PURE__ */ d("header", { className: "ds-chrome ds-topbar", children: [
591
- /* @__PURE__ */ a(
592
- "button",
593
- {
594
- type: "button",
595
- className: "ds-btn ds-btn--ghost",
596
- "aria-pressed": s,
597
- onClick: c,
598
- title: "Mostrar ou ocultar a navegação",
599
- children: "☰"
600
- }
601
- ),
602
1028
  /* @__PURE__ */ d("div", { className: "ds-topbar__product", children: [
603
- /* @__PURE__ */ a("span", { children: e.name }),
604
- e.tagline && /* @__PURE__ */ a("span", { className: "ds-topbar__tagline", children: e.tagline })
1029
+ /* @__PURE__ */ o(
1030
+ "a",
1031
+ {
1032
+ className: "ds-topbar__home",
1033
+ href: N,
1034
+ "aria-label": c.homeTitle(e.name),
1035
+ title: c.homeTitle(e.name),
1036
+ children: e.name
1037
+ }
1038
+ ),
1039
+ e.tagline && /* @__PURE__ */ o("span", { className: "ds-topbar__tagline", children: e.tagline })
605
1040
  ] }),
606
- /* @__PURE__ */ a("div", { className: "ds-topbar__spacer" }),
1041
+ /* @__PURE__ */ o("div", { className: "ds-topbar__spacer" }),
607
1042
  /* @__PURE__ */ d("div", { className: "ds-topbar__meta", children: [
608
- r.branch && /* @__PURE__ */ a("code", { title: `Branch: ${r.branch}`, children: r.branch.length > 28 ? `${r.branch.slice(0, 27)}…` : r.branch }),
609
- r.shortCommit && /* @__PURE__ */ a("code", { title: `Commit: ${r.commit}`, children: r.shortCommit }),
610
- /* @__PURE__ */ a("code", { title: `Ambiente: ${r.env}`, children: r.env })
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 })
611
1046
  ] }),
612
- /* @__PURE__ */ a("button", { type: "button", className: "ds-btn", onClick: f, children: u ? "Link copiado" : "Copiar link" }),
613
- /* @__PURE__ */ a(
1047
+ /* @__PURE__ */ o(
614
1048
  "button",
615
1049
  {
616
1050
  type: "button",
1051
+ 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 })
1057
+ }
1058
+ ),
1059
+ /* @__PURE__ */ o("button", { type: "button", className: "ds-btn", onClick: u, children: p ? c.copied : c.copyLink }),
1060
+ /* @__PURE__ */ o(
1061
+ "a",
1062
+ {
617
1063
  className: "ds-btn",
618
- onClick: o,
619
- title: "Ocultar o chrome do Design Space para revisão limpa e captura de tela",
620
- children: "Revisão limpa"
1064
+ href: m,
1065
+ target: "_blank",
1066
+ rel: "noreferrer",
1067
+ title: c.cleanReviewTitle,
1068
+ children: c.cleanReview
621
1069
  }
622
1070
  ),
623
- /* @__PURE__ */ a(
1071
+ /* @__PURE__ */ o(
624
1072
  "button",
625
1073
  {
626
1074
  type: "button",
627
1075
  className: "ds-btn",
628
- "aria-pressed": n,
629
- onClick: l,
630
- children: "Painel"
1076
+ "aria-pressed": s,
1077
+ onClick: a,
1078
+ children: c.panel
631
1079
  }
632
1080
  )
633
1081
  ] });
634
1082
  }
635
- function Pe({ registry: e, controls: t, onChange: r }) {
636
- const { product: n } = e, s = n.dataSources?.adapters ?? [], l = n.theme?.modes ?? [], c = n.theme?.locales ?? [];
637
- return /* @__PURE__ */ d("div", { className: "ds-chrome ds-controls", role: "group", "aria-label": "Controles do cenário", children: [
638
- /* @__PURE__ */ d("div", { className: "ds-field", children: [
639
- /* @__PURE__ */ a("label", { htmlFor: "ds-persona", children: "Persona" }),
1083
+ function Ge(e) {
1084
+ const t = new URL(e);
1085
+ return t.searchParams.set(b.chrome, "0"), t.toString();
1086
+ }
1087
+ function Ve(e, t) {
1088
+ const n = new URL("/", e);
1089
+ return t === "light" && n.searchParams.set(b.chromeTheme, t), n.toString();
1090
+ }
1091
+ function qe({ theme: e }) {
1092
+ const t = {
1093
+ width: 15,
1094
+ height: 15,
1095
+ viewBox: "0 0 24 24",
1096
+ fill: "none",
1097
+ stroke: "currentColor",
1098
+ strokeWidth: 2,
1099
+ strokeLinecap: "round",
1100
+ strokeLinejoin: "round",
1101
+ "aria-hidden": !0
1102
+ };
1103
+ return e === "dark" ? /* @__PURE__ */ d("svg", { ...t, children: [
1104
+ /* @__PURE__ */ o("circle", { cx: "12", cy: "12", r: "4" }),
1105
+ /* @__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
+ ] }) : /* @__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
+ }
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 }),
640
1113
  /* @__PURE__ */ d(
641
1114
  "select",
642
1115
  {
643
1116
  id: "ds-persona",
644
1117
  className: "ds-select",
645
1118
  value: t.persona ?? "",
646
- onChange: (o) => r({ persona: o.target.value || void 0 }),
647
- children: [
648
- /* @__PURE__ */ a("option", { value: "", children: "—" }),
649
- n.personas.map((o) => /* @__PURE__ */ a("option", { value: o.id, children: o.name }, o.id))
650
- ]
651
- }
652
- )
653
- ] }),
654
- /* @__PURE__ */ d("div", { className: "ds-field", children: [
655
- /* @__PURE__ */ a("label", { htmlFor: "ds-fixture", children: "Dados" }),
656
- /* @__PURE__ */ d(
657
- "select",
658
- {
659
- id: "ds-fixture",
660
- className: "ds-select",
661
- value: t.fixture ?? "",
662
- onChange: (o) => r({ fixture: o.target.value || void 0 }),
1119
+ onChange: (u) => s({ persona: u.target.value || void 0 }),
663
1120
  children: [
664
- /* @__PURE__ */ a("option", { value: "", children: "—" }),
665
- n.fixtures.map((o) => /* @__PURE__ */ a("option", { value: o.id, children: o.label }, o.id))
1121
+ /* @__PURE__ */ o("option", { value: "", children: a.none }),
1122
+ r.personas.map((u) => /* @__PURE__ */ o("option", { value: u.id, children: u.name }, u.id))
666
1123
  ]
667
1124
  }
668
1125
  )
669
1126
  ] }),
670
- /* @__PURE__ */ d("div", { className: "ds-field", children: [
671
- /* @__PURE__ */ a("span", { className: "ds-field__label", id: "ds-network-label", children: "Rede" }),
672
- /* @__PURE__ */ a("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-network-label", children: q.map((o) => /* @__PURE__ */ a(
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(
673
1130
  "button",
674
1131
  {
675
1132
  type: "button",
676
- "aria-pressed": t.network === o,
677
- onClick: () => r({ network: o }),
678
- children: Q[o]
1133
+ "aria-pressed": t.network === u,
1134
+ onClick: () => s({ network: u }),
1135
+ children: i.network[u]
679
1136
  },
680
- o
1137
+ u
681
1138
  )) })
682
1139
  ] }),
683
1140
  /* @__PURE__ */ d("div", { className: "ds-field", children: [
684
- /* @__PURE__ */ a("span", { className: "ds-field__label", id: "ds-viewport-label", children: "Viewport" }),
685
- /* @__PURE__ */ a("div", { className: "ds-segmented", role: "group", "aria-labelledby": "ds-viewport-label", children: Y.map((o) => /* @__PURE__ */ a(
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(
686
1143
  "button",
687
1144
  {
688
1145
  type: "button",
689
- "aria-pressed": t.viewport === o.id,
690
- onClick: () => r({ viewport: o.id }),
691
- children: o.label
1146
+ 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 })
692
1152
  },
693
- o.id
1153
+ u.id
694
1154
  )) }),
695
- t.viewport === "custom" && /* @__PURE__ */ a(
1155
+ t.viewport === "custom" && /* @__PURE__ */ o(
696
1156
  "input",
697
1157
  {
698
1158
  className: "ds-input",
@@ -701,375 +1161,361 @@ function Pe({ registry: e, controls: t, onChange: r }) {
701
1161
  max: 3840,
702
1162
  step: 10,
703
1163
  style: { width: 88 },
704
- "aria-label": "Largura personalizada em pixels",
1164
+ "aria-label": a.customWidth,
705
1165
  value: t.customWidth ?? 1024,
706
- onChange: (o) => r({ customWidth: Number(o.target.value) || void 0 })
1166
+ onChange: (u) => s({ customWidth: Number(u.target.value) || void 0 })
707
1167
  }
708
1168
  )
709
1169
  ] }),
710
- l.length > 1 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
711
- /* @__PURE__ */ a("label", { htmlFor: "ds-theme", children: "Tema" }),
712
- /* @__PURE__ */ a(
1170
+ p.length > 1 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
1171
+ /* @__PURE__ */ o("label", { htmlFor: "ds-theme", children: a.theme }),
1172
+ /* @__PURE__ */ o(
713
1173
  "select",
714
1174
  {
715
1175
  id: "ds-theme",
716
1176
  className: "ds-select",
717
- value: t.themeMode ?? l[0],
718
- onChange: (o) => r({ themeMode: o.target.value }),
719
- children: l.map((o) => /* @__PURE__ */ a("option", { value: o, children: o }, o))
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))
720
1180
  }
721
1181
  )
722
1182
  ] }),
723
- c.length > 1 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
724
- /* @__PURE__ */ a("label", { htmlFor: "ds-locale", children: "Idioma" }),
725
- /* @__PURE__ */ a(
1183
+ h.length > 1 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
1184
+ /* @__PURE__ */ o("label", { htmlFor: "ds-locale", children: a.locale }),
1185
+ /* @__PURE__ */ o(
726
1186
  "select",
727
1187
  {
728
1188
  id: "ds-locale",
729
1189
  className: "ds-select",
730
- value: t.locale ?? c[0],
731
- onChange: (o) => r({ locale: o.target.value }),
732
- children: c.map((o) => /* @__PURE__ */ a("option", { value: o, children: o }, o))
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))
733
1193
  }
734
1194
  )
735
1195
  ] }),
736
- s.length > 0 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
737
- /* @__PURE__ */ a("label", { htmlFor: "ds-source", children: "Fonte" }),
1196
+ c.length > 0 && /* @__PURE__ */ d("div", { className: "ds-field", children: [
1197
+ /* @__PURE__ */ o("label", { htmlFor: "ds-source", children: a.dataSource }),
738
1198
  /* @__PURE__ */ d(
739
1199
  "select",
740
1200
  {
741
1201
  id: "ds-source",
742
1202
  className: "ds-select",
743
1203
  value: t.dataSource ?? "fixtures",
744
- onChange: (o) => r({ dataSource: o.target.value }),
1204
+ onChange: (u) => s({ dataSource: u.target.value }),
745
1205
  children: [
746
- /* @__PURE__ */ a("option", { value: "fixtures", children: "Fixtures" }),
747
- s.filter((o) => o.id !== "fixtures").map((o) => /* @__PURE__ */ a("option", { value: o.id, children: o.label }, o.id))
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))
748
1208
  ]
749
1209
  }
750
1210
  )
751
- ] }),
752
- /* @__PURE__ */ d("div", { className: "ds-field", children: [
753
- /* @__PURE__ */ a("span", { className: "ds-field__label", children: "Acessibilidade" }),
754
- /* @__PURE__ */ a(
755
- "button",
756
- {
757
- type: "button",
758
- className: "ds-btn",
759
- "aria-pressed": t.keyboardMode,
760
- onClick: () => r({ keyboardMode: !t.keyboardMode }),
761
- title: "Percorrer a jornada só por teclado, com foco visível e ordem de tabulação evidenciada",
762
- children: "Teclado"
763
- }
764
- ),
765
- /* @__PURE__ */ a(
766
- "button",
767
- {
768
- type: "button",
769
- className: "ds-btn",
770
- "aria-pressed": t.reducedMotion,
771
- onClick: () => r({ reducedMotion: !t.reducedMotion }),
772
- title: "Reduzir movimento dentro do palco",
773
- children: "Movimento"
774
- }
775
- ),
776
- /* @__PURE__ */ a("div", { className: "ds-segmented", role: "group", "aria-label": "Ampliação de texto", children: G.map((o) => /* @__PURE__ */ a(
777
- "button",
778
- {
779
- type: "button",
780
- "aria-pressed": t.textScale === o,
781
- onClick: () => r({ textScale: o }),
782
- children: o === 1 ? "100%" : `${o * 100}%`
783
- },
784
- o
785
- )) })
786
1211
  ] })
787
1212
  ] });
788
1213
  }
789
- function Re({
1214
+ function Je({ id: e }) {
1215
+ const t = {
1216
+ width: 16,
1217
+ height: 16,
1218
+ viewBox: "0 0 24 24",
1219
+ fill: "none",
1220
+ stroke: "currentColor",
1221
+ strokeWidth: 2,
1222
+ strokeLinecap: "round",
1223
+ strokeLinejoin: "round",
1224
+ "aria-hidden": !0
1225
+ };
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: [
1227
+ /* @__PURE__ */ o("rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2" }),
1228
+ /* @__PURE__ */ o("path", { d: "M12 18h.01" })
1229
+ ] }) : e === "tablet" ? /* @__PURE__ */ d("svg", { ...t, children: [
1230
+ /* @__PURE__ */ o("rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", ry: "2" }),
1231
+ /* @__PURE__ */ o("path", { d: "M12 18h.01" })
1232
+ ] }) : e === "desktop" ? /* @__PURE__ */ d("svg", { ...t, children: [
1233
+ /* @__PURE__ */ o("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
1234
+ /* @__PURE__ */ o("path", { d: "M8 21h8M12 17v4" })
1235
+ ] }) : /* @__PURE__ */ o("svg", { ...t, children: /* @__PURE__ */ o("path", { d: "M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7" }) });
1236
+ }
1237
+ function Qe({
790
1238
  registry: e,
791
1239
  scenario: t,
792
- controls: r,
793
- focusedNode: n,
794
- tabStopCount: s
1240
+ component: n,
1241
+ controls: s,
1242
+ focusedNode: i,
1243
+ tabStopCount: a
795
1244
  }) {
796
- const [l, c] = _("scenario"), o = e.issues.filter((u) => u.level === "error").length;
797
- return /* @__PURE__ */ d("aside", { className: "ds-chrome ds-inspector", "aria-label": "Painel de contexto", children: [
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: [
798
1247
  /* @__PURE__ */ d("div", { className: "ds-inspector__tabs", role: "tablist", children: [
799
- /* @__PURE__ */ a(L, { id: "scenario", current: l, onSelect: c, children: "Cenário" }),
800
- /* @__PURE__ */ a(L, { id: "a11y", current: l, onSelect: c, children: "Acessibilidade" }),
801
- /* @__PURE__ */ a(L, { id: "diagnostics", current: l, onSelect: c, children: o > 0 ? `Diagnóstico (${o})` : "Diagnóstico" })
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 })
802
1251
  ] }),
803
1252
  /* @__PURE__ */ d("div", { className: "ds-inspector__body", role: "tabpanel", children: [
804
- l === "scenario" && /* @__PURE__ */ a(De, { registry: e, scenario: t, controls: r }),
805
- l === "a11y" && /* @__PURE__ */ a(
806
- Ie,
1253
+ c === "scenario" && /* @__PURE__ */ o(Xe, { registry: e, scenario: t, component: n, controls: s }),
1254
+ c === "a11y" && /* @__PURE__ */ o(
1255
+ Ze,
807
1256
  {
808
1257
  registry: e,
809
1258
  scenario: t,
810
- focusedNode: n,
811
- keyboardMode: r.keyboardMode,
812
- tabStopCount: s
1259
+ focusedNode: i,
1260
+ keyboardMode: s.keyboardMode,
1261
+ tabStopCount: a
813
1262
  }
814
1263
  ),
815
- l === "diagnostics" && /* @__PURE__ */ a(Be, { registry: e })
1264
+ c === "diagnostics" && /* @__PURE__ */ o(et, { registry: e })
816
1265
  ] })
817
1266
  ] });
818
1267
  }
819
- function L({
1268
+ function U({
820
1269
  id: e,
821
1270
  current: t,
822
- onSelect: r,
823
- children: n
1271
+ onSelect: n,
1272
+ children: s
824
1273
  }) {
825
- return /* @__PURE__ */ a(
1274
+ return /* @__PURE__ */ o(
826
1275
  "button",
827
1276
  {
828
1277
  type: "button",
829
1278
  role: "tab",
830
1279
  "aria-selected": t === e,
831
- onClick: () => r(e),
832
- children: n
1280
+ onClick: () => n(e),
1281
+ children: s
833
1282
  }
834
1283
  );
835
1284
  }
836
- function De({
1285
+ function Xe({
837
1286
  registry: e,
838
1287
  scenario: t,
839
- controls: r
1288
+ component: n,
1289
+ controls: s
840
1290
  }) {
1291
+ const i = M(), a = i.inspector;
841
1292
  if (!t)
842
- return /* @__PURE__ */ a("p", { className: "ds-block", children: "Nenhum cenário ativo. Escolha uma situação na navegação para ver contexto, regras e critérios." });
843
- const n = e.persona(r.persona ?? t.persona), s = r.persona ? e.persona(r.persona)?.permissions ?? [] : e.permissionsOf(t), l = e.rulesOf(t), c = e.fixture(r.fixture ?? t.fixture), o = !!(r.persona && r.persona !== t.persona);
844
- return /* @__PURE__ */ d(x, { children: [
1293
+ return n ? /* @__PURE__ */ d("div", { className: "ds-block", children: [
1294
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.componentReference }),
1295
+ /* @__PURE__ */ o("p", { style: { color: "var(--ds-fg)", fontSize: 15, fontWeight: 600 }, children: n.name }),
1296
+ n.description && /* @__PURE__ */ o("p", { children: n.description }),
1297
+ /* @__PURE__ */ d("dl", { className: "ds-kv", style: { marginTop: 14 }, children: [
1298
+ /* @__PURE__ */ o("dt", { children: a.id }),
1299
+ /* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: n.id }),
1300
+ n.group && /* @__PURE__ */ d(A, { children: [
1301
+ /* @__PURE__ */ o("dt", { children: a.componentGroup }),
1302
+ /* @__PURE__ */ o("dd", { children: n.group })
1303
+ ] })
1304
+ ] })
1305
+ ] }) : /* @__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: [
845
1308
  /* @__PURE__ */ d("div", { className: "ds-block", children: [
846
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Situação" }),
847
- /* @__PURE__ */ a("p", { style: { color: "var(--ds-fg)", fontSize: 14, fontWeight: 600 }, children: t.title }),
848
- t.intent && /* @__PURE__ */ a("p", { children: t.intent }),
1309
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.situation }),
1310
+ /* @__PURE__ */ o("p", { style: { color: "var(--ds-fg)", fontSize: 14, fontWeight: 600 }, children: t.title }),
1311
+ t.intent && /* @__PURE__ */ o("p", { children: t.intent }),
849
1312
  /* @__PURE__ */ d("div", { className: "ds-chips", children: [
850
- /* @__PURE__ */ a("span", { className: "ds-chip", "data-tone": je(t.status), children: S[t.status] }),
851
- (t.tags ?? []).map((u) => /* @__PURE__ */ a("span", { className: "ds-chip", children: u }, u))
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))
852
1315
  ] }),
853
- /* @__PURE__ */ a("p", { style: { marginTop: 6 }, children: Le[t.status] })
1316
+ /* @__PURE__ */ o("p", { style: { marginTop: 6 }, children: i.statusMeaning[t.status] })
854
1317
  ] }),
855
1318
  /* @__PURE__ */ d("div", { className: "ds-block", children: [
856
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Reprodução" }),
1319
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.reproduction }),
857
1320
  /* @__PURE__ */ d("dl", { className: "ds-kv", children: [
858
- /* @__PURE__ */ a("dt", { children: "Id" }),
859
- /* @__PURE__ */ a("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: t.id }),
860
- /* @__PURE__ */ a("dt", { children: "Rota" }),
861
- /* @__PURE__ */ a("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: t.route }),
862
- /* @__PURE__ */ a("dt", { children: "Persona" }),
1321
+ /* @__PURE__ */ o("dt", { children: a.id }),
1322
+ /* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: t.id }),
1323
+ /* @__PURE__ */ o("dt", { children: a.route }),
1324
+ /* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: t.route }),
1325
+ /* @__PURE__ */ o("dt", { children: a.persona }),
863
1326
  /* @__PURE__ */ d("dd", { children: [
864
- n?.name ?? "—",
865
- o && /* @__PURE__ */ a("span", { className: "ds-chip", "data-tone": "warn", style: { marginLeft: 6 }, children: "trocada" })
1327
+ r?.name ?? "—",
1328
+ u && /* @__PURE__ */ o("span", { className: "ds-chip", "data-tone": "warn", style: { marginLeft: 6 }, children: a.personaSwapped })
866
1329
  ] }),
867
- /* @__PURE__ */ a("dt", { children: "Dados" }),
868
- /* @__PURE__ */ a("dd", { children: c?.label ?? "—" }),
869
- /* @__PURE__ */ a("dt", { children: "Rede" }),
870
- /* @__PURE__ */ a("dd", { children: Q[r.network] })
1330
+ /* @__PURE__ */ o("dt", { children: a.data }),
1331
+ /* @__PURE__ */ o("dd", { children: h?.label ?? "—" }),
1332
+ /* @__PURE__ */ o("dt", { children: a.network }),
1333
+ /* @__PURE__ */ o("dd", { children: i.network[s.network] })
871
1334
  ] }),
872
- n?.goal && /* @__PURE__ */ d("p", { style: { marginTop: 8 }, children: [
873
- "Objetivo: ",
874
- n.goal
875
- ] })
1335
+ r?.goal && /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: a.goal(r.goal) })
876
1336
  ] }),
877
- s.length > 0 && /* @__PURE__ */ d("div", { className: "ds-block", children: [
878
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Permissões efetivas" }),
879
- /* @__PURE__ */ a("div", { className: "ds-chips", children: s.map((u) => /* @__PURE__ */ a("span", { className: "ds-chip", children: u }, u)) })
1337
+ c.length > 0 && /* @__PURE__ */ d("div", { className: "ds-block", children: [
1338
+ /* @__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)) })
880
1340
  ] }),
881
1341
  t.preconditions?.length ? /* @__PURE__ */ d("div", { className: "ds-block", children: [
882
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Pré-condições" }),
883
- /* @__PURE__ */ a("ul", { className: "ds-list", children: t.preconditions.map((u) => /* @__PURE__ */ a("li", { children: u }, u)) })
1342
+ /* @__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)) })
884
1344
  ] }) : null,
885
- l.length > 0 && /* @__PURE__ */ d("div", { className: "ds-block", children: [
886
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Regras" }),
887
- l.map((u) => /* @__PURE__ */ d("div", { className: "ds-rule", children: [
888
- /* @__PURE__ */ a("span", { className: "ds-rule__id", children: u.id }),
889
- /* @__PURE__ */ a("span", { className: "ds-rule__statement", children: u.statement }),
890
- u.rationale && /* @__PURE__ */ a("p", { className: "ds-rule__rationale", children: u.rationale })
891
- ] }, u.id))
1345
+ p.length > 0 && /* @__PURE__ */ d("div", { className: "ds-block", children: [
1346
+ /* @__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))
892
1352
  ] }),
893
1353
  t.actions?.length ? /* @__PURE__ */ d("div", { className: "ds-block", children: [
894
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Ações disponíveis" }),
895
- /* @__PURE__ */ a("ul", { className: "ds-list", children: t.actions.map((u) => /* @__PURE__ */ a("li", { children: u }, u)) })
1354
+ /* @__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)) })
896
1356
  ] }) : null,
897
1357
  t.expected?.length ? /* @__PURE__ */ d("div", { className: "ds-block", children: [
898
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Critérios de aceite" }),
899
- /* @__PURE__ */ a("ul", { className: "ds-list", children: t.expected.map((u) => /* @__PURE__ */ a("li", { children: u }, u)) })
1358
+ /* @__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)) })
900
1360
  ] }) : null,
901
1361
  t.approvedAt && /* @__PURE__ */ d("div", { className: "ds-block", children: [
902
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Aprovação" }),
1362
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.approval }),
903
1363
  /* @__PURE__ */ d("p", { children: [
904
1364
  t.approvedAt.date,
905
1365
  " · ",
906
- /* @__PURE__ */ a("code", { children: t.approvedAt.commit.slice(0, 7) })
1366
+ /* @__PURE__ */ o("code", { children: t.approvedAt.commit.slice(0, 7) })
907
1367
  ] }),
908
- /* @__PURE__ */ a("a", { href: t.approvedAt.url, target: "_blank", rel: "noreferrer", children: "Abrir a versão aprovada" })
1368
+ /* @__PURE__ */ o("a", { href: t.approvedAt.url, target: "_blank", rel: "noreferrer", children: a.openApproved })
909
1369
  ] }),
910
1370
  t.ticket && /* @__PURE__ */ d("div", { className: "ds-block", children: [
911
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Engenharia" }),
912
- /* @__PURE__ */ a("p", { children: t.ticket })
1371
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: a.engineering }),
1372
+ /* @__PURE__ */ o("p", { children: t.ticket })
913
1373
  ] })
914
1374
  ] });
915
1375
  }
916
- function Ie({
1376
+ function Ze({
917
1377
  registry: e,
918
1378
  scenario: t,
919
- focusedNode: r,
920
- keyboardMode: n,
921
- tabStopCount: s
1379
+ focusedNode: n,
1380
+ keyboardMode: s,
1381
+ tabStopCount: i
922
1382
  }) {
923
- const l = ne(e.product.theme?.contrastPairs), c = l.filter((o) => o.passes !== !0);
924
- return /* @__PURE__ */ d(x, { children: [
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: [
925
1385
  t && /* @__PURE__ */ d("div", { className: "ds-block", children: [
926
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Contrato do cenário" }),
1386
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.a11yContract }),
927
1387
  /* @__PURE__ */ d("dl", { className: "ds-kv", children: [
928
- /* @__PURE__ */ a("dt", { children: "Teclado" }),
929
- /* @__PURE__ */ a("dd", { children: Fe[t.a11y.keyboard] }),
930
- /* @__PURE__ */ a("dt", { children: "Contraste" }),
931
- /* @__PURE__ */ d("dd", { children: [
932
- "WCAG 2.2 ",
933
- t.a11y.contrast
934
- ] })
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) })
935
1392
  ] }),
936
- t.a11y.announces?.length ? /* @__PURE__ */ d(x, { children: [
937
- /* @__PURE__ */ a("p", { style: { marginTop: 8 }, children: "Precisa ser anunciado:" }),
938
- /* @__PURE__ */ a("div", { className: "ds-chips", children: t.a11y.announces.map((o) => /* @__PURE__ */ a("span", { className: "ds-chip", children: o }, o)) })
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)) })
939
1396
  ] }) : null,
940
- t.a11y.notes && /* @__PURE__ */ a("p", { style: { marginTop: 8 }, children: t.a11y.notes })
1397
+ t.a11y.notes && /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: t.a11y.notes })
941
1398
  ] }),
942
1399
  /* @__PURE__ */ d("div", { className: "ds-block", children: [
943
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Elemento em foco" }),
944
- n ? r ? /* @__PURE__ */ d(x, { children: [
1400
+ /* @__PURE__ */ o("h2", { className: "ds-block__title", children: r.focusedElement }),
1401
+ s ? n ? /* @__PURE__ */ d(A, { children: [
945
1402
  /* @__PURE__ */ d("dl", { className: "ds-kv", children: [
946
- /* @__PURE__ */ a("dt", { children: "Papel" }),
947
- /* @__PURE__ */ a("dd", { children: r.role }),
948
- /* @__PURE__ */ a("dt", { children: "Nome" }),
949
- /* @__PURE__ */ a("dd", { children: r.name ? r.name : /* @__PURE__ */ a("span", { style: { color: "var(--ds-err)" }, children: "sem nome acessível" }) }),
950
- /* @__PURE__ */ a("dt", { children: "Nome vem de" }),
951
- /* @__PURE__ */ a("dd", { children: r.nameFrom }),
952
- r.description ? /* @__PURE__ */ d(x, { children: [
953
- /* @__PURE__ */ a("dt", { children: "Descrição" }),
954
- /* @__PURE__ */ a("dd", { children: r.description })
1403
+ /* @__PURE__ */ o("dt", { children: r.role }),
1404
+ /* @__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 }),
1408
+ /* @__PURE__ */ o("dd", { children: n.nameFrom }),
1409
+ n.description ? /* @__PURE__ */ d(A, { children: [
1410
+ /* @__PURE__ */ o("dt", { children: r.description }),
1411
+ /* @__PURE__ */ o("dd", { children: n.description })
955
1412
  ] }) : null,
956
- /* @__PURE__ */ a("dt", { children: "Seletor" }),
957
- /* @__PURE__ */ a("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: r.selector })
1413
+ /* @__PURE__ */ o("dt", { children: r.selector }),
1414
+ /* @__PURE__ */ o("dd", { style: { fontFamily: "var(--ds-mono)", fontSize: 11 }, children: n.selector })
958
1415
  ] }),
959
- r.states.length > 0 && /* @__PURE__ */ a("div", { className: "ds-chips", style: { marginTop: 8 }, children: r.states.map((o) => /* @__PURE__ */ a("span", { className: "ds-chip", children: o }, o)) }),
960
- r.hiddenFromAssistiveTech && /* @__PURE__ */ a("p", { className: "ds-note", style: { marginTop: 8 }, children: "Este elemento é focável mas está escondido de tecnologia assistiva. Um leitor de tela recebe foco sem receber conteúdo." }),
961
- /* @__PURE__ */ d("p", { style: { marginTop: 8 }, children: [
962
- s,
963
- " paradas de tabulação no palco."
964
- ] })
965
- ] }) : /* @__PURE__ */ d("p", { children: [
966
- "Pressione Tab dentro do palco. ",
967
- s,
968
- " paradas de tabulação foram encontradas."
969
- ] }) : /* @__PURE__ */ a("p", { children: "Ligue o modo teclado na barra de controles para inspecionar a árvore acessível." })
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 })
970
1420
  ] }),
971
1421
  /* @__PURE__ */ d("div", { className: "ds-block", children: [
972
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Contraste dos tokens" }),
973
- l.length === 0 ? /* @__PURE__ */ d("p", { children: [
974
- "O produto não declarou pares de contraste em ",
975
- /* @__PURE__ */ a("code", { children: "theme.contrastPairs" }),
976
- ". Contraste é propriedade de par de cores: declarar aqui valida na origem, uma vez."
977
- ] }) : /* @__PURE__ */ d("table", { className: "ds-contrast", children: [
978
- /* @__PURE__ */ a("thead", { children: /* @__PURE__ */ d("tr", { children: [
979
- /* @__PURE__ */ a("th", { scope: "col", children: "Par" }),
980
- /* @__PURE__ */ a("th", { scope: "col", children: "Razão" })
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 })
981
1427
  ] }) }),
982
- /* @__PURE__ */ a("tbody", { children: l.map((o) => /* @__PURE__ */ d("tr", { children: [
1428
+ /* @__PURE__ */ o("tbody", { children: c.map((h) => /* @__PURE__ */ d("tr", { children: [
983
1429
  /* @__PURE__ */ d("td", { children: [
984
- /* @__PURE__ */ a(
1430
+ /* @__PURE__ */ o(
985
1431
  "span",
986
1432
  {
987
1433
  className: "ds-swatch",
988
- style: { background: o.pair.background },
1434
+ style: { background: h.pair.background },
989
1435
  "aria-hidden": "true"
990
1436
  }
991
1437
  ),
992
- /* @__PURE__ */ a(
1438
+ /* @__PURE__ */ o(
993
1439
  "span",
994
1440
  {
995
1441
  className: "ds-swatch",
996
- style: { background: o.pair.foreground },
1442
+ style: { background: h.pair.foreground },
997
1443
  "aria-hidden": "true"
998
1444
  }
999
1445
  ),
1000
- o.pair.name
1446
+ h.pair.name
1001
1447
  ] }),
1002
- /* @__PURE__ */ a(
1448
+ /* @__PURE__ */ o(
1003
1449
  "td",
1004
1450
  {
1005
1451
  style: {
1006
- color: o.passes === !0 ? "var(--ds-ok)" : o.passes === !1 ? "var(--ds-err)" : "var(--ds-warn)"
1452
+ color: h.passes === !0 ? "var(--ds-ok)" : h.passes === !1 ? "var(--ds-err)" : "var(--ds-warn)"
1007
1453
  },
1008
- children: o.label
1454
+ children: h.label
1009
1455
  }
1010
1456
  )
1011
- ] }, o.pair.name)) })
1457
+ ] }, h.pair.name)) })
1012
1458
  ] }),
1013
- c.length > 0 && /* @__PURE__ */ d("p", { className: "ds-note", style: { marginTop: 8 }, children: [
1014
- c.length,
1015
- " ",
1016
- c.length === 1 ? "par" : "pares",
1017
- " fora do alvo. O teste de tokens do produto falha o build por isso."
1018
- ] })
1459
+ p.length > 0 && /* @__PURE__ */ o("p", { className: "ds-note", style: { marginTop: 8 }, children: r.pairsFailing(p.length) })
1019
1460
  ] }),
1020
- /* @__PURE__ */ a("p", { className: "ds-note", children: "Verificação automática é piso, não teto. Ordem de leitura confusa, rótulo tecnicamente presente mas sem sentido e fluxo impossível de completar com leitor de tela passam no axe." })
1461
+ /* @__PURE__ */ o("p", { className: "ds-note", children: r.automatedIsFloor })
1021
1462
  ] });
1022
1463
  }
1023
- function Be({ registry: e }) {
1024
- const t = e.coverage(), { issues: r } = e;
1025
- return /* @__PURE__ */ d(x, { children: [
1464
+ function et({ registry: e }) {
1465
+ const t = M(), n = t.inspector, s = e.coverage(), { issues: i } = e;
1466
+ return /* @__PURE__ */ d(A, { children: [
1026
1467
  /* @__PURE__ */ d("div", { className: "ds-block", children: [
1027
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Cobertura por status" }),
1028
- /* @__PURE__ */ a("dl", { className: "ds-kv", children: Object.entries(t).filter(([, n]) => n > 0).map(([n, s]) => /* @__PURE__ */ d("div", { style: { display: "contents" }, children: [
1029
- /* @__PURE__ */ a("dt", { children: S[n] }),
1030
- /* @__PURE__ */ a("dd", { style: { fontVariantNumeric: "tabular-nums" }, children: s })
1031
- ] }, n)) }),
1032
- /* @__PURE__ */ d("p", { style: { marginTop: 8 }, children: [
1033
- e.product.scenarios.length,
1034
- " cenários registrados."
1035
- ] })
1468
+ /* @__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)) }),
1473
+ /* @__PURE__ */ o("p", { style: { marginTop: 8 }, children: n.scenariosRegistered(e.product.scenarios.length) })
1036
1474
  ] }),
1037
1475
  /* @__PURE__ */ d("div", { className: "ds-block", children: [
1038
- /* @__PURE__ */ a("h2", { className: "ds-block__title", children: "Contrato de cenário" }),
1039
- r.length === 0 ? /* @__PURE__ */ a("p", { children: "Nenhum problema encontrado." }) : r.map((n, s) => /* @__PURE__ */ d("div", { className: "ds-issue", "data-level": n.level, children: [
1040
- /* @__PURE__ */ a("span", { className: "ds-issue__where", children: n.where }),
1041
- n.message
1042
- ] }, `${n.where}-${s}`))
1476
+ /* @__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}`))
1043
1481
  ] })
1044
1482
  ] });
1045
1483
  }
1046
- function je(e) {
1047
- if (e === "approved" || e === "implemented") return "ok";
1048
- if (e === "in-review" || e === "proposed") return "warn";
1484
+ const tt = {
1485
+ ported: void 0,
1486
+ proposed: "warn",
1487
+ "in-review": "warn",
1488
+ approved: "ok",
1489
+ "in-implementation": void 0,
1490
+ implemented: "ok",
1491
+ superseded: void 0
1492
+ };
1493
+ function ot(e) {
1494
+ return tt[e];
1049
1495
  }
1050
- const ze = ee(function({ viewport: t, textScale: r, reducedMotion: n, keyboardMode: s, children: l }, c) {
1051
- return /* @__PURE__ */ a("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ a(
1496
+ const nt = se(function({ viewport: t, textScale: n, reducedMotion: s, keyboardMode: i, children: a }, r) {
1497
+ return /* @__PURE__ */ o("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ o(
1052
1498
  "div",
1053
1499
  {
1054
- ref: c,
1500
+ ref: r,
1055
1501
  className: "ds-stage",
1056
1502
  "data-viewport": t.id,
1057
- "data-keyboard-mode": s,
1058
- "data-reduced-motion": n,
1503
+ "data-keyboard-mode": i,
1504
+ "data-reduced-motion": s,
1059
1505
  style: {
1060
1506
  width: t.width ? `${t.width}px` : "100%",
1061
1507
  minHeight: t.height ? `${t.height}px` : void 0,
1062
1508
  // A ampliação é aplicada no `font-size` do contêiner, não com
1063
1509
  // `transform: scale`. É a diferença entre testar se o layout aguenta
1064
1510
  // texto grande e só dar zoom na captura de tela.
1065
- fontSize: r === 1 ? void 0 : `${r * 100}%`
1511
+ fontSize: n === 1 ? void 0 : `${n * 100}%`
1066
1512
  },
1067
- children: l
1513
+ children: a
1068
1514
  }
1069
1515
  ) });
1070
1516
  });
1071
- function We({ stops: e }) {
1072
- return e.length === 0 ? null : /* @__PURE__ */ a("div", { className: "ds-chrome ds-taborder", "aria-hidden": "true", children: e.map((t) => /* @__PURE__ */ a(
1517
+ function at({ stops: e }) {
1518
+ return e.length === 0 ? null : /* @__PURE__ */ o("div", { className: "ds-chrome ds-taborder", "aria-hidden": "true", children: e.map((t) => /* @__PURE__ */ o(
1073
1519
  "span",
1074
1520
  {
1075
1521
  className: "ds-taborder__badge",
@@ -1080,46 +1526,40 @@ function We({ stops: e }) {
1080
1526
  `${t.index}-${t.rect.top}-${t.rect.left}`
1081
1527
  )) });
1082
1528
  }
1083
- function He({ title: e, children: t }) {
1529
+ function rt({ title: e, children: t }) {
1084
1530
  return /* @__PURE__ */ d("div", { className: "ds-chrome ds-stage-empty", children: [
1085
- /* @__PURE__ */ a("h2", { children: e }),
1531
+ /* @__PURE__ */ o("h2", { children: e }),
1086
1532
  t
1087
1533
  ] });
1088
1534
  }
1089
- function Ue({ registry: e, onOpenScenario: t }) {
1090
- const { product: r } = e, n = e.coverage(), s = r.scenarios.length;
1535
+ function st({ registry: e, onOpenScenario: t }) {
1536
+ const n = M(), { product: s } = e, i = e.coverage(), a = s.scenarios.length;
1091
1537
  return /* @__PURE__ */ d("div", { className: "ds-chrome ds-home", children: [
1092
1538
  /* @__PURE__ */ d("header", { className: "ds-home__header", children: [
1093
- /* @__PURE__ */ a("h1", { children: r.name }),
1094
- r.tagline && /* @__PURE__ */ a("p", { className: "ds-home__tagline", children: r.tagline }),
1095
- /* @__PURE__ */ d("p", { className: "ds-home__lead", children: [
1096
- "Especificação executável: cada situação abaixo abre por link, com persona, dados e regras próprios. ",
1097
- s,
1098
- " ",
1099
- s === 1 ? "situação registrada" : "situações registradas",
1100
- "."
1101
- ] }),
1102
- /* @__PURE__ */ a("div", { className: "ds-chips", children: Object.entries(n).filter(([, l]) => l > 0).map(([l, c]) => /* @__PURE__ */ d("span", { className: "ds-chip", children: [
1103
- S[l],
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],
1104
1544
  ": ",
1105
1545
  c
1106
- ] }, l)) })
1546
+ ] }, r)) })
1107
1547
  ] }),
1108
- e.tree.map(({ module: l, scenarios: c }) => /* @__PURE__ */ a(
1109
- Ke,
1548
+ e.tree.map(({ module: r, scenarios: c }) => /* @__PURE__ */ o(
1549
+ it,
1110
1550
  {
1111
- module: l,
1551
+ module: r,
1112
1552
  scenarios: c,
1113
1553
  registry: e,
1114
1554
  onOpenScenario: t
1115
1555
  },
1116
- l.id
1556
+ r.id
1117
1557
  )),
1118
1558
  e.orphans.length > 0 && /* @__PURE__ */ d("section", { className: "ds-home__module", children: [
1119
- /* @__PURE__ */ a("h2", { children: "Sem módulo" }),
1120
- /* @__PURE__ */ a("p", { className: "ds-home__hint", children: "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." }),
1121
- /* @__PURE__ */ a(
1122
- J,
1559
+ /* @__PURE__ */ o("h2", { children: n.home.withoutModule }),
1560
+ /* @__PURE__ */ o("p", { className: "ds-home__hint", children: n.home.withoutModuleHint }),
1561
+ /* @__PURE__ */ o(
1562
+ ne,
1123
1563
  {
1124
1564
  scenarios: e.orphans,
1125
1565
  registry: e,
@@ -1129,276 +1569,287 @@ function Ue({ registry: e, onOpenScenario: t }) {
1129
1569
  ] })
1130
1570
  ] });
1131
1571
  }
1132
- function Ke({
1572
+ function it({
1133
1573
  module: e,
1134
1574
  scenarios: t,
1135
- registry: r,
1136
- onOpenScenario: n
1575
+ registry: n,
1576
+ onOpenScenario: s
1137
1577
  }) {
1138
1578
  return /* @__PURE__ */ d("section", { className: "ds-home__module", children: [
1139
- /* @__PURE__ */ a("h2", { children: e.name }),
1140
- e.description && /* @__PURE__ */ a("p", { className: "ds-home__hint", children: e.description }),
1141
- (e.flows ?? []).map((s) => /* @__PURE__ */ a(Ve, { flow: s, registry: r, onOpenScenario: n }, s.id)),
1142
- /* @__PURE__ */ a(J, { scenarios: t, registry: r, onOpenScenario: n })
1579
+ /* @__PURE__ */ o("h2", { children: e.name }),
1580
+ 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 })
1143
1583
  ] });
1144
1584
  }
1145
- function Ve({
1585
+ function ct({
1146
1586
  flow: e,
1147
1587
  registry: t,
1148
- onOpenScenario: r
1588
+ onOpenScenario: n
1149
1589
  }) {
1150
1590
  return /* @__PURE__ */ d("div", { className: "ds-flow", children: [
1151
- /* @__PURE__ */ a("h3", { children: e.title }),
1152
- e.description && /* @__PURE__ */ a("p", { className: "ds-home__hint", children: e.description }),
1153
- /* @__PURE__ */ a("ol", { className: "ds-flow__steps", children: e.steps.map((n, s) => {
1154
- const l = t.scenario(n.scenario), c = Object.entries(n.branches ?? {});
1591
+ /* @__PURE__ */ o("h3", { children: e.title }),
1592
+ 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 ?? {});
1155
1595
  return /* @__PURE__ */ d("li", { children: [
1156
- /* @__PURE__ */ a("button", { type: "button", className: "ds-flow__step", onClick: () => r(n.scenario), children: n.label ?? l?.title ?? n.scenario }),
1157
- n.decision && /* @__PURE__ */ a("p", { className: "ds-flow__decision", children: n.decision }),
1158
- c.length > 0 && /* @__PURE__ */ a("ul", { className: "ds-flow__branches", children: c.map(([o, u]) => /* @__PURE__ */ d("li", { children: [
1159
- /* @__PURE__ */ a("span", { className: "ds-flow__branch-label", children: o }),
1160
- /* @__PURE__ */ a(
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 }),
1600
+ /* @__PURE__ */ o(
1161
1601
  "button",
1162
1602
  {
1163
1603
  type: "button",
1164
1604
  className: "ds-flow__step",
1165
- onClick: () => r(u),
1166
- children: t.scenario(u)?.title ?? u
1605
+ onClick: () => n(p),
1606
+ children: t.scenario(p)?.title ?? p
1167
1607
  }
1168
1608
  )
1169
- ] }, o)) })
1170
- ] }, `${n.scenario}-${s}`);
1609
+ ] }, c)) })
1610
+ ] }, `${s.scenario}-${i}`);
1171
1611
  }) })
1172
1612
  ] });
1173
1613
  }
1174
- function J({
1614
+ function ne({
1175
1615
  scenarios: e,
1176
1616
  registry: t,
1177
- onOpenScenario: r
1617
+ onOpenScenario: n
1178
1618
  }) {
1179
- return e.length === 0 ? /* @__PURE__ */ a("p", { className: "ds-home__hint", children: "Nenhuma situação registrada neste módulo ainda." }) : /* @__PURE__ */ a("ul", { className: "ds-home__grid", children: e.map((n) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ d("button", { type: "button", className: "ds-home__card", onClick: () => r(n.id), children: [
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: [
1180
1621
  /* @__PURE__ */ d("span", { className: "ds-home__card-head", children: [
1181
- /* @__PURE__ */ a("span", { className: "ds-status-dot", "data-status": n.status }),
1182
- /* @__PURE__ */ a("span", { className: "ds-home__card-title", children: n.title })
1622
+ /* @__PURE__ */ o("span", { className: "ds-status-dot", "data-status": i.status }),
1623
+ /* @__PURE__ */ o("span", { className: "ds-home__card-title", children: i.title })
1183
1624
  ] }),
1184
- n.intent && /* @__PURE__ */ a("span", { className: "ds-home__card-intent", children: n.intent }),
1625
+ i.intent && /* @__PURE__ */ o("span", { className: "ds-home__card-intent", children: i.intent }),
1185
1626
  /* @__PURE__ */ d("span", { className: "ds-home__card-meta", children: [
1186
- t.persona(n.persona)?.name ?? n.persona,
1627
+ t.persona(i.persona)?.name ?? i.persona,
1187
1628
  " · ",
1188
- S[n.status],
1189
- n.a11y.keyboard === "full" ? " · teclado" : ""
1629
+ s.status[i.status],
1630
+ i.a11y.keyboard === "full" ? ` · ${s.home.keyboardBadge}` : ""
1190
1631
  ] })
1191
- ] }) }, n.id)) });
1632
+ ] }) }, i.id)) });
1192
1633
  }
1193
- function Xe({ product: e }) {
1194
- const t = k(() => oe(e), [e]), r = k(() => se(e.deploy), [e.deploy]), { location: n, controls: s, viewport: l, setControls: c, navigate: o, openScenario: u } = de(t), [m, f] = _(!0), v = te(null), { focused: g, tabStops: i } = Ae(s.keyboardMode, v), h = t.scenario(s.scenario), b = t.persona(s.persona ?? h?.persona), y = t.fixture(s.fixture ?? h?.fixture), $ = k(() => {
1195
- const N = s.dataSource ?? "fixtures";
1196
- return N === "fixtures" ? O : e.dataSources?.adapters?.find((w) => w.id === N) ?? O;
1197
- }, [s.dataSource, e.dataSources?.adapters]), { data: P, isLoading: R, error: D } = ge({ scenario: h, fixture: y, network: s.network, adapter: $ });
1198
- E(() => {
1199
- const N = (w) => {
1200
- if (!(!w.shiftKey || w.metaKey || w.ctrlKey || w.altKey || w.target?.matches("input, textarea, select, [contenteditable='true']"))) {
1201
- switch (w.key) {
1202
- case "C":
1203
- c({ chrome: !s.chrome });
1204
- break;
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) {
1205
1643
  case "K":
1206
- c({ keyboardMode: !s.keyboardMode });
1644
+ c({ keyboardMode: !a.keyboardMode });
1207
1645
  break;
1208
1646
  case "P":
1209
- c({ inspector: !s.inspector });
1647
+ c({ inspector: !a.inspector });
1210
1648
  break;
1211
1649
  default:
1212
1650
  return;
1213
1651
  }
1214
- w.preventDefault();
1652
+ _.preventDefault();
1215
1653
  }
1216
1654
  };
1217
- return window.addEventListener("keydown", N), () => window.removeEventListener("keydown", N);
1218
- }, [s.chrome, s.keyboardMode, s.inspector, c]);
1219
- const T = k(() => s.persona && s.persona !== h?.persona ? t.persona(s.persona)?.permissions ?? [] : t.permissionsOf(h), [s.persona, t, h]), I = k(
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(
1220
1658
  () => ({
1221
- scenario: h,
1222
- persona: b,
1223
- permissions: T,
1224
- can: (N) => T.includes(N),
1225
- data: P,
1226
- fixture: y,
1227
- network: s.network,
1228
- isLoading: R,
1229
- error: D,
1230
- rules: t.rulesOf(h),
1231
- viewport: l,
1232
- themeMode: s.themeMode,
1233
- locale: s.locale,
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,
1234
1672
  a11y: {
1235
- keyboardMode: s.keyboardMode,
1236
- reducedMotion: s.reducedMotion,
1237
- textScale: s.textScale
1673
+ keyboardMode: a.keyboardMode,
1674
+ reducedMotion: a.reducedMotion,
1675
+ textScale: a.textScale
1238
1676
  },
1239
- navigate: o,
1240
- openScenario: u
1677
+ navigate: p,
1678
+ openScenario: h
1241
1679
  }),
1242
1680
  [
1243
- h,
1244
- b,
1245
- T,
1681
+ l,
1682
+ w,
1246
1683
  P,
1247
- y,
1248
- s.network,
1249
- s.themeMode,
1250
- s.locale,
1251
- s.keyboardMode,
1252
- s.reducedMotion,
1253
- s.textScale,
1254
- R,
1255
- D,
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,
1256
1694
  t,
1257
- l,
1258
- o,
1259
- u
1695
+ r,
1696
+ p,
1697
+ h
1260
1698
  ]
1261
- ), X = !h && n.path === "/", A = me(e.routes, n.path), B = e.wrapper, j = e.notFound, z = A ? /* @__PURE__ */ a(A.definition.screen, { params: A.params, context: I }) : j ? /* @__PURE__ */ a(j, { path: n.path }) : /* @__PURE__ */ a(He, { title: "Nenhuma rota para este endereço", children: /* @__PURE__ */ d("p", { children: [
1262
- /* @__PURE__ */ a("code", { children: n.path }),
1263
- " não casa com nenhuma rota declarada em",
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 }),
1264
1701
  " ",
1265
- /* @__PURE__ */ a("code", { children: "productDefinition.routes" }),
1266
- ". Escolha uma situação na navegação."
1267
- ] }) }), Z = B ? /* @__PURE__ */ a(B, { context: I, children: z }) : z;
1268
- return /* @__PURE__ */ d(
1702
+ 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(
1269
1705
  "div",
1270
1706
  {
1271
1707
  className: "ds-root",
1272
- "data-chrome": s.chrome ? "visible" : "hidden",
1273
- "data-inspector": s.inspector ? "open" : "closed",
1274
- "data-sidebar": m ? "open" : "closed",
1275
- "data-viewport": l.id,
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,
1276
1712
  children: [
1277
- s.chrome && /* @__PURE__ */ a(
1278
- $e,
1713
+ a.chrome && /* @__PURE__ */ o(
1714
+ Ue,
1279
1715
  {
1280
1716
  product: e,
1281
- scenario: h,
1282
- deploy: r,
1283
- inspectorOpen: s.inspector,
1284
- sidebarOpen: m,
1285
- onToggleInspector: () => c({ inspector: !s.inspector }),
1286
- onToggleSidebar: () => f((N) => !N),
1287
- onHideChrome: () => c({ chrome: !1 })
1717
+ scenario: l,
1718
+ 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" })
1288
1723
  }
1289
1724
  ),
1290
- s.chrome && /* @__PURE__ */ a(
1291
- Oe,
1725
+ a.chrome && /* @__PURE__ */ o(
1726
+ We,
1292
1727
  {
1293
1728
  registry: t,
1294
- activeScenario: s.scenario,
1295
- onOpenScenario: u
1729
+ activeScenario: l,
1730
+ activeComponent: a.component,
1731
+ controls: a,
1732
+ onOpenScenario: h,
1733
+ onOpenComponent: u
1296
1734
  }
1297
1735
  ),
1298
1736
  /* @__PURE__ */ d("div", { className: "ds-stage-area", children: [
1299
- X ? /* @__PURE__ */ a("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ a(Ue, { registry: t, onOpenScenario: u }) }) : /* @__PURE__ */ a(
1300
- ze,
1737
+ K ? /* @__PURE__ */ o("div", { className: "ds-stage-scroll", children: /* @__PURE__ */ o(st, { registry: t, onOpenScenario: h }) }) : /* @__PURE__ */ o(
1738
+ nt,
1301
1739
  {
1302
- ref: v,
1303
- viewport: l,
1304
- textScale: s.textScale,
1305
- reducedMotion: s.reducedMotion,
1306
- keyboardMode: s.keyboardMode,
1307
- children: Z
1740
+ ref: m,
1741
+ viewport: r,
1742
+ textScale: a.textScale,
1743
+ reducedMotion: a.reducedMotion,
1744
+ keyboardMode: a.keyboardMode,
1745
+ children: k
1308
1746
  }
1309
1747
  ),
1310
- s.chrome && /* @__PURE__ */ a(Pe, { registry: t, controls: s, onChange: c })
1748
+ a.chrome && /* @__PURE__ */ o(
1749
+ Ye,
1750
+ {
1751
+ registry: t,
1752
+ controls: a,
1753
+ scenarioActive: !!l,
1754
+ onChange: c
1755
+ }
1756
+ )
1311
1757
  ] }),
1312
- s.chrome && /* @__PURE__ */ a(
1313
- Re,
1758
+ a.chrome && /* @__PURE__ */ o(
1759
+ Qe,
1314
1760
  {
1315
1761
  registry: t,
1316
- scenario: h,
1317
- controls: s,
1318
- focusedNode: g,
1319
- tabStopCount: i.length
1762
+ scenario: l,
1763
+ component: g,
1764
+ controls: a,
1765
+ focusedNode: N,
1766
+ tabStopCount: y.length
1320
1767
  }
1321
1768
  ),
1322
- s.keyboardMode && /* @__PURE__ */ a(We, { stops: i }),
1323
- !s.chrome && /* @__PURE__ */ a(
1769
+ a.keyboardMode && /* @__PURE__ */ o(at, { stops: y }),
1770
+ !a.chrome && /* @__PURE__ */ o(
1324
1771
  "button",
1325
1772
  {
1326
1773
  type: "button",
1327
1774
  className: "ds-chrome ds-restore",
1328
1775
  onClick: () => c({ chrome: !0 }),
1329
- children: "Mostrar controles"
1776
+ children: n.shell.restoreChrome
1330
1777
  }
1331
1778
  )
1332
1779
  ]
1333
1780
  }
1334
- );
1781
+ ) });
1335
1782
  }
1336
- function C(e) {
1783
+ function H(e) {
1337
1784
  return new Date(e.length === 10 ? `${e}T00:00:00` : e);
1338
1785
  }
1339
- function Ze(e, t) {
1340
- const r = C(e), n = C(t);
1341
- let s = n.getFullYear() - r.getFullYear();
1342
- const l = n.getMonth() - r.getMonth();
1343
- return (l < 0 || l === 0 && n.getDate() < r.getDate()) && (s -= 1), s;
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;
1344
1791
  }
1345
- function et(e, t) {
1346
- const r = C(e), n = C(t);
1347
- return Math.floor((n.getTime() - r.getTime()) / 864e5);
1792
+ function yt(e, t) {
1793
+ const n = H(e), s = H(t);
1794
+ return Math.floor((s.getTime() - n.getTime()) / 864e5);
1348
1795
  }
1349
1796
  export {
1350
- rt as CONTRAST_THRESHOLDS,
1351
- Xe as DesignSpace,
1352
- Ue as Home,
1353
- Fe as KEYBOARD_LABELS,
1354
- Q as NETWORK_LABELS,
1355
- q as NETWORK_STATES,
1356
- p as PARAM,
1357
- nt as SCENARIO_STATUSES,
1358
- fe as SLOW_NETWORK_DELAY_MS,
1359
- S as STATUS_LABELS,
1360
- Le as STATUS_MEANING,
1361
- be as SimulatedNetworkError,
1362
- ze as Stage,
1363
- He as StageEmpty,
1364
- G as TEXT_SCALES,
1365
- We as TabOrderOverlay,
1366
- Y as VIEWPORTS,
1367
- Ze as ageInYears,
1368
- st as applyOverrides,
1369
- ot as assertContrastPairs,
1370
- it as checkContrastPair,
1371
- ne as checkContrastPairs,
1372
- dt as commitUrl,
1373
- ke as computeRole,
1374
- ct as contrastRatio,
1375
- Je as createHttpAdapter,
1376
- oe as createRegistry,
1377
- et as daysBetween,
1378
- _e as describeElement,
1379
- O as fixtureAdapter,
1380
- lt as flatten,
1381
- ut as formatIssues,
1382
- se as getDeployContext,
1383
- ht as hasErrors,
1384
- he as matchPath,
1385
- mt as parseColor,
1386
- ie as parseControls,
1387
- C as parseIsoDate,
1388
- pt as readCssVariable,
1389
- ft as relativeLuminance,
1390
- F as resolveFixture,
1391
- me as resolveRoute,
1392
- ce as resolveViewport,
1393
- re as scenarioUrl,
1394
- H as serializeControls,
1395
- bt as serializeValue,
1396
- Ee as shortSelector,
1397
- Te as tabbableElements,
1398
- de as useDesignSpaceState,
1399
- Ae as useKeyboardMode,
1400
- ge as useScenarioData,
1401
- ae as validateProduct,
1402
- vt as validateScenario
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
1403
1854
  };
1404
1855
  //# sourceMappingURL=index.js.map